From 741cdd8ee3a62abb57692fad6661513d107464ab Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 27 Sep 2024 17:30:56 +0800 Subject: [PATCH 001/740] fix(twitter): check 429 --- lib/routes/twitter/api/web-api/utils.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 2ff5c0caedf20b1..7397b0ca3434f36 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -127,10 +127,10 @@ export const twitterGot = async (url, params) => { }, dispatcher: dispatchers.agent, onResponse: async ({ response }) => { - if (response.status === 429) { - logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token}`); - await cache.set(`twitter:lock-token:${auth.token}`, '1', 1000); - } else if (response.status === 403 || response.status === 401 || JSON.stringify(response._data?.data) === '{"user":{}}') { + if (response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') { + logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}`); + await cache.set(`twitter:lock-token:${auth.token}`, '1', 2000); + } else if (response.status === 403 || response.status === 401) { const newCookie = await login({ username: auth.username, password: auth.password, @@ -139,7 +139,7 @@ export const twitterGot = async (url, params) => { if (newCookie) { logger.debug(`twitter debug: reset twitter cookie for token ${auth.token}, ${newCookie}`); await cache.set(`twitter:cookie:${auth.token}`, newCookie, config.cache.contentExpire); - logger.debug(`twitter debug: unlock twitter cookie with error1 for token ${auth.token}`); + logger.debug(`twitter debug: unlock twitter cookie for token ${auth.token} with error1`); await cache.set(`twitter:lock-token:${auth.token}`, '', 1); } else { const tokenIndex = config.twitter.authToken?.indexOf(auth.token); @@ -158,7 +158,7 @@ export const twitterGot = async (url, params) => { config.twitter.password?.splice(passwordIndex, 1); } } - logger.debug(`twitter debug: delete twitter cookie for token ${auth.token}, remaining tokens: ${config.twitter.authToken?.length}`); + logger.debug(`twitter debug: delete twitter cookie for token ${auth.token} with status ${response.status}, remaining tokens: ${config.twitter.authToken?.length}`); await cache.set(`twitter:lock-token:${auth.token}`, '1', 86400); } } From 91258810ea6a5f68618b66c4c78c68b1805eee81 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Fri, 27 Sep 2024 17:54:55 +0800 Subject: [PATCH 002/740] fix(twitter): lockPrefix --- lib/routes/twitter/api/web-api/utils.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 7397b0ca3434f36..001241ab1e02957 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -34,17 +34,19 @@ const token2Cookie = (token) => } }); +const lockPrefix = 'twitter:lock-token1:'; + const getAuth = async (retry: number) => { if (config.twitter.authToken && retry > 0) { const index = authTokenIndex++ % config.twitter.authToken.length; const token = config.twitter.authToken[index]; - const lock = await cache.get(`twitter:lock-token:${token}`); + const lock = await cache.get(`${lockPrefix}${token}`); if (lock) { await new Promise((resolve) => setTimeout(resolve, Math.random() * 500 + 500)); return await getAuth(retry - 1); } else { logger.debug(`twitter debug: lock twitter cookie for token ${token}`); - await cache.set(`twitter:lock-token:${token}`, '1', 20); + await cache.set(`${lockPrefix}${token}`, '1', 20); return { token, username: config.twitter.username?.[index], @@ -129,7 +131,7 @@ export const twitterGot = async (url, params) => { onResponse: async ({ response }) => { if (response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') { logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}`); - await cache.set(`twitter:lock-token:${auth.token}`, '1', 2000); + await cache.set(`${lockPrefix}${auth.token}`, '1', 2000); } else if (response.status === 403 || response.status === 401) { const newCookie = await login({ username: auth.username, @@ -140,7 +142,7 @@ export const twitterGot = async (url, params) => { logger.debug(`twitter debug: reset twitter cookie for token ${auth.token}, ${newCookie}`); await cache.set(`twitter:cookie:${auth.token}`, newCookie, config.cache.contentExpire); logger.debug(`twitter debug: unlock twitter cookie for token ${auth.token} with error1`); - await cache.set(`twitter:lock-token:${auth.token}`, '', 1); + await cache.set(`${lockPrefix}${auth.token}`, '', 1); } else { const tokenIndex = config.twitter.authToken?.indexOf(auth.token); if (tokenIndex !== undefined && tokenIndex !== -1) { @@ -159,7 +161,7 @@ export const twitterGot = async (url, params) => { } } logger.debug(`twitter debug: delete twitter cookie for token ${auth.token} with status ${response.status}, remaining tokens: ${config.twitter.authToken?.length}`); - await cache.set(`twitter:lock-token:${auth.token}`, '1', 86400); + await cache.set(`${lockPrefix}${auth.token}`, '1', 86400); } } }, @@ -169,7 +171,7 @@ export const twitterGot = async (url, params) => { logger.debug(`twitter debug: update twitter cookie for token ${auth.token}`); await cache.set(`twitter:cookie:${auth.token}`, JSON.stringify(dispatchers.jar.serializeSync()), config.cache.contentExpire); logger.debug(`twitter debug: unlock twitter cookie with success for token ${auth.token}`); - await cache.set(`twitter:lock-token:${auth.token}`, '', 1); + await cache.set(`${lockPrefix}${auth.token}`, '', 1); } return response._data; From d8c5452bbc21421c4b7c9609c76601ca7610b1cb Mon Sep 17 00:00:00 2001 From: huanfei <41602338+huanfe1@users.noreply.github.com> Date: Fri, 27 Sep 2024 20:48:48 +0800 Subject: [PATCH 003/740] fix: pornhub change rss image (#16950) --- lib/routes/pornhub/model.ts | 8 +++----- lib/routes/pornhub/pornstar.ts | 8 +++----- lib/routes/pornhub/users.ts | 8 +++----- 3 files changed, 9 insertions(+), 15 deletions(-) diff --git a/lib/routes/pornhub/model.ts b/lib/routes/pornhub/model.ts index 3768a8e3edf67a9..32296bc855b7935 100644 --- a/lib/routes/pornhub/model.ts +++ b/lib/routes/pornhub/model.ts @@ -1,4 +1,4 @@ -import { Route, ViewType } from '@/types'; +import { Route, ViewType, Data } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { isValidHost } from '@/utils/valid-host'; @@ -30,7 +30,7 @@ export const route: Route = { handler, }; -async function handler(ctx) { +async function handler(ctx): Promise { const { language = 'www', username, sort = '' } = ctx.req.param(); const link = `https://${language}.pornhub.com/model/${username}/videos${sort ? `?o=${sort}` : ''}`; if (!isValidHost(language)) { @@ -47,9 +47,7 @@ async function handler(ctx) { title: $('h1').first().text(), description: $('section.aboutMeSection').text().trim(), link, - image: $('#coverPictureDefault').attr('src'), - logo: $('#getAvatar').attr('src'), - icon: $('#getAvatar').attr('src'), + image: $('#getAvatar').attr('src'), language: $('html').attr('lang'), item: items, }; diff --git a/lib/routes/pornhub/pornstar.ts b/lib/routes/pornhub/pornstar.ts index e4f5a260bec2fb6..ea8fa0853742ba3 100644 --- a/lib/routes/pornhub/pornstar.ts +++ b/lib/routes/pornhub/pornstar.ts @@ -1,4 +1,4 @@ -import { Route, ViewType } from '@/types'; +import { Route, ViewType, Data } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { isValidHost } from '@/utils/valid-host'; @@ -73,7 +73,7 @@ export const route: Route = { handler, }; -async function handler(ctx) { +async function handler(ctx): Promise { const { language = 'www', username, sort = 'mr' } = ctx.req.param(); let link = `https://${language}.pornhub.com/pornstar/${username}?o=${sort}`; if (!isValidHost(language)) { @@ -101,9 +101,7 @@ async function handler(ctx) { title: $('h1').first().text(), description: $('section.aboutMeSection').text().trim(), link, - image: $('#coverPictureDefault').attr('src'), - logo: $('#getAvatar').attr('src'), - icon: $('#getAvatar').attr('src'), + image: $('#getAvatar').attr('src'), language: $('html').attr('lang'), item: items, }; diff --git a/lib/routes/pornhub/users.ts b/lib/routes/pornhub/users.ts index 6e6e33b5df5d943..ade011d9a7d80c6 100644 --- a/lib/routes/pornhub/users.ts +++ b/lib/routes/pornhub/users.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, Data } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { isValidHost } from '@/utils/valid-host'; @@ -29,7 +29,7 @@ export const route: Route = { handler, }; -async function handler(ctx) { +async function handler(ctx): Promise { const { language = 'www', username } = ctx.req.param(); const link = `https://${language}.pornhub.com/users/${username}/videos`; if (!isValidHost(language)) { @@ -46,9 +46,7 @@ async function handler(ctx) { title: $('.profileUserName a').text(), description: $('.aboutMeText').text().trim(), link, - image: $('#coverPictureDefault').attr('src'), - logo: $('#getAvatar').attr('src'), - icon: $('#getAvatar').attr('src'), + image: $('#getAvatar').attr('src'), language: $('html').attr('lang'), allowEmpty: true, item: items, From 9ea12483418e1a28951d1728a53b79cc7d5a1640 Mon Sep 17 00:00:00 2001 From: SimbaFs <39305460+simbafs@users.noreply.github.com> Date: Fri, 27 Sep 2024 21:36:29 +0800 Subject: [PATCH 004/740] feat(route): New Route to NCKU Phys (#16925) * NCKU phys * fix double slashes --- lib/routes/ncku/namespace.ts | 2 +- lib/routes/ncku/phys.ts | 95 ++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 lib/routes/ncku/phys.ts diff --git a/lib/routes/ncku/namespace.ts b/lib/routes/ncku/namespace.ts index 3f68ce2afca42b6..d1112e85b026d63 100644 --- a/lib/routes/ncku/namespace.ts +++ b/lib/routes/ncku/namespace.ts @@ -2,5 +2,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'National Cheng Kung University', - url: 'ncku.edu.tw', + url: 'www.ncku.edu.tw', }; diff --git a/lib/routes/ncku/phys.ts b/lib/routes/ncku/phys.ts new file mode 100644 index 000000000000000..0243c97662d3d85 --- /dev/null +++ b/lib/routes/ncku/phys.ts @@ -0,0 +1,95 @@ +import type { Route } from '@/types'; +import { CheerioAPI, load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; + +const currentURL = (catagory: string) => `https://phys.ncku.edu.tw/news/${catagory === '_all' ? '' : catagory}`; + +const catagories = { + '24': '物理系', + scholarship: '獎助學金', + admission: '招生與錄取報到', + 'course-announcement': '助教公告', + 'bachelor-announcement': '大學部', + 'master-announcement': '研究所', + graduation: '畢業離校', + 'student-guide': '學生手冊與新生入學', + honor: '榮譽榜', + career: '求才公告', + others: '其他', + _all: '所有訊息', +}; + +export const route: Route = { + 'zh-TW': { + name: '國立成功大學物理系公告', + }, + name: 'Phys News', + description: `| 分類 | catagory | +| 物理系 | 24 | +| 獎助學金 | scholarship | +| 招生與錄取報到 | admission | +| 助教公告 | course-announcement | +| 大學部 | bachelor-announcement | +| 研究所 | master-announcement | +| 畢業離校 | graduation | +| 學生手冊與新生入學 | student-guide | +| 榮譽榜 | honor | +| 求才公告 | career | +| 其他 | others | +| 所有訊息 | _all | +`, + path: '/phys/:catagory?', + parameters: { + catagory: 'catagory, default is _all', + }, + categories: ['university'], + example: '/ncku/phys/_all', + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['phys.ncku.edu.tw/news/'], + target: '/phys/_all', + }, + { + source: ['phys.ncku.edu.tw/news/:catagory/'], + target: '/phys/:catagory', + }, + ], + maintainers: ['simbafs'], + handler: async (ctx) => { + let catagory = ctx.req.param('catagory') ?? '_all'; + if (catagories[catagory] === undefined) { + catagory = '_all'; + } + + const $ = await ofetch(currentURL(catagory), { + parseResponse: load, + }); + + const item = $('.newsList .Txt') + .toArray() + .map((e) => ({ + title: $('a', e).text(), + pubDate: new Date( + $('.newsDate', e) + .text() + .match(/\d{4}(?: \/ \d{2}){2}/)?.[0] || '' + ), + link: $('a', e).attr('href'), + catagory: $('.newIcon', e).text(), + })); + + return { + title: `成大物理系公告 - ${catagories[catagory]}`, + link: currentURL(catagory), + item, + }; + }, +}; From 3bb7b3504394fdabb3f9020e4d3ce65d066a9ee3 Mon Sep 17 00:00:00 2001 From: Zhaowei Zhong Date: Fri, 27 Sep 2024 23:48:32 +0900 Subject: [PATCH 005/740] feat(route): Fix and update LoveLive! Series News (#16936) * Fix and update LoveLive NEWS route * Radar support * Update Date parse * Remove unnecessary escape characters * Modify route name * Use API to fetch articles * fix: schedule --------- --- lib/routes/lovelive-anime/namespace.ts | 2 +- lib/routes/lovelive-anime/news.ts | 82 +++++++++++++------ lib/routes/lovelive-anime/schedules.ts | 24 ++++-- .../lovelive-anime/templates/description.art | 2 +- .../lovelive-anime/templates/scheduleDesc.art | 1 - lib/routes/lovelive-anime/topics.ts | 2 +- 6 files changed, 77 insertions(+), 36 deletions(-) diff --git a/lib/routes/lovelive-anime/namespace.ts b/lib/routes/lovelive-anime/namespace.ts index 74afe629c14818c..d59afe9c09bcefa 100644 --- a/lib/routes/lovelive-anime/namespace.ts +++ b/lib/routes/lovelive-anime/namespace.ts @@ -1,6 +1,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'lovelive-anime', + name: 'Love Live! Official Website', url: 'www.lovelive-anime.jp', }; diff --git a/lib/routes/lovelive-anime/news.ts b/lib/routes/lovelive-anime/news.ts index a5fe06a03893e94..6c722839e34d774 100644 --- a/lib/routes/lovelive-anime/news.ts +++ b/lib/routes/lovelive-anime/news.ts @@ -7,13 +7,20 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import path from 'node:path'; import { art } from '@/utils/render'; +import ofetch from '@/utils/ofetch'; +import timezone from '@/utils/timezone'; +import { parseDate } from '@/utils/parse-date'; const renderDescription = (desc) => art(path.join(__dirname, 'templates/description.art'), desc); export const route: Route = { - path: '/news/:option?', + path: '/news/:abbr?/:category?/:option?', categories: ['anime'], example: '/lovelive-anime/news', - parameters: { option: 'Crawl full text when `option` is `detail`.' }, + parameters: { + abbr: 'The path to the Love Live series of sub-projects on the official website is detailed in the table below, `abbr` is `detail` when crawling the full text', + category: 'The official website lists the Topics category, `category` is `detail` when crawling the full text, other categories see the following table for details', + option: 'Crawl full text when `option` is `detail`.', + }, features: { requireConfig: false, requirePuppeteer: false, @@ -24,45 +31,68 @@ export const route: Route = { }, radar: [ { - source: ['www.lovelive-anime.jp/', 'www.lovelive-anime.jp/news'], + source: ['www.lovelive-anime.jp/', 'www.lovelive-anime.jp/news/'], target: '/news', }, ], - name: 'Love Live! Official Website Latest NEWS', - maintainers: ['axojhf'], + name: 'News', + maintainers: ['axojhf', 'zhaoweizhong'], 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 | + + | 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) { - const rootUrl = 'https://www.lovelive-anime.jp/news/'; + const abbr = ctx.req.param('abbr'); + const category = ctx.req.param('category'); + const option = ctx.req.param('option'); - const response = await got(rootUrl); + const isDetail = abbr === 'detail' || category === 'detail' || option === 'detail'; + let series = ''; + let subcategory = ''; + + if (abbr && abbr !== 'detail') { + series = abbr; + if (category && category !== 'detail') { + subcategory = category; + } + } - const $ = load(response.data); + const limit = 20; + + let url = `https://www.lovelive-anime.jp/common/api/article_list.php?site=jp&ip=lovelive&limit=${limit}&data=`; + const params: { category: string[]; series?: string[]; subcategory?: string[] } = { category: ['NEWS'] }; + if (series) { + params.series = [series]; + } + if (subcategory) { + params.subcategory = [subcategory]; + } + url += encodeURIComponent(JSON.stringify(params)); - const pageFace = $('div.c-card.p-colum__box') - .map((_, item) => { - item = $(item); + const data = await ofetch(url); - return { - link: item.find('a.c-card__head').attr('href'), - pubDate: item.find('span.c-card__date').text(), - title: item.find('div.c-card__title').text(), - // description: `${item.find('div.c-card__title').text()}
` - description: renderDescription({ - title: item.find('div.c-card__title').text(), - imglink: item.find('a.c-card__head > div > figure > img').attr('src'), - }), - }; - }) - .get(); + const articles = data.data.article_list.map((item) => ({ + title: item.title, + link: item.url, + description: renderDescription({ + imglink: 'https://www.lovelive-anime.jp' + item.thumbnail, + }), + pubDate: timezone(parseDate(item.dspdate), +9), + category: item.categories.subcategory.map((category) => category.name), + })); - let items = pageFace; + let items = articles; - if (ctx.req.param('option') === 'detail') { + if (isDetail) { items = await Promise.all( - pageFace.map((item) => + articles.map((item) => cache.tryGet(item.link, async () => { const detailResp = await got(item.link); const $ = load(detailResp.data); diff --git a/lib/routes/lovelive-anime/schedules.ts b/lib/routes/lovelive-anime/schedules.ts index 0e8b5fce24a452b..16dd15fa339a555 100644 --- a/lib/routes/lovelive-anime/schedules.ts +++ b/lib/routes/lovelive-anime/schedules.ts @@ -9,20 +9,33 @@ const renderDescription = (desc) => art(path.join(__dirname, 'templates/schedule import dayjs from 'dayjs'; import utc from 'dayjs/plugin/utc'; import timezone from 'dayjs/plugin/timezone'; +dayjs.extend(utc); +dayjs.extend(timezone); export const route: Route = { path: '/schedules/:serie?/:category?', - name: 'Unknown', - maintainers: [], + parameters: { + serie: 'Love Live! Series sub-projects abbreviation, see the following table', + category: 'The official website lists the categories, see the following table for details', + }, + name: 'Schedule', + example: '/lovelive-anime/schedules', + categories: ['anime'], + maintainers: ['axojhf'], handler, + description: `| Sub-project Name (not full name) | 全シリーズ | Lovelive! | Lovelive! Sunshine!! | Lovelive! Nijigasaki High School Idol Club | Lovelive! Superstar!! | ラブライブ!スクールアイドルミュージカル | +| -------------------------------- | ----------------------- | ---------- | -------------------- | ------------------------------------------ | --------------------- | ---------------------------------------- | +| \`serie\` parameter | *No parameter* or \`all\` | \`lovelive\` | \`sunshine\` | \`nijigasaki\` | \`superstar\` | \`musical\` | + +| Category Name | 全て | ライブ | イベント | 生配信 | +| -------------------- | ----------------------- | ------ | -------- | --------- | +| \`category\` parameter | *No parameter* or \`all\` | \`live\` | \`event\` | \`haishin\` |`, }; async function handler(ctx) { - dayjs.extend(utc); - dayjs.extend(timezone); const serie = ctx.req.param('serie'); const category = ctx.req.param('category'); - const rootUrl = `https://www.lovelive-anime.jp/common/api/calendar_list.php`; + const rootUrl = 'https://www.lovelive-anime.jp/common/api/calendar_list.php'; const nowTime = dayjs(); const dataPara = { year: nowTime.year(), @@ -49,7 +62,6 @@ async function handler(ctx) { title, category, description: renderDescription({ - title, desc: item.event_dspdate, startTime: eventStartDate, endTime: eventEndDate, diff --git a/lib/routes/lovelive-anime/templates/description.art b/lib/routes/lovelive-anime/templates/description.art index 6f85ee13fa6a36c..41ce31a1107cdb3 100644 --- a/lib/routes/lovelive-anime/templates/description.art +++ b/lib/routes/lovelive-anime/templates/description.art @@ -1 +1 @@ -{{title}}
\ No newline at end of file + diff --git a/lib/routes/lovelive-anime/templates/scheduleDesc.art b/lib/routes/lovelive-anime/templates/scheduleDesc.art index e5ec0b2b569638f..d512a9b37b2b442 100644 --- a/lib/routes/lovelive-anime/templates/scheduleDesc.art +++ b/lib/routes/lovelive-anime/templates/scheduleDesc.art @@ -1,3 +1,2 @@ -

{{title}}


{{startTime}}   ~   {{endTime}}

{{desc}} diff --git a/lib/routes/lovelive-anime/topics.ts b/lib/routes/lovelive-anime/topics.ts index 67de791dba732d4..8802c0fc745f209 100644 --- a/lib/routes/lovelive-anime/topics.ts +++ b/lib/routes/lovelive-anime/topics.ts @@ -27,7 +27,7 @@ export const route: Route = { supportPodcast: false, supportScihub: false, }, - name: 'Love Live Official Website Categories Topics', + name: 'Categories Topics', maintainers: ['axojhf'], handler, description: `| Sub-project Name (not full name) | Lovelive! | Lovelive! Sunshine!! | Lovelive! Nijigasaki High School Idol Club | Lovelive! Superstar!! | 幻日のヨハネ | ラブライブ!スクールアイドルミュージカル | From 11d67a26bd4f3f0aa9bf754ae2f4e332164a7f1d Mon Sep 17 00:00:00 2001 From: Neko Aria <990879119@qq.com> Date: Fri, 27 Sep 2024 23:11:43 +0800 Subject: [PATCH 006/740] fix(yande): update namespace and route details (#16940) * fix(yande): update namespace and route details * fix: add back original authors --------- --- lib/routes/yande/namespace.ts | 2 +- lib/routes/yande/post.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/routes/yande/namespace.ts b/lib/routes/yande/namespace.ts index aadd5323d86972c..fb85bd529117a81 100644 --- a/lib/routes/yande/namespace.ts +++ b/lib/routes/yande/namespace.ts @@ -1,7 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'yande', + name: 'yande.re', url: 'yande.re', description: `yande post`, }; diff --git a/lib/routes/yande/post.ts b/lib/routes/yande/post.ts index 287fde585aafe55..794bcf613f99244 100644 --- a/lib/routes/yande/post.ts +++ b/lib/routes/yande/post.ts @@ -4,20 +4,20 @@ import queryString from 'query-string'; export const route: Route = { path: '/post/popular_recent/:period?', - categories: ['anime'], + categories: ['picture'], example: '/yande/post/popular_recent/1d', parameters: { period: '展示时间', }, radar: [ { - source: ['yande.re/post/'], + source: ['yande.re/post'], }, ], - name: 'posts', - maintainers: ['fashioncj', 'NekoAria'], - description: `| 最近 24 小时 | 最近一周 | 最近一月 | 最近一年 | - | ------- | -------- | ------- | -------- | + name: 'Popular Recent Posts', + maintainers: ['magic-akari', 'SettingDust', 'fashioncj', 'NekoAria'], + description: `| 最近 24 小时 | 最近一周 | 最近一月 | 最近一年 | + | ------- | -------- | ------- | -------- | | 1d | 1w | 1m | 1y |`, handler, }; From 0211583f2e12f20a34b16189402354acb4309b8d Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Fri, 27 Sep 2024 23:27:56 +0800 Subject: [PATCH 007/740] fix(route/bjnews): Add concurrent request throttling (#16947) --- lib/routes/bjnews/cat.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/routes/bjnews/cat.ts b/lib/routes/bjnews/cat.ts index fe1a965a36f91c2..25e7fefb4f8538e 100644 --- a/lib/routes/bjnews/cat.ts +++ b/lib/routes/bjnews/cat.ts @@ -3,6 +3,7 @@ import { load } from 'cheerio'; import ofetch from '@/utils/ofetch'; import { fetchArticle } from './utils'; +import asyncPool from 'tiny-async-pool'; export const route: Route = { path: '/cat/:cat', @@ -34,10 +35,17 @@ async function handler(ctx) { category: $(a).parent().find('.source').text().trim(), })); - const out = await Promise.all(list.map((item) => fetchArticle(item))); + const out = await asyncPoolAll(ctx.req.query('pool') ? Number.parseInt(ctx.req.query('pool')) : 1, list, (item) => fetchArticle(item)); 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; +} From 1b51cedf8a31cc65092cd9cd03ed2fd2e5403542 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Fri, 27 Sep 2024 23:55:02 +0800 Subject: [PATCH 008/740] fix(route/udn): Optimize for `udn Global` (#16948) --- lib/routes/udn/breaking-news.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/udn/breaking-news.ts b/lib/routes/udn/breaking-news.ts index d57d52ea8468c50..8653402d0341541 100644 --- a/lib/routes/udn/breaking-news.ts +++ b/lib/routes/udn/breaking-news.ts @@ -87,11 +87,11 @@ async function handler(ctx) { if (data.publisher.name === '轉角國際 udn Global') { // 轉角24小時 - description += $('.story_body_content') + description = $('.story_body_content') .html() .split(//g) .slice(1, -1) - .join(','); + .join(''); } return { From 482a80c5a3b15314b45182f475fb37e2142c4bb3 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Sat, 28 Sep 2024 00:13:27 +0800 Subject: [PATCH 009/740] feat(route/zhihu): Remove filter from timeline (#16949) * feat(route/zhihu): Remove filter from timeline * . --- lib/routes/zhihu/timeline.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/routes/zhihu/timeline.ts b/lib/routes/zhihu/timeline.ts index e174ee9eab52b25..8c504f11be7bd72 100644 --- a/lib/routes/zhihu/timeline.ts +++ b/lib/routes/zhihu/timeline.ts @@ -60,10 +60,13 @@ async function handler(ctx) { const questionId = e.target.question.id; return `${urlBase}/question/${questionId}/answer/${id}`; } + case 'pin': case 'article': return e.target.url; case 'question': return `${urlBase}/question/${id}`; + default: + return; } return ''; }; @@ -111,11 +114,12 @@ async function handler(ctx) { link, author: e.target.author ? e.target.author.name : '', guid: link, + category: [e.verb], }; }; const out = feeds - .filter((e) => e.verb && e.verb !== 'MEMBER_VOTEUP_ARTICLE' && e.verb !== 'MEMBER_VOTEUP_ANSWER') + .filter((e) => e.verb) .map((e) => { if (e && e.type && e.type === 'feed_group') { // A feed group contains a list of feeds whose structure is the same as a single feed @@ -134,6 +138,7 @@ async function handler(ctx) { description, pubDate, guid, + category: [e.verb], }; } return buildItem(e); From 25e8a2c495e8836220eac3423de1e618a0e8561e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 28 Sep 2024 01:37:43 +0800 Subject: [PATCH 010/740] chore(deps): bump @scalar/hono-api-reference from 0.5.148 to 0.5.149 (#16945) * chore(deps): bump @scalar/hono-api-reference from 0.5.148 to 0.5.149 Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.148 to 0.5.149. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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, 14 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 5d62c8dc5893cb8..08a5da96461d7dd 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.19", - "@scalar/hono-api-reference": "0.5.148", + "@scalar/hono-api-reference": "0.5.149", "@sentry/node": "7.116.0", "@tonyrl/rand-user-agent": "2.0.79", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f01e9dff310d20e..a6ab205e183b67c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: 0.0.19 version: 0.0.19 '@scalar/hono-api-reference': - specifier: 0.5.148 - version: 0.5.148(hono@4.6.3) + specifier: 0.5.149 + version: 0.5.149(hono@4.6.3) '@sentry/node': specifier: 7.116.0 version: 7.116.0 @@ -1766,8 +1766,8 @@ packages: '@rss3/sdk@0.0.19': resolution: {integrity: sha512-4e4kEvUlxPIDw8NrMv+TYeIBZacphDEN8nrdY3+5hlGd+ZLYsAh76dKkYSoLjTNbp1k9UCxQxvaAr22m+hYiug==} - '@scalar/hono-api-reference@0.5.148': - resolution: {integrity: sha512-ysr9N1+kVXRLfS6UNA+AXZSjutfMNGhNFlBZ1A+5Y4WkOg9atv4ClLkRsUsYddok8HabylKjFXqYBvsY4njDbw==} + '@scalar/hono-api-reference@0.5.149': + resolution: {integrity: sha512-n3LHUOHvskgWcodVykLJvoC2813weZmxKjaGKzOZyOdbSK4y1gGqwbE1bIvwdDL6+r53f8HeaPtsuAEH7UrvfQ==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -1776,12 +1776,8 @@ packages: resolution: {integrity: sha512-NMy3QNk6ytcCoPUGJH0t4NNr36OWXgZhA3ormr3TvhX1NDgoF95wFyodGVH8xiHeUyn2/FxtETm8UBLbB5xEmg==} engines: {node: '>=18'} - '@scalar/themes@0.9.31': - resolution: {integrity: sha512-tt5ny7PHnsE01XHicAOlDrbmPLo7F44PbyLNlfKen3VGus9hpUBa2G9OXrPaSomB3kFcirX6tkM5Pxo3fDwXLg==} - engines: {node: '>=18'} - - '@scalar/types@0.0.10': - resolution: {integrity: sha512-b/n/y/tIa8cKlg+s2zODlI5TJa+jUIFDHDKkBcp3DsSCSzPPgE4jTc/IJ7h+EvHNe+YBlpZCrlTGlZ1n+ABoHQ==} + '@scalar/types@0.0.11': + resolution: {integrity: sha512-cB2vhKWrxKmfq7eZ6WTvv9dvwEmBJrzsJrNLeRVZp+qAkLlohKktOcMIT9WLUwMRgH3xhv/44/G1HAOyrhhQpw==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -4513,8 +4509,8 @@ packages: resolution: {integrity: sha512-5NPgf87AT2STgwa2ntRMr45jTKrYBGkVU36yT0ig/n/GMAa3oPqhZfIQ2kMEimReg0+t9kZViDVZ83qfVUlckg==} engines: {node: '>= 14'} - package-json-from-dist@1.0.0: - resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} pako@2.1.0: resolution: {integrity: sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==} @@ -7327,19 +7323,16 @@ snapshots: '@rss3/api-core': 0.0.19 '@rss3/api-utils': 0.0.19 - '@scalar/hono-api-reference@0.5.148(hono@4.6.3)': + '@scalar/hono-api-reference@0.5.149(hono@4.6.3)': dependencies: - '@scalar/types': 0.0.10 + '@scalar/types': 0.0.11 hono: 4.6.3 '@scalar/openapi-types@0.1.1': {} - '@scalar/themes@0.9.31': {} - - '@scalar/types@0.0.10': + '@scalar/types@0.0.11': dependencies: '@scalar/openapi-types': 0.1.1 - '@scalar/themes': 0.9.31 '@unhead/schema': 1.11.6 '@sec-ant/readable-stream@0.4.1': {} @@ -9184,7 +9177,7 @@ snapshots: jackspeak: 3.4.3 minimatch: 9.0.5 minipass: 7.1.2 - package-json-from-dist: 1.0.0 + package-json-from-dist: 1.0.1 path-scurry: 1.11.1 glob@7.2.3: @@ -10480,7 +10473,7 @@ snapshots: degenerator: 5.0.1 netmask: 2.0.2 - package-json-from-dist@1.0.0: {} + package-json-from-dist@1.0.1: {} pako@2.1.0: {} From 5dbe12de39cd0c235e56180df649cc492f868d11 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 28 Sep 2024 01:40:28 +0800 Subject: [PATCH 011/740] fix: remove unlisted query --- lib/routes/bjnews/cat.ts | 2 +- lib/routes/ttv/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/bjnews/cat.ts b/lib/routes/bjnews/cat.ts index 25e7fefb4f8538e..4ce068e8fc01835 100644 --- a/lib/routes/bjnews/cat.ts +++ b/lib/routes/bjnews/cat.ts @@ -35,7 +35,7 @@ async function handler(ctx) { category: $(a).parent().find('.source').text().trim(), })); - const out = await asyncPoolAll(ctx.req.query('pool') ? Number.parseInt(ctx.req.query('pool')) : 1, list, (item) => fetchArticle(item)); + const out = await asyncPoolAll(2, list, (item) => fetchArticle(item)); return { title: `新京报 - 分类 - ${$('.cur').text().trim()}`, link: url, diff --git a/lib/routes/ttv/index.ts b/lib/routes/ttv/index.ts index 042c693a9363e6c..b670f0104ac556e 100644 --- a/lib/routes/ttv/index.ts +++ b/lib/routes/ttv/index.ts @@ -34,7 +34,7 @@ async function handler(ctx) { const $ = load(response.data); let items = $('div.news-list li') - .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.query.limit) : 30) + .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 30) .toArray() .map((item) => { item = $(item); From 9b2dd7cb8f22191e5797037769da44ba47aec67a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 28 Sep 2024 02:29:56 +0800 Subject: [PATCH 012/740] chore(deps-dev): bump @types/node from 22.7.0 to 22.7.3 (#16946) * chore(deps-dev): bump @types/node from 22.7.0 to 22.7.3 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.7.0 to 22.7.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-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 08a5da96461d7dd..a44e275c3f756a4 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@types/mailparser": "3.4.4", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.7.0", + "@types/node": "22.7.3", "@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 a6ab205e183b67c..3040402bcad35b0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -325,8 +325,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.7.0 - version: 22.7.0 + specifier: 22.7.3 + version: 22.7.3 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -356,7 +356,7 @@ importers: version: 0.27.4 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.7.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.7.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.101 version: 0.37.101 @@ -422,10 +422,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.0)) + version: 5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.3)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.7.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.7.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1937,8 +1937,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.7.0': - resolution: {integrity: sha512-MOdOibwBs6KW1vfqz2uKMlxq5xAfAZ98SZjO8e3XnAbFnTJtAspqhWk7hrdSAs9/Y14ZWMiy7/MxMUzAOadYEw==} + '@types/node@22.7.3': + resolution: {integrity: sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6959,7 +6959,7 @@ snapshots: '@inquirer/figures': 1.0.6 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.7.0 + '@types/node': 22.7.3 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7429,12 +7429,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.7.0 + '@types/node': 22.7.3 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.7.0 + '@types/node': 22.7.3 '@types/html-to-text@9.0.4': {} @@ -7442,13 +7442,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.7.0 + '@types/node': 22.7.3 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.7.0 + '@types/node': 22.7.3 '@types/tough-cookie': 4.0.5 parse5: 7.1.2 @@ -7458,7 +7458,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.7.0 + '@types/node': 22.7.3 '@types/jsrsasign@10.5.13': {} @@ -7468,7 +7468,7 @@ snapshots: '@types/mailparser@3.4.4': dependencies: - '@types/node': 22.7.0 + '@types/node': 22.7.3 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7490,14 +7490,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.7.0 + '@types/node': 22.7.3 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.7.0 + '@types/node': 22.7.3 form-data: 4.0.0 - '@types/node@22.7.0': + '@types/node@22.7.3': dependencies: undici-types: 6.19.8 @@ -7511,7 +7511,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.7.0 + '@types/node': 22.7.3 '@types/tough-cookie': 4.0.5 form-data: 2.5.1 @@ -7525,7 +7525,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.7.0 + '@types/node': 22.7.3 form-data: 4.0.0 '@types/supertest@6.0.2': @@ -7549,7 +7549,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.7.0 + '@types/node': 22.7.3 optional: true '@typescript-eslint/eslint-plugin@8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2)': @@ -7658,7 +7658,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7672,7 +7672,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.7.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.7.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10635,7 +10635,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.7.0 + '@types/node': 22.7.3 long: 5.2.3 proxy-agent@6.4.0: @@ -11603,13 +11603,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.7.0): + vite-node@2.0.5(@types/node@22.7.3): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.8(@types/node@22.7.0) + vite: 5.4.8(@types/node@22.7.3) transitivePeerDependencies: - '@types/node' - less @@ -11621,27 +11621,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.0)): + vite-tsconfig-paths@5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.3)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.3(typescript@5.6.2) optionalDependencies: - vite: 5.4.8(@types/node@22.7.0) + vite: 5.4.8(@types/node@22.7.3) transitivePeerDependencies: - supports-color - typescript - vite@5.4.8(@types/node@22.7.0): + vite@5.4.8(@types/node@22.7.3): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.22.4 optionalDependencies: - '@types/node': 22.7.0 + '@types/node': 22.7.3 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.7.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.7.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11659,11 +11659,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.8(@types/node@22.7.0) - vite-node: 2.0.5(@types/node@22.7.0) + vite: 5.4.8(@types/node@22.7.3) + vite-node: 2.0.5(@types/node@22.7.3) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.7.0 + '@types/node': 22.7.3 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 3d4ba371025ee0c74b7f672429915d0c9a6a88fa Mon Sep 17 00:00:00 2001 From: LandonLi Date: Sat, 28 Sep 2024 14:22:33 +0800 Subject: [PATCH 013/740] fix(route/fediverse): Remove html tag from title (#16951) --- lib/routes/fediverse/timeline.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/fediverse/timeline.ts b/lib/routes/fediverse/timeline.ts index ed3e355fc2f675f..dc199a2d8c48f94 100644 --- a/lib/routes/fediverse/timeline.ts +++ b/lib/routes/fediverse/timeline.ts @@ -88,7 +88,7 @@ async function handler(ctx) { image: self.icon?.url || self.image?.url, link, item: resolvedItems.map((item) => ({ - title: item.object.content, + title: item.object.content.replaceAll(/<[^<]*>/g, ''), description: `${item.object.content}\n${item.object.attachment?.map((attachment) => ``).join('\n') || ''}`, link: item.object.url, pubDate: parseDate(item.published), From 2032adf27ce7043b4984ebbd4bfe5216a03cc965 Mon Sep 17 00:00:00 2001 From: sirius60111 Date: Sat, 28 Sep 2024 19:39:04 +0800 Subject: [PATCH 014/740] fix(route/xueqiu): use item.target as link (#16954) --- lib/routes/xueqiu/stock-info.ts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/routes/xueqiu/stock-info.ts b/lib/routes/xueqiu/stock-info.ts index 67b232eb536c2eb..7b770a7b00c66c9 100644 --- a/lib/routes/xueqiu/stock-info.ts +++ b/lib/routes/xueqiu/stock-info.ts @@ -82,17 +82,11 @@ async function handler(ctx) { title: `${id} ${stock_name} - ${source}`, link: `https://xueqiu.com/S/${id}`, description: `${stock_name} - ${source}`, - item: data.map((item) => { - let link = `https://xueqiu.com${item.target}`; - if (item.quote_cards) { - link = item.quote_cards[0].target_url; - } - return { + item: data.map((item) => ({ title: item.title || sanitizeHtml(item.description, { allowedTags: [], allowedAttributes: {} }), description: item.description, pubDate: parseDate(item.created_at), - link, - }; - }), + link: `https://xueqiu.com${item.target}`, + })), }; } From b5152c0a3e18a1f8766fa9bff23603231370dc0a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 28 Sep 2024 11:40:52 +0000 Subject: [PATCH 015/740] style: auto format --- lib/routes/xueqiu/stock-info.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/routes/xueqiu/stock-info.ts b/lib/routes/xueqiu/stock-info.ts index 7b770a7b00c66c9..ac0397c92994ecf 100644 --- a/lib/routes/xueqiu/stock-info.ts +++ b/lib/routes/xueqiu/stock-info.ts @@ -83,10 +83,10 @@ async function handler(ctx) { link: `https://xueqiu.com/S/${id}`, description: `${stock_name} - ${source}`, item: data.map((item) => ({ - title: item.title || sanitizeHtml(item.description, { allowedTags: [], allowedAttributes: {} }), - description: item.description, - pubDate: parseDate(item.created_at), - link: `https://xueqiu.com${item.target}`, - })), + title: item.title || sanitizeHtml(item.description, { allowedTags: [], allowedAttributes: {} }), + description: item.description, + pubDate: parseDate(item.created_at), + link: `https://xueqiu.com${item.target}`, + })), }; } From b79a52474c7592dde958365cc4d093f4aec6a08f Mon Sep 17 00:00:00 2001 From: valuex Date: Sun, 29 Sep 2024 00:00:58 +0900 Subject: [PATCH 016/740] =?UTF-8?q?feat(route):=20add=20route=20of=20?= =?UTF-8?q?=E6=B7=B1=E5=9C=B3=E7=A6=8F=E7=94=B0=E5=9B=AD=E5=B2=AD=E5=B0=8F?= =?UTF-8?q?=E5=AD=A6=20(#16876)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create namespace.ts * Add files via upload * Update dongtai.ts * Update gonggao.ts * Update gonggao.ts * Update gonggao.ts * Update dongtai.ts * Update gonggao.ts * Update gonggao.ts * Update gonggao.ts * Update gonggao.ts * Update dongtai.ts * Create namespace.ts * Add files via upload * Update articles.ts * Update articles.ts * Update articles.ts * Update articles.ts * Update articles.ts * Update articles.ts * Update articles.ts * route for 日经新闻半导体,产业聚焦 * Update scienceatechnology.ts * Update semi.ts * Delete lib/routes/yamap directory * Delete lib/routes/nikkei/semi.ts * Delete lib/routes/nikkei/scienceatechnology.ts * Update lib/routes/szftedu/dongtai.ts Co-authored-by: Tony * Update lib/routes/szftedu/namespace.ts Co-authored-by: Tony * Update lib/routes/szftedu/gonggao.ts Co-authored-by: Tony * Update gonggao.ts * Update gonggao.ts * Update dongtai.ts * Update gonggao.ts * Update gonggao.ts * Update dongtai.ts * Update dongtai.ts * Update dongtai.ts * Update gonggao.ts * Update lib/routes/szftedu/gonggao.ts Co-authored-by: Tony * Update lib/routes/szftedu/dongtai.ts Co-authored-by: Tony * Update dongtai.ts * Update dongtai.ts * fix: route name --------- --- lib/routes/szftedu/dongtai.ts | 62 +++++++++++++++++++++++++++++++++ lib/routes/szftedu/gonggao.ts | 62 +++++++++++++++++++++++++++++++++ lib/routes/szftedu/namespace.ts | 6 ++++ 3 files changed, 130 insertions(+) create mode 100644 lib/routes/szftedu/dongtai.ts create mode 100644 lib/routes/szftedu/gonggao.ts create mode 100644 lib/routes/szftedu/namespace.ts diff --git a/lib/routes/szftedu/dongtai.ts b/lib/routes/szftedu/dongtai.ts new file mode 100644 index 000000000000000..c2acc657f0efc2f --- /dev/null +++ b/lib/routes/szftedu/dongtai.ts @@ -0,0 +1,62 @@ +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'; + +const host = 'https://ylxx.szftedu.cn/xx_5828/xydt_5829/bxfbx_6371/'; +const baseLink = 'https://ylxx.szftedu.cn'; + +export const route: Route = { + path: '/dongtai', + categories: ['university'], + example: '/szftedu/dongtai', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '动态', + maintainers: ['valuex'], + handler, + description: '', +}; + +async function handler() { + const link = host; + const response = await got(link); + const $ = load(response.data); + const lists = $('div.pagenews04 div ul li') + .toArray() + .map((el) => ({ + title: $('a', el).text().trim(), + link: $('a', el).attr('href'), + pubDate: timezone(parseDate($('span[class=canedit]', el).text()), 8), + })); + + const items = await Promise.all( + lists.map((item) => + cache.tryGet(item.link, async () => { + const thisUrl = item.link; + const trueLink = thisUrl.includes('http') ? thisUrl : baseLink + thisUrl; + const response = await got(trueLink); + const $ = load(response.data); + item.description = thisUrl.includes('http') ? $('#page-content').html() : $('div.TRS_Editor').html(); + item.pubDate = timezone(parseDate($('#publish_time').first().text()), 8); + return item; + }) + ) + ); + + return { + title: '园岭小学动态', + link: host, + description: '园岭小学动态', + item: items, + }; +} diff --git a/lib/routes/szftedu/gonggao.ts b/lib/routes/szftedu/gonggao.ts new file mode 100644 index 000000000000000..0cda89550ff0b0d --- /dev/null +++ b/lib/routes/szftedu/gonggao.ts @@ -0,0 +1,62 @@ +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'; + +const host = 'https://ylxx.szftedu.cn/xx_5828/xygg_5832/'; + +export const route: Route = { + path: '/gonggao', + categories: ['university'], + example: '/szftedu/gonggao', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '公告', + maintainers: ['valuex'], + handler, + description: '', +}; + +async function handler() { + const link = host; + const response = await got(link); + const $ = load(response.data); + + const lists = $('div.pagenews04 div ul li') + .toArray() + .map((el) => ({ + title: $('a', el).text().trim(), + link: $('a', el).attr('href'), + pubDate: timezone(parseDate($('span[class=canedit]', el).text()), 8), + })); + + const items = await Promise.all( + lists.map((item) => + cache.tryGet(item.link, async () => { + const thisUrl = item.link; + const trueLink = thisUrl.includes('http') ? thisUrl : host + thisUrl.substring(1); + const response = await got(trueLink); + const $ = load(response.data); + item.description = thisUrl.includes('http') ? $('#page-content').html() : $('div.TRS_Editor').html(); + item.pubDate = timezone(parseDate($('.item').first().text().replace('发布时间:', '')), 8); + return item; + }) + ) + ); + + return { + title: '园岭小学公告', + link: host, + description: '园岭小学公告', + item: items, + }; +} diff --git a/lib/routes/szftedu/namespace.ts b/lib/routes/szftedu/namespace.ts new file mode 100644 index 000000000000000..26f718b052ae0c2 --- /dev/null +++ b/lib/routes/szftedu/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '园岭小学', + url: 'ylxx.szftedu.cn', +}; From 2a0847d318d1a25cb3b1d906840bde6634670c7f Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 29 Sep 2024 16:01:27 +0800 Subject: [PATCH 017/740] fix(twitter): lock cache refresh --- lib/routes/twitter/api/web-api/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 001241ab1e02957..3e1234a7c588f86 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -40,7 +40,7 @@ const getAuth = async (retry: number) => { if (config.twitter.authToken && retry > 0) { const index = authTokenIndex++ % config.twitter.authToken.length; const token = config.twitter.authToken[index]; - const lock = await cache.get(`${lockPrefix}${token}`); + const lock = await cache.get(`${lockPrefix}${token}`, false); if (lock) { await new Promise((resolve) => setTimeout(resolve, Math.random() * 500 + 500)); return await getAuth(retry - 1); From 1524059a5f7912fe2cdff2c8f7fc74add3e0cee1 Mon Sep 17 00:00:00 2001 From: LandonLi Date: Sun, 29 Sep 2024 20:00:59 +0800 Subject: [PATCH 018/740] fix(route/apple/podcast): Fix broken apple podcast route (#16953) * fix(route/apple/podcast): Fix broken apple podcast route * style(route/apple/podcast): Code style format --- lib/routes/apple/podcast.ts | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/lib/routes/apple/podcast.ts b/lib/routes/apple/podcast.ts index c09691e72bb3272..11980e09200a8ab 100644 --- a/lib/routes/apple/podcast.ts +++ b/lib/routes/apple/podcast.ts @@ -36,29 +36,33 @@ async function handler(ctx) { const $ = load(response.data); - const page_data = JSON.parse($('#shoebox-media-api-cache-amp-podcasts').text()); + const serializedServerData = JSON.parse($('#serialized-server-data').text()); - const data = JSON.parse(page_data[Object.keys(page_data)[0]]).d[0]; - const attributes = data.attributes; + const seoEpisodes = serializedServerData[0].data.seoData.schemaContent.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]; + + const episodes = originEpisodes.map((item) => { + // Try to keep line breaks in the description + const matchedSeoEpisode = seoEpisodes.find((seoEpisode) => seoEpisode.name === item.title) || null; + const episodeDescription = (matchedSeoEpisode ? matchedSeoEpisode.description : item.summary).replaceAll('\n', '
'); - const episodes = data.relationships.episodes.data.map((item) => { - const attr = item.attributes; return { - title: attr.name, - enclosure_url: attr.assetUrl, - itunes_duration: attr.durationInMilliseconds / 1000, + title: item.title, + enclosure_url: item.playAction.episodeOffer.streamUrl, enclosure_type: 'audio/mp4', - link: attr.url, - pubDate: parseDate(attr.releaseDateTime), - description: attr.description.standard.replaceAll('\n', '
'), + itunes_duration: item.duration, + link: item.playAction.episodeOffer.storeUrl, + pubDate: parseDate(item.releaseDate), + description: episodeDescription, }; }); return { - title: attributes.name, - link: attributes.url, - itunes_author: attributes.artistName, + title: header.title, + link: header.contextAction.podcastOffer.storeUrl, + itunes_author: header.contextAction.podcastOffer.author, item: episodes, - description: attributes.description.standard, + description: header.description.replaceAll('\n', ' '), }; } From 4b128aca9d869d6e448314f4fc0412d0ebb6c07c Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 30 Sep 2024 01:03:31 +0800 Subject: [PATCH 019/740] feat(route): spankbang (#16962) * feat(route): spankbang * fix: add antiCrawler flag --- lib/routes/spankbang/namespace.ts | 6 +++ lib/routes/spankbang/new-videos.ts | 64 ++++++++++++++++++++++++ lib/routes/spankbang/templates/video.art | 7 +++ 3 files changed, 77 insertions(+) create mode 100644 lib/routes/spankbang/namespace.ts create mode 100644 lib/routes/spankbang/new-videos.ts create mode 100644 lib/routes/spankbang/templates/video.art diff --git a/lib/routes/spankbang/namespace.ts b/lib/routes/spankbang/namespace.ts new file mode 100644 index 000000000000000..bc37481f9dcd3e9 --- /dev/null +++ b/lib/routes/spankbang/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'SpankBang', + url: 'spankbang.com', +}; diff --git a/lib/routes/spankbang/new-videos.ts b/lib/routes/spankbang/new-videos.ts new file mode 100644 index 000000000000000..54490e097fd8e5a --- /dev/null +++ b/lib/routes/spankbang/new-videos.ts @@ -0,0 +1,64 @@ +import { Data, Route } from '@/types'; +import { getCurrentPath } from '@/utils/helpers'; + +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; +import { art } from '@/utils/render'; +import path from 'node:path'; +import { config } from '@/config'; + +const __dirname = getCurrentPath(import.meta.url); +const render = (data) => art(path.join(__dirname, 'templates/video.art'), data); + +const handler = async () => { + const baseUrl = 'https://spankbang.com'; + const link = `${baseUrl}/new_videos/`; + + const response = await ofetch(link, { + headers: { + 'User-Agent': config.trueUA, + }, + }); + const $ = cheerio.load(response); + + const items = $('.video-item') + .toArray() + .map((item) => { + const $item = $(item); + const thumb = $item.find('.thumb'); + const cover = $item.find('img.cover'); + + return { + title: thumb.attr('title'), + link: new URL(thumb.attr('href')!, baseUrl).href, + description: render({ + cover: cover.data('src'), + preview: cover.data('preview'), + }), + }; + }); + + return { + title: $('head title').text(), + description: $('head meta[name="description"]').attr('content'), + link, + item: items, + } as unknown as Promise; +}; + +export const route: Route = { + path: '/new_videos', + categories: ['multimedia'], + example: '/spankbang/new_videos', + name: 'New Porn Videos', + maintainers: ['TonyRL'], + features: { + antiCrawler: true, + }, + radar: [ + { + source: ['spankbang.com/new_videos/', 'spankbang.com/'], + }, + ], + handler, +}; diff --git a/lib/routes/spankbang/templates/video.art b/lib/routes/spankbang/templates/video.art new file mode 100644 index 000000000000000..c30942421bef40a --- /dev/null +++ b/lib/routes/spankbang/templates/video.art @@ -0,0 +1,7 @@ +{{ if preview }} + +{{ /if }} From 2bc358296ee84f21ffa2ecf5bebf80d7b1da1213 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Mon, 30 Sep 2024 01:18:37 +0800 Subject: [PATCH 020/740] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD=E5=8D=8E?= =?UTF-8?q?=E4=BA=BA=E6=B0=91=E5=85=B1=E5=92=8C=E5=9B=BD=E5=86=9C=E4=B8=9A?= =?UTF-8?q?=E5=86=9C=E6=9D=91=E9=83=A8=E7=94=9F=E7=8C=AA=E4=B8=93=E9=A2=98?= =?UTF-8?q?=E9=87=8D=E8=A6=81=E6=94=BF=E7=AD=96=20(#16961)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/gov/moa/moa.ts | 6 +- lib/routes/gov/moa/szcpxx.ts | 115 +++++++++++++++++++++++++++++++++++ lib/routes/gov/moa/zdscxx.ts | 92 +++++++++++++++++++++------- 3 files changed, 189 insertions(+), 24 deletions(-) create mode 100644 lib/routes/gov/moa/szcpxx.ts diff --git a/lib/routes/gov/moa/moa.ts b/lib/routes/gov/moa/moa.ts index 2033b52bc958356..e1e2e2f4d203c87 100644 --- a/lib/routes/gov/moa/moa.ts +++ b/lib/routes/gov/moa/moa.ts @@ -8,13 +8,13 @@ const hostUrl = 'http://www.moa.gov.cn/'; const hostUrlObj = new URL(hostUrl); // 用于在下面判断 host export const route: Route = { - path: '/moa/:suburl{.+}', + path: '/moa/suburl/:suburl{.+}', categories: ['government'], - example: '/gov/moa/gk/zcjd/', + example: '/gov/moa/suburl/gk/zcjd/', radar: [ { source: ['moa.gov.cn/'], - target: '/moa/:suburl', + target: '/moa/suburl/:suburl', }, ], parameters: { suburl: '下级目录,请使用最下级的目录' }, diff --git a/lib/routes/gov/moa/szcpxx.ts b/lib/routes/gov/moa/szcpxx.ts new file mode 100644 index 000000000000000..b8dff425aaa8a41 --- /dev/null +++ b/lib/routes/gov/moa/szcpxx.ts @@ -0,0 +1,115 @@ +import { 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'; + +export const handler = async (ctx) => { + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 6; + + const rootUrl = 'http://www.moa.gov.cn'; + const currentUrl = new URL(`ztzl/szcpxx/zyzc/index.htm`, rootUrl).href; + + const { data: response } = await got(currentUrl); + + const $ = load(response); + + const language = $('html').prop('lang'); + + let items = $('div.ztst_list_contBox_inner ul li') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + const a = item.find('a.content'); + + return { + title: a.prop('title'), + pubDate: parseDate(item.find('div.pubTime').text().split(/:/).pop(), 'YYYY.MM.DD'), + link: new URL(a.prop('href'), currentUrl).href, + language, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + const title = $$('h2.xxgk_title, h1.bjjMTitle').text(); + const description = $$('div.gsj_htmlcon_bot, div.TRS_Editor').html(); + const guid = `moa-${$$('meta[name="contentid"]').prop('content')}`; + + item.title = title; + item.description = description; + item.pubDate = timezone(parseDate($$('meta[name="PubDate"]').prop('content')), +8); + item.category = [ + ...new Set([ + $$('meta[name="SiteName"]').prop('content'), + $$('meta[name="ColumnName"]').prop('content'), + $$('meta[name="ColumnType"]').prop('content'), + $$('meta[name="ContentSource"]').prop('content'), + $$('meta[name="Keywords"]').prop('content'), + ]), + ].filter(Boolean); + item.author = $$('meta[name="Author"]').prop('content') || $$('meta[name="source"]').prop('content'); + item.guid = guid; + item.id = guid; + item.content = { + html: description, + text: $$('div.gsj_htmlcon_bot, div.TRS_Editor').text(), + }; + item.language = language; + + return item; + }) + ) + ); + + const title = `${$('title').text()} - ${$('li.now').text()}`; + const image = new URL($('img.leftLogo').prop('src'), currentUrl).href; + + return { + title, + description: title, + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: '中华人民共和国农业农村部', + language, + }; +}; + +export const route: Route = { + path: '/moa/szcpxx', + name: '中华人民共和国农业农村部生猪专题重要政策', + url: 'www.moa.gov.cn', + maintainers: ['nczitzk'], + handler, + example: '/gov/moa/szcpxx', + parameters: undefined, + description: undefined, + categories: ['government'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.moa.gov.cn/ztzl/szcpxx/zyzc/index.htm'], + target: '/moa/szcpxx', + }, + ], +}; diff --git a/lib/routes/gov/moa/zdscxx.ts b/lib/routes/gov/moa/zdscxx.ts index 24284138e9ec036..0e1b885969c04d9 100644 --- a/lib/routes/gov/moa/zdscxx.ts +++ b/lib/routes/gov/moa/zdscxx.ts @@ -1,18 +1,12 @@ import { Route } from '@/types'; + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -export const route: Route = { - path: ['/moa/sjzxfb/:category{.+}?', '/moa/zdscxx/:category{.+}?'], - name: 'Unknown', - maintainers: [], - handler, -}; - -async function handler(ctx) { - const category = ctx.req.param('category'); +export const handler = async (ctx) => { + const { category } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 5; const domain = 'moa.gov.cn'; @@ -36,7 +30,7 @@ async function handler(ctx) { }); const filters = filterResponse.result.reduce((filters, f) => { - filters[f.name] = f.data.map((d) => d.name); + filters[f.name.trim()] = f.data.map((d) => d.name.trim()); return filters; }, {}); @@ -92,20 +86,76 @@ async function handler(ctx) { const $ = load(frameResponse); const title = $('title').text(); - const description = '数据'; - const icon = new URL('favicon.ico', rootUrl).href; return { - item: items, - title: `${title} - ${description} - ${category}`, + title: `${title}${category ? ` - ${category}` : ''}`, + description: '数据', link: currentUrl, - description, - language: 'zh', + item: items, + allowEmpty: true, image: $('h1.logo a img').prop('src'), - icon, - logo: icon, - subtitle: category, author: title, - allowEmpty: true, }; -} +}; + +export const route: Route = { + path: '/moa/zdscxx/:category{.+}?', + name: '中华人民共和国农业农村部数据', + url: 'www.moa.gov.cn', + maintainers: ['nczitzk'], + handler, + example: '/gov/moa/zdscxx', + 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/央视网/蔬菜生产)。 + ::: + + | 价格指数 | 供需形势 | 分析报告周报 | 分析报告日报 | 日历信息 | 蔬菜生产 | + | -------- | -------- | ------------ | ------------ | -------- | -------- | + `, + categories: ['government'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + title: '价格指数', + source: ['zdscxx.moa.gov.cn:8080/nyb/pc/messageList.jsp'], + target: '/gov/moa/zdscxx/价格指数', + }, + { + title: '供需形势', + source: ['zdscxx.moa.gov.cn:8080/nyb/pc/messageList.jsp'], + target: '/gov/moa/zdscxx/供需形势', + }, + { + title: '分析报告周报', + source: ['zdscxx.moa.gov.cn:8080/nyb/pc/messageList.jsp'], + target: '/gov/moa/zdscxx/分析报告周报', + }, + { + title: '分析报告日报', + source: ['zdscxx.moa.gov.cn:8080/nyb/pc/messageList.jsp'], + target: '/gov/moa/zdscxx/分析报告日报', + }, + { + title: '日历信息', + source: ['zdscxx.moa.gov.cn:8080/nyb/pc/messageList.jsp'], + target: '/gov/moa/zdscxx/日历信息', + }, + { + title: '蔬菜生产', + source: ['zdscxx.moa.gov.cn:8080/nyb/pc/messageList.jsp'], + target: '/gov/moa/zdscxx/蔬菜生产', + }, + ], +}; From 4f648084c77dc99c4396889a196b8559f3b02618 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 18:49:43 +0800 Subject: [PATCH 021/740] chore(deps): bump tldts from 6.1.47 to 6.1.48 (#16965) * chore(deps): bump tldts from 6.1.47 to 6.1.48 Bumps [tldts](https://github.com/remusao/tldts) from 6.1.47 to 6.1.48. - [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.47...v6.1.48) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 245 ++++++++++++++++++++++++------------------------- 2 files changed, 121 insertions(+), 126 deletions(-) diff --git a/package.json b/package.json index a44e275c3f756a4..ffeffcf3e2593e1 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "telegram": "2.25.11", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.47", + "tldts": "6.1.48", "tosource": "2.0.0-alpha.3", "tough-cookie": "4.1.4", "tsx": "4.19.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3040402bcad35b0..66ad65a655019f3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,8 +228,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.47 - version: 6.1.47 + specifier: 6.1.48 + version: 6.1.48 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -1677,83 +1677,83 @@ packages: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} engines: {node: '>= 8.0.0'} - '@rollup/rollup-android-arm-eabi@4.22.4': - resolution: {integrity: sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==} + '@rollup/rollup-android-arm-eabi@4.22.5': + resolution: {integrity: sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.22.4': - resolution: {integrity: sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==} + '@rollup/rollup-android-arm64@4.22.5': + resolution: {integrity: sha512-S4pit5BP6E5R5C8S6tgU/drvgjtYW76FBuG6+ibG3tMvlD1h9LHVF9KmlmaUBQ8Obou7hEyS+0w+IR/VtxwNMQ==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.22.4': - resolution: {integrity: sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==} + '@rollup/rollup-darwin-arm64@4.22.5': + resolution: {integrity: sha512-250ZGg4ipTL0TGvLlfACkIxS9+KLtIbn7BCZjsZj88zSg2Lvu3Xdw6dhAhfe/FjjXPVNCtcSp+WZjVsD3a/Zlw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.22.4': - resolution: {integrity: sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==} + '@rollup/rollup-darwin-x64@4.22.5': + resolution: {integrity: sha512-D8brJEFg5D+QxFcW6jYANu+Rr9SlKtTenmsX5hOSzNYVrK5oLAEMTUgKWYJP+wdKyCdeSwnapLsn+OVRFycuQg==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.22.4': - resolution: {integrity: sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.22.5': + resolution: {integrity: sha512-PNqXYmdNFyWNg0ma5LdY8wP+eQfdvyaBAojAXgO7/gs0Q/6TQJVXAXe8gwW9URjbS0YAammur0fynYGiWsKlXw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.22.4': - resolution: {integrity: sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==} + '@rollup/rollup-linux-arm-musleabihf@4.22.5': + resolution: {integrity: sha512-kSSCZOKz3HqlrEuwKd9TYv7vxPYD77vHSUvM2y0YaTGnFc8AdI5TTQRrM1yIp3tXCKrSL9A7JLoILjtad5t8pQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.22.4': - resolution: {integrity: sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==} + '@rollup/rollup-linux-arm64-gnu@4.22.5': + resolution: {integrity: sha512-oTXQeJHRbOnwRnRffb6bmqmUugz0glXaPyspp4gbQOPVApdpRrY/j7KP3lr7M8kTfQTyrBUzFjj5EuHAhqH4/w==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.22.4': - resolution: {integrity: sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==} + '@rollup/rollup-linux-arm64-musl@4.22.5': + resolution: {integrity: sha512-qnOTIIs6tIGFKCHdhYitgC2XQ2X25InIbZFor5wh+mALH84qnFHvc+vmWUpyX97B0hNvwNUL4B+MB8vJvH65Fw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': - resolution: {integrity: sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==} + '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': + resolution: {integrity: sha512-TMYu+DUdNlgBXING13rHSfUc3Ky5nLPbWs4bFnT+R6Vu3OvXkTkixvvBKk8uO4MT5Ab6lC3U7x8S8El2q5o56w==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.22.4': - resolution: {integrity: sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==} + '@rollup/rollup-linux-riscv64-gnu@4.22.5': + resolution: {integrity: sha512-PTQq1Kz22ZRvuhr3uURH+U/Q/a0pbxJoICGSprNLAoBEkyD3Sh9qP5I0Asn0y0wejXQBbsVMRZRxlbGFD9OK4A==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.22.4': - resolution: {integrity: sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==} + '@rollup/rollup-linux-s390x-gnu@4.22.5': + resolution: {integrity: sha512-bR5nCojtpuMss6TDEmf/jnBnzlo+6n1UhgwqUvRoe4VIotC7FG1IKkyJbwsT7JDsF2jxR+NTnuOwiGv0hLyDoQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.22.4': - resolution: {integrity: sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==} + '@rollup/rollup-linux-x64-gnu@4.22.5': + resolution: {integrity: sha512-N0jPPhHjGShcB9/XXZQWuWBKZQnC1F36Ce3sDqWpujsGjDz/CQtOL9LgTrJ+rJC8MJeesMWrMWVLKKNR/tMOCA==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.22.4': - resolution: {integrity: sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==} + '@rollup/rollup-linux-x64-musl@4.22.5': + resolution: {integrity: sha512-uBa2e28ohzNNwjr6Uxm4XyaA1M/8aTgfF2T7UIlElLaeXkgpmIJ2EitVNQxjO9xLLLy60YqAgKn/AqSpCUkE9g==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.22.4': - resolution: {integrity: sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==} + '@rollup/rollup-win32-arm64-msvc@4.22.5': + resolution: {integrity: sha512-RXT8S1HP8AFN/Kr3tg4fuYrNxZ/pZf1HemC5Tsddc6HzgGnJm0+Lh5rAHJkDuW3StI0ynNXukidROMXYl6ew8w==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.22.4': - resolution: {integrity: sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==} + '@rollup/rollup-win32-ia32-msvc@4.22.5': + resolution: {integrity: sha512-ElTYOh50InL8kzyUD6XsnPit7jYCKrphmddKAe1/Ytt74apOxDq5YEcbsiKs0fR3vff3jEneMM+3I7jbqaMyBg==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.22.4': - resolution: {integrity: sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==} + '@rollup/rollup-win32-x64-msvc@4.22.5': + resolution: {integrity: sha512-+lvL/4mQxSV8MukpkKyyvfwhH266COcWlXE/1qxwN08ajovta3459zrjLghYMgDerlzNwLAcFpvU+WWE5y6nAQ==} cpu: [x64] os: [win32] @@ -1865,9 +1865,6 @@ packages: '@types/eslint@9.6.1': resolution: {integrity: sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==} - '@types/estree@1.0.5': - resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - '@types/estree@1.0.6': resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} @@ -2045,8 +2042,8 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@unhead/schema@1.11.6': - resolution: {integrity: sha512-Ava5+kQERaZ2fi66phgR9KZQr9SsheN1YhhKM8fCP2A4Jb5lHUssVQ19P0+89V6RX9iUg/Q27WdEbznm75LzhQ==} + '@unhead/schema@1.11.7': + resolution: {integrity: sha512-j9uN7T63aUXrZ6yx2CfjVT7xZHjn0PZO7TPMaWqMFjneIH/NONKvDVCMEqDlXeqdSIERIYtk/xTHgCUMer5eyw==} '@vercel/nft@0.27.4': resolution: {integrity: sha512-Rioz3LJkEKicKCi9BSyc1RXZ5R6GmXosFMeBSThh6msWSOiArKhb7c75MiWwZEgPL7x0/l3TAfH/l0cxKNuUFA==} @@ -3022,8 +3019,8 @@ packages: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-scope@8.0.2: - resolution: {integrity: sha512-6E4xmrTw5wtxnLA5wYL3WDfhZ/1bUBGOXV0zQvVRDOtrR8D0p6W7fs3JweNYhwRYeGvd/1CKX2se0/2s7Q/nJA==} + eslint-scope@8.1.0: + resolution: {integrity: sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-summary@1.0.0: @@ -3034,8 +3031,8 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.0.0: - resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} + eslint-visitor-keys@4.1.0: + resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint@8.57.1: @@ -3057,8 +3054,8 @@ packages: resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} engines: {node: '>=0.10'} - espree@10.1.0: - resolution: {integrity: sha512-M1M6CpiE6ffoigIOWYO9UDP8TMUw9kqb21tf+08IgDYjCsOvCuDt4jQcZmoYxx+w7zlKw9/N0KXfto+I8/FrXA==} + espree@10.2.0: + resolution: {integrity: sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} espree@9.6.1: @@ -4396,8 +4393,8 @@ packages: nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - nwsapi@2.2.12: - resolution: {integrity: sha512-qXDmcVlZV4XRtKFzddidpfVP4oMSGhga+xdMc25mv8kaLUHtgzCDhUxkrN8exkGdTlLNaXj7CV3GtON7zuGZ+w==} + nwsapi@2.2.13: + resolution: {integrity: sha512-cTGB9ptp9dY9A5VbMSe7fQBcl/tt22Vcqdq8+eN93rblOuE0aCFu4aZ2vMwct/2t+lFnosm8RkQW1I0Omb1UtQ==} oauth-1.0a@2.2.6: resolution: {integrity: sha512-6bkxv3N4Gu5lty4viIcIAnq5GbxECviMBeKR3WX/q87SPQ8E8aursPZUtsXDnxCs787af09WPRBLqYrf/lwoYQ==} @@ -4946,8 +4943,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup@4.22.4: - resolution: {integrity: sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==} + rollup@4.22.5: + resolution: {integrity: sha512-WoinX7GeQOFMGznEcWA1WrTQCd/tpEbMkc3nuMs9BT0CPjMdSjPMTVClwWd4pgSQwJdP65SK9mTCNvItlr5o7w==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -5332,15 +5329,15 @@ packages: resolution: {integrity: sha512-GA16+8HXvqtfEnw/DTcwB0UU354QE1n3+wh08oFjr6Znl7ZLAeUgYzCcK+/CCrOyE0vnHR8/pu3XXG3vDijXpQ==} hasBin: true - tlds@1.254.0: - resolution: {integrity: sha512-YY4ei7K7gPGifqNSrfMaPdqTqiHcwYKUJ7zhLqQOK2ildlGgti5TSwJiXXN1YqG17I2GYZh5cZqv2r5fwBUM+w==} + tlds@1.255.0: + resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.47: - resolution: {integrity: sha512-6SWyFMnlst1fEt7GQVAAu16EGgFK0cLouH/2Mk6Ftlwhv3Ol40L0dlpGMcnnNiiOMyD2EV/aF3S+U2nKvvLvrA==} + tldts-core@6.1.48: + resolution: {integrity: sha512-3gD9iKn/n2UuFH1uilBviK9gvTNT6iYwdqrj1Vr5mh8FuelvpRNaYVH4pNYqUgOGU4aAdL9X35eLuuj0gRsx+A==} - tldts@6.1.47: - resolution: {integrity: sha512-R/K2tZ5MiY+mVrnSkNJkwqYT2vUv1lcT6wJvd2emGaMJ7PHUGRY4e3tUsdFCXgqxi2QgbHjL3yJgXCo40v9Hxw==} + tldts@6.1.48: + resolution: {integrity: sha512-SPbnh1zaSzi/OsmHb1vrPNnYuwJbdWjwo5TbBYYMlTtH3/1DSb41t8bcSxkwDmmbG2q6VLPVvQc7Yf23T+1EEw==} hasBin: true tmp@0.0.33: @@ -5400,8 +5397,8 @@ packages: peerDependencies: typescript: '>=4.2.0' - ts-case-convert@2.0.7: - resolution: {integrity: sha512-Kqj8wrkuduWsKUOUNRczrkdHCDt4ZNNd6HKjVw42EnMIGHQUABS4pqfy0acETVLwUTppc1fzo/yi11+uMTaqzw==} + ts-case-convert@2.1.0: + resolution: {integrity: sha512-Ye79el/pHYXfoew6kqhMwCoxp4NWjKNcm2kBzpmEMIU9dd9aBmHNNFtZ+WTm0rz1ngyDmfqDXDlyUnBXayiD0w==} ts-custom-error@2.2.2: resolution: {integrity: sha512-I0FEdfdatDjeigRqh1JFj67bcIKyRNm12UVGheBjs2pXgyELg2xeiQLVaWu1pVmNGXZVnz/fvycSU41moBIpOg==} @@ -5542,8 +5539,8 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} - update-browserslist-db@1.1.0: - resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + update-browserslist-db@1.1.1: + resolution: {integrity: sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -5738,8 +5735,8 @@ packages: wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - winston-transport@4.7.1: - resolution: {integrity: sha512-wQCXXVgfv/wUPOfb2x0ruxzwkcZfxcktz6JIMUaPLmcNhO4bZTwA/WtDWK74xV3F2dKu8YadrFv0qhwYjVEwhA==} + winston-transport@4.8.0: + resolution: {integrity: sha512-qxSTKswC6llEMZKgCQdaWgDuMJQnhuvF5f2Nk3SNXc4byfQ+voo2mX1Px9dkNOuR8p0KAjfPG29PuYUSIb+vSA==} engines: {node: '>= 12.0.0'} winston@3.14.2: @@ -6894,7 +6891,7 @@ snapshots: dependencies: ajv: 6.12.6 debug: 4.3.7 - espree: 10.1.0 + espree: 10.2.0 globals: 14.0.0 ignore: 5.3.2 import-fresh: 3.3.0 @@ -7260,58 +7257,58 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/rollup-android-arm-eabi@4.22.4': + '@rollup/rollup-android-arm-eabi@4.22.5': optional: true - '@rollup/rollup-android-arm64@4.22.4': + '@rollup/rollup-android-arm64@4.22.5': optional: true - '@rollup/rollup-darwin-arm64@4.22.4': + '@rollup/rollup-darwin-arm64@4.22.5': optional: true - '@rollup/rollup-darwin-x64@4.22.4': + '@rollup/rollup-darwin-x64@4.22.5': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.22.4': + '@rollup/rollup-linux-arm-gnueabihf@4.22.5': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.22.4': + '@rollup/rollup-linux-arm-musleabihf@4.22.5': optional: true - '@rollup/rollup-linux-arm64-gnu@4.22.4': + '@rollup/rollup-linux-arm64-gnu@4.22.5': optional: true - '@rollup/rollup-linux-arm64-musl@4.22.4': + '@rollup/rollup-linux-arm64-musl@4.22.5': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.22.4': + '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.22.4': + '@rollup/rollup-linux-riscv64-gnu@4.22.5': optional: true - '@rollup/rollup-linux-s390x-gnu@4.22.4': + '@rollup/rollup-linux-s390x-gnu@4.22.5': optional: true - '@rollup/rollup-linux-x64-gnu@4.22.4': + '@rollup/rollup-linux-x64-gnu@4.22.5': optional: true - '@rollup/rollup-linux-x64-musl@4.22.4': + '@rollup/rollup-linux-x64-musl@4.22.5': optional: true - '@rollup/rollup-win32-arm64-msvc@4.22.4': + '@rollup/rollup-win32-arm64-msvc@4.22.5': optional: true - '@rollup/rollup-win32-ia32-msvc@4.22.4': + '@rollup/rollup-win32-ia32-msvc@4.22.5': optional: true - '@rollup/rollup-win32-x64-msvc@4.22.4': + '@rollup/rollup-win32-x64-msvc@4.22.5': optional: true '@rss3/api-core@0.0.19': dependencies: openapi-fetch: 0.11.3 - ts-case-convert: 2.0.7 + ts-case-convert: 2.1.0 type-fest: 4.26.1 '@rss3/api-utils@0.0.19': @@ -7333,7 +7330,7 @@ snapshots: '@scalar/types@0.0.11': dependencies: '@scalar/openapi-types': 0.1.1 - '@unhead/schema': 1.11.6 + '@unhead/schema': 1.11.7 '@sec-ant/readable-stream@0.4.1': {} @@ -7382,8 +7379,8 @@ snapshots: dependencies: '@typescript-eslint/utils': 8.7.0(eslint@9.11.1)(typescript@5.6.2) eslint: 9.11.1 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-visitor-keys: 4.1.0 + espree: 10.2.0 estraverse: 5.3.0 picomatch: 4.0.2 transitivePeerDependencies: @@ -7423,8 +7420,6 @@ snapshots: '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 - '@types/estree@1.0.5': {} - '@types/estree@1.0.6': {} '@types/etag@1.8.3': @@ -7635,7 +7630,7 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@unhead/schema@1.11.6': + '@unhead/schema@1.11.7': dependencies: hookable: 5.5.3 zhead: 2.2.4 @@ -7944,7 +7939,7 @@ snapshots: caniuse-lite: 1.0.30001664 electron-to-chromium: 1.5.29 node-releases: 2.0.18 - update-browserslist-db: 1.1.0(browserslist@4.24.0) + update-browserslist-db: 1.1.1(browserslist@4.24.0) buffer-crc32@0.2.13: {} @@ -8729,7 +8724,7 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-scope@8.0.2: + eslint-scope@8.1.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -8741,7 +8736,7 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.0.0: {} + eslint-visitor-keys@4.1.0: {} eslint@8.57.1: dependencies: @@ -8805,9 +8800,9 @@ snapshots: cross-spawn: 7.0.3 debug: 4.3.7 escape-string-regexp: 4.0.0 - eslint-scope: 8.0.2 - eslint-visitor-keys: 4.0.0 - espree: 10.1.0 + eslint-scope: 8.1.0 + eslint-visitor-keys: 4.1.0 + espree: 10.2.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -8835,11 +8830,11 @@ snapshots: event-emitter: 0.3.5 type: 2.7.3 - espree@10.1.0: + espree@10.2.0: dependencies: acorn: 8.12.1 acorn-jsx: 5.3.2(acorn@8.12.1) - eslint-visitor-keys: 4.0.0 + eslint-visitor-keys: 4.1.0 espree@9.6.1: dependencies: @@ -9679,7 +9674,7 @@ snapshots: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.12 + nwsapi: 2.2.13 parse5: 7.1.2 rrweb-cssom: 0.7.1 saxes: 6.0.0 @@ -10343,7 +10338,7 @@ snapshots: dependencies: boolbase: 1.0.0 - nwsapi@2.2.12: {} + nwsapi@2.2.13: {} oauth-1.0a@2.2.6: {} @@ -10945,26 +10940,26 @@ snapshots: dependencies: glob: 7.2.3 - rollup@4.22.4: + rollup@4.22.5: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.22.4 - '@rollup/rollup-android-arm64': 4.22.4 - '@rollup/rollup-darwin-arm64': 4.22.4 - '@rollup/rollup-darwin-x64': 4.22.4 - '@rollup/rollup-linux-arm-gnueabihf': 4.22.4 - '@rollup/rollup-linux-arm-musleabihf': 4.22.4 - '@rollup/rollup-linux-arm64-gnu': 4.22.4 - '@rollup/rollup-linux-arm64-musl': 4.22.4 - '@rollup/rollup-linux-powerpc64le-gnu': 4.22.4 - '@rollup/rollup-linux-riscv64-gnu': 4.22.4 - '@rollup/rollup-linux-s390x-gnu': 4.22.4 - '@rollup/rollup-linux-x64-gnu': 4.22.4 - '@rollup/rollup-linux-x64-musl': 4.22.4 - '@rollup/rollup-win32-arm64-msvc': 4.22.4 - '@rollup/rollup-win32-ia32-msvc': 4.22.4 - '@rollup/rollup-win32-x64-msvc': 4.22.4 + '@rollup/rollup-android-arm-eabi': 4.22.5 + '@rollup/rollup-android-arm64': 4.22.5 + '@rollup/rollup-darwin-arm64': 4.22.5 + '@rollup/rollup-darwin-x64': 4.22.5 + '@rollup/rollup-linux-arm-gnueabihf': 4.22.5 + '@rollup/rollup-linux-arm-musleabihf': 4.22.5 + '@rollup/rollup-linux-arm64-gnu': 4.22.5 + '@rollup/rollup-linux-arm64-musl': 4.22.5 + '@rollup/rollup-linux-powerpc64le-gnu': 4.22.5 + '@rollup/rollup-linux-riscv64-gnu': 4.22.5 + '@rollup/rollup-linux-s390x-gnu': 4.22.5 + '@rollup/rollup-linux-x64-gnu': 4.22.5 + '@rollup/rollup-linux-x64-musl': 4.22.5 + '@rollup/rollup-win32-arm64-msvc': 4.22.5 + '@rollup/rollup-win32-ia32-msvc': 4.22.5 + '@rollup/rollup-win32-x64-msvc': 4.22.5 fsevents: 2.3.3 rrweb-cssom@0.7.1: {} @@ -11366,13 +11361,13 @@ snapshots: tlds@1.252.0: {} - tlds@1.254.0: {} + tlds@1.255.0: {} - tldts-core@6.1.47: {} + tldts-core@6.1.48: {} - tldts@6.1.47: + tldts@6.1.48: dependencies: - tldts-core: 6.1.47 + tldts-core: 6.1.48 tmp@0.0.33: dependencies: @@ -11410,7 +11405,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.47 + tldts: 6.1.48 tr46@0.0.3: {} @@ -11426,7 +11421,7 @@ snapshots: dependencies: typescript: 5.6.2 - ts-case-convert@2.0.7: {} + ts-case-convert@2.1.0: {} ts-custom-error@2.2.2: {} @@ -11536,7 +11531,7 @@ snapshots: universalify@2.0.1: {} - update-browserslist-db@1.1.0(browserslist@4.24.0): + update-browserslist-db@1.1.1(browserslist@4.24.0): dependencies: browserslist: 4.24.0 escalade: 3.2.0 @@ -11556,7 +11551,7 @@ snapshots: url-regex-safe@3.0.0: dependencies: ip-regex: 4.3.0 - tlds: 1.254.0 + tlds: 1.255.0 url-template@2.0.8: {} @@ -11636,7 +11631,7 @@ snapshots: dependencies: esbuild: 0.21.5 postcss: 8.4.47 - rollup: 4.22.4 + rollup: 4.22.5 optionalDependencies: '@types/node': 22.7.3 fsevents: 2.3.3 @@ -11731,10 +11726,10 @@ snapshots: dependencies: string-width: 4.2.3 - winston-transport@4.7.1: + winston-transport@4.8.0: dependencies: logform: 2.6.1 - readable-stream: 3.6.2 + readable-stream: 4.5.2 triple-beam: 1.4.1 winston@3.14.2: @@ -11749,7 +11744,7 @@ snapshots: safe-stable-stringify: 2.5.0 stack-trace: 0.0.10 triple-beam: 1.4.1 - winston-transport: 4.7.1 + winston-transport: 4.8.0 word-wrap@1.2.5: {} From 5837cee6050931c8409cebb3012e1de0dc779ad6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 18:52:40 +0800 Subject: [PATCH 022/740] chore(deps): bump @tonyrl/rand-user-agent from 2.0.79 to 2.0.80 (#16966) * chore(deps): bump @tonyrl/rand-user-agent from 2.0.79 to 2.0.80 Bumps [@tonyrl/rand-user-agent](https://github.com/TonyRL/rand-user-agent) from 2.0.79 to 2.0.80. - [Release notes](https://github.com/TonyRL/rand-user-agent/releases) - [Commits](https://github.com/TonyRL/rand-user-agent/compare/v2.0.79...v2.0.80) --- updated-dependencies: - dependency-name: "@tonyrl/rand-user-agent" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 ffeffcf3e2593e1..be00fe3aed84788 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@rss3/sdk": "0.0.19", "@scalar/hono-api-reference": "0.5.149", "@sentry/node": "7.116.0", - "@tonyrl/rand-user-agent": "2.0.79", + "@tonyrl/rand-user-agent": "2.0.80", "aes-js": "3.1.2", "art-template": "4.13.2", "bbcodejs": "0.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 66ad65a655019f3..66292a1b03d0f35 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,8 +51,8 @@ importers: specifier: 7.116.0 version: 7.116.0 '@tonyrl/rand-user-agent': - specifier: 2.0.79 - version: 2.0.79 + specifier: 2.0.80 + version: 2.0.80 aes-js: specifier: 3.1.2 version: 3.1.2 @@ -1828,8 +1828,8 @@ packages: resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} engines: {node: '>=14.16'} - '@tonyrl/rand-user-agent@2.0.79': - resolution: {integrity: sha512-xMQB00FW5OBSjedZ+EOhAQaTZmAb4BXoEx8Q03mZYyf0lzKTZTV3Zz141PLoRegGfDAV7n8+y7A2dNQnxfc5jQ==} + '@tonyrl/rand-user-agent@2.0.80': + resolution: {integrity: sha512-Q95jp6GSxLgtLl1WQXYKoFsIDrv6sjDHwNLq3CTtT2v06ZIKhCAozeT1gYFtyhgesVRZA8rYqAvP7ZZcq6tGyQ==} engines: {node: '>=14.16'} '@tootallnate/quickjs-emscripten@0.23.0': @@ -7391,7 +7391,7 @@ snapshots: dependencies: defer-to-connect: 2.0.1 - '@tonyrl/rand-user-agent@2.0.79': {} + '@tonyrl/rand-user-agent@2.0.80': {} '@tootallnate/quickjs-emscripten@0.23.0': {} From bd6aa61471b8554411e54b0abe9ff6f3df5d8a53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 20:00:25 +0800 Subject: [PATCH 023/740] chore(deps-dev): bump @types/node from 22.7.3 to 22.7.4 (#16967) * chore(deps-dev): bump @types/node from 22.7.3 to 22.7.4 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.7.3 to 22.7.4. - [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] * chore: fix pnpm install --------- 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 be00fe3aed84788..9729cdd220b3fef 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@types/mailparser": "3.4.4", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.7.3", + "@types/node": "22.7.4", "@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 66292a1b03d0f35..f182e4d75f35dec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -325,8 +325,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.7.3 - version: 22.7.3 + specifier: 22.7.4 + version: 22.7.4 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -356,7 +356,7 @@ importers: version: 0.27.4 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.7.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.7.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.101 version: 0.37.101 @@ -422,10 +422,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.3)) + version: 5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.4)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.7.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.7.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1934,8 +1934,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.7.3': - resolution: {integrity: sha512-qXKfhXXqGTyBskvWEzJZPUxSslAiLaB6JGP1ic/XTH9ctGgzdgYguuLP1C601aRTSDNlLb0jbKqXjZ48GNraSA==} + '@types/node@22.7.4': + resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6956,7 +6956,7 @@ snapshots: '@inquirer/figures': 1.0.6 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.7.3 + '@types/node': 22.7.4 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7424,12 +7424,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.7.3 + '@types/node': 22.7.4 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.7.3 + '@types/node': 22.7.4 '@types/html-to-text@9.0.4': {} @@ -7437,13 +7437,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.7.3 + '@types/node': 22.7.4 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.7.3 + '@types/node': 22.7.4 '@types/tough-cookie': 4.0.5 parse5: 7.1.2 @@ -7453,7 +7453,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.7.3 + '@types/node': 22.7.4 '@types/jsrsasign@10.5.13': {} @@ -7463,7 +7463,7 @@ snapshots: '@types/mailparser@3.4.4': dependencies: - '@types/node': 22.7.3 + '@types/node': 22.7.4 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7485,14 +7485,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.7.3 + '@types/node': 22.7.4 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.7.3 + '@types/node': 22.7.4 form-data: 4.0.0 - '@types/node@22.7.3': + '@types/node@22.7.4': dependencies: undici-types: 6.19.8 @@ -7506,7 +7506,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.7.3 + '@types/node': 22.7.4 '@types/tough-cookie': 4.0.5 form-data: 2.5.1 @@ -7520,7 +7520,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.7.3 + '@types/node': 22.7.4 form-data: 4.0.0 '@types/supertest@6.0.2': @@ -7544,7 +7544,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.7.3 + '@types/node': 22.7.4 optional: true '@typescript-eslint/eslint-plugin@8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2)': @@ -7653,7 +7653,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7667,7 +7667,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.7.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.7.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10630,7 +10630,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.7.3 + '@types/node': 22.7.4 long: 5.2.3 proxy-agent@6.4.0: @@ -11598,13 +11598,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.7.3): + vite-node@2.0.5(@types/node@22.7.4): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.8(@types/node@22.7.3) + vite: 5.4.8(@types/node@22.7.4) transitivePeerDependencies: - '@types/node' - less @@ -11616,27 +11616,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.3)): + vite-tsconfig-paths@5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.4)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.3(typescript@5.6.2) optionalDependencies: - vite: 5.4.8(@types/node@22.7.3) + vite: 5.4.8(@types/node@22.7.4) transitivePeerDependencies: - supports-color - typescript - vite@5.4.8(@types/node@22.7.3): + vite@5.4.8(@types/node@22.7.4): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.22.5 optionalDependencies: - '@types/node': 22.7.3 + '@types/node': 22.7.4 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.7.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.7.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11654,11 +11654,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.8(@types/node@22.7.3) - vite-node: 2.0.5(@types/node@22.7.3) + vite: 5.4.8(@types/node@22.7.4) + vite-node: 2.0.5(@types/node@22.7.4) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.7.3 + '@types/node': 22.7.4 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From d9ee8f43617462c514741fc4442590a9bba99191 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 20:52:57 +0800 Subject: [PATCH 024/740] chore(deps): bump tough-cookie from 4.1.4 to 5.0.0 (#16916) * chore(deps): bump tough-cookie from 4.1.4 to 5.0.0 Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) from 4.1.4 to 5.0.0. - [Release notes](https://github.com/salesforce/tough-cookie/releases) - [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md) - [Commits](https://github.com/salesforce/tough-cookie/compare/v4.1.4...v5.0.0) --- updated-dependencies: - dependency-name: tough-cookie dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 9729cdd220b3fef..164be6a5b7f6725 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "title": "3.5.3", "tldts": "6.1.48", "tosource": "2.0.0-alpha.3", - "tough-cookie": "4.1.4", + "tough-cookie": "5.0.0", "tsx": "4.19.1", "twitter-api-v2": "1.17.2", "undici": "6.19.8", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f182e4d75f35dec..451466930c7d820 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -115,7 +115,7 @@ importers: version: 9.0.5 http-cookie-agent: specifier: 6.0.6 - version: 6.0.6(tough-cookie@4.1.4)(undici@6.19.8) + version: 6.0.6(tough-cookie@5.0.0)(undici@6.19.8) https-proxy-agent: specifier: 7.0.5 version: 7.0.5 @@ -234,8 +234,8 @@ importers: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 tough-cookie: - specifier: 4.1.4 - version: 4.1.4 + specifier: 5.0.0 + version: 5.0.0 tsx: specifier: 4.19.1 version: 4.19.1 @@ -9377,10 +9377,10 @@ snapshots: http-cache-semantics@4.1.1: {} - http-cookie-agent@6.0.6(tough-cookie@4.1.4)(undici@6.19.8): + http-cookie-agent@6.0.6(tough-cookie@5.0.0)(undici@6.19.8): dependencies: agent-base: 7.1.1 - tough-cookie: 4.1.4 + tough-cookie: 5.0.0 optionalDependencies: undici: 6.19.8 transitivePeerDependencies: From 0f81550c409d4f0136a85c4a849ab2f6688dbb5e Mon Sep 17 00:00:00 2001 From: Tony Date: Mon, 30 Sep 2024 22:55:52 +0800 Subject: [PATCH 025/740] fix(route): spankbang use puppeteer (#16968) --- lib/routes/spankbang/new-videos.ts | 72 ++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/lib/routes/spankbang/new-videos.ts b/lib/routes/spankbang/new-videos.ts index 54490e097fd8e5a..1e69748f7aca118 100644 --- a/lib/routes/spankbang/new-videos.ts +++ b/lib/routes/spankbang/new-videos.ts @@ -1,11 +1,13 @@ import { Data, Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; -import ofetch from '@/utils/ofetch'; +import puppeteer from '@/utils/puppeteer'; import * as cheerio from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; 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); @@ -14,35 +16,58 @@ const handler = async () => { const baseUrl = 'https://spankbang.com'; const link = `${baseUrl}/new_videos/`; - const response = await ofetch(link, { - headers: { - 'User-Agent': config.trueUA, - }, - }); - const $ = cheerio.load(response); + const browser = await puppeteer(); + + const data = await cache.tryGet( + link, + async () => { + const page = await browser.newPage(); + await page.setRequestInterception(true); + page.on('request', (request) => { + request.resourceType() === 'document' ? request.continue() : request.abort(); + }); + logger.http(`Requesting ${link}`); + await page.goto(link, { + waitUntil: 'domcontentloaded', + }); + + const response = await page.content(); + const $ = cheerio.load(response); - const items = $('.video-item') - .toArray() - .map((item) => { - const $item = $(item); - const thumb = $item.find('.thumb'); - const cover = $item.find('img.cover'); + const items = $('.video-item') + .toArray() + .map((item) => { + const $item = $(item); + const thumb = $item.find('.thumb'); + const cover = $item.find('img.cover'); + + return { + title: thumb.attr('title'), + link: new URL(thumb.attr('href')!, baseUrl).href, + description: render({ + cover: cover.data('src'), + preview: cover.data('preview'), + }), + }; + }); return { - title: thumb.attr('title'), - link: new URL(thumb.attr('href')!, baseUrl).href, - description: render({ - cover: cover.data('src'), - preview: cover.data('preview'), - }), + title: $('head title').text(), + description: $('head meta[name="description"]').attr('content'), + item: items, }; - }); + }, + config.cache.routeExpire, + false + ); + + browser.close(); return { - title: $('head title').text(), - description: $('head meta[name="description"]').attr('content'), + title: data.title, + description: data.description, link, - item: items, + item: data.item, } as unknown as Promise; }; @@ -54,6 +79,7 @@ export const route: Route = { maintainers: ['TonyRL'], features: { antiCrawler: true, + requirePuppeteer: true, }, radar: [ { From 6bd881ceccba02289a7c38830c87f6fc8bb2a9ce Mon Sep 17 00:00:00 2001 From: jack2game Date: Mon, 30 Sep 2024 23:33:28 +0800 Subject: [PATCH 026/740] feat(route): add route for dealstreetasia (#16909) * create namespace * add section route * add home * better sanitise * puppeteer * networkidle2 & more allowed resources * Revert "networkidle2 & more allowed resources" This reverts commit a974e93a8d617c0703b7ad4b3e4e0c15b079b273. * revert puppeteer * revert full text * author placeholder * home new method * home remove extensive comments * new home * new section & home * more sanitize * simplify description * resolve comments * better OR logic * fix: remove duplicate name --------- --- lib/routes/dealstreetasia/home.ts | 72 ++++++++++++++++++++++++++ lib/routes/dealstreetasia/namespace.ts | 6 +++ lib/routes/dealstreetasia/section.ts | 57 ++++++++++++++++++++ 3 files changed, 135 insertions(+) create mode 100644 lib/routes/dealstreetasia/home.ts create mode 100644 lib/routes/dealstreetasia/namespace.ts create mode 100644 lib/routes/dealstreetasia/section.ts diff --git a/lib/routes/dealstreetasia/home.ts b/lib/routes/dealstreetasia/home.ts new file mode 100644 index 000000000000000..e1e740c9718ab55 --- /dev/null +++ b/lib/routes/dealstreetasia/home.ts @@ -0,0 +1,72 @@ +import { Route } from '@/types'; +// import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; // Unified request library used +import { load } from 'cheerio'; // An HTML parser with an API similar to jQuery +// import puppeteer from '@/utils/puppeteer'; +// import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/home', + categories: ['traditional-media'], + example: '/dealstreetasia/home', + // parameters: { section: 'target section' }, + radar: [ + { + source: ['dealstreetasia.com/'], + }, + ], + name: 'Home', + maintainers: ['jack2game'], + handler, + url: 'dealstreetasia.com/', +}; + +async function handler() { + // const section = ctx.req.param('section'); + const items = await fetchPage(); + + return items; +} + +async function fetchPage() { + const baseUrl = 'https://dealstreetasia.com'; // Define base URL + + const response = await ofetch(`${baseUrl}/`); + const $ = load(response); + + const jsonData = JSON.parse($('#__NEXT_DATA__').text()); + // const headingText = jsonData.props.pageProps.sectionData.name; + + const pageProps = jsonData.props.pageProps; + const list = [ + ...pageProps.topStories, + ...pageProps.privateEquity, + ...pageProps.ventureCapital, + ...pageProps.unicorns, + ...pageProps.interviews, + ...pageProps.deals, + ...pageProps.analysis, + ...pageProps.ipos, + ...pageProps.opinion, + ...pageProps.policyAndRegulations, + ...pageProps.people, + ...pageProps.earningsAndResults, + ...pageProps.theLpView, + ...pageProps.dvNewsletters, + ...pageProps.reports, + ].map((item) => ({ + title: item.post_title || item.title || 'No Title', + link: item.post_url || item.link || '', + description: item.post_excerpt || item.excerpt || '', + pubDate: item.post_date ? new Date(item.post_date).toUTCString() : item.date ? new Date(item.date).toUTCString() : '', + category: item.category_link ? item.category_link.replaceAll(/(<([^>]+)>)/gi, '') : '', // Clean HTML if category_link exists + image: item.image_url ? item.image_url.replace(/\?.*$/, '') : '', // Remove query parameters if image_url exists + })); + + return { + title: 'Deal Street Asia', + language: 'en', + item: list, + link: 'https://dealstreetasia.com/', + }; +} diff --git a/lib/routes/dealstreetasia/namespace.ts b/lib/routes/dealstreetasia/namespace.ts new file mode 100644 index 000000000000000..62f500273335d94 --- /dev/null +++ b/lib/routes/dealstreetasia/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DealStreetAsia', + url: 'dealstreetasia.com', +}; diff --git a/lib/routes/dealstreetasia/section.ts b/lib/routes/dealstreetasia/section.ts new file mode 100644 index 000000000000000..d8fc0d7dbca5922 --- /dev/null +++ b/lib/routes/dealstreetasia/section.ts @@ -0,0 +1,57 @@ +import { Route } from '@/types'; +// import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; // Unified request library used +import { load } from 'cheerio'; // An HTML parser with an API similar to jQuery +// import puppeteer from '@/utils/puppeteer'; +// import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/section/:section', + categories: ['traditional-media'], + example: '/dealstreetasia/section/private-equity', + parameters: { section: 'target section' }, + radar: [ + { + source: ['dealstreetasia.com/'], + }, + ], + name: 'Section', + maintainers: ['jack2game'], + handler, + url: 'dealstreetasia.com/', +}; + +async function handler(ctx) { + const section = ctx.req.param('section'); + const items = await fetchPage(section); + + return items; +} + +async function fetchPage(section: string) { + const baseUrl = 'https://dealstreetasia.com'; // Define base URL + + const response = await ofetch(`${baseUrl}/section/${section}/`); + const $ = load(response); + + const jsonData = JSON.parse($('#__NEXT_DATA__').text()); + const headingText = jsonData.props.pageProps.sectionData.name; + + const items = jsonData.props.pageProps.sectionData.stories.nodes; + + const feedItems = items.map((item) => ({ + title: item.title || 'No Title', + link: item.uri ? `https://www.dealstreetasia.com${item.uri}` : '', + description: item.excerpt || '', // Default to empty string if undefined + pubDate: item.post_date ? new Date(item.post_date).toUTCString() : '', + category: item.sections.nodes.map((section) => section.name), + image: item.featuredImage?.node?.mediaItemUrl.replace(/\?.*$/, ''), // Use .replace to sanitize the image URL + })); + + return { + title: 'Deal Street Asia - ' + headingText, + language: 'en', + item: feedItems, + link: 'https://dealstreetasia.com/section/' + section + '/', + }; +} From 8ec92353447858adcc2b0079a20111ae48cdf26c Mon Sep 17 00:00:00 2001 From: huanfei <41602338+huanfe1@users.noreply.github.com> Date: Mon, 30 Sep 2024 23:50:24 +0800 Subject: [PATCH 027/740] feat(route): add route of javtiful (#16964) * feat(route): add route of javtiful * fix: fix some wrong --- lib/routes/javtiful/actress.ts | 37 +++++++++++++++++++ lib/routes/javtiful/channel.ts | 37 +++++++++++++++++++ lib/routes/javtiful/namespace.ts | 6 +++ lib/routes/javtiful/templates/description.art | 7 ++++ lib/routes/javtiful/utils.ts | 18 +++++++++ 5 files changed, 105 insertions(+) create mode 100644 lib/routes/javtiful/actress.ts create mode 100644 lib/routes/javtiful/channel.ts create mode 100644 lib/routes/javtiful/namespace.ts create mode 100644 lib/routes/javtiful/templates/description.art create mode 100644 lib/routes/javtiful/utils.ts diff --git a/lib/routes/javtiful/actress.ts b/lib/routes/javtiful/actress.ts new file mode 100644 index 000000000000000..7ddf8a5af0760df --- /dev/null +++ b/lib/routes/javtiful/actress.ts @@ -0,0 +1,37 @@ +import { Route, Data, DataItem } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { parseItems } from './utils'; + +export const route: Route = { + path: '/actress/:id', + name: 'Actress', + maintainers: ['huanfe1'], + example: '/javtiful/actress/akari-tsumugi', + parameters: { id: 'Actress name' }, + handler, + categories: ['multimedia'], + radar: [ + { + source: ['javtiful.com/actress/:id', 'javtiful.com/actress/:id/*'], + target: '/actress/:id', + }, + ], +}; + +async function handler(ctx): Promise { + const { id } = ctx.req.param(); + const html = await ofetch(`https://javtiful.com/actress/${id}`); + const $ = load(html); + const items: DataItem[] = $('section .card:not(:has(.bg-danger))') + .toArray() + .map((item) => parseItems($(item))); + return { + title: $('.channel-item__name_details a').text(), + link: `https://javtiful.com/actress/${id}`, + allowEmpty: true, + item: items, + image: $('.content-section-title img').attr('src'), + language: $('html').attr('lang'), + }; +} diff --git a/lib/routes/javtiful/channel.ts b/lib/routes/javtiful/channel.ts new file mode 100644 index 000000000000000..f0c82b2585a1d47 --- /dev/null +++ b/lib/routes/javtiful/channel.ts @@ -0,0 +1,37 @@ +import { Route, Data, DataItem } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { parseItems } from './utils'; + +export const route: Route = { + path: '/channel/:id', + name: 'Channel', + maintainers: ['huanfe1'], + example: '/javtiful/channel/madonna', + parameters: { id: 'Channel name' }, + handler, + categories: ['multimedia'], + radar: [ + { + source: ['javtiful.com/channel/:id', 'javtiful.com/channel/:id/*'], + target: '/channel/:id', + }, + ], +}; + +async function handler(ctx): Promise { + const { id } = ctx.req.param(); + const html = await ofetch(`https://javtiful.com/channel/${id}`); + const $ = load(html); + const items: DataItem[] = $('section .card:not(:has(.bg-danger))') + .toArray() + .map((item) => parseItems($(item))); + return { + title: $('.channel-item__name_details a').text(), + link: `https://javtiful.com/channel/${id}`, + allowEmpty: true, + item: items, + image: $('.content-section-title img').attr('src'), + language: $('html').attr('lang'), + }; +} diff --git a/lib/routes/javtiful/namespace.ts b/lib/routes/javtiful/namespace.ts new file mode 100644 index 000000000000000..1bf3f8239062ad4 --- /dev/null +++ b/lib/routes/javtiful/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Javtiful', + url: 'javtiful.com', +}; diff --git a/lib/routes/javtiful/templates/description.art b/lib/routes/javtiful/templates/description.art new file mode 100644 index 000000000000000..393036a449aabaf --- /dev/null +++ b/lib/routes/javtiful/templates/description.art @@ -0,0 +1,7 @@ +{{ if previewVideo }} + +{{else if poster}} + +{{ /if }} diff --git a/lib/routes/javtiful/utils.ts b/lib/routes/javtiful/utils.ts new file mode 100644 index 000000000000000..e3fe4c5850da040 --- /dev/null +++ b/lib/routes/javtiful/utils.ts @@ -0,0 +1,18 @@ +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'; + +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()), +}); From 24c5045556d300b8f711786d5cfd131ab4bf4205 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Tue, 1 Oct 2024 15:17:51 +0800 Subject: [PATCH 028/740] fix(route/rss): Manually set RSS version when parsing (#16973) --- lib/routes/nikkei/cn/index.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/routes/nikkei/cn/index.ts b/lib/routes/nikkei/cn/index.ts index 31309bb0cf45f82..50a96f572d1a8af 100644 --- a/lib/routes/nikkei/cn/index.ts +++ b/lib/routes/nikkei/cn/index.ts @@ -5,7 +5,18 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; -import parser from '@/utils/rss-parser'; +import { config } from '@/config'; +import Parser from 'rss-parser'; + +const parser = new Parser({ + customFields: { + item: ['magnet'], + }, + headers: { + 'User-Agent': config.ua, + }, + defaultRSS: 0.9, +}); export const route: Route = { path: '/cn/*', From f2778dc8d558ea584e519192736bf431ad918916 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 20:36:48 +0800 Subject: [PATCH 029/740] chore(deps-dev): bump @typescript-eslint/parser from 8.7.0 to 8.8.0 (#16975) * chore(deps-dev): bump @typescript-eslint/parser from 8.7.0 to 8.8.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.7.0 to 8.8.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.8.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] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 243 +++++++++++++++++++++++++++++++------------------ 2 files changed, 155 insertions(+), 90 deletions(-) diff --git a/package.json b/package.json index 164be6a5b7f6725..8b9169cd6a6213f 100644 --- a/package.json +++ b/package.json @@ -165,7 +165,7 @@ "@types/tough-cookie": "4.0.5", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.7.0", - "@typescript-eslint/parser": "8.7.0", + "@typescript-eslint/parser": "8.8.0", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.101", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 451466930c7d820..9ec4aed21d25d97 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -347,10 +347,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.7.0 - version: 8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2) + version: 8.7.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2) '@typescript-eslint/parser': - specifier: 8.7.0 - version: 8.7.0(eslint@9.11.1)(typescript@5.6.2) + specifier: 8.8.0 + version: 8.8.0(eslint@9.11.1)(typescript@5.6.2) '@vercel/nft': specifier: 0.27.4 version: 0.27.4 @@ -1677,83 +1677,83 @@ packages: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} engines: {node: '>= 8.0.0'} - '@rollup/rollup-android-arm-eabi@4.22.5': - resolution: {integrity: sha512-SU5cvamg0Eyu/F+kLeMXS7GoahL+OoizlclVFX3l5Ql6yNlywJJ0OuqTzUx0v+aHhPHEB/56CT06GQrRrGNYww==} + '@rollup/rollup-android-arm-eabi@4.23.0': + resolution: {integrity: sha512-8OR+Ok3SGEMsAZispLx8jruuXw0HVF16k+ub2eNXKHDmdxL4cf9NlNpAzhlOhNyXzKDEJuFeq0nZm+XlNb1IFw==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.22.5': - resolution: {integrity: sha512-S4pit5BP6E5R5C8S6tgU/drvgjtYW76FBuG6+ibG3tMvlD1h9LHVF9KmlmaUBQ8Obou7hEyS+0w+IR/VtxwNMQ==} + '@rollup/rollup-android-arm64@4.23.0': + resolution: {integrity: sha512-rEFtX1nP8gqmLmPZsXRMoLVNB5JBwOzIAk/XAcEPuKrPa2nPJ+DuGGpfQUR0XjRm8KjHfTZLpWbKXkA5BoFL3w==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.22.5': - resolution: {integrity: sha512-250ZGg4ipTL0TGvLlfACkIxS9+KLtIbn7BCZjsZj88zSg2Lvu3Xdw6dhAhfe/FjjXPVNCtcSp+WZjVsD3a/Zlw==} + '@rollup/rollup-darwin-arm64@4.23.0': + resolution: {integrity: sha512-ZbqlMkJRMMPeapfaU4drYHns7Q5MIxjM/QeOO62qQZGPh9XWziap+NF9fsqPHT0KzEL6HaPspC7sOwpgyA3J9g==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.22.5': - resolution: {integrity: sha512-D8brJEFg5D+QxFcW6jYANu+Rr9SlKtTenmsX5hOSzNYVrK5oLAEMTUgKWYJP+wdKyCdeSwnapLsn+OVRFycuQg==} + '@rollup/rollup-darwin-x64@4.23.0': + resolution: {integrity: sha512-PfmgQp78xx5rBCgn2oYPQ1rQTtOaQCna0kRaBlc5w7RlA3TDGGo7m3XaptgitUZ54US9915i7KeVPHoy3/W8tA==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.22.5': - resolution: {integrity: sha512-PNqXYmdNFyWNg0ma5LdY8wP+eQfdvyaBAojAXgO7/gs0Q/6TQJVXAXe8gwW9URjbS0YAammur0fynYGiWsKlXw==} + '@rollup/rollup-linux-arm-gnueabihf@4.23.0': + resolution: {integrity: sha512-WAeZfAAPus56eQgBioezXRRzArAjWJGjNo/M+BHZygUcs9EePIuGI1Wfc6U/Ki+tMW17FFGvhCfYnfcKPh18SA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.22.5': - resolution: {integrity: sha512-kSSCZOKz3HqlrEuwKd9TYv7vxPYD77vHSUvM2y0YaTGnFc8AdI5TTQRrM1yIp3tXCKrSL9A7JLoILjtad5t8pQ==} + '@rollup/rollup-linux-arm-musleabihf@4.23.0': + resolution: {integrity: sha512-v7PGcp1O5XKZxKX8phTXtmJDVpE20Ub1eF6w9iMmI3qrrPak6yR9/5eeq7ziLMrMTjppkkskXyxnmm00HdtXjA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.22.5': - resolution: {integrity: sha512-oTXQeJHRbOnwRnRffb6bmqmUugz0glXaPyspp4gbQOPVApdpRrY/j7KP3lr7M8kTfQTyrBUzFjj5EuHAhqH4/w==} + '@rollup/rollup-linux-arm64-gnu@4.23.0': + resolution: {integrity: sha512-nAbWsDZ9UkU6xQiXEyXBNHAKbzSAi95H3gTStJq9UGiS1v+YVXwRHcQOQEF/3CHuhX5BVhShKoeOf6Q/1M+Zhg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.22.5': - resolution: {integrity: sha512-qnOTIIs6tIGFKCHdhYitgC2XQ2X25InIbZFor5wh+mALH84qnFHvc+vmWUpyX97B0hNvwNUL4B+MB8vJvH65Fw==} + '@rollup/rollup-linux-arm64-musl@4.23.0': + resolution: {integrity: sha512-5QT/Di5FbGNPaVw8hHO1wETunwkPuZBIu6W+5GNArlKHD9fkMHy7vS8zGHJk38oObXfWdsuLMogD4sBySLJ54g==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': - resolution: {integrity: sha512-TMYu+DUdNlgBXING13rHSfUc3Ky5nLPbWs4bFnT+R6Vu3OvXkTkixvvBKk8uO4MT5Ab6lC3U7x8S8El2q5o56w==} + '@rollup/rollup-linux-powerpc64le-gnu@4.23.0': + resolution: {integrity: sha512-Sefl6vPyn5axzCsO13r1sHLcmPuiSOrKIImnq34CBurntcJ+lkQgAaTt/9JkgGmaZJ+OkaHmAJl4Bfd0DmdtOQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.22.5': - resolution: {integrity: sha512-PTQq1Kz22ZRvuhr3uURH+U/Q/a0pbxJoICGSprNLAoBEkyD3Sh9qP5I0Asn0y0wejXQBbsVMRZRxlbGFD9OK4A==} + '@rollup/rollup-linux-riscv64-gnu@4.23.0': + resolution: {integrity: sha512-o4QI2KU/QbP7ZExMse6ULotdV3oJUYMrdx3rBZCgUF3ur3gJPfe8Fuasn6tia16c5kZBBw0aTmaUygad6VB/hQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.22.5': - resolution: {integrity: sha512-bR5nCojtpuMss6TDEmf/jnBnzlo+6n1UhgwqUvRoe4VIotC7FG1IKkyJbwsT7JDsF2jxR+NTnuOwiGv0hLyDoQ==} + '@rollup/rollup-linux-s390x-gnu@4.23.0': + resolution: {integrity: sha512-+bxqx+V/D4FGrpXzPGKp/SEZIZ8cIW3K7wOtcJAoCrmXvzRtmdUhYNbgd+RztLzfDEfA2WtKj5F4tcbNPuqgeg==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.22.5': - resolution: {integrity: sha512-N0jPPhHjGShcB9/XXZQWuWBKZQnC1F36Ce3sDqWpujsGjDz/CQtOL9LgTrJ+rJC8MJeesMWrMWVLKKNR/tMOCA==} + '@rollup/rollup-linux-x64-gnu@4.23.0': + resolution: {integrity: sha512-I/eXsdVoCKtSgK9OwyQKPAfricWKUMNCwJKtatRYMmDo5N859tbO3UsBw5kT3dU1n6ZcM1JDzPRSGhAUkxfLxw==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.22.5': - resolution: {integrity: sha512-uBa2e28ohzNNwjr6Uxm4XyaA1M/8aTgfF2T7UIlElLaeXkgpmIJ2EitVNQxjO9xLLLy60YqAgKn/AqSpCUkE9g==} + '@rollup/rollup-linux-x64-musl@4.23.0': + resolution: {integrity: sha512-4ZoDZy5ShLbbe1KPSafbFh1vbl0asTVfkABC7eWqIs01+66ncM82YJxV2VtV3YVJTqq2P8HMx3DCoRSWB/N3rw==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.22.5': - resolution: {integrity: sha512-RXT8S1HP8AFN/Kr3tg4fuYrNxZ/pZf1HemC5Tsddc6HzgGnJm0+Lh5rAHJkDuW3StI0ynNXukidROMXYl6ew8w==} + '@rollup/rollup-win32-arm64-msvc@4.23.0': + resolution: {integrity: sha512-+5Ky8dhft4STaOEbZu3/NU4QIyYssKO+r1cD3FzuusA0vO5gso15on7qGzKdNXnc1gOrsgCqZjRw1w+zL4y4hQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.22.5': - resolution: {integrity: sha512-ElTYOh50InL8kzyUD6XsnPit7jYCKrphmddKAe1/Ytt74apOxDq5YEcbsiKs0fR3vff3jEneMM+3I7jbqaMyBg==} + '@rollup/rollup-win32-ia32-msvc@4.23.0': + resolution: {integrity: sha512-0SPJk4cPZQhq9qA1UhIRumSE3+JJIBBjtlGl5PNC///BoaByckNZd53rOYD0glpTkYFBQSt7AkMeLVPfx65+BQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.22.5': - resolution: {integrity: sha512-+lvL/4mQxSV8MukpkKyyvfwhH266COcWlXE/1qxwN08ajovta3459zrjLghYMgDerlzNwLAcFpvU+WWE5y6nAQ==} + '@rollup/rollup-win32-x64-msvc@4.23.0': + resolution: {integrity: sha512-lqCK5GQC8fNo0+JvTSxcG7YB1UKYp8yrNLhsArlvPWN+16ovSZgoehlVHg6X0sSWPUkpjRBR5TuR12ZugowZ4g==} cpu: [x64] os: [win32] @@ -1993,8 +1993,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.7.0': - resolution: {integrity: sha512-lN0btVpj2unxHlNYLI//BQ7nzbMJYBVQX5+pbNXvGYazdlgYonMn4AhhHifQ+J4fGRYA/m1DjaQjx+fDetqBOQ==} + '@typescript-eslint/parser@8.8.0': + resolution: {integrity: sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2007,6 +2007,10 @@ packages: resolution: {integrity: sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.8.0': + resolution: {integrity: sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.7.0': resolution: {integrity: sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2020,6 +2024,10 @@ packages: resolution: {integrity: sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.8.0': + resolution: {integrity: sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.7.0': resolution: {integrity: sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2029,16 +2037,35 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.8.0': + resolution: {integrity: sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@8.7.0': resolution: {integrity: sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.8.0': + resolution: {integrity: sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@8.7.0': resolution: {integrity: sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.8.0': + resolution: {integrity: sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -2832,8 +2859,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.29: - resolution: {integrity: sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==} + electron-to-chromium@1.5.30: + resolution: {integrity: sha512-sXI35EBN4lYxzc/pIGorlymYNzDBOqkSlVRe6MkgBsW/hW1tpC/HDJ2fjG7XnjakzfLEuvdmux0Mjs6jHq4UOA==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -3802,8 +3829,8 @@ packages: jsbn@1.1.0: resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} - jschardet@3.1.3: - resolution: {integrity: sha512-Q1PKVMK/uu+yjdlobgWIYkUOCR1SqUmW9m/eUJNNj4zI2N12i25v8fYpVf+zCakQeaTdBdhnZTFbVIAVZIVVOg==} + jschardet@3.1.4: + resolution: {integrity: sha512-/kmVISmrwVwtyYU40iQUOp3SUPk2dhNCMsZBQX0R1/jZ8maaXJ/oZIzUOiyOqcgtLnETFKYChbJ5iDC/eWmFHg==} engines: {node: '>=0.1.90'} jsdom@25.0.1: @@ -4943,8 +4970,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup@4.22.5: - resolution: {integrity: sha512-WoinX7GeQOFMGznEcWA1WrTQCd/tpEbMkc3nuMs9BT0CPjMdSjPMTVClwWd4pgSQwJdP65SK9mTCNvItlr5o7w==} + rollup@4.23.0: + resolution: {integrity: sha512-vXB4IT9/KLDrS2WRXmY22sVB2wTsTwkpxjB8Q3mnakTENcYw3FRmfdYDy/acNmls+lHmDazgrRjK/yQ6hQAtwA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -7026,7 +7053,7 @@ snapshots: '@microsoft/eslint-formatter-sarif@3.1.0': dependencies: eslint: 8.57.1 - jschardet: 3.1.3 + jschardet: 3.1.4 lodash: 4.17.21 utf8: 3.0.0 transitivePeerDependencies: @@ -7257,52 +7284,52 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/rollup-android-arm-eabi@4.22.5': + '@rollup/rollup-android-arm-eabi@4.23.0': optional: true - '@rollup/rollup-android-arm64@4.22.5': + '@rollup/rollup-android-arm64@4.23.0': optional: true - '@rollup/rollup-darwin-arm64@4.22.5': + '@rollup/rollup-darwin-arm64@4.23.0': optional: true - '@rollup/rollup-darwin-x64@4.22.5': + '@rollup/rollup-darwin-x64@4.23.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.22.5': + '@rollup/rollup-linux-arm-gnueabihf@4.23.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.22.5': + '@rollup/rollup-linux-arm-musleabihf@4.23.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.22.5': + '@rollup/rollup-linux-arm64-gnu@4.23.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.22.5': + '@rollup/rollup-linux-arm64-musl@4.23.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.22.5': + '@rollup/rollup-linux-powerpc64le-gnu@4.23.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.22.5': + '@rollup/rollup-linux-riscv64-gnu@4.23.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.22.5': + '@rollup/rollup-linux-s390x-gnu@4.23.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.22.5': + '@rollup/rollup-linux-x64-gnu@4.23.0': optional: true - '@rollup/rollup-linux-x64-musl@4.22.5': + '@rollup/rollup-linux-x64-musl@4.23.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.22.5': + '@rollup/rollup-win32-arm64-msvc@4.23.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.22.5': + '@rollup/rollup-win32-ia32-msvc@4.23.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.22.5': + '@rollup/rollup-win32-x64-msvc@4.23.0': optional: true '@rss3/api-core@0.0.19': @@ -7377,7 +7404,7 @@ snapshots: '@stylistic/eslint-plugin@2.8.0(eslint@9.11.1)(typescript@5.6.2)': dependencies: - '@typescript-eslint/utils': 8.7.0(eslint@9.11.1)(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2) eslint: 9.11.1 eslint-visitor-keys: 4.1.0 espree: 10.2.0 @@ -7547,10 +7574,10 @@ snapshots: '@types/node': 22.7.4 optional: true - '@typescript-eslint/eslint-plugin@8.7.0(@typescript-eslint/parser@8.7.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.7.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.7.0(eslint@9.11.1)(typescript@5.6.2) + '@typescript-eslint/parser': 8.8.0(eslint@9.11.1)(typescript@5.6.2) '@typescript-eslint/scope-manager': 8.7.0 '@typescript-eslint/type-utils': 8.7.0(eslint@9.11.1)(typescript@5.6.2) '@typescript-eslint/utils': 8.7.0(eslint@9.11.1)(typescript@5.6.2) @@ -7565,12 +7592,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.7.0(eslint@9.11.1)(typescript@5.6.2)': + '@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2)': dependencies: - '@typescript-eslint/scope-manager': 8.7.0 - '@typescript-eslint/types': 8.7.0 - '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.7.0 + '@typescript-eslint/scope-manager': 8.8.0 + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.8.0 debug: 4.3.7 eslint: 9.11.1 optionalDependencies: @@ -7583,6 +7610,11 @@ snapshots: '@typescript-eslint/types': 8.7.0 '@typescript-eslint/visitor-keys': 8.7.0 + '@typescript-eslint/scope-manager@8.8.0': + dependencies: + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/visitor-keys': 8.8.0 + '@typescript-eslint/type-utils@8.7.0(eslint@9.11.1)(typescript@5.6.2)': dependencies: '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) @@ -7597,6 +7629,8 @@ snapshots: '@typescript-eslint/types@8.7.0': {} + '@typescript-eslint/types@8.8.0': {} + '@typescript-eslint/typescript-estree@8.7.0(typescript@5.6.2)': dependencies: '@typescript-eslint/types': 8.7.0 @@ -7612,6 +7646,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.8.0(typescript@5.6.2)': + dependencies: + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/visitor-keys': 8.8.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.7.0(eslint@9.11.1)(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1) @@ -7623,11 +7672,27 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.8.0(eslint@9.11.1)(typescript@5.6.2)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1) + '@typescript-eslint/scope-manager': 8.8.0 + '@typescript-eslint/types': 8.8.0 + '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) + eslint: 9.11.1 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@8.7.0': dependencies: '@typescript-eslint/types': 8.7.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.8.0': + dependencies: + '@typescript-eslint/types': 8.8.0 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.7': @@ -7937,7 +8002,7 @@ snapshots: browserslist@4.24.0: dependencies: caniuse-lite: 1.0.30001664 - electron-to-chromium: 1.5.29 + electron-to-chromium: 1.5.30 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) @@ -8478,7 +8543,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.29: {} + electron-to-chromium@1.5.30: {} ellipsize@0.1.0: {} @@ -9662,7 +9727,7 @@ snapshots: jsbn@1.1.0: {} - jschardet@3.1.3: {} + jschardet@3.1.4: {} jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: @@ -10940,26 +11005,26 @@ snapshots: dependencies: glob: 7.2.3 - rollup@4.22.5: + rollup@4.23.0: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.22.5 - '@rollup/rollup-android-arm64': 4.22.5 - '@rollup/rollup-darwin-arm64': 4.22.5 - '@rollup/rollup-darwin-x64': 4.22.5 - '@rollup/rollup-linux-arm-gnueabihf': 4.22.5 - '@rollup/rollup-linux-arm-musleabihf': 4.22.5 - '@rollup/rollup-linux-arm64-gnu': 4.22.5 - '@rollup/rollup-linux-arm64-musl': 4.22.5 - '@rollup/rollup-linux-powerpc64le-gnu': 4.22.5 - '@rollup/rollup-linux-riscv64-gnu': 4.22.5 - '@rollup/rollup-linux-s390x-gnu': 4.22.5 - '@rollup/rollup-linux-x64-gnu': 4.22.5 - '@rollup/rollup-linux-x64-musl': 4.22.5 - '@rollup/rollup-win32-arm64-msvc': 4.22.5 - '@rollup/rollup-win32-ia32-msvc': 4.22.5 - '@rollup/rollup-win32-x64-msvc': 4.22.5 + '@rollup/rollup-android-arm-eabi': 4.23.0 + '@rollup/rollup-android-arm64': 4.23.0 + '@rollup/rollup-darwin-arm64': 4.23.0 + '@rollup/rollup-darwin-x64': 4.23.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.23.0 + '@rollup/rollup-linux-arm-musleabihf': 4.23.0 + '@rollup/rollup-linux-arm64-gnu': 4.23.0 + '@rollup/rollup-linux-arm64-musl': 4.23.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.23.0 + '@rollup/rollup-linux-riscv64-gnu': 4.23.0 + '@rollup/rollup-linux-s390x-gnu': 4.23.0 + '@rollup/rollup-linux-x64-gnu': 4.23.0 + '@rollup/rollup-linux-x64-musl': 4.23.0 + '@rollup/rollup-win32-arm64-msvc': 4.23.0 + '@rollup/rollup-win32-ia32-msvc': 4.23.0 + '@rollup/rollup-win32-x64-msvc': 4.23.0 fsevents: 2.3.3 rrweb-cssom@0.7.1: {} @@ -11631,7 +11696,7 @@ snapshots: dependencies: esbuild: 0.21.5 postcss: 8.4.47 - rollup: 4.22.5 + rollup: 4.23.0 optionalDependencies: '@types/node': 22.7.4 fsevents: 2.3.3 From a9cbe7e93734a236a6b90af39d89f48e80c27f7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 20:52:07 +0800 Subject: [PATCH 030/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.7.0 to 8.8.0 (#16976) * chore(deps-dev): bump @typescript-eslint/eslint-plugin Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.7.0 to 8.8.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.8.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] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 93 ++++++++------------------------------------------ 2 files changed, 15 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index 8b9169cd6a6213f..5fc517f7f4c7ea7 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "@types/title": "3.4.3", "@types/tough-cookie": "4.0.5", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.7.0", + "@typescript-eslint/eslint-plugin": "8.8.0", "@typescript-eslint/parser": "8.8.0", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9ec4aed21d25d97..3b8feffd157fa5e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -346,8 +346,8 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.7.0 - version: 8.7.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2) + specifier: 8.8.0 + version: 8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2) '@typescript-eslint/parser': specifier: 8.8.0 version: 8.8.0(eslint@9.11.1)(typescript@5.6.2) @@ -1982,8 +1982,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.7.0': - resolution: {integrity: sha512-RIHOoznhA3CCfSTFiB6kBGLQtB/sox+pJ6jeFu6FxJvqL8qRxq/FfGO/UhsGgQM9oGdXkV4xUgli+dt26biB6A==} + '@typescript-eslint/eslint-plugin@8.8.0': + resolution: {integrity: sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -2003,16 +2003,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.7.0': - resolution: {integrity: sha512-87rC0k3ZlDOuz82zzXRtQ7Akv3GKhHs0ti4YcbAJtaomllXoSO8hi7Ix3ccEvCd824dy9aIX+j3d2UMAfCtVpg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.8.0': resolution: {integrity: sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.7.0': - resolution: {integrity: sha512-tl0N0Mj3hMSkEYhLkjREp54OSb/FI6qyCzfiiclvJvOqre6hsZTGSnHtmFLDU8TIM62G7ygEa1bI08lcuRwEnQ==} + '@typescript-eslint/type-utils@8.8.0': + resolution: {integrity: sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -2020,23 +2016,10 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.7.0': - resolution: {integrity: sha512-LLt4BLHFwSfASHSF2K29SZ+ZCsbQOM+LuarPjRUuHm+Qd09hSe3GCeaQbcCr+Mik+0QFRmep/FyZBO6fJ64U3w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.8.0': resolution: {integrity: sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.7.0': - resolution: {integrity: sha512-MC8nmcGHsmfAKxwnluTQpNqceniT8SteVwd2voYlmiSWGOtjvGXdPl17dYu2797GVscK30Z04WRM28CrKS9WOg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.8.0': resolution: {integrity: sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2046,22 +2029,12 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.7.0': - resolution: {integrity: sha512-ZbdUdwsl2X/s3CiyAu3gOlfQzpbuG3nTWKPoIvAu1pu5r8viiJvv2NPN2AqArL35NCYtw/lrPPfM4gxrMLNLPw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.8.0': resolution: {integrity: sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.7.0': - resolution: {integrity: sha512-b1tx0orFCCh/THWPQa2ZwWzvOeyzzp36vkJYOpVg0u8UVOIsfVrnuC9FqAw9gRKn+rG2VmWQ/zDJZzkxUnj/XQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.8.0': resolution: {integrity: sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7574,14 +7547,14 @@ snapshots: '@types/node': 22.7.4 optional: true - '@typescript-eslint/eslint-plugin@8.7.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.1 '@typescript-eslint/parser': 8.8.0(eslint@9.11.1)(typescript@5.6.2) - '@typescript-eslint/scope-manager': 8.7.0 - '@typescript-eslint/type-utils': 8.7.0(eslint@9.11.1)(typescript@5.6.2) - '@typescript-eslint/utils': 8.7.0(eslint@9.11.1)(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.7.0 + '@typescript-eslint/scope-manager': 8.8.0 + '@typescript-eslint/type-utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.8.0 eslint: 9.11.1 graphemer: 1.4.0 ignore: 5.3.2 @@ -7605,20 +7578,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.7.0': - dependencies: - '@typescript-eslint/types': 8.7.0 - '@typescript-eslint/visitor-keys': 8.7.0 - '@typescript-eslint/scope-manager@8.8.0': dependencies: '@typescript-eslint/types': 8.8.0 '@typescript-eslint/visitor-keys': 8.8.0 - '@typescript-eslint/type-utils@8.7.0(eslint@9.11.1)(typescript@5.6.2)': + '@typescript-eslint/type-utils@8.8.0(eslint@9.11.1)(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) - '@typescript-eslint/utils': 8.7.0(eslint@9.11.1)(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: @@ -7627,25 +7595,8 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@8.7.0': {} - '@typescript-eslint/types@8.8.0': {} - '@typescript-eslint/typescript-estree@8.7.0(typescript@5.6.2)': - dependencies: - '@typescript-eslint/types': 8.7.0 - '@typescript-eslint/visitor-keys': 8.7.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.2) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.8.0(typescript@5.6.2)': dependencies: '@typescript-eslint/types': 8.8.0 @@ -7661,17 +7612,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.7.0(eslint@9.11.1)(typescript@5.6.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1) - '@typescript-eslint/scope-manager': 8.7.0 - '@typescript-eslint/types': 8.7.0 - '@typescript-eslint/typescript-estree': 8.7.0(typescript@5.6.2) - eslint: 9.11.1 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.8.0(eslint@9.11.1)(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1) @@ -7683,11 +7623,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.7.0': - dependencies: - '@typescript-eslint/types': 8.7.0 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.8.0': dependencies: '@typescript-eslint/types': 8.8.0 From 76e6c0d7da66647b4d59daa2483c397eb6c60e95 Mon Sep 17 00:00:00 2001 From: Wayne Zhang Date: Tue, 1 Oct 2024 21:27:25 +0800 Subject: [PATCH 031/740] feat(route): add github discussions route (#16977) * feat(route): add route of github discussion * feat: update route * refactor: update route --- lib/routes/github/discussions.ts | 135 +++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 lib/routes/github/discussions.ts diff --git a/lib/routes/github/discussions.ts b/lib/routes/github/discussions.ts new file mode 100644 index 000000000000000..2584e6108d45390 --- /dev/null +++ b/lib/routes/github/discussions.ts @@ -0,0 +1,135 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { config } from '@/config'; +import ConfigNotFoundError from '@/errors/types/config-not-found'; +import MarkdownIt from 'markdown-it'; +const md = MarkdownIt({ + html: true, + linkify: true, +}); +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/discussion/:user/:repo/:state?', + categories: ['programming'], + example: '/github/discussion/DIYgod/RSSHub', + parameters: { + user: 'User name', + repo: 'Repo name', + state: 'The state of discussions. Can be either `open`, `closed`, `answered`, `unanswered`, `locked`, `unlocked` or `all`. Default: `all`.', + }, + features: { + requireConfig: [ + { + name: 'GITHUB_ACCESS_TOKEN', + description: 'GitHub Access Token', + }, + ], + }, + radar: [ + { + source: ['github.com/:user/:repo/discussions', 'github.com/:user/:repo/discussions/:id', 'github.com/:user/:repo'], + target: '/discussion/:user/:repo', + }, + ], + name: 'Repo Discussions', + maintainers: ['waynzh'], + handler, +}; + +async function handler(ctx) { + if (!config.github || !config.github.access_token) { + throw new ConfigNotFoundError('GitHub Discussions RSS is disabled due to the lack of relevant config'); + } + const { user, repo, limit, state = 'all' } = ctx.req.param(); + const { answered, closed, locked } = mapStateToBooleans(state); + const perPage = Math.min(Number.parseInt(limit) || 100, 100); + + const host = `https://github.com/${user}/${repo}/discussions`; + const url = 'https://api.github.com/graphql'; + + let filters = `first: ${perPage}`; + if (answered !== null) { + filters += `, answered: ${answered}`; + } + + const response = await got({ + method: 'post', + url, + headers: { + Authorization: `bearer ${config.github.access_token}`, + }, + json: { + query: ` + { + repository(owner: "${user}", name: "${repo}") { + discussions(${filters}) { + nodes { + title, + author { + login + }, + createdAt, + closed, + isAnswered, + locked, + body, + url + } + }, + } + } + `, + }, + }); + + const data = response.data.data.repository.discussions.nodes.filter((item) => (closed === null ? item : item.closed === closed)).filter((item) => (locked === null ? item : item.locked === locked)); + + return { + allowEmpty: true, + title: `${user}/${repo} Discussions`, + link: host, + item: data.map((item) => ({ + title: item.title, + author: item.author?.login ?? 'ghost', + description: item.body ? md.render(item.body) : 'No description', + pubDate: parseDate(item.createdAt), + link: item.url, + })), + }; +} + +function mapStateToBooleans(state: string) { + // 初始化布尔值 + let answered: boolean | null = null; + let closed: boolean | null = null; + let locked: boolean | null = null; + + // 设置布尔值,根据 state 的值 + switch (state) { + case 'answered': + answered = true; + break; + case 'unanswered': + answered = false; + break; + case 'closed': + closed = true; + break; + case 'open': + closed = false; + break; + case 'locked': + locked = true; + break; + case 'unlocked': + locked = false; + break; + case 'all': + default: + // 保持 answered, closed, locked 为 null + break; + } + + return { answered, closed, locked }; +} From 79337aa29d431a34634f15538adfcf1c2be174b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=BF=A7=E5=BF=A7?= <60727068+youyou-sudo@users.noreply.github.com> Date: Tue, 1 Oct 2024 23:12:04 +0800 Subject: [PATCH 032/740] feat: add a route to Bangumi's user favorites list (#16971) * feat: Route to add Bangumi user favorites list * feat: add subject description template * refactor: change the route to enable selection of entries * feat: add description for selected entries * refactor: change path resolution from resolve to join * Update lib/routes/bangumi/tv/user/collections.ts --------- --- lib/routes/bangumi/templates/tv/subject.art | 6 + lib/routes/bangumi/tv/user/collections.ts | 172 ++++++++++++++++++++ 2 files changed, 178 insertions(+) create mode 100644 lib/routes/bangumi/templates/tv/subject.art create mode 100644 lib/routes/bangumi/tv/user/collections.ts diff --git a/lib/routes/bangumi/templates/tv/subject.art b/lib/routes/bangumi/templates/tv/subject.art new file mode 100644 index 000000000000000..089bf11f11286af --- /dev/null +++ b/lib/routes/bangumi/templates/tv/subject.art @@ -0,0 +1,6 @@ +{{ if routeSubjectType === 'all' }}类型:{{ subjectTypeName }}
{{ /if }} +{{ if subjectType === 2 }}看到:{{ epStatus }} / {{ subjectEps ? subjectEps: '???' }}
{{ /if }} +{{ if subjectType === 1 }}读到:{{ epStatus }} / {{ subjectEps ? subjectEps: '???' }}
{{ /if }} +评分:{{ score }}
+放送时间:{{ date ? date : '未知' }}
+ diff --git a/lib/routes/bangumi/tv/user/collections.ts b/lib/routes/bangumi/tv/user/collections.ts new file mode 100644 index 000000000000000..e1b43e4df078235 --- /dev/null +++ b/lib/routes/bangumi/tv/user/collections.ts @@ -0,0 +1,172 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import timezone from '@/utils/timezone'; +import { parseDate } from '@/utils/parse-date'; +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 = { + 1: '想看', + 2: '看过', + 3: '在看', + 4: '搁置', + 5: '抛弃', + }; + + switch (subjectType) { + case '1': // 书籍 + return { + 1: '想读', + 2: '读过', + 3: '在读', + 4: '搁置', + 5: '抛弃', + }; + case '2': // 动画 + case '6': // 三次元 + return commonTypeNames; + case '3': // 音乐 + return { + 1: '想听', + 2: '听过', + 3: '在听', + 4: '搁置', + 5: '抛弃', + }; + case '4': // 游戏 + return { + 1: '想玩', + 2: '玩过', + 3: '在玩', + 4: '搁置', + 5: '抛弃', + }; + default: + return commonTypeNames; // 默认使用通用的类型 + } +}; + +export const route: Route = { + path: '/tv/user/collections/:id/:subjectType/:type', + categories: ['anime'], + example: '/bangumi/tv/user/collections/sai/1/1', + parameters: { + id: '用户 id, 在用户页面地址栏查看', + subjectType: { + description: '全部类别: `空`、book: `1`、anime: `2`、music: `3`、game: `4`、real: `6`', + options: [ + { value: 'ALL', label: 'all' }, + { value: 'book', label: '1' }, + { value: 'anime', label: '2' }, + { value: 'music', label: '3' }, + { value: 'game', label: '4' }, + { value: 'real', label: '6' }, + ], + }, + type: { + description: '全部类别: `空`、想看: `1`、看过: `2`、在看: `3`、搁置: `4`、抛弃: `5`', + options: [ + { value: 'ALL', label: 'all' }, + { value: '想看', label: '1' }, + { value: '看过', label: '2' }, + { value: '在看', label: '3' }, + { value: '搁置', label: '4' }, + { value: '抛弃', label: '5' }, + ], + }, + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [], + name: 'Bangumi 用户收藏列表', + maintainers: ['youyou-sudo'], + handler, +}; + +async function handler(ctx) { + const userId = ctx.req.param('id'); + const subjectType = ctx.req.param('subjectType') || ''; + const type = ctx.req.param('type') || ''; + + const subjectTypeNames = { + 1: '书籍', + 2: '动画', + 3: '音乐', + 4: '游戏', + 6: '三次元', + }; + + const typeNames = getTypeNames(subjectType); + const typeName = typeNames[type] || ''; + const subjectTypeName = subjectTypeNames[subjectType] || ''; + + let descriptionFields = ''; + + if (typeName && subjectTypeName) { + descriptionFields = `${typeName}的${subjectTypeName}列表`; + } else if (typeName) { + descriptionFields = `${typeName}的列表`; + } else if (subjectTypeName) { + descriptionFields = `收藏的${subjectTypeName}列表`; + } else { + descriptionFields = '的Bangumi收藏列表'; + } + + const userDataUrl = `https://api.bgm.tv/v0/users/${userId}`; + const userData = await got(userDataUrl, { + method: 'get', + headers: { + 'User-Agent': config.trueUA, + }, + }); + + const collectionDataUrl = `https://api.bgm.tv/v0/users/${userId}/collections?${subjectType && subjectType !== 'all' ? `subject_type=${subjectType}` : ''}${type && type !== 'all' ? `&type=${type}` : ''}`; + const collectionData = await got(collectionDataUrl, { + method: 'get', + headers: { + 'User-Agent': config.trueUA, + }, + }); + + const userNickname = userData.data.nickname; + const items = collectionData.data.data.map((item) => { + const titles = item.subject.name_cn || item.subject.name; + const updateTime = item.updated_at; + const subjectId = item.subject_id; + + return { + title: `${type === 'all' ? `${getTypeNames(item.subject_type)[item.type]}:` : ''}${titles}`, + description: art(path.join(__dirname, '../../templates/tv/subject.art'), { + routeSubjectType: subjectType, + subjectTypeName: subjectTypeNames[item.subject_type], + subjectType: item.subject_type, + subjectEps: item.subject.eps, + epStatus: item.ep_status, + score: item.subject.score, + date: item.subject.date, + picUrl: item.subject.images.large, + }), + link: `https://bgm.tv/subject/${subjectId}`, + pubDate: timezone(parseDate(updateTime), 0), + urls: `https://bgm.tv/subject/${subjectId}`, + }; + }); + return { + title: `${userNickname}${descriptionFields}`, + link: `https://bgm.tv/user/${userId}/collections`, + item: items, + description: `${userNickname}${descriptionFields}`, + }; +} From d2095be8f33428c7b1a43b14e4dd8a066a8885d8 Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 1 Oct 2024 08:41:36 -0700 Subject: [PATCH 033/740] fix(route): douyin (#16981) --- lib/routes/douyin/types.ts | 795 +++++++++++++++++++++++++++++++++++++ lib/routes/douyin/user.ts | 74 ++-- lib/routes/douyin/utils.ts | 88 +--- 3 files changed, 847 insertions(+), 110 deletions(-) create mode 100644 lib/routes/douyin/types.ts diff --git a/lib/routes/douyin/types.ts b/lib/routes/douyin/types.ts new file mode 100644 index 000000000000000..106e0bfe2256dd4 --- /dev/null +++ b/lib/routes/douyin/types.ts @@ -0,0 +1,795 @@ +interface AvatarThumb { + uri: string; + url_list: string[]; + width: number; + height: number; +} + +interface ShareInfo { + share_url: string; + share_weibo_desc: string; + share_desc: string; + share_title: string; + share_qrcode_url: AvatarThumb; + share_title_myself: string; + share_title_other: string; + share_desc_info: string; +} + +interface Author { + uid: string; + ban_user_functions: null; + nickname: string; + cf_list: null; + link_item_list: null; + avatar_thumb: AvatarThumb; + avatar_schema_list: null; + signature_extra: null; + follow_status: number; + risk_notice_text: string; + private_relation_list: null; + follower_list_secondary_information_struct: null; + custom_verify: string; + can_set_geofencing: null; + batch_unfollow_contain_tabs: null; + display_info: null; + verification_permission_ids: null; + need_points: null; + share_info: ShareInfo; + familiar_visitor_user: null; + homepage_bottom_toast: null; + batch_unfollow_relation_desc: null; + enterprise_verify_reason: string; + is_ad_fake: boolean; + account_cert_info: string; + card_entries_not_display: null; + user_tags: null; + profile_mob_params: null; + card_sort_priority: null; + not_seen_item_id_list: null; + card_entries: null; + prevent_download: boolean; + text_extra: null; + sec_uid: string; + im_role_ids: null; + follower_status: number; + not_seen_item_id_list_v2: null; + contrail_list: null; + data_label_list: null; + cover_url: AvatarThumb[]; + user_permissions: null; + offline_info_list: null; + endorsement_info_list: null; + interest_tags: null; + personal_tag_list: null; + white_cover_url: null; + creator_tag_list: null; + special_people_labels: null; +} + +interface CoverHd { + uri: string; + url_list: string[]; + width: number; + height: number; +} + +interface CoverLarge { + uri: string; + url_list: string[]; + width: number; + height: number; +} + +interface CoverMedium { + uri: string; + url_list: string[]; + width: number; + height: number; +} + +interface CoverThumb { + uri: string; + url_list: string[]; + width: number; + height: number; +} + +interface PlayUrl { + uri: string; + url_list: string[]; + width: number; + height: number; + url_key: string; +} + +interface SearchImpr { + entity_id: string; +} + +interface Chorus { + start_ms: number; + duration_ms: number; +} + +interface Song { + id: number; + id_str: string; + title: string; + artists: null; + chorus: Chorus; + chorus_v3_infos: null; +} + +interface MusicImageBeatsUrl { + uri: string; + url_list: string[]; + width: number; + height: number; +} + +interface MusicImageBeats { + music_image_beats_url: MusicImageBeatsUrl; + music_image_beats_raw: string; +} + +interface CoverColorHsv { + h: number; + s: number; + v: number; +} + +interface StrongBeatUrl { + uri: string; + url_list: string[]; + width: number; + height: number; +} + +interface Music { + id: number; + id_str: string; + title: string; + author: string; + album: string; + cover_hd: CoverHd; + cover_large: CoverLarge; + cover_medium: CoverMedium; + cover_thumb: CoverThumb; + play_url: PlayUrl; + schema_url: string; + source_platform: number; + start_time: number; + end_time: number; + duration: number; + extra: string; + user_count: number; + position: null; + collect_stat: number; + status: number; + offline_desc: string; + owner_nickname: string; + is_original: boolean; + mid: string; + binded_challenge_id: number; + redirect: boolean; + is_restricted: boolean; + author_deleted: boolean; + is_del_video: boolean; + is_video_self_see: boolean; + owner_handle: string; + author_position: null; + prevent_download: boolean; + unshelve_countries: null; + prevent_item_download_status: number; + external_song_info: false[]; + preview_start_time: number; + preview_end_time: number; + is_commerce_music: boolean; + is_original_sound: boolean; + audition_duration: number; + shoot_duration: number; + reason_type: number; + artists: false[]; + lyric_short_position: null; + mute_share: boolean; + tag_list: null; + dmv_auto_show: boolean; + is_pgc: boolean; + is_matched_metadata: boolean; + is_audio_url_with_cookie: boolean; + music_chart_ranks: null; + can_background_play: boolean; + music_status: number; + video_duration: number; + pgc_music_type: number; + search_impr: SearchImpr; + artist_user_infos: null; + dsp_status: number; + musician_user_infos: null; + music_collect_count: number; + music_cover_atmosphere_color_value: string; + strong_beat_url: StrongBeatUrl; + cover_color_hsv: CoverColorHsv; + song: Song; + music_image_beats: MusicImageBeats; + owner_id: string; + sec_uid: string; + avatar_thumb: AvatarThumb; + avatar_medium: AvatarThumb; + avatar_large: AvatarThumb; + author_status: number; +} + +interface PlayAddr { + uri: string; + url_list: string[]; + width: number; + height: number; + url_key: string; + data_size: number; + file_hash: string; + file_cs: string; +} + +interface Cover { + uri: string; + url_list: string[]; + width: number; + height: number; +} + +interface DynamicCover { + uri: string; + url_list: string[]; + width: number; + height: number; +} + +interface OriginCover { + uri: string; + url_list: string[]; + width: number; + height: number; +} + +interface UrlList { + main_url: string; + backup_url: string; + fallback_url: string; +} + +interface AudioMeta { + url_list: UrlList; + encoded_type: string; + media_type: string; + logo_type: string; + quality: string; + quality_desc: string; + format: string; + bitrate: number; + codec_type: string; + size: number; + fps: number; + file_id: string; + file_hash: string; + sub_info: string; +} + +interface BitRateAudio { + audio_meta: AudioMeta; + audio_quality: number; + audio_extra: string; +} + +interface PlayAddrH264 { + uri: string; + url_list: string[]; + width: number; + height: number; + url_key: string; + data_size: number; + file_hash: string; + file_cs: string; +} + +interface AnimatedCover { + uri: string; + url_list: string[]; +} + +type OriginalSoundInfos = unknown; + +interface Audio { + original_sound_infos: OriginalSoundInfos; +} + +interface BigThumbs { + img_num: number; + uri: string; + img_url: string; + img_x_size: number; + img_y_size: number; + img_x_len: number; + img_y_len: number; + duration: number; + interval: number; + fext: string; + uris: string[]; + img_urls: string[]; +} + +interface BitRate { + gear_name: string; + quality_type: number; + bit_rate: number; + play_addr: PlayAddr; + is_h265: number; + is_bytevc1: number; + HDR_type: string; + HDR_bit: string; + FPS: number; + video_extra: string; + format: string; +} + +interface GaussianCover { + uri: string; + url_list: string[]; + width: number; + height: number; +} + +interface PlayAddr265 { + uri: string; + url_list: string[]; + width: number; + height: number; + url_key: string; + data_size: number; + file_hash: string; + file_cs: string; +} + +interface Video { + play_addr: PlayAddr; + cover: Cover; + height: number; + width: number; + dynamic_cover: DynamicCover; + origin_cover: OriginCover; + ratio: string; + bit_rate_audio: BitRateAudio[] | null; + is_source_HDR: number; + bit_rate: BitRate[]; + duration: number; + gaussian_cover: GaussianCover; + play_addr_h264: PlayAddrH264; + format: string; + animated_cover: AnimatedCover; + audio: Audio; + meta: string; + video_model: string; + big_thumbs: BigThumbs[]; + use_static_cover: boolean; + play_addr_265: PlayAddr265; +} + +interface GameTagInfo { + is_game: boolean; +} + +interface Statistics { + admire_count: number; + comment_count: number; + digg_count: number; + collect_count: number; + play_count: number; + share_count: number; +} + +interface ReviewResult { + review_status: number; +} + +interface Status { + listen_video_status: number; + is_delete: boolean; + allow_share: boolean; + is_prohibited: boolean; + in_reviewing: boolean; + part_see: number; + private_status: number; + review_result: ReviewResult; +} + +interface DistributeCircle { + distribute_type: number; + campus_block_interaction: boolean; + is_campus: boolean; +} + +interface TextExtra { + start: number; + end: number; + type: number; + hashtag_name: string; + hashtag_id: string; + is_commerce: boolean; + caption_start: number; + caption_end: number; + search_text: string; + search_query_id: string; +} + +interface ShareInfo { + share_url: string; + share_link_desc: string; +} + +interface RiskInfos { + vote: boolean; + warn: boolean; + risk_sink: boolean; + type: number; + content: string; +} + +interface PublishPlusAlienation { + alienation_type: number; +} + +interface XiguaBaseInfo { + status: number; + star_altar_order_id: number; + star_altar_type: number; + item_id: number; +} + +interface LogPb { + impr_id: string; +} + +interface SuggestWords { + suggest_words: { + words: { + word: string; + word_id: string; + info: string; + }[]; + scene: string; + icon_url: string; + hint_text: string; + }[]; +} + +interface CommentPermissionInfo { + comment_permission_status: number; + can_comment: boolean; + item_detail_entry: boolean; + press_entry: boolean; + toast_guide: boolean; +} + +interface SeriesPaidInfo { + series_paid_status: number; + item_price: number; +} + +interface ImageAlbumMusicInfo { + begin_time: number; + end_time: number; + volume: number; +} + +interface VideoTag { + tag_id: number; + tag_name: string; + level: number; +} + +interface PhotoSearchEntrance { + ecom_type: number; +} + +interface DanmakuControl { + enable_danmaku: boolean; + post_privilege_level: number; + is_post_denied: boolean; + post_denied_reason: string; + skip_danmaku: boolean; + danmaku_cnt: number; + activities: null; + pass_through_params: string; +} + +interface ItemWarnNotification { + type: number; + show: boolean; + content: string; +} + +interface VideoControl { + allow_download: boolean; + share_type: number; + show_progress_bar: number; + draft_progress_bar: number; + allow_duet: boolean; + allow_react: boolean; + prevent_download_type: number; + allow_dynamic_wallpaper: boolean; + timer_status: number; + allow_music: boolean; + allow_stitch: boolean; + allow_douplus: boolean; + allow_share: boolean; + share_grayed: boolean; + download_ignore_visibility: boolean; + duet_ignore_visibility: boolean; + share_ignore_visibility: boolean; + download_info: { + level: number; + fail_info: { + code: number; + reason: string; + msg: string; + }; + }; + duet_info: { + level: number; + fail_info: { + code: number; + reason: string; + }; + }; + allow_record: boolean; + disable_record_reason: string; + timer_info: object; +} + +interface AwemeControl { + can_forward: boolean; + can_share: boolean; + can_comment: boolean; + can_show_comment: boolean; +} + +interface LifeAnchorShowExtra { + anchor_type: number; + should_show: boolean; + has_anchor_info: boolean; + extra: string; +} + +interface Icon { + uri: string; + url_list: string[]; + width: number; + height: number; + url_key: string; +} + +interface StyleInfo { + default_icon: string; + scene_icon: string; + extra: string; +} + +interface AnchorInfo { + type: number; + id: string; + icon: Icon; + title: string; + title_tag: string; + content: string; + style_info: StyleInfo; + extra: string; + log_extra: string; + web_url: string; + mp_url: string; + open_url: string; +} + +interface AncestorInfo { + product_id: number; + gid: number; + uid: number; +} + +interface VtagSearch { + vtag_enable: boolean; + vtag_delay_ts: number; +} + +interface HotList { + title: string; + image_url: string; + schema: string; + type: number; + i18n_title: string; + header: string; + footer: string; + pattern_type: number; + rank: number; + hot_score: number; + view_count: number; + group_id: string; + sentence: string; + sentence_id: number; + extra: string; +} + +interface StarAtlasInfo { + log_extra: string; + click_track_url_list: null; + track_url_list: null; +} + +interface SharePostInfo { + share_type: string; + is_open_platform: number; + open_platform_key: string; +} + +interface Aweme { + aweme_id: string; + desc: string; + create_time: number; + author: Author; + music: Music; + mv_info: null; + video: Video; + game_tag_info: GameTagInfo; + user_digged: number; + statistics: Statistics; + status: Status; + distribute_circle: DistributeCircle; + text_extra: TextExtra[]; + is_top: number; + reply_smart_emojis: null; + share_info: ShareInfo; + flash_mob_trends: number; + video_labels: null; + item_title: string; + is_ads: boolean; + duration: number; + aweme_type: number; + is_24_story: number; + origin_duet_resource_uri: string; + image_infos: null; + risk_infos: RiskInfos; + is_use_music: boolean; + dislike_dimension_list_v2: null; + position: null; + uniqid_position: null; + comment_list: null; + author_user_id: number; + publish_plus_alienation: PublishPlusAlienation; + geofencing: false[]; + enable_comment_sticker_rec: boolean; + xigua_base_info: XiguaBaseInfo; + region: string; + video_text: null; + ref_voice_modify_id_list: null; + collect_stat: number; + label_top_text: null; + promotions: false[]; + group_id: string; + prevent_download: boolean; + nickname_position: null; + challenge_position: null; + caption: string; + voice_modify_id_list: null; + tts_id_list: null; + long_video: null; + entertainment_product_info: { + sub_title: null; + market_info: { + limit_free: { + in_free: boolean; + }; + marketing_tag: null; + }; + }; + create_scale_type: string[] | null; + ref_tts_id_list: null; + personal_page_botton_diagnose_style: number; + interaction_stickers: null; + media_type: number; + origin_comment_ids: null; + commerce_config_data: null; + chapter_bar_color: null; + video_control: VideoControl; + aweme_control: AwemeControl; + trends_infos: null; + aweme_type_tags: string; + slides_music_beats: null; + original: number; + anchors: null; + hybrid_label: null; + geofencing_regions: null; + friend_interaction: number; + image_crop_ctrl: number; + is_story: number; + activity_video_type: number; + video_game_data_channel_config: object; + can_cache_to_local: boolean; + cover_labels: null; + video_share_edit_status: number; + jump_tab_info_list: null; + guide_btn_type: number; + friend_recommend_info: object; + yumme_recreason: null; + images: null; + relation_labels: null; + mark_largely_following: boolean; + impression_data: { + group_id_list_a: false[]; + group_id_list_b: false[]; + similar_id_list_a: number[] | null; + similar_id_list_b: number[] | null; + group_id_list_c: false[]; + }; + boost_status: number; + authentication_token: string; + libfinsert_task_id: string; + social_tag_list: null; + suggest_words: SuggestWords; + show_follow_button: object; + duet_aggregate_in_music_tab: boolean; + is_duet_sing: boolean; + comment_permission_info: CommentPermissionInfo; + original_images: null; + series_paid_info: SeriesPaidInfo; + img_bitrate: null; + comment_gid: number; + image_album_music_info: ImageAlbumMusicInfo; + video_tag: VideoTag[]; + is_collects_selected: number; + chapter_list: null; + feed_comment_config: object; + is_image_beat: boolean; + dislike_dimension_list: null; + standard_bar_info_list: null; + photo_search_entrance: PhotoSearchEntrance; + danmaku_control: DanmakuControl; + is_life_item: boolean; + image_list: null; + component_info_v2: string; + item_warn_notification: ItemWarnNotification; + origin_text_extra: null; + disable_relation_bar: number; + packed_clips: null; + author_mask_tag: number; + user_recommend_status: number; + collection_corner_mark: number; + image_comment: object; + visual_search_info: { + is_show_img_entrance: boolean; + is_ecom_img: boolean; + visual_search_longpress: number; + }; + original_anchor_type: number; + life_anchor_show_extra: LifeAnchorShowExtra; + anchor_info: AnchorInfo; + ancestor_info: AncestorInfo; + horizontal_type: number; + vtag_search: VtagSearch; + hot_list: HotList; + common_bar_info: string; + star_atlas_info: StarAtlasInfo; + share_post_info: SharePostInfo; +} + +export interface PostData { + status_code: number; + min_cursor: number; + max_cursor: number; + has_more: number; + aweme_list: Aweme[]; + time_list: string[]; + log_pb: LogPb; + request_item_cursor: number; + post_serial: number; + replace_series_cover: number; +} diff --git a/lib/routes/douyin/user.ts b/lib/routes/douyin/user.ts index f4bf243df3888ce..04286ef43887aff 100644 --- a/lib/routes/douyin/user.ts +++ b/lib/routes/douyin/user.ts @@ -4,8 +4,11 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import { config } from '@/config'; import { fallback, queryToBoolean } from '@/utils/readable-social'; -import { templates, resolveUrl, proxyVideo, getOriginAvatar, universalGet } from './utils'; +import { templates, resolveUrl, proxyVideo, getOriginAvatar } from './utils'; import InvalidParameterError from '@/errors/types/invalid-parameter'; +import puppeteer from '@/utils/puppeteer'; +import logger from '@/utils/logger'; +import { PostData } from './types'; export const route: Route = { path: '/user/:uid/:routeParams?', @@ -43,29 +46,56 @@ async function handler(ctx) { const pageUrl = `https://www.douyin.com/user/${uid}`; - const pageData = await cache.tryGet( + const pageData = (await cache.tryGet( `douyin:user:${uid}`, async () => { - const renderData = await universalGet(pageUrl, 'user'); - const dataKey = Object.keys(renderData).find((key) => renderData[key].user && renderData[key].post); - return renderData[dataKey]; + let postData; + const browser = await puppeteer(); + const page = await browser.newPage(); + await page.setRequestInterception(true); + + page.on('request', (request) => { + request.resourceType() === 'document' || request.resourceType() === 'script' || request.resourceType() === 'xhr' ? request.continue() : request.abort(); + }); + page.on('response', async (response) => { + const request = response.request(); + if (request.url().includes('/web/aweme/post') && !postData) { + postData = await response.json(); + } + }); + + logger.http(`Requesting ${pageUrl}`); + await page.goto(pageUrl, { + waitUntil: 'networkidle2', + }); + + browser.close(); + + if (!postData) { + throw new Error('Empty post data. The request may be filtered by WAF.'); + } + + return postData; }, config.cache.routeExpire, false - ); - const userInfo = pageData.user.user; + )) as PostData; + + if (!pageData.aweme_list?.length) { + throw new Error('Empty post data. The request may be filtered by WAF.'); + } + const userInfo = pageData.aweme_list[0].author; const userNickName = userInfo.nickname; - const userDescription = userInfo.desc; - const userAvatar = getOriginAvatar(userInfo.avatar300Url || userInfo.avatarUrl); + // const userDescription = userInfo.desc; + const userAvatar = getOriginAvatar(userInfo.avatar_thumb.url_list.at(-1)); - const posts = pageData.post.data; - const items = posts.map((post) => { + const items = pageData.aweme_list.map((post) => { // parse video - let videoList = post.video && post.video.bitRateList && post.video.bitRateList.map((item) => resolveUrl(item.playApi)); + let videoList = post.video?.bit_rate?.map((item) => resolveUrl(item.play_addr.url_list.at(-1))); if (relay) { videoList = videoList.map((item) => proxyVideo(item, relay)); } - let duration = post.video && post.video.duration; + let duration = post.video?.duration; duration = duration && duration / 1000; let img; // if (!embed) { @@ -73,30 +103,28 @@ async function handler(ctx) { // } img = img || - (post.video && - ((post.video.coverUrlList && post.video.coverUrlList.at(-1)) || // HD - post.video.originCover || // LD - post.video.cover)); // even more LD + post.video?.cover?.url_list.at(-1) || // HD + post.video?.origin_cover?.url_list.at(-1); // LD img = img && resolveUrl(img); // render description - const desc = post.desc && post.desc.replaceAll('\n', '
'); + const desc = post.desc?.replaceAll('\n', '
'); let media = art(embed && videoList ? templates.embed : templates.cover, { img, videoList, duration }); media = embed && videoList && iframe ? art(templates.iframe, { content: media }) : media; // warp in iframe const description = art(templates.desc, { desc, media }); return { - title: post.desc, + title: post.desc.split('\n')[0], description, - link: `https://www.douyin.com/video/${post.awemeId}`, - pubDate: parseDate(post.createTime * 1000), - category: post.textExtra.map((extra) => extra.hashtagName), + link: `https://www.douyin.com/video/${post.aweme_id}`, + pubDate: parseDate(post.create_time * 1000), + category: post.video_tag.map((t) => t.tag_name), }; }); return { title: userNickName, - description: userDescription, + // description: userDescription, image: userAvatar, link: pageUrl, item: items, diff --git a/lib/routes/douyin/utils.ts b/lib/routes/douyin/utils.ts index 59e07ee1b70266f..938ae535562c78a 100644 --- a/lib/routes/douyin/utils.ts +++ b/lib/routes/douyin/utils.ts @@ -1,13 +1,7 @@ import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); -import cache from '@/utils/cache'; import path from 'node:path'; -import got from '@/utils/got'; -import { load } from 'cheerio'; -import logger from '@/utils/logger'; -import { config } from '@/config'; -import puppeteer from '@/utils/puppeteer'; const templates = { desc: path.join(__dirname, 'templates/desc.art'), @@ -51,84 +45,4 @@ const getOriginAvatar = (url) => .replace(/^(.*\.douyinpic\.com\/).*(\/aweme-avatar\/)([^?]*)(\?.*)?$/, '$1origin$2$3') .replaceAll(/~\w+_\d+x\d+/g, ''); -const extractRenderData = (html) => { - if (!html) { - throw new Error('Empty html. The request may be filtered by WAF.'); - } - - const $ = load(html); - const renderData = JSON.parse(decodeURIComponent($('script#RENDER_DATA').html())); - if (!renderData) { - const title = $('title').text(); - if (title.includes('验证')) { - throw new Error(title); - } else if ($('#captcha_container').length > 0) { - throw new Error('Captcha required.'); - } - throw new Error('Failed to get render data.'); - } else if (renderData.isSpider) { - throw new Error('The request was considered to be from a spider.'); - } else { - return renderData; - } -}; - -const gotGet = async (url, ua) => { - const response = await got(url, { - headers: { - 'User-Agent': ua, // magic! - }, - }); - return extractRenderData(response.data); -}; - -const puppeteerGet = async (pageUrl) => { - const browser = await puppeteer(); - const page = await browser.newPage(); - await page.setRequestInterception(true); - page.on('request', (request) => { - request.resourceType() === 'document' ? request.continue() : request.abort(); - }); - await page.goto(pageUrl, { - waitUntil: 'domcontentloaded', - }); - const html = await page.evaluate(() => document.documentElement.innerHTML); - await browser.close(); - return extractRenderData(html); -}; - -const universalGet = async (url, route) => { - const cacheKey = `douyin:utils:universalGet:gotFirst:${route}`; - const gotFirst = await cache.tryGet( - cacheKey, - () => '1', - config.cache.contentExpire, - false // no refresh now - ); - - const ua = route === 'live' ? 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)' : 'curl/7.86.0'; - - let data; - if (gotFirst === '1') { - try { - data = await gotGet(url, ua); - cache.set(cacheKey, '1', config.cache.contentExpire); // refresh if success - } catch (error) { - logger.warn('Failed to get data with got, trying puppeteer: ' + error.message); - data = await puppeteerGet(url); - cache.set(cacheKey, '0', config.cache.contentExpire); // only set if success - } - } else { - try { - data = await puppeteerGet(url); - cache.set(cacheKey, '0', config.cache.contentExpire); // refresh if success - } catch (error) { - logger.warn('Failed to get data with puppeteer, trying got: ' + error.message); - data = await gotGet(url, ua); - cache.set(cacheKey, '1', config.cache.contentExpire); // only set if success - } - } - return data; -}; - -export { templates, resolveUrl, proxyVideo, getOriginAvatar, universalGet }; +export { templates, resolveUrl, proxyVideo, getOriginAvatar }; From 0a79a862a7e46ec2b944b3f0271e4f545b52a143 Mon Sep 17 00:00:00 2001 From: pandada8 Date: Wed, 2 Oct 2024 03:34:24 +0800 Subject: [PATCH 034/740] feat(routes/ceph): add ceph blog (#16980) * feat(routes/ceph): add ceph blog * Apply suggestions from code review Co-authored-by: Tony * fix(route/ceph): add 1hour cache for index, fix url double slash * fix(route/ceph): remove unnecessary caching --------- --- lib/routes/ceph/blog.ts | 72 ++++++++++++++++++++++++++++++++++++ lib/routes/ceph/namespace.ts | 7 ++++ 2 files changed, 79 insertions(+) create mode 100644 lib/routes/ceph/blog.ts create mode 100644 lib/routes/ceph/namespace.ts diff --git a/lib/routes/ceph/blog.ts b/lib/routes/ceph/blog.ts new file mode 100644 index 000000000000000..7c5e1dc9a2c2ddd --- /dev/null +++ b/lib/routes/ceph/blog.ts @@ -0,0 +1,72 @@ +import { Data, Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import { Context } from 'hono'; + +export const route: Route = { + path: '/blog/:topic?', + categories: ['blog'], + example: '/ceph/blog/a11y', + parameters: { + category: 'filter blog post by category, return all posts if not specified', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['ceph.io/'], + }, + ], + name: 'Blog', + maintainers: ['pandada8'], + handler, + url: 'ceph.io', +}; + +async function handler(ctx: Context): Promise { + const { category } = ctx.req.param(); + const url = category ? `https://ceph.io/en/news/blog/category/${category}/` : 'https://ceph.io/en/news/blog/'; + const response = await got.get(url); + const data = response.data; + const $ = load(data); + const list = $('#main .section li') + .toArray() + .map((e) => { + const element = $(e); + const title = element.find('a').text().trim(); + const pubDate = parseDate(element.find('time').attr('datetime')); + return { + title, + link: new URL(element.find('a').attr('href'), 'https://ceph.io').href, + pubDate, + }; + }); + + const result = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const itemReponse = await got.get(item.link); + const data = itemReponse.data; + const item$ = load(data); + + item.author = item$('#main section > div:nth-child(1) span').text().trim(); + item.description = item$('#main section > div:nth-child(2) > div').html(); + return item; + }) + ) + ); + + return { + title: 'Ceph Blog', + link: url, + item: result, + }; +} diff --git a/lib/routes/ceph/namespace.ts b/lib/routes/ceph/namespace.ts new file mode 100644 index 000000000000000..0585fb5b5589286 --- /dev/null +++ b/lib/routes/ceph/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Ceph', + url: 'ceph.io', + description: 'Ceph is an open source distributed storage system designed to evolve with data.', +}; From 78a5e4fdfc06300a4c8f0572f2798c55309202b2 Mon Sep 17 00:00:00 2001 From: Wayne Zhang Date: Wed, 2 Oct 2024 04:24:45 +0800 Subject: [PATCH 035/740] feat(route): github discussion add category filter (#16983) --- lib/routes/github/discussions.ts | 91 ++++++++++++++++++++++++++------ 1 file changed, 75 insertions(+), 16 deletions(-) diff --git a/lib/routes/github/discussions.ts b/lib/routes/github/discussions.ts index 2584e6108d45390..d9adf5c05f73494 100644 --- a/lib/routes/github/discussions.ts +++ b/lib/routes/github/discussions.ts @@ -10,13 +10,47 @@ const md = MarkdownIt({ import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/discussion/:user/:repo/:state?', + path: '/discussion/:user/:repo/:state?/:category?', categories: ['programming'], example: '/github/discussion/DIYgod/RSSHub', parameters: { user: 'User name', repo: 'Repo name', - state: 'The state of discussions. Can be either `open`, `closed`, `answered`, `unanswered`, `locked`, `unlocked` or `all`. Default: `all`.', + state: { + description: 'The state of discussions', + default: 'open', + options: [ + { + label: 'Open', + value: 'open', + }, + { + label: 'Closed', + value: 'closed', + }, + { + label: 'Answered', + value: 'answered', + }, + { + label: 'Unanswered', + value: 'unanswered', + }, + { + label: 'Locked', + value: 'locked', + }, + { + label: 'Unlocked', + value: 'unlocked', + }, + { + label: 'All', + value: 'all', + }, + ], + }, + category: 'Category Name (case-sensitive). Default: `null`.', }, features: { requireConfig: [ @@ -41,7 +75,7 @@ async function handler(ctx) { if (!config.github || !config.github.access_token) { throw new ConfigNotFoundError('GitHub Discussions RSS is disabled due to the lack of relevant config'); } - const { user, repo, limit, state = 'all' } = ctx.req.param(); + const { user, repo, limit, state = 'open', category = null } = ctx.req.param(); const { answered, closed, locked } = mapStateToBooleans(state); const perPage = Math.min(Number.parseInt(limit) || 100, 100); @@ -52,6 +86,31 @@ async function handler(ctx) { if (answered !== null) { filters += `, answered: ${answered}`; } + if (category !== null) { + const response = await got({ + method: 'post', + url, + headers: { + Authorization: `bearer ${config.github.access_token}`, + }, + json: { + query: ` + { + repository(owner: "${user}", name: "${repo}") { + discussionCategories(first: 25) { + nodes { + id, + name, + } + }, + } + } + `, + }, + }); + const categoryItem = response.data.data.repository.discussionCategories.nodes.find((item) => item.name === category); + filters += categoryItem?.id ? `, categoryId: "${categoryItem.id}"` : ''; + } const response = await got({ method: 'post', @@ -63,19 +122,19 @@ async function handler(ctx) { query: ` { repository(owner: "${user}", name: "${repo}") { - discussions(${filters}) { - nodes { - title, - author { - login - }, - createdAt, - closed, - isAnswered, - locked, - body, - url - } + discussions(${filters}) { + nodes { + title, + author { + login + }, + createdAt, + closed, + isAnswered, + locked, + body, + url + } }, } } From 015ced7cf813d371d6662b9531bf45ea26205318 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 2 Oct 2024 08:45:16 +0800 Subject: [PATCH 036/740] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD=E5=9B=BD?= =?UTF-8?q?=E8=AF=81=E5=88=B8=E7=9B=91=E7=9D=A3=E7=AE=A1=E7=90=86=E5=A7=94?= =?UTF-8?q?=E5=91=98=E4=BC=9A=E6=94=BF=E5=BA=9C=E4=BF=A1=E6=81=AF=E5=85=AC?= =?UTF-8?q?=E5=BC=80=20(#16982)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/gov/csrc/csrc.ts | 541 ++++++++++++++++++++++++++++++++++++ 1 file changed, 541 insertions(+) create mode 100644 lib/routes/gov/csrc/csrc.ts diff --git a/lib/routes/gov/csrc/csrc.ts b/lib/routes/gov/csrc/csrc.ts new file mode 100644 index 000000000000000..5149c2015abaf31 --- /dev/null +++ b/lib/routes/gov/csrc/csrc.ts @@ -0,0 +1,541 @@ +import { Route } from '@/types'; + +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; + +export const handler = async (ctx) => { + const { id = 'c101972' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; + + const rootUrl = 'http://www.csrc.gov.cn'; + const apiUrl = new URL('getLocalList', rootUrl).href; + const currentUrl = new URL(`/csrc/${id}/zfxxgk_zdgk.shtml`, rootUrl).href; + + const { data: channelResponse } = await got(apiUrl, { + searchParams: { + channelCode: id, + }, + }); + + const channel = channelResponse.results.channelLevel.find((channel) => channel.channelCode === id); + const channelId = channel?.channelId ?? undefined; + const channelName = channel?.channelName ?? undefined; + + if (!channelId) { + throw new InvalidParameterError(`Invalid channel Id: ${id}`); + } + + const apiSearchUrl = new URL(`searchList/${channelId}`, rootUrl).href; + + const { data: response } = await got(apiSearchUrl, { + searchParams: { + _isAgg: true, + _isJson: true, + _pageSize: limit, + }, + }); + + const items = response.data.results.slice(0, limit).map((item) => { + const title = item.title; + const description = item.contentHtml; + const enclosure = item.resList?.[0] ?? undefined; + + return { + title, + description, + pubDate: parseDate(item.publishedTime), + link: new URL(`csrc/${item.channelCodeName}/c${item.manuscriptId}/content.shtml`, rootUrl).href, + category: [item.channelName], + content: { + html: description, + text: item.content, + }, + enclosure_url: enclosure ? new URL(enclosure.filePath, rootUrl).href : undefined, + enclosure_type: enclosure ? `application/${enclosure.filePath.split(/\./).pop()}` : undefined, + enclosure_title: enclosure ? enclosure.title : undefined, + }; + }); + + const { data: currentResponse } = await got(currentUrl); + + const $ = load(currentResponse); + + const description = channelName ?? id; + const image = new URL($('div.zfxx-logo img').prop('src'), rootUrl).href; + const author = $('meta[name="SiteName"]').prop('content'); + + return { + title: `${author} - ${description}`, + description, + link: currentUrl, + item: items, + allowEmpty: true, + image, + author, + }; +}; + +export const route: Route = { + path: '/csrc/zfxxgk_zdgk/:id?', + name: '政府信息公开', + url: 'www.csrc.gov.cn', + maintainers: ['nczitzk'], + handler, + example: '/gov/csrc/zfxxgk_zdgk/c101971', + parameters: { id: '频道 id,默认为 `c101971`,即行政处罚决定,可在对应频道页 URL 中找到' }, + description: `:::tip + 若订阅 [行政处罚决定](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) + + | 频道 | 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) + + | 频道 | 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) + + | 频道 | 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) + + | 频道 | 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) + + | 频道 | 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'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.csrc.gov.cn/csrc/:id/zfxxgk_zdgk.shtml'], + target: (params) => { + const id = params.id; + + return `/gov/csrc/zfxxgk_zdgk/${id ? `/${id}` : ''}`; + }, + }, + { + title: '主动公开目录 - 按主题查看', + source: ['www.csrc.gov.cn/csrc/c101793/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101793', + }, + { + title: '主动公开目录 - 按体裁文种查看', + source: ['www.csrc.gov.cn/csrc/c101951/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101951', + }, + { + title: '主动公开目录 - 按派出机构查看', + source: ['www.csrc.gov.cn/csrc/c101985/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101985', + }, + { + title: '按主题查看 - 综合政务', + source: ['www.csrc.gov.cn/csrc/c101794/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101794', + }, + { + title: '按主题查看 - 发行监管', + source: ['www.csrc.gov.cn/csrc/c101801/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101801', + }, + { + title: '按主题查看 - 公众公司监管(含北交所)', + source: ['www.csrc.gov.cn/csrc/c101828/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101828', + }, + { + title: '按主题查看 - 证券交易监管', + source: ['www.csrc.gov.cn/csrc/c101832/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101832', + }, + { + title: '按主题查看 - 证券经营机构监管', + source: ['www.csrc.gov.cn/csrc/c101837/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101837', + }, + { + title: '按主题查看 - 上市公司监管', + source: ['www.csrc.gov.cn/csrc/c101863/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101863', + }, + { + title: '按主题查看 - 基金监管', + source: ['www.csrc.gov.cn/csrc/c101876/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101876', + }, + { + title: '按主题查看 - 私募基金监管', + source: ['www.csrc.gov.cn/csrc/c101938/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101938', + }, + { + title: '按主题查看 - 区域性股权市场规范发展', + source: ['www.csrc.gov.cn/csrc/c106301/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c106301', + }, + { + title: '按主题查看 - 期货监管', + source: ['www.csrc.gov.cn/csrc/c101901/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101901', + }, + { + title: '按主题查看 - 债券监管', + source: ['www.csrc.gov.cn/csrc/c106306/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c106306', + }, + { + title: '按主题查看 - 行政执法', + source: ['www.csrc.gov.cn/csrc/c101925/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101925', + }, + { + title: '按主题查看 - 行政复议', + source: ['www.csrc.gov.cn/csrc/c105938/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c105938', + }, + { + title: '按主题查看 - 国际合作', + source: ['www.csrc.gov.cn/csrc/c101931/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101931', + }, + { + title: '按主题查看 - 证券服务机构监管', + source: ['www.csrc.gov.cn/csrc/c105939/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c105939', + }, + { + title: '按主题查看 - 其他', + source: ['www.csrc.gov.cn/csrc/c101950/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101950', + }, + { + title: '按派出机构查看 - 北京', + source: ['www.csrc.gov.cn/csrc/c101986/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101986', + }, + { + title: '按派出机构查看 - 天津', + source: ['www.csrc.gov.cn/csrc/c101987/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101987', + }, + { + title: '按派出机构查看 - 河北', + source: ['www.csrc.gov.cn/csrc/c101988/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101988', + }, + { + title: '按派出机构查看 - 山西', + source: ['www.csrc.gov.cn/csrc/c101989/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101989', + }, + { + title: '按派出机构查看 - 内蒙古', + source: ['www.csrc.gov.cn/csrc/c101990/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101990', + }, + { + title: '按派出机构查看 - 辽宁', + source: ['www.csrc.gov.cn/csrc/c101991/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101991', + }, + { + title: '按派出机构查看 - 吉林', + source: ['www.csrc.gov.cn/csrc/c101992/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101992', + }, + { + title: '按派出机构查看 - 黑龙江', + source: ['www.csrc.gov.cn/csrc/c101993/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101993', + }, + { + title: '按派出机构查看 - 上海', + source: ['www.csrc.gov.cn/csrc/c101994/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101994', + }, + { + title: '按派出机构查看 - 江苏', + source: ['www.csrc.gov.cn/csrc/c101995/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101995', + }, + { + title: '按派出机构查看 - 浙江', + source: ['www.csrc.gov.cn/csrc/c101996/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101996', + }, + { + title: '按派出机构查看 - 安徽', + source: ['www.csrc.gov.cn/csrc/c101997/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101997', + }, + { + title: '按派出机构查看 - 福建', + source: ['www.csrc.gov.cn/csrc/c101998/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101998', + }, + { + title: '按派出机构查看 - 江西', + source: ['www.csrc.gov.cn/csrc/c101999/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101999', + }, + { + title: '按派出机构查看 - 山东', + source: ['www.csrc.gov.cn/csrc/c102000/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102000', + }, + { + title: '按派出机构查看 - 河南', + source: ['www.csrc.gov.cn/csrc/c102001/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102001', + }, + { + title: '按派出机构查看 - 湖北', + source: ['www.csrc.gov.cn/csrc/c102002/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102002', + }, + { + title: '按派出机构查看 - 湖南', + source: ['www.csrc.gov.cn/csrc/c102003/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102003', + }, + { + title: '按派出机构查看 - 广东', + source: ['www.csrc.gov.cn/csrc/c102004/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102004', + }, + { + title: '按派出机构查看 - 广西', + source: ['www.csrc.gov.cn/csrc/c102005/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102005', + }, + { + title: '按派出机构查看 - 海南', + source: ['www.csrc.gov.cn/csrc/c102006/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102006', + }, + { + title: '按派出机构查看 - 重庆', + source: ['www.csrc.gov.cn/csrc/c102007/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102007', + }, + { + title: '按派出机构查看 - 四川', + source: ['www.csrc.gov.cn/csrc/c102008/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102008', + }, + { + title: '按派出机构查看 - 贵州', + source: ['www.csrc.gov.cn/csrc/c102009/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102009', + }, + { + title: '按派出机构查看 - 云南', + source: ['www.csrc.gov.cn/csrc/c102010/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102010', + }, + { + title: '按派出机构查看 - 西藏', + source: ['www.csrc.gov.cn/csrc/c102011/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102011', + }, + { + title: '按派出机构查看 - 陕西', + source: ['www.csrc.gov.cn/csrc/c102012/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102012', + }, + { + title: '按派出机构查看 - 甘肃', + source: ['www.csrc.gov.cn/csrc/c102013/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102013', + }, + { + title: '按派出机构查看 - 青海', + source: ['www.csrc.gov.cn/csrc/c102014/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102014', + }, + { + title: '按派出机构查看 - 宁夏', + source: ['www.csrc.gov.cn/csrc/c102015/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102015', + }, + { + title: '按派出机构查看 - 新疆', + source: ['www.csrc.gov.cn/csrc/c102016/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102016', + }, + { + title: '按派出机构查看 - 深圳', + source: ['www.csrc.gov.cn/csrc/c102017/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102017', + }, + { + title: '按派出机构查看 - 大连', + source: ['www.csrc.gov.cn/csrc/c102018/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102018', + }, + { + title: '按派出机构查看 - 宁波', + source: ['www.csrc.gov.cn/csrc/c102019/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102019', + }, + { + title: '按派出机构查看 - 厦门', + source: ['www.csrc.gov.cn/csrc/c102020/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102020', + }, + { + title: '按派出机构查看 - 青岛', + source: ['www.csrc.gov.cn/csrc/c102021/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c102021', + }, + { + title: '按派出机构查看 - 上海专员办', + source: ['www.csrc.gov.cn/csrc/c105841/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c105841', + }, + { + title: '按派出机构查看 - 深圳专员办', + source: ['www.csrc.gov.cn/csrc/c105842/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c105842', + }, + { + title: '综合政务 - 组织机构', + source: ['www.csrc.gov.cn/csrc/c101795/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101795', + }, + { + title: '综合政务 - 征求意见', + source: ['www.csrc.gov.cn/csrc/c101796/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101796', + }, + { + title: '综合政务 - 废止规章', + source: ['www.csrc.gov.cn/csrc/c101797/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101797', + }, + { + title: '综合政务 - 财务预算管理', + source: ['www.csrc.gov.cn/csrc/c105887/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c105887', + }, + { + title: '综合政务 - 其他', + source: ['www.csrc.gov.cn/csrc/c101799/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101799', + }, + { + title: '综合政务 - 全国人大建议和政协提案复文公开', + source: ['www.csrc.gov.cn/csrc/c101800/zfxxgk_zdgk.shtml'], + target: '/csrc/zfxxgk_zdgk/c101800', + }, + ], +}; From 67a09c1adc5d181c0c7fcab808c6065b293e8faa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 02:43:46 -0700 Subject: [PATCH 037/740] chore(deps): bump tldts from 6.1.48 to 6.1.49 (#16986) * chore(deps): bump tldts from 6.1.48 to 6.1.49 Bumps [tldts](https://github.com/remusao/tldts) from 6.1.48 to 6.1.49. - [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.48...v6.1.49) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 36 ++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 5fc517f7f4c7ea7..d70bdd55050801f 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "telegram": "2.25.11", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.48", + "tldts": "6.1.49", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3b8feffd157fa5e..7d236da3e8b5ca8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,8 +228,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.48 - version: 6.1.48 + specifier: 6.1.49 + version: 6.1.49 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -2377,8 +2377,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001664: - resolution: {integrity: sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==} + caniuse-lite@1.0.30001666: + resolution: {integrity: sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -2832,8 +2832,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.30: - resolution: {integrity: sha512-sXI35EBN4lYxzc/pIGorlymYNzDBOqkSlVRe6MkgBsW/hW1tpC/HDJ2fjG7XnjakzfLEuvdmux0Mjs6jHq4UOA==} + electron-to-chromium@1.5.31: + resolution: {integrity: sha512-QcDoBbQeYt0+3CWcK/rEbuHvwpbT/8SV9T3OSgs6cX1FlcUAkgrkqbg9zLnDrMM/rLamzQwal4LYFCiWk861Tg==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -5333,11 +5333,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.48: - resolution: {integrity: sha512-3gD9iKn/n2UuFH1uilBviK9gvTNT6iYwdqrj1Vr5mh8FuelvpRNaYVH4pNYqUgOGU4aAdL9X35eLuuj0gRsx+A==} + tldts-core@6.1.49: + resolution: {integrity: sha512-ctRO/wzBasOCxAStJG/60Qe8/QpGmaVPsE8djdk0vioxN4uCOgKoveH71Qc2EOmVMIjVf0BjigI5p9ZDuLOygg==} - tldts@6.1.48: - resolution: {integrity: sha512-SPbnh1zaSzi/OsmHb1vrPNnYuwJbdWjwo5TbBYYMlTtH3/1DSb41t8bcSxkwDmmbG2q6VLPVvQc7Yf23T+1EEw==} + tldts@6.1.49: + resolution: {integrity: sha512-E5se9HuCyfwWvmc0JiXiocOw+Cm4tlJCKewdB5RKMH8MmtiTsQCc+yu5BBYB5ZN4lNbz8Xg65bqJ1odS9+RhIA==} hasBin: true tmp@0.0.33: @@ -7936,8 +7936,8 @@ snapshots: browserslist@4.24.0: dependencies: - caniuse-lite: 1.0.30001664 - electron-to-chromium: 1.5.30 + caniuse-lite: 1.0.30001666 + electron-to-chromium: 1.5.31 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) @@ -8011,7 +8011,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001664: {} + caniuse-lite@1.0.30001666: {} caseless@0.12.0: {} @@ -8478,7 +8478,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.30: {} + electron-to-chromium@1.5.31: {} ellipsize@0.1.0: {} @@ -11363,11 +11363,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.48: {} + tldts-core@6.1.49: {} - tldts@6.1.48: + tldts@6.1.49: dependencies: - tldts-core: 6.1.48 + tldts-core: 6.1.49 tmp@0.0.33: dependencies: @@ -11405,7 +11405,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.48 + tldts: 6.1.49 tr46@0.0.3: {} From 155116d617b848ac79030a88c530b518b7a14f82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 04:43:13 -0700 Subject: [PATCH 038/740] chore(deps-dev): bump globals from 15.9.0 to 15.10.0 (#16985) * chore(deps-dev): bump globals from 15.9.0 to 15.10.0 Bumps [globals](https://github.com/sindresorhus/globals) from 15.9.0 to 15.10.0. - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v15.9.0...v15.10.0) --- updated-dependencies: - dependency-name: globals dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 3 +-- pnpm-lock.yaml | 17 +++++++---------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index d70bdd55050801f..79c4cab2569ec4e 100644 --- a/package.json +++ b/package.json @@ -162,7 +162,6 @@ "@types/supertest": "6.0.2", "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", - "@types/tough-cookie": "4.0.5", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.8.0", "@typescript-eslint/parser": "8.8.0", @@ -177,7 +176,7 @@ "eslint-plugin-unicorn": "55.0.0", "eslint-plugin-yml": "1.14.0", "fs-extra": "11.2.0", - "globals": "15.9.0", + "globals": "15.10.0", "got": "14.4.2", "husky": "9.1.6", "js-beautify": "1.15.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7d236da3e8b5ca8..9a1bd531b60c706 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -339,9 +339,6 @@ importers: '@types/title': specifier: 3.4.3 version: 3.4.3 - '@types/tough-cookie': - specifier: 4.0.5 - version: 4.0.5 '@types/uuid': specifier: 10.0.0 version: 10.0.0 @@ -385,8 +382,8 @@ importers: specifier: 11.2.0 version: 11.2.0 globals: - specifier: 15.9.0 - version: 15.9.0 + specifier: 15.10.0 + version: 15.10.0 got: specifier: 14.4.2 version: 14.4.2 @@ -3381,8 +3378,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.9.0: - resolution: {integrity: sha512-SmSKyLLKFbSr6rptvP8izbyxJL4ILwqO9Jg23UA0sDlGlu58V59D1//I3vlc0KJphVdUR7vMjHIplYnzBxorQA==} + globals@15.10.0: + resolution: {integrity: sha512-tqFIbz83w4Y5TCbtgjZjApohbuh7K9BxGYFm7ifwDR240tvdb7P9x+/9VvUKlmkPoiknoJtanI8UOrqxS3a7lQ==} engines: {node: '>=18'} globrex@0.1.2: @@ -8673,7 +8670,7 @@ snapshots: eslint: 9.11.1 eslint-plugin-es-x: 7.8.0(eslint@9.11.1) get-tsconfig: 4.8.1 - globals: 15.9.0 + globals: 15.10.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 @@ -8697,7 +8694,7 @@ snapshots: core-js-compat: 3.38.1 eslint: 9.11.1 esquery: 1.6.0 - globals: 15.9.0 + globals: 15.10.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 jsesc: 3.0.2 @@ -9192,7 +9189,7 @@ snapshots: globals@14.0.0: {} - globals@15.9.0: {} + globals@15.10.0: {} globrex@0.1.2: {} From 0a4dc198d9a92f7023bcf8b947e57b9d769218b4 Mon Sep 17 00:00:00 2001 From: ueiu <39592269+ueiu@users.noreply.github.com> Date: Thu, 3 Oct 2024 07:42:11 +0800 Subject: [PATCH 039/740] =?UTF-8?q?fix(route):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E4=B8=AD=E5=9B=BD=E8=AF=81=E5=88=B8=E7=9B=91=E7=9D=A3=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=A7=94=E5=91=98=E4=BC=9A=E8=AF=A6=E6=83=85=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E9=93=BE=E6=8E=A5=E5=88=B0=E6=AD=A3=E7=A1=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=20(#16988)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/gov/csrc/csrc.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/gov/csrc/csrc.ts b/lib/routes/gov/csrc/csrc.ts index 5149c2015abaf31..c1911aab71ddb10 100644 --- a/lib/routes/gov/csrc/csrc.ts +++ b/lib/routes/gov/csrc/csrc.ts @@ -46,7 +46,7 @@ export const handler = async (ctx) => { title, description, pubDate: parseDate(item.publishedTime), - link: new URL(`csrc/${item.channelCodeName}/c${item.manuscriptId}/content.shtml`, rootUrl).href, + link: item.url, category: [item.channelName], content: { html: description, From 3114a8836bfe62ec29b3eda858071247ae16d238 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 04:49:08 -0700 Subject: [PATCH 040/740] chore(deps-dev): bump @babel/preset-env from 7.25.4 to 7.25.7 (#16993) * chore(deps-dev): bump @babel/preset-env from 7.25.4 to 7.25.7 Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.25.4 to 7.25.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.25.7/packages/babel-preset-env) --- updated-dependencies: - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 1553 ++++++++++++++++++++++++------------------------ 2 files changed, 774 insertions(+), 781 deletions(-) diff --git a/package.json b/package.json index 79c4cab2569ec4e..9ec8a43a2ecbf80 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@babel/preset-env": "7.25.4", + "@babel/preset-env": "7.25.7", "@babel/preset-typescript": "7.24.7", "@eslint/eslintrc": "3.1.0", "@eslint/js": "9.11.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9a1bd531b60c706..6ccf8627048f837 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -259,11 +259,11 @@ importers: version: 3.23.8 devDependencies: '@babel/preset-env': - specifier: 7.25.4 - version: 7.25.4(@babel/core@7.25.2) + specifier: 7.25.7 + version: 7.25.7(@babel/core@7.25.7) '@babel/preset-typescript': specifier: 7.24.7 - version: 7.24.7(@babel/core@7.25.2) + version: 7.24.7(@babel/core@7.25.7) '@eslint/eslintrc': specifier: 3.1.0 version: 3.1.0 @@ -441,42 +441,42 @@ packages: '@babel/code-frame@7.0.0': resolution: {integrity: sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==} - '@babel/code-frame@7.24.7': - resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + '@babel/code-frame@7.25.7': + resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.25.4': - resolution: {integrity: sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==} + '@babel/compat-data@7.25.7': + resolution: {integrity: sha512-9ickoLz+hcXCeh7jrcin+/SLWm+GkxE2kTvoYyp38p4WkdFXfQJxDFGWp/YHjiKLPx06z2A7W8XKuqbReXDzsw==} engines: {node: '>=6.9.0'} - '@babel/core@7.25.2': - resolution: {integrity: sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==} + '@babel/core@7.25.7': + resolution: {integrity: sha512-yJ474Zv3cwiSOO9nXJuqzvwEeM+chDuQ8GJirw+pZ91sCGCyOZ3dJkVE09fTV0VEVzXyLWhh3G/AolYTPX7Mow==} engines: {node: '>=6.9.0'} - '@babel/generator@7.25.6': - resolution: {integrity: sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==} + '@babel/generator@7.25.7': + resolution: {integrity: sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==} engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.24.7': - resolution: {integrity: sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==} + '@babel/helper-annotate-as-pure@7.25.7': + resolution: {integrity: sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==} engines: {node: '>=6.9.0'} - '@babel/helper-builder-binary-assignment-operator-visitor@7.24.7': - resolution: {integrity: sha512-xZeCVVdwb4MsDBkkyZ64tReWYrLRHlMN72vP7Bdm3OUOuyFZExhsHUUnuWnm2/XOlAJzR0LfPpB56WXZn0X/lA==} + '@babel/helper-builder-binary-assignment-operator-visitor@7.25.7': + resolution: {integrity: sha512-12xfNeKNH7jubQNm7PAkzlLwEmCs1tfuX3UjIw6vP6QXi+leKh6+LyC/+Ed4EIQermwd58wsyh070yjDHFlNGg==} engines: {node: '>=6.9.0'} - '@babel/helper-compilation-targets@7.25.2': - resolution: {integrity: sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==} + '@babel/helper-compilation-targets@7.25.7': + resolution: {integrity: sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==} engines: {node: '>=6.9.0'} - '@babel/helper-create-class-features-plugin@7.25.4': - resolution: {integrity: sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ==} + '@babel/helper-create-class-features-plugin@7.25.7': + resolution: {integrity: sha512-bD4WQhbkx80mAyj/WCm4ZHcF4rDxkoLFO6ph8/5/mQ3z4vAzltQXAmbc7GvVJx5H+lk5Mi5EmbTeox5nMGCsbw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-create-regexp-features-plugin@7.25.2': - resolution: {integrity: sha512-+wqVGP+DFmqwFD3EH6TMTfUNeqDehV3E/dl+Sd54eaXqm17tEUNbEIn4sVivVowbvUpOtIGxdo3GoXyDH9N/9g==} + '@babel/helper-create-regexp-features-plugin@7.25.7': + resolution: {integrity: sha512-byHhumTj/X47wJ6C6eLpK7wW/WBEcnUeb7D0FNc/jFQnQVw7DOso3Zz5u9x/zLrFVkHa89ZGDbkAa1D54NdrCQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -486,103 +486,103 @@ packages: peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - '@babel/helper-member-expression-to-functions@7.24.8': - resolution: {integrity: sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==} + '@babel/helper-member-expression-to-functions@7.25.7': + resolution: {integrity: sha512-O31Ssjd5K6lPbTX9AAYpSKrZmLeagt9uwschJd+Ixo6QiRyfpvgtVQp8qrDR9UNFjZ8+DO34ZkdrN+BnPXemeA==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.24.7': - resolution: {integrity: sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==} + '@babel/helper-module-imports@7.25.7': + resolution: {integrity: sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.25.2': - resolution: {integrity: sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==} + '@babel/helper-module-transforms@7.25.7': + resolution: {integrity: sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-optimise-call-expression@7.24.7': - resolution: {integrity: sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==} + '@babel/helper-optimise-call-expression@7.25.7': + resolution: {integrity: sha512-VAwcwuYhv/AT+Vfr28c9y6SHzTan1ryqrydSTFGjU0uDJHw3uZ+PduI8plCLkRsDnqK2DMEDmwrOQRsK/Ykjng==} engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.24.8': - resolution: {integrity: sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==} + '@babel/helper-plugin-utils@7.25.7': + resolution: {integrity: sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==} engines: {node: '>=6.9.0'} - '@babel/helper-remap-async-to-generator@7.25.0': - resolution: {integrity: sha512-NhavI2eWEIz/H9dbrG0TuOicDhNexze43i5z7lEqwYm0WEZVTwnPpA0EafUTP7+6/W79HWIP2cTe3Z5NiSTVpw==} + '@babel/helper-remap-async-to-generator@7.25.7': + resolution: {integrity: sha512-kRGE89hLnPfcz6fTrlNU+uhgcwv0mBE4Gv3P9Ke9kLVJYpi4AMVVEElXvB5CabrPZW4nCM8P8UyyjrzCM0O2sw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-replace-supers@7.25.0': - resolution: {integrity: sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==} + '@babel/helper-replace-supers@7.25.7': + resolution: {integrity: sha512-iy8JhqlUW9PtZkd4pHM96v6BdJ66Ba9yWSE4z0W4TvSZwLBPkyDsiIU3ENe4SmrzRBs76F7rQXTy1lYC49n6Lw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-simple-access@7.24.7': - resolution: {integrity: sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==} + '@babel/helper-simple-access@7.25.7': + resolution: {integrity: sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==} engines: {node: '>=6.9.0'} - '@babel/helper-skip-transparent-expression-wrappers@7.24.7': - resolution: {integrity: sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==} + '@babel/helper-skip-transparent-expression-wrappers@7.25.7': + resolution: {integrity: sha512-pPbNbchZBkPMD50K0p3JGcFMNLVUCuU/ABybm/PGNj4JiHrpmNyqqCphBk4i19xXtNV0JhldQJJtbSW5aUvbyA==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.24.8': - resolution: {integrity: sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==} + '@babel/helper-string-parser@7.25.7': + resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.7': - resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + '@babel/helper-validator-identifier@7.25.7': + resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.24.8': - resolution: {integrity: sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==} + '@babel/helper-validator-option@7.25.7': + resolution: {integrity: sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==} engines: {node: '>=6.9.0'} - '@babel/helper-wrap-function@7.25.0': - resolution: {integrity: sha512-s6Q1ebqutSiZnEjaofc/UKDyC4SbzV5n5SrA2Gq8UawLycr3i04f1dX4OzoQVnexm6aOCh37SQNYlJ/8Ku+PMQ==} + '@babel/helper-wrap-function@7.25.7': + resolution: {integrity: sha512-MA0roW3JF2bD1ptAaJnvcabsVlNQShUaThyJbCDD4bCp8NEgiFvpoqRI2YS22hHlc2thjO/fTg2ShLMC3jygAg==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.25.6': - resolution: {integrity: sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==} + '@babel/helpers@7.25.7': + resolution: {integrity: sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.24.7': - resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + '@babel/highlight@7.25.7': + resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.25.6': - resolution: {integrity: sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==} + '@babel/parser@7.25.7': + resolution: {integrity: sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.3': - resolution: {integrity: sha512-wUrcsxZg6rqBXG05HG1FPYgsP6EvwF4WpBbxIpWIIYnH8wG0gzx3yZY3dtEHas4sTAOGkbTsc9EGPxwff8lRoA==} + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.7': + resolution: {integrity: sha512-UV9Lg53zyebzD1DwQoT9mzkEKa922LNUp5YkTJ6Uta0RbyXaQNUgcvSt7qIu1PpPzVb6rd10OVNTzkyBGeVmxQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.0': - resolution: {integrity: sha512-Bm4bH2qsX880b/3ziJ8KD711LT7z4u8CFudmjqle65AZj/HNUFhEf90dqYv6O86buWvSBmeQDjv0Tn2aF/bIBA==} + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.7': + resolution: {integrity: sha512-GDDWeVLNxRIkQTnJn2pDOM1pkCgYdSqPeT1a9vh9yIqu2uzzgw1zcqEb+IJOhy+dTBMlNdThrDIksr2o09qrrQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.0': - resolution: {integrity: sha512-lXwdNZtTmeVOOFtwM/WDe7yg1PL8sYhRk/XH0FzbR2HDQ0xC+EnQ/JHeoMYSavtU115tnUk0q9CDyq8si+LMAA==} + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.7': + resolution: {integrity: sha512-wxyWg2RYaSUYgmd9MR0FyRGyeOMQE/Uzr1wzd/g5cf5bwi9A4v6HFdDm7y1MgDtod/fLOSTZY6jDgV0xU9d5bA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.7': - resolution: {integrity: sha512-+izXIbke1T33mY4MSNnrqhPXDz01WYhEf3yF5NbnUtkiNnm+XBZJl3kNfoK6NKmYlz/D07+l2GWVK/QfDkNCuQ==} + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.7': + resolution: {integrity: sha512-Xwg6tZpLxc4iQjorYsyGMyfJE7nP5MV8t/Ka58BgiA7Jw0fRqQNcANlLfdJ/yvBt9z9LD2We+BEkT7vLqZRWng==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.13.0 - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.0': - resolution: {integrity: sha512-tggFrk1AIShG/RUQbEwt2Tr/E+ObkfwrPjR6BjbRvsx24+PSjK8zrq0GWPNCjo8qpRx4DuJzlcvWJqlm+0h3kw==} + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.7': + resolution: {integrity: sha512-UVATLMidXrnH+GMUIuxq55nejlj02HP7F5ETyBONzP6G87fPBogG4CH6kxrSrdIuAjdwNO9VzyaYsrZPscWUrw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -619,14 +619,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-assertions@7.25.6': - resolution: {integrity: sha512-aABl0jHw9bZ2karQ/uUD6XP4u0SG22SJrOHFoL6XB1R7dTovOP4TzTlsxOYC5yQ1pdscVK2JTUnF6QL3ARoAiQ==} + '@babel/plugin-syntax-import-assertions@7.25.7': + resolution: {integrity: sha512-ZvZQRmME0zfJnDQnVBKYzHxXT7lYBB3Revz1GuS7oLXWMgqUPX4G+DDbT30ICClht9WKV34QVrZhSw6WdklwZQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-attributes@7.25.6': - resolution: {integrity: sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ==} + '@babel/plugin-syntax-import-attributes@7.25.7': + resolution: {integrity: sha512-AqVo+dguCgmpi/3mYBdu9lkngOBlQ2w2vnNpa6gfiCxQZLzV4ZbhsXitJ2Yblkoe1VQwtHSaNmIaGll/26YWRw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -641,8 +641,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-jsx@7.24.7': - resolution: {integrity: sha512-6ddciUPe/mpMnOKv/U+RSd2vvVy+Yw/JfBB0ZHYjEZt9NLHmCUylNYlsbqCCS1Bffjlb0fCwC9Vqz+sBz6PsiQ==} + '@babel/plugin-syntax-jsx@7.25.7': + resolution: {integrity: sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -689,8 +689,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-typescript@7.25.4': - resolution: {integrity: sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg==} + '@babel/plugin-syntax-typescript@7.25.7': + resolution: {integrity: sha512-rR+5FDjpCHqqZN2bzZm18bVYGaejGq5ZkpVCJLXor/+zlSrSoc4KWcHI0URVWjl/68Dyr1uwZUz/1njycEAv9g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -701,308 +701,308 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-arrow-functions@7.24.7': - resolution: {integrity: sha512-Dt9LQs6iEY++gXUwY03DNFat5C2NbO48jj+j/bSAz6b3HgPs39qcPiYt77fDObIcFwj3/C2ICX9YMwGflUoSHQ==} + '@babel/plugin-transform-arrow-functions@7.25.7': + resolution: {integrity: sha512-EJN2mKxDwfOUCPxMO6MUI58RN3ganiRAG/MS/S3HfB6QFNjroAMelQo/gybyYq97WerCBAZoyrAoW8Tzdq2jWg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-generator-functions@7.25.4': - resolution: {integrity: sha512-jz8cV2XDDTqjKPwVPJBIjORVEmSGYhdRa8e5k5+vN+uwcjSrSxUaebBRa4ko1jqNF2uxyg8G6XYk30Jv285xzg==} + '@babel/plugin-transform-async-generator-functions@7.25.7': + resolution: {integrity: sha512-4B6OhTrwYKHYYgcwErvZjbmH9X5TxQBsaBHdzEIB4l71gR5jh/tuHGlb9in47udL2+wVUcOz5XXhhfhVJwEpEg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-to-generator@7.24.7': - resolution: {integrity: sha512-SQY01PcJfmQ+4Ash7NE+rpbLFbmqA2GPIgqzxfFTL4t1FKRq4zTms/7htKpoCUI9OcFYgzqfmCdH53s6/jn5fA==} + '@babel/plugin-transform-async-to-generator@7.25.7': + resolution: {integrity: sha512-ZUCjAavsh5CESCmi/xCpX1qcCaAglzs/7tmuvoFnJgA1dM7gQplsguljoTg+Ru8WENpX89cQyAtWoaE0I3X3Pg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoped-functions@7.24.7': - resolution: {integrity: sha512-yO7RAz6EsVQDaBH18IDJcMB1HnrUn2FJ/Jslc/WtPPWcjhpUJXU/rjbwmluzp7v/ZzWcEhTMXELnnsz8djWDwQ==} + '@babel/plugin-transform-block-scoped-functions@7.25.7': + resolution: {integrity: sha512-xHttvIM9fvqW+0a3tZlYcZYSBpSWzGBFIt/sYG3tcdSzBB8ZeVgz2gBP7Df+sM0N1850jrviYSSeUuc+135dmQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoping@7.25.0': - resolution: {integrity: sha512-yBQjYoOjXlFv9nlXb3f1casSHOZkWr29NX+zChVanLg5Nc157CrbEX9D7hxxtTpuFy7Q0YzmmWfJxzvps4kXrQ==} + '@babel/plugin-transform-block-scoping@7.25.7': + resolution: {integrity: sha512-ZEPJSkVZaeTFG/m2PARwLZQ+OG0vFIhPlKHK/JdIMy8DbRJ/htz6LRrTFtdzxi9EHmcwbNPAKDnadpNSIW+Aow==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-properties@7.25.4': - resolution: {integrity: sha512-nZeZHyCWPfjkdU5pA/uHiTaDAFUEqkpzf1YoQT2NeSynCGYq9rxfyI3XpQbfx/a0hSnFH6TGlEXvae5Vi7GD8g==} + '@babel/plugin-transform-class-properties@7.25.7': + resolution: {integrity: sha512-mhyfEW4gufjIqYFo9krXHJ3ElbFLIze5IDp+wQTxoPd+mwFb1NxatNAwmv8Q8Iuxv7Zc+q8EkiMQwc9IhyGf4g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-static-block@7.24.7': - resolution: {integrity: sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ==} + '@babel/plugin-transform-class-static-block@7.25.7': + resolution: {integrity: sha512-rvUUtoVlkDWtDWxGAiiQj0aNktTPn3eFynBcMC2IhsXweehwgdI9ODe+XjWw515kEmv22sSOTp/rxIRuTiB7zg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 - '@babel/plugin-transform-classes@7.25.4': - resolution: {integrity: sha512-oexUfaQle2pF/b6E0dwsxQtAol9TLSO88kQvym6HHBWFliV2lGdrPieX+WgMRLSJDVzdYywk7jXbLPuO2KLTLg==} + '@babel/plugin-transform-classes@7.25.7': + resolution: {integrity: sha512-9j9rnl+YCQY0IGoeipXvnk3niWicIB6kCsWRGLwX241qSXpbA4MKxtp/EdvFxsc4zI5vqfLxzOd0twIJ7I99zg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-computed-properties@7.24.7': - resolution: {integrity: sha512-25cS7v+707Gu6Ds2oY6tCkUwsJ9YIDbggd9+cu9jzzDgiNq7hR/8dkzxWfKWnTic26vsI3EsCXNd4iEB6e8esQ==} + '@babel/plugin-transform-computed-properties@7.25.7': + resolution: {integrity: sha512-QIv+imtM+EtNxg/XBKL3hiWjgdLjMOmZ+XzQwSgmBfKbfxUjBzGgVPklUuE55eq5/uVoh8gg3dqlrwR/jw3ZeA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-destructuring@7.24.8': - resolution: {integrity: sha512-36e87mfY8TnRxc7yc6M9g9gOB7rKgSahqkIKwLpz4Ppk2+zC2Cy1is0uwtuSG6AE4zlTOUa+7JGz9jCJGLqQFQ==} + '@babel/plugin-transform-destructuring@7.25.7': + resolution: {integrity: sha512-xKcfLTlJYUczdaM1+epcdh1UGewJqr9zATgrNHcLBcV2QmfvPPEixo/sK/syql9cEmbr7ulu5HMFG5vbbt/sEA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-dotall-regex@7.24.7': - resolution: {integrity: sha512-ZOA3W+1RRTSWvyqcMJDLqbchh7U4NRGqwRfFSVbOLS/ePIP4vHB5e8T8eXcuqyN1QkgKyj5wuW0lcS85v4CrSw==} + '@babel/plugin-transform-dotall-regex@7.25.7': + resolution: {integrity: sha512-kXzXMMRzAtJdDEgQBLF4oaiT6ZCU3oWHgpARnTKDAqPkDJ+bs3NrZb310YYevR5QlRo3Kn7dzzIdHbZm1VzJdQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-duplicate-keys@7.24.7': - resolution: {integrity: sha512-JdYfXyCRihAe46jUIliuL2/s0x0wObgwwiGxw/UbgJBr20gQBThrokO4nYKgWkD7uBaqM7+9x5TU7NkExZJyzw==} + '@babel/plugin-transform-duplicate-keys@7.25.7': + resolution: {integrity: sha512-by+v2CjoL3aMnWDOyCIg+yxU9KXSRa9tN6MbqggH5xvymmr9p4AMjYkNlQy4brMceBnUyHZ9G8RnpvT8wP7Cfg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.0': - resolution: {integrity: sha512-YLpb4LlYSc3sCUa35un84poXoraOiQucUTTu8X1j18JV+gNa8E0nyUf/CjZ171IRGr4jEguF+vzJU66QZhn29g==} + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.7': + resolution: {integrity: sha512-HvS6JF66xSS5rNKXLqkk7L9c/jZ/cdIVIcoPVrnl8IsVpLggTjXs8OWekbLHs/VtYDDh5WXnQyeE3PPUGm22MA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-dynamic-import@7.24.7': - resolution: {integrity: sha512-sc3X26PhZQDb3JhORmakcbvkeInvxz+A8oda99lj7J60QRuPZvNAk9wQlTBS1ZynelDrDmTU4pw1tyc5d5ZMUg==} + '@babel/plugin-transform-dynamic-import@7.25.7': + resolution: {integrity: sha512-UvcLuual4h7/GfylKm2IAA3aph9rwvAM2XBA0uPKU3lca+Maai4jBjjEVUS568ld6kJcgbouuumCBhMd/Yz17w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-exponentiation-operator@7.24.7': - resolution: {integrity: sha512-Rqe/vSc9OYgDajNIK35u7ot+KeCoetqQYFXM4Epf7M7ez3lWlOjrDjrwMei6caCVhfdw+mIKD4cgdGNy5JQotQ==} + '@babel/plugin-transform-exponentiation-operator@7.25.7': + resolution: {integrity: sha512-yjqtpstPfZ0h/y40fAXRv2snciYr0OAoMXY/0ClC7tm4C/nG5NJKmIItlaYlLbIVAWNfrYuy9dq1bE0SbX0PEg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-export-namespace-from@7.24.7': - resolution: {integrity: sha512-v0K9uNYsPL3oXZ/7F9NNIbAj2jv1whUEtyA6aujhekLs56R++JDQuzRcP2/z4WX5Vg/c5lE9uWZA0/iUoFhLTA==} + '@babel/plugin-transform-export-namespace-from@7.25.7': + resolution: {integrity: sha512-h3MDAP5l34NQkkNulsTNyjdaR+OiB0Im67VU//sFupouP8Q6m9Spy7l66DcaAQxtmCqGdanPByLsnwFttxKISQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-for-of@7.24.7': - resolution: {integrity: sha512-wo9ogrDG1ITTTBsy46oGiN1dS9A7MROBTcYsfS8DtsImMkHk9JXJ3EWQM6X2SUw4x80uGPlwj0o00Uoc6nEE3g==} + '@babel/plugin-transform-for-of@7.25.7': + resolution: {integrity: sha512-n/TaiBGJxYFWvpJDfsxSj9lEEE44BFM1EPGz4KEiTipTgkoFVVcCmzAL3qA7fdQU96dpo4gGf5HBx/KnDvqiHw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-function-name@7.25.1': - resolution: {integrity: sha512-TVVJVdW9RKMNgJJlLtHsKDTydjZAbwIsn6ySBPQaEAUU5+gVvlJt/9nRmqVbsV/IBanRjzWoaAQKLoamWVOUuA==} + '@babel/plugin-transform-function-name@7.25.7': + resolution: {integrity: sha512-5MCTNcjCMxQ63Tdu9rxyN6cAWurqfrDZ76qvVPrGYdBxIj+EawuuxTu/+dgJlhK5eRz3v1gLwp6XwS8XaX2NiQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-json-strings@7.24.7': - resolution: {integrity: sha512-2yFnBGDvRuxAaE/f0vfBKvtnvvqU8tGpMHqMNpTN2oWMKIR3NqFkjaAgGwawhqK/pIN2T3XdjGPdaG0vDhOBGw==} + '@babel/plugin-transform-json-strings@7.25.7': + resolution: {integrity: sha512-Ot43PrL9TEAiCe8C/2erAjXMeVSnE/BLEx6eyrKLNFCCw5jvhTHKyHxdI1pA0kz5njZRYAnMO2KObGqOCRDYSA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-literals@7.25.2': - resolution: {integrity: sha512-HQI+HcTbm9ur3Z2DkO+jgESMAMcYLuN/A7NRw9juzxAezN9AvqvUTnpKP/9kkYANz6u7dFlAyOu44ejuGySlfw==} + '@babel/plugin-transform-literals@7.25.7': + resolution: {integrity: sha512-fwzkLrSu2fESR/cm4t6vqd7ebNIopz2QHGtjoU+dswQo/P6lwAG04Q98lliE3jkz/XqnbGFLnUcE0q0CVUf92w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-logical-assignment-operators@7.24.7': - resolution: {integrity: sha512-4D2tpwlQ1odXmTEIFWy9ELJcZHqrStlzK/dAOWYyxX3zT0iXQB6banjgeOJQXzEc4S0E0a5A+hahxPaEFYftsw==} + '@babel/plugin-transform-logical-assignment-operators@7.25.7': + resolution: {integrity: sha512-iImzbA55BjiovLyG2bggWS+V+OLkaBorNvc/yJoeeDQGztknRnDdYfp2d/UPmunZYEnZi6Lg8QcTmNMHOB0lGA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-member-expression-literals@7.24.7': - resolution: {integrity: sha512-T/hRC1uqrzXMKLQ6UCwMT85S3EvqaBXDGf0FaMf4446Qx9vKwlghvee0+uuZcDUCZU5RuNi4781UQ7R308zzBw==} + '@babel/plugin-transform-member-expression-literals@7.25.7': + resolution: {integrity: sha512-Std3kXwpXfRV0QtQy5JJcRpkqP8/wG4XL7hSKZmGlxPlDqmpXtEPRmhF7ztnlTCtUN3eXRUJp+sBEZjaIBVYaw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-amd@7.24.7': - resolution: {integrity: sha512-9+pB1qxV3vs/8Hdmz/CulFB8w2tuu6EB94JZFsjdqxQokwGa9Unap7Bo2gGBGIvPmDIVvQrom7r5m/TCDMURhg==} + '@babel/plugin-transform-modules-amd@7.25.7': + resolution: {integrity: sha512-CgselSGCGzjQvKzghCvDTxKHP3iooenLpJDO842ehn5D2G5fJB222ptnDwQho0WjEvg7zyoxb9P+wiYxiJX5yA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-commonjs@7.24.8': - resolution: {integrity: sha512-WHsk9H8XxRs3JXKWFiqtQebdh9b/pTk4EgueygFzYlTKAg0Ud985mSevdNjdXdFBATSKVJGQXP1tv6aGbssLKA==} + '@babel/plugin-transform-modules-commonjs@7.25.7': + resolution: {integrity: sha512-L9Gcahi0kKFYXvweO6n0wc3ZG1ChpSFdgG+eV1WYZ3/dGbJK7vvk91FgGgak8YwRgrCuihF8tE/Xg07EkL5COg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-systemjs@7.25.0': - resolution: {integrity: sha512-YPJfjQPDXxyQWg/0+jHKj1llnY5f/R6a0p/vP4lPymxLu7Lvl4k2WMitqi08yxwQcCVUUdG9LCUj4TNEgAp3Jw==} + '@babel/plugin-transform-modules-systemjs@7.25.7': + resolution: {integrity: sha512-t9jZIvBmOXJsiuyOwhrIGs8dVcD6jDyg2icw1VL4A/g+FnWyJKwUfSSU2nwJuMV2Zqui856El9u+ElB+j9fV1g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-umd@7.24.7': - resolution: {integrity: sha512-3aytQvqJ/h9z4g8AsKPLvD4Zqi2qT+L3j7XoFFu1XBlZWEl2/1kWnhmAbxpLgPrHSY0M6UA02jyTiwUVtiKR6A==} + '@babel/plugin-transform-modules-umd@7.25.7': + resolution: {integrity: sha512-p88Jg6QqsaPh+EB7I9GJrIqi1Zt4ZBHUQtjw3z1bzEXcLh6GfPqzZJ6G+G1HBGKUNukT58MnKG7EN7zXQBCODw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-named-capturing-groups-regex@7.24.7': - resolution: {integrity: sha512-/jr7h/EWeJtk1U/uz2jlsCioHkZk1JJZVcc8oQsJ1dUlaJD83f4/6Zeh2aHt9BIFokHIsSeDfhUmju0+1GPd6g==} + '@babel/plugin-transform-named-capturing-groups-regex@7.25.7': + resolution: {integrity: sha512-BtAT9LzCISKG3Dsdw5uso4oV1+v2NlVXIIomKJgQybotJY3OwCwJmkongjHgwGKoZXd0qG5UZ12JUlDQ07W6Ow==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-new-target@7.24.7': - resolution: {integrity: sha512-RNKwfRIXg4Ls/8mMTza5oPF5RkOW8Wy/WgMAp1/F1yZ8mMbtwXW+HDoJiOsagWrAhI5f57Vncrmr9XeT4CVapA==} + '@babel/plugin-transform-new-target@7.25.7': + resolution: {integrity: sha512-CfCS2jDsbcZaVYxRFo2qtavW8SpdzmBXC2LOI4oO0rP+JSRDxxF3inF4GcPsLgfb5FjkhXG5/yR/lxuRs2pySA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-nullish-coalescing-operator@7.24.7': - resolution: {integrity: sha512-Ts7xQVk1OEocqzm8rHMXHlxvsfZ0cEF2yomUqpKENHWMF4zKk175Y4q8H5knJes6PgYad50uuRmt3UJuhBw8pQ==} + '@babel/plugin-transform-nullish-coalescing-operator@7.25.7': + resolution: {integrity: sha512-FbuJ63/4LEL32mIxrxwYaqjJxpbzxPVQj5a+Ebrc8JICV6YX8nE53jY+K0RZT3um56GoNWgkS2BQ/uLGTjtwfw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-numeric-separator@7.24.7': - resolution: {integrity: sha512-e6q1TiVUzvH9KRvicuxdBTUj4AdKSRwzIyFFnfnezpCfP2/7Qmbb8qbU2j7GODbl4JMkblitCQjKYUaX/qkkwA==} + '@babel/plugin-transform-numeric-separator@7.25.7': + resolution: {integrity: sha512-8CbutzSSh4hmD+jJHIA8vdTNk15kAzOnFLVVgBSMGr28rt85ouT01/rezMecks9pkU939wDInImwCKv4ahU4IA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-rest-spread@7.24.7': - resolution: {integrity: sha512-4QrHAr0aXQCEFni2q4DqKLD31n2DL+RxcwnNjDFkSG0eNQ/xCavnRkfCUjsyqGC2OviNJvZOF/mQqZBw7i2C5Q==} + '@babel/plugin-transform-object-rest-spread@7.25.7': + resolution: {integrity: sha512-1JdVKPhD7Y5PvgfFy0Mv2brdrolzpzSoUq2pr6xsR+m+3viGGeHEokFKsCgOkbeFOQxfB1Vt2F0cPJLRpFI4Zg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-super@7.24.7': - resolution: {integrity: sha512-A/vVLwN6lBrMFmMDmPPz0jnE6ZGx7Jq7d6sT/Ev4H65RER6pZ+kczlf1DthF5N0qaPHBsI7UXiE8Zy66nmAovg==} + '@babel/plugin-transform-object-super@7.25.7': + resolution: {integrity: sha512-pWT6UXCEW3u1t2tcAGtE15ornCBvopHj9Bps9D2DsH15APgNVOTwwczGckX+WkAvBmuoYKRCFa4DK+jM8vh5AA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-catch-binding@7.24.7': - resolution: {integrity: sha512-uLEndKqP5BfBbC/5jTwPxLh9kqPWWgzN/f8w6UwAIirAEqiIVJWWY312X72Eub09g5KF9+Zn7+hT7sDxmhRuKA==} + '@babel/plugin-transform-optional-catch-binding@7.25.7': + resolution: {integrity: sha512-m9obYBA39mDPN7lJzD5WkGGb0GO54PPLXsbcnj1Hyeu8mSRz7Gb4b1A6zxNX32ZuUySDK4G6it8SDFWD1nCnqg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-chaining@7.24.8': - resolution: {integrity: sha512-5cTOLSMs9eypEy8JUVvIKOu6NgvbJMnpG62VpIHrTmROdQ+L5mDAaI40g25k5vXti55JWNX5jCkq3HZxXBQANw==} + '@babel/plugin-transform-optional-chaining@7.25.7': + resolution: {integrity: sha512-h39agClImgPWg4H8mYVAbD1qP9vClFbEjqoJmt87Zen8pjqK8FTPUwrOXAvqu5soytwxrLMd2fx2KSCp2CHcNg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-parameters@7.24.7': - resolution: {integrity: sha512-yGWW5Rr+sQOhK0Ot8hjDJuxU3XLRQGflvT4lhlSY0DFvdb3TwKaY26CJzHtYllU0vT9j58hc37ndFPsqT1SrzA==} + '@babel/plugin-transform-parameters@7.25.7': + resolution: {integrity: sha512-FYiTvku63me9+1Nz7TOx4YMtW3tWXzfANZtrzHhUZrz4d47EEtMQhzFoZWESfXuAMMT5mwzD4+y1N8ONAX6lMQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-methods@7.25.4': - resolution: {integrity: sha512-ao8BG7E2b/URaUQGqN3Tlsg+M3KlHY6rJ1O1gXAEUnZoyNQnvKyH87Kfg+FoxSeyWUB8ISZZsC91C44ZuBFytw==} + '@babel/plugin-transform-private-methods@7.25.7': + resolution: {integrity: sha512-KY0hh2FluNxMLwOCHbxVOKfdB5sjWG4M183885FmaqWWiGMhRZq4DQRKH6mHdEucbJnyDyYiZNwNG424RymJjA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-property-in-object@7.24.7': - resolution: {integrity: sha512-9z76mxwnwFxMyxZWEgdgECQglF2Q7cFLm0kMf8pGwt+GSJsY0cONKj/UuO4bOH0w/uAel3ekS4ra5CEAyJRmDA==} + '@babel/plugin-transform-private-property-in-object@7.25.7': + resolution: {integrity: sha512-LzA5ESzBy7tqj00Yjey9yWfs3FKy4EmJyKOSWld144OxkTji81WWnUT8nkLUn+imN/zHL8ZQlOu/MTUAhHaX3g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-property-literals@7.24.7': - resolution: {integrity: sha512-EMi4MLQSHfd2nrCqQEWxFdha2gBCqU4ZcCng4WBGZ5CJL4bBRW0ptdqqDdeirGZcpALazVVNJqRmsO8/+oNCBA==} + '@babel/plugin-transform-property-literals@7.25.7': + resolution: {integrity: sha512-lQEeetGKfFi0wHbt8ClQrUSUMfEeI3MMm74Z73T9/kuz990yYVtfofjf3NuA42Jy3auFOpbjDyCSiIkTs1VIYw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-regenerator@7.24.7': - resolution: {integrity: sha512-lq3fvXPdimDrlg6LWBoqj+r/DEWgONuwjuOuQCSYgRroXDH/IdM1C0IZf59fL5cHLpjEH/O6opIRBbqv7ELnuA==} + '@babel/plugin-transform-regenerator@7.25.7': + resolution: {integrity: sha512-mgDoQCRjrY3XK95UuV60tZlFCQGXEtMg8H+IsW72ldw1ih1jZhzYXbJvghmAEpg5UVhhnCeia1CkGttUvCkiMQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-reserved-words@7.24.7': - resolution: {integrity: sha512-0DUq0pHcPKbjFZCfTss/pGkYMfy3vFWydkUBd9r0GHpIyfs2eCDENvqadMycRS9wZCXR41wucAfJHJmwA0UmoQ==} + '@babel/plugin-transform-reserved-words@7.25.7': + resolution: {integrity: sha512-3OfyfRRqiGeOvIWSagcwUTVk2hXBsr/ww7bLn6TRTuXnexA+Udov2icFOxFX9abaj4l96ooYkcNN1qi2Zvqwng==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-shorthand-properties@7.24.7': - resolution: {integrity: sha512-KsDsevZMDsigzbA09+vacnLpmPH4aWjcZjXdyFKGzpplxhbeB4wYtury3vglQkg6KM/xEPKt73eCjPPf1PgXBA==} + '@babel/plugin-transform-shorthand-properties@7.25.7': + resolution: {integrity: sha512-uBbxNwimHi5Bv3hUccmOFlUy3ATO6WagTApenHz9KzoIdn0XeACdB12ZJ4cjhuB2WSi80Ez2FWzJnarccriJeA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-spread@7.24.7': - resolution: {integrity: sha512-x96oO0I09dgMDxJaANcRyD4ellXFLLiWhuwDxKZX5g2rWP1bTPkBSwCYv96VDXVT1bD9aPj8tppr5ITIh8hBng==} + '@babel/plugin-transform-spread@7.25.7': + resolution: {integrity: sha512-Mm6aeymI0PBh44xNIv/qvo8nmbkpZze1KvR8MkEqbIREDxoiWTi18Zr2jryfRMwDfVZF9foKh060fWgni44luw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-sticky-regex@7.24.7': - resolution: {integrity: sha512-kHPSIJc9v24zEml5geKg9Mjx5ULpfncj0wRpYtxbvKyTtHCYDkVE3aHQ03FrpEo4gEe2vrJJS1Y9CJTaThA52g==} + '@babel/plugin-transform-sticky-regex@7.25.7': + resolution: {integrity: sha512-ZFAeNkpGuLnAQ/NCsXJ6xik7Id+tHuS+NT+ue/2+rn/31zcdnupCdmunOizEaP0JsUmTFSTOPoQY7PkK2pttXw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-template-literals@7.24.7': - resolution: {integrity: sha512-AfDTQmClklHCOLxtGoP7HkeMw56k1/bTQjwsfhL6pppo/M4TOBSq+jjBUBLmV/4oeFg4GWMavIl44ZeCtmmZTw==} + '@babel/plugin-transform-template-literals@7.25.7': + resolution: {integrity: sha512-SI274k0nUsFFmyQupiO7+wKATAmMFf8iFgq2O+vVFXZ0SV9lNfT1NGzBEhjquFmD8I9sqHLguH+gZVN3vww2AA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typeof-symbol@7.24.8': - resolution: {integrity: sha512-adNTUpDCVnmAE58VEqKlAA6ZBlNkMnWD0ZcW76lyNFN3MJniyGFZfNwERVk8Ap56MCnXztmDr19T4mPTztcuaw==} + '@babel/plugin-transform-typeof-symbol@7.25.7': + resolution: {integrity: sha512-OmWmQtTHnO8RSUbL0NTdtpbZHeNTnm68Gj5pA4Y2blFNh+V4iZR68V1qL9cI37J21ZN7AaCnkfdHtLExQPf2uA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typescript@7.25.2': - resolution: {integrity: sha512-lBwRvjSmqiMYe/pS0+1gggjJleUJi7NzjvQ1Fkqtt69hBa/0t1YuW/MLQMAPixfwaQOHUXsd6jeU3Z+vdGv3+A==} + '@babel/plugin-transform-typescript@7.25.7': + resolution: {integrity: sha512-VKlgy2vBzj8AmEzunocMun2fF06bsSWV+FvVXohtL6FGve/+L217qhHxRTVGHEDO/YR8IANcjzgJsd04J8ge5Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-escapes@7.24.7': - resolution: {integrity: sha512-U3ap1gm5+4edc2Q/P+9VrBNhGkfnf+8ZqppY71Bo/pzZmXhhLdqgaUl6cuB07O1+AQJtCLfaOmswiNbSQ9ivhw==} + '@babel/plugin-transform-unicode-escapes@7.25.7': + resolution: {integrity: sha512-BN87D7KpbdiABA+t3HbVqHzKWUDN3dymLaTnPFAMyc8lV+KN3+YzNhVRNdinaCPA4AUqx7ubXbQ9shRjYBl3SQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-property-regex@7.24.7': - resolution: {integrity: sha512-uH2O4OV5M9FZYQrwc7NdVmMxQJOCCzFeYudlZSzUAHRFeOujQefa92E74TQDVskNHCzOXoigEuoyzHDhaEaK5w==} + '@babel/plugin-transform-unicode-property-regex@7.25.7': + resolution: {integrity: sha512-IWfR89zcEPQGB/iB408uGtSPlQd3Jpq11Im86vUgcmSTcoWAiQMCTOa2K2yNNqFJEBVICKhayctee65Ka8OB0w==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-regex@7.24.7': - resolution: {integrity: sha512-hlQ96MBZSAXUq7ltkjtu3FJCCSMx/j629ns3hA3pXnBXjanNP0LHi+JpPeA81zaWgVK1VGH95Xuy7u0RyQ8kMg==} + '@babel/plugin-transform-unicode-regex@7.25.7': + resolution: {integrity: sha512-8JKfg/hiuA3qXnlLx8qtv5HWRbgyFx2hMMtpDDuU2rTckpKkGu4ycK5yYHwuEa16/quXfoxHBIApEsNyMWnt0g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-sets-regex@7.25.4': - resolution: {integrity: sha512-qesBxiWkgN1Q+31xUE9RcMk79eOXXDCv6tfyGMRSs4RGlioSg2WVyQAm07k726cSE56pa+Kb0y9epX2qaXzTvA==} + '@babel/plugin-transform-unicode-sets-regex@7.25.7': + resolution: {integrity: sha512-YRW8o9vzImwmh4Q3Rffd09bH5/hvY0pxg+1H1i0f7APoUeg12G7+HhLj9ZFNIrYkgBXhIijPJ+IXypN0hLTIbw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/preset-env@7.25.4': - resolution: {integrity: sha512-W9Gyo+KmcxjGahtt3t9fb14vFRWvPpu5pT6GBlovAK6BTBcxgjfVMSQCfJl4oi35ODrxP6xx2Wr8LNST57Mraw==} + '@babel/preset-env@7.25.7': + resolution: {integrity: sha512-Gibz4OUdyNqqLj+7OAvBZxOD7CklCtMA5/j0JgUEwOnaRULsPDXmic2iKxL2DX2vQduPR5wH2hjZas/Vr/Oc0g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1018,27 +1018,24 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/regjsgen@0.8.0': - resolution: {integrity: sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==} - - '@babel/runtime-corejs2@7.25.6': - resolution: {integrity: sha512-24uCmOJPrsnS7HtRamCibYabHRV0bscPJNFFcyKgj7FqUA0V5XcbZUmz9PVNDW4L+euMsZtCIetU1LxTmUaIlA==} + '@babel/runtime-corejs2@7.25.7': + resolution: {integrity: sha512-xdsLBlDCJIZzwH1fBJ7GJu+bRFO0Sqv10WotmwMu83Joep1erPcWbTr84rZD42kPzSjtmrFgshdWHKfQTWOsng==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.25.6': - resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==} + '@babel/runtime@7.25.7': + resolution: {integrity: sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==} engines: {node: '>=6.9.0'} - '@babel/template@7.25.0': - resolution: {integrity: sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==} + '@babel/template@7.25.7': + resolution: {integrity: sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.25.6': - resolution: {integrity: sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==} + '@babel/traverse@7.25.7': + resolution: {integrity: sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.6': - resolution: {integrity: sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==} + '@babel/types@7.25.7': + resolution: {integrity: sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==} engines: {node: '>=6.9.0'} '@bcoe/v8-coverage@0.2.3': @@ -1674,83 +1671,83 @@ packages: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} engines: {node: '>= 8.0.0'} - '@rollup/rollup-android-arm-eabi@4.23.0': - resolution: {integrity: sha512-8OR+Ok3SGEMsAZispLx8jruuXw0HVF16k+ub2eNXKHDmdxL4cf9NlNpAzhlOhNyXzKDEJuFeq0nZm+XlNb1IFw==} + '@rollup/rollup-android-arm-eabi@4.24.0': + resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.23.0': - resolution: {integrity: sha512-rEFtX1nP8gqmLmPZsXRMoLVNB5JBwOzIAk/XAcEPuKrPa2nPJ+DuGGpfQUR0XjRm8KjHfTZLpWbKXkA5BoFL3w==} + '@rollup/rollup-android-arm64@4.24.0': + resolution: {integrity: sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.23.0': - resolution: {integrity: sha512-ZbqlMkJRMMPeapfaU4drYHns7Q5MIxjM/QeOO62qQZGPh9XWziap+NF9fsqPHT0KzEL6HaPspC7sOwpgyA3J9g==} + '@rollup/rollup-darwin-arm64@4.24.0': + resolution: {integrity: sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.23.0': - resolution: {integrity: sha512-PfmgQp78xx5rBCgn2oYPQ1rQTtOaQCna0kRaBlc5w7RlA3TDGGo7m3XaptgitUZ54US9915i7KeVPHoy3/W8tA==} + '@rollup/rollup-darwin-x64@4.24.0': + resolution: {integrity: sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.23.0': - resolution: {integrity: sha512-WAeZfAAPus56eQgBioezXRRzArAjWJGjNo/M+BHZygUcs9EePIuGI1Wfc6U/Ki+tMW17FFGvhCfYnfcKPh18SA==} + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + resolution: {integrity: sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.23.0': - resolution: {integrity: sha512-v7PGcp1O5XKZxKX8phTXtmJDVpE20Ub1eF6w9iMmI3qrrPak6yR9/5eeq7ziLMrMTjppkkskXyxnmm00HdtXjA==} + '@rollup/rollup-linux-arm-musleabihf@4.24.0': + resolution: {integrity: sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.23.0': - resolution: {integrity: sha512-nAbWsDZ9UkU6xQiXEyXBNHAKbzSAi95H3gTStJq9UGiS1v+YVXwRHcQOQEF/3CHuhX5BVhShKoeOf6Q/1M+Zhg==} + '@rollup/rollup-linux-arm64-gnu@4.24.0': + resolution: {integrity: sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.23.0': - resolution: {integrity: sha512-5QT/Di5FbGNPaVw8hHO1wETunwkPuZBIu6W+5GNArlKHD9fkMHy7vS8zGHJk38oObXfWdsuLMogD4sBySLJ54g==} + '@rollup/rollup-linux-arm64-musl@4.24.0': + resolution: {integrity: sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.23.0': - resolution: {integrity: sha512-Sefl6vPyn5axzCsO13r1sHLcmPuiSOrKIImnq34CBurntcJ+lkQgAaTt/9JkgGmaZJ+OkaHmAJl4Bfd0DmdtOQ==} + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + resolution: {integrity: sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.23.0': - resolution: {integrity: sha512-o4QI2KU/QbP7ZExMse6ULotdV3oJUYMrdx3rBZCgUF3ur3gJPfe8Fuasn6tia16c5kZBBw0aTmaUygad6VB/hQ==} + '@rollup/rollup-linux-riscv64-gnu@4.24.0': + resolution: {integrity: sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.23.0': - resolution: {integrity: sha512-+bxqx+V/D4FGrpXzPGKp/SEZIZ8cIW3K7wOtcJAoCrmXvzRtmdUhYNbgd+RztLzfDEfA2WtKj5F4tcbNPuqgeg==} + '@rollup/rollup-linux-s390x-gnu@4.24.0': + resolution: {integrity: sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.23.0': - resolution: {integrity: sha512-I/eXsdVoCKtSgK9OwyQKPAfricWKUMNCwJKtatRYMmDo5N859tbO3UsBw5kT3dU1n6ZcM1JDzPRSGhAUkxfLxw==} + '@rollup/rollup-linux-x64-gnu@4.24.0': + resolution: {integrity: sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.23.0': - resolution: {integrity: sha512-4ZoDZy5ShLbbe1KPSafbFh1vbl0asTVfkABC7eWqIs01+66ncM82YJxV2VtV3YVJTqq2P8HMx3DCoRSWB/N3rw==} + '@rollup/rollup-linux-x64-musl@4.24.0': + resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.23.0': - resolution: {integrity: sha512-+5Ky8dhft4STaOEbZu3/NU4QIyYssKO+r1cD3FzuusA0vO5gso15on7qGzKdNXnc1gOrsgCqZjRw1w+zL4y4hQ==} + '@rollup/rollup-win32-arm64-msvc@4.24.0': + resolution: {integrity: sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.23.0': - resolution: {integrity: sha512-0SPJk4cPZQhq9qA1UhIRumSE3+JJIBBjtlGl5PNC///BoaByckNZd53rOYD0glpTkYFBQSt7AkMeLVPfx65+BQ==} + '@rollup/rollup-win32-ia32-msvc@4.24.0': + resolution: {integrity: sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.23.0': - resolution: {integrity: sha512-lqCK5GQC8fNo0+JvTSxcG7YB1UKYp8yrNLhsArlvPWN+16ovSZgoehlVHg6X0sSWPUkpjRBR5TuR12ZugowZ4g==} + '@rollup/rollup-win32-x64-msvc@4.24.0': + resolution: {integrity: sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==} cpu: [x64] os: [win32] @@ -2058,8 +2055,8 @@ packages: '@vitest/pretty-format@2.0.5': resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==} - '@vitest/pretty-format@2.1.1': - resolution: {integrity: sha512-SjxPFOtuINDUW8/UkElJYQSFtnWX7tMksSGW0vfjxMneFqxVr8YJ979QpMbDW7g+BIiq88RAGDjf7en6rvLPPQ==} + '@vitest/pretty-format@2.1.2': + resolution: {integrity: sha512-FIoglbHrSUlOJPDGIrh2bjX1sNars5HbxlcsFKCtKzu4+5lpsRhOCVcuzp0fEhAGHkPZRIXVNzPcpSlkoZ3LuA==} '@vitest/runner@2.0.5': resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==} @@ -3816,11 +3813,6 @@ packages: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true - jsesc@2.5.2: - resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} - engines: {node: '>=4'} - hasBin: true - jsesc@3.0.2: resolution: {integrity: sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==} engines: {node: '>=6'} @@ -4847,16 +4839,19 @@ packages: resolution: {integrity: sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==} hasBin: true - regexpu-core@5.3.2: - resolution: {integrity: sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==} + regexpu-core@6.1.1: + resolution: {integrity: sha512-k67Nb9jvwJcJmVpw0jPttR1/zVfnKf8Km0IPatrU/zJ5XeG3+Slx0xLXs9HByJSzXzrlz5EDvN6yLNMDc2qdnw==} engines: {node: '>=4'} + regjsgen@0.8.0: + resolution: {integrity: sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==} + regjsparser@0.10.0: resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} hasBin: true - regjsparser@0.9.1: - resolution: {integrity: sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==} + regjsparser@0.11.0: + resolution: {integrity: sha512-vTbzVAjQDzwQdKuvj7qEq6OlAprCjE656khuGQ4QaBLg7abQ9I9ISpmLuc6inWe7zP75AECjqUa4g4sdQvOXhg==} hasBin: true relateurl@0.2.7: @@ -4940,8 +4935,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup@4.23.0: - resolution: {integrity: sha512-vXB4IT9/KLDrS2WRXmY22sVB2wTsTwkpxjB8Q3mnakTENcYw3FRmfdYDy/acNmls+lHmDazgrRjK/yQ6hQAtwA==} + rollup@4.24.0: + resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -5882,27 +5877,27 @@ snapshots: '@babel/code-frame@7.0.0': dependencies: - '@babel/highlight': 7.24.7 + '@babel/highlight': 7.25.7 - '@babel/code-frame@7.24.7': + '@babel/code-frame@7.25.7': dependencies: - '@babel/highlight': 7.24.7 + '@babel/highlight': 7.25.7 picocolors: 1.1.0 - '@babel/compat-data@7.25.4': {} + '@babel/compat-data@7.25.7': {} - '@babel/core@7.25.2': + '@babel/core@7.25.7': dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.6 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helpers': 7.25.6 - '@babel/parser': 7.25.6 - '@babel/template': 7.25.0 - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/code-frame': 7.25.7 + '@babel/generator': 7.25.7 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) + '@babel/helpers': 7.25.7 + '@babel/parser': 7.25.7 + '@babel/template': 7.25.7 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 convert-source-map: 2.0.0 debug: 4.3.7 gensync: 1.0.0-beta.2 @@ -5911,775 +5906,773 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.25.6': + '@babel/generator@7.25.7': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.7 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - jsesc: 2.5.2 + jsesc: 3.0.2 - '@babel/helper-annotate-as-pure@7.24.7': + '@babel/helper-annotate-as-pure@7.25.7': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.7 - '@babel/helper-builder-binary-assignment-operator-visitor@7.24.7': + '@babel/helper-builder-binary-assignment-operator-visitor@7.25.7': dependencies: - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helper-compilation-targets@7.25.2': + '@babel/helper-compilation-targets@7.25.7': dependencies: - '@babel/compat-data': 7.25.4 - '@babel/helper-validator-option': 7.24.8 + '@babel/compat-data': 7.25.7 + '@babel/helper-validator-option': 7.25.7 browserslist: 4.24.0 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.25.4(@babel/core@7.25.2)': + '@babel/helper-create-class-features-plugin@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-member-expression-to-functions': 7.24.8 - '@babel/helper-optimise-call-expression': 7.24.7 - '@babel/helper-replace-supers': 7.25.0(@babel/core@7.25.2) - '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - '@babel/traverse': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-member-expression-to-functions': 7.25.7 + '@babel/helper-optimise-call-expression': 7.25.7 + '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.7) + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/traverse': 7.25.7 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/helper-create-regexp-features-plugin@7.25.2(@babel/core@7.25.2)': + '@babel/helper-create-regexp-features-plugin@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - regexpu-core: 5.3.2 + '@babel/core': 7.25.7 + '@babel/helper-annotate-as-pure': 7.25.7 + regexpu-core: 6.1.1 semver: 6.3.1 - '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.2)': + '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 debug: 4.3.7 lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: - supports-color - '@babel/helper-member-expression-to-functions@7.24.8': + '@babel/helper-member-expression-to-functions@7.25.7': dependencies: - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helper-module-imports@7.24.7': + '@babel/helper-module-imports@7.25.7': dependencies: - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.25.2(@babel/core@7.25.2)': + '@babel/helper-module-transforms@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.24.7 - '@babel/helper-simple-access': 7.24.7 - '@babel/helper-validator-identifier': 7.24.7 - '@babel/traverse': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-module-imports': 7.25.7 + '@babel/helper-simple-access': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helper-optimise-call-expression@7.24.7': + '@babel/helper-optimise-call-expression@7.25.7': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.7 - '@babel/helper-plugin-utils@7.24.8': {} + '@babel/helper-plugin-utils@7.25.7': {} - '@babel/helper-remap-async-to-generator@7.25.0(@babel/core@7.25.2)': + '@babel/helper-remap-async-to-generator@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-wrap-function': 7.25.0 - '@babel/traverse': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-wrap-function': 7.25.7 + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.25.0(@babel/core@7.25.2)': + '@babel/helper-replace-supers@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-member-expression-to-functions': 7.24.8 - '@babel/helper-optimise-call-expression': 7.24.7 - '@babel/traverse': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-member-expression-to-functions': 7.25.7 + '@babel/helper-optimise-call-expression': 7.25.7 + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helper-simple-access@7.24.7': + '@babel/helper-simple-access@7.25.7': dependencies: - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helper-skip-transparent-expression-wrappers@7.24.7': + '@babel/helper-skip-transparent-expression-wrappers@7.25.7': dependencies: - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helper-string-parser@7.24.8': {} + '@babel/helper-string-parser@7.25.7': {} - '@babel/helper-validator-identifier@7.24.7': {} + '@babel/helper-validator-identifier@7.25.7': {} - '@babel/helper-validator-option@7.24.8': {} + '@babel/helper-validator-option@7.25.7': {} - '@babel/helper-wrap-function@7.25.0': + '@babel/helper-wrap-function@7.25.7': dependencies: - '@babel/template': 7.25.0 - '@babel/traverse': 7.25.6 - '@babel/types': 7.25.6 + '@babel/template': 7.25.7 + '@babel/traverse': 7.25.7 + '@babel/types': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helpers@7.25.6': + '@babel/helpers@7.25.7': dependencies: - '@babel/template': 7.25.0 - '@babel/types': 7.25.6 + '@babel/template': 7.25.7 + '@babel/types': 7.25.7 - '@babel/highlight@7.24.7': + '@babel/highlight@7.25.7': dependencies: - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-validator-identifier': 7.25.7 chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.1.0 - '@babel/parser@7.25.6': + '@babel/parser@7.25.7': dependencies: - '@babel/types': 7.25.6 + '@babel/types': 7.25.7 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.3(@babel/core@7.25.2)': + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/traverse': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.0(@babel/core@7.25.2)': + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.0(@babel/core@7.25.2)': + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - '@babel/plugin-transform-optional-chaining': 7.24.8(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/plugin-transform-optional-chaining': 7.25.7(@babel/core@7.25.7) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.0(@babel/core@7.25.2)': + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/traverse': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.2)': + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 + '@babel/core': 7.25.7 - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.25.2)': + '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.2)': + '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.25.2)': + '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.25.2)': + '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.25.2)': + '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-import-assertions@7.25.6(@babel/core@7.25.2)': + '@babel/plugin-syntax-import-assertions@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-import-attributes@7.25.6(@babel/core@7.25.2)': + '@babel/plugin-syntax-import-attributes@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.2)': + '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.25.2)': + '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-jsx@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.25.2)': + '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.25.2)': + '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.25.2)': + '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.25.2)': + '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.25.2)': + '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.25.2)': + '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.25.2)': + '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.25.2)': + '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-typescript@7.25.4(@babel/core@7.25.2)': + '@babel/plugin-syntax-typescript@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.2)': + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-arrow-functions@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-arrow-functions@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-async-generator-functions@7.25.4(@babel/core@7.25.2)': + '@babel/plugin-transform-async-generator-functions@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-remap-async-to-generator': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) - '@babel/traverse': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.7) + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-async-to-generator@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-async-to-generator@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-imports': 7.24.7 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-remap-async-to-generator': 7.25.0(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-module-imports': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.7) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-block-scoped-functions@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-block-scoped-functions@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-block-scoping@7.25.0(@babel/core@7.25.2)': + '@babel/plugin-transform-block-scoping@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-class-properties@7.25.4(@babel/core@7.25.2)': + '@babel/plugin-transform-class-properties@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-class-features-plugin': 7.25.4(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-static-block@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-class-static-block@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-class-features-plugin': 7.25.4(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.7) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-classes@7.25.4(@babel/core@7.25.2)': + '@babel/plugin-transform-classes@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-replace-supers': 7.25.0(@babel/core@7.25.2) - '@babel/traverse': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.7) + '@babel/traverse': 7.25.7 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-computed-properties@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-computed-properties@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/template': 7.25.0 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/template': 7.25.7 - '@babel/plugin-transform-destructuring@7.24.8(@babel/core@7.25.2)': + '@babel/plugin-transform-destructuring@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-dotall-regex@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-dotall-regex@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-duplicate-keys@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-duplicate-keys@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.0(@babel/core@7.25.2)': + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-dynamic-import@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-dynamic-import@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-transform-exponentiation-operator@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-exponentiation-operator@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.24.7 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-builder-binary-assignment-operator-visitor': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-export-namespace-from@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-export-namespace-from@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-transform-for-of@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-for-of@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-function-name@7.25.1(@babel/core@7.25.2)': + '@babel/plugin-transform-function-name@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/traverse': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-json-strings@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-json-strings@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-transform-literals@7.25.2(@babel/core@7.25.2)': + '@babel/plugin-transform-literals@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-logical-assignment-operators@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-logical-assignment-operators@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.7) - '@babel/plugin-transform-member-expression-literals@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-member-expression-literals@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-modules-amd@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-modules-amd@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.24.8(@babel/core@7.25.2)': + '@babel/plugin-transform-modules-commonjs@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-simple-access': 7.24.7 + '@babel/core': 7.25.7 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-simple-access': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-systemjs@7.25.0(@babel/core@7.25.2)': + '@babel/plugin-transform-modules-systemjs@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-validator-identifier': 7.24.7 - '@babel/traverse': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 + '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-umd@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-modules-umd@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-module-transforms': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-named-capturing-groups-regex@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-named-capturing-groups-regex@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-new-target@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-new-target@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-nullish-coalescing-operator@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-nullish-coalescing-operator@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-transform-numeric-separator@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-numeric-separator@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.7) - '@babel/plugin-transform-object-rest-spread@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-object-rest-spread@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.7) + '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-object-super@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-object-super@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-replace-supers': 7.25.0(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.7) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-optional-catch-binding@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-optional-catch-binding@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-transform-optional-chaining@7.24.8(@babel/core@7.25.2)': + '@babel/plugin-transform-optional-chaining@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.7) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-parameters@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-parameters@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-private-methods@7.25.4(@babel/core@7.25.2)': + '@babel/plugin-transform-private-methods@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-class-features-plugin': 7.25.4(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-property-in-object@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-private-property-in-object@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-create-class-features-plugin': 7.25.4(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.7) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-property-literals@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-property-literals@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-regenerator@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-regenerator@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 regenerator-transform: 0.15.2 - '@babel/plugin-transform-reserved-words@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-reserved-words@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-shorthand-properties@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-shorthand-properties@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-spread@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-spread@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-sticky-regex@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-sticky-regex@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-template-literals@7.24.7(@babel/core@7.25.2)': + '@babel/plugin-transform-template-literals@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-typeof-symbol@7.24.8(@babel/core@7.25.2)': + '@babel/plugin-transform-typeof-symbol@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-typescript@7.25.2(@babel/core@7.25.2)': + '@babel/plugin-transform-typescript@7.25.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-annotate-as-pure': 7.24.7 - '@babel/helper-create-class-features-plugin': 7.25.4(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-skip-transparent-expression-wrappers': 7.24.7 - '@babel/plugin-syntax-typescript': 7.25.4(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/plugin-syntax-typescript': 7.25.7(@babel/core@7.25.7) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-unicode-escapes@7.24.7(@babel/core@7.25.2)': - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - - '@babel/plugin-transform-unicode-property-regex@7.24.7(@babel/core@7.25.2)': - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - - '@babel/plugin-transform-unicode-regex@7.24.7(@babel/core@7.25.2)': - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - - '@babel/plugin-transform-unicode-sets-regex@7.25.4(@babel/core@7.25.2)': - dependencies: - '@babel/core': 7.25.2 - '@babel/helper-create-regexp-features-plugin': 7.25.2(@babel/core@7.25.2) - '@babel/helper-plugin-utils': 7.24.8 - - '@babel/preset-env@7.25.4(@babel/core@7.25.2)': - dependencies: - '@babel/compat-data': 7.25.4 - '@babel/core': 7.25.2 - '@babel/helper-compilation-targets': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-validator-option': 7.24.8 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.3(@babel/core@7.25.2) - '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.2) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.2) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.2) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.2) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-import-assertions': 7.25.6(@babel/core@7.25.2) - '@babel/plugin-syntax-import-attributes': 7.25.6(@babel/core@7.25.2) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.2) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.2) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.2) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.2) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.2) - '@babel/plugin-transform-arrow-functions': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-async-generator-functions': 7.25.4(@babel/core@7.25.2) - '@babel/plugin-transform-async-to-generator': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-block-scoped-functions': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-block-scoping': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-transform-class-properties': 7.25.4(@babel/core@7.25.2) - '@babel/plugin-transform-class-static-block': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-classes': 7.25.4(@babel/core@7.25.2) - '@babel/plugin-transform-computed-properties': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-destructuring': 7.24.8(@babel/core@7.25.2) - '@babel/plugin-transform-dotall-regex': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-duplicate-keys': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-transform-dynamic-import': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-exponentiation-operator': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-export-namespace-from': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-for-of': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-function-name': 7.25.1(@babel/core@7.25.2) - '@babel/plugin-transform-json-strings': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-literals': 7.25.2(@babel/core@7.25.2) - '@babel/plugin-transform-logical-assignment-operators': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-member-expression-literals': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-modules-amd': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.25.2) - '@babel/plugin-transform-modules-systemjs': 7.25.0(@babel/core@7.25.2) - '@babel/plugin-transform-modules-umd': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-named-capturing-groups-regex': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-new-target': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-nullish-coalescing-operator': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-numeric-separator': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-object-rest-spread': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-object-super': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-optional-catch-binding': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-optional-chaining': 7.24.8(@babel/core@7.25.2) - '@babel/plugin-transform-parameters': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-private-methods': 7.25.4(@babel/core@7.25.2) - '@babel/plugin-transform-private-property-in-object': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-property-literals': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-regenerator': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-reserved-words': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-shorthand-properties': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-spread': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-sticky-regex': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-template-literals': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-typeof-symbol': 7.24.8(@babel/core@7.25.2) - '@babel/plugin-transform-unicode-escapes': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-unicode-property-regex': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-unicode-regex': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-unicode-sets-regex': 7.25.4(@babel/core@7.25.2) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.25.2) - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.2) - babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.2) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.2) + '@babel/plugin-transform-unicode-escapes@7.25.7(@babel/core@7.25.7)': + dependencies: + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-unicode-property-regex@7.25.7(@babel/core@7.25.7)': + dependencies: + '@babel/core': 7.25.7 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-unicode-regex@7.25.7(@babel/core@7.25.7)': + dependencies: + '@babel/core': 7.25.7 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/plugin-transform-unicode-sets-regex@7.25.7(@babel/core@7.25.7)': + dependencies: + '@babel/core': 7.25.7 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-plugin-utils': 7.25.7 + + '@babel/preset-env@7.25.7(@babel/core@7.25.7)': + dependencies: + '@babel/compat-data': 7.25.7 + '@babel/core': 7.25.7 + '@babel/helper-compilation-targets': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-validator-option': 7.25.7 + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.7) + '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.7) + '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.7) + '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.7) + '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.7) + '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.7) + '@babel/plugin-syntax-import-assertions': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-syntax-import-attributes': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.7) + '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.7) + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.7) + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.7) + '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.7) + '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.7) + '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.7) + '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.7) + '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.7) + '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.7) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.7) + '@babel/plugin-transform-arrow-functions': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-async-generator-functions': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-async-to-generator': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-block-scoped-functions': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-block-scoping': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-class-properties': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-class-static-block': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-classes': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-computed-properties': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-destructuring': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-dotall-regex': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-duplicate-keys': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-dynamic-import': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-exponentiation-operator': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-export-namespace-from': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-for-of': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-function-name': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-json-strings': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-literals': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-logical-assignment-operators': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-member-expression-literals': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-modules-amd': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-modules-systemjs': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-modules-umd': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-new-target': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-nullish-coalescing-operator': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-numeric-separator': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-object-rest-spread': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-object-super': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-optional-catch-binding': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-optional-chaining': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-private-methods': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-private-property-in-object': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-property-literals': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-regenerator': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-reserved-words': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-shorthand-properties': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-spread': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-sticky-regex': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-template-literals': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-typeof-symbol': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-unicode-escapes': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-unicode-property-regex': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-unicode-regex': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-unicode-sets-regex': 7.25.7(@babel/core@7.25.7) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.25.7) + babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.7) + babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.7) + babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.7) core-js-compat: 3.38.1 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.25.2)': + '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/types': 7.25.6 + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/types': 7.25.7 esutils: 2.0.3 - '@babel/preset-typescript@7.24.7(@babel/core@7.25.2)': + '@babel/preset-typescript@7.24.7(@babel/core@7.25.7)': dependencies: - '@babel/core': 7.25.2 - '@babel/helper-plugin-utils': 7.24.8 - '@babel/helper-validator-option': 7.24.8 - '@babel/plugin-syntax-jsx': 7.24.7(@babel/core@7.25.2) - '@babel/plugin-transform-modules-commonjs': 7.24.8(@babel/core@7.25.2) - '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-plugin-utils': 7.25.7 + '@babel/helper-validator-option': 7.25.7 + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-typescript': 7.25.7(@babel/core@7.25.7) transitivePeerDependencies: - supports-color - '@babel/regjsgen@0.8.0': {} - - '@babel/runtime-corejs2@7.25.6': + '@babel/runtime-corejs2@7.25.7': dependencies: core-js: 2.6.12 regenerator-runtime: 0.14.1 - '@babel/runtime@7.25.6': + '@babel/runtime@7.25.7': dependencies: regenerator-runtime: 0.14.1 - '@babel/template@7.25.0': + '@babel/template@7.25.7': dependencies: - '@babel/code-frame': 7.24.7 - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 + '@babel/code-frame': 7.25.7 + '@babel/parser': 7.25.7 + '@babel/types': 7.25.7 - '@babel/traverse@7.25.6': + '@babel/traverse@7.25.7': dependencies: - '@babel/code-frame': 7.24.7 - '@babel/generator': 7.25.6 - '@babel/parser': 7.25.6 - '@babel/template': 7.25.0 - '@babel/types': 7.25.6 + '@babel/code-frame': 7.25.7 + '@babel/generator': 7.25.7 + '@babel/parser': 7.25.7 + '@babel/template': 7.25.7 + '@babel/types': 7.25.7 debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.25.6': + '@babel/types@7.25.7': dependencies: - '@babel/helper-string-parser': 7.24.8 - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-string-parser': 7.25.7 + '@babel/helper-validator-identifier': 7.25.7 to-fast-properties: 2.0.0 '@bcoe/v8-coverage@0.2.3': {} @@ -7179,7 +7172,7 @@ snapshots: '@postlight/parser@2.2.3': dependencies: - '@babel/runtime-corejs2': 7.25.6 + '@babel/runtime-corejs2': 7.25.7 '@postlight/ci-failed-test-reporter': 1.0.26 cheerio: 0.22.0 difflib: https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed @@ -7254,52 +7247,52 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/rollup-android-arm-eabi@4.23.0': + '@rollup/rollup-android-arm-eabi@4.24.0': optional: true - '@rollup/rollup-android-arm64@4.23.0': + '@rollup/rollup-android-arm64@4.24.0': optional: true - '@rollup/rollup-darwin-arm64@4.23.0': + '@rollup/rollup-darwin-arm64@4.24.0': optional: true - '@rollup/rollup-darwin-x64@4.23.0': + '@rollup/rollup-darwin-x64@4.24.0': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.23.0': + '@rollup/rollup-linux-arm-gnueabihf@4.24.0': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.23.0': + '@rollup/rollup-linux-arm-musleabihf@4.24.0': optional: true - '@rollup/rollup-linux-arm64-gnu@4.23.0': + '@rollup/rollup-linux-arm64-gnu@4.24.0': optional: true - '@rollup/rollup-linux-arm64-musl@4.23.0': + '@rollup/rollup-linux-arm64-musl@4.24.0': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.23.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.23.0': + '@rollup/rollup-linux-riscv64-gnu@4.24.0': optional: true - '@rollup/rollup-linux-s390x-gnu@4.23.0': + '@rollup/rollup-linux-s390x-gnu@4.24.0': optional: true - '@rollup/rollup-linux-x64-gnu@4.23.0': + '@rollup/rollup-linux-x64-gnu@4.24.0': optional: true - '@rollup/rollup-linux-x64-musl@4.23.0': + '@rollup/rollup-linux-x64-musl@4.24.0': optional: true - '@rollup/rollup-win32-arm64-msvc@4.23.0': + '@rollup/rollup-win32-arm64-msvc@4.24.0': optional: true - '@rollup/rollup-win32-ia32-msvc@4.23.0': + '@rollup/rollup-win32-ia32-msvc@4.24.0': optional: true - '@rollup/rollup-win32-x64-msvc@4.23.0': + '@rollup/rollup-win32-x64-msvc@4.24.0': optional: true '@rss3/api-core@0.0.19': @@ -7679,7 +7672,7 @@ snapshots: dependencies: tinyrainbow: 1.2.0 - '@vitest/pretty-format@2.1.1': + '@vitest/pretty-format@2.1.2': dependencies: tinyrainbow: 1.2.0 @@ -7832,27 +7825,27 @@ snapshots: b4a@1.6.7: {} - babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.2): + babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.7): dependencies: - '@babel/compat-data': 7.25.4 - '@babel/core': 7.25.2 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.2) + '@babel/compat-data': 7.25.7 + '@babel/core': 7.25.7 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.7) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.2): + babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.7): dependencies: - '@babel/core': 7.25.2 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.7) core-js-compat: 3.38.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.2): + babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.7): dependencies: - '@babel/core': 7.25.2 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.2) + '@babel/core': 7.25.7 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.7) transitivePeerDependencies: - supports-color @@ -8687,7 +8680,7 @@ snapshots: eslint-plugin-unicorn@55.0.0(eslint@9.11.1): dependencies: - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-validator-identifier': 7.25.7 '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1) ci-info: 4.0.0 clean-regexp: 1.0.0 @@ -9691,8 +9684,6 @@ snapshots: jsesc@0.5.0: {} - jsesc@2.5.2: {} - jsesc@3.0.2: {} json-bigint@1.0.0: @@ -9937,8 +9928,8 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.25.6 - '@babel/types': 7.25.6 + '@babel/parser': 7.25.7 + '@babel/types': 7.25.7 source-map-js: 1.2.1 mailparser@3.7.1: @@ -10479,7 +10470,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.25.7 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -10825,26 +10816,28 @@ snapshots: regenerator-transform@0.15.2: dependencies: - '@babel/runtime': 7.25.6 + '@babel/runtime': 7.25.7 regexp-tree@0.1.27: {} - regexpu-core@5.3.2: + regexpu-core@6.1.1: dependencies: - '@babel/regjsgen': 0.8.0 regenerate: 1.4.2 regenerate-unicode-properties: 10.2.0 - regjsparser: 0.9.1 + regjsgen: 0.8.0 + regjsparser: 0.11.0 unicode-match-property-ecmascript: 2.0.0 unicode-match-property-value-ecmascript: 2.2.0 + regjsgen@0.8.0: {} + regjsparser@0.10.0: dependencies: jsesc: 0.5.0 - regjsparser@0.9.1: + regjsparser@0.11.0: dependencies: - jsesc: 0.5.0 + jsesc: 3.0.2 relateurl@0.2.7: {} @@ -10937,26 +10930,26 @@ snapshots: dependencies: glob: 7.2.3 - rollup@4.23.0: + rollup@4.24.0: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.23.0 - '@rollup/rollup-android-arm64': 4.23.0 - '@rollup/rollup-darwin-arm64': 4.23.0 - '@rollup/rollup-darwin-x64': 4.23.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.23.0 - '@rollup/rollup-linux-arm-musleabihf': 4.23.0 - '@rollup/rollup-linux-arm64-gnu': 4.23.0 - '@rollup/rollup-linux-arm64-musl': 4.23.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.23.0 - '@rollup/rollup-linux-riscv64-gnu': 4.23.0 - '@rollup/rollup-linux-s390x-gnu': 4.23.0 - '@rollup/rollup-linux-x64-gnu': 4.23.0 - '@rollup/rollup-linux-x64-musl': 4.23.0 - '@rollup/rollup-win32-arm64-msvc': 4.23.0 - '@rollup/rollup-win32-ia32-msvc': 4.23.0 - '@rollup/rollup-win32-x64-msvc': 4.23.0 + '@rollup/rollup-android-arm-eabi': 4.24.0 + '@rollup/rollup-android-arm64': 4.24.0 + '@rollup/rollup-darwin-arm64': 4.24.0 + '@rollup/rollup-darwin-x64': 4.24.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.0 + '@rollup/rollup-linux-arm-musleabihf': 4.24.0 + '@rollup/rollup-linux-arm64-gnu': 4.24.0 + '@rollup/rollup-linux-arm64-musl': 4.24.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.0 + '@rollup/rollup-linux-riscv64-gnu': 4.24.0 + '@rollup/rollup-linux-s390x-gnu': 4.24.0 + '@rollup/rollup-linux-x64-gnu': 4.24.0 + '@rollup/rollup-linux-x64-musl': 4.24.0 + '@rollup/rollup-win32-arm64-msvc': 4.24.0 + '@rollup/rollup-win32-ia32-msvc': 4.24.0 + '@rollup/rollup-win32-x64-msvc': 4.24.0 fsevents: 2.3.3 rrweb-cssom@0.7.1: {} @@ -11628,7 +11621,7 @@ snapshots: dependencies: esbuild: 0.21.5 postcss: 8.4.47 - rollup: 4.23.0 + rollup: 4.24.0 optionalDependencies: '@types/node': 22.7.4 fsevents: 2.3.3 @@ -11637,7 +11630,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 - '@vitest/pretty-format': 2.1.1 + '@vitest/pretty-format': 2.1.2 '@vitest/runner': 2.0.5 '@vitest/snapshot': 2.0.5 '@vitest/spy': 2.0.5 From 8f4e283f77a5d7031fdc17a38f72e49006244008 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 05:09:01 -0700 Subject: [PATCH 041/740] chore(deps): bump @scalar/hono-api-reference from 0.5.149 to 0.5.150 (#16994) * chore(deps): bump @scalar/hono-api-reference from 0.5.149 to 0.5.150 Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.149 to 0.5.150. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 9ec8a43a2ecbf80..1d19cc14dc5db20 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.19", - "@scalar/hono-api-reference": "0.5.149", + "@scalar/hono-api-reference": "0.5.150", "@sentry/node": "7.116.0", "@tonyrl/rand-user-agent": "2.0.80", "aes-js": "3.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6ccf8627048f837..f6d449ced1eac92 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: 0.0.19 version: 0.0.19 '@scalar/hono-api-reference': - specifier: 0.5.149 - version: 0.5.149(hono@4.6.3) + specifier: 0.5.150 + version: 0.5.150(hono@4.6.3) '@sentry/node': specifier: 7.116.0 version: 7.116.0 @@ -1760,8 +1760,8 @@ packages: '@rss3/sdk@0.0.19': resolution: {integrity: sha512-4e4kEvUlxPIDw8NrMv+TYeIBZacphDEN8nrdY3+5hlGd+ZLYsAh76dKkYSoLjTNbp1k9UCxQxvaAr22m+hYiug==} - '@scalar/hono-api-reference@0.5.149': - resolution: {integrity: sha512-n3LHUOHvskgWcodVykLJvoC2813weZmxKjaGKzOZyOdbSK4y1gGqwbE1bIvwdDL6+r53f8HeaPtsuAEH7UrvfQ==} + '@scalar/hono-api-reference@0.5.150': + resolution: {integrity: sha512-KGXaE8iEuYL2EhCDc9vBPw3a6+cj552b85EbflEUijOgLhKhcoDb2A/QIgyuk/89Us3mrWJubEZ8NiH8dMLd8Q==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -1770,8 +1770,8 @@ packages: resolution: {integrity: sha512-NMy3QNk6ytcCoPUGJH0t4NNr36OWXgZhA3ormr3TvhX1NDgoF95wFyodGVH8xiHeUyn2/FxtETm8UBLbB5xEmg==} engines: {node: '>=18'} - '@scalar/types@0.0.11': - resolution: {integrity: sha512-cB2vhKWrxKmfq7eZ6WTvv9dvwEmBJrzsJrNLeRVZp+qAkLlohKktOcMIT9WLUwMRgH3xhv/44/G1HAOyrhhQpw==} + '@scalar/types@0.0.12': + resolution: {integrity: sha512-XYZ36lSEx87i4gDqopQlGCOkdIITHHEvgkuJFrXFATQs9zHARop0PN0g4RZYWj+ZpCUclOcaOjbCt8JGe22mnQ==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7310,14 +7310,14 @@ snapshots: '@rss3/api-core': 0.0.19 '@rss3/api-utils': 0.0.19 - '@scalar/hono-api-reference@0.5.149(hono@4.6.3)': + '@scalar/hono-api-reference@0.5.150(hono@4.6.3)': dependencies: - '@scalar/types': 0.0.11 + '@scalar/types': 0.0.12 hono: 4.6.3 '@scalar/openapi-types@0.1.1': {} - '@scalar/types@0.0.11': + '@scalar/types@0.0.12': dependencies: '@scalar/openapi-types': 0.1.1 '@unhead/schema': 1.11.7 From f2ac1e1e64dc8b09b118946cbb91ef241af50bf3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 20:18:14 +0800 Subject: [PATCH 042/740] chore(deps-dev): bump @babel/preset-typescript from 7.24.7 to 7.25.7 (#16995) * chore(deps-dev): bump @babel/preset-typescript from 7.24.7 to 7.25.7 Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.24.7 to 7.25.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.25.7/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 1d19cc14dc5db20..798aa469ffc922a 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ }, "devDependencies": { "@babel/preset-env": "7.25.7", - "@babel/preset-typescript": "7.24.7", + "@babel/preset-typescript": "7.25.7", "@eslint/eslintrc": "3.1.0", "@eslint/js": "9.11.1", "@microsoft/eslint-formatter-sarif": "3.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f6d449ced1eac92..78acf105d753681 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -262,8 +262,8 @@ importers: specifier: 7.25.7 version: 7.25.7(@babel/core@7.25.7) '@babel/preset-typescript': - specifier: 7.24.7 - version: 7.24.7(@babel/core@7.25.7) + specifier: 7.25.7 + version: 7.25.7(@babel/core@7.25.7) '@eslint/eslintrc': specifier: 3.1.0 version: 3.1.0 @@ -1012,8 +1012,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 - '@babel/preset-typescript@7.24.7': - resolution: {integrity: sha512-SyXRe3OdWwIwalxDg5UtJnJQO+YPcTfwiIY2B0Xlddh9o7jpWLvv8X1RthIeDOxQ+O1ML5BLPCONToObyVQVuQ==} + '@babel/preset-typescript@7.25.7': + resolution: {integrity: sha512-rkkpaXJZOFN45Fb+Gki0c+KMIglk4+zZXOoMJuyEK8y8Kkc8Jd3BDmP7qPsz0zQMJj+UD7EprF+AqAXcILnexw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -6631,7 +6631,7 @@ snapshots: '@babel/types': 7.25.7 esutils: 2.0.3 - '@babel/preset-typescript@7.24.7(@babel/core@7.25.7)': + '@babel/preset-typescript@7.25.7(@babel/core@7.25.7)': dependencies: '@babel/core': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 From 4145274cc6bd28bb3f49b4471c4a545b338eded6 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Fri, 4 Oct 2024 07:45:32 +0800 Subject: [PATCH 043/740] =?UTF-8?q?feat(route):=20add=20A9VG=20=E7=94=B5?= =?UTF-8?q?=E7=8E=A9=E9=83=A8=E8=90=BD=E6=96=B0=E9=97=BB=20&=20=E8=AF=84?= =?UTF-8?q?=E6=B5=8B=20(#16996)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/a9vg/a9vg.ts | 45 ----- lib/routes/a9vg/index.ts | 214 ++++++++++++++++++++++ lib/routes/a9vg/namespace.ts | 1 + lib/routes/a9vg/templates/description.art | 17 ++ 4 files changed, 232 insertions(+), 45 deletions(-) delete mode 100644 lib/routes/a9vg/a9vg.ts create mode 100644 lib/routes/a9vg/index.ts create mode 100644 lib/routes/a9vg/templates/description.art diff --git a/lib/routes/a9vg/a9vg.ts b/lib/routes/a9vg/a9vg.ts deleted file mode 100644 index b86c783bbfa3f7a..000000000000000 --- a/lib/routes/a9vg/a9vg.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Route } from '@/types'; -import got from '@/utils/got'; -import * as cheerio from 'cheerio'; -import { parseDate } from '@/utils/parse-date'; -import timezone from '@/utils/timezone'; - -export const route: Route = { - path: '/', - radar: [ - { - source: ['a9vg.com/list/news', 'a9vg.com/'], - target: '', - }, - ], - name: 'Unknown', - maintainers: ['monnerHenster'], - handler, - url: 'a9vg.com/list/news', -}; - -async function handler() { - const baseUrl = 'http://www.a9vg.com'; - const link = `${baseUrl}/list/news`; - const { data } = await got(link); - - const $ = cheerio.load(data); - const list = $('.a9-rich-card-list li') - .toArray() - .map((elem) => { - const item = $(elem); - return { - title: item.find('.a9-rich-card-list_label').text(), - description: `
${item.find('.a9-rich-card-list_summary').text().trim()}`, - pubDate: timezone(parseDate(item.find('.a9-rich-card-list_infos').text().trim(), 'YYYY-MM-DD HH:mm:ss'), 8), - link: `${baseUrl}${item.find('.a9-rich-card-list_item').attr('href')}`, - }; - }); - - return { - title: 'A9VG 电玩部落', - link, - description: $('meta[name="description"]').attr('content'), - item: list, - }; -} diff --git a/lib/routes/a9vg/index.ts b/lib/routes/a9vg/index.ts new file mode 100644 index 000000000000000..7b0db41e031ad05 --- /dev/null +++ b/lib/routes/a9vg/index.ts @@ -0,0 +1,214 @@ +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 { load } from 'cheerio'; +import timezone from '@/utils/timezone'; +import { parseDate } from '@/utils/parse-date'; +import { art } from '@/utils/render'; +import path from 'node:path'; + +export const handler = async (ctx) => { + const { category = 'news/All' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; + + const rootUrl = 'http://www.a9vg.com'; + const currentUrl = new URL(`list/${category}`, rootUrl).href; + + const { data: response } = await got(currentUrl); + + const $ = load(response); + + const language = $('html').prop('lang'); + + let items = $('a.a9-rich-card-list_item') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + const image = item.find('img.a9-rich-card-list_image'); + const title = item.find('div.a9-rich-card-list_label').text(); + + return { + title, + link: new URL(item.prop('href'), rootUrl).href, + description: art(path.join(__dirname, 'templates/description.art'), { + images: image + ? [ + { + src: image.prop('src'), + alt: title, + }, + ] + : undefined, + }), + pubDate: timezone(parseDate(item.find('div.a9-rich-card-list_infos').text()), +8), + language, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + $$('ignore_js_op img, p img').each((_, el) => { + el = $$(el); + + el.parent().replaceWith( + art(path.join(__dirname, 'templates/description.art'), { + images: el.prop('file') + ? [ + { + src: el.prop('file'), + alt: el.next().find('div.xs0 p').first().text(), + }, + ] + : undefined, + }) + ); + }); + + item.title = $$('h1.ts, div.c-article-main_content-title').first().text(); + item.description = art(path.join(__dirname, 'templates/description.art'), { + description: $$('td.t_f, div.c-article-main_contentraw').first().html(), + }); + item.author = + $$('b a.blue').first().text() || + $$( + $$('span.c-article-main_content-intro-item') + .toArray() + .findLast((i) => $$(i).text().startsWith('作者')) + ) + .text() + .split(/:/) + .pop(); + item.pubDate = timezone( + parseDate( + $$('div.authi em') + .first() + .text() + .trim() + .match(/发表于 (\d+-\d+-\d+ \d+:\d+)/)?.[1] ?? $$('span.c-article-main_content-intro-item').first().text(), + ['YYYY-M-D HH:mm', 'YYYY-MM-DD HH:mm'] + ), + +8 + ); + item.language = language; + + return item; + }) + ) + ); + + const title = $('title').text(); + const image = new URL('images/logo.1cee7c0f.svg', rootUrl).href; + + return { + title, + description: $('meta[name="description"]').prop('content'), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: title.split(/-/).pop(), + language, + }; +}; + +export const route: Route = { + path: '/:category{.+}?', + name: '新闻', + url: 'a9vg.com', + maintainers: ['monnerHenster', 'nczitzk'], + handler, + example: '/a9vg/news', + parameters: { category: '分类,默认为 ,可在对应分类页 URL 中找到, Category, by default' }, + description: `:::tip + 若订阅 [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) | + `, + categories: ['game'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.a9vg.com/list/:category'], + target: (params) => { + const category = params.category; + + return category ? `/${category}` : ''; + }, + }, + { + title: 'All', + source: ['www.a9vg.com/list/news/All'], + target: '/news/All', + }, + { + title: 'PS4', + source: ['www.a9vg.com/list/news/PS4'], + target: '/news/PS4', + }, + { + title: 'PS5', + source: ['www.a9vg.com/list/news/PS5'], + target: '/news/PS5', + }, + { + title: 'Switch', + source: ['www.a9vg.com/list/news/Switch'], + target: '/news/Switch', + }, + { + title: 'Xbox One', + source: ['www.a9vg.com/list/news/XboxOne'], + target: '/news/XboxOne', + }, + { + title: 'XSX', + source: ['www.a9vg.com/list/news/XSX'], + target: '/news/XSX', + }, + { + title: 'PC', + source: ['www.a9vg.com/list/news/PC'], + target: '/news/PC', + }, + { + title: '业界', + source: ['www.a9vg.com/list/news/Industry'], + target: '/news/Industry', + }, + { + title: '厂商', + source: ['www.a9vg.com/list/news/Factory'], + target: '/news/Factory', + }, + ], +}; diff --git a/lib/routes/a9vg/namespace.ts b/lib/routes/a9vg/namespace.ts index 074bd1620eaa8ce..545b90905e7ea25 100644 --- a/lib/routes/a9vg/namespace.ts +++ b/lib/routes/a9vg/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'A9VG 电玩部落', url: 'a9vg.com', + description: '', }; diff --git a/lib/routes/a9vg/templates/description.art b/lib/routes/a9vg/templates/description.art new file mode 100644 index 000000000000000..dfab19230c11085 --- /dev/null +++ b/lib/routes/a9vg/templates/description.art @@ -0,0 +1,17 @@ +{{ if images }} + {{ each images image }} + {{ if image?.src }} +
+ {{ image.alt }} +
+ {{ /if }} + {{ /each }} +{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file From 0848fa1d78bc5285992236c29a7b3f9f3c1c30aa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 03:36:55 -0700 Subject: [PATCH 044/740] chore(deps): bump tldts from 6.1.49 to 6.1.50 (#16998) * chore(deps): bump tldts from 6.1.49 to 6.1.50 Bumps [tldts](https://github.com/remusao/tldts) from 6.1.49 to 6.1.50. - [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.49...v6.1.50) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 798aa469ffc922a..150afcbbcaa9d00 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "telegram": "2.25.11", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.49", + "tldts": "6.1.50", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 78acf105d753681..16c31d7670d10bc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,8 +228,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.49 - version: 6.1.49 + specifier: 6.1.50 + version: 6.1.50 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -2371,8 +2371,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001666: - resolution: {integrity: sha512-gD14ICmoV5ZZM1OdzPWmpx+q4GyefaK06zi8hmfHV5xe4/2nOQX3+Dw5o+fSqOws2xVwL9j+anOPFwHzdEdV4g==} + caniuse-lite@1.0.30001667: + resolution: {integrity: sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -2826,8 +2826,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.31: - resolution: {integrity: sha512-QcDoBbQeYt0+3CWcK/rEbuHvwpbT/8SV9T3OSgs6cX1FlcUAkgrkqbg9zLnDrMM/rLamzQwal4LYFCiWk861Tg==} + electron-to-chromium@1.5.32: + resolution: {integrity: sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -3933,8 +3933,8 @@ packages: engines: {node: '>=18.12.0'} hasBin: true - listr2@8.2.4: - resolution: {integrity: sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==} + listr2@8.2.5: + resolution: {integrity: sha512-iyAZCeyD+c1gPyE9qpFu8af0Y+MRtmKOncdGoA2S5EY8iFq99dmmvkNnHiWo+pj0s7yH7l3KPIgee77tKpXPWQ==} engines: {node: '>=18.0.0'} localforage@1.10.0: @@ -5325,11 +5325,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.49: - resolution: {integrity: sha512-ctRO/wzBasOCxAStJG/60Qe8/QpGmaVPsE8djdk0vioxN4uCOgKoveH71Qc2EOmVMIjVf0BjigI5p9ZDuLOygg==} + tldts-core@6.1.50: + resolution: {integrity: sha512-na2EcZqmdA2iV9zHV7OHQDxxdciEpxrjbkp+aHmZgnZKHzoElLajP59np5/4+sare9fQBfixgvXKx8ev1d7ytw==} - tldts@6.1.49: - resolution: {integrity: sha512-E5se9HuCyfwWvmc0JiXiocOw+Cm4tlJCKewdB5RKMH8MmtiTsQCc+yu5BBYB5ZN4lNbz8Xg65bqJ1odS9+RhIA==} + tldts@6.1.50: + resolution: {integrity: sha512-q9GOap6q3KCsLMdOjXhWU5jVZ8/1dIib898JBRLsN+tBhENpBDcAVQbE0epADOjw11FhQQy9AcbqKGBQPUfTQA==} hasBin: true tmp@0.0.33: @@ -7926,8 +7926,8 @@ snapshots: browserslist@4.24.0: dependencies: - caniuse-lite: 1.0.30001666 - electron-to-chromium: 1.5.31 + caniuse-lite: 1.0.30001667 + electron-to-chromium: 1.5.32 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) @@ -8001,7 +8001,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001666: {} + caniuse-lite@1.0.30001667: {} caseless@0.12.0: {} @@ -8468,7 +8468,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.31: {} + electron-to-chromium@1.5.32: {} ellipsize@0.1.0: {} @@ -9808,7 +9808,7 @@ snapshots: debug: 4.3.7 execa: 8.0.1 lilconfig: 3.1.2 - listr2: 8.2.4 + listr2: 8.2.5 micromatch: 4.0.8 pidtree: 0.6.0 string-argv: 0.3.2 @@ -9816,7 +9816,7 @@ snapshots: transitivePeerDependencies: - supports-color - listr2@8.2.4: + listr2@8.2.5: dependencies: cli-truncate: 4.0.0 colorette: 2.0.20 @@ -11353,11 +11353,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.49: {} + tldts-core@6.1.50: {} - tldts@6.1.49: + tldts@6.1.50: dependencies: - tldts-core: 6.1.49 + tldts-core: 6.1.50 tmp@0.0.33: dependencies: @@ -11395,7 +11395,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.49 + tldts: 6.1.50 tr46@0.0.3: {} From bed34d7a0f492832a4a75c87db27e537d4e256b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 03:39:30 -0700 Subject: [PATCH 045/740] chore(deps): bump sanitize-html from 2.13.0 to 2.13.1 (#17001) * chore(deps): bump sanitize-html from 2.13.0 to 2.13.1 Bumps [sanitize-html](https://github.com/apostrophecms/sanitize-html) from 2.13.0 to 2.13.1. - [Changelog](https://github.com/apostrophecms/sanitize-html/blob/main/CHANGELOG.md) - [Commits](https://github.com/apostrophecms/sanitize-html/compare/2.13.0...2.13.1) --- updated-dependencies: - dependency-name: sanitize-html dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 150afcbbcaa9d00..64f1c379bb79d0d 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "re2js": "0.4.2", "rfc4648": "1.5.3", "rss-parser": "3.13.0", - "sanitize-html": "2.13.0", + "sanitize-html": "2.13.1", "simplecc-wasm": "1.0.0", "socks-proxy-agent": "8.0.4", "source-map": "0.7.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 16c31d7670d10bc..5ff4a1c99ad1599 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -207,8 +207,8 @@ importers: specifier: 3.13.0 version: 3.13.0 sanitize-html: - specifier: 2.13.0 - version: 2.13.0 + specifier: 2.13.1 + version: 2.13.1 simplecc-wasm: specifier: 1.0.0 version: 1.0.0 @@ -4970,8 +4970,8 @@ packages: safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sanitize-html@2.13.0: - resolution: {integrity: sha512-Xff91Z+4Mz5QiNSLdLWwjgBDm5b1RU6xBT0+12rapjiaR7SwfRdjw8f+6Rir2MXKLrDicRFHdb51hGOAxmsUIA==} + sanitize-html@2.13.1: + resolution: {integrity: sha512-ZXtKq89oue4RP7abL9wp/9URJcqQNABB5GGJ2acW1sdO8JTVl92f4ygD7Yc9Ze09VAZhnt2zegeU0tbNsdcLYg==} sax@1.4.1: resolution: {integrity: sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==} @@ -10979,7 +10979,7 @@ snapshots: safer-buffer@2.1.2: {} - sanitize-html@2.13.0: + sanitize-html@2.13.1: dependencies: deepmerge: 4.3.1 escape-string-regexp: 4.0.0 From 63f1f837b73e89ce20cd23d2cca3998547eeef24 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 03:39:50 -0700 Subject: [PATCH 046/740] chore(deps): bump @hono/zod-openapi from 0.16.2 to 0.16.3 (#17002) * chore(deps): bump @hono/zod-openapi from 0.16.2 to 0.16.3 Bumps [@hono/zod-openapi](https://github.com/honojs/middleware) from 0.16.2 to 0.16.3. - [Release notes](https://github.com/honojs/middleware/releases) - [Commits](https://github.com/honojs/middleware/compare/@hono/zod-openapi@0.16.2...@hono/zod-openapi@0.16.3) --- updated-dependencies: - dependency-name: "@hono/zod-openapi" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 64f1c379bb79d0d..1ce2d13d3f086f8 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ }, "dependencies": { "@hono/node-server": "1.13.1", - "@hono/zod-openapi": "0.16.2", + "@hono/zod-openapi": "0.16.3", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.53.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ff4a1c99ad1599..5a92f83a2954774 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: 1.13.1 version: 1.13.1(hono@4.6.3) '@hono/zod-openapi': - specifier: 0.16.2 - version: 0.16.2(hono@4.6.3)(zod@3.23.8) + specifier: 0.16.3 + version: 0.16.3(hono@4.6.3)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -1390,8 +1390,8 @@ packages: peerDependencies: hono: ^4 - '@hono/zod-openapi@0.16.2': - resolution: {integrity: sha512-MxlZzvHTXmOihKgIqYrEH5TysIs3Ep0PlTfmdaXe22HR0o2BULbpWW3F7W4I+2jAbt9rxLbxcs3aE2MXnIuAbw==} + '@hono/zod-openapi@0.16.3': + resolution: {integrity: sha512-I5gaFkVM2gaAVw41YBjdZ4peDjf8cQvHZVurOkN5l9Qx1lUZCaqqqZHZpdGhSfAPvu2FVlhRd4xSSqrmbnzH4Q==} engines: {node: '>=16.0.0'} peerDependencies: hono: '>=4.3.6' @@ -6905,7 +6905,7 @@ snapshots: dependencies: hono: 4.6.3 - '@hono/zod-openapi@0.16.2(hono@4.6.3)(zod@3.23.8)': + '@hono/zod-openapi@0.16.3(hono@4.6.3)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.1.2(zod@3.23.8) '@hono/zod-validator': 0.3.0(hono@4.6.3)(zod@3.23.8) From 54bd7e7705df536f2dc8db2f9e7de557afb56b46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 4 Oct 2024 21:14:37 +0800 Subject: [PATCH 047/740] chore(deps-dev): bump eslint-plugin-unicorn from 55.0.0 to 56.0.0 (#17000) * chore(deps-dev): bump eslint-plugin-unicorn from 55.0.0 to 56.0.0 Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 55.0.0 to 56.0.0. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v55.0.0...v56.0.0) --- updated-dependencies: - dependency-name: eslint-plugin-unicorn dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * chore: fix pnpm install * style(eslint): ignore `prefer-global-this` for puppeteer --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- eslint.config.mjs | 1 + lib/routes/chinanews/index.ts | 2 +- lib/routes/chinaventure/index.ts | 2 +- lib/routes/github/issue.ts | 2 +- lib/routes/github/pulls.ts | 2 +- lib/routes/guancha/member.ts | 2 +- lib/routes/manhuagui/comic.ts | 2 +- package.json | 4 ++-- pnpm-lock.yaml | 10 +++++----- 9 files changed, 14 insertions(+), 13 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index fd33ed836a0f3b9..5ed642847d8a046 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -179,6 +179,7 @@ export default [{ }], 'unicorn/prefer-code-point': 'warn', + 'unicorn/prefer-global-this': 'off', 'unicorn/prefer-logical-operator-over-ternary': 'warn', 'unicorn/prefer-module': 'off', 'unicorn/prefer-node-protocol': 'off', diff --git a/lib/routes/chinanews/index.ts b/lib/routes/chinanews/index.ts index c9f2e470bce5718..3a66077f252f084 100644 --- a/lib/routes/chinanews/index.ts +++ b/lib/routes/chinanews/index.ts @@ -34,7 +34,7 @@ async function handler(ctx) { title: $(item).text(), })) .get() - .slice(0, ctx.req.query('limit') ? (Number.parseInt(ctx.req.query('limit')) > 125 ? 125 : Number.parseInt(ctx.req.query('limit'))) : 50); + .slice(0, ctx.req.query('limit') ? Math.min(Number.parseInt(ctx.req.query('limit')), 125) : 50); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/chinaventure/index.ts b/lib/routes/chinaventure/index.ts index fa99ff0e4541bc7..ce56b893487b714 100644 --- a/lib/routes/chinaventure/index.ts +++ b/lib/routes/chinaventure/index.ts @@ -64,7 +64,7 @@ async function handler(ctx) { link: rootUrl + $(item).attr('href'), })) .get() - .slice(0, ctx.req.query('limit') ? (Number.parseInt(ctx.req.query('limit')) > 20 ? 20 : Number.parseInt(ctx.req.query('limit'))) : 20); + .slice(0, ctx.req.query('limit') ? Math.min(Number.parseInt(ctx.req.query('limit')), 20) : 20); const items = await Promise.all( list.map((item) => diff --git a/lib/routes/github/issue.ts b/lib/routes/github/issue.ts index 319aaa5d84b5b09..641b7891774f7a4 100644 --- a/lib/routes/github/issue.ts +++ b/lib/routes/github/issue.ts @@ -53,7 +53,7 @@ async function handler(ctx) { const repo = ctx.req.param('repo'); const state = ctx.req.param('state'); const labels = ctx.req.param('labels'); - const limit = ctx.req.query('limit') ? (Number.parseInt(ctx.req.query('limit')) > 100 ? 100 : Number.parseInt(ctx.req.query('limit'))) : 100; + const limit = ctx.req.query('limit') ? Math.min(Number.parseInt(ctx.req.query('limit')), 100) : 100; const host = `https://github.com/${user}/${repo}/issues`; const url = `https://api.github.com/repos/${user}/${repo}/issues`; diff --git a/lib/routes/github/pulls.ts b/lib/routes/github/pulls.ts index db5b260a71c0c82..a4ccb97f2d2c79f 100644 --- a/lib/routes/github/pulls.ts +++ b/lib/routes/github/pulls.ts @@ -51,7 +51,7 @@ async function handler(ctx) { labels, sort: 'created', direction: 'desc', - per_page: ctx.req.query('limit') ? (Number.parseInt(ctx.req.query('limit')) <= 100 ? Number.parseInt(ctx.req.query('limit')) : 100) : 100, + per_page: ctx.req.query('limit') ? Math.min(Number.parseInt(ctx.req.query('limit')), 100) : 100, }, headers, }); diff --git a/lib/routes/guancha/member.ts b/lib/routes/guancha/member.ts index 1f8802152d2b4c0..e80fc3cd21d20a9 100644 --- a/lib/routes/guancha/member.ts +++ b/lib/routes/guancha/member.ts @@ -68,7 +68,7 @@ async function handler(ctx) { for (const i of item.items) { const newPubDate = new Date(i.publish_time); - pubDate = pubDate > newPubDate ? pubDate : newPubDate; + pubDate = Math.max(pubDate, newPubDate); description += `${i.title}
`; } diff --git a/lib/routes/manhuagui/comic.ts b/lib/routes/manhuagui/comic.ts index 88c638aa1075757..32a4dd41a2e4b2d 100644 --- a/lib/routes/manhuagui/comic.ts +++ b/lib/routes/manhuagui/comic.ts @@ -126,7 +126,7 @@ async function handler(ctx) { const items = chapters.map((element) => genResult(element)); let itemsLen = items.length; if (chapterCnt > 0) { - itemsLen = chapterCnt < $.newChapterCnt ? $.newChapterCnt : chapterCnt; + itemsLen = Math.max(chapterCnt, $.newChapterCnt); } return { diff --git a/package.json b/package.json index 1ce2d13d3f086f8..d05f338694929c0 100644 --- a/package.json +++ b/package.json @@ -173,7 +173,7 @@ "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.10.3", "eslint-plugin-prettier": "5.2.1", - "eslint-plugin-unicorn": "55.0.0", + "eslint-plugin-unicorn": "56.0.0", "eslint-plugin-yml": "1.14.0", "fs-extra": "11.2.0", "globals": "15.10.0", @@ -192,7 +192,7 @@ "vitest": "2.0.5", "yaml-eslint-parser": "1.2.3" }, - "packageManager": "pnpm@9.11.0", + "packageManager": "pnpm@9.12.0", "engines": { "node": ">=22" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5a92f83a2954774..cfad56a8d34a532 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -373,8 +373,8 @@ importers: specifier: 5.2.1 version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.11.1))(eslint@9.11.1)(prettier@3.3.3) eslint-plugin-unicorn: - specifier: 55.0.0 - version: 55.0.0(eslint@9.11.1) + specifier: 56.0.0 + version: 56.0.0(eslint@9.11.1) eslint-plugin-yml: specifier: 1.14.0 version: 1.14.0(eslint@9.11.1) @@ -2997,8 +2997,8 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-unicorn@55.0.0: - resolution: {integrity: sha512-n3AKiVpY2/uDcGrS3+QsYDkjPfaOrNrsfQxU9nt5nitd9KuvVXrfAvgCO9DYPSfap+Gqjw9EOrXIsBp5tlHZjA==} + eslint-plugin-unicorn@56.0.0: + resolution: {integrity: sha512-aXpddVz/PQMmd69uxO98PA4iidiVNvA0xOtbpUoz1WhBd4RxOQQYqN618v68drY0hmy5uU2jy1bheKEVWBjlPw==} engines: {node: '>=18.18'} peerDependencies: eslint: '>=8.56.0' @@ -8678,7 +8678,7 @@ snapshots: '@types/eslint': 9.6.1 eslint-config-prettier: 9.1.0(eslint@9.11.1) - eslint-plugin-unicorn@55.0.0(eslint@9.11.1): + eslint-plugin-unicorn@56.0.0(eslint@9.11.1): dependencies: '@babel/helper-validator-identifier': 7.25.7 '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1) From 5747505a120429c5e4228351a0f525b4ec1de04e Mon Sep 17 00:00:00 2001 From: Keo Date: Fri, 4 Oct 2024 21:49:36 +0800 Subject: [PATCH 048/740] feat(route): add KISS blog (#16984) * feat(route): add KISS blog * add lang settings --- lib/routes/kisskiss/blog.ts | 74 ++++++++++++++++++++++++++++++++ lib/routes/kisskiss/namespace.ts | 6 +++ 2 files changed, 80 insertions(+) create mode 100644 lib/routes/kisskiss/blog.ts create mode 100644 lib/routes/kisskiss/namespace.ts diff --git a/lib/routes/kisskiss/blog.ts b/lib/routes/kisskiss/blog.ts new file mode 100644 index 000000000000000..e2444dba3af7534 --- /dev/null +++ b/lib/routes/kisskiss/blog.ts @@ -0,0 +1,74 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +const baseUrl = 'https://www.kisskiss.tv/kiss/diary.php'; + +export const route: Route = { + path: '/blog/:category?', + categories: ['game'], + example: '/blog/DLC', + parameters: { category: 'category' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.kisskiss.tv/kiss/diary.php'], + target: '/blog', + }, + ], + name: 'ブログ', + maintainers: ['keocheung'], + handler, +}; + +async function handler(ctx) { + const { category } = ctx.req.param(); + const url = category ? `${baseUrl}?category=${category}` : baseUrl; + + const response = await got(url); + const $ = load(response.data); + + const items = $('table.blog_frame_top') + .toArray() + .map((item) => { + const title = $(item); + const body = title.next('div.blog_frame_middle'); + const i = { + title: title.find('tbody tr td').text(), + link: title.find('tbody tr td a').attr('href'), + pubDate: timezone( + parseDate( + body + .find('div.blog_data div.data_r') + .text() + .match(/\d+年\d+月\d+日 \(\d+:\d+\)/)[0], + 'YYYY年M月D日 (HH:mm)' + ), + 9 + ), + }; + body.find('a img').each(function () { + $(this).attr('src', $(this).parent('a').attr('href')); + $(this).unwrap(); + }); + body.find('div.blog_data').remove(); + i.description = `
${body.html()}
`; + return i; + }); + + return { + title: 'KISS ブログ', + link: url, + item: items, + language: 'ja', + }; +} diff --git a/lib/routes/kisskiss/namespace.ts b/lib/routes/kisskiss/namespace.ts new file mode 100644 index 000000000000000..3da33dccd06f0e4 --- /dev/null +++ b/lib/routes/kisskiss/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'KISS', + url: 'www.kisskiss.tv', +}; From 5a653b6ef4a22ae58a9e6812a4daf8aaa61340c9 Mon Sep 17 00:00:00 2001 From: nuomi1 Date: Fri, 4 Oct 2024 22:23:53 +0800 Subject: [PATCH 049/740] feat(route/mi): refactor crowdfunding with ofetch and art-template (#16974) * feat(route/mi): refactor crowdfunding with ofetch and art-template * fix: remove unnecessary diff * refactor: use flatMap --------- --- lib/routes/mi/crowdfunding.ts | 65 ++++++++++++------- lib/routes/mi/templates/crowdfunding.art | 28 +++++++++ lib/routes/mi/types.ts | 40 ++++++++++++ lib/routes/mi/utils.ts | 80 ++++++++++++++++++++++++ 4 files changed, 191 insertions(+), 22 deletions(-) create mode 100644 lib/routes/mi/templates/crowdfunding.art create mode 100644 lib/routes/mi/types.ts create mode 100644 lib/routes/mi/utils.ts diff --git a/lib/routes/mi/crowdfunding.ts b/lib/routes/mi/crowdfunding.ts index fcd27a08c566f48..eeb805a6b7f12b1 100644 --- a/lib/routes/mi/crowdfunding.ts +++ b/lib/routes/mi/crowdfunding.ts @@ -1,37 +1,58 @@ -import { Route } from '@/types'; -import got from '@/utils/got'; +import { Data, DataItem, Route, ViewType } from '@/types'; +import { CrowdfundingDetailInfo, CrowdfundingList } from './types'; +import utils from './utils'; export const route: Route = { path: '/crowdfunding', categories: ['shopping'], example: '/mi/crowdfunding', name: '小米众筹', - maintainers: ['DIYgod'], + maintainers: ['DIYgod', 'nuomi1'], handler, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['m.mi.com/crowdfunding/home'], + target: '/crowdfunding', + }, + ], + view: ViewType.Notifications, +}; + +const getDetails = async (list: CrowdfundingList[]) => { + const result: Promise[] = list.flatMap((section) => section.items.map((item) => utils.getCrowdfundingItem(item))); + return await Promise.all(result); }; +const getDataItem = (item: CrowdfundingDetailInfo) => + ({ + title: item.project_name, + description: utils.renderCrowdfunding(item), + link: `https://m.mi.com/crowdfunding/proddetail/${item.project_id}`, + image: item.big_image, + language: 'zh-cn', + }) as DataItem; + async function handler() { - const response = await got({ - method: 'post', - url: 'http://api.m.mi.com/v1/microwd/home', - headers: { - 'Mishop-Client-Id': '180100031055', - 'User-Agent': 'MiShop/4.3.68 (iPhone; iOS 12.0.1; Scale/3.00)', - 'IOS-App-Version': '4.3.68', - 'IOS-Version': 'system=12.0.1&device=iPhone10,3', - }, - }); - const list = response.data.data.list.flatMap((a) => a.items || []); + const list = await utils.getCrowdfundingList(); + const details = await getDetails(list); + + const items: DataItem[] = details.map((item) => getDataItem(item)); return { title: '小米众筹', - link: '', + link: 'https://m.mi.com/crowdfunding/home', + item: items, allowEmpty: true, - item: - list && - list.map((item) => ({ - title: item.product_name, - description: `
价格:${item.product_price}元`, - })), - }; + image: 'https://m.mi.com/static/img/icons/apple-touch-icon-152x152.png', + language: 'zh-cn', + } as Data; } diff --git a/lib/routes/mi/templates/crowdfunding.art b/lib/routes/mi/templates/crowdfunding.art new file mode 100644 index 000000000000000..a58e19aca9a1319 --- /dev/null +++ b/lib/routes/mi/templates/crowdfunding.art @@ -0,0 +1,28 @@ + +
+{{ 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/types.ts b/lib/routes/mi/types.ts new file mode 100644 index 000000000000000..6b7cf53ac8dac19 --- /dev/null +++ b/lib/routes/mi/types.ts @@ -0,0 +1,40 @@ +export interface DataResponse { + data: Data; +} + +export interface CrowdfundingData { + list: CrowdfundingList[]; +} + +export interface CrowdfundingList { + items: CrowdfundingItem[]; +} + +export interface CrowdfundingItem { + project_id: number; + product_market_price: string; +} + +export interface CrowdfundingDetailData { + crowd_funding_info: CrowdfundingDetailInfo; +} + +export interface CrowdfundingDetailInfo { + big_image: string; + end_time: number; + end_time_desc: string; // injected + price: string; + product_market_price: string; // injected + project_desc: string; + project_id: number; + project_name: string; + start_time: number; + start_time_desc: string; // injected + support_list: CrowdfundingDetailSupportList[]; +} + +export interface CrowdfundingDetailSupportList { + name: string; + price: string; + support_desc: string; +} diff --git a/lib/routes/mi/utils.ts b/lib/routes/mi/utils.ts new file mode 100644 index 000000000000000..a0839f489a0ee4e --- /dev/null +++ b/lib/routes/mi/utils.ts @@ -0,0 +1,80 @@ +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 path from 'path'; +import { CrowdfundingData, CrowdfundingDetailData, CrowdfundingDetailInfo, CrowdfundingItem, CrowdfundingList, DataResponse } from './types'; + +dayjs.extend(localizedFormat); +dayjs.extend(timezone); +dayjs.extend(utc); + +/** + * 获取众筹项目列表 + * + * @returns {Promise} 众筹项目列表。 + */ +export const getCrowdfundingList = async (): Promise => { + const response = await ofetch>('https://m.mi.com/v1/crowd/crowd_home', { + headers: { + referrer: 'https://m.mi.com/', + }, + method: 'POST', + }); + return response.data.list; +}; + +/** + * 获取众筹项目详情并缓存 + * + * @param {CrowdfundingItem} item - 众筹项目。 + * @returns {Promise} 众筹项目详情。 + */ +export const getCrowdfundingItem = (item: CrowdfundingItem): Promise => + cache.tryGet(`mi:crowdfunding:${item.project_id}`, async () => { + const response = await ofetch>('https://m.mi.com/v1/crowd/crowd_detail', { + headers: { + referrer: 'https://m.mi.com/crowdfunding/home', + }, + method: 'POST', + query: { + project_id: item.project_id, + }, + }); + // 建议零售价 + if (response.data.crowd_funding_info.product_market_price === undefined) { + response.data.crowd_funding_info.product_market_price = item.product_market_price; + } + // 众筹开始 + if (response.data.crowd_funding_info.start_time_desc === undefined) { + response.data.crowd_funding_info.start_time_desc = formatDate(response.data.crowd_funding_info.start_time); + } + // 众筹结束 + if (response.data.crowd_funding_info.end_time_desc === undefined) { + response.data.crowd_funding_info.end_time_desc = formatDate(response.data.crowd_funding_info.end_time); + } + return response.data.crowd_funding_info; + }) as Promise; + +/** + * 渲染众筹项目模板 + * + * @param {CrowdfundingDetailInfo} item - 众筹项目详情。 + * @returns {string} 渲染后的众筹项目模板字符串。 + */ +export const renderCrowdfunding = (item: CrowdfundingDetailInfo): string => art(path.join(__dirname, 'templates/crowdfunding.art'), item); + +const formatDate = (timestamp: number): string => dayjs.unix(timestamp).tz('Asia/Shanghai').locale('zh-cn').format('lll'); + +export default { + getCrowdfundingList, + getCrowdfundingItem, + renderCrowdfunding, +}; From 652f22098933570370735ea7fc0fc1a7c45ac77e Mon Sep 17 00:00:00 2001 From: Lyunvy <64697357+Lyunvy@users.noreply.github.com> Date: Fri, 4 Oct 2024 22:39:24 +0800 Subject: [PATCH 050/740] feat(route): add xbookcn (#16990) * feat(route): add xbookcn * use toArray instead. * 1. Change the categories; 2. Remove the maximum number of route customization. Use the common parameter limit instead; 3. Correct the example path; 4. Correct the name; * fix: namespace name --------- --- lib/routes/xbookcn/blog.ts | 66 +++++++++++++++++++++++++++++++++ lib/routes/xbookcn/namespace.ts | 6 +++ 2 files changed, 72 insertions(+) create mode 100644 lib/routes/xbookcn/blog.ts create mode 100644 lib/routes/xbookcn/namespace.ts diff --git a/lib/routes/xbookcn/blog.ts b/lib/routes/xbookcn/blog.ts new file mode 100644 index 000000000000000..98e907901317360 --- /dev/null +++ b/lib/routes/xbookcn/blog.ts @@ -0,0 +1,66 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import cache from '@/utils/cache'; + +export const route: Route = { + path: '/:label?', // 路由路径 + categories: ['reading'], // 分类 + example: '/xbookcn/精选作品', // 示例路径 + parameters: { label: '按名称分类,详见https://blog.xbookcn.net/p/all.html' }, // 参数 + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '短篇', // 源名称 + maintainers: ['Lyunvy'], // 维护者 + handler: async (ctx) => { + const { label = '精选作品' } = ctx.req.param(); // 从请求参数中获取 label + const url = `https://blog.xbookcn.net/search/label/${label}`; // 使用反引号构建 URL + const response = await ofetch(url); // 请求源链接 + const $ = load(response); // 加载 HTML + + const articles = $('.blog-posts.hfeed .date-outer').find('.post'); // 查找文章 + + const list = articles.toArray().map((elem) => { + const a = $(elem).find('.post-title a'); // 获取标题链接 + return { + title: a.text().trim(), // 标题 + link: a.attr('href'), // 链接 + category: [], // 分类 + }; + }); + + const items = await Promise.all( + list.map( + async (item) => + // 使用缓存以避免重复请求 + await cache.tryGet(item.link, async () => { + const response = await ofetch(item.link); // 请求文章链接 + const $ = load(response); // 加载文章页面 + + // 获取文章的完整描述 + item.description = $('.post-body.entry-content').html() || '无内容'; // 抓取指定内容 + + // 获取分类信息 + const categories = $('.post-labels a') + .toArray() + .map((el) => $(el).text().trim()); + item.category = categories; // 添加多个分类信息 + + return item; // 返回带有描述和分类的文章对象 + }) + ) + ); + + return { + title: 'xbookcn', // 源标题 + link: url, // 源链接 + item: items, // 源文章 + }; + }, +}; diff --git a/lib/routes/xbookcn/namespace.ts b/lib/routes/xbookcn/namespace.ts new file mode 100644 index 000000000000000..0df530de5c3ed5e --- /dev/null +++ b/lib/routes/xbookcn/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中文成人文學網', + url: 'www.xbookcn.net', +}; From 03a00cde69dad1c88040bdbc1307624bb11bc228 Mon Sep 17 00:00:00 2001 From: valuex Date: Sat, 5 Oct 2024 00:03:32 +0900 Subject: [PATCH 051/740] feat(route): add Resonac (#16960) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Create namespace.ts * Add files via upload * Update dongtai.ts * Update gonggao.ts * Update gonggao.ts * Update gonggao.ts * Update dongtai.ts * Update gonggao.ts * Update gonggao.ts * Update gonggao.ts * Update gonggao.ts * Update dongtai.ts * Create namespace.ts * Add files via upload * Update articles.ts * Update articles.ts * Update articles.ts * Update articles.ts * Update articles.ts * Update articles.ts * Update articles.ts * route for 日经新闻半导体,产业聚焦 * Update scienceatechnology.ts * Update semi.ts * Delete lib/routes/yamap directory * Delete lib/routes/nikkei/semi.ts * Delete lib/routes/nikkei/scienceatechnology.ts * Update lib/routes/szftedu/dongtai.ts Co-authored-by: Tony * Update lib/routes/szftedu/namespace.ts Co-authored-by: Tony * Update lib/routes/szftedu/gonggao.ts Co-authored-by: Tony * Update gonggao.ts * Update gonggao.ts * Update dongtai.ts * Update gonggao.ts * Update gonggao.ts * Update dongtai.ts * Update dongtai.ts * Update dongtai.ts * Update gonggao.ts * Update lib/routes/szftedu/gonggao.ts Co-authored-by: Tony * Update lib/routes/szftedu/dongtai.ts Co-authored-by: Tony * Update dongtai.ts * Update dongtai.ts * fix: route name * new route: resonac products * Update products.ts * Update products.ts * Update products.ts * Update products.ts * fix: names * fix: remove fake pubDate * fix: remove unecessary spaces in selectors * fix: selectors --------- --- lib/routes/resonac/namespace.ts | 6 +++ lib/routes/resonac/products.ts | 85 +++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 lib/routes/resonac/namespace.ts create mode 100644 lib/routes/resonac/products.ts diff --git a/lib/routes/resonac/namespace.ts b/lib/routes/resonac/namespace.ts new file mode 100644 index 000000000000000..8be80f945f49d93 --- /dev/null +++ b/lib/routes/resonac/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Resonac', + url: 'www.resonac.com', +}; diff --git a/lib/routes/resonac/products.ts b/lib/routes/resonac/products.ts new file mode 100644 index 000000000000000..918c8b79ea493da --- /dev/null +++ b/lib/routes/resonac/products.ts @@ -0,0 +1,85 @@ +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'; + +const baseUrl = 'https://www.resonac.com'; +const host = 'https://www.resonac.com/products?intcid=glnavi_products'; + +export const route: Route = { + path: '/products', + categories: ['other'], + example: '/resonac/products', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Products', + maintainers: ['valuex'], + handler, + description: '', +}; + +async function handler() { + const response = await got(host); + const pageHtml = response.data; + const $ = load(pageHtml); + const groupLists = $('div.m-panel-card-link ul li') + .toArray() + .map((el) => ({ + groupName: $('a', el).text().trim(), + groupURL: baseUrl + $('a', el).attr('href'), + })); + + const lists = await Promise.all( + groupLists.map((productGroup) => + cache.tryGet(productGroup.groupURL, async () => { + const strUrl = productGroup.groupURL; + const response = await got(strUrl); + const $ = load(response.data); + const item = $('dt.m-toggle__title div span a') + .toArray() + .map((el) => ({ + title: $('b', el).text().trim(), + link: baseUrl + $(el).attr('href'), + group: productGroup.groupName, + })); + return item; + }) + ) + ); + + const fullList = lists.flat(1); // flatten array + // fullList = fullList.filter((item) => item.title !== 'Empty'); + + const items = await Promise.all( + fullList.map((item) => + cache.tryGet(item.link, async () => { + try { + const response = await got(item.link); + const $ = load(response.data); + const thisTitle = item.title + ' | ' + item.group; + item.title = thisTitle; + item.description = $('main div.str-section').html(); + return item; + } catch (error) { + return (error as Error).message; + } + }) + ) + ); + + return { + title: 'Resonac_Products', + link: baseUrl, + description: 'Resonac_Products', + item: items, + }; +} From 0029ecae6d9e5c304183bbee8f78f3a24256e6b9 Mon Sep 17 00:00:00 2001 From: Tony Date: Sat, 5 Oct 2024 04:03:05 +0800 Subject: [PATCH 052/740] chore: bump @sentry/node from 7.116.0 to 7.119.1 --- package.json | 2 +- pnpm-lock.yaml | 68 +++++++++++++++++++++++++------------------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index d05f338694929c0..fc5e29c5962cb1a 100644 --- a/package.json +++ b/package.json @@ -63,7 +63,7 @@ "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.19", "@scalar/hono-api-reference": "0.5.150", - "@sentry/node": "7.116.0", + "@sentry/node": "7.119.1", "@tonyrl/rand-user-agent": "2.0.80", "aes-js": "3.1.2", "art-template": "4.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cfad56a8d34a532..6c6248a67a8be23 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -48,8 +48,8 @@ importers: specifier: 0.5.150 version: 0.5.150(hono@4.6.3) '@sentry/node': - specifier: 7.116.0 - version: 7.116.0 + specifier: 7.119.1 + version: 7.119.1 '@tonyrl/rand-user-agent': specifier: 2.0.80 version: 2.0.80 @@ -1780,28 +1780,28 @@ packages: '@selderee/plugin-htmlparser2@0.11.0': resolution: {integrity: sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==} - '@sentry-internal/tracing@7.116.0': - resolution: {integrity: sha512-y5ppEmoOlfr77c/HqsEXR72092qmGYS4QE5gSz5UZFn9CiinEwGfEorcg2xIrrCuU7Ry/ZU2VLz9q3xd04drRA==} + '@sentry-internal/tracing@7.119.1': + resolution: {integrity: sha512-cI0YraPd6qBwvUA3wQdPGTy8PzAoK0NZiaTN1LM3IczdPegehWOaEG5GVTnpGnTsmBAzn1xnBXNBhgiU4dgcrQ==} engines: {node: '>=8'} - '@sentry/core@7.116.0': - resolution: {integrity: sha512-J6Wmjjx+o7RwST0weTU1KaKUAlzbc8MGkJV1rcHM9xjNTWTva+nrcCM3vFBagnk2Gm/zhwv3h0PvWEqVyp3U1Q==} + '@sentry/core@7.119.1': + resolution: {integrity: sha512-YUNnH7O7paVd+UmpArWCPH4Phlb5LwrkWVqzFWqL3xPyCcTSof2RL8UmvpkTjgYJjJ+NDfq5mPFkqv3aOEn5Sw==} engines: {node: '>=8'} - '@sentry/integrations@7.116.0': - resolution: {integrity: sha512-UZb60gaF+7veh1Yv79RiGvgGYOnU6xA97H+hI6tKgc1uT20YpItO4X56Vhp0lvyEyUGFZzBRRH1jpMDPNGPkqw==} + '@sentry/integrations@7.119.1': + resolution: {integrity: sha512-CGmLEPnaBqbUleVqrmGYjRjf5/OwjUXo57I9t0KKWViq81mWnYhaUhRZWFNoCNQHns+3+GPCOMvl0zlawt+evw==} engines: {node: '>=8'} - '@sentry/node@7.116.0': - resolution: {integrity: sha512-HB/4TrJWbnu6swNzkid+MlwzLwY/D/klGt3R0aatgrgWPo2jJm6bSl4LUT39Cr2eg5I1gsREQtXE2mAlC6gm8w==} + '@sentry/node@7.119.1': + resolution: {integrity: sha512-rpnoQCMxWh/ccjOe+qsmvXAdlTxQHXEWdaltSxnwj7QY+kOGKGP18WTQFLq/gdOBRw9aa6PEQGwhnLfhBXXaYg==} engines: {node: '>=8'} - '@sentry/types@7.116.0': - resolution: {integrity: sha512-QCCvG5QuQrwgKzV11lolNQPP2k67Q6HHD9vllZ/C4dkxkjoIym8Gy+1OgAN3wjsR0f/kG9o5iZyglgNpUVRapQ==} + '@sentry/types@7.119.1': + resolution: {integrity: sha512-4G2mcZNnYzK3pa2PuTq+M2GcwBRY/yy1rF+HfZU+LAPZr98nzq2X3+mJHNJoobeHRkvVh7YZMPi4ogXiIS5VNQ==} engines: {node: '>=8'} - '@sentry/utils@7.116.0': - resolution: {integrity: sha512-Vn9fcvwTq91wJvCd7WTMWozimqMi+dEZ3ie3EICELC2diONcN16ADFdzn65CQQbYwmUzRjN9EjDN2k41pKZWhQ==} + '@sentry/utils@7.119.1': + resolution: {integrity: sha512-ju/Cvyeu/vkfC5/XBV30UNet5kLEicZmXSyuLwZu95hEbL+foPdxN+re7pCI/eNqfe3B2vz7lvz5afLVOlQ2Hg==} engines: {node: '>=8'} '@sindresorhus/is@5.6.0': @@ -7329,37 +7329,37 @@ snapshots: domhandler: 5.0.3 selderee: 0.11.0 - '@sentry-internal/tracing@7.116.0': + '@sentry-internal/tracing@7.119.1': dependencies: - '@sentry/core': 7.116.0 - '@sentry/types': 7.116.0 - '@sentry/utils': 7.116.0 + '@sentry/core': 7.119.1 + '@sentry/types': 7.119.1 + '@sentry/utils': 7.119.1 - '@sentry/core@7.116.0': + '@sentry/core@7.119.1': dependencies: - '@sentry/types': 7.116.0 - '@sentry/utils': 7.116.0 + '@sentry/types': 7.119.1 + '@sentry/utils': 7.119.1 - '@sentry/integrations@7.116.0': + '@sentry/integrations@7.119.1': dependencies: - '@sentry/core': 7.116.0 - '@sentry/types': 7.116.0 - '@sentry/utils': 7.116.0 + '@sentry/core': 7.119.1 + '@sentry/types': 7.119.1 + '@sentry/utils': 7.119.1 localforage: 1.10.0 - '@sentry/node@7.116.0': + '@sentry/node@7.119.1': dependencies: - '@sentry-internal/tracing': 7.116.0 - '@sentry/core': 7.116.0 - '@sentry/integrations': 7.116.0 - '@sentry/types': 7.116.0 - '@sentry/utils': 7.116.0 + '@sentry-internal/tracing': 7.119.1 + '@sentry/core': 7.119.1 + '@sentry/integrations': 7.119.1 + '@sentry/types': 7.119.1 + '@sentry/utils': 7.119.1 - '@sentry/types@7.116.0': {} + '@sentry/types@7.119.1': {} - '@sentry/utils@7.116.0': + '@sentry/utils@7.119.1': dependencies: - '@sentry/types': 7.116.0 + '@sentry/types': 7.119.1 '@sindresorhus/is@5.6.0': {} From f163b4e602aab11ff8c36aaf00dcbcf964be26fd Mon Sep 17 00:00:00 2001 From: Tony Date: Fri, 4 Oct 2024 14:03:03 -0700 Subject: [PATCH 053/740] build(docker): use corepack before setting registry (#17004) --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e5a2789eee313ed..9089f0ca955d480 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,6 +8,7 @@ WORKDIR /app ARG USE_CHINA_NPM_REGISTRY=0 RUN \ set -ex && \ + corepack enable pnpm && \ if [ "$USE_CHINA_NPM_REGISTRY" = 1 ]; then \ echo 'use npm mirror' && \ npm config set registry https://registry.npmmirror.com && \ @@ -23,7 +24,6 @@ COPY ./package.json /app/ RUN \ set -ex && \ export PUPPETEER_SKIP_DOWNLOAD=true && \ - corepack enable pnpm && \ pnpm install --frozen-lockfile && \ pnpm rb From d4ff0ff20d81f2c2f82a721f58b23af1ec15a955 Mon Sep 17 00:00:00 2001 From: Theresa <63280168+sd0ric4@users.noreply.github.com> Date: Sun, 6 Oct 2024 13:08:26 +0800 Subject: [PATCH 054/740] =?UTF-8?q?feat(github):=20=E6=B7=BB=E5=8A=A0=20Gi?= =?UTF-8?q?tHub=20Advisory=20Database=20RSS=20=E8=B7=AF=E7=94=B1=20(#16745?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(github-advisor): add GitHub Advisory Database RSS route and namespace * fix(xiaohongshu): handle optional chaining for cover image URL * refactor(github-advisor): remove unused code and files * feat(github): 添加 GitHub Advisory Database RSS 路由 * refactor(route): fix category in GitHub Advisor route * refactor(route): 更新 GitHub Advisor 路由中的类别参数名 * refactor(route): Updated to scrape HTML directly instead of relying on third-party API --- lib/routes/github/advisor.ts | 97 ++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 lib/routes/github/advisor.ts diff --git a/lib/routes/github/advisor.ts b/lib/routes/github/advisor.ts new file mode 100644 index 000000000000000..8a0edd8dcf0d4a5 --- /dev/null +++ b/lib/routes/github/advisor.ts @@ -0,0 +1,97 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +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: '/advisor/data/:type?/:category?', + categories: ['programming'], + example: '/github/advisor/data/reviewed/composer', + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['github.com/advisories', 'github.com'], + }, + ], + name: 'Github Advisory Database RSS', + maintainers: ['sd0ric4'], + handler, + description: ` +| Type | Description | Explanation | +| --- | --- | --- | +| reviewed | Reviewed | 已审核 | +| unreviewed | Unreviewed | 未审核 | + +| Category | Description | Explanation | +| --- | --- | --- | +| composer | Composer | PHP 依赖管理工具 | +| go | Go | Go 语言包管理工具 | +| maven | Maven | Java 项目管理工具 | +| npm | NPM | Node.js 包管理工具 | +| nuget | NuGet | .NET 包管理工具 | +| pip | Pip | Python 包管理工具 | +| pub | Pub | Dart 包管理工具 | +| rubygems | RubyGems | Ruby 包管理工具 | +| rust | Rust | Rust 包管理工具 | +| erlang | Erlang | Erlang 包管理工具 | +| actions | Actions | GitHub Actions | +| swift | Swift | Swift 包管理工具 |`, +}; + +async function handler(ctx) { + const { category, type } = ctx.req.param(); + + const apiRootUrl = 'https://github.com/advisories'; + const apiUrl = `${apiRootUrl}?query=type%3A${type}+ecosystem%3A${category}`; + const currentUrl = `https://github.com/advisories`; + + const response = await got({ + method: 'get', + url: apiUrl, + }); + const $ = load(response.data); + + const list = $('div.Box-row') + .toArray() + .map((item) => { + item = $(item); + const a = item.find('a.Link--primary'); + const b = item.find('relative-time').attr('datetime'); + const title = a.text() || 'No title'; + const link = a.attr('href') || '#'; + const pubDate = parseDate(b || ''); + + return { + title, + link: `https://github.com${link}`, + pubDate, + description: '', + }; + }); + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const response = await ofetch(item.link); + const $ = load(response); + + item.description = $('.comment-body').first().html() || ''; + + return item; + }) + ) + ); + return { + title: `GitHub Advisory Database RSS - ${category} - ${type}`, + link: currentUrl, + item: items, + }; +} From 27474442ca9443e72f11ef52299244e8c770cb33 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Sun, 6 Oct 2024 19:21:59 +0800 Subject: [PATCH 055/740] fix(route/zhihu): Repair the regex for extracting `__zse_ck` (#17011) --- lib/routes/zhihu/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/zhihu/utils.ts b/lib/routes/zhihu/utils.ts index 3a41e1131495b5c..00ed64e4abf506f 100644 --- a/lib/routes/zhihu/utils.ts +++ b/lib/routes/zhihu/utils.ts @@ -75,7 +75,7 @@ export const getSignedHeader = async (url: string, apiPath: string) => { } const response1 = await ofetch.raw('https://static.zhihu.com/zse-ck/v3.js'); const script = await response1._data.text(); - const zseCk = script.match(/__g\.ck\|\|"([\w+/=\\]*?)",_=630e8;/)?.[1]; + const zseCk = script.match(/__g\.ck\|\|"([\w+/=\\]*?)",_=/)?.[1]; const response2 = zseCk ? await ofetch.raw(url, { From 19ea5ccc981b272fc1ac4fc44c812868c26ed256 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 6 Oct 2024 19:30:37 +0800 Subject: [PATCH 056/740] feat(twitter): 429 debug --- lib/routes/twitter/api/web-api/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 3e1234a7c588f86..fe2dc5c46d826f9 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -130,7 +130,7 @@ export const twitterGot = async (url, params) => { dispatcher: dispatchers.agent, onResponse: async ({ response }) => { if (response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') { - logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}`); + logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status} and data ${JSON.stringify(response._data)}`); await cache.set(`${lockPrefix}${auth.token}`, '1', 2000); } else if (response.status === 403 || response.status === 401) { const newCookie = await login({ From bac798ae975fa56e7dda6e694c25f6a98d98bd21 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 6 Oct 2024 20:30:31 +0800 Subject: [PATCH 057/740] feat(twitter): try catch allow empty content --- lib/routes/twitter/api/web-api/constants.ts | 2 +- lib/routes/twitter/media.ts | 17 +++++++++++++---- lib/routes/twitter/user.ts | 20 ++++++++++++++------ 3 files changed, 28 insertions(+), 11 deletions(-) diff --git a/lib/routes/twitter/api/web-api/constants.ts b/lib/routes/twitter/api/web-api/constants.ts index 81ba43244c94901..059dc0f85de4963 100644 --- a/lib/routes/twitter/api/web-api/constants.ts +++ b/lib/routes/twitter/api/web-api/constants.ts @@ -7,7 +7,7 @@ const graphQLEndpointsPlain = [ '/graphql/DiTkXJgLqBBxCs7zaYsbtA/HomeLatestTimeline', '/graphql/bt4TKuFz4T7Ckk-VvQVSow/UserTweetsAndReplies', '/graphql/dexO_2tohK86JDudXXG3Yw/UserMedia', - '/graphql/tD8zKvQzwY3kdx5yz6YmOw/UserByRestId', + '/graphql/Qw77dDjp9xCpUY-AXwt-yQ/UserByRestId', '/graphql/UN1i3zUiCWa-6r-Uaho4fw/SearchTimeline', '/graphql/Pa45JvqZuKcW1plybfgBlQ/ListLatestTweetsTimeline', '/graphql/QuBlQ6SxNAQCt6-kBiCXCQ/TweetDetail', diff --git a/lib/routes/twitter/media.ts b/lib/routes/twitter/media.ts index bd3dba7195b5100..b07d1a479b23f95 100644 --- a/lib/routes/twitter/media.ts +++ b/lib/routes/twitter/media.ts @@ -1,6 +1,7 @@ import { Route, ViewType } from '@/types'; import api from './api'; import utils from './utils'; +import logger from '@/utils/logger'; export const route: Route = { path: '/media/:id/:routeParams?', @@ -47,7 +48,12 @@ async function handler(ctx) { await api.init(); const userInfo = await api.getUser(id); - const data = await api.getUserMedia(id, params); + let data; + try { + data = await api.getUserMedia(id, params); + } catch (error) { + logger.debug(error); + } const profileImageUrl = userInfo?.profile_image_url || userInfo?.profile_image_url_https; return { @@ -55,8 +61,11 @@ async function handler(ctx) { link: `https://x.com/${userInfo?.screen_name}/media`, image: profileImageUrl.replace(/_normal.jpg$/, '.jpg'), description: userInfo?.description, - item: utils.ProcessFeed(ctx, { - data, - }), + item: + data && + utils.ProcessFeed(ctx, { + data, + }), + allowEmpty: true, }; } diff --git a/lib/routes/twitter/user.ts b/lib/routes/twitter/user.ts index e6652666f0ed7cd..6d5337f8c90dbf4 100644 --- a/lib/routes/twitter/user.ts +++ b/lib/routes/twitter/user.ts @@ -58,9 +58,14 @@ async function handler(ctx) { await api.init(); const userInfo = await api.getUser(id); - let data = await (exclude_replies ? api.getUserTweets(id, params) : api.getUserTweetsAndReplies(id, params)); - if (!include_rts) { - data = utils.excludeRetweet(data); + let data; + try { + data = await (exclude_replies ? api.getUserTweets(id, params) : api.getUserTweetsAndReplies(id, params)); + if (!include_rts) { + data = utils.excludeRetweet(data); + } + } catch (error) { + logger.debug(error); } const profileImageUrl = userInfo?.profile_image_url || userInfo?.profile_image_url_https; @@ -70,8 +75,11 @@ async function handler(ctx) { link: `https://x.com/${userInfo?.screen_name}`, image: profileImageUrl.replace(/_normal.jpg$/, '.jpg'), description: userInfo?.description, - item: utils.ProcessFeed(ctx, { - data, - }), + item: + data && + utils.ProcessFeed(ctx, { + data, + }), + allowEmpty: true, }; } From e74f708586f2edc86f4c687dfbb6d83982a8219f Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 6 Oct 2024 20:42:44 +0800 Subject: [PATCH 058/740] fix(twitter): import logger --- lib/routes/twitter/user.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/routes/twitter/user.ts b/lib/routes/twitter/user.ts index 6d5337f8c90dbf4..a3055bfe7145f2d 100644 --- a/lib/routes/twitter/user.ts +++ b/lib/routes/twitter/user.ts @@ -1,6 +1,7 @@ import { Route, ViewType } from '@/types'; import utils from './utils'; import api from './api'; +import logger from '@/utils/logger'; export const route: Route = { path: '/user/:id/:routeParams?', From c4102fa0725a80355509435b29fa920f2444eb4c Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 6 Oct 2024 23:10:03 +0800 Subject: [PATCH 059/740] feat(twitter): handle response headers rate limit --- lib/routes/twitter/api/web-api/utils.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index fe2dc5c46d826f9..31215173c4457b3 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -129,8 +129,15 @@ export const twitterGot = async (url, params) => { }, dispatcher: dispatchers.agent, onResponse: async ({ response }) => { - if (response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') { - logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status} and data ${JSON.stringify(response._data)}`); + const remaining = response.headers.get('x-rate-limit-remaining'); + const reset = response.headers.get('x-rate-limit-reset'); + logger.debug(`twitter debug: twitter rate limit remaining for token ${auth.token} is ${remaining} and reset at ${reset}`); + if (remaining === '0' && reset) { + const resetTime = new Date(Number.parseInt(reset) * 1000); + logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}, will unlock at ${resetTime}`); + await cache.set(`${lockPrefix}${auth.token}`, '1', (resetTime.getTime() - Date.now()) / 1000); + } else if (response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') { + logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}`); await cache.set(`${lockPrefix}${auth.token}`, '1', 2000); } else if (response.status === 403 || response.status === 401) { const newCookie = await login({ From a2ca21a11b7402f6c76fadaf1ed0a17dd97c5322 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Sun, 6 Oct 2024 23:23:17 +0800 Subject: [PATCH 060/740] feat(twitter): allowNoAuth for UserByScreenName api --- lib/routes/twitter/api/web-api/api.ts | 26 +++--- lib/routes/twitter/api/web-api/utils.ts | 114 +++++++++++++----------- 2 files changed, 78 insertions(+), 62 deletions(-) diff --git a/lib/routes/twitter/api/web-api/api.ts b/lib/routes/twitter/api/web-api/api.ts index 779a02c36633e8b..2d03d6476f6ae9a 100644 --- a/lib/routes/twitter/api/web-api/api.ts +++ b/lib/routes/twitter/api/web-api/api.ts @@ -18,16 +18,22 @@ const getUserData = (id) => }), }); } - return twitterGot(`${baseUrl}${gqlMap.UserByScreenName}`, { - variables: JSON.stringify({ - screen_name: id, - withSafetyModeUserFields: true, - }), - features: JSON.stringify(gqlFeatures.UserByScreenName), - fieldToggles: JSON.stringify({ - withAuxiliaryUserLabels: false, - }), - }); + return twitterGot( + `${baseUrl}${gqlMap.UserByScreenName}`, + { + variables: JSON.stringify({ + screen_name: id, + withSafetyModeUserFields: true, + }), + features: JSON.stringify(gqlFeatures.UserByScreenName), + fieldToggles: JSON.stringify({ + withAuxiliaryUserLabels: false, + }), + }, + { + allowNoAuth: true, + } + ); }); const cacheTryGet = async (_id, params, func) => { diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 31215173c4457b3..9f5f14b8519a14e 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -57,17 +57,23 @@ const getAuth = async (retry: number) => { } }; -export const twitterGot = async (url, params) => { +export const twitterGot = async ( + url, + params, + options?: { + allowNoAuth?: boolean; + } +) => { const auth = await getAuth(30); - if (!auth) { + if (!auth && !options?.allowNoAuth) { throw new ConfigNotFoundError('No valid Twitter token found'); } const requestUrl = `${url}?${queryString.stringify(params)}`; - let cookie: string | Record | null | undefined = await token2Cookie(auth.token); - if (!cookie) { + let cookie: string | Record | null | undefined = auth?.token ? await token2Cookie(auth.token) : null; + if (!cookie && auth) { cookie = await login({ username: auth.username, password: auth.password, @@ -81,7 +87,7 @@ export const twitterGot = async (url, params) => { } | undefined; if (cookie) { - logger.debug(`twitter debug: got twitter cookie for token ${auth.token}`); + logger.debug(`twitter debug: got twitter cookie for token ${auth?.token}`); if (typeof cookie === 'string') { cookie = JSON.parse(cookie); } @@ -99,16 +105,18 @@ export const twitterGot = async (url, params) => { jar, agent, }; - } else { - throw new ConfigNotFoundError(`Twitter cookie for token ${auth.token} is not valid`); + } else if (auth) { + throw new ConfigNotFoundError(`Twitter cookie for token ${auth?.token} is not valid`); } - const jsonCookie = Object.fromEntries( - dispatchers.jar - .getCookieStringSync(url) - .split(';') - .map((c) => Cookie.parse(c)?.toJSON()) - .map((c) => [c?.key, c?.value]) - ); + const jsonCookie = dispatchers + ? Object.fromEntries( + dispatchers.jar + .getCookieStringSync(url) + .split(';') + .map((c) => Cookie.parse(c)?.toJSON()) + .map((c) => [c?.key, c?.value]) + ) + : {}; const response = await ofetch.raw(requestUrl, { retry: 0, @@ -127,56 +135,58 @@ export const twitterGot = async (url, params) => { 'x-twitter-client-language': 'en', 'x-csrf-token': jsonCookie.ct0, }, - dispatcher: dispatchers.agent, + dispatcher: dispatchers?.agent, onResponse: async ({ response }) => { const remaining = response.headers.get('x-rate-limit-remaining'); const reset = response.headers.get('x-rate-limit-reset'); - logger.debug(`twitter debug: twitter rate limit remaining for token ${auth.token} is ${remaining} and reset at ${reset}`); - if (remaining === '0' && reset) { - const resetTime = new Date(Number.parseInt(reset) * 1000); - logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}, will unlock at ${resetTime}`); - await cache.set(`${lockPrefix}${auth.token}`, '1', (resetTime.getTime() - Date.now()) / 1000); - } else if (response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') { - logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}`); - await cache.set(`${lockPrefix}${auth.token}`, '1', 2000); - } else if (response.status === 403 || response.status === 401) { - const newCookie = await login({ - username: auth.username, - password: auth.password, - authenticationSecret: auth.authenticationSecret, - }); - if (newCookie) { - logger.debug(`twitter debug: reset twitter cookie for token ${auth.token}, ${newCookie}`); - await cache.set(`twitter:cookie:${auth.token}`, newCookie, config.cache.contentExpire); - logger.debug(`twitter debug: unlock twitter cookie for token ${auth.token} with error1`); - await cache.set(`${lockPrefix}${auth.token}`, '', 1); - } else { - const tokenIndex = config.twitter.authToken?.indexOf(auth.token); - if (tokenIndex !== undefined && tokenIndex !== -1) { - config.twitter.authToken?.splice(tokenIndex, 1); - } - if (auth.username) { - const usernameIndex = config.twitter.username?.indexOf(auth.username); - if (usernameIndex !== undefined && usernameIndex !== -1) { - config.twitter.username?.splice(usernameIndex, 1); + logger.debug(`twitter debug: twitter rate limit remaining for token ${auth?.token} is ${remaining} and reset at ${reset}`); + if (auth) { + if (remaining === '0' && reset) { + const resetTime = new Date(Number.parseInt(reset) * 1000); + logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}, will unlock at ${resetTime}`); + await cache.set(`${lockPrefix}${auth.token}`, '1', (resetTime.getTime() - Date.now()) / 1000); + } else if (response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') { + logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}`); + await cache.set(`${lockPrefix}${auth.token}`, '1', 2000); + } else if (response.status === 403 || response.status === 401) { + const newCookie = await login({ + username: auth.username, + password: auth.password, + authenticationSecret: auth.authenticationSecret, + }); + if (newCookie) { + logger.debug(`twitter debug: reset twitter cookie for token ${auth.token}, ${newCookie}`); + await cache.set(`twitter:cookie:${auth.token}`, newCookie, config.cache.contentExpire); + logger.debug(`twitter debug: unlock twitter cookie for token ${auth.token} with error1`); + await cache.set(`${lockPrefix}${auth.token}`, '', 1); + } else { + const tokenIndex = config.twitter.authToken?.indexOf(auth.token); + if (tokenIndex !== undefined && tokenIndex !== -1) { + config.twitter.authToken?.splice(tokenIndex, 1); } - } - if (auth.password) { - const passwordIndex = config.twitter.password?.indexOf(auth.password); - if (passwordIndex !== undefined && passwordIndex !== -1) { - config.twitter.password?.splice(passwordIndex, 1); + if (auth.username) { + const usernameIndex = config.twitter.username?.indexOf(auth.username); + if (usernameIndex !== undefined && usernameIndex !== -1) { + config.twitter.username?.splice(usernameIndex, 1); + } + } + if (auth.password) { + const passwordIndex = config.twitter.password?.indexOf(auth.password); + if (passwordIndex !== undefined && passwordIndex !== -1) { + config.twitter.password?.splice(passwordIndex, 1); + } } + logger.debug(`twitter debug: delete twitter cookie for token ${auth.token} with status ${response.status}, remaining tokens: ${config.twitter.authToken?.length}`); + await cache.set(`${lockPrefix}${auth.token}`, '1', 86400); } - logger.debug(`twitter debug: delete twitter cookie for token ${auth.token} with status ${response.status}, remaining tokens: ${config.twitter.authToken?.length}`); - await cache.set(`${lockPrefix}${auth.token}`, '1', 86400); } } }, }); - if (auth.token) { + if (auth?.token) { logger.debug(`twitter debug: update twitter cookie for token ${auth.token}`); - await cache.set(`twitter:cookie:${auth.token}`, JSON.stringify(dispatchers.jar.serializeSync()), config.cache.contentExpire); + await cache.set(`twitter:cookie:${auth.token}`, JSON.stringify(dispatchers?.jar.serializeSync()), config.cache.contentExpire); logger.debug(`twitter debug: unlock twitter cookie with success for token ${auth.token}`); await cache.set(`${lockPrefix}${auth.token}`, '', 1); } From 6f6373932db079588cfb310add89bfda70eb4ae9 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 7 Oct 2024 00:26:09 +0800 Subject: [PATCH 061/740] fix(twitter): gt cookie --- lib/routes/twitter/api/web-api/utils.ts | 28 +++++++++++++++++++------ lib/routes/twitter/media.ts | 2 +- lib/routes/twitter/user.ts | 2 +- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 9f5f14b8519a14e..3b790d7090b3a66 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -24,9 +24,19 @@ const token2Cookie = (token) => uri: proxy.proxyUri, }) : new CookieAgent({ cookies: { jar } }); - await ofetch('https://x.com', { - dispatcher: agent, - }); + if (token) { + await ofetch('https://x.com', { + dispatcher: agent, + }); + } else { + const data = await ofetch('https://x.com/narendramodi?mx=2', { + dispatcher: agent, + }); + const gt = data.match(/document\.cookie="gt=(\d+)/)?.[1]; + if (gt) { + jar.setCookieSync(`gt=${gt}`, 'https://x.com'); + } + } return JSON.stringify(jar.serializeSync()); } catch { // ignore @@ -72,7 +82,7 @@ export const twitterGot = async ( const requestUrl = `${url}?${queryString.stringify(params)}`; - let cookie: string | Record | null | undefined = auth?.token ? await token2Cookie(auth.token) : null; + let cookie: string | Record | null | undefined = await token2Cookie(auth?.token); if (!cookie && auth) { cookie = await login({ username: auth.username, @@ -129,11 +139,17 @@ export const twitterGot = async ( 'content-type': 'application/json', dnt: '1', pragma: 'no-cache', - referer: 'https://x.com/narendramodi', + referer: 'https://x.com/', 'x-twitter-active-user': 'yes', - 'x-twitter-auth-type': 'OAuth2Session', 'x-twitter-client-language': 'en', 'x-csrf-token': jsonCookie.ct0, + ...(auth?.token + ? { + 'x-twitter-auth-type': 'OAuth2Session', + } + : { + 'x-guest-token': jsonCookie.gt, + }), }, dispatcher: dispatchers?.agent, onResponse: async ({ response }) => { diff --git a/lib/routes/twitter/media.ts b/lib/routes/twitter/media.ts index b07d1a479b23f95..a8f87abcaf64b87 100644 --- a/lib/routes/twitter/media.ts +++ b/lib/routes/twitter/media.ts @@ -52,7 +52,7 @@ async function handler(ctx) { try { data = await api.getUserMedia(id, params); } catch (error) { - logger.debug(error); + logger.error(error); } const profileImageUrl = userInfo?.profile_image_url || userInfo?.profile_image_url_https; diff --git a/lib/routes/twitter/user.ts b/lib/routes/twitter/user.ts index a3055bfe7145f2d..c4b20fc584c648d 100644 --- a/lib/routes/twitter/user.ts +++ b/lib/routes/twitter/user.ts @@ -66,7 +66,7 @@ async function handler(ctx) { data = utils.excludeRetweet(data); } } catch (error) { - logger.debug(error); + logger.error(error); } const profileImageUrl = userInfo?.profile_image_url || userInfo?.profile_image_url_https; From 9b144a715f1dba63c508930de336c7873642f71b Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 7 Oct 2024 01:50:26 +0800 Subject: [PATCH 062/740] fix(twitter): debug --- lib/routes/twitter/api/web-api/utils.ts | 5 +++-- lib/utils/cache/redis.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 3b790d7090b3a66..46439d110322756 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -159,8 +159,9 @@ export const twitterGot = async ( if (auth) { if (remaining === '0' && reset) { const resetTime = new Date(Number.parseInt(reset) * 1000); - logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}, will unlock at ${resetTime}`); - await cache.set(`${lockPrefix}${auth.token}`, '1', (resetTime.getTime() - Date.now()) / 1000); + const delay = (resetTime.getTime() - Date.now()) / 1000; + logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}, will unlock after ${delay}s`); + await cache.set(`${lockPrefix}${auth.token}`, '1', delay); } else if (response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') { logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}`); await cache.set(`${lockPrefix}${auth.token}`, '1', 2000); diff --git a/lib/utils/cache/redis.ts b/lib/utils/cache/redis.ts index 7830b49febd6d8c..ae40fe383ea1e0c 100644 --- a/lib/utils/cache/redis.ts +++ b/lib/utils/cache/redis.ts @@ -65,7 +65,7 @@ export default { if (key) { if (maxAge !== config.cache.contentExpire) { // Only set cacheTtlKey if maxAge !== contentExpire - clients.redisClient.set(getCacheTtlKey(key), maxAge, 'EX', maxAge); + clients.redisClient.set(getCacheTtlKey(key), value, 'EX', maxAge); } return clients.redisClient.set(key, value, 'EX', maxAge); // setMode: https://redis.io/commands/set } From 77bf780b959471e2c764129a09740390f9f66608 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Mon, 7 Oct 2024 02:08:31 +0800 Subject: [PATCH 063/740] fix(twitter): lock ceil --- lib/routes/twitter/api/web-api/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 46439d110322756..b656924675f1ed5 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -161,7 +161,7 @@ export const twitterGot = async ( const resetTime = new Date(Number.parseInt(reset) * 1000); const delay = (resetTime.getTime() - Date.now()) / 1000; logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}, will unlock after ${delay}s`); - await cache.set(`${lockPrefix}${auth.token}`, '1', delay); + await cache.set(`${lockPrefix}${auth.token}`, '1', Math.ceil(delay)); } else if (response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') { logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}`); await cache.set(`${lockPrefix}${auth.token}`, '1', 2000); From 8a60688bda4d7b981807e57f45521ed9c0f7b575 Mon Sep 17 00:00:00 2001 From: "J. H. Cao" <33237634+jhcao1024@users.noreply.github.com> Date: Sun, 6 Oct 2024 15:35:14 -0700 Subject: [PATCH 064/740] fix(route/huggingface): sanitize the pubDate value to capture blog publication date (#17016) --- lib/routes/huggingface/blog-zh.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/huggingface/blog-zh.ts b/lib/routes/huggingface/blog-zh.ts index 732dd4f96009ee1..df4117fb346bcc2 100644 --- a/lib/routes/huggingface/blog-zh.ts +++ b/lib/routes/huggingface/blog-zh.ts @@ -47,7 +47,7 @@ async function handler() { title: item.blog.title, link: `https://huggingface.co${item.link}`, category: item.blog.tags, - pubDate: parseDate(item.blog.date), + pubDate: parseDate(item.blog.publishedAt), author: item.blog.author, })); From 3f7c467b70e6e9351a33612d7196da38812dbee2 Mon Sep 17 00:00:00 2001 From: ueiu <39592269+ueiu@users.noreply.github.com> Date: Mon, 7 Oct 2024 08:26:41 +0800 Subject: [PATCH 065/740] =?UTF-8?q?fix(route/sciencenet):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E7=A7=91=E5=AD=A6=E7=BD=91=20-=20=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=8D=9A=E5=AE=A2=E6=B2=A1=E6=9C=89=E6=8C=89=E7=85=A7=E6=97=B6?= =?UTF-8?q?=E9=97=B4=E7=BA=BF=E5=80=92=E5=BA=8F=E6=8E=92=E5=BA=8F=20(#1700?= =?UTF-8?q?7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/sciencenet/user.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/sciencenet/user.ts b/lib/routes/sciencenet/user.ts index fbf3754566232dd..9d4f79239e91958 100644 --- a/lib/routes/sciencenet/user.ts +++ b/lib/routes/sciencenet/user.ts @@ -31,6 +31,7 @@ export const route: Route = { async function handler(ctx) { const id = ctx.req.param('id'); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50; const rootUrl = 'https://blog.sciencenet.cn'; const currentUrl = `${rootUrl}/u/${id}`; @@ -51,8 +52,9 @@ async function handler(ctx) { $ = load(response.data); let items = $('item') - .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50) + .slice(-limit) .toArray() + .reverse() .map((item) => { item = $(item); From 471d146dffd684605cb44f801a2fb78aebaddd6a Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Mon, 7 Oct 2024 08:54:44 +0800 Subject: [PATCH 066/740] fix(route/zhihu): Sanitize the title when parsing "pins" with links. (#17010) * fix(route/zhihu): Sanitize the title when parsing "pins" with links. * Use `sanitizeHtml` instead --------- --- lib/routes/zhihu/activities.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/zhihu/activities.ts b/lib/routes/zhihu/activities.ts index 29c8b8cc19c0951..62b45b3644eabbb 100644 --- a/lib/routes/zhihu/activities.ts +++ b/lib/routes/zhihu/activities.ts @@ -2,6 +2,7 @@ import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { header, processImage, getSignedHeader } from './utils'; import { parseDate } from '@/utils/parse-date'; +import sanitizeHtml from 'sanitize-html'; export const route: Route = { path: '/people/activities/:id', @@ -75,7 +76,7 @@ async function handler(ctx) { url = `https://zhuanlan.zhihu.com/p/${detail.id}`; break; case 'pin': - title = detail.excerpt_title; + title = sanitizeHtml(detail.excerpt_title); author = detail.author.name; for (const contentItem of detail.content) { switch (contentItem.type) { From e246d3202fa705cd7b0d920d9f7f92a3f2ae4e05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 06:33:46 -0700 Subject: [PATCH 067/740] chore(deps-dev): bump @eslint/js from 9.11.1 to 9.12.0 (#17018) * chore(deps-dev): bump @eslint/js from 9.11.1 to 9.12.0 Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.11.1 to 9.12.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.12.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 51 ++++++++++++++++++++++++++++---------------------- 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index fc5e29c5962cb1a..537abe1f37f04e8 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "@babel/preset-env": "7.25.7", "@babel/preset-typescript": "7.25.7", "@eslint/eslintrc": "3.1.0", - "@eslint/js": "9.11.1", + "@eslint/js": "9.12.0", "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "2.8.0", "@types/aes-js": "3.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6c6248a67a8be23..9f202dec3e02766 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -268,8 +268,8 @@ importers: specifier: 3.1.0 version: 3.1.0 '@eslint/js': - specifier: 9.11.1 - version: 9.11.1 + specifier: 9.12.0 + version: 9.12.0 '@microsoft/eslint-formatter-sarif': specifier: 3.1.0 version: 3.1.0 @@ -433,8 +433,8 @@ packages: resolution: {integrity: sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==} engines: {node: '>=6.0.0'} - '@asteasolutions/zod-to-openapi@7.1.2': - resolution: {integrity: sha512-tuDcV4aGAlY4eaZ8Qmf1efPL33hwJKdpCSbI6vJqXU5Wkz9IIyCrb3u3fExZyyMGzmLKcJH+CHI5UKvNBPlyjg==} + '@asteasolutions/zod-to-openapi@7.2.0': + resolution: {integrity: sha512-Va+Fq1QzKkSgmiYINSp3cASFhMsbdRH/kmCk2feijhC+yNjGoC056CRqihrVFhR8MY8HOZHdlYm2Ns2lmszCiw==} peerDependencies: zod: ^3.20.2 @@ -1376,6 +1376,10 @@ packages: resolution: {integrity: sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.12.0': + resolution: {integrity: sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==} + 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} @@ -1416,8 +1420,8 @@ packages: resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} deprecated: Use @eslint/object-schema instead - '@humanwhocodes/retry@0.3.0': - resolution: {integrity: sha512-d2CGZR2o7fS6sWB7DG/3a95bGKQyHMACZ5aW8qGkkqQpUoZV6C0X7Pc7l4ZNMZkfNBf4VWNe9E1jRsf0G146Ew==} + '@humanwhocodes/retry@0.3.1': + resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} '@ianvs/eslint-stats@2.0.0': @@ -1432,8 +1436,8 @@ packages: resolution: {integrity: sha512-F2VBt7W/mwqEU4bL0RnHNZmC/OxzNx9cOYxHqnXX3MP6ruYvZUZAW9imgN9+h/uBT/oP8Gh888J2OZSbjSeWcg==} engines: {node: '>=18'} - '@inquirer/figures@1.0.6': - resolution: {integrity: sha512-yfZzps3Cso2UbM7WlxKwZQh2Hs6plrbjs1QnzQDZhK2DgyCo6D8AaHps9olkNcUFlcYERMqU3uJSp1gmy3s/qQ==} + '@inquirer/figures@1.0.7': + resolution: {integrity: sha512-m+Trk77mp54Zma6xLkLuY+mvanPxlE4A7yNKs2HBiyZ4UkVs28Mv5c/pgWrHeInx+USHeX/WEPzjrWrcJiQgjw==} engines: {node: '>=18'} '@inquirer/type@1.5.5': @@ -3032,6 +3036,7 @@ packages: eslint@8.57.1: resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true eslint@9.11.1: @@ -4850,8 +4855,8 @@ packages: resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} hasBin: true - regjsparser@0.11.0: - resolution: {integrity: sha512-vTbzVAjQDzwQdKuvj7qEq6OlAprCjE656khuGQ4QaBLg7abQ9I9ISpmLuc6inWe7zP75AECjqUa4g4sdQvOXhg==} + regjsparser@0.11.1: + resolution: {integrity: sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==} hasBin: true relateurl@0.2.7: @@ -5247,8 +5252,8 @@ packages: symbol-tree@3.2.4: resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - synckit@0.9.1: - resolution: {integrity: sha512-7gr8p9TQP6RAHusBOSLs46F4564ZrjV8xFmw5zCmgmhGUcw2hxsShhJ6CEiHQMgPDwAQ1fWHPM0ypc4RMAig4A==} + synckit@0.9.2: + resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} engines: {node: ^14.18.0 || >=16.0.0} tapable@2.2.1: @@ -5870,7 +5875,7 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@asteasolutions/zod-to-openapi@7.1.2(zod@3.23.8)': + '@asteasolutions/zod-to-openapi@7.2.0(zod@3.23.8)': dependencies: openapi3-ts: 4.4.0 zod: 3.23.8 @@ -6895,6 +6900,8 @@ snapshots: '@eslint/js@9.11.1': {} + '@eslint/js@9.12.0': {} + '@eslint/object-schema@2.1.4': {} '@eslint/plugin-kit@0.2.0': @@ -6907,7 +6914,7 @@ snapshots: '@hono/zod-openapi@0.16.3(hono@4.6.3)(zod@3.23.8)': dependencies: - '@asteasolutions/zod-to-openapi': 7.1.2(zod@3.23.8) + '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) '@hono/zod-validator': 0.3.0(hono@4.6.3)(zod@3.23.8) hono: 4.6.3 zod: 3.23.8 @@ -6929,7 +6936,7 @@ snapshots: '@humanwhocodes/object-schema@2.0.3': {} - '@humanwhocodes/retry@0.3.0': {} + '@humanwhocodes/retry@0.3.1': {} '@ianvs/eslint-stats@2.0.0': dependencies: @@ -6943,7 +6950,7 @@ snapshots: '@inquirer/core@9.2.1': dependencies: - '@inquirer/figures': 1.0.6 + '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 '@types/node': 22.7.4 @@ -6956,7 +6963,7 @@ snapshots: wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.2 - '@inquirer/figures@1.0.6': {} + '@inquirer/figures@1.0.7': {} '@inquirer/type@1.5.5': dependencies: @@ -8673,7 +8680,7 @@ snapshots: eslint: 9.11.1 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 - synckit: 0.9.1 + synckit: 0.9.2 optionalDependencies: '@types/eslint': 9.6.1 eslint-config-prettier: 9.1.0(eslint@9.11.1) @@ -8781,7 +8788,7 @@ snapshots: '@eslint/js': 9.11.1 '@eslint/plugin-kit': 0.2.0 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.0 + '@humanwhocodes/retry': 0.3.1 '@nodelib/fs.walk': 1.2.8 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 @@ -10825,7 +10832,7 @@ snapshots: regenerate: 1.4.2 regenerate-unicode-properties: 10.2.0 regjsgen: 0.8.0 - regjsparser: 0.11.0 + regjsparser: 0.11.1 unicode-match-property-ecmascript: 2.0.0 unicode-match-property-value-ecmascript: 2.2.0 @@ -10835,7 +10842,7 @@ snapshots: dependencies: jsesc: 0.5.0 - regjsparser@0.11.0: + regjsparser@0.11.1: dependencies: jsesc: 3.0.2 @@ -11256,7 +11263,7 @@ snapshots: symbol-tree@3.2.4: {} - synckit@0.9.1: + synckit@0.9.2: dependencies: '@pkgr/core': 0.1.1 tslib: 2.7.0 From 4439a092fafa9373d53ac4af65d64f0f64d19197 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 06:34:09 -0700 Subject: [PATCH 068/740] chore(deps): bump @tonyrl/rand-user-agent from 2.0.80 to 2.0.81 (#17023) * chore(deps): bump @tonyrl/rand-user-agent from 2.0.80 to 2.0.81 Bumps [@tonyrl/rand-user-agent](https://github.com/TonyRL/rand-user-agent) from 2.0.80 to 2.0.81. - [Release notes](https://github.com/TonyRL/rand-user-agent/releases) - [Commits](https://github.com/TonyRL/rand-user-agent/compare/v2.0.80...v2.0.81) --- updated-dependencies: - dependency-name: "@tonyrl/rand-user-agent" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 537abe1f37f04e8..0c9f95c3d74e36e 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@rss3/sdk": "0.0.19", "@scalar/hono-api-reference": "0.5.150", "@sentry/node": "7.119.1", - "@tonyrl/rand-user-agent": "2.0.80", + "@tonyrl/rand-user-agent": "2.0.81", "aes-js": "3.1.2", "art-template": "4.13.2", "bbcodejs": "0.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9f202dec3e02766..5bf7929a0550a84 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,8 +51,8 @@ importers: specifier: 7.119.1 version: 7.119.1 '@tonyrl/rand-user-agent': - specifier: 2.0.80 - version: 2.0.80 + specifier: 2.0.81 + version: 2.0.81 aes-js: specifier: 3.1.2 version: 3.1.2 @@ -1826,8 +1826,8 @@ packages: resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} engines: {node: '>=14.16'} - '@tonyrl/rand-user-agent@2.0.80': - resolution: {integrity: sha512-Q95jp6GSxLgtLl1WQXYKoFsIDrv6sjDHwNLq3CTtT2v06ZIKhCAozeT1gYFtyhgesVRZA8rYqAvP7ZZcq6tGyQ==} + '@tonyrl/rand-user-agent@2.0.81': + resolution: {integrity: sha512-pL8is8iSle1gVPeNGSIKNpnyDaxSChWAtG7Kbbx1wq91Y8NJ+O+S/AsNvrQ7GVzKZF7rPTiRGl2eHNDVjdR2/A==} engines: {node: '>=14.16'} '@tootallnate/quickjs-emscripten@0.23.0': @@ -7388,7 +7388,7 @@ snapshots: dependencies: defer-to-connect: 2.0.1 - '@tonyrl/rand-user-agent@2.0.80': {} + '@tonyrl/rand-user-agent@2.0.81': {} '@tootallnate/quickjs-emscripten@0.23.0': {} From 36e2646cbe12d4aecae5426a285cc09475bff07e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 06:34:56 -0700 Subject: [PATCH 069/740] chore(deps): bump telegram from 2.25.11 to 2.25.15 (#17022) * chore(deps): bump telegram from 2.25.11 to 2.25.15 Bumps [telegram](https://github.com/gram-js/gramjs) from 2.25.11 to 2.25.15. - [Release notes](https://github.com/gram-js/gramjs/releases) - [Commits](https://github.com/gram-js/gramjs/commits) --- updated-dependencies: - dependency-name: telegram dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 0c9f95c3d74e36e..59a88d61dec97ad 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "simplecc-wasm": "1.0.0", "socks-proxy-agent": "8.0.4", "source-map": "0.7.4", - "telegram": "2.25.11", + "telegram": "2.25.15", "tiny-async-pool": "2.1.0", "title": "3.5.3", "tldts": "6.1.50", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5bf7929a0550a84..bbb4c8d8c919b39 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -219,8 +219,8 @@ importers: specifier: 0.7.4 version: 0.7.4 telegram: - specifier: 2.25.11 - version: 2.25.11 + specifier: 2.25.15 + version: 2.25.15 tiny-async-pool: specifier: 2.1.0 version: 2.1.0 @@ -5270,8 +5270,8 @@ packages: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} - telegram@2.25.11: - resolution: {integrity: sha512-OgkbBZNooaPbO8TG7+qhhjCoUhRfvsnU+6Tx9+8v07mkcNNcR+2CQ0TiHz3TF4oAmZUf+x418WREDOqbuNlZ6w==} + telegram@2.25.15: + resolution: {integrity: sha512-kB6yNtrodeCrkM/ei/1Ksq8eOMUIlhZ/zWSAjFsJes1PCcYt6qblME7IPJI3re4FKLw0V+ptt4GH6/DGIu/OqA==} test-exclude@7.0.1: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} @@ -11293,7 +11293,7 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 - telegram@2.25.11: + telegram@2.25.15: dependencies: '@cryptography/aes': 0.1.1 async-mutex: 0.3.2 From 9bc570e52dec14ec7843e55b31491b0bd936f883 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 06:35:21 -0700 Subject: [PATCH 070/740] chore(deps): bump twitter-api-v2 from 1.17.2 to 1.18.0 (#17026) * chore(deps): bump twitter-api-v2 from 1.17.2 to 1.18.0 Bumps [twitter-api-v2](https://github.com/plhery/node-twitter-api-v2) from 1.17.2 to 1.18.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.17.2...1.18.0) --- updated-dependencies: - dependency-name: twitter-api-v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 59a88d61dec97ad..412375e26cf1966 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.1", - "twitter-api-v2": "1.17.2", + "twitter-api-v2": "1.18.0", "undici": "6.19.8", "uuid": "10.0.0", "winston": "3.14.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bbb4c8d8c919b39..f0814714cdb014b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -240,8 +240,8 @@ importers: specifier: 4.19.1 version: 4.19.1 twitter-api-v2: - specifier: 1.17.2 - version: 1.17.2 + specifier: 1.18.0 + version: 1.18.0 undici: specifier: 6.19.8 version: 6.19.8 @@ -5439,8 +5439,8 @@ packages: tweetnacl@0.14.5: resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} - twitter-api-v2@1.17.2: - resolution: {integrity: sha512-V8QvCkuQ+ydIakwYbVC4cuQxGlvjdRZI0L7TT5v9zGsf+SwX40rv3IFRHB8Z1cXJLcRFT0FI3xG3/f4zwS6cRA==} + twitter-api-v2@1.18.0: + resolution: {integrity: sha512-dhrj9wV2qQnHqlbFzt9qpb3mdK1oFcK3llFUnlFe8al19SrXlF3jHk3Y42wT0VRtF9LwpUeJ4QdHiqAiDgrTrg==} type-check@0.3.2: resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} @@ -11451,7 +11451,7 @@ snapshots: tweetnacl@0.14.5: {} - twitter-api-v2@1.17.2: {} + twitter-api-v2@1.18.0: {} type-check@0.3.2: dependencies: From 3c7e75db8eb7bac6cce1ac89be3a501616e3c61d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 06:36:02 -0700 Subject: [PATCH 071/740] chore(deps): bump winston from 3.14.2 to 3.15.0 (#17020) * chore(deps): bump winston from 3.14.2 to 3.15.0 Bumps [winston](https://github.com/winstonjs/winston) from 3.14.2 to 3.15.0. - [Release notes](https://github.com/winstonjs/winston/releases) - [Changelog](https://github.com/winstonjs/winston/blob/master/CHANGELOG.md) - [Commits](https://github.com/winstonjs/winston/compare/v3.14.2...v3.15.0) --- updated-dependencies: - dependency-name: winston dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 412375e26cf1966..91b94f0767a8ef1 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "twitter-api-v2": "1.18.0", "undici": "6.19.8", "uuid": "10.0.0", - "winston": "3.14.2", + "winston": "3.15.0", "xxhash-wasm": "1.0.2", "zod": "3.23.8" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f0814714cdb014b..e0d677c42cc2a02 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -249,8 +249,8 @@ importers: specifier: 10.0.0 version: 10.0.0 winston: - specifier: 3.14.2 - version: 3.14.2 + specifier: 3.15.0 + version: 3.15.0 xxhash-wasm: specifier: 1.0.2 version: 1.0.2 @@ -5736,8 +5736,8 @@ packages: resolution: {integrity: sha512-qxSTKswC6llEMZKgCQdaWgDuMJQnhuvF5f2Nk3SNXc4byfQ+voo2mX1Px9dkNOuR8p0KAjfPG29PuYUSIb+vSA==} engines: {node: '>= 12.0.0'} - winston@3.14.2: - resolution: {integrity: sha512-CO8cdpBB2yqzEf8v895L+GNKYJiEq8eKlHU38af3snQBQ+sdAIUepjMSguOIJC7ICbzm0ZI+Af2If4vIJrtmOg==} + winston@3.15.0: + resolution: {integrity: sha512-RhruH2Cj0bV0WgNL+lOfoUBI4DVfdUNjVnJGVovWZmrcKtrFTTRzgXYK2O9cymSGjrERCtaAeHwMNnUWXlwZow==} engines: {node: '>= 12.0.0'} word-wrap@1.2.5: @@ -11729,7 +11729,7 @@ snapshots: readable-stream: 4.5.2 triple-beam: 1.4.1 - winston@3.14.2: + winston@3.15.0: dependencies: '@colors/colors': 1.6.0 '@dabh/diagnostics': 2.0.3 From db0d03d84b1d39e645b10b7b44deba65e2c1216c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 06:49:11 -0700 Subject: [PATCH 072/740] chore(deps): bump @rss3/sdk from 0.0.19 to 0.0.22 (#17028) * chore(deps): bump @rss3/sdk from 0.0.19 to 0.0.22 Bumps @rss3/sdk from 0.0.19 to 0.0.22. --- updated-dependencies: - dependency-name: "@rss3/sdk" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 45 +++++++++++++++++++-------------------------- 2 files changed, 20 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index 91b94f0767a8ef1..f70717f2a73caba 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@opentelemetry/sdk-trace-base": "1.26.0", "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", - "@rss3/sdk": "0.0.19", + "@rss3/sdk": "0.0.22", "@scalar/hono-api-reference": "0.5.150", "@sentry/node": "7.119.1", "@tonyrl/rand-user-agent": "2.0.81", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e0d677c42cc2a02..1444bb149a04216 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,8 +42,8 @@ importers: specifier: 2.2.3 version: 2.2.3 '@rss3/sdk': - specifier: 0.0.19 - version: 0.0.19 + specifier: 0.0.22 + version: 0.0.22 '@scalar/hono-api-reference': specifier: 0.5.150 version: 0.5.150(hono@4.6.3) @@ -1755,14 +1755,14 @@ packages: cpu: [x64] os: [win32] - '@rss3/api-core@0.0.19': - resolution: {integrity: sha512-1wfBJOxN1i+KK6u6zE8IejefHNnmR4ZxxfrKJDQC8KMiudQ4zM2ZSsgDiXhYGCkKMCJg32PtNE8Klxb+Jgo4Mw==} + '@rss3/api-core@0.0.22': + resolution: {integrity: sha512-5e53edybUCXK41TVRE1UaEmFdaZZhKHvi93dMJNHuR7AB048PM/1IbsaqIp8uVYfWEG1C6USe6ofOt1/XsNk+w==} - '@rss3/api-utils@0.0.19': - resolution: {integrity: sha512-PcO4Q8fHlZaSNEujCnraO3tMxj9a1uFXh415bdW0AusAgP7aZ5f3bIr+UcX3BV3kxjBGWyJbpJsjaDkBVyVInQ==} + '@rss3/api-utils@0.0.22': + resolution: {integrity: sha512-kUmdZerCdolr9p7saVN48Lpu75WP/Fa20c+iYbCerIeMcqo2aHnEgH8YUKdqbjMH+HkO1Vv6b4tIYkMkF+sa/Q==} - '@rss3/sdk@0.0.19': - resolution: {integrity: sha512-4e4kEvUlxPIDw8NrMv+TYeIBZacphDEN8nrdY3+5hlGd+ZLYsAh76dKkYSoLjTNbp1k9UCxQxvaAr22m+hYiug==} + '@rss3/sdk@0.0.22': + resolution: {integrity: sha512-yBfxbEoVxzBWeCccWDTH6VXy+TxkTnW7D8QwKbq+IQVb8ou7g1vw9oLy4E4yEu2CJ8XEZNE2BaTl2l0BWxcGOQ==} '@scalar/hono-api-reference@0.5.150': resolution: {integrity: sha512-KGXaE8iEuYL2EhCDc9vBPw3a6+cj552b85EbflEUijOgLhKhcoDb2A/QIgyuk/89Us3mrWJubEZ8NiH8dMLd8Q==} @@ -3315,9 +3315,6 @@ packages: resolution: {integrity: sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==} engines: {node: '>=18'} - get-func-name@2.0.2: - resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} - get-intrinsic@1.2.4: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} @@ -4013,8 +4010,8 @@ packages: long@5.2.3: resolution: {integrity: sha512-lcHwpNoggQTObv5apGNCTdJrO69eHOZMi4BNC+rTLER8iHAqGrUVeLh/irVIM7zTw2bOXA8T6uNPeujwOLg/2Q==} - loupe@3.1.1: - resolution: {integrity: sha512-edNu/8D5MKVfGVFRhFf8aAxiTM6Wumfz5XsaatSxlD3w4R1d/WEKUTydCdPGbl9K7QG/Ca3GnDV2sIKIpXRQcw==} + loupe@3.1.2: + resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} lower-case@1.1.4: resolution: {integrity: sha512-2Fgx1Ycm599x+WGpIYwJOvsjmXFzTSc34IwDWALRA/8AopUKAVPwfJ+h5+f85BCp0PWmmJcWzEpxOpoXycMpdA==} @@ -7302,20 +7299,20 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.24.0': optional: true - '@rss3/api-core@0.0.19': + '@rss3/api-core@0.0.22': dependencies: openapi-fetch: 0.11.3 ts-case-convert: 2.1.0 type-fest: 4.26.1 - '@rss3/api-utils@0.0.19': + '@rss3/api-utils@0.0.22': dependencies: - '@rss3/api-core': 0.0.19 + '@rss3/api-core': 0.0.22 - '@rss3/sdk@0.0.19': + '@rss3/sdk@0.0.22': dependencies: - '@rss3/api-core': 0.0.19 - '@rss3/api-utils': 0.0.19 + '@rss3/api-core': 0.0.22 + '@rss3/api-utils': 0.0.22 '@scalar/hono-api-reference@0.5.150(hono@4.6.3)': dependencies: @@ -7702,7 +7699,7 @@ snapshots: dependencies: '@vitest/pretty-format': 2.0.5 estree-walker: 3.0.3 - loupe: 3.1.1 + loupe: 3.1.2 tinyrainbow: 1.2.0 abbrev@1.1.1: {} @@ -8017,7 +8014,7 @@ snapshots: assertion-error: 2.0.1 check-error: 2.1.1 deep-eql: 5.0.2 - loupe: 3.1.1 + loupe: 3.1.2 pathval: 2.0.0 chalk@1.1.3: @@ -9113,8 +9110,6 @@ snapshots: get-east-asian-width@1.2.0: {} - get-func-name@2.0.2: {} - get-intrinsic@1.2.4: dependencies: es-errors: 1.3.0 @@ -9898,9 +9893,7 @@ snapshots: long@5.2.3: {} - loupe@3.1.1: - dependencies: - get-func-name: 2.0.2 + loupe@3.1.2: {} lower-case@1.1.4: {} From 30f3b44e15749227cccffd859af921081f30ff10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 06:49:38 -0700 Subject: [PATCH 073/740] chore(deps-dev): bump @stylistic/eslint-plugin from 2.8.0 to 2.9.0 (#17019) * chore(deps-dev): bump @stylistic/eslint-plugin from 2.8.0 to 2.9.0 Bumps [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin) from 2.8.0 to 2.9.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/v2.9.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@stylistic/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 f70717f2a73caba..f2c7a38e20d5f7b 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "@eslint/eslintrc": "3.1.0", "@eslint/js": "9.12.0", "@microsoft/eslint-formatter-sarif": "3.1.0", - "@stylistic/eslint-plugin": "2.8.0", + "@stylistic/eslint-plugin": "2.9.0", "@types/aes-js": "3.1.4", "@types/babel__preset-env": "7.9.7", "@types/crypto-js": "4.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1444bb149a04216..2ce6990c98f8580 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -274,8 +274,8 @@ importers: specifier: 3.1.0 version: 3.1.0 '@stylistic/eslint-plugin': - specifier: 2.8.0 - version: 2.8.0(eslint@9.11.1)(typescript@5.6.2) + specifier: 2.9.0 + version: 2.9.0(eslint@9.11.1)(typescript@5.6.2) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -1816,8 +1816,8 @@ packages: resolution: {integrity: sha512-QWLl2P+rsCJeofkDNIT3WFmb6NrRud1SUYW8dIhXK/46XFV8Q/g7Bsvib0Askb0reRLe+WYPeeE+l5cH7SlkuQ==} engines: {node: '>=18'} - '@stylistic/eslint-plugin@2.8.0': - resolution: {integrity: sha512-Ufvk7hP+bf+pD35R/QfunF793XlSRIC7USr3/EdgduK9j13i2JjmsM0LUz3/foS+jDYp2fzyWZA9N44CPur0Ow==} + '@stylistic/eslint-plugin@2.9.0': + resolution: {integrity: sha512-OrDyFAYjBT61122MIY1a3SfEgy3YCMgt2vL4eoPmvTwDBwyQhAXurxNQznlRD/jESNfYWfID8Ej+31LljvF7Xg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' @@ -7369,7 +7369,7 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.8.0(eslint@9.11.1)(typescript@5.6.2)': + '@stylistic/eslint-plugin@2.9.0(eslint@9.11.1)(typescript@5.6.2)': dependencies: '@typescript-eslint/utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2) eslint: 9.11.1 From 61db615d12d268575976b280a995d3da24a62d86 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 06:50:27 -0700 Subject: [PATCH 074/740] chore(deps): bump @hono/zod-openapi from 0.16.3 to 0.16.4 (#17024) * chore(deps): bump @hono/zod-openapi from 0.16.3 to 0.16.4 Bumps [@hono/zod-openapi](https://github.com/honojs/middleware) from 0.16.3 to 0.16.4. - [Release notes](https://github.com/honojs/middleware/releases) - [Commits](https://github.com/honojs/middleware/compare/@hono/zod-openapi@0.16.3...@hono/zod-openapi@0.16.4) --- updated-dependencies: - dependency-name: "@hono/zod-openapi" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 f2c7a38e20d5f7b..8e71a4457d9b732 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ }, "dependencies": { "@hono/node-server": "1.13.1", - "@hono/zod-openapi": "0.16.3", + "@hono/zod-openapi": "0.16.4", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.53.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2ce6990c98f8580..bfd2df1e4c4511c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: 1.13.1 version: 1.13.1(hono@4.6.3) '@hono/zod-openapi': - specifier: 0.16.3 - version: 0.16.3(hono@4.6.3)(zod@3.23.8) + specifier: 0.16.4 + version: 0.16.4(hono@4.6.3)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -1394,8 +1394,8 @@ packages: peerDependencies: hono: ^4 - '@hono/zod-openapi@0.16.3': - resolution: {integrity: sha512-I5gaFkVM2gaAVw41YBjdZ4peDjf8cQvHZVurOkN5l9Qx1lUZCaqqqZHZpdGhSfAPvu2FVlhRd4xSSqrmbnzH4Q==} + '@hono/zod-openapi@0.16.4': + resolution: {integrity: sha512-mnF6GthBaKex0D5PsY/4lYNtkaGJNE38bjeUI//EUqq7Ee4TNm2su35IUiFH4HcmJp5fWYMLyOJOpjnkClzEGw==} engines: {node: '>=16.0.0'} peerDependencies: hono: '>=4.3.6' @@ -6909,7 +6909,7 @@ snapshots: dependencies: hono: 4.6.3 - '@hono/zod-openapi@0.16.3(hono@4.6.3)(zod@3.23.8)': + '@hono/zod-openapi@0.16.4(hono@4.6.3)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) '@hono/zod-validator': 0.3.0(hono@4.6.3)(zod@3.23.8) From ed41cd766a805bd5fb8fbde4244171ffe74b99d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 22:20:39 +0800 Subject: [PATCH 075/740] chore(deps-dev): bump eslint from 9.11.1 to 9.12.0 (#17025) * chore(deps-dev): bump eslint from 9.11.1 to 9.12.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.11.1 to 9.12.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.11.1...v9.12.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 143 ++++++++++++++++++++++++++----------------------- 2 files changed, 76 insertions(+), 69 deletions(-) diff --git a/package.json b/package.json index 8e71a4457d9b732..a7bfd8175c4b5a4 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,7 @@ "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.101", - "eslint": "9.11.1", + "eslint": "9.12.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.10.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bfd2df1e4c4511c..b04792433092ebe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -275,7 +275,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 2.9.0 - version: 2.9.0(eslint@9.11.1)(typescript@5.6.2) + version: 2.9.0(eslint@9.12.0)(typescript@5.6.2) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -344,10 +344,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.8.0 - version: 8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2) + version: 8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2) '@typescript-eslint/parser': specifier: 8.8.0 - version: 8.8.0(eslint@9.11.1)(typescript@5.6.2) + version: 8.8.0(eslint@9.12.0)(typescript@5.6.2) '@vercel/nft': specifier: 0.27.4 version: 0.27.4 @@ -358,26 +358,26 @@ importers: specifier: 0.37.101 version: 0.37.101 eslint: - specifier: 9.11.1 - version: 9.11.1 + specifier: 9.12.0 + version: 9.12.0 eslint-config-prettier: specifier: 9.1.0 - version: 9.1.0(eslint@9.11.1) + version: 9.1.0(eslint@9.12.0) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.11.1) + version: 8.1.0(eslint@9.12.0) eslint-plugin-n: specifier: 17.10.3 - version: 17.10.3(eslint@9.11.1) + version: 17.10.3(eslint@9.12.0) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.11.1))(eslint@9.11.1)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.12.0))(eslint@9.12.0)(prettier@3.3.3) eslint-plugin-unicorn: specifier: 56.0.0 - version: 56.0.0(eslint@9.11.1) + version: 56.0.0(eslint@9.12.0) eslint-plugin-yml: specifier: 1.14.0 - version: 1.14.0(eslint@9.11.1) + version: 1.14.0(eslint@9.12.0) fs-extra: specifier: 11.2.0 version: 11.2.0 @@ -1372,10 +1372,6 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.11.1': - resolution: {integrity: sha512-/qu+TWz8WwPWc7/HcIJKi+c+MOm46GdVaSlTTQcaqaL53+GsoA6MxWp5PtTx48qbSP7ylM1Kn7nhvkugfJvRSA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.12.0': resolution: {integrity: sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1407,6 +1403,14 @@ packages: hono: '>=3.9.0' zod: ^3.19.1 + '@humanfs/core@0.19.0': + resolution: {integrity: sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.5': + resolution: {integrity: sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==} + engines: {node: '>=18.18.0'} + '@humanwhocodes/config-array@0.13.0': resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} engines: {node: '>=10.10.0'} @@ -3039,8 +3043,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.11.1: - resolution: {integrity: sha512-MobhYKIoAO1s1e4VUrgx1l1Sk2JBR/Gqjjgw8+mfgoLE2xwsHur4gdfTxyTgShrhvdVFTaJSgMiQBl1jv/AWxg==} + eslint@9.12.0: + resolution: {integrity: sha512-UVIOlTEWxwIopRL1wgSQYdnVDcEvs2wyaO6DGo5mXqe3r16IoCNWkR29iHhyaP4cICWjbgbmFUGAhh0GJRuGZw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -6848,9 +6852,9 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.0(eslint@9.11.1)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.12.0)': dependencies: - eslint: 9.11.1 + eslint: 9.12.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.1': {} @@ -6895,8 +6899,6 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.11.1': {} - '@eslint/js@9.12.0': {} '@eslint/object-schema@2.1.4': {} @@ -6921,6 +6923,13 @@ snapshots: hono: 4.6.3 zod: 3.23.8 + '@humanfs/core@0.19.0': {} + + '@humanfs/node@0.16.5': + dependencies: + '@humanfs/core': 0.19.0 + '@humanwhocodes/retry': 0.3.1 + '@humanwhocodes/config-array@0.13.0': dependencies: '@humanwhocodes/object-schema': 2.0.3 @@ -7369,10 +7378,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.9.0(eslint@9.11.1)(typescript@5.6.2)': + '@stylistic/eslint-plugin@2.9.0(eslint@9.12.0)(typescript@5.6.2)': dependencies: - '@typescript-eslint/utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2) - eslint: 9.11.1 + '@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) + eslint: 9.12.0 eslint-visitor-keys: 4.1.0 espree: 10.2.0 estraverse: 5.3.0 @@ -7541,15 +7550,15 @@ snapshots: '@types/node': 22.7.4 optional: true - '@typescript-eslint/eslint-plugin@8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2))(eslint@9.11.1)(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.8.0(eslint@9.11.1)(typescript@5.6.2) + '@typescript-eslint/parser': 8.8.0(eslint@9.12.0)(typescript@5.6.2) '@typescript-eslint/scope-manager': 8.8.0 - '@typescript-eslint/type-utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2) - '@typescript-eslint/utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2) + '@typescript-eslint/type-utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) '@typescript-eslint/visitor-keys': 8.8.0 - eslint: 9.11.1 + eslint: 9.12.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -7559,14 +7568,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.8.0(eslint@9.11.1)(typescript@5.6.2)': + '@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2)': dependencies: '@typescript-eslint/scope-manager': 8.8.0 '@typescript-eslint/types': 8.8.0 '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) '@typescript-eslint/visitor-keys': 8.8.0 debug: 4.3.7 - eslint: 9.11.1 + eslint: 9.12.0 optionalDependencies: typescript: 5.6.2 transitivePeerDependencies: @@ -7577,10 +7586,10 @@ snapshots: '@typescript-eslint/types': 8.8.0 '@typescript-eslint/visitor-keys': 8.8.0 - '@typescript-eslint/type-utils@8.8.0(eslint@9.11.1)(typescript@5.6.2)': + '@typescript-eslint/type-utils@8.8.0(eslint@9.12.0)(typescript@5.6.2)': dependencies: '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) - '@typescript-eslint/utils': 8.8.0(eslint@9.11.1)(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: @@ -7606,13 +7615,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.8.0(eslint@9.11.1)(typescript@5.6.2)': + '@typescript-eslint/utils@8.8.0(eslint@9.12.0)(typescript@5.6.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) '@typescript-eslint/scope-manager': 8.8.0 '@typescript-eslint/types': 8.8.0 '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) - eslint: 9.11.1 + eslint: 9.12.0 transitivePeerDependencies: - supports-color - typescript @@ -8620,18 +8629,18 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.11.1): + eslint-compat-utils@0.5.1(eslint@9.12.0): dependencies: - eslint: 9.11.1 + eslint: 9.12.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.11.1): + eslint-config-prettier@9.1.0(eslint@9.12.0): dependencies: - eslint: 9.11.1 + eslint: 9.12.0 - eslint-filtered-fix@0.3.0(eslint@9.11.1): + eslint-filtered-fix@0.3.0(eslint@9.12.0): dependencies: - eslint: 9.11.1 + eslint: 9.12.0 optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -8642,54 +8651,54 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.11.1): + eslint-nibble@8.1.0(eslint@9.12.0): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.11.1 - eslint-filtered-fix: 0.3.0(eslint@9.11.1) + eslint: 9.12.0 + eslint-filtered-fix: 0.3.0(eslint@9.12.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.11.1): + eslint-plugin-es-x@7.8.0(eslint@9.12.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) '@eslint-community/regexpp': 4.11.1 - eslint: 9.11.1 - eslint-compat-utils: 0.5.1(eslint@9.11.1) + eslint: 9.12.0 + eslint-compat-utils: 0.5.1(eslint@9.12.0) - eslint-plugin-n@17.10.3(eslint@9.11.1): + eslint-plugin-n@17.10.3(eslint@9.12.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) enhanced-resolve: 5.17.1 - eslint: 9.11.1 - eslint-plugin-es-x: 7.8.0(eslint@9.11.1) + eslint: 9.12.0 + eslint-plugin-es-x: 7.8.0(eslint@9.12.0) get-tsconfig: 4.8.1 globals: 15.10.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.11.1))(eslint@9.11.1)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.12.0))(eslint@9.12.0)(prettier@3.3.3): dependencies: - eslint: 9.11.1 + eslint: 9.12.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 9.1.0(eslint@9.11.1) + eslint-config-prettier: 9.1.0(eslint@9.12.0) - eslint-plugin-unicorn@56.0.0(eslint@9.11.1): + eslint-plugin-unicorn@56.0.0(eslint@9.12.0): dependencies: '@babel/helper-validator-identifier': 7.25.7 - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.38.1 - eslint: 9.11.1 + eslint: 9.12.0 esquery: 1.6.0 globals: 15.10.0 indent-string: 4.0.0 @@ -8702,11 +8711,11 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-yml@1.14.0(eslint@9.11.1): + eslint-plugin-yml@1.14.0(eslint@9.12.0): dependencies: debug: 4.3.7 - eslint: 9.11.1 - eslint-compat-utils: 0.5.1(eslint@9.11.1) + eslint: 9.12.0 + eslint-compat-utils: 0.5.1(eslint@9.12.0) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.3 @@ -8775,18 +8784,18 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.11.1: + eslint@9.12.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.11.1) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) '@eslint-community/regexpp': 4.11.1 '@eslint/config-array': 0.18.0 '@eslint/core': 0.6.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.11.1 + '@eslint/js': 9.12.0 '@eslint/plugin-kit': 0.2.0 + '@humanfs/node': 0.16.5 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.1 - '@nodelib/fs.walk': 1.2.8 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 ajv: 6.12.6 @@ -8806,13 +8815,11 @@ snapshots: ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 - is-path-inside: 3.0.3 json-stable-stringify-without-jsonify: 1.0.1 lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 - strip-ansi: 6.0.1 text-table: 0.2.0 transitivePeerDependencies: - supports-color From 00d66286f18027fab757f27006e02f350d418d68 Mon Sep 17 00:00:00 2001 From: Loongphy Wei Date: Mon, 7 Oct 2024 22:37:15 +0800 Subject: [PATCH 076/740] feat: add cohere blog route (#17015) * feat: add cohere blog route * Update lib/routes/cohere/index.ts --- lib/routes/cohere/index.ts | 54 ++++++++++++++++++++++++++++++++++ lib/routes/cohere/namespace.ts | 6 ++++ 2 files changed, 60 insertions(+) create mode 100644 lib/routes/cohere/index.ts create mode 100644 lib/routes/cohere/namespace.ts diff --git a/lib/routes/cohere/index.ts b/lib/routes/cohere/index.ts new file mode 100644 index 000000000000000..a55552b13b9404d --- /dev/null +++ b/lib/routes/cohere/index.ts @@ -0,0 +1,54 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: ['/blog'], + name: 'Blog', + url: 'cohere.com/blog', + maintainers: ['Loongphy'], + handler, + example: '/cohere/blog', + description: 'Cohere is a platform for building AI applications.', + categories: ['blog'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['cohere.com'], + }, + ], +}; + +async function handler() { + const { posts: data } = await ofetch('https://cohere-ai.ghost.io/ghost/api/content/posts', { + params: { + key: '572d288a9364f8e4186af1d60a', + limit: 'all', + include: ['authors', 'tags'], + filter: 'tag:-hash-hidden+tag:-llmu', + }, + }); + + const items = data.map((item) => ({ + title: item.title, + link: 'https://cohere.com/blog/' + item.slug, + description: item.excerpt, + pubDate: parseDate(item.published_at), + author: item.authors.map((author) => author.name).join(', '), + category: item.tags.map((tag) => tag.name), + })); + + return { + title: 'The Cohere Blog', + link: 'https://cohere.com/blog', + item: items, + }; +} diff --git a/lib/routes/cohere/namespace.ts b/lib/routes/cohere/namespace.ts new file mode 100644 index 000000000000000..95c9e37ab18451d --- /dev/null +++ b/lib/routes/cohere/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Cohere', + url: 'cohere.com', +}; From c0a7b556c81b3d535f2d3e031a6c54162e0a9b51 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Tue, 8 Oct 2024 13:38:07 +0700 Subject: [PATCH 077/740] chore: remive natgeo from popular --- lib/routes/natgeo/dailyphoto.ts | 2 +- lib/routes/natgeo/dailyselection.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/natgeo/dailyphoto.ts b/lib/routes/natgeo/dailyphoto.ts index 84a15d169170c95..88f2c5792d7b543 100644 --- a/lib/routes/natgeo/dailyphoto.ts +++ b/lib/routes/natgeo/dailyphoto.ts @@ -12,7 +12,7 @@ import { config } from '@/config'; export const route: Route = { path: '/dailyphoto', - categories: ['picture', 'popular'], + categories: ['picture'], view: ViewType.Pictures, example: '/natgeo/dailyphoto', parameters: {}, diff --git a/lib/routes/natgeo/dailyselection.ts b/lib/routes/natgeo/dailyselection.ts index 58db3c6d032542c..49977d845b2abdb 100644 --- a/lib/routes/natgeo/dailyselection.ts +++ b/lib/routes/natgeo/dailyselection.ts @@ -21,7 +21,7 @@ export const route: Route = { source: ['nationalgeographic.com/'], }, ], - maintainers: ['OrangeEd1t', 'pseudoyu'], + maintainers: ['OrangeEd1t'], handler, }; From 4fb7b2acddffccf6e1494bc32c9b9871925c6476 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Tue, 8 Oct 2024 13:40:20 +0700 Subject: [PATCH 078/740] fix: change nytimes namespace --- lib/routes/nytimes/namespace.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/nytimes/namespace.ts b/lib/routes/nytimes/namespace.ts index 9871c92ebe0889c..2742506ee0626e3 100644 --- a/lib/routes/nytimes/namespace.ts +++ b/lib/routes/nytimes/namespace.ts @@ -1,6 +1,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'The New York Times 纽约时报', + name: '纽约时报中文网', url: 'nytimes.com', }; From 7640f6355a3409e578399ff173a9be4e6e199e97 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Tue, 8 Oct 2024 13:54:10 +0700 Subject: [PATCH 079/740] chore(route): change nytimes intro and desc --- lib/routes/nytimes/book.ts | 24 ++++++++++---------- lib/routes/nytimes/daily-briefing-chinese.ts | 6 ++--- lib/routes/nytimes/namespace.ts | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/routes/nytimes/book.ts b/lib/routes/nytimes/book.ts index f43d4df144e5fff..7da489187bc47f7 100644 --- a/lib/routes/nytimes/book.ts +++ b/lib/routes/nytimes/book.ts @@ -3,22 +3,22 @@ import got from '@/utils/got'; import { load } from 'cheerio'; const categoryList = { - 'combined-print-and-e-book-nonfiction': '非虚构类 - 综合', - 'hardcover-nonfiction': '非虚构类 - 精装本', - 'paperback-nonfiction': '非虚构类 - 平装本', - 'advice-how-to-and-miscellaneous': '工具类', - 'combined-print-and-e-book-fiction': '虚构类 - 综合', - 'hardcover-fiction': '虚构类 - 精装本', - 'trade-fiction-paperback': '虚构类 - 平装本', - 'childrens-middle-grade-hardcover': '儿童 - 中年级', - 'picture-books': '儿童 - 绘本', - 'series-books': '儿童 - 系列图书', - 'young-adult-hardcover': '青少年', + 'combined-print-and-e-book-nonfiction': 'Combined Print & E-Book Nonfiction', + 'hardcover-nonfiction': 'Hardcover Nonfiction', + 'paperback-nonfiction': 'Paperback Nonfiction', + 'advice-how-to-and-miscellaneous': 'Advice, How-To & Miscellaneous', + 'combined-print-and-e-book-fiction': 'Combined Print & E-Book Fiction', + 'hardcover-fiction': 'Hardcover Fiction', + 'trade-fiction-paperback': 'Paperback Trade Fiction', + 'childrens-middle-grade-hardcover': "Children's Middle Grade Hardcover", + 'picture-books': 'Picture Books', + 'series-books': 'Series Books', + 'young-adult-hardcover': 'Young Adult Hardcover', }; export const route: Route = { path: '/book/:category?', - categories: ['traditional-media', 'popular'], + categories: ['traditional-media'], view: ViewType.Notifications, example: '/nytimes/book/combined-print-and-e-book-nonfiction', parameters: { diff --git a/lib/routes/nytimes/daily-briefing-chinese.ts b/lib/routes/nytimes/daily-briefing-chinese.ts index 14e229e4c811715..e5f6eac30f8811e 100644 --- a/lib/routes/nytimes/daily-briefing-chinese.ts +++ b/lib/routes/nytimes/daily-briefing-chinese.ts @@ -28,11 +28,11 @@ export const route: Route = { target: '', }, ], - name: '新闻简报', + name: 'Daily Briefing', maintainers: ['yueyericardo', 'nczitzk'], handler, url: 'nytimes.com/', - description: `网站地址:[https://www.nytimes.com/zh-hans/series/daily-briefing-chinese](https://www.nytimes.com/zh-hans/series/daily-briefing-chinese)`, + description: `URL: [https://www.nytimes.com/zh-hans/series/daily-briefing-chinese](https://www.nytimes.com/zh-hans/series/daily-briefing-chinese)`, }; async function handler() { @@ -91,7 +91,7 @@ async function handler() { ); return { - title: '新闻简报 - The New York Times', + title: 'Daily Briefing - The New York Times', link: currentUrl, item: items, }; diff --git a/lib/routes/nytimes/namespace.ts b/lib/routes/nytimes/namespace.ts index 2742506ee0626e3..e32a41de18d9edd 100644 --- a/lib/routes/nytimes/namespace.ts +++ b/lib/routes/nytimes/namespace.ts @@ -1,6 +1,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: '纽约时报中文网', + name: 'The New York Times', url: 'nytimes.com', }; From a400f6ee030317db5321a5661723bf281171925e Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Tue, 8 Oct 2024 14:13:06 +0700 Subject: [PATCH 080/740] chore(route): add nytimes popular routes --- lib/routes/nytimes/book.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/nytimes/book.ts b/lib/routes/nytimes/book.ts index 7da489187bc47f7..e1c9cb197b5e3f6 100644 --- a/lib/routes/nytimes/book.ts +++ b/lib/routes/nytimes/book.ts @@ -18,7 +18,7 @@ const categoryList = { export const route: Route = { path: '/book/:category?', - categories: ['traditional-media'], + categories: ['traditional-media', 'popular'], view: ViewType.Notifications, example: '/nytimes/book/combined-print-and-e-book-nonfiction', parameters: { From 749f24704a9fdb445f77be175577a8ccead9f852 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 06:28:36 -0700 Subject: [PATCH 081/740] chore(deps): bump @scalar/hono-api-reference from 0.5.150 to 0.5.152 (#17040) * chore(route): add nytimes popular routes * chore(deps): bump @scalar/hono-api-reference from 0.5.150 to 0.5.152 Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.150 to 0.5.152. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: pseudoyu Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/routes/nytimes/daily-briefing-chinese.ts | 2 +- package.json | 2 +- pnpm-lock.yaml | 93 +++++++++++++++++--- 3 files changed, 81 insertions(+), 16 deletions(-) diff --git a/lib/routes/nytimes/daily-briefing-chinese.ts b/lib/routes/nytimes/daily-briefing-chinese.ts index e5f6eac30f8811e..c5f3078ed83d3f5 100644 --- a/lib/routes/nytimes/daily-briefing-chinese.ts +++ b/lib/routes/nytimes/daily-briefing-chinese.ts @@ -11,7 +11,7 @@ import path from 'node:path'; export const route: Route = { path: '/daily_briefing_chinese', - categories: ['traditional-media'], + categories: ['traditional-media', 'popular'], example: '/nytimes/daily_briefing_chinese', parameters: {}, features: { diff --git a/package.json b/package.json index a7bfd8175c4b5a4..4a7a27a40f74612 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.22", - "@scalar/hono-api-reference": "0.5.150", + "@scalar/hono-api-reference": "0.5.152", "@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 b04792433092ebe..a6211d53bd4305b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: 0.0.22 version: 0.0.22 '@scalar/hono-api-reference': - specifier: 0.5.150 - version: 0.5.150(hono@4.6.3) + specifier: 0.5.152 + version: 0.5.152(hono@4.6.3) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1768,8 +1768,8 @@ packages: '@rss3/sdk@0.0.22': resolution: {integrity: sha512-yBfxbEoVxzBWeCccWDTH6VXy+TxkTnW7D8QwKbq+IQVb8ou7g1vw9oLy4E4yEu2CJ8XEZNE2BaTl2l0BWxcGOQ==} - '@scalar/hono-api-reference@0.5.150': - resolution: {integrity: sha512-KGXaE8iEuYL2EhCDc9vBPw3a6+cj552b85EbflEUijOgLhKhcoDb2A/QIgyuk/89Us3mrWJubEZ8NiH8dMLd8Q==} + '@scalar/hono-api-reference@0.5.152': + resolution: {integrity: sha512-mSRpicEjr3q3ulXHV9fpPKgq+Mju0/A9jyB4NvvZ9GitunTm6P4urr/RKzgESDTqYK3zK/VGahZWeQFLi6PSKQ==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -1778,8 +1778,8 @@ packages: resolution: {integrity: sha512-NMy3QNk6ytcCoPUGJH0t4NNr36OWXgZhA3ormr3TvhX1NDgoF95wFyodGVH8xiHeUyn2/FxtETm8UBLbB5xEmg==} engines: {node: '>=18'} - '@scalar/types@0.0.12': - resolution: {integrity: sha512-XYZ36lSEx87i4gDqopQlGCOkdIITHHEvgkuJFrXFATQs9zHARop0PN0g4RZYWj+ZpCUclOcaOjbCt8JGe22mnQ==} + '@scalar/types@0.0.13': + resolution: {integrity: sha512-4baCQ3uXTQsT/da5X3+yO34VEu057Jjw0SJFkaaFmXTqHXVZM+SaDHSyTvT6tyKvgDpPpn6iD22uiFCdldEzRQ==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -2009,6 +2009,10 @@ packages: resolution: {integrity: sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.8.1': + resolution: {integrity: sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.8.0': resolution: {integrity: sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2022,6 +2026,10 @@ packages: resolution: {integrity: sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.8.1': + resolution: {integrity: sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.8.0': resolution: {integrity: sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2031,16 +2039,35 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.8.1': + resolution: {integrity: sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@8.8.0': resolution: {integrity: sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.8.1': + resolution: {integrity: sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@8.8.0': resolution: {integrity: sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.8.1': + resolution: {integrity: sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -2834,8 +2861,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.32: - resolution: {integrity: sha512-M+7ph0VGBQqqpTT2YrabjNKSQ2fEl9PVx6AK3N558gDH9NO8O6XN9SXXFWRo9u9PbEg/bWq+tjXQr+eXmxubCw==} + electron-to-chromium@1.5.33: + resolution: {integrity: sha512-+cYTcFB1QqD4j4LegwLfpCNxifb6dDFUAwk6RsLusCwIaZI6or2f+q8rs5tTB2YC53HhOlIbEaqHMAAC8IOIwA==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -7323,14 +7350,14 @@ snapshots: '@rss3/api-core': 0.0.22 '@rss3/api-utils': 0.0.22 - '@scalar/hono-api-reference@0.5.150(hono@4.6.3)': + '@scalar/hono-api-reference@0.5.152(hono@4.6.3)': dependencies: - '@scalar/types': 0.0.12 + '@scalar/types': 0.0.13 hono: 4.6.3 '@scalar/openapi-types@0.1.1': {} - '@scalar/types@0.0.12': + '@scalar/types@0.0.13': dependencies: '@scalar/openapi-types': 0.1.1 '@unhead/schema': 1.11.7 @@ -7380,7 +7407,7 @@ snapshots: '@stylistic/eslint-plugin@2.9.0(eslint@9.12.0)(typescript@5.6.2)': dependencies: - '@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.2) eslint: 9.12.0 eslint-visitor-keys: 4.1.0 espree: 10.2.0 @@ -7586,6 +7613,11 @@ snapshots: '@typescript-eslint/types': 8.8.0 '@typescript-eslint/visitor-keys': 8.8.0 + '@typescript-eslint/scope-manager@8.8.1': + dependencies: + '@typescript-eslint/types': 8.8.1 + '@typescript-eslint/visitor-keys': 8.8.1 + '@typescript-eslint/type-utils@8.8.0(eslint@9.12.0)(typescript@5.6.2)': dependencies: '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) @@ -7600,6 +7632,8 @@ snapshots: '@typescript-eslint/types@8.8.0': {} + '@typescript-eslint/types@8.8.1': {} + '@typescript-eslint/typescript-estree@8.8.0(typescript@5.6.2)': dependencies: '@typescript-eslint/types': 8.8.0 @@ -7615,6 +7649,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.8.1(typescript@5.6.2)': + dependencies: + '@typescript-eslint/types': 8.8.1 + '@typescript-eslint/visitor-keys': 8.8.1 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.8.0(eslint@9.12.0)(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) @@ -7626,11 +7675,27 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.8.1(eslint@9.12.0)(typescript@5.6.2)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) + '@typescript-eslint/scope-manager': 8.8.1 + '@typescript-eslint/types': 8.8.1 + '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.2) + eslint: 9.12.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@8.8.0': dependencies: '@typescript-eslint/types': 8.8.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.8.1': + dependencies: + '@typescript-eslint/types': 8.8.1 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.7': @@ -7940,7 +8005,7 @@ snapshots: browserslist@4.24.0: dependencies: caniuse-lite: 1.0.30001667 - electron-to-chromium: 1.5.32 + electron-to-chromium: 1.5.33 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) @@ -8481,7 +8546,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.32: {} + electron-to-chromium@1.5.33: {} ellipsize@0.1.0: {} From 9d241ca9f820b57004e91ef9f82b7b040ad69e3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 06:30:03 -0700 Subject: [PATCH 082/740] chore(deps-dev): bump @typescript-eslint/parser from 8.8.0 to 8.8.1 (#17043) * chore(route): add nytimes popular routes * chore(deps-dev): bump @typescript-eslint/parser from 8.8.0 to 8.8.1 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.8.0 to 8.8.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.8.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 4a7a27a40f74612..23acf06bac5cd8d 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "@types/title": "3.4.3", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.8.0", - "@typescript-eslint/parser": "8.8.0", + "@typescript-eslint/parser": "8.8.1", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.101", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a6211d53bd4305b..ed191b5a98664bb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -344,10 +344,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.8.0 - version: 8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2) + version: 8.8.0(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2) '@typescript-eslint/parser': - specifier: 8.8.0 - version: 8.8.0(eslint@9.12.0)(typescript@5.6.2) + specifier: 8.8.1 + version: 8.8.1(eslint@9.12.0)(typescript@5.6.2) '@vercel/nft': specifier: 0.27.4 version: 0.27.4 @@ -1995,8 +1995,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.8.0': - resolution: {integrity: sha512-uEFUsgR+tl8GmzmLjRqz+VrDv4eoaMqMXW7ruXfgThaAShO9JTciKpEsB+TvnfFfbg5IpujgMXVV36gOJRLtZg==} + '@typescript-eslint/parser@8.8.1': + resolution: {integrity: sha512-hQUVn2Lij2NAxVFEdvIGxT9gP1tq2yM83m+by3whWFsWC+1y8pxxxHUFE1UqDu2VsGi2i6RLcv4QvouM84U+ow==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -7577,10 +7577,10 @@ snapshots: '@types/node': 22.7.4 optional: true - '@typescript-eslint/eslint-plugin@8.8.0(@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.8.0(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.8.0(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/parser': 8.8.1(eslint@9.12.0)(typescript@5.6.2) '@typescript-eslint/scope-manager': 8.8.0 '@typescript-eslint/type-utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) '@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) @@ -7595,12 +7595,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.8.0(eslint@9.12.0)(typescript@5.6.2)': + '@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.2)': dependencies: - '@typescript-eslint/scope-manager': 8.8.0 - '@typescript-eslint/types': 8.8.0 - '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.8.0 + '@typescript-eslint/scope-manager': 8.8.1 + '@typescript-eslint/types': 8.8.1 + '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.8.1 debug: 4.3.7 eslint: 9.12.0 optionalDependencies: From 694c930a1ebc26ab7962a01088ad746cbdc6ed0a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 06:30:48 -0700 Subject: [PATCH 083/740] chore(deps-dev): bump @types/mailparser from 3.4.4 to 3.4.5 (#17042) * chore(route): add nytimes popular routes * chore(deps-dev): bump @types/mailparser from 3.4.4 to 3.4.5 Bumps [@types/mailparser](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/mailparser) from 3.4.4 to 3.4.5. - [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-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 23acf06bac5cd8d..892cac287344375 100644 --- a/package.json +++ b/package.json @@ -154,7 +154,7 @@ "@types/json-bigint": "1.0.4", "@types/jsrsasign": "10.5.13", "@types/lint-staged": "13.3.0", - "@types/mailparser": "3.4.4", + "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", "@types/node": "22.7.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed191b5a98664bb..e8393fac2527c9c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -316,8 +316,8 @@ importers: specifier: 13.3.0 version: 13.3.0 '@types/mailparser': - specifier: 3.4.4 - version: 3.4.4 + specifier: 3.4.5 + version: 3.4.5 '@types/markdown-it': specifier: 14.1.2 version: 14.1.2 @@ -1909,8 +1909,8 @@ packages: '@types/lint-staged@13.3.0': resolution: {integrity: sha512-WxGjVP+rA4OJlEdbZdT9MS9PFKQ7kVPhLn26gC+2tnBWBEFEj/KW+IbFfz6sxdxY5U6V7BvyF+3BzCGsAMHhNg==} - '@types/mailparser@3.4.4': - resolution: {integrity: sha512-C6Znp2QVS25JqtuPyxj38Qh+QoFcLycdxsvcc6IZCGekhaMBzbdTXzwGzhGoYb3TfKu8IRCNV0sV1o3Od97cEQ==} + '@types/mailparser@3.4.5': + resolution: {integrity: sha512-EPERBp7fLeFZh7tS2X36MF7jawUx3Y6/0rXciZah3CTYgwLi3e0kpGUJ6FOmUabgzis/U1g+3/JzrVWbWIOGjg==} '@types/markdown-it@14.1.2': resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} @@ -7491,7 +7491,7 @@ snapshots: '@types/lint-staged@13.3.0': {} - '@types/mailparser@3.4.4': + '@types/mailparser@3.4.5': dependencies: '@types/node': 22.7.4 iconv-lite: 0.6.3 From 3808f6dc92a54b7fc13905ce00b9de71191ef10e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 06:52:51 -0700 Subject: [PATCH 084/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.8.0 to 8.8.1 (#17041) * chore(deps-dev): bump @typescript-eslint/eslint-plugin Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.8.0 to 8.8.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.8.1/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 93 ++++++++------------------------------------------ 2 files changed, 15 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index 892cac287344375..94a69896237f3d9 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.8.0", + "@typescript-eslint/eslint-plugin": "8.8.1", "@typescript-eslint/parser": "8.8.1", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e8393fac2527c9c..9d58bf68a144950 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -343,8 +343,8 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.8.0 - version: 8.8.0(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2) + specifier: 8.8.1 + version: 8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2) '@typescript-eslint/parser': specifier: 8.8.1 version: 8.8.1(eslint@9.12.0)(typescript@5.6.2) @@ -1984,8 +1984,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.8.0': - resolution: {integrity: sha512-wORFWjU30B2WJ/aXBfOm1LX9v9nyt9D3jsSOxC3cCaTQGCW5k4jNpmjFv3U7p/7s4yvdjHzwtv2Sd2dOyhjS0A==} + '@typescript-eslint/eslint-plugin@8.8.1': + resolution: {integrity: sha512-xfvdgA8AP/vxHgtgU310+WBnLB4uJQ9XdyP17RebG26rLtDrQJV3ZYrcopX91GrHmMoH8bdSwMRh2a//TiJ1jQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -2005,16 +2005,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.8.0': - resolution: {integrity: sha512-EL8eaGC6gx3jDd8GwEFEV091210U97J0jeEHrAYvIYosmEGet4wJ+g0SYmLu+oRiAwbSA5AVrt6DxLHfdd+bUg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.8.1': resolution: {integrity: sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.8.0': - resolution: {integrity: sha512-IKwJSS7bCqyCeG4NVGxnOP6lLT9Okc3Zj8hLO96bpMkJab+10HIfJbMouLrlpyOr3yrQ1cA413YPFiGd1mW9/Q==} + '@typescript-eslint/type-utils@8.8.1': + resolution: {integrity: sha512-qSVnpcbLP8CALORf0za+vjLYj1Wp8HSoiI8zYU5tHxRVj30702Z1Yw4cLwfNKhTPWp5+P+k1pjmD5Zd1nhxiZA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -2022,23 +2018,10 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.8.0': - resolution: {integrity: sha512-QJwc50hRCgBd/k12sTykOJbESe1RrzmX6COk8Y525C9l7oweZ+1lw9JiU56im7Amm8swlz00DRIlxMYLizr2Vw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.8.1': resolution: {integrity: sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.8.0': - resolution: {integrity: sha512-ZaMJwc/0ckLz5DaAZ+pNLmHv8AMVGtfWxZe/x2JVEkD5LnmhWiQMMcYT7IY7gkdJuzJ9P14fRy28lUrlDSWYdw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.8.1': resolution: {integrity: sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2048,22 +2031,12 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.8.0': - resolution: {integrity: sha512-QE2MgfOTem00qrlPgyByaCHay9yb1+9BjnMFnSFkUKQfu7adBXDTnCAivURnuPPAG/qiB+kzKkZKmKfaMT0zVg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.8.1': resolution: {integrity: sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.8.0': - resolution: {integrity: sha512-8mq51Lx6Hpmd7HnA2fcHQo3YgfX1qbccxQOgZcb4tvasu//zXRaA1j5ZRFeCw/VRAdFi4mRM9DnZw0Nu0Q2d1g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.8.1': resolution: {integrity: sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7577,14 +7550,14 @@ snapshots: '@types/node': 22.7.4 optional: true - '@typescript-eslint/eslint-plugin@8.8.0(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)': dependencies: '@eslint-community/regexpp': 4.11.1 '@typescript-eslint/parser': 8.8.1(eslint@9.12.0)(typescript@5.6.2) - '@typescript-eslint/scope-manager': 8.8.0 - '@typescript-eslint/type-utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) - '@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.8.0 + '@typescript-eslint/scope-manager': 8.8.1 + '@typescript-eslint/type-utils': 8.8.1(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.8.1 eslint: 9.12.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7608,20 +7581,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.8.0': - dependencies: - '@typescript-eslint/types': 8.8.0 - '@typescript-eslint/visitor-keys': 8.8.0 - '@typescript-eslint/scope-manager@8.8.1': dependencies: '@typescript-eslint/types': 8.8.1 '@typescript-eslint/visitor-keys': 8.8.1 - '@typescript-eslint/type-utils@8.8.0(eslint@9.12.0)(typescript@5.6.2)': + '@typescript-eslint/type-utils@8.8.1(eslint@9.12.0)(typescript@5.6.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) - '@typescript-eslint/utils': 8.8.0(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.2) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: @@ -7630,25 +7598,8 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@8.8.0': {} - '@typescript-eslint/types@8.8.1': {} - '@typescript-eslint/typescript-estree@8.8.0(typescript@5.6.2)': - dependencies: - '@typescript-eslint/types': 8.8.0 - '@typescript-eslint/visitor-keys': 8.8.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.2) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.8.1(typescript@5.6.2)': dependencies: '@typescript-eslint/types': 8.8.1 @@ -7664,17 +7615,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.8.0(eslint@9.12.0)(typescript@5.6.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) - '@typescript-eslint/scope-manager': 8.8.0 - '@typescript-eslint/types': 8.8.0 - '@typescript-eslint/typescript-estree': 8.8.0(typescript@5.6.2) - eslint: 9.12.0 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.8.1(eslint@9.12.0)(typescript@5.6.2)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) @@ -7686,11 +7626,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.8.0': - dependencies: - '@typescript-eslint/types': 8.8.0 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.8.1': dependencies: '@typescript-eslint/types': 8.8.1 From db9ccc9c6d8a7536cccf2c0b718b076063d88c5c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 06:53:28 -0700 Subject: [PATCH 085/740] chore(deps-dev): bump @types/node from 22.7.4 to 22.7.5 (#17038) * chore(deps-dev): bump @types/node from 22.7.4 to 22.7.5 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.7.4 to 22.7.5. - [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] * chore: fix pnpm install --------- 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 94a69896237f3d9..bfeb0b4559f3c69 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.7.4", + "@types/node": "22.7.5", "@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 9d58bf68a144950..04682e388e535a0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -325,8 +325,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.7.4 - version: 22.7.4 + specifier: 22.7.5 + version: 22.7.5 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -353,7 +353,7 @@ importers: version: 0.27.4 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.7.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.101 version: 0.37.101 @@ -419,10 +419,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.4)) + version: 5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.5)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.7.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1936,8 +1936,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.7.4': - resolution: {integrity: sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==} + '@types/node@22.7.5': + resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6959,7 +6959,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.7.4 + '@types/node': 22.7.5 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7427,12 +7427,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.7.4 + '@types/node': 22.7.5 '@types/html-to-text@9.0.4': {} @@ -7440,13 +7440,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 '@types/tough-cookie': 4.0.5 parse5: 7.1.2 @@ -7456,7 +7456,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 '@types/jsrsasign@10.5.13': {} @@ -7466,7 +7466,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7488,14 +7488,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 form-data: 4.0.0 - '@types/node@22.7.4': + '@types/node@22.7.5': dependencies: undici-types: 6.19.8 @@ -7509,7 +7509,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.7.4 + '@types/node': 22.7.5 '@types/tough-cookie': 4.0.5 form-data: 2.5.1 @@ -7523,7 +7523,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.7.4 + '@types/node': 22.7.5 form-data: 4.0.0 '@types/supertest@6.0.2': @@ -7547,7 +7547,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 optional: true '@typescript-eslint/eslint-plugin@8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)': @@ -7656,7 +7656,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7670,7 +7670,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.7.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10625,7 +10625,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.7.4 + '@types/node': 22.7.5 long: 5.2.3 proxy-agent@6.4.0: @@ -11595,13 +11595,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.7.4): + vite-node@2.0.5(@types/node@22.7.5): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.8(@types/node@22.7.4) + vite: 5.4.8(@types/node@22.7.5) transitivePeerDependencies: - '@types/node' - less @@ -11613,27 +11613,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.4)): + vite-tsconfig-paths@5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.5)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.3(typescript@5.6.2) optionalDependencies: - vite: 5.4.8(@types/node@22.7.4) + vite: 5.4.8(@types/node@22.7.5) transitivePeerDependencies: - supports-color - typescript - vite@5.4.8(@types/node@22.7.4): + vite@5.4.8(@types/node@22.7.5): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.0 optionalDependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.7.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11651,11 +11651,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.8(@types/node@22.7.4) - vite-node: 2.0.5(@types/node@22.7.4) + vite: 5.4.8(@types/node@22.7.5) + vite-node: 2.0.5(@types/node@22.7.5) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.7.4 + '@types/node': 22.7.5 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From a3f153d5c9423a203894b537fcef4ab4a395e50f Mon Sep 17 00:00:00 2001 From: karasu Date: Tue, 8 Oct 2024 22:20:36 +0800 Subject: [PATCH 086/740] fix(route/follow): filter `inbox` (#17037) --- lib/routes/follow/profile.ts | 6 ++++-- lib/routes/follow/types.ts | 12 +++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/routes/follow/profile.ts b/lib/routes/follow/profile.ts index 3dd0845900cbadb..c2d6108291e4ee2 100644 --- a/lib/routes/follow/profile.ts +++ b/lib/routes/follow/profile.ts @@ -1,7 +1,7 @@ import { ViewType, type Data, type Route } from '@/types'; import type { Context } from 'hono'; import ofetch from '@/utils/ofetch'; -import type { FollowResponse, ListSubscription, Profile, Subscription } from './types'; +import type { FollowResponse, InboxSubscription, ListSubscription, Profile, Subscription } from './types'; import { parse } from 'tldts'; export const route: Route = { @@ -28,6 +28,8 @@ export const route: Route = { const isList = (subscription: Subscription): subscription is ListSubscription => 'lists' in subscription; +const isInbox = (subscription: Subscription): subscription is InboxSubscription => 'inboxId' in subscription; + async function handler(ctx: Context): Promise { const uid = ctx.req.param('uid'); const host = 'https://api.follow.is'; @@ -37,7 +39,7 @@ async function handler(ctx: Context): Promise { return { title: `${profile.data.name}'s subscriptions`, - item: subscriptions.data.map((subscription) => { + item: ([]>subscriptions.data.filter((i) => !isInbox(i))).map((subscription) => { if (isList(subscription)) { return { title: subscription.lists.title, diff --git a/lib/routes/follow/types.ts b/lib/routes/follow/types.ts index fc73fef4c864d00..8ba2969d93d0146 100644 --- a/lib/routes/follow/types.ts +++ b/lib/routes/follow/types.ts @@ -3,7 +3,7 @@ export interface FollowResponse { data: T; } -export type Subscription = FeedSubscription | ListSubscription; +export type Subscription = FeedSubscription | ListSubscription | InboxSubscription; export interface Profile { id: string; @@ -66,3 +66,13 @@ export interface ListSubscription extends BaseSubscription { view: number; }; } + +export interface InboxSubscription extends BaseSubscription { + inboxes: { + type: 'inbox'; + id: string; + secret: string; + title: string; + }; + inboxId: string; +} From 5865a2c883452e79eeafbb6f12706e842781ca62 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Tue, 8 Oct 2024 22:51:31 +0800 Subject: [PATCH 087/740] =?UTF-8?q?feat(route):=20add=20=E5=8D=8E=E4=B8=AD?= =?UTF-8?q?=E7=A7=91=E6=8A=80=E5=A4=A7=E5=AD=A6=E6=9C=BA=E6=A2=B0=E7=A7=91?= =?UTF-8?q?=E5=AD=A6=E4=B8=8E=E5=B7=A5=E7=A8=8B=E5=AD=A6=E9=99=A2=20(#1703?= =?UTF-8?q?6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/hust/mse.ts | 575 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 575 insertions(+) create mode 100644 lib/routes/hust/mse.ts diff --git a/lib/routes/hust/mse.ts b/lib/routes/hust/mse.ts new file mode 100644 index 000000000000000..e0ae6be2a1370f0 --- /dev/null +++ b/lib/routes/hust/mse.ts @@ -0,0 +1,575 @@ +import { Route } from '@/types'; + +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +export const handler = async (ctx) => { + const { category = 'sylm/xyxw' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 11; + + const domain = 'mse.hust.edu.cn'; + const rootUrl = `https://${domain}`; + const currentUrl = new URL(`${category}.htm`, rootUrl).href; + + const { data: response } = await got(currentUrl); + + const $ = load(response); + + const language = $('html').prop('lang'); + + let items = $('div.list ul li') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + const a = item.find('a'); + + return { + title: a.text(), + pubDate: parseDate(item.find('span.time').text()), + link: new URL(a.prop('href'), currentUrl).href, + language, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + if (!item.link.includes(domain)) { + return item; + } + + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + const title = $$('h1.article_title').text() || $$('div.article_title').text() || item.title; + const description = $$('div.v_news_content').html(); + + for (const d of $$('div.article_data').contents().toArray()) { + const data = $$(d).text(); + + if (!item.pubDate && data.startsWith('发布')) { + const pubDate = data.split(/:/)?.pop(); + item.pubDate = pubDate ? parseDate(pubDate) : item.pubDate; + } else if (!item.author && data.startsWith('作者')) { + item.author = data.split(/:/)?.pop() ?? undefined; + } else if (!item.author && data.startsWith('编辑')) { + item.author = data.split(/:/)?.pop() ?? undefined; + } + } + + item.title = title; + item.description = description; + item.content = { + html: description, + text: $$('div.v_news_content').text(), + }; + item.language = language; + + return item; + }) + ) + ); + + const title = $('meta[name="keywords"]').prop('content')?.replace(/,/g, ' - ') ?? $('title').text(); + const image = new URL($('div.logo img').prop('src'), rootUrl).href; + + return { + title, + description: title.split(/-/).pop()?.trim(), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: title.split(/-/)[0]?.trim(), + language, + }; +}; + +export const route: Route = { + path: '/mse/:category{.+}?', + name: '机械科学与工程学院', + url: 'mse.hust.edu.cn', + maintainers: ['nczitzk'], + handler, + example: '/hust/mse/sylm/xyxw', + parameters: { category: '分类,默认为 `sylm/xyxw`,即学院新闻,可在对应分类页 URL 中找到' }, + description: `:::tip + 若订阅 [通知公告](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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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) | + +
+ `, + categories: ['university'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['mse.hust.edu.cn/:category?'], + target: (params) => { + const category = params.category; + + return `/hust/mse${category ? `/${category}` : ''}`; + }, + }, + { + title: '首页栏目 - 学院新闻', + source: ['mse.hust.edu.cn/xyxw.htm'], + target: '/mse/xyxw', + }, + { + title: '首页栏目 - 通知公告', + source: ['mse.hust.edu.cn/tzgg.htm'], + target: '/mse/tzgg', + }, + { + title: '首页栏目 - 招生招聘', + source: ['mse.hust.edu.cn/zszp.htm'], + target: '/mse/zszp', + }, + { + title: '首页栏目 - 媒体聚焦', + source: ['mse.hust.edu.cn/mtjj.htm'], + target: '/mse/mtjj', + }, + { + title: '首页栏目 - 期刊动态', + source: ['mse.hust.edu.cn/qkdt.htm'], + target: '/mse/qkdt', + }, + { + title: '首页栏目 - 学术活动', + source: ['mse.hust.edu.cn/xshd.htm'], + target: '/mse/xshd', + }, + { + title: '首页栏目 - 师生天地', + source: ['mse.hust.edu.cn/sstd.htm'], + target: '/mse/sstd', + }, + { + title: '首页栏目 - STAR风采', + source: ['mse.hust.edu.cn/STARfc.htm'], + target: '/mse/STARfc', + }, + { + title: '理论学习 - 党务动态', + source: ['mse.hust.edu.cn/llxx1/dwdt/djxw.htm'], + target: '/mse/llxx1/dwdt/djxw', + }, + { + title: '理论学习 - 共青团', + source: ['mse.hust.edu.cn/llxx1/gqt/xwdt.htm'], + target: '/mse/llxx1/gqt/xwdt', + }, + { + title: '理论学习 - 工会组织', + source: ['mse.hust.edu.cn/llxx1/ghzz/xwgg.htm'], + target: '/mse/llxx1/ghzz/xwgg', + }, + { + title: '理论学习 - 学习参考', + source: ['mse.hust.edu.cn/llxx1/xxck.htm'], + target: '/mse/llxx1/xxck', + }, + { + title: '理论学习 - 资料汇编', + source: ['mse.hust.edu.cn/llxx1/zlhb.htm'], + target: '/mse/llxx1/zlhb', + }, + { + title: '理论学习 - 其他群团', + source: ['mse.hust.edu.cn/llxx1/ghzz1/lmmc.htm'], + target: '/mse/llxx1/ghzz1/lmmc', + }, + { + title: '师资队伍 - 人才招聘', + source: ['mse.hust.edu.cn/szdw/rczp.htm'], + target: '/mse/szdw/rczp', + }, + { + title: '师资队伍 - 常用下载', + source: ['mse.hust.edu.cn/szdw/cyxz.htm'], + target: '/mse/szdw/cyxz', + }, + { + title: '人才培养 - 本科生教育', + source: ['mse.hust.edu.cn/rcpy/bksjy.htm'], + target: '/mse/rcpy/bksjy', + }, + { + title: '人才培养 - 研究生教育', + source: ['mse.hust.edu.cn/rcpy/yjsjy.htm'], + target: '/mse/rcpy/yjsjy', + }, + { + title: '人才培养 - 学生工作', + source: ['mse.hust.edu.cn/rcpy/xsg_z.htm'], + target: '/mse/rcpy/xsg_z', + }, + { + title: '人才培养 - 机械创新基地', + source: ['mse.hust.edu.cn/rcpy/jxcxjd.htm'], + target: '/mse/rcpy/jxcxjd', + }, + { + title: '人才培养 - 常用下载', + source: ['mse.hust.edu.cn/rcpy/cyxz.htm'], + target: '/mse/rcpy/cyxz', + }, + { + title: '科学研究 - 科研动态', + source: ['mse.hust.edu.cn/kxyj/kydt.htm'], + target: '/mse/kxyj/kydt', + }, + { + title: '科学研究 - 安全管理', + source: ['mse.hust.edu.cn/kxyj/aqgl.htm'], + target: '/mse/kxyj/aqgl', + }, + { + title: '科学研究 - 设备开放', + source: ['mse.hust.edu.cn/kxyj/sbkf.htm'], + target: '/mse/kxyj/sbkf', + }, + { + title: '科学研究 - 科研成果', + source: ['mse.hust.edu.cn/kxyj/kycg.htm'], + target: '/mse/kxyj/kycg', + }, + { + title: '科学研究 - 常用下载', + source: ['mse.hust.edu.cn/kxyj/cyxz.htm'], + target: '/mse/kxyj/cyxz', + }, + { + title: '社会服务 - 驻外研究院', + source: ['mse.hust.edu.cn/shfw/zwyjy.htm'], + target: '/mse/shfw/zwyjy', + }, + { + title: '社会服务 - 产业公司', + source: ['mse.hust.edu.cn/shfw/cygs.htm'], + target: '/mse/shfw/cygs', + }, + { + title: '合作交流 - 专家来访', + source: ['mse.hust.edu.cn/hzjl/zjlf.htm'], + target: '/mse/hzjl/zjlf', + }, + { + title: '合作交流 - 师生出访', + source: ['mse.hust.edu.cn/hzjl/sscf.htm'], + target: '/mse/hzjl/sscf', + }, + { + title: '合作交流 - 项目合作', + source: ['mse.hust.edu.cn/hzjl/xmhz.htm'], + target: '/mse/hzjl/xmhz', + }, + { + title: '合作交流 - 国际会议', + source: ['mse.hust.edu.cn/hzjl/gjhy.htm'], + target: '/mse/hzjl/gjhy', + }, + { + title: '合作交流 - 常用下载', + source: ['mse.hust.edu.cn/hzjl/cyxz.htm'], + target: '/mse/hzjl/cyxz', + }, + { + title: '校友专栏 - 校友动态', + source: ['mse.hust.edu.cn/xyzl/xydt.htm'], + target: '/mse/xyzl/xydt', + }, + { + title: '校友专栏 - 杰出校友', + source: ['mse.hust.edu.cn/xyzl/jcxy.htm'], + target: '/mse/xyzl/jcxy', + }, + { + title: '校友专栏 - 校友名录', + source: ['mse.hust.edu.cn/xyzl/xyml.htm'], + target: '/mse/xyzl/xyml', + }, + { + title: '校友专栏 - 校友照片', + source: ['mse.hust.edu.cn/xyzl/xyzp.htm'], + target: '/mse/xyzl/xyzp', + }, + { + title: '校友专栏 - 服务校友', + source: ['mse.hust.edu.cn/xyzl/fwxy.htm'], + target: '/mse/xyzl/fwxy', + }, + { + title: '校友专栏 - 常用下载', + source: ['mse.hust.edu.cn/xyzl/cyxz.htm'], + target: '/mse/xyzl/cyxz', + }, + { + title: '理论学习 - 党务动态', + source: ['mse.hust.edu.cn/llxx1/dwdt/djxw.htm'], + target: '/mse/llxx1/dwdt/djxw', + }, + { + title: '理论学习 - 共青团', + source: ['mse.hust.edu.cn/llxx1/gqt/xwdt.htm'], + target: '/mse/llxx1/gqt/xwdt', + }, + { + title: '理论学习 - 工会组织', + source: ['mse.hust.edu.cn/llxx1/ghzz/xwgg.htm'], + target: '/mse/llxx1/ghzz/xwgg', + }, + { + title: '理论学习 - 学习参考', + source: ['mse.hust.edu.cn/llxx1/xxck.htm'], + target: '/mse/llxx1/xxck', + }, + { + title: '理论学习 - 资料汇编', + source: ['mse.hust.edu.cn/llxx1/zlhb.htm'], + target: '/mse/llxx1/zlhb', + }, + { + title: '理论学习 - 其他群团', + source: ['mse.hust.edu.cn/llxx1/ghzz1/lmmc.htm'], + target: '/mse/llxx1/ghzz1/lmmc', + }, + { + title: '师资队伍 - 人才招聘', + source: ['mse.hust.edu.cn/szdw/rczp.htm'], + target: '/mse/szdw/rczp', + }, + { + title: '师资队伍 - 常用下载', + source: ['mse.hust.edu.cn/szdw/cyxz.htm'], + target: '/mse/szdw/cyxz', + }, + { + title: '人才培养 - 本科生教育', + source: ['mse.hust.edu.cn/rcpy/bksjy.htm'], + target: '/mse/rcpy/bksjy', + }, + { + title: '人才培养 - 研究生教育', + source: ['mse.hust.edu.cn/rcpy/yjsjy.htm'], + target: '/mse/rcpy/yjsjy', + }, + { + title: '人才培养 - 学生工作', + source: ['mse.hust.edu.cn/rcpy/xsg_z.htm'], + target: '/mse/rcpy/xsg_z', + }, + { + title: '人才培养 - 机械创新基地', + source: ['mse.hust.edu.cn/rcpy/jxcxjd.htm'], + target: '/mse/rcpy/jxcxjd', + }, + { + title: '人才培养 - 常用下载', + source: ['mse.hust.edu.cn/rcpy/cyxz.htm'], + target: '/mse/rcpy/cyxz', + }, + { + title: '科学研究 - 科研动态', + source: ['mse.hust.edu.cn/kxyj/kydt.htm'], + target: '/mse/kxyj/kydt', + }, + { + title: '科学研究 - 安全管理', + source: ['mse.hust.edu.cn/kxyj/aqgl.htm'], + target: '/mse/kxyj/aqgl', + }, + { + title: '科学研究 - 设备开放', + source: ['mse.hust.edu.cn/kxyj/sbkf.htm'], + target: '/mse/kxyj/sbkf', + }, + { + title: '科学研究 - 科研成果', + source: ['mse.hust.edu.cn/kxyj/kycg.htm'], + target: '/mse/kxyj/kycg', + }, + { + title: '科学研究 - 常用下载', + source: ['mse.hust.edu.cn/kxyj/cyxz.htm'], + target: '/mse/kxyj/cyxz', + }, + { + title: '社会服务 - 驻外研究院', + source: ['mse.hust.edu.cn/shfw/zwyjy.htm'], + target: '/mse/shfw/zwyjy', + }, + { + title: '社会服务 - 产业公司', + source: ['mse.hust.edu.cn/shfw/cygs.htm'], + target: '/mse/shfw/cygs', + }, + { + title: '合作交流 - 专家来访', + source: ['mse.hust.edu.cn/hzjl/zjlf.htm'], + target: '/mse/hzjl/zjlf', + }, + { + title: '合作交流 - 师生出访', + source: ['mse.hust.edu.cn/hzjl/sscf.htm'], + target: '/mse/hzjl/sscf', + }, + { + title: '合作交流 - 项目合作', + source: ['mse.hust.edu.cn/hzjl/xmhz.htm'], + target: '/mse/hzjl/xmhz', + }, + { + title: '合作交流 - 国际会议', + source: ['mse.hust.edu.cn/hzjl/gjhy.htm'], + target: '/mse/hzjl/gjhy', + }, + { + title: '合作交流 - 常用下载', + source: ['mse.hust.edu.cn/hzjl/cyxz.htm'], + target: '/mse/hzjl/cyxz', + }, + { + title: '校友专栏 - 校友动态', + source: ['mse.hust.edu.cn/xyzl/xydt.htm'], + target: '/mse/xyzl/xydt', + }, + { + title: '校友专栏 - 杰出校友', + source: ['mse.hust.edu.cn/xyzl/jcxy.htm'], + target: '/mse/xyzl/jcxy', + }, + { + title: '校友专栏 - 校友名录', + source: ['mse.hust.edu.cn/xyzl/xyml.htm'], + target: '/mse/xyzl/xyml', + }, + { + title: '校友专栏 - 校友照片', + source: ['mse.hust.edu.cn/xyzl/xyzp.htm'], + target: '/mse/xyzl/xyzp', + }, + { + title: '校友专栏 - 服务校友', + source: ['mse.hust.edu.cn/xyzl/fwxy.htm'], + target: '/mse/xyzl/fwxy', + }, + { + title: '校友专栏 - 常用下载', + source: ['mse.hust.edu.cn/xyzl/cyxz.htm'], + target: '/mse/xyzl/cyxz', + }, + ], +}; From 6deef181c5cf943c52464408d1effb7674efa467 Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:34:34 +0100 Subject: [PATCH 088/740] feat: Add L'Orient-Le Jour Route (#17030) * feat: Add L'Orient-Le Jour Route * fix codefactor * fix codefactor --- lib/config.ts | 10 + lib/routes/lorientlejour/index.ts | 173 ++++++++++++++++++ lib/routes/lorientlejour/namespace.ts | 7 + .../lorientlejour/templates/description.art | 18 ++ 4 files changed, 208 insertions(+) create mode 100644 lib/routes/lorientlejour/index.ts create mode 100644 lib/routes/lorientlejour/namespace.ts create mode 100644 lib/routes/lorientlejour/templates/description.art diff --git a/lib/config.ts b/lib/config.ts index 2d9292702faec92..e2e0e162f8794f5 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -183,6 +183,11 @@ export type Config = { lightnovel: { cookie?: string; }; + lorientlejour: { + token?: string; + username?: string; + password?: string; + }; malaysiakini: { email?: string; password?: string; @@ -567,6 +572,11 @@ const calculateValue = () => { lightnovel: { cookie: envs.SECURITY_KEY, }, + lorientlejour: { + token: envs.LORIENTLEJOUR_TOKEN, + username: envs.LORIENTLEJOUR_USERNAME, + password: envs.LORIENTLEJOUR_PASSWORD, + }, malaysiakini: { email: envs.MALAYSIAKINI_EMAIL, password: envs.MALAYSIAKINI_PASSWORD, diff --git a/lib/routes/lorientlejour/index.ts b/lib/routes/lorientlejour/index.ts new file mode 100644 index 000000000000000..74e9d612c429e3d --- /dev/null +++ b/lib/routes/lorientlejour/index.ts @@ -0,0 +1,173 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +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); + +export const route: Route = { + path: '/:category?', + categories: ['traditional-media'], + example: '/lorientlejour/977-lebanon', + parameters: { + category: 'Category from the last segment of the URL of the corresponding site, see below for more information, /977-Lebanon by default', + }, + features: { + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + requireConfig: [ + { + name: 'LORIENTLEJOUR_USERNAME', + optional: true, + description: `L'Orient-Le Jour/L'Orient Today Email or Username`, + }, + { + name: 'LORIENTLEJOUR_PASSWORD', + optional: true, + description: `L'Orient-Le Jour/L'Orient Today Password`, + }, + { + name: 'LORIENTLEJOUR_TOKEN', + optional: true, + description: `To obtain a token, log into L'Orient-Le Jour/L'Orient Today App and inspect the connection request to find the token parameter from the request URL`, + }, + ], + }, + name: 'Category', + 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. + :::`, + radar: [ + { + source: ['www.lorientlejour.com/*/:category'], + target: '/:category', + }, + { + source: ['www.lorientlejour.com'], + target: '/1-Liban', + }, + { + source: ['today.lorientlejour.com/*/:category'], + target: '/:category', + }, + { + source: ['today.lorientlejour.com'], + target: '/977-Lebanon', + }, + ], +}; + +async function handler(ctx) { + const category = ctx.req.param('category') ?? '977-Lebanon'; + const limit = ctx.req.param('limit') ?? 25; + + const categoryId = category.match(/^(\d+)/i)[0] ?? category; + + const key = '3d5_f6A(S$G_FD=2S(Dr6%7BW_h37@rE'; + + let token; + const cacheIn = await cache.get('lorientlejour:token'); + if (cacheIn) { + token = cacheIn; + } else if (config.lorientlejour.token) { + token = config.lorientlejour.token; + cache.set('lorientlejour:token', token); + } else if (config.lorientlejour.username && config.lorientlejour.password) { + const loginUrl = `https://www.lorientlejour.com/cmsapi/visitors.php?key=${key}&action=login&loginName=${config.lorientlejour.username}&password=${config.lorientlejour.password}`; + const loginResponse = await got(loginUrl); + token = loginResponse.data.data.token; + cache.set('lorientlejour:token', token); + } + + if (token) { + try { + await got(`https://www.lorientlejour.com/cmsapi/visitors.php?key=${key}&action=login_token&token=${token}`); + } catch (error) { + if (error instanceof FetchError && error.statusCode === 403) { + await cache.set('lorientlejour:token', ''); + } + throw error; + } + } + + let categoryUrl = `https://www.lorientlejour.com/cmsapi/categories.php?key=${key}&action=view&categoryId=${categoryId}`; + if (token) { + categoryUrl = categoryUrl + `&token=${token}`; + } + const categoryResponse = await cache.tryGet( + categoryUrl, + async () => + await got({ + method: 'get', + url: categoryUrl, + }), + config.cache.routeExpire, + false + ); + const categoryInfo = categoryResponse.data.data[0]; + let language = ''; + if (categoryInfo.typeId.locale) { + language = categoryInfo.typeId.locale; + } + if (language === '') { + language = categoryInfo.typeId.name === 'English' ? 'en-US' : 'fr-FR'; + } + let title = `L'Orient Le Jour`; + if (language === 'en-US') { + title = `L'Orient Today`; + } + + let url = `https://www.lorientlejour.com/cmsapi/content.php?text=clean&key=${key}&action=search&category=${categoryId}&limit=${limit}&text=false&page=1&includeSubcategories=1`; + if (token) { + url = url + `&token=${token}`; + } + const response = await got(url); + const items = response.data.data.map((item) => { + item.link = item.url; + item.author = item.authors.map((author) => author.name).join(', '); + item.pubDate = timezone(parseDate(item.firstPublished), +3); + item.updated = timezone(parseDate(item.lastUpdate), +3); + item.category = item.categories.map((itemCategory) => itemCategory.name); + const contents = item.contents; + const $ = load(contents); + const article = $('html'); + article.find('.inline-embeded-article').remove(); + article.find('.relatedArticles').remove(); + if (item.inline_attachments) { + article.find('.inlineImage').each(function () { + const inlineImageSrc = $(this).attr('src'); + const inlineAttachment = item.inline_attachments.find((inlineAttachment) => inlineAttachment.url === inlineImageSrc); + if (inlineAttachment && inlineAttachment.description) { + $(this).wrap('
'); + $(this).after(`
${inlineAttachment.description}
`); + } + }); + } + item.description = art(path.join(__dirname, 'templates/description.art'), { + summary: item.summary, + attachments: item.attachments, + article: article.html(), + }); + return item; + }); + + return { + title: `${title} - ${categoryInfo.name}`, + description: categoryInfo.description, + language, + link: categoryInfo.url, + item: items, + }; +} diff --git a/lib/routes/lorientlejour/namespace.ts b/lib/routes/lorientlejour/namespace.ts new file mode 100644 index 000000000000000..f8daeff3999fcb9 --- /dev/null +++ b/lib/routes/lorientlejour/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: `L'Orient-Le Jour/L'Orient Today`, + url: 'lorientlejour.com', + description: `RSS feed for the Lebanon-based French-language newspaper L'Orient-Le Jour and its English edition L'Orient Today`, +}; diff --git a/lib/routes/lorientlejour/templates/description.art b/lib/routes/lorientlejour/templates/description.art new file mode 100644 index 000000000000000..3fd2ae9c4627477 --- /dev/null +++ b/lib/routes/lorientlejour/templates/description.art @@ -0,0 +1,18 @@ +{{ 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 From 1e56460b81662bb25a5628329c16d34321bfa1ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=89=8A=E5=BE=AE=E5=AF=92?= <595666367@qq.com> Date: Wed, 9 Oct 2024 00:04:13 +0800 Subject: [PATCH 089/740] fix: update route HelloGitHub (#16823) --- lib/routes/hellogithub/index.ts | 84 +++++++------------------------- lib/routes/hellogithub/report.ts | 2 +- 2 files changed, 18 insertions(+), 68 deletions(-) diff --git a/lib/routes/hellogithub/index.ts b/lib/routes/hellogithub/index.ts index c5093e5e3524fe9..877a9e37c402713 100644 --- a/lib/routes/hellogithub/index.ts +++ b/lib/routes/hellogithub/index.ts @@ -1,24 +1,19 @@ 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 { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; -import path from 'node:path'; const sorts = { - hot: '热门', - last: '最近', + featured: '精选', + all: '全部', }; export const route: Route = { - path: ['/article/:sort?/:id?'], + path: ['/home/:sort?/:id?'], categories: ['programming'], - example: '/hellogithub/article', - parameters: { sort: '排序方式,见下表,默认为 `hot`,即热门', id: '标签 id,可在对应标签页 URL 中找到,默认为全部标签' }, + example: '/hellogithub/home', + parameters: { sort: '排序方式,见下表,默认为 `featured`,即精选', id: '标签 id,可在对应标签页 URL 中找到,默认为全部标签' }, features: { requireConfig: false, requirePuppeteer: false, @@ -27,16 +22,16 @@ export const route: Route = { supportPodcast: false, supportScihub: false, }, - name: '文章', + name: '开源项目', maintainers: ['moke8', 'nczitzk'], handler, - description: `| 热门 | 最近 | + description: `| 精选 | 全部 | | ---- | ---- | - | hot | last |`, + | featured | all |`, }; async function handler(ctx) { - const sort = ctx.req.param('sort') ?? 'hot'; + const sort = ctx.req.param('sort') ?? 'featured'; const id = ctx.req.param('id') ?? ''; const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; @@ -50,7 +45,7 @@ async function handler(ctx) { url: apiUrl, }); - let buildId, tag; + let tag; if (id) { const tagUrl = `${rootUrl}/tags/${id}`; @@ -62,66 +57,21 @@ async function handler(ctx) { const $ = load(tagResponse.data); tag = $('meta[property="og:title"]')?.attr('content')?.split(' ').pop(); - buildId = tagResponse.data.match(/"buildId":"(.*?)",/)[1]; - } - - if (!buildId) { - const buildResponse = await got({ - method: 'get', - url: rootUrl, - }); - - buildId = buildResponse.data.match(/"buildId":"(.*?)",/)[1]; } - let items = response.data.data.slice(0, limit).map((item) => ({ + const items = response.data.data.slice(0, limit).map((item) => ({ guid: item.item_id, - title: item.title, + title: `${item.name}: ${item.title}`, author: item.author, link: `${rootUrl}/repository/${item.item_id}`, - description: item.description, pubDate: parseDate(item.updated_at), + name: `${item.author}/${item.name}`, + summary: item.summary, + language: item.primary_lang, })); - items = await Promise.all( - items.map((item) => - cache.tryGet(item.link, async () => { - const detailUrl = `${rootUrl}/_next/data/${buildId}/repository/${item.guid}.json`; - - const detailResponse = await got({ - method: 'get', - url: detailUrl, - }); - - const data = detailResponse.data.pageProps.repo; - - item.title = `${data.name}: ${data.title}`; - item.category = [`No.${data.volume_name}`, ...data.tags.map((t) => t.name)]; - item.description = art(path.join(__dirname, 'templates/description.art'), { - name: data.full_name, - description: data.description, - summary: data.summary, - image: data.image_url, - stars: data.stars ?? data.stars_str, - isChinese: data.has_chinese, - language: data.primary_lang, - isActive: data.is_active, - license: data.license, - isOrganization: data.is_org, - forks: data.forks, - openIssues: data.open_issues, - subscribers: data.subscribers, - homepage: data.homepage, - url: data.url, - }); - - return item; - }) - ) - ); - return { - title: `HelloGithub - ${sorts[sort]}${tag || ''}项目`, + title: `HelloGithub - ${sorts[sort]}${tag || ''}开源项目`, link: currentUrl, item: items, }; diff --git a/lib/routes/hellogithub/report.ts b/lib/routes/hellogithub/report.ts index 734e98e3b8bdc96..96a5f4ac9181193 100644 --- a/lib/routes/hellogithub/report.ts +++ b/lib/routes/hellogithub/report.ts @@ -39,7 +39,7 @@ async function handler(ctx) { const buildId = buildResponse.data.match(/"buildId":"(.*?)",/)[1]; - const apiUrl = `${rootUrl}/_next/data/${buildId}/report/${type}.json`; + const apiUrl = `${rootUrl}/_next/data/${buildId}/zh/report/${type}.json`; const response = await got({ method: 'get', From 3a64e9eb91a7db183eaf72dafc45732f8ea6302d Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 9 Oct 2024 00:21:50 +0800 Subject: [PATCH 090/740] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD=E5=8D=8E?= =?UTF-8?q?=E4=BA=BA=E6=B0=91=E5=85=B1=E5=92=8C=E5=9B=BD=E5=9B=BD=E5=AE=B6?= =?UTF-8?q?=E5=8F=91=E5=B1=95=E5=92=8C=E6=94=B9=E9=9D=A9=E5=A7=94=E5=91=98?= =?UTF-8?q?=E4=BC=9A=E6=94=BF=E5=BA=9C=E4=BF=A1=E6=81=AF=E5=85=AC=E5=BC=80?= =?UTF-8?q?=20(#16850)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 中华人民共和国国家发展和改革委员会政府信息公开 * update to existing route * feat(route): add 中华人民共和国国家发展和改革委员会政府信息公开 --- lib/routes/gov/ndrc/zfxxgk.ts | 106 +++++++++++++++++++++++++ lib/routes/gov/ndrc/zfxxgk/articles.ts | 73 ----------------- 2 files changed, 106 insertions(+), 73 deletions(-) create mode 100644 lib/routes/gov/ndrc/zfxxgk.ts delete mode 100644 lib/routes/gov/ndrc/zfxxgk/articles.ts diff --git a/lib/routes/gov/ndrc/zfxxgk.ts b/lib/routes/gov/ndrc/zfxxgk.ts new file mode 100644 index 000000000000000..72e274ba356b099 --- /dev/null +++ b/lib/routes/gov/ndrc/zfxxgk.ts @@ -0,0 +1,106 @@ +import { Route } from '@/types'; + +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +export const handler = async (ctx) => { + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; + + const rootUrl = 'https://zfxxgk.ndrc.gov.cn'; + const currentUrl = new URL('web/dirlist.jsp', rootUrl).href; + + const { data: response } = await got(currentUrl); + + const $ = load(response); + + const language = $('html').prop('lang'); + + $('th').parent().remove(); + + let items = $('div.zwxxkg-result tr') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + const a = item.find('a.xxgk_list1'); + + return { + title: a.text(), + pubDate: parseDate(item.find('td').last().text()), + link: new URL(a.prop('href'), currentUrl).href, + language, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + const title = $$('meta[name="ArticleTitle"]').prop('content'); + const description = $$('div.zwgkdetail').html(); + + item.title = title; + item.description = description; + item.category = [...new Set([$$('meta[name="ContentSource"]').prop('content'), $$('meta[name="ColumnName"]').prop('content'), $$('meta[name="ColumnType"]').prop('content')])].filter(Boolean); + item.author = $$('meta[name="ContentSource"]').prop('content'); + item.content = { + html: description, + text: $$('div.article').text(), + }; + item.language = language; + item.enclosure_url = $$('table.enclosure a.xxgk_list1').length === 0 ? undefined : new URL($$('table.enclosure a.xxgk_list1').first().prop('href'), currentUrl).href; + item.enclosure_title = item.enclosure_url ? $$('table.enclosure a.xxgk_list1').first().text() : undefined; + + return item; + }) + ) + ); + + const image = new URL($('div.zwgklogo img').prop('src'), currentUrl).href; + + return { + title: `${$('meta[name="SiteName"]').prop('content')} - ${$('div.zwgktoptitle').text()}`, + description: $('meta[name="ColumnDescription"]').prop('content'), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: $('meta[name="SiteName"]').prop('content'), + language, + }; +}; + +export const route: Route = { + path: ['/ndrc/zfxxgk'], + // path: ['/ndrc/zfxxgk', '/ndrc/zfxxgk/iteminfo'], + name: '中华人民共和国国家发展和改革委员会政府信息公开', + url: 'zfxxgk.ndrc.gov.cn', + maintainers: ['howfool', 'nczitzk'], + handler, + example: '/gov/ndrc/zfxxgk', + parameters: undefined, + description: undefined, + categories: ['government'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['zfxxgk.ndrc.gov.cn/web/dirlist.jsp'], + target: '/ndrc/zfxxgk', + }, + ], +}; diff --git a/lib/routes/gov/ndrc/zfxxgk/articles.ts b/lib/routes/gov/ndrc/zfxxgk/articles.ts deleted file mode 100644 index 12304cc6842fc0d..000000000000000 --- a/lib/routes/gov/ndrc/zfxxgk/articles.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Route } from '@/types'; -import cache from '@/utils/cache'; -import got from '@/utils/got'; -import { load } from 'cheerio'; -import { parseDate } from '@/utils/parse-date'; - -export const route: Route = { - path: '/ndrc/zfxxgk/iteminfo', - categories: ['government'], - example: '/gov/ndrc/zfxxgk/iteminfo', - parameters: {}, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - name: '国家发展改革委 - 政府信息公开', - maintainers: ['howfool'], - handler, - url: 'zfxxgk.ndrc.gov.cn/web/dirlist.jsp', -}; - -async function handler() { - const homeUrl = 'https://zfxxgk.ndrc.gov.cn/web/dirlist.jsp'; - const rootUrl = 'https://zfxxgk.ndrc.gov.cn/web/'; - - const response = await got({ - method: 'get', - url: homeUrl, - }); - - const $ = load(response.data); - - let items = $('div.zwgk-right .zwxxkg-result tr') - .toArray() - .slice(1) - .map((item) => { - item = $(item); - - return { - title: item.find('a').text().replace(/^\s*/, ''), - link: rootUrl + item.find('a').attr('href'), - data: item.find('td:last').text(), - }; - }); - - items = await Promise.all( - items.map((item) => - cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); - - const content = load(detailResponse.data); - content('[class$="top"]').remove(); - item.description = content('.zwgkbg').html(); - item.pubDate = parseDate(item.data); - - return item; - }) - ) - ); - - return { - title: '国家发展改革委 - 政府信息公开', - link: homeUrl, - item: items, - }; -} From 2a1af7dc9039cd7b82e7c447d54187910570614e Mon Sep 17 00:00:00 2001 From: Tony Date: Tue, 8 Oct 2024 09:37:02 -0700 Subject: [PATCH 091/740] fix(cache): store cache TTL (#17044) --- lib/utils/cache/redis.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utils/cache/redis.ts b/lib/utils/cache/redis.ts index ae40fe383ea1e0c..a3ba5850c3e8ce4 100644 --- a/lib/utils/cache/redis.ts +++ b/lib/utils/cache/redis.ts @@ -64,8 +64,8 @@ export default { } if (key) { if (maxAge !== config.cache.contentExpire) { - // Only set cacheTtlKey if maxAge !== contentExpire - clients.redisClient.set(getCacheTtlKey(key), value, 'EX', maxAge); + // intentionally store the cache ttl if it is not the default value + clients.redisClient.set(getCacheTtlKey(key), maxAge, 'EX', maxAge); } return clients.redisClient.set(key, value, 'EX', maxAge); // setMode: https://redis.io/commands/set } From 6e127697018fba84f11ba93c99daf91d71133a2b Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Tue, 8 Oct 2024 23:52:38 +0100 Subject: [PATCH 092/740] feat(route/lorientlejour): fix limit query and add multiple categories functionality (#17045) --- lib/routes/lorientlejour/index.ts | 69 ++++++++++++++++--------------- 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/lib/routes/lorientlejour/index.ts b/lib/routes/lorientlejour/index.ts index 74e9d612c429e3d..76f231ce14a2d07 100644 --- a/lib/routes/lorientlejour/index.ts +++ b/lib/routes/lorientlejour/index.ts @@ -47,7 +47,8 @@ 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: [ { @@ -70,10 +71,8 @@ export const route: Route = { }; async function handler(ctx) { - const category = ctx.req.param('category') ?? '977-Lebanon'; - const limit = ctx.req.param('limit') ?? 25; - - const categoryId = category.match(/^(\d+)/i)[0] ?? category; + const categoryId = (ctx.req.param('category') ?? '977-Lebanon').split('|').map((item) => item.match(/^(\d+)/i)[0] ?? item); + const limit = ctx.req.query('limit') ?? 25; const key = '3d5_f6A(S$G_FD=2S(Dr6%7BW_h37@rE'; @@ -102,34 +101,38 @@ async function handler(ctx) { } } - let categoryUrl = `https://www.lorientlejour.com/cmsapi/categories.php?key=${key}&action=view&categoryId=${categoryId}`; - if (token) { - categoryUrl = categoryUrl + `&token=${token}`; - } - const categoryResponse = await cache.tryGet( - categoryUrl, - async () => - await got({ - method: 'get', - url: categoryUrl, - }), - config.cache.routeExpire, - false - ); - const categoryInfo = categoryResponse.data.data[0]; + let title = `L'Orient Le Jour/L'Orient Today`; + let description = ''; + let link = 'https://www.lorientlejour.com'; let language = ''; - if (categoryInfo.typeId.locale) { - language = categoryInfo.typeId.locale; - } - if (language === '') { - language = categoryInfo.typeId.name === 'English' ? 'en-US' : 'fr-FR'; - } - let title = `L'Orient Le Jour`; - if (language === 'en-US') { - title = `L'Orient Today`; + + if (categoryId.length === 1) { + let categoryUrl = `https://www.lorientlejour.com/cmsapi/categories.php?key=${key}&action=view&categoryId=${categoryId[0]}`; + if (token) { + categoryUrl = categoryUrl + `&token=${token}`; + } + const categoryResponse = await cache.tryGet( + categoryUrl, + async () => + await got({ + method: 'get', + url: categoryUrl, + }), + config.cache.routeExpire, + false + ); + const categoryInfo = categoryResponse.data.data[0]; + if (categoryInfo.typeId.locale) { + language = categoryInfo.typeId.locale; + } else { + language = categoryInfo.typeId.name === 'English' ? 'en-US' : 'fr-FR'; + } + title = language === 'en-US' ? `L'Orient Today - ${categoryInfo.name}` : `L'Orient Le Jour - ${categoryInfo.name}`; + description = categoryInfo.description; + link = categoryInfo.url; } - let url = `https://www.lorientlejour.com/cmsapi/content.php?text=clean&key=${key}&action=search&category=${categoryId}&limit=${limit}&text=false&page=1&includeSubcategories=1`; + let url = `https://www.lorientlejour.com/cmsapi/content.php?text=clean&key=${key}&action=search&category=${encodeURIComponent(JSON.stringify(categoryId))}&limit=${limit}&text=false&page=1&includeSubcategories=1`; if (token) { url = url + `&token=${token}`; } @@ -164,10 +167,10 @@ async function handler(ctx) { }); return { - title: `${title} - ${categoryInfo.name}`, - description: categoryInfo.description, + title, + description, language, - link: categoryInfo.url, + link, item: items, }; } From 755ba8cdaaa9817e426c0018699d7a69942c5216 Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Wed, 9 Oct 2024 03:59:06 +0100 Subject: [PATCH 093/740] fix(route/lorientlejour): fix subcategories (#17049) --- lib/routes/lorientlejour/index.ts | 46 +++++++++++++++++++------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/lib/routes/lorientlejour/index.ts b/lib/routes/lorientlejour/index.ts index 76f231ce14a2d07..540ff264d99b439 100644 --- a/lib/routes/lorientlejour/index.ts +++ b/lib/routes/lorientlejour/index.ts @@ -11,6 +11,7 @@ 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 = { path: '/:category?', @@ -70,12 +71,25 @@ Multiple categories seperated by '|' is also supported, e.g. /lorientlejour/977- ], }; +async function viewCategory(category: string) { + const url = `https://www.lorientlejour.com/cmsapi/categories.php?key=${key}&action=view&categoryId=${category}`; + const response = await cache.tryGet( + url, + async () => + await got({ + method: 'get', + url, + }), + config.cache.routeExpire, + false + ); + return response.data.data[0]; +} + async function handler(ctx) { const categoryId = (ctx.req.param('category') ?? '977-Lebanon').split('|').map((item) => item.match(/^(\d+)/i)[0] ?? item); const limit = ctx.req.query('limit') ?? 25; - const key = '3d5_f6A(S$G_FD=2S(Dr6%7BW_h37@rE'; - let token; const cacheIn = await cache.get('lorientlejour:token'); if (cacheIn) { @@ -107,21 +121,7 @@ async function handler(ctx) { let language = ''; if (categoryId.length === 1) { - let categoryUrl = `https://www.lorientlejour.com/cmsapi/categories.php?key=${key}&action=view&categoryId=${categoryId[0]}`; - if (token) { - categoryUrl = categoryUrl + `&token=${token}`; - } - const categoryResponse = await cache.tryGet( - categoryUrl, - async () => - await got({ - method: 'get', - url: categoryUrl, - }), - config.cache.routeExpire, - false - ); - const categoryInfo = categoryResponse.data.data[0]; + const categoryInfo = await viewCategory(categoryId[0]); if (categoryInfo.typeId.locale) { language = categoryInfo.typeId.locale; } else { @@ -132,7 +132,17 @@ async function handler(ctx) { link = categoryInfo.url; } - let url = `https://www.lorientlejour.com/cmsapi/content.php?text=clean&key=${key}&action=search&category=${encodeURIComponent(JSON.stringify(categoryId))}&limit=${limit}&text=false&page=1&includeSubcategories=1`; + const subcategories = await Promise.all( + categoryId.map(async (id) => { + // get all subcategories of the selected category + const contents = await viewCategory(id); + return contents.children.map((child) => child.id); + }) + ); + const categoriesParam = [...new Set([...categoryId, ...subcategories.flat()])]; + // merge all subcategories with the selected categories to get all contents of the selected category and its subcategories + + let url = `https://www.lorientlejour.com/cmsapi/content.php?text=clean&key=${key}&action=search&category=${encodeURIComponent(JSON.stringify(categoriesParam))}&limit=${limit}&text=false&page=1`; if (token) { url = url + `&token=${token}`; } From 98b7703e95f31072ab2f19cf27e8eafa80ede916 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Wed, 9 Oct 2024 11:17:02 +0700 Subject: [PATCH 094/740] fix(route): use apnews api instead of official rss (down now) --- lib/routes/apnews/api.ts | 2 +- lib/routes/apnews/rss.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/apnews/api.ts b/lib/routes/apnews/api.ts index 28d7e0f4f013701..db520c2c5028cce 100644 --- a/lib/routes/apnews/api.ts +++ b/lib/routes/apnews/api.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/api/:tags?', - categories: ['traditional-media'], + categories: ['traditional-media', 'popular'], example: '/apnews/api/business', view: ViewType.Articles, parameters: { diff --git a/lib/routes/apnews/rss.ts b/lib/routes/apnews/rss.ts index a34dc17b0aeef6c..8402bde6a315052 100644 --- a/lib/routes/apnews/rss.ts +++ b/lib/routes/apnews/rss.ts @@ -5,7 +5,7 @@ const HOME_PAGE = 'https://apnews.com'; export const route: Route = { path: '/rss/:category?', - categories: ['traditional-media', 'popular'], + categories: ['traditional-media'], example: '/apnews/rss/business', view: ViewType.Articles, parameters: { From a86f8f647043805fc4e427422c70ed03ac71c791 Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Wed, 9 Oct 2024 11:29:32 +0700 Subject: [PATCH 095/740] chore(route): add apnews api tag options --- lib/routes/apnews/api.ts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/lib/routes/apnews/api.ts b/lib/routes/apnews/api.ts index db520c2c5028cce..c0c0372f4b65909 100644 --- a/lib/routes/apnews/api.ts +++ b/lib/routes/apnews/api.ts @@ -7,11 +7,26 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/api/:tags?', categories: ['traditional-media', 'popular'], - example: '/apnews/api/business', + example: '/apnews/api/apf-topnews', view: ViewType.Articles, parameters: { tags: { - description: 'Getting a list of articles from a public API based on tags. See https://github.com/kovidgoyal/calibre/blob/81666219718b5f57d56b149a7ac017cc2a76b931/recipes/ap.recipe#L43-L46', + 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', }, }, From d24ab8acae4a1c76e5f8ebae4e8cc210a1aed08b Mon Sep 17 00:00:00 2001 From: Shinku <17696928+Shinku-Chen@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:56:12 +0800 Subject: [PATCH 096/740] =?UTF-8?q?docs:=20news.cn=20namespace=20change=20?= =?UTF-8?q?to=20=E6=96=B0=E5=8D=8E=E7=A4=BE=20(#17056)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/news/namespace.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/news/namespace.ts b/lib/routes/news/namespace.ts index 8dfc1cc0409ede7..95f6fd2bb95335f 100644 --- a/lib/routes/news/namespace.ts +++ b/lib/routes/news/namespace.ts @@ -1,6 +1,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: '小黑盒', + name: '新华社', url: 'news.cn', }; From 5c00059579479865d6204c037a3305d6bd1ae5b7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 01:59:33 -0700 Subject: [PATCH 097/740] chore(deps-dev): bump got from 14.4.2 to 14.4.3 (#17057) * chore(deps-dev): bump got from 14.4.2 to 14.4.3 Bumps [got](https://github.com/sindresorhus/got) from 14.4.2 to 14.4.3. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v14.4.2...v14.4.3) --- updated-dependencies: - dependency-name: got dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 bfeb0b4559f3c69..ff465cbad6134f9 100644 --- a/package.json +++ b/package.json @@ -177,7 +177,7 @@ "eslint-plugin-yml": "1.14.0", "fs-extra": "11.2.0", "globals": "15.10.0", - "got": "14.4.2", + "got": "14.4.3", "husky": "9.1.6", "js-beautify": "1.15.1", "lint-staged": "15.2.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 04682e388e535a0..0722af7885c4027 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -385,8 +385,8 @@ importers: specifier: 15.10.0 version: 15.10.0 got: - specifier: 14.4.2 - version: 14.4.2 + specifier: 14.4.3 + version: 14.4.3 husky: specifier: 9.1.6 version: 9.1.6 @@ -3407,8 +3407,8 @@ packages: resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==} engines: {node: '>=14.16'} - got@14.4.2: - resolution: {integrity: sha512-+Te/qEZ6hr7i+f0FNgXx/6WQteSM/QqueGvxeYQQFm0GDfoxLVJ/oiwUKYMTeioColWUTdewZ06hmrBjw6F7tw==} + got@14.4.3: + resolution: {integrity: sha512-iTC0Z87yxSijWTh/IpvGpwOhIQK7+GgWkYrMRoN/hB9qeRj9RPuLGODwevs0p5idUf7nrxCVa5IlOmK3b8z+KA==} engines: {node: '>=20'} graceful-fs@4.2.11: @@ -9245,7 +9245,7 @@ snapshots: p-cancelable: 3.0.0 responselike: 3.0.0 - got@14.4.2: + got@14.4.3: dependencies: '@sindresorhus/is': 7.0.1 '@szmarczak/http-timer': 5.0.1 From 2970a3a73e0146081bc38d4bb62940f68e1156db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 02:02:31 -0700 Subject: [PATCH 098/740] chore(deps): bump query-string from 9.1.0 to 9.1.1 (#17061) * chore(deps): bump query-string from 9.1.0 to 9.1.1 Bumps [query-string](https://github.com/sindresorhus/query-string) from 9.1.0 to 9.1.1. - [Release notes](https://github.com/sindresorhus/query-string/releases) - [Commits](https://github.com/sindresorhus/query-string/compare/v9.1.0...v9.1.1) --- updated-dependencies: - dependency-name: query-string dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 ff465cbad6134f9..f25f1218615f311 100644 --- a/package.json +++ b/package.json @@ -111,7 +111,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.0", + "query-string": "9.1.1", "rate-limiter-flexible": "5.0.3", "re2js": "0.4.2", "rfc4648": "1.5.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0722af7885c4027..5f80b46ff0108a7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -192,8 +192,8 @@ importers: specifier: 2.4.1 version: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10))) query-string: - specifier: 9.1.0 - version: 9.1.0 + specifier: 9.1.1 + version: 9.1.1 rate-limiter-flexible: specifier: 5.0.3 version: 5.0.3 @@ -4768,8 +4768,8 @@ packages: resolution: {integrity: sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==} engines: {node: '>=6'} - query-string@9.1.0: - resolution: {integrity: sha512-t6dqMECpCkqfyv2FfwVS1xcB6lgXW/0XZSaKdsCNGYkqMO76AFiJEg4vINzoDKcZa6MS7JX+OHIjwh06K5vczw==} + query-string@9.1.1: + resolution: {integrity: sha512-MWkCOVIcJP9QSKU52Ngow6bsAWAPlPK2MludXvcrS2bGZSl+T1qX9MZvRIkqUIkGLJquMJHWfsT6eRqUpp4aWg==} engines: {node: '>=18'} querystringify@2.2.0: @@ -10754,7 +10754,7 @@ snapshots: split-on-first: 1.1.0 strict-uri-encode: 2.0.0 - query-string@9.1.0: + query-string@9.1.1: dependencies: decode-uri-component: 0.4.1 filter-obj: 5.1.0 From e2e0c14b1b053944879116aaf69279dd3ddd3031 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 02:05:28 -0700 Subject: [PATCH 099/740] chore(deps): bump ofetch from 1.4.0 to 1.4.1 (#17062) * chore(deps): bump ofetch from 1.4.0 to 1.4.1 Bumps [ofetch](https://github.com/unjs/ofetch) from 1.4.0 to 1.4.1. - [Release notes](https://github.com/unjs/ofetch/releases) - [Changelog](https://github.com/unjs/ofetch/blob/main/CHANGELOG.md) - [Commits](https://github.com/unjs/ofetch/compare/v1.4.0...v1.4.1) --- updated-dependencies: - dependency-name: ofetch dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 f25f1218615f311..1d154d49e2415be 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "module-alias": "2.2.3", "notion-to-md": "3.1.1", "oauth-1.0a": "2.2.6", - "ofetch": "1.4.0", + "ofetch": "1.4.1", "otplib": "12.0.1", "pac-proxy-agent": "7.0.2", "proxy-chain": "2.5.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5f80b46ff0108a7..ee73cd4f04b8fc3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -165,8 +165,8 @@ importers: specifier: 2.2.6 version: 2.2.6 ofetch: - specifier: 1.4.0 - version: 1.4.0 + specifier: 1.4.1 + version: 1.4.1 otplib: specifier: 12.0.1 version: 12.0.1 @@ -4405,8 +4405,8 @@ packages: resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} engines: {node: '>= 0.4'} - ofetch@1.4.0: - resolution: {integrity: sha512-MuHgsEhU6zGeX+EMh+8mSMrYTnsqJQQrpM00Q6QHMKNqQ0bKy0B43tk8tL1wg+CnsSTy1kg4Ir2T5Ig6rD+dfQ==} + ofetch@1.4.1: + resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} on-exit-leak-free@2.1.2: resolution: {integrity: sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==} @@ -10343,7 +10343,7 @@ snapshots: object-inspect@1.13.2: {} - ofetch@1.4.0: + ofetch@1.4.1: dependencies: destr: 2.0.3 node-fetch-native: 1.6.4 From 1845587ed28972277eb5b79f624dff5e52a09a99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 02:06:34 -0700 Subject: [PATCH 100/740] chore(deps-dev): bump globals from 15.10.0 to 15.11.0 (#17059) * chore(deps-dev): bump globals from 15.10.0 to 15.11.0 Bumps [globals](https://github.com/sindresorhus/globals) from 15.10.0 to 15.11.0. - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v15.10.0...v15.11.0) --- updated-dependencies: - dependency-name: globals dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 1d154d49e2415be..1db800fdda9a544 100644 --- a/package.json +++ b/package.json @@ -176,7 +176,7 @@ "eslint-plugin-unicorn": "56.0.0", "eslint-plugin-yml": "1.14.0", "fs-extra": "11.2.0", - "globals": "15.10.0", + "globals": "15.11.0", "got": "14.4.3", "husky": "9.1.6", "js-beautify": "1.15.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ee73cd4f04b8fc3..2cf1b2d8cc898b9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -382,8 +382,8 @@ importers: specifier: 11.2.0 version: 11.2.0 globals: - specifier: 15.10.0 - version: 15.10.0 + specifier: 15.11.0 + version: 15.11.0 got: specifier: 14.4.3 version: 14.4.3 @@ -3381,8 +3381,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.10.0: - resolution: {integrity: sha512-tqFIbz83w4Y5TCbtgjZjApohbuh7K9BxGYFm7ifwDR240tvdb7P9x+/9VvUKlmkPoiknoJtanI8UOrqxS3a7lQ==} + globals@15.11.0: + resolution: {integrity: sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw==} engines: {node: '>=18'} globrex@0.1.2: @@ -8676,7 +8676,7 @@ snapshots: eslint: 9.12.0 eslint-plugin-es-x: 7.8.0(eslint@9.12.0) get-tsconfig: 4.8.1 - globals: 15.10.0 + globals: 15.11.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 @@ -8700,7 +8700,7 @@ snapshots: core-js-compat: 3.38.1 eslint: 9.12.0 esquery: 1.6.0 - globals: 15.10.0 + globals: 15.11.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 jsesc: 3.0.2 @@ -9191,7 +9191,7 @@ snapshots: globals@14.0.0: {} - globals@15.10.0: {} + globals@15.11.0: {} globrex@0.1.2: {} From 2bdc5cd97b49a46a6494a7a2ebaa4247a4b6e250 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 02:29:17 -0700 Subject: [PATCH 101/740] chore(deps-dev): bump typescript from 5.6.2 to 5.6.3 (#17060) * chore(deps-dev): bump typescript from 5.6.2 to 5.6.3 Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.6.2 to 5.6.3. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.6.2...v5.6.3) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 126 ++++++++++++++++++++++++------------------------- 2 files changed, 64 insertions(+), 64 deletions(-) diff --git a/package.json b/package.json index 1db800fdda9a544..2a7df18d8c7302e 100644 --- a/package.json +++ b/package.json @@ -186,7 +186,7 @@ "prettier": "3.3.3", "remark-parse": "11.0.0", "supertest": "7.0.0", - "typescript": "5.6.2", + "typescript": "5.6.3", "unified": "11.0.5", "vite-tsconfig-paths": "5.0.1", "vitest": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2cf1b2d8cc898b9..595f8f1ee10f406 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -178,19 +178,19 @@ importers: version: 2.5.3 puppeteer: specifier: 22.6.2 - version: 22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10) + version: 22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)) + version: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10))) + version: 2.11.2(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10))) + version: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10))) + version: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10))) query-string: specifier: 9.1.1 version: 9.1.1 @@ -275,7 +275,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 2.9.0 - version: 2.9.0(eslint@9.12.0)(typescript@5.6.2) + version: 2.9.0(eslint@9.12.0)(typescript@5.6.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -344,10 +344,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.8.1 - version: 8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2) + version: 8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.8.1 - version: 8.8.1(eslint@9.12.0)(typescript@5.6.2) + version: 8.8.1(eslint@9.12.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.4 version: 0.27.4 @@ -401,7 +401,7 @@ importers: version: 3.0.5 msw: specifier: 2.4.3 - version: 2.4.3(typescript@5.6.2) + version: 2.4.3(typescript@5.6.3) prettier: specifier: 3.3.3 version: 3.3.3 @@ -412,14 +412,14 @@ importers: specifier: 7.0.0 version: 7.0.0 typescript: - specifier: 5.6.2 - version: 5.6.2 + specifier: 5.6.3 + version: 5.6.3 unified: specifier: 11.0.5 version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.5)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.8(@types/node@22.7.5)) vitest: specifier: 2.0.5 version: 2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -5481,8 +5481,8 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typescript@5.6.2: - resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} + typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} engines: {node: '>=14.17'} hasBin: true @@ -7378,9 +7378,9 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.9.0(eslint@9.12.0)(typescript@5.6.2)': + '@stylistic/eslint-plugin@2.9.0(eslint@9.12.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.3) eslint: 9.12.0 eslint-visitor-keys: 4.1.0 espree: 10.2.0 @@ -7550,34 +7550,34 @@ snapshots: '@types/node': 22.7.5 optional: true - '@typescript-eslint/eslint-plugin@8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.2))(eslint@9.12.0)(typescript@5.6.2)': + '@typescript-eslint/eslint-plugin@8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.8.1(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/parser': 8.8.1(eslint@9.12.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.8.1 - '@typescript-eslint/type-utils': 8.8.1(eslint@9.12.0)(typescript@5.6.2) - '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/type-utils': 8.8.1(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.8.1 eslint: 9.12.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.2)': + '@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 8.8.1 '@typescript-eslint/types': 8.8.1 - '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.8.1 debug: 4.3.7 eslint: 9.12.0 optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color @@ -7586,21 +7586,21 @@ snapshots: '@typescript-eslint/types': 8.8.1 '@typescript-eslint/visitor-keys': 8.8.1 - '@typescript-eslint/type-utils@8.8.1(eslint@9.12.0)(typescript@5.6.2)': + '@typescript-eslint/type-utils@8.8.1(eslint@9.12.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.2) - '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) + '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.3) debug: 4.3.7 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - eslint - supports-color '@typescript-eslint/types@8.8.1': {} - '@typescript-eslint/typescript-estree@8.8.1(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@8.8.1(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.8.1 '@typescript-eslint/visitor-keys': 8.8.1 @@ -7609,18 +7609,18 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.2) + ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.8.1(eslint@9.12.0)(typescript@5.6.2)': + '@typescript-eslint/utils@8.8.1(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) '@typescript-eslint/scope-manager': 8.8.1 '@typescript-eslint/types': 8.8.1 - '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) eslint: 9.12.0 transitivePeerDependencies: - supports-color @@ -8242,14 +8242,14 @@ snapshots: core-util-is@1.0.2: {} - cosmiconfig@9.0.0(typescript@5.6.2): + cosmiconfig@9.0.0(typescript@5.6.3): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 cross-env@7.0.3: dependencies: @@ -10230,7 +10230,7 @@ snapshots: ms@2.1.3: {} - msw@2.4.3(typescript@5.6.2): + msw@2.4.3(typescript@5.6.3): dependencies: '@bundled-es-modules/cookie': 2.0.0 '@bundled-es-modules/statuses': 1.0.1 @@ -10250,7 +10250,7 @@ snapshots: type-fest: 4.26.1 yargs: 17.7.2 optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 mute-stream@0.0.8: {} @@ -10676,63 +10676,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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10))): dependencies: debug: 4.3.7 - puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10))) optionalDependencies: - puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10))): dependencies: debug: 4.3.7 fs-extra: 10.1.0 - puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10))): dependencies: debug: 4.3.7 deepmerge: 4.3.1 - puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10))) optionalDependencies: - puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10))): dependencies: '@types/debug': 4.1.12 debug: 4.3.7 merge-deep: 3.0.3 optionalDependencies: - puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color - puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10)): + puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)): dependencies: '@types/debug': 4.1.12 debug: 4.3.7 deepmerge: 4.3.1 optionalDependencies: - puppeteer: 22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10) + puppeteer: 22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) puppeteer-core: 22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - supports-color - puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.2)(utf-8-validate@5.0.10): + puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10): dependencies: '@puppeteer/browsers': 2.2.0 - cosmiconfig: 9.0.0(typescript@5.6.2) + cosmiconfig: 9.0.0(typescript@5.6.3) devtools-protocol: 0.0.1262051 puppeteer-core: 22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -11414,9 +11414,9 @@ snapshots: trough@2.2.0: {} - ts-api-utils@1.3.0(typescript@5.6.2): + ts-api-utils@1.3.0(typescript@5.6.3): dependencies: - typescript: 5.6.2 + typescript: 5.6.3 ts-case-convert@2.1.0: {} @@ -11426,9 +11426,9 @@ snapshots: ts-xor@1.3.0: {} - tsconfck@3.1.3(typescript@5.6.2): + tsconfck@3.1.3(typescript@5.6.3): optionalDependencies: - typescript: 5.6.2 + typescript: 5.6.3 tslib@1.14.1: {} @@ -11479,7 +11479,7 @@ snapshots: dependencies: is-typedarray: 1.0.0 - typescript@5.6.2: {} + typescript@5.6.3: {} uc.micro@2.1.0: {} @@ -11613,11 +11613,11 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.2)(vite@5.4.8(@types/node@22.7.5)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.8(@types/node@22.7.5)): dependencies: debug: 4.3.7 globrex: 0.1.2 - tsconfck: 3.1.3(typescript@5.6.2) + tsconfck: 3.1.3(typescript@5.6.3) optionalDependencies: vite: 5.4.8(@types/node@22.7.5) transitivePeerDependencies: From b20f9f70dce99afc97ac45ff848b201c52355bf3 Mon Sep 17 00:00:00 2001 From: Neko Aria <990879119@qq.com> Date: Wed, 9 Oct 2024 22:23:15 +0800 Subject: [PATCH 102/740] fix(route/bangumi): update follow rank parsing logic (#17050) * fix(bangumi): update follow rank parsing logic * fix(bangumi): update follow rank parsing logic * fix(route/bangumi): update follow rank parsing logic --- lib/routes/bangumi/tv/other/followrank.ts | 41 +++++++++++------------ 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/lib/routes/bangumi/tv/other/followrank.ts b/lib/routes/bangumi/tv/other/followrank.ts index 3271ac28ae14cd9..c0b466daf13cdd9 100644 --- a/lib/routes/bangumi/tv/other/followrank.ts +++ b/lib/routes/bangumi/tv/other/followrank.ts @@ -7,7 +7,7 @@ export const route: Route = { path: '/:type/followrank', categories: ['anime'], example: '/bangumi/anime/followrank', - parameters: { type: '类型:anime - 动画, book - 图书, music - 音乐, game - 游戏, real - 三次元' }, + parameters: { type: '类型:anime - 动画,book - 图书,music - 音乐,game - 游戏,real - 三次元' }, features: { requireConfig: false, requirePuppeteer: false, @@ -23,7 +23,7 @@ export const route: Route = { }, ], name: '成员关注榜', - maintainers: ['honue', 'zhoukuncheng'], + maintainers: ['honue', 'zhoukuncheng', 'NekoAria'], handler, }; @@ -42,25 +42,22 @@ async function handler(ctx) { const $ = load(response); - const items = [ - ...$('#columnB > div:nth-child(4) > table > tbody') - .find('tr') - .toArray() - .map((item) => { - const aTag = $(item).children('td').next().find('a'); - return { - title: aTag.html(), - link: 'https://bgm.tv' + aTag.attr('href'), - }; - }), - ...$('#chl_subitem > ul') - .find('li') - .toArray() - .map((item) => ({ - title: $(item).children('a').attr('title'), - link: 'https://bgm.tv' + $(item).children('a').attr('href'), - })), - ]; + const items = $('.featuredItems .mainItem') + .map((_, item) => { + const $item = $(item); + const link = 'https://bgm.tv' + $item.find('a').first().attr('href'); + const imageUrl = $item + .find('.image') + .attr('style') + ?.match(/url\((.*?)\)/)?.[1]; + const info = $item.find('small.grey').text(); + return { + title: $item.find('.title').text().trim(), + link, + description: `
${info}`, + }; + }) + .toArray(); const RANK_TYPES = { tv: '动画', @@ -75,6 +72,6 @@ async function handler(ctx) { title: `BangumiTV 成员关注${RANK_TYPES[type]}榜`, link: url, item: items, - description: `BangumiTV 首页-成员关注${RANK_TYPES[type]}榜`, + description: `BangumiTV 首页 - 成员关注${RANK_TYPES[type]}榜`, }; } From 347f84caad70f50d141ca1613dadfbd1132e58d8 Mon Sep 17 00:00:00 2001 From: fooksky Date: Wed, 9 Oct 2024 22:44:55 +0800 Subject: [PATCH 103/740] fix(route): bilibili vsearch (#17064) --- lib/routes/bilibili/vsearch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/bilibili/vsearch.ts b/lib/routes/bilibili/vsearch.ts index e76126756bd0652..015c10c6a1b2c0d 100644 --- a/lib/routes/bilibili/vsearch.ts +++ b/lib/routes/bilibili/vsearch.ts @@ -83,7 +83,7 @@ async function handler(ctx) { `Danmaku: ${item.video_review} Comment: ${item.review}
` + `
${des}
` + `
` + - `Match By: ${item.hit_columns.join(',')}` + + `Match By: ${item.hit_columns?.join(',') || ''}` + (disableEmbed ? '' : `

${utils.iframe(item.aid)}`), pubDate: parseDate(item.pubdate, 'X'), guid: item.arcurl, From 6a2cff9a226bd59d079027d124987687f50a5a7a Mon Sep 17 00:00:00 2001 From: zipated Date: Thu, 10 Oct 2024 00:58:26 +0800 Subject: [PATCH 104/740] feat(route): update fanbox (#17065) --- lib/routes/fanbox/index.ts | 2 +- lib/routes/fanbox/types.ts | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/routes/fanbox/index.ts b/lib/routes/fanbox/index.ts index b8e84e31901a92b..bb0e46fdf80bb16 100644 --- a/lib/routes/fanbox/index.ts +++ b/lib/routes/fanbox/index.ts @@ -50,7 +50,7 @@ async function handler(ctx: Context): Promise { } const postListResponse = (await ofetch(`https://api.fanbox.cc/post.listCreator?creatorId=${creator}&limit=20`, { headers: getHeaders() })) as PostListResponse; - const items = await Promise.all(postListResponse.body.items.map((i) => parseItem(i))); + const items = await Promise.all(postListResponse.body.map((i) => parseItem(i))); return { title, diff --git a/lib/routes/fanbox/types.ts b/lib/routes/fanbox/types.ts index a3198e9a6276cc8..a4a54785f8a4cee 100644 --- a/lib/routes/fanbox/types.ts +++ b/lib/routes/fanbox/types.ts @@ -25,10 +25,7 @@ export interface UserInfoResponse { } export interface PostListResponse { - body: { - items: PostItem[]; - nextUrl: string | null; - }; + body: PostItem[]; } export interface PostDetailResponse { @@ -88,7 +85,6 @@ interface BasicPost { userId: string; }; }[]; - nextUrl: string | null; }; coverImageUrl: string | null; creatorId: string; From 5f20f4d6abe210be248d75045e8130c4f745bc9a Mon Sep 17 00:00:00 2001 From: Zhitao Chen Date: Thu, 10 Oct 2024 11:11:23 +0800 Subject: [PATCH 105/740] feat(roure): fix xueqiu relateroute (#17048) * fix xueqiu relate route * Update lib/routes/xueqiu/cookies.ts --------- Co-authored-by: cztchoice --- lib/routes/xueqiu/cookies.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/routes/xueqiu/cookies.ts b/lib/routes/xueqiu/cookies.ts index a79a1ec9fe48311..c7b091027693130 100644 --- a/lib/routes/xueqiu/cookies.ts +++ b/lib/routes/xueqiu/cookies.ts @@ -14,14 +14,16 @@ export const parseToken = () => if (matches) { acw_sc__v2 = getAcwScV2ByArg1(matches[1]); } - + const acw_sc__v2_cookie = `acw_sc__v2=${acw_sc__v2}`; const res = await ofetch.raw('https://xueqiu.com', { headers: { - Cookie: `acw_sc__v2=${acw_sc__v2}`, + Cookie: acw_sc__v2_cookie, }, }); const cookieArray = res.headers.getSetCookie(); - return cookieArray.find((c) => c.startsWith('xq_a_token=')); + const xq_a_token_cookie = cookieArray.find((c) => c.startsWith('xq_a_token=')); + + return `${acw_sc__v2_cookie}; ${xq_a_token_cookie}`; }, config.cache.routeExpire, false From 30717089d402f488f6a17efac0c683e3c3de1c7e Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Thu, 10 Oct 2024 11:24:53 +0800 Subject: [PATCH 106/740] feat(misskey): Include file attachments in user notes API request (#17068) --- lib/routes/misskey/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/routes/misskey/utils.ts b/lib/routes/misskey/utils.ts index 5cf2969546957f9..29a340ae85a47c2 100644 --- a/lib/routes/misskey/utils.ts +++ b/lib/routes/misskey/utils.ts @@ -62,6 +62,7 @@ async function getUserTimelineByUsername(username, site) { withChannelNotes: true, limit: 10, offset: 0, + withFiles: true, }, }); const accountData = usernotesResponse.data; From b1839a64043ff54e966d49631760ef73c8b11537 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 02:14:30 -0700 Subject: [PATCH 107/740] chore(deps): bump thollander/actions-comment-pull-request from 2 to 3 (#17070) * chore(deps): bump thollander/actions-comment-pull-request from 2 to 3 Bumps [thollander/actions-comment-pull-request](https://github.com/thollander/actions-comment-pull-request) from 2 to 3. - [Release notes](https://github.com/thollander/actions-comment-pull-request/releases) - [Commits](https://github.com/thollander/actions-comment-pull-request/compare/v2...v3) --- updated-dependencies: - dependency-name: thollander/actions-comment-pull-request dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/dependabot-fork.yml | 2 +- pnpm-lock.yaml | 25 +++++++++++++------------ 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/dependabot-fork.yml b/.github/workflows/dependabot-fork.yml index b39ec2ae7cd20fb..baeeff107b6ca83 100644 --- a/.github/workflows/dependabot-fork.yml +++ b/.github/workflows/dependabot-fork.yml @@ -13,7 +13,7 @@ jobs: uses: actions/checkout@v4 - name: Comment Dependabot PR - uses: thollander/actions-comment-pull-request@v2 + uses: thollander/actions-comment-pull-request@v3 with: message: '@dependabot ignore this dependency' GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 595f8f1ee10f406..9f2ac333b63d62e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2834,8 +2834,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.33: - resolution: {integrity: sha512-+cYTcFB1QqD4j4LegwLfpCNxifb6dDFUAwk6RsLusCwIaZI6or2f+q8rs5tTB2YC53HhOlIbEaqHMAAC8IOIwA==} + electron-to-chromium@1.5.35: + resolution: {integrity: sha512-hOSRInrIDm0Brzp4IHW2F/VM+638qOL2CzE0DgpnGzKW27C95IqqeqgKz/hxHGnvPxvQGpHUGD5qRVC9EZY2+A==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -3260,8 +3260,8 @@ packages: resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==} engines: {node: '>= 0.12'} - form-data@2.5.1: - resolution: {integrity: sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==} + form-data@2.5.2: + resolution: {integrity: sha512-GgwY0PS7DbXqajuGf4OYlsrIu3zgxD6Vvql43IBhm6MahqA5SK/7mwhtNj2AdH2z35YR34ujJ7BN+3fFC3jP5Q==} engines: {node: '>= 0.12'} form-data@4.0.0: @@ -5410,8 +5410,8 @@ packages: ts-xor@1.3.0: resolution: {integrity: sha512-RLXVjliCzc1gfKQFLRpfeD0rrWmjnSTgj7+RFhoq3KRkUYa8LE/TIidYOzM5h+IdFBDSjjSgk9Lto9sdMfDFEA==} - tsconfck@3.1.3: - resolution: {integrity: sha512-ulNZP1SVpRDesxeMLON/LtWM8HIgAJEIVpVVhBM6gsmvQ8+Rh+ZG7FWGvHh7Ah3pRABwVJWklWCr/BTZSv0xnQ==} + tsconfck@3.1.4: + resolution: {integrity: sha512-kdqWFGVJqe+KGYvlSO9NIaWn9jT1Ny4oKVzAJsKii5eoE9snzTJzL4+MMVOMn+fikWGFmKEylcXL710V/kIPJQ==} engines: {node: ^18 || >=20} hasBin: true peerDependencies: @@ -7511,7 +7511,7 @@ snapshots: '@types/caseless': 0.12.5 '@types/node': 22.7.5 '@types/tough-cookie': 4.0.5 - form-data: 2.5.1 + form-data: 2.5.2 '@types/sanitize-html@2.13.0': dependencies: @@ -7940,7 +7940,7 @@ snapshots: browserslist@4.24.0: dependencies: caniuse-lite: 1.0.30001667 - electron-to-chromium: 1.5.33 + electron-to-chromium: 1.5.35 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) @@ -8481,7 +8481,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.33: {} + electron-to-chromium@1.5.35: {} ellipsize@0.1.0: {} @@ -9039,11 +9039,12 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 - form-data@2.5.1: + form-data@2.5.2: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 + safe-buffer: 5.2.1 form-data@4.0.0: dependencies: @@ -11426,7 +11427,7 @@ snapshots: ts-xor@1.3.0: {} - tsconfck@3.1.3(typescript@5.6.3): + tsconfck@3.1.4(typescript@5.6.3): optionalDependencies: typescript: 5.6.3 @@ -11617,7 +11618,7 @@ snapshots: dependencies: debug: 4.3.7 globrex: 0.1.2 - tsconfck: 3.1.3(typescript@5.6.3) + tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: vite: 5.4.8(@types/node@22.7.5) transitivePeerDependencies: From 193db682003ed426ef3585658495c855151ea66d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 02:26:25 -0700 Subject: [PATCH 108/740] chore(deps-dev): bump eslint-plugin-n from 17.10.3 to 17.11.1 (#17071) * chore(deps-dev): bump eslint-plugin-n from 17.10.3 to 17.11.1 Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 17.10.3 to 17.11.1. - [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases) - [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/v17.10.3...v17.11.1) --- updated-dependencies: - dependency-name: eslint-plugin-n dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 2a7df18d8c7302e..c7bfd191b3dead6 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "eslint": "9.12.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", - "eslint-plugin-n": "17.10.3", + "eslint-plugin-n": "17.11.1", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-unicorn": "56.0.0", "eslint-plugin-yml": "1.14.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9f2ac333b63d62e..b02108e52477c72 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -367,8 +367,8 @@ importers: specifier: 8.1.0 version: 8.1.0(eslint@9.12.0) eslint-plugin-n: - specifier: 17.10.3 - version: 17.10.3(eslint@9.12.0) + specifier: 17.11.1 + version: 17.11.1(eslint@9.12.0) eslint-plugin-prettier: specifier: 5.2.1 version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.12.0))(eslint@9.12.0)(prettier@3.3.3) @@ -2985,8 +2985,8 @@ packages: peerDependencies: eslint: '>=8' - eslint-plugin-n@17.10.3: - resolution: {integrity: sha512-ySZBfKe49nQZWR1yFaA0v/GsH6Fgp8ah6XV0WDz6CN8WO0ek4McMzb7A2xnf4DCYV43frjCygvb9f/wx7UUxRw==} + eslint-plugin-n@17.11.1: + resolution: {integrity: sha512-93IUD82N6tIEgjztVI/l3ElHtC2wTa9boJHrD8iN+NyDxjxz/daZUZKfkedjBZNdg6EqDk4irybUsiPwDqXAEA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' @@ -8669,7 +8669,7 @@ snapshots: eslint: 9.12.0 eslint-compat-utils: 0.5.1(eslint@9.12.0) - eslint-plugin-n@17.10.3(eslint@9.12.0): + eslint-plugin-n@17.11.1(eslint@9.12.0): dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) enhanced-resolve: 5.17.1 From bd1894ca9ae71cd1c4c67a3af21e213106bb219d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 02:29:56 -0700 Subject: [PATCH 109/740] chore(deps): bump form-data from 4.0.0 to 4.0.1 (#17069) * chore(deps): bump form-data from 4.0.0 to 4.0.1 Bumps [form-data](https://github.com/form-data/form-data) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/form-data/form-data/releases) - [Commits](https://github.com/form-data/form-data/compare/v4.0.0...v4.0.1) --- updated-dependencies: - dependency-name: form-data dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 c7bfd191b3dead6..964d90c4c98aba2 100644 --- a/package.json +++ b/package.json @@ -81,7 +81,7 @@ "entities": "5.0.0", "etag": "1.8.1", "fanfou-sdk": "5.0.0", - "form-data": "4.0.0", + "form-data": "4.0.1", "googleapis": "144.0.0", "hono": "4.6.3", "html-to-text": "9.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b02108e52477c72..f0044efc11b88ce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,8 +102,8 @@ importers: specifier: 5.0.0 version: 5.0.0 form-data: - specifier: 4.0.0 - version: 4.0.0 + specifier: 4.0.1 + version: 4.0.1 googleapis: specifier: 144.0.0 version: 144.0.0 @@ -3264,8 +3264,8 @@ packages: resolution: {integrity: sha512-GgwY0PS7DbXqajuGf4OYlsrIu3zgxD6Vvql43IBhm6MahqA5SK/7mwhtNj2AdH2z35YR34ujJ7BN+3fFC3jP5Q==} engines: {node: '>= 0.12'} - form-data@4.0.0: - resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} + form-data@4.0.1: + resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} engines: {node: '>= 6'} formidable@3.5.1: @@ -7493,7 +7493,7 @@ snapshots: '@types/node-fetch@2.6.11': dependencies: '@types/node': 22.7.5 - form-data: 4.0.0 + form-data: 4.0.1 '@types/node@22.7.5': dependencies: @@ -7524,7 +7524,7 @@ snapshots: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 '@types/node': 22.7.5 - form-data: 4.0.0 + form-data: 4.0.1 '@types/supertest@6.0.2': dependencies: @@ -8928,7 +8928,7 @@ snapshots: dependencies: camelcase-keys: 7.0.2 decamelize-keys: 1.1.1 - form-data: 4.0.0 + form-data: 4.0.1 got: 12.6.1 he: 1.2.0 hmacsha1: 1.0.0 @@ -9046,7 +9046,7 @@ snapshots: mime-types: 2.1.35 safe-buffer: 5.2.1 - form-data@4.0.0: + form-data@4.0.1: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 @@ -9669,7 +9669,7 @@ snapshots: cssstyle: 4.1.0 data-urls: 5.0.0 decimal.js: 10.4.3 - form-data: 4.0.0 + form-data: 4.0.1 html-encoding-sniffer: 4.0.0 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 @@ -11231,7 +11231,7 @@ snapshots: cookiejar: 2.1.4 debug: 4.3.7 fast-safe-stringify: 2.1.1 - form-data: 4.0.0 + form-data: 4.0.1 formidable: 3.5.1 methods: 1.1.2 mime: 2.6.0 From 13b2e389d0817e5f06084ad73a5a653b3a412d64 Mon Sep 17 00:00:00 2001 From: cjc7373 Date: Thu, 10 Oct 2024 20:43:27 +0800 Subject: [PATCH 110/740] fix: duplicated items in ershcimi (#17073) --- lib/routes/wechat/ershcimi.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/routes/wechat/ershcimi.ts b/lib/routes/wechat/ershcimi.ts index 3874376b8d1127b..8be4d6606addafc 100644 --- a/lib/routes/wechat/ershcimi.ts +++ b/lib/routes/wechat/ershcimi.ts @@ -41,12 +41,14 @@ async function handler(ctx) { pubDate: timezone(parseDate($item('.weui_media_extra_info').attr('title')), +8), }; }) - .get(); + .toArray(); return { title: `微信公众号 - ${$('span.name').text()}`, link: url, description: $('div.Profile-sideColumnItemValue').text(), - item: await Promise.all(items.map((item) => finishArticleItem(item).catch(() => item))), + item: await Promise.all(items.map((item) => finishArticleItem(item))).catch((error) => { + throw error; + }), }; } From 4fac950af8c2c4bf27459007f2e94948428886e3 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Fri, 11 Oct 2024 00:39:08 +0800 Subject: [PATCH 111/740] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD=E5=9B=BD?= =?UTF-8?q?=E8=B1=86=E5=88=B6=E5=93=81=E7=BD=91=20(#17029)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 中国豆制品网 * fix typo --- lib/routes/cbpanet/index.ts | 380 ++++++++++++++++++++++++++++++++ lib/routes/cbpanet/namespace.ts | 8 + 2 files changed, 388 insertions(+) create mode 100644 lib/routes/cbpanet/index.ts create mode 100644 lib/routes/cbpanet/namespace.ts diff --git a/lib/routes/cbpanet/index.ts b/lib/routes/cbpanet/index.ts new file mode 100644 index 000000000000000..c0eb76f92caa9e7 --- /dev/null +++ b/lib/routes/cbpanet/index.ts @@ -0,0 +1,380 @@ +import { 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'; + +export const handler = async (ctx) => { + const { bigId = '2', smallId = '11' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; + + const rootUrl = 'http://www.cbpanet.com'; + const currentUrl = new URL(`dzp_news.aspx?bigid=${bigId}&smallid=${smallId}`, rootUrl).href; + + const { data: response } = await got(currentUrl); + + const $ = load(response); + + const language = $('html').prop('lang'); + + let items = $('div.divmore ul li') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + const a = item.find('div.zxcont1 a'); + + return { + title: a.text(), + pubDate: parseDate(item.find('div.zxtime1').text(), 'YY/MM/DD'), + link: new URL(a.prop('href'), rootUrl).href, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + const description = $$('div.newscont').html(); + + item.title = $$('div.newstlt').text(); + item.description = description; + item.pubDate = timezone( + parseDate( + $$('div.newstime') + .text() + .replace(/发布时间:/, ''), + 'YYYY/M/D HH:mm:ss' + ), + +8 + ); + item.content = { + html: description, + text: $$('div.newscont').text(), + }; + return item; + }) + ) + ); + + const title = $('title').text(); + const image = new URL($('div#logo img').prop('src'), rootUrl).href; + + return { + title, + description: title.split(/-/).pop(), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: title.split(/-/)[0], + language, + }; +}; + +export const route: Route = { + path: '/dzp_news/:bigId?/:smallId?', + name: '资讯', + url: 'cbpanet.com', + maintainers: ['nczitzk'], + handler, + example: '/cbpanet/dzp_news/2/11', + parameters: { + bigId: '分类 id,默认为 `2`,即行业资讯,可在对应分类页 URL 中找到', + smallId: '子分类 id,默认为 `11`,即行业资讯,可在对应分类页 URL 中找到', + }, + description: `:::tip + 若订阅 [行业资讯](http://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=11),网址为 \`http://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)。 + ::: + +
+ 更多分类 + + #### [协会](http://www.cbpanet.com/dzp_xiehui.aspx) + + | [协会介绍](http://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=1) | [协会章程](http://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=2) | [理事会](http://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=3) | [内设机构](http://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=4) | [协会通知](http://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=5) | [协会活动](http://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) | + + | [出版物](http://www.cbpanet.com/dzp_news.aspx?bigid=1&smallid=7) | [会员权利与义务](http://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) | + + #### [行业资讯](http://www.cbpanet.com/dzp_news_list.aspx) + + | [国内资讯](http://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=8) | [海外资讯](http://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=9) | [企业新闻](http://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=10) | [行业资讯](http://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=11) | [热点聚焦](http://www.cbpanet.com/dzp_news.aspx?bigid=2&smallid=43) | [今日推荐](http://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) | + + #### [原料信息](http://www.cbpanet.com/dzp_yuanliao.aspx) + + | [价格行情](http://www.cbpanet.com/dzp_news.aspx?bigid=3&smallid=12) | [分析预测](http://www.cbpanet.com/dzp_news.aspx?bigid=3&smallid=13) | [原料信息](http://www.cbpanet.com/dzp_news.aspx?bigid=3&smallid=40) | [热点聚焦](http://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) | + + #### [法规标准](http://www.cbpanet.com/dzp_fagui.aspx) + + | [法规资讯](http://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=15) | [法律法规](http://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=16) | [国内标准](http://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=14) | [国外标准](http://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=17) | [法规聚焦](http://www.cbpanet.com/dzp_news.aspx?bigid=4&smallid=46) | [今日推荐](http://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) | + + #### [技术专区](http://www.cbpanet.com/dzp_jishu.aspx) + + | [产品介绍](http://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=18) | [科技成果](http://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=19) | [学术论文](http://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=20) | [资料下载](http://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=21) | [专家](http://www.cbpanet.com/dzp_news.aspx?bigid=5&smallid=50) | [民间智库](http://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) | + + #### [豆制品消费指南](http://www.cbpanet.com/dzp_zhinan.aspx) + + | [膳食指南](http://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=22) | [营养成分](http://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=23) | [豆食菜谱](http://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=24) | [问与答](http://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=31) | [今日推荐](http://www.cbpanet.com/dzp_news.aspx?bigid=6&smallid=48) | [消费热点](http://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) | + + #### [营养与健康](http://www.cbpanet.com/dzp_yingyang.aspx) + + | [大豆营养概况](http://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=25) | [大豆食品和人类健康](http://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=26) | [世界豆类日,爱豆大行动](http://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=27) | [谣言粉碎机](http://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=29) | [最新资讯](http://www.cbpanet.com/dzp_news.aspx?bigid=7&smallid=41) | [专家视点](http://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'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.cbpanet.com/dzp_news.aspx'], + target: (_, url) => { + url = new URL(url); + const bigId = url.searchParams.get('bigid'); + const smallId = url.searchParams.get('smallid'); + + return `/dzp_news${bigId ? `/${bigId}${smallId ? `/${smallId}` : ''}` : ''}`; + }, + }, + { + title: '协会 - 协会介绍', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/1/1', + }, + { + title: '协会 - 协会章程', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/1/2', + }, + { + title: '协会 - 理事会', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/1/3', + }, + { + title: '协会 - 内设机构', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/1/4', + }, + { + title: '协会 - 协会通知', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/1/5', + }, + { + title: '协会 - 协会活动', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/1/6', + }, + { + title: '协会 - 出版物', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/1/7', + }, + { + title: '协会 - 会员权利与义务', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/1/30', + }, + { + title: '行业资讯 - 国内资讯', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/2/8', + }, + { + title: '行业资讯 - 海外资讯', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/2/9', + }, + { + title: '行业资讯 - 企业新闻', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/2/10', + }, + { + title: '行业资讯 - 行业资讯', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/2/11', + }, + { + title: '行业资讯 - 热点聚焦', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/2/43', + }, + { + title: '行业资讯 - 今日推荐', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/2/44', + }, + { + title: '原料信息 - 价格行情', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/3/12', + }, + { + title: '原料信息 - 分析预测', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/3/13', + }, + { + title: '原料信息 - 原料信息', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/3/40', + }, + { + title: '原料信息 - 热点聚焦', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/3/45', + }, + { + title: '法规标准 - 法规资讯', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/4/15', + }, + { + title: '法规标准 - 法律法规', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/4/16', + }, + { + title: '法规标准 - 国内标准', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/4/14', + }, + { + title: '法规标准 - 国外标准', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/4/17', + }, + { + title: '法规标准 - 法规聚焦', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/4/46', + }, + { + title: '法规标准 - 今日推荐', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/4/47', + }, + { + title: '技术专区 - 产品介绍', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/5/18', + }, + { + title: '技术专区 - 科技成果', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/5/19', + }, + { + title: '技术专区 - 学术论文', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/5/20', + }, + { + title: '技术专区 - 资料下载', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/5/21', + }, + { + title: '技术专区 - 专家', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/5/50', + }, + { + title: '技术专区 - 民间智库', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/5/57', + }, + { + title: '豆制品消费指南 - 膳食指南', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/6/22', + }, + { + title: '豆制品消费指南 - 营养成分', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/6/23', + }, + { + title: '豆制品消费指南 - 豆食菜谱', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/6/24', + }, + { + title: '豆制品消费指南 - 问与答', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/6/31', + }, + { + title: '豆制品消费指南 - 今日推荐', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/6/48', + }, + { + title: '豆制品消费指南 - 消费热点', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/6/53', + }, + { + title: '营养与健康 - 大豆营养概况', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/7/25', + }, + { + title: '营养与健康 - 大豆食品和人类健康', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/7/26', + }, + { + title: '营养与健康 - 世界豆类日,爱豆大行动', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/7/27', + }, + { + title: '营养与健康 - 谣言粉碎机', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/7/29', + }, + { + title: '营养与健康 - 最新资讯', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/7/41', + }, + { + title: '营养与健康 - 专家视点', + source: ['www.cbpanet.com/dzp_news.aspx'], + target: '/dzp_news/7/49', + }, + ], +}; diff --git a/lib/routes/cbpanet/namespace.ts b/lib/routes/cbpanet/namespace.ts new file mode 100644 index 000000000000000..741185941f4f56e --- /dev/null +++ b/lib/routes/cbpanet/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国豆制品网', + url: 'cbpanet.com', + categories: ['new-media'], + description: '', +}; From afb755449b95eb1be524ce8f4c2bef126d2c7b3c Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Fri, 11 Oct 2024 03:56:58 +0800 Subject: [PATCH 112/740] fix(misskey): Handle renotes properly to improve content display (#17078) --- lib/routes/misskey/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/misskey/utils.ts b/lib/routes/misskey/utils.ts index 29a340ae85a47c2..1828697096bb4fc 100644 --- a/lib/routes/misskey/utils.ts +++ b/lib/routes/misskey/utils.ts @@ -60,9 +60,9 @@ async function getUserTimelineByUsername(username, site) { json: { userId: accountId, withChannelNotes: true, + withRenotes: false, limit: 10, offset: 0, - withFiles: true, }, }); const accountData = usernotesResponse.data; From 8f8bcb936514a4eabf08fcb6eb9aa4ff40324f5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 11:40:23 +0800 Subject: [PATCH 113/740] chore(deps): bump undici from 6.19.8 to 6.20.0 (#17058) * chore(deps): bump undici from 6.19.8 to 6.20.0 Bumps [undici](https://github.com/nodejs/undici) from 6.19.8 to 6.20.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v6.19.8...v6.20.0) --- updated-dependencies: - dependency-name: undici dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 964d90c4c98aba2..9f3498bb0528e58 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "tough-cookie": "5.0.0", "tsx": "4.19.1", "twitter-api-v2": "1.18.0", - "undici": "6.19.8", + "undici": "6.20.0", "uuid": "10.0.0", "winston": "3.15.0", "xxhash-wasm": "1.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f0044efc11b88ce..d27e10733304d9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -115,7 +115,7 @@ importers: version: 9.0.5 http-cookie-agent: specifier: 6.0.6 - version: 6.0.6(tough-cookie@5.0.0)(undici@6.19.8) + version: 6.0.6(tough-cookie@5.0.0)(undici@6.20.0) https-proxy-agent: specifier: 7.0.5 version: 7.0.5 @@ -243,8 +243,8 @@ importers: specifier: 1.18.0 version: 1.18.0 undici: - specifier: 6.19.8 - version: 6.19.8 + specifier: 6.20.0 + version: 6.20.0 uuid: specifier: 10.0.0 version: 10.0.0 @@ -5503,8 +5503,8 @@ packages: undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - undici@6.19.8: - resolution: {integrity: sha512-U8uCCl2x9TK3WANvmBavymRzxbfFYG+tAu+fgx3zxQy3qdagQqBLwJVrdyO1TBfUXvfKveMKJZhpvUYoOjM+4g==} + undici@6.20.0: + resolution: {integrity: sha512-AITZfPuxubm31Sx0vr8bteSalEbs9wQb/BOBi9FPlD9Qpd6HxZ4Q0+hI742jBhkPb4RT2v5MQzaW5VhRVyj+9A==} engines: {node: '>=18.17'} unicode-canonical-property-names-ecmascript@2.0.1: @@ -8100,7 +8100,7 @@ snapshots: parse5: 7.1.2 parse5-htmlparser2-tree-adapter: 7.0.0 parse5-parser-stream: 7.1.2 - undici: 6.19.8 + undici: 6.20.0 whatwg-mimetype: 4.0.0 chownr@2.0.0: {} @@ -9377,12 +9377,12 @@ snapshots: http-cache-semantics@4.1.1: {} - http-cookie-agent@6.0.6(tough-cookie@5.0.0)(undici@6.19.8): + http-cookie-agent@6.0.6(tough-cookie@5.0.0)(undici@6.20.0): dependencies: agent-base: 7.1.1 tough-cookie: 5.0.0 optionalDependencies: - undici: 6.19.8 + undici: 6.20.0 transitivePeerDependencies: - supports-color @@ -11498,7 +11498,7 @@ snapshots: undici-types@6.19.8: {} - undici@6.19.8: {} + undici@6.20.0: {} unicode-canonical-property-names-ecmascript@2.0.1: {} From a4daf28ca5881e2f99a5e7a00064fc282b0eafbf Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Fri, 11 Oct 2024 12:21:35 +0800 Subject: [PATCH 114/740] fix: catch Invalid Date (#17081) --- lib/middleware/template.tsx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/middleware/template.tsx b/lib/middleware/template.tsx index e91084ed3957c86..36dae2e72d93d5d 100644 --- a/lib/middleware/template.tsx +++ b/lib/middleware/template.tsx @@ -74,8 +74,16 @@ const middleware: MiddlewareHandler = async (ctx, next) => { } if (outputType !== 'rss') { - item.pubDate && (item.pubDate = convertDateToISO8601(item.pubDate) || ''); - item.updated && (item.updated = convertDateToISO8601(item.updated) || ''); + try { + item.pubDate && (item.pubDate = convertDateToISO8601(item.pubDate) || ''); + } catch { + item.pubDate = ''; + } + try { + item.updated && (item.updated = convertDateToISO8601(item.updated) || ''); + } catch { + item.updated = ''; + } } } } From b6961b91e4ffe2b813ad821fc24e0eb3afeb3a3d Mon Sep 17 00:00:00 2001 From: pseudoyu Date: Fri, 11 Oct 2024 16:19:38 +0700 Subject: [PATCH 115/740] feat(route): also support podcast id in xiaoyuzhou --- lib/routes/xiaoyuzhou/podcast.ts | 42 ++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/lib/routes/xiaoyuzhou/podcast.ts b/lib/routes/xiaoyuzhou/podcast.ts index 6cedcbd44b9cf63..131c04acb51f796 100644 --- a/lib/routes/xiaoyuzhou/podcast.ts +++ b/lib/routes/xiaoyuzhou/podcast.ts @@ -8,7 +8,7 @@ export const route: Route = { categories: ['multimedia', 'popular'], view: ViewType.Audios, example: '/xiaoyuzhou/podcast/6021f949a789fca4eff4492c', - parameters: { id: '播客id,可以在小宇宙播客的 URL 中找到' }, + parameters: { id: '播客 id 或单集 id,可以在小宇宙播客的 URL 中找到' }, features: { requireConfig: false, requirePuppeteer: false, @@ -19,25 +19,53 @@ export const route: Route = { }, radar: [ { - source: ['xiaoyuzhoufm.com/podcast/:id'], + source: ['xiaoyuzhoufm.com/podcast/:id', 'xiaoyuzhoufm.com/episode/:id'], }, ], name: '播客', - maintainers: ['hondajojo', 'jtsang4'], + maintainers: ['hondajojo', 'jtsang4', 'pseudoyu'], handler, url: 'xiaoyuzhoufm.com/', }; async function handler(ctx) { - const link = `https://www.xiaoyuzhoufm.com/podcast/${ctx.req.param('id')}`; - const response = await got({ + const id = ctx.req.param('id'); + let link = `https://www.xiaoyuzhoufm.com/podcast/${id}`; + let response = await got({ method: 'get', url: link, }); - const $ = load(response.data); + let $ = load(response.data); + let page_data = JSON.parse($('#__NEXT_DATA__')[0].children[0].data); - const page_data = JSON.parse($('#__NEXT_DATA__')[0].children[0].data); + if (!page_data.props.pageProps.podcast?.episodes) { + // If episodes are not found, it might be an episode page + // Try to get the podcast id from the episode page + link = `https://www.xiaoyuzhoufm.com/episode/${id}`; + response = await got({ + method: 'get', + url: link, + }); + + $ = load(response.data); + const podcastLink = $('.jsx-605929003.podcast-title .jsx-605929003.name').attr('href'); + if (podcastLink) { + const podcastId = podcastLink.split('/').pop(); + link = `https://www.xiaoyuzhoufm.com/podcast/${podcastId}`; + response = await got({ + method: 'get', + url: link, + }); + + $ = load(response.data); + page_data = JSON.parse($('#__NEXT_DATA__')[0].children[0].data); + } + } + + if (!page_data.props.pageProps.podcast?.episodes) { + throw new Error('Failed to fetch podcast episodes'); + } const episodes = page_data.props.pageProps.podcast.episodes.map((item) => ({ title: item.title, From b7fae99dedfac4823d6cf43612e8adda63cc522f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 06:20:31 -0700 Subject: [PATCH 116/740] chore(deps-dev): bump @babel/preset-env from 7.25.7 to 7.25.8 (#17087) * chore(deps-dev): bump @babel/preset-env from 7.25.7 to 7.25.8 Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.25.7 to 7.25.8. - [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.25.8/packages/babel-preset-env) --- updated-dependencies: - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 824 +++++++++++++++++++------------------------------ 2 files changed, 323 insertions(+), 503 deletions(-) diff --git a/package.json b/package.json index 9f3498bb0528e58..ca821913cbfdee5 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@babel/preset-env": "7.25.7", + "@babel/preset-env": "7.25.8", "@babel/preset-typescript": "7.25.7", "@eslint/eslintrc": "3.1.0", "@eslint/js": "9.12.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d27e10733304d9d..0746983236c674f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -259,11 +259,11 @@ importers: version: 3.23.8 devDependencies: '@babel/preset-env': - specifier: 7.25.7 - version: 7.25.7(@babel/core@7.25.7) + specifier: 7.25.8 + version: 7.25.8(@babel/core@7.25.8) '@babel/preset-typescript': specifier: 7.25.7 - version: 7.25.7(@babel/core@7.25.7) + version: 7.25.7(@babel/core@7.25.8) '@eslint/eslintrc': specifier: 3.1.0 version: 3.1.0 @@ -445,12 +445,12 @@ packages: resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.25.7': - resolution: {integrity: sha512-9ickoLz+hcXCeh7jrcin+/SLWm+GkxE2kTvoYyp38p4WkdFXfQJxDFGWp/YHjiKLPx06z2A7W8XKuqbReXDzsw==} + '@babel/compat-data@7.25.8': + resolution: {integrity: sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==} engines: {node: '>=6.9.0'} - '@babel/core@7.25.7': - resolution: {integrity: sha512-yJ474Zv3cwiSOO9nXJuqzvwEeM+chDuQ8GJirw+pZ91sCGCyOZ3dJkVE09fTV0VEVzXyLWhh3G/AolYTPX7Mow==} + '@babel/core@7.25.8': + resolution: {integrity: sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==} engines: {node: '>=6.9.0'} '@babel/generator@7.25.7': @@ -552,8 +552,8 @@ packages: resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.25.7': - resolution: {integrity: sha512-aZn7ETtQsjjGG5HruveUK06cU3Hljuhd9Iojm4M8WWv3wLE6OkE5PWbDUkItmMgegmccaITudyuW5RPYrYlgWw==} + '@babel/parser@7.25.8': + resolution: {integrity: sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==} engines: {node: '>=6.0.0'} hasBin: true @@ -593,32 +593,6 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-async-generators@7.8.4': - resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-class-properties@7.12.13': - resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-class-static-block@7.14.5': - resolution: {integrity: sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-dynamic-import@7.8.3': - resolution: {integrity: sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-export-namespace-from@7.8.3': - resolution: {integrity: sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-assertions@7.25.7': resolution: {integrity: sha512-ZvZQRmME0zfJnDQnVBKYzHxXT7lYBB3Revz1GuS7oLXWMgqUPX4G+DDbT30ICClht9WKV34QVrZhSw6WdklwZQ==} engines: {node: '>=6.9.0'} @@ -631,64 +605,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-meta@7.10.4': - resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-json-strings@7.8.3': - resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-jsx@7.25.7': resolution: {integrity: sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-logical-assignment-operators@7.10.4': - resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3': - resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-numeric-separator@7.10.4': - resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-object-rest-spread@7.8.3': - resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-optional-catch-binding@7.8.3': - resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-optional-chaining@7.8.3': - resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-private-property-in-object@7.14.5': - resolution: {integrity: sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - - '@babel/plugin-syntax-top-level-await@7.14.5': - resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} - engines: {node: '>=6.9.0'} - peerDependencies: - '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-typescript@7.25.7': resolution: {integrity: sha512-rR+5FDjpCHqqZN2bzZm18bVYGaejGq5ZkpVCJLXor/+zlSrSoc4KWcHI0URVWjl/68Dyr1uwZUz/1njycEAv9g==} engines: {node: '>=6.9.0'} @@ -707,8 +629,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-generator-functions@7.25.7': - resolution: {integrity: sha512-4B6OhTrwYKHYYgcwErvZjbmH9X5TxQBsaBHdzEIB4l71gR5jh/tuHGlb9in47udL2+wVUcOz5XXhhfhVJwEpEg==} + '@babel/plugin-transform-async-generator-functions@7.25.8': + resolution: {integrity: sha512-9ypqkozyzpG+HxlH4o4gdctalFGIjjdufzo7I2XPda0iBnZ6a+FO0rIEQcdSPXp02CkvGsII1exJhmROPQd5oA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -737,8 +659,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-static-block@7.25.7': - resolution: {integrity: sha512-rvUUtoVlkDWtDWxGAiiQj0aNktTPn3eFynBcMC2IhsXweehwgdI9ODe+XjWw515kEmv22sSOTp/rxIRuTiB7zg==} + '@babel/plugin-transform-class-static-block@7.25.8': + resolution: {integrity: sha512-e82gl3TCorath6YLf9xUwFehVvjvfqFhdOo4+0iVIVju+6XOi5XHkqB3P2AXnSwoeTX0HBoXq5gJFtvotJzFnQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 @@ -779,8 +701,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-dynamic-import@7.25.7': - resolution: {integrity: sha512-UvcLuual4h7/GfylKm2IAA3aph9rwvAM2XBA0uPKU3lca+Maai4jBjjEVUS568ld6kJcgbouuumCBhMd/Yz17w==} + '@babel/plugin-transform-dynamic-import@7.25.8': + resolution: {integrity: sha512-gznWY+mr4ZQL/EWPcbBQUP3BXS5FwZp8RUOw06BaRn8tQLzN4XLIxXejpHN9Qo8x8jjBmAAKp6FoS51AgkSA/A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -791,8 +713,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-export-namespace-from@7.25.7': - resolution: {integrity: sha512-h3MDAP5l34NQkkNulsTNyjdaR+OiB0Im67VU//sFupouP8Q6m9Spy7l66DcaAQxtmCqGdanPByLsnwFttxKISQ==} + '@babel/plugin-transform-export-namespace-from@7.25.8': + resolution: {integrity: sha512-sPtYrduWINTQTW7FtOy99VCTWp4H23UX7vYcut7S4CIMEXU+54zKX9uCoGkLsWXteyaMXzVHgzWbLfQ1w4GZgw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -809,8 +731,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-json-strings@7.25.7': - resolution: {integrity: sha512-Ot43PrL9TEAiCe8C/2erAjXMeVSnE/BLEx6eyrKLNFCCw5jvhTHKyHxdI1pA0kz5njZRYAnMO2KObGqOCRDYSA==} + '@babel/plugin-transform-json-strings@7.25.8': + resolution: {integrity: sha512-4OMNv7eHTmJ2YXs3tvxAfa/I43di+VcF+M4Wt66c88EAED1RoGaf1D64cL5FkRpNL+Vx9Hds84lksWvd/wMIdA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -821,8 +743,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-logical-assignment-operators@7.25.7': - resolution: {integrity: sha512-iImzbA55BjiovLyG2bggWS+V+OLkaBorNvc/yJoeeDQGztknRnDdYfp2d/UPmunZYEnZi6Lg8QcTmNMHOB0lGA==} + '@babel/plugin-transform-logical-assignment-operators@7.25.8': + resolution: {integrity: sha512-f5W0AhSbbI+yY6VakT04jmxdxz+WsID0neG7+kQZbCOjuyJNdL5Nn4WIBm4hRpKnUcO9lP0eipUhFN12JpoH8g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -869,20 +791,20 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-nullish-coalescing-operator@7.25.7': - resolution: {integrity: sha512-FbuJ63/4LEL32mIxrxwYaqjJxpbzxPVQj5a+Ebrc8JICV6YX8nE53jY+K0RZT3um56GoNWgkS2BQ/uLGTjtwfw==} + '@babel/plugin-transform-nullish-coalescing-operator@7.25.8': + resolution: {integrity: sha512-Z7WJJWdQc8yCWgAmjI3hyC+5PXIubH9yRKzkl9ZEG647O9szl9zvmKLzpbItlijBnVhTUf1cpyWBsZ3+2wjWPQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-numeric-separator@7.25.7': - resolution: {integrity: sha512-8CbutzSSh4hmD+jJHIA8vdTNk15kAzOnFLVVgBSMGr28rt85ouT01/rezMecks9pkU939wDInImwCKv4ahU4IA==} + '@babel/plugin-transform-numeric-separator@7.25.8': + resolution: {integrity: sha512-rm9a5iEFPS4iMIy+/A/PiS0QN0UyjPIeVvbU5EMZFKJZHt8vQnasbpo3T3EFcxzCeYO0BHfc4RqooCZc51J86Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-rest-spread@7.25.7': - resolution: {integrity: sha512-1JdVKPhD7Y5PvgfFy0Mv2brdrolzpzSoUq2pr6xsR+m+3viGGeHEokFKsCgOkbeFOQxfB1Vt2F0cPJLRpFI4Zg==} + '@babel/plugin-transform-object-rest-spread@7.25.8': + resolution: {integrity: sha512-LkUu0O2hnUKHKE7/zYOIjByMa4VRaV2CD/cdGz0AxU9we+VA3kDDggKEzI0Oz1IroG+6gUP6UmWEHBMWZU316g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -893,14 +815,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-catch-binding@7.25.7': - resolution: {integrity: sha512-m9obYBA39mDPN7lJzD5WkGGb0GO54PPLXsbcnj1Hyeu8mSRz7Gb4b1A6zxNX32ZuUySDK4G6it8SDFWD1nCnqg==} + '@babel/plugin-transform-optional-catch-binding@7.25.8': + resolution: {integrity: sha512-EbQYweoMAHOn7iJ9GgZo14ghhb9tTjgOc88xFgYngifx7Z9u580cENCV159M4xDh3q/irbhSjZVpuhpC2gKBbg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-chaining@7.25.7': - resolution: {integrity: sha512-h39agClImgPWg4H8mYVAbD1qP9vClFbEjqoJmt87Zen8pjqK8FTPUwrOXAvqu5soytwxrLMd2fx2KSCp2CHcNg==} + '@babel/plugin-transform-optional-chaining@7.25.8': + resolution: {integrity: sha512-q05Bk7gXOxpTHoQ8RSzGSh/LHVB9JEIkKnk3myAWwZHnYiTGYtbdrYkIsS8Xyh4ltKf7GNUSgzs/6P2bJtBAQg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -917,8 +839,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-property-in-object@7.25.7': - resolution: {integrity: sha512-LzA5ESzBy7tqj00Yjey9yWfs3FKy4EmJyKOSWld144OxkTji81WWnUT8nkLUn+imN/zHL8ZQlOu/MTUAhHaX3g==} + '@babel/plugin-transform-private-property-in-object@7.25.8': + resolution: {integrity: sha512-8Uh966svuB4V8RHHg0QJOB32QK287NBksJOByoKmHMp1TAobNniNalIkI2i5IPj5+S9NYCG4VIjbEuiSN8r+ow==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1001,8 +923,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/preset-env@7.25.7': - resolution: {integrity: sha512-Gibz4OUdyNqqLj+7OAvBZxOD7CklCtMA5/j0JgUEwOnaRULsPDXmic2iKxL2DX2vQduPR5wH2hjZas/Vr/Oc0g==} + '@babel/preset-env@7.25.8': + resolution: {integrity: sha512-58T2yulDHMN8YMUxiLq5YmWUnlDCyY1FsHM+v12VMx+1/FlrUj5tY50iDCpofFQEM8fMYOaY9YRvym2jcjn1Dg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -1034,8 +956,8 @@ packages: resolution: {integrity: sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.7': - resolution: {integrity: sha512-vwIVdXG+j+FOpkwqHRcBgHLYNL7XMkufrlaFvL9o6Ai9sJn9+PdyIL5qa0XzTZw084c+u9LOls53eoZWP/W5WQ==} + '@babel/types@7.25.8': + resolution: {integrity: sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==} engines: {node: '>=6.9.0'} '@bcoe/v8-coverage@0.2.3': @@ -2379,8 +2301,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001667: - resolution: {integrity: sha512-7LTwJjcRkzKFmtqGsibMeuXmvFDfZq/nzIjnmgCGzKKRVzjD72selLDK1oPF/Oxzmt4fNcPvTDvGqSDG4tCALw==} + caniuse-lite@1.0.30001668: + resolution: {integrity: sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -2834,8 +2756,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.35: - resolution: {integrity: sha512-hOSRInrIDm0Brzp4IHW2F/VM+638qOL2CzE0DgpnGzKW27C95IqqeqgKz/hxHGnvPxvQGpHUGD5qRVC9EZY2+A==} + electron-to-chromium@1.5.36: + resolution: {integrity: sha512-HYTX8tKge/VNp6FGO+f/uVDmUkq+cEfcxYhKf15Akc4M5yxt5YmorwlAitKWjWhWQnKcDRBAQKXkhqqXMqcrjw==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -3388,8 +3310,8 @@ packages: globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} - google-auth-library@9.14.1: - resolution: {integrity: sha512-Rj+PMjoNFGFTmtItH7gHfbHpGVSb3vmnGK3nwNBqxQF9NoBpttSZI/rc0WiM63ma2uGDQtYEkMHkK9U6937NiA==} + google-auth-library@9.14.2: + resolution: {integrity: sha512-R+FRIfk1GBo3RdlRYWPdwk8nmtVUOn6+BkDomAC46KoU8kzXzE1HLmOasSCbWUByMMAGkknVF0G5kQ69Vj7dlA==} engines: {node: '>=14'} googleapis-common@7.2.0: @@ -4052,8 +3974,8 @@ packages: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true - magic-string@0.30.11: - resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + magic-string@0.30.12: + resolution: {integrity: sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==} magicast@0.3.5: resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==} @@ -5890,20 +5812,20 @@ snapshots: '@babel/highlight': 7.25.7 picocolors: 1.1.0 - '@babel/compat-data@7.25.7': {} + '@babel/compat-data@7.25.8': {} - '@babel/core@7.25.7': + '@babel/core@7.25.8': dependencies: '@ampproject/remapping': 2.3.0 '@babel/code-frame': 7.25.7 '@babel/generator': 7.25.7 '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) '@babel/helpers': 7.25.7 - '@babel/parser': 7.25.7 + '@babel/parser': 7.25.8 '@babel/template': 7.25.7 '@babel/traverse': 7.25.7 - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 convert-source-map: 2.0.0 debug: 4.3.7 gensync: 1.0.0-beta.2 @@ -5914,53 +5836,53 @@ snapshots: '@babel/generator@7.25.7': dependencies: - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.0.2 '@babel/helper-annotate-as-pure@7.25.7': dependencies: - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 '@babel/helper-builder-binary-assignment-operator-visitor@7.25.7': dependencies: '@babel/traverse': 7.25.7 - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color '@babel/helper-compilation-targets@7.25.7': dependencies: - '@babel/compat-data': 7.25.7 + '@babel/compat-data': 7.25.8 '@babel/helper-validator-option': 7.25.7 browserslist: 4.24.0 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.25.7(@babel/core@7.25.7)': + '@babel/helper-create-class-features-plugin@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-annotate-as-pure': 7.25.7 '@babel/helper-member-expression-to-functions': 7.25.7 '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.7) + '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 '@babel/traverse': 7.25.7 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/helper-create-regexp-features-plugin@7.25.7(@babel/core@7.25.7)': + '@babel/helper-create-regexp-features-plugin@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-annotate-as-pure': 7.25.7 regexpu-core: 6.1.1 semver: 6.3.1 - '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.7)': + '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 debug: 4.3.7 @@ -5972,20 +5894,20 @@ snapshots: '@babel/helper-member-expression-to-functions@7.25.7': dependencies: '@babel/traverse': 7.25.7 - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color '@babel/helper-module-imports@7.25.7': dependencies: '@babel/traverse': 7.25.7 - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.25.7(@babel/core@7.25.7)': + '@babel/helper-module-transforms@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-module-imports': 7.25.7 '@babel/helper-simple-access': 7.25.7 '@babel/helper-validator-identifier': 7.25.7 @@ -5995,22 +5917,22 @@ snapshots: '@babel/helper-optimise-call-expression@7.25.7': dependencies: - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 '@babel/helper-plugin-utils@7.25.7': {} - '@babel/helper-remap-async-to-generator@7.25.7(@babel/core@7.25.7)': + '@babel/helper-remap-async-to-generator@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-annotate-as-pure': 7.25.7 '@babel/helper-wrap-function': 7.25.7 '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.25.7(@babel/core@7.25.7)': + '@babel/helper-replace-supers@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-member-expression-to-functions': 7.25.7 '@babel/helper-optimise-call-expression': 7.25.7 '@babel/traverse': 7.25.7 @@ -6020,14 +5942,14 @@ snapshots: '@babel/helper-simple-access@7.25.7': dependencies: '@babel/traverse': 7.25.7 - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color '@babel/helper-skip-transparent-expression-wrappers@7.25.7': dependencies: '@babel/traverse': 7.25.7 - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color @@ -6041,14 +5963,14 @@ snapshots: dependencies: '@babel/template': 7.25.7 '@babel/traverse': 7.25.7 - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 transitivePeerDependencies: - supports-color '@babel/helpers@7.25.7': dependencies: '@babel/template': 7.25.7 - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 '@babel/highlight@7.25.7': dependencies: @@ -6057,594 +5979,492 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.0 - '@babel/parser@7.25.7': + '@babel/parser@7.25.8': dependencies: - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/plugin-transform-optional-chaining': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-optional-chaining': 7.25.8(@babel/core@7.25.8) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - - '@babel/plugin-syntax-async-generators@7.8.4(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-class-properties@7.12.13(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-class-static-block@7.14.5(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-dynamic-import@7.8.3(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-export-namespace-from@7.8.3(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-import-assertions@7.25.7(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-import-attributes@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-import-meta@7.10.4(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-json-strings@7.8.3(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-logical-assignment-operators@7.10.4(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-nullish-coalescing-operator@7.8.3(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-numeric-separator@7.10.4(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-object-rest-spread@7.8.3(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-syntax-optional-catch-binding@7.8.3(@babel/core@7.25.7)': - dependencies: - '@babel/core': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.8 - '@babel/plugin-syntax-optional-chaining@7.8.3(@babel/core@7.25.7)': + '@babel/plugin-syntax-import-assertions@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-private-property-in-object@7.14.5(@babel/core@7.25.7)': + '@babel/plugin-syntax-import-attributes@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-top-level-await@7.14.5(@babel/core@7.25.7)': + '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-typescript@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-syntax-typescript@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.7)': + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-arrow-functions@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-arrow-functions@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-async-generator-functions@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-async-generator-functions@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.7) + '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.8) '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-async-to-generator@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-async-to-generator@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-module-imports': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.7) + '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.8) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-block-scoped-functions@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-block-scoped-functions@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-block-scoping@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-block-scoping@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-class-properties@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-class-properties@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-static-block@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-class-static-block@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.7) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-classes@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-classes@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-annotate-as-pure': 7.25.7 '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.7) + '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) '@babel/traverse': 7.25.7 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-computed-properties@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-computed-properties@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 '@babel/template': 7.25.7 - '@babel/plugin-transform-destructuring@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-destructuring@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-dotall-regex@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-dotall-regex@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-duplicate-keys@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-duplicate-keys@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-dynamic-import@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-dynamic-import@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-transform-exponentiation-operator@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-exponentiation-operator@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-builder-binary-assignment-operator-visitor': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-export-namespace-from@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-export-namespace-from@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-transform-for-of@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-for-of@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-function-name@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-function-name@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-json-strings@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-json-strings@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-transform-literals@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-literals@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-logical-assignment-operators@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-logical-assignment-operators@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.7) - '@babel/plugin-transform-member-expression-literals@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-member-expression-literals@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-modules-amd@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-modules-amd@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-modules-commonjs@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-simple-access': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-systemjs@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-modules-systemjs@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-validator-identifier': 7.25.7 '@babel/traverse': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-umd@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-modules-umd@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-named-capturing-groups-regex@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-named-capturing-groups-regex@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-new-target@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-new-target@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-nullish-coalescing-operator@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-nullish-coalescing-operator@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-transform-numeric-separator@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-numeric-separator@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.7) - '@babel/plugin-transform-object-rest-spread@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-object-rest-spread@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-object-super@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-object-super@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.7) + '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-optional-catch-binding@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-optional-catch-binding@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-transform-optional-chaining@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-optional-chaining@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.7) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-parameters@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-parameters@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-private-methods@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-private-methods@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-property-in-object@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-private-property-in-object@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.7) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-property-literals@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-property-literals@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-regenerator@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-regenerator@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 regenerator-transform: 0.15.2 - '@babel/plugin-transform-reserved-words@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-reserved-words@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-shorthand-properties@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-shorthand-properties@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-spread@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-spread@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-sticky-regex@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-sticky-regex@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-template-literals@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-template-literals@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-typeof-symbol@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-typeof-symbol@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-typescript@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-typescript@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/plugin-syntax-typescript': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-syntax-typescript': 7.25.7(@babel/core@7.25.8) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-unicode-escapes@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-unicode-escapes@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-unicode-property-regex@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-unicode-property-regex@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-unicode-regex@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-unicode-regex@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-unicode-sets-regex@7.25.7(@babel/core@7.25.7)': + '@babel/plugin-transform-unicode-sets-regex@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) '@babel/helper-plugin-utils': 7.25.7 - '@babel/preset-env@7.25.7(@babel/core@7.25.7)': + '@babel/preset-env@7.25.8(@babel/core@7.25.8)': dependencies: - '@babel/compat-data': 7.25.7 - '@babel/core': 7.25.7 + '@babel/compat-data': 7.25.8 + '@babel/core': 7.25.8 '@babel/helper-compilation-targets': 7.25.7 '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-validator-option': 7.25.7 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.7) - '@babel/plugin-syntax-async-generators': 7.8.4(@babel/core@7.25.7) - '@babel/plugin-syntax-class-properties': 7.12.13(@babel/core@7.25.7) - '@babel/plugin-syntax-class-static-block': 7.14.5(@babel/core@7.25.7) - '@babel/plugin-syntax-dynamic-import': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-syntax-export-namespace-from': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-syntax-import-assertions': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-syntax-import-attributes': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.25.7) - '@babel/plugin-syntax-json-strings': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4(@babel/core@7.25.7) - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-syntax-numeric-separator': 7.10.4(@babel/core@7.25.7) - '@babel/plugin-syntax-object-rest-spread': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-syntax-optional-catch-binding': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-syntax-optional-chaining': 7.8.3(@babel/core@7.25.7) - '@babel/plugin-syntax-private-property-in-object': 7.14.5(@babel/core@7.25.7) - '@babel/plugin-syntax-top-level-await': 7.14.5(@babel/core@7.25.7) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.7) - '@babel/plugin-transform-arrow-functions': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-async-generator-functions': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-async-to-generator': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-block-scoped-functions': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-block-scoping': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-class-properties': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-class-static-block': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-classes': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-computed-properties': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-destructuring': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-dotall-regex': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-duplicate-keys': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-dynamic-import': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-exponentiation-operator': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-export-namespace-from': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-for-of': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-function-name': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-json-strings': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-literals': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-logical-assignment-operators': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-member-expression-literals': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-modules-amd': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-modules-systemjs': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-modules-umd': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-new-target': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-nullish-coalescing-operator': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-numeric-separator': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-object-rest-spread': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-object-super': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-optional-catch-binding': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-optional-chaining': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-private-methods': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-private-property-in-object': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-property-literals': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-regenerator': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-reserved-words': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-shorthand-properties': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-spread': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-sticky-regex': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-template-literals': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-typeof-symbol': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-unicode-escapes': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-unicode-property-regex': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-unicode-regex': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-unicode-sets-regex': 7.25.7(@babel/core@7.25.7) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.25.7) - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.7) - babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.7) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.7) + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.8) + '@babel/plugin-syntax-import-assertions': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-syntax-import-attributes': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.8) + '@babel/plugin-transform-arrow-functions': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-async-generator-functions': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-async-to-generator': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-block-scoped-functions': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-block-scoping': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-class-properties': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-class-static-block': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-classes': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-computed-properties': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-destructuring': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-dotall-regex': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-duplicate-keys': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-dynamic-import': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-exponentiation-operator': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-export-namespace-from': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-for-of': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-function-name': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-json-strings': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-literals': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-logical-assignment-operators': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-member-expression-literals': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-modules-amd': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-modules-systemjs': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-modules-umd': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-new-target': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-nullish-coalescing-operator': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-numeric-separator': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-object-rest-spread': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-object-super': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-optional-catch-binding': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-optional-chaining': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-private-methods': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-private-property-in-object': 7.25.8(@babel/core@7.25.8) + '@babel/plugin-transform-property-literals': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-regenerator': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-reserved-words': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-shorthand-properties': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-spread': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-sticky-regex': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-template-literals': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-typeof-symbol': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-unicode-escapes': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-unicode-property-regex': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-unicode-regex': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-unicode-sets-regex': 7.25.7(@babel/core@7.25.8) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.25.8) + babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.8) + babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.8) + babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.8) core-js-compat: 3.38.1 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.25.7)': + '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 esutils: 2.0.3 - '@babel/preset-typescript@7.25.7(@babel/core@7.25.7)': + '@babel/preset-typescript@7.25.7(@babel/core@7.25.8)': dependencies: - '@babel/core': 7.25.7 + '@babel/core': 7.25.8 '@babel/helper-plugin-utils': 7.25.7 '@babel/helper-validator-option': 7.25.7 - '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.7) - '@babel/plugin-transform-typescript': 7.25.7(@babel/core@7.25.7) + '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.8) + '@babel/plugin-transform-typescript': 7.25.7(@babel/core@7.25.8) transitivePeerDependencies: - supports-color @@ -6660,22 +6480,22 @@ snapshots: '@babel/template@7.25.7': dependencies: '@babel/code-frame': 7.25.7 - '@babel/parser': 7.25.7 - '@babel/types': 7.25.7 + '@babel/parser': 7.25.8 + '@babel/types': 7.25.8 '@babel/traverse@7.25.7': dependencies: '@babel/code-frame': 7.25.7 '@babel/generator': 7.25.7 - '@babel/parser': 7.25.7 + '@babel/parser': 7.25.8 '@babel/template': 7.25.7 - '@babel/types': 7.25.7 + '@babel/types': 7.25.8 debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.25.7': + '@babel/types@7.25.8': dependencies: '@babel/helper-string-parser': 7.25.7 '@babel/helper-validator-identifier': 7.25.7 @@ -7665,7 +7485,7 @@ snapshots: istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 5.0.6 istanbul-reports: 3.1.7 - magic-string: 0.30.11 + magic-string: 0.30.12 magicast: 0.3.5 std-env: 3.7.0 test-exclude: 7.0.1 @@ -7697,7 +7517,7 @@ snapshots: '@vitest/snapshot@2.0.5': dependencies: '@vitest/pretty-format': 2.0.5 - magic-string: 0.30.11 + magic-string: 0.30.12 pathe: 1.1.2 '@vitest/spy@2.0.5': @@ -7838,27 +7658,27 @@ snapshots: b4a@1.6.7: {} - babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.7): + babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.8): dependencies: - '@babel/compat-data': 7.25.7 - '@babel/core': 7.25.7 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.7) + '@babel/compat-data': 7.25.8 + '@babel/core': 7.25.8 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.7): + babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.8): dependencies: - '@babel/core': 7.25.7 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) core-js-compat: 3.38.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.7): + babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.8): dependencies: - '@babel/core': 7.25.7 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.7) + '@babel/core': 7.25.8 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) transitivePeerDependencies: - supports-color @@ -7939,8 +7759,8 @@ snapshots: browserslist@4.24.0: dependencies: - caniuse-lite: 1.0.30001667 - electron-to-chromium: 1.5.35 + caniuse-lite: 1.0.30001668 + electron-to-chromium: 1.5.36 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) @@ -8014,7 +7834,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001667: {} + caniuse-lite@1.0.30001668: {} caseless@0.12.0: {} @@ -8481,7 +8301,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.35: {} + electron-to-chromium@1.5.36: {} ellipsize@0.1.0: {} @@ -9196,7 +9016,7 @@ snapshots: globrex@0.1.2: {} - google-auth-library@9.14.1: + google-auth-library@9.14.2: dependencies: base64-js: 1.5.1 ecdsa-sig-formatter: 1.0.11 @@ -9212,7 +9032,7 @@ snapshots: dependencies: extend: 3.0.2 gaxios: 6.7.1 - google-auth-library: 9.14.1 + google-auth-library: 9.14.2 qs: 6.13.0 url-template: 2.0.8 uuid: 9.0.1 @@ -9222,7 +9042,7 @@ snapshots: googleapis@144.0.0: dependencies: - google-auth-library: 9.14.1 + google-auth-library: 9.14.2 googleapis-common: 7.2.0 transitivePeerDependencies: - encoding @@ -9930,14 +9750,14 @@ snapshots: lz-string@1.5.0: {} - magic-string@0.30.11: + magic-string@0.30.12: dependencies: '@jridgewell/sourcemap-codec': 1.5.0 magicast@0.3.5: dependencies: - '@babel/parser': 7.25.7 - '@babel/types': 7.25.7 + '@babel/parser': 7.25.8 + '@babel/types': 7.25.8 source-map-js: 1.2.1 mailparser@3.7.1: @@ -11646,7 +11466,7 @@ snapshots: chai: 5.1.1 debug: 4.3.7 execa: 8.0.1 - magic-string: 0.30.11 + magic-string: 0.30.12 pathe: 1.1.2 std-env: 3.7.0 tinybench: 2.9.0 From 89617756c934508dacc58aff62ea3a35004cab46 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 06:29:57 -0700 Subject: [PATCH 117/740] chore(deps): bump @scalar/hono-api-reference from 0.5.152 to 0.5.153 (#17085) * chore(deps): bump @scalar/hono-api-reference from 0.5.152 to 0.5.153 Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.152 to 0.5.153. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 ca821913cbfdee5..32d9231a6bd896a 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.22", - "@scalar/hono-api-reference": "0.5.152", + "@scalar/hono-api-reference": "0.5.153", "@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 0746983236c674f..eeed573a3ca792b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: 0.0.22 version: 0.0.22 '@scalar/hono-api-reference': - specifier: 0.5.152 - version: 0.5.152(hono@4.6.3) + specifier: 0.5.153 + version: 0.5.153(hono@4.6.3) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1690,18 +1690,18 @@ packages: '@rss3/sdk@0.0.22': resolution: {integrity: sha512-yBfxbEoVxzBWeCccWDTH6VXy+TxkTnW7D8QwKbq+IQVb8ou7g1vw9oLy4E4yEu2CJ8XEZNE2BaTl2l0BWxcGOQ==} - '@scalar/hono-api-reference@0.5.152': - resolution: {integrity: sha512-mSRpicEjr3q3ulXHV9fpPKgq+Mju0/A9jyB4NvvZ9GitunTm6P4urr/RKzgESDTqYK3zK/VGahZWeQFLi6PSKQ==} + '@scalar/hono-api-reference@0.5.153': + resolution: {integrity: sha512-Eo4AeRanOthMI9uD/vC1GZ70ztt9aty+xoL9tUe1TUvhoTpFmGOLKzwRCFyqMSc0W16qcWXo/hkVY0BcYS+oEg==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 - '@scalar/openapi-types@0.1.1': - resolution: {integrity: sha512-NMy3QNk6ytcCoPUGJH0t4NNr36OWXgZhA3ormr3TvhX1NDgoF95wFyodGVH8xiHeUyn2/FxtETm8UBLbB5xEmg==} + '@scalar/openapi-types@0.1.2': + resolution: {integrity: sha512-TxiAbs9Rw5qnMs/vvg+4Zx1Xf/5RhJXf8w6JOYSgvp4d2IKkOKc9eSOhid8ySvz7bWCjF2yWd8eHNc/BFs8cXg==} engines: {node: '>=18'} - '@scalar/types@0.0.13': - resolution: {integrity: sha512-4baCQ3uXTQsT/da5X3+yO34VEu057Jjw0SJFkaaFmXTqHXVZM+SaDHSyTvT6tyKvgDpPpn6iD22uiFCdldEzRQ==} + '@scalar/types@0.0.14': + resolution: {integrity: sha512-4yzW5d9nWtRE3eVNfLnuVUScSMf325PYJ9qCJ8CpaVP7hnWrTv9xGw/2n7csEKzu3QJkdff0myibHfxXJ6ICig==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7143,16 +7143,16 @@ snapshots: '@rss3/api-core': 0.0.22 '@rss3/api-utils': 0.0.22 - '@scalar/hono-api-reference@0.5.152(hono@4.6.3)': + '@scalar/hono-api-reference@0.5.153(hono@4.6.3)': dependencies: - '@scalar/types': 0.0.13 + '@scalar/types': 0.0.14 hono: 4.6.3 - '@scalar/openapi-types@0.1.1': {} + '@scalar/openapi-types@0.1.2': {} - '@scalar/types@0.0.13': + '@scalar/types@0.0.14': dependencies: - '@scalar/openapi-types': 0.1.1 + '@scalar/openapi-types': 0.1.2 '@unhead/schema': 1.11.7 '@sec-ant/readable-stream@0.4.1': {} From 8b444965aba2aa2fa02eff4e38653020c9c253ea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 06:30:14 -0700 Subject: [PATCH 118/740] chore(deps): bump @hono/node-server from 1.13.1 to 1.13.2 (#17088) * chore(deps): bump @hono/node-server from 1.13.1 to 1.13.2 Bumps [@hono/node-server](https://github.com/honojs/node-server) from 1.13.1 to 1.13.2. - [Release notes](https://github.com/honojs/node-server/releases) - [Commits](https://github.com/honojs/node-server/compare/v1.13.1...v1.13.2) --- updated-dependencies: - dependency-name: "@hono/node-server" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 32d9231a6bd896a..3432c39bff7f475 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "*.yml": "eslint --cache --fix" }, "dependencies": { - "@hono/node-server": "1.13.1", + "@hono/node-server": "1.13.2", "@hono/zod-openapi": "0.16.4", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index eeed573a3ca792b..1d9394c6279beb5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@hono/node-server': - specifier: 1.13.1 - version: 1.13.1(hono@4.6.3) + specifier: 1.13.2 + version: 1.13.2(hono@4.6.3) '@hono/zod-openapi': specifier: 0.16.4 version: 0.16.4(hono@4.6.3)(zod@3.23.8) @@ -1306,8 +1306,8 @@ packages: resolution: {integrity: sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@hono/node-server@1.13.1': - resolution: {integrity: sha512-TSxE6cT5RHnawbjnveexVN7H2Dpn1YaLxQrCOLCUwD+hFbqbFsnJBgdWcYtASqtWVjA+Qgi8uqFug39GsHjo5A==} + '@hono/node-server@1.13.2': + resolution: {integrity: sha512-0w8nEmAyx0Ul0CQp8BL2VtAG4YVdpzXd/mvvM+l0G5Oq22pUyHS+KeFFPSY+czLOF5NAiV3MUNPD1n14Ol5svg==} engines: {node: '>=18.14.1'} peerDependencies: hono: ^4 @@ -6727,7 +6727,7 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.1(hono@4.6.3)': + '@hono/node-server@1.13.2(hono@4.6.3)': dependencies: hono: 4.6.3 From 830be61360db3cf6d792a3a021cfaa7566281e45 Mon Sep 17 00:00:00 2001 From: After9 Date: Sat, 12 Oct 2024 12:02:40 +0800 Subject: [PATCH 119/740] fix(route): change url in `/tvb/news` (#17098) --- lib/routes/tvb/news.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/tvb/news.ts b/lib/routes/tvb/news.ts index 27213475c520fd7..d0171155d8af11b 100644 --- a/lib/routes/tvb/news.ts +++ b/lib/routes/tvb/news.ts @@ -85,6 +85,7 @@ async function handler(ctx) { const language = ctx.req.param('language') ?? 'tc'; const rootUrl = 'https://inews-api.tvb.com'; + const linkRootUrl = 'https://news.tvb.com'; const apiUrl = `${rootUrl}/news/entry/category`; const currentUrl = `${rootUrl}/${language}/${category}`; @@ -102,7 +103,7 @@ async function handler(ctx) { const items = response.data.content.map((item) => ({ title: item.title, - link: `${rootUrl}/${language}/${category}/${item.id}`, + 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'), { From b1a030c5f0fd6890abc2cfad5185c6d37244f010 Mon Sep 17 00:00:00 2001 From: "xxx.Yan" Date: Sun, 13 Oct 2024 03:33:39 +0800 Subject: [PATCH 120/740] feat(route): add route UK Parliament Lords Library research by topic (#16933) * feat(route): add route UK Parliament Lords Library Research by Topic * chore(route): rename parameter from tag to topic. * fix: close browser after puppeteer usage --------- --- lib/routes/parliament.uk/lordslibrary.ts | 55 ++++++++++++++++++++++++ lib/routes/parliament.uk/namespace.ts | 6 +++ 2 files changed, 61 insertions(+) create mode 100644 lib/routes/parliament.uk/lordslibrary.ts create mode 100644 lib/routes/parliament.uk/namespace.ts diff --git a/lib/routes/parliament.uk/lordslibrary.ts b/lib/routes/parliament.uk/lordslibrary.ts new file mode 100644 index 000000000000000..e2d07f1cadac004 --- /dev/null +++ b/lib/routes/parliament.uk/lordslibrary.ts @@ -0,0 +1,55 @@ +import { load } from 'cheerio'; +import { Route } from '@/types'; +import puppeteer from '@/utils/puppeteer'; +import timezone from '@/utils/timezone'; + +export const route: Route = { + path: '/lordslibrary/type/:topic?', + categories: ['government'], + example: '/parliament.uk/lordslibrary/type/research-briefing', + parameters: { topic: 'research by topic, string, example: [research-briefing|buisness|economy]' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'House of Lords Library', + maintainers: ['AntiKnot'], + handler, +}; + +async function handler(ctx) { + const { topic } = ctx.req.param(); + const baseUrl = 'https://lordslibrary.parliament.uk/type'; + const url = `${baseUrl}/${topic}/`; + const browser = await puppeteer(); + const page = await browser.newPage(); + await page.setRequestInterception(true); + page.on('request', (request) => { + request.resourceType() === 'document' ? request.continue() : request.abort(); + }); + await page.goto(url, { + waitUntil: 'domcontentloaded', + }); + + const html = await page.evaluate(() => document.documentElement.innerHTML); + await page.close(); + const $ = load(html); + const items = $('article.card--horizontal') + .map((_, article) => ({ + title: $(article).find('.card__text a').text().trim(), + link: $(article).find('.card__text a').attr('href'), + description: $(article).find('p').last().text().trim(), + pubDate: timezone($(article).find('.card__date time').attr('datetime')), + })) + .toArray(); + browser.close(); + return { + title: `parliament - lordslibrary - ${topic}`, + link: baseUrl, + item: items, + }; +} diff --git a/lib/routes/parliament.uk/namespace.ts b/lib/routes/parliament.uk/namespace.ts new file mode 100644 index 000000000000000..0480446f06aa4a1 --- /dev/null +++ b/lib/routes/parliament.uk/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'UK Parliament', + url: 'parliament.uk', +}; From 9376572d336daddd28647268fa7de35bdd68adda Mon Sep 17 00:00:00 2001 From: "xxx.Yan" Date: Sun, 13 Oct 2024 04:09:59 +0800 Subject: [PATCH 121/740] feat(route): add route UK Parliament Commons Library research by topic (#16941) * feat(route): add route UK Parliament Lords Library Research by Topic * chore(route): rename parameter from tag to topic. * feat(route): add route UK Parliament Commons Library Research by Topic * chore(route): update parameters desc. * fix: close browser after puppeteer usage --------- --- lib/routes/parliament.uk/commonslibrary.ts | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 lib/routes/parliament.uk/commonslibrary.ts diff --git a/lib/routes/parliament.uk/commonslibrary.ts b/lib/routes/parliament.uk/commonslibrary.ts new file mode 100644 index 000000000000000..957a297d5ece4dc --- /dev/null +++ b/lib/routes/parliament.uk/commonslibrary.ts @@ -0,0 +1,55 @@ +import { load } from 'cheerio'; +import { Route } from '@/types'; +import puppeteer from '@/utils/puppeteer'; +import timezone from '@/utils/timezone'; + +export const route: Route = { + path: '/commonslibrary/type/:topic?', + categories: ['government'], + example: '/parliament.uk/commonslibrary/type/research-briefing', + parameters: { topic: 'research by topic, string, example: [research-briefing|data-dashboard]' }, + features: { + requireConfig: false, + requirePuppeteer: true, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Commonlibrary', + maintainers: ['AntiKnot'], + handler, +}; + +async function handler(ctx) { + const { topic } = ctx.req.param(); + const baseUrl = 'https://commonslibrary.parliament.uk/type'; + const url = `${baseUrl}/${topic}/`; + const browser = await puppeteer(); + const page = await browser.newPage(); + await page.setRequestInterception(true); + page.on('request', (request) => { + request.resourceType() === 'document' ? request.continue() : request.abort(); + }); + await page.goto(url, { + waitUntil: 'domcontentloaded', + }); + + const html = await page.evaluate(() => document.documentElement.innerHTML); + await page.close(); + const $ = load(html); + const items = $('article.card--horizontal') + .map((_, article) => ({ + title: $(article).find('.card__text a').text().trim(), + link: $(article).find('.card__text a').attr('href'), + description: $(article).find('p').last().text().trim(), + pubDate: timezone($(article).find('.card__date time').attr('datetime')), + })) + .toArray(); + browser.close(); + return { + title: `parliament - lordslibrary - ${topic}`, + link: baseUrl, + item: items, + }; +} From bdb3295cd87fa4c4221d6726d178a790cd526822 Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Sun, 13 Oct 2024 16:18:11 +0100 Subject: [PATCH 122/740] fix(route/oncc): fix art-template (#17116) --- lib/routes/oncc/templates/article.art | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/oncc/templates/article.art b/lib/routes/oncc/templates/article.art index 1fd784e87bffca7..4fd443f47109d5f 100644 --- a/lib/routes/oncc/templates/article.art +++ b/lib/routes/oncc/templates/article.art @@ -1,2 +1,2 @@ -{{ content }} +{{@ content }} From b98c446a03f98e57e097da58e1d76e531135fdcf Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Mon, 14 Oct 2024 00:08:20 +0800 Subject: [PATCH 123/740] feat(route): add AIbase (#16937) * feat(route): add AIbase * fix: template for description * update util.ts --- lib/routes/aibase/discover.ts | 388 +++++++++++++ lib/routes/aibase/namespace.ts | 8 + lib/routes/aibase/templates/description.art | 100 ++++ lib/routes/aibase/topic.ts | 614 ++++++++++++++++++++ lib/routes/aibase/util.ts | 111 ++++ 5 files changed, 1221 insertions(+) create mode 100644 lib/routes/aibase/discover.ts create mode 100644 lib/routes/aibase/namespace.ts create mode 100644 lib/routes/aibase/templates/description.art create mode 100644 lib/routes/aibase/topic.ts create mode 100644 lib/routes/aibase/util.ts diff --git a/lib/routes/aibase/discover.ts b/lib/routes/aibase/discover.ts new file mode 100644 index 000000000000000..2728f54374ed48b --- /dev/null +++ b/lib/routes/aibase/discover.ts @@ -0,0 +1,388 @@ +import { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; + +import { rootUrl, buildApiUrl, processItems } from './util'; + +export const handler = async (ctx) => { + const { id } = ctx.req.param(); + + const [pid, sid] = id?.split(/-/) ?? [undefined, undefined]; + + const limit = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const currentUrl = new URL(`discover${id ? `/${id}` : ''}`, rootUrl).href; + + const currentHtml = await ofetch(currentUrl); + + const $ = load(currentHtml); + + const { apiRecommListUrl, apiRecommProcUrl, apiTagProcUrl } = await buildApiUrl($); + + let ptag, stag; + let isTag = !!(pid && sid); + + if (isTag) { + const apiRecommList = await ofetch(apiRecommListUrl); + + const recommList = apiRecommList?.data?.results ?? []; + + const parentTag = recommList.find((t) => String(t.Id) === pid); + const subTag = parentTag ? parentTag.sublist.find((t) => String(t.Id) === sid) : undefined; + + ptag = parentTag?.tag ?? parentTag?.alias ?? undefined; + stag = subTag?.tag ?? subTag?.alias ?? undefined; + + isTag = !!(ptag && stag); + } + + const query = { + page: 1, + pagesize: limit, + ticket: '', + }; + + const { + data: { results: apiProcs }, + } = await (isTag + ? ofetch(apiRecommProcUrl, { + query: { + ...query, + ptag, + stag, + }, + }) + : ofetch(apiTagProcUrl, { + query: { + ...query, + f: 'id', + o: 'desc', + }, + })); + + const items = processItems(apiProcs?.slice(0, limit) ?? []); + + const image = new URL($('img.logo').prop('src'), rootUrl).href; + + const author = $('title').text().split(/_/).pop(); + + return { + title: `${author}${isTag ? ` | ${ptag} - ${stag}` : ''}`, + description: $('meta[property="og:description"]').prop('content'), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author, + }; +}; + +export const route: Route = { + path: '/discover/:id?', + name: '发现', + url: 'top.aibase.com', + maintainers: ['nczitzk'], + handler, + example: '/aibase/discover', + parameters: { id: '发现分类,默认为空,即全部产品,可在对应发现分类页 URL 中找到' }, + description: `:::tip + 若订阅 [图片背景移除](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/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 | + | ------------------------------------------------- | ------------------------------------------------- | + | [文案写作](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 | + | ----------------------------------------------------- | ------------------------------------------------- | + | [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/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/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/138-139) | [138-139](https://rsshub.app/aibase/discover/138-139) | +
+ `, + categories: ['new-media'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['top.aibase.com/discover/:id'], + target: (params) => { + const id = params.id; + + return `/discover${id ? `/${id}` : ''}`; + }, + }, + { + title: '图像处理 - 图片背景移除', + source: ['top.aibase.com/discover/37-49'], + target: '/discover/37-49', + }, + { + title: '图像处理 - 图片无损放大', + source: ['top.aibase.com/discover/37-50'], + target: '/discover/37-50', + }, + { + title: '图像处理 - 图片AI修复', + source: ['top.aibase.com/discover/37-51'], + target: '/discover/37-51', + }, + { + title: '图像处理 - 图像生成', + source: ['top.aibase.com/discover/37-52'], + target: '/discover/37-52', + }, + { + title: '图像处理 - Ai图片拓展', + source: ['top.aibase.com/discover/37-53'], + target: '/discover/37-53', + }, + { + title: '图像处理 - Ai漫画生成', + source: ['top.aibase.com/discover/37-54'], + target: '/discover/37-54', + }, + { + title: '图像处理 - Ai生成写真', + source: ['top.aibase.com/discover/37-55'], + target: '/discover/37-55', + }, + { + title: '图像处理 - 电商图片制作', + source: ['top.aibase.com/discover/37-83'], + target: '/discover/37-83', + }, + { + title: '图像处理 - Ai图像转视频', + source: ['top.aibase.com/discover/37-86'], + target: '/discover/37-86', + }, + { + title: '视频创作 - 视频剪辑', + source: ['top.aibase.com/discover/38-56'], + target: '/discover/38-56', + }, + { + title: '视频创作 - 生成视频', + source: ['top.aibase.com/discover/38-57'], + target: '/discover/38-57', + }, + { + title: '视频创作 - Ai动画制作', + source: ['top.aibase.com/discover/38-58'], + target: '/discover/38-58', + }, + { + title: '视频创作 - 字幕生成', + source: ['top.aibase.com/discover/38-84'], + target: '/discover/38-84', + }, + { + title: '效率助手 - AI文档工具', + source: ['top.aibase.com/discover/39-59'], + target: '/discover/39-59', + }, + { + title: '效率助手 - PPT', + source: ['top.aibase.com/discover/39-60'], + target: '/discover/39-60', + }, + { + title: '效率助手 - 思维导图', + source: ['top.aibase.com/discover/39-61'], + target: '/discover/39-61', + }, + { + title: '效率助手 - 表格处理', + source: ['top.aibase.com/discover/39-62'], + target: '/discover/39-62', + }, + { + title: '效率助手 - Ai办公助手', + source: ['top.aibase.com/discover/39-63'], + target: '/discover/39-63', + }, + { + title: '写作灵感 - 文案写作', + source: ['top.aibase.com/discover/40-64'], + target: '/discover/40-64', + }, + { + title: '写作灵感 - 论文写作', + source: ['top.aibase.com/discover/40-88'], + target: '/discover/40-88', + }, + { + title: '艺术灵感 - 音乐创作', + source: ['top.aibase.com/discover/41-65'], + target: '/discover/41-65', + }, + { + title: '艺术灵感 - 设计创作', + source: ['top.aibase.com/discover/41-66'], + target: '/discover/41-66', + }, + { + title: '艺术灵感 - Ai图标生成', + source: ['top.aibase.com/discover/41-67'], + target: '/discover/41-67', + }, + { + title: '趣味 - Ai名字生成器', + source: ['top.aibase.com/discover/42-68'], + target: '/discover/42-68', + }, + { + title: '趣味 - 游戏娱乐', + source: ['top.aibase.com/discover/42-71'], + target: '/discover/42-71', + }, + { + title: '趣味 - 其他', + source: ['top.aibase.com/discover/42-72'], + target: '/discover/42-72', + }, + { + title: '开发编程 - 开发编程', + source: ['top.aibase.com/discover/43-73'], + target: '/discover/43-73', + }, + { + title: '开发编程 - Ai开放平台', + source: ['top.aibase.com/discover/43-74'], + target: '/discover/43-74', + }, + { + title: '开发编程 - Ai算力平台', + source: ['top.aibase.com/discover/43-75'], + target: '/discover/43-75', + }, + { + title: '聊天机器人 - 智能聊天', + source: ['top.aibase.com/discover/44-76'], + target: '/discover/44-76', + }, + { + title: '聊天机器人 - 智能客服', + source: ['top.aibase.com/discover/44-77'], + target: '/discover/44-77', + }, + { + title: '翻译 - 翻译', + source: ['top.aibase.com/discover/46-79'], + target: '/discover/46-79', + }, + { + title: '教育学习 - 教育学习', + source: ['top.aibase.com/discover/47-80'], + target: '/discover/47-80', + }, + { + title: '智能营销 - 智能营销', + source: ['top.aibase.com/discover/48-81'], + target: '/discover/48-81', + }, + { + title: '法律 - 法律', + source: ['top.aibase.com/discover/138-139'], + target: '/discover/138-139', + }, + ], +}; diff --git a/lib/routes/aibase/namespace.ts b/lib/routes/aibase/namespace.ts new file mode 100644 index 000000000000000..6c160a097a288a0 --- /dev/null +++ b/lib/routes/aibase/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AIbase', + url: 'aibase.com', + categories: ['new-media'], + description: '', +}; diff --git a/lib/routes/aibase/templates/description.art b/lib/routes/aibase/templates/description.art new file mode 100644 index 000000000000000..fae2782a3c7dfa6 --- /dev/null +++ b/lib/routes/aibase/templates/description.art @@ -0,0 +1,100 @@ +{{ if images }} + {{ each images image }} + {{ if image?.src }} +
+ {{ image.alt }} +
+ {{ /if }} + {{ /each }} +{{ /if }} + +{{ if item }} + + + + + + + + + + + + + + + + {{ if item.desc }} + {{ item.desc }} + {{ else }} + 无 + {{ /if }} + + + + + + + + + + + + + + + + + + +
名称{{ item.name }}
标签 + {{ each strToArray(item.tags) t }} + {{ t }}  + {{ /each }} +
类型 + {{ if item.proctypename }} + {{ item.proctypename }} + {{ else }} + 无 + {{ /if }} +
描述
需求人群 + {{ set list = strToArray(item.use) }} + {{ if list.length === 1 }} + {{ list[0] }} + {{ else }} + {{ each list l }} +
  • {{ l }}
  • + {{ /each }} + {{ /if }} +
    使用场景示例 + {{ set list = strToArray(item.example) }} + {{ if list.length === 1 }} + {{ list[0] }} + {{ else }} + {{ each list l }} +
  • {{ l }}
  • + {{ /each }} + {{ /if }} +
    产品特色 + {{ set list = strToArray(item.functions) }} + {{ if list.length === 1 }} + {{ list[0] }} + {{ else }} + {{ each list l }} +
  • {{ l }}
  • + {{ /each }} + {{ /if }} +
    站点 + {{ if item.url }} + + {{ item.url }} + + {{ else }} + 无 + {{ /if }} +
    +{{ /if }} \ No newline at end of file diff --git a/lib/routes/aibase/topic.ts b/lib/routes/aibase/topic.ts new file mode 100644 index 000000000000000..78e0fe11ddfb11d --- /dev/null +++ b/lib/routes/aibase/topic.ts @@ -0,0 +1,614 @@ +import { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; + +import { rootUrl, buildApiUrl, processItems } from './util'; + +export const handler = async (ctx) => { + const { id, filter = 'id' } = ctx.req.param(); + + const limit = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const currentUrl = new URL(id ? `topic/${id}` : 'discover', rootUrl).href; + + const currentHtml = await ofetch(currentUrl); + + const $ = load(currentHtml); + + const { apiTagProcUrl } = await buildApiUrl($); + + const { + data: { results: apiTagProcs }, + } = await ofetch(apiTagProcUrl, { + query: { + ...(id ? { tag: id } : {}), + page: 1, + pagesize: 20, + f: filter, + o: 'desc', + ticket: '', + }, + }); + + const items = processItems(apiTagProcs?.slice(0, limit) ?? []); + + const image = new URL($('img.logo').prop('src'), rootUrl).href; + + const author = $('title').text().split(/_/).pop(); + + return { + title: `${author}${id ? ` | ${id}` : ''}`, + description: $('meta[property="og:description"]').prop('content'), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author, + }; +}; + +export const route: Route = { + path: '/topic/:id?/:filter?', + name: '标签', + url: 'top.aibase.com', + maintainers: ['nczitzk'], + handler, + example: '/aibase/topic', + parameters: { id: '标签,默认为空,即全部产品,可在对应标签页 URL 中找到', filter: '过滤器,默认为 `id` 即最新,可选 `pv` 即热门' }, + description: `:::tip + 若订阅 [AI](https://top.aibase.com/topic/AI),网址为 \`https://top.aibase.com/topic/AI\`。截取 \`https://top.aibase.com/topic\` 到末尾的部分 \`AI\` 作为参数填入,此时路由为 [\`/aibase/topic/AI\`](https://rsshub.app/aibase/topic/AI)。 + ::: + + :::tip + 此处查看 [全部标签](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) | +
    + `, + categories: ['new-media'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['top.aibase.com/topic/:id'], + target: (params) => { + const id = params.id; + + return `/topic${id ? `/${id}` : ''}`; + }, + }, + { + title: 'AI', + source: ['top.aibase.com/topic/AI'], + target: '/topic/AI', + }, + { + title: '人工智能', + source: ['top.aibase.com/topic/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD'], + target: '/topic/人工智能', + }, + { + title: '图像生成', + source: ['top.aibase.com/topic/%E5%9B%BE%E5%83%8F%E7%94%9F%E6%88%90'], + target: '/topic/图像生成', + }, + { + title: '自动化', + source: ['top.aibase.com/topic/%E8%87%AA%E5%8A%A8%E5%8C%96'], + target: '/topic/自动化', + }, + { + title: 'AI助手', + source: ['top.aibase.com/topic/AI%E5%8A%A9%E6%89%8B'], + target: '/topic/AI助手', + }, + { + title: '聊天机器人', + source: ['top.aibase.com/topic/%E8%81%8A%E5%A4%A9%E6%9C%BA%E5%99%A8%E4%BA%BA'], + target: '/topic/聊天机器人', + }, + { + title: '个性化', + source: ['top.aibase.com/topic/%E4%B8%AA%E6%80%A7%E5%8C%96'], + target: '/topic/个性化', + }, + { + title: '社交媒体', + source: ['top.aibase.com/topic/%E7%A4%BE%E4%BA%A4%E5%AA%92%E4%BD%93'], + target: '/topic/社交媒体', + }, + { + title: '图像处理', + source: ['top.aibase.com/topic/%E5%9B%BE%E5%83%8F%E5%A4%84%E7%90%86'], + target: '/topic/图像处理', + }, + { + title: '数据分析', + source: ['top.aibase.com/topic/%E6%95%B0%E6%8D%AE%E5%88%86%E6%9E%90'], + target: '/topic/数据分析', + }, + { + title: '自然语言处理', + source: ['top.aibase.com/topic/%E8%87%AA%E7%84%B6%E8%AF%AD%E8%A8%80%E5%A4%84%E7%90%86'], + target: '/topic/自然语言处理', + }, + { + title: '聊天', + source: ['top.aibase.com/topic/%E8%81%8A%E5%A4%A9'], + target: '/topic/聊天', + }, + { + title: '机器学习', + source: ['top.aibase.com/topic/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0'], + target: '/topic/机器学习', + }, + { + title: '教育', + source: ['top.aibase.com/topic/%E6%95%99%E8%82%B2'], + target: '/topic/教育', + }, + { + title: '内容创作', + source: ['top.aibase.com/topic/%E5%86%85%E5%AE%B9%E5%88%9B%E4%BD%9C'], + target: '/topic/内容创作', + }, + { + title: '生产力', + source: ['top.aibase.com/topic/%E7%94%9F%E4%BA%A7%E5%8A%9B'], + target: '/topic/生产力', + }, + { + title: '设计', + source: ['top.aibase.com/topic/%E8%AE%BE%E8%AE%A1'], + target: '/topic/设计', + }, + { + title: 'ChatGPT', + source: ['top.aibase.com/topic/ChatGPT'], + target: '/topic/ChatGPT', + }, + { + title: '创意', + source: ['top.aibase.com/topic/%E5%88%9B%E6%84%8F'], + target: '/topic/创意', + }, + { + title: '开源', + source: ['top.aibase.com/topic/%E5%BC%80%E6%BA%90'], + target: '/topic/开源', + }, + { + title: '写作', + source: ['top.aibase.com/topic/%E5%86%99%E4%BD%9C'], + target: '/topic/写作', + }, + { + title: '效率助手', + source: ['top.aibase.com/topic/%E6%95%88%E7%8E%87%E5%8A%A9%E6%89%8B'], + target: '/topic/效率助手', + }, + { + title: '学习', + source: ['top.aibase.com/topic/%E5%AD%A6%E4%B9%A0'], + target: '/topic/学习', + }, + { + title: '插件', + source: ['top.aibase.com/topic/%E6%8F%92%E4%BB%B6'], + target: '/topic/插件', + }, + { + title: '翻译', + source: ['top.aibase.com/topic/%E7%BF%BB%E8%AF%91'], + target: '/topic/翻译', + }, + { + title: '团队协作', + source: ['top.aibase.com/topic/%E5%9B%A2%E9%98%9F%E5%8D%8F%E4%BD%9C'], + target: '/topic/团队协作', + }, + { + title: 'SEO', + source: ['top.aibase.com/topic/SEO'], + target: '/topic/SEO', + }, + { + title: '营销', + source: ['top.aibase.com/topic/%E8%90%A5%E9%94%80'], + target: '/topic/营销', + }, + { + title: '内容生成', + source: ['top.aibase.com/topic/%E5%86%85%E5%AE%B9%E7%94%9F%E6%88%90'], + target: '/topic/内容生成', + }, + { + title: 'AI技术', + source: ['top.aibase.com/topic/AI%E6%8A%80%E6%9C%AF'], + target: '/topic/AI技术', + }, + { + title: 'AI工具', + source: ['top.aibase.com/topic/AI%E5%B7%A5%E5%85%B7'], + target: '/topic/AI工具', + }, + { + title: '智能助手', + source: ['top.aibase.com/topic/%E6%99%BA%E8%83%BD%E5%8A%A9%E6%89%8B'], + target: '/topic/智能助手', + }, + { + title: '深度学习', + source: ['top.aibase.com/topic/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0'], + target: '/topic/深度学习', + }, + { + title: '多语言支持', + source: ['top.aibase.com/topic/%E5%A4%9A%E8%AF%AD%E8%A8%80%E6%94%AF%E6%8C%81'], + target: '/topic/多语言支持', + }, + { + title: '视频', + source: ['top.aibase.com/topic/%E8%A7%86%E9%A2%91'], + target: '/topic/视频', + }, + { + title: '艺术', + source: ['top.aibase.com/topic/%E8%89%BA%E6%9C%AF'], + target: '/topic/艺术', + }, + { + title: '文本生成', + source: ['top.aibase.com/topic/%E6%96%87%E6%9C%AC%E7%94%9F%E6%88%90'], + target: '/topic/文本生成', + }, + { + title: '开发编程', + source: ['top.aibase.com/topic/%E5%BC%80%E5%8F%91%E7%BC%96%E7%A8%8B'], + target: '/topic/开发编程', + }, + { + title: '协作', + source: ['top.aibase.com/topic/%E5%8D%8F%E4%BD%9C'], + target: '/topic/协作', + }, + { + title: '语言模型', + source: ['top.aibase.com/topic/%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B'], + target: '/topic/语言模型', + }, + { + title: '工具', + source: ['top.aibase.com/topic/%E5%B7%A5%E5%85%B7'], + target: '/topic/工具', + }, + { + title: '销售', + source: ['top.aibase.com/topic/%E9%94%80%E5%94%AE'], + target: '/topic/销售', + }, + { + title: '生产力工具', + source: ['top.aibase.com/topic/%E7%94%9F%E4%BA%A7%E5%8A%9B%E5%B7%A5%E5%85%B7'], + target: '/topic/生产力工具', + }, + { + title: 'AI写作', + source: ['top.aibase.com/topic/AI%E5%86%99%E4%BD%9C'], + target: '/topic/AI写作', + }, + { + title: '创作', + source: ['top.aibase.com/topic/%E5%88%9B%E4%BD%9C'], + target: '/topic/创作', + }, + { + title: '工作效率', + source: ['top.aibase.com/topic/%E5%B7%A5%E4%BD%9C%E6%95%88%E7%8E%87'], + target: '/topic/工作效率', + }, + { + title: '无代码', + source: ['top.aibase.com/topic/%E6%97%A0%E4%BB%A3%E7%A0%81'], + target: '/topic/无代码', + }, + { + title: '隐私保护', + source: ['top.aibase.com/topic/%E9%9A%90%E7%A7%81%E4%BF%9D%E6%8A%A4'], + target: '/topic/隐私保护', + }, + { + title: '视频编辑', + source: ['top.aibase.com/topic/%E8%A7%86%E9%A2%91%E7%BC%96%E8%BE%91'], + target: '/topic/视频编辑', + }, + { + title: '摘要', + source: ['top.aibase.com/topic/%E6%91%98%E8%A6%81'], + target: '/topic/摘要', + }, + { + title: '多语言', + source: ['top.aibase.com/topic/%E5%A4%9A%E8%AF%AD%E8%A8%80'], + target: '/topic/多语言', + }, + { + title: '求职', + source: ['top.aibase.com/topic/%E6%B1%82%E8%81%8C'], + target: '/topic/求职', + }, + { + title: 'GPT', + source: ['top.aibase.com/topic/GPT'], + target: '/topic/GPT', + }, + { + title: '音乐', + source: ['top.aibase.com/topic/%E9%9F%B3%E4%B9%90'], + target: '/topic/音乐', + }, + { + title: '视频创作', + source: ['top.aibase.com/topic/%E8%A7%86%E9%A2%91%E5%88%9B%E4%BD%9C'], + target: '/topic/视频创作', + }, + { + title: '设计工具', + source: ['top.aibase.com/topic/%E8%AE%BE%E8%AE%A1%E5%B7%A5%E5%85%B7'], + target: '/topic/设计工具', + }, + { + title: '搜索', + source: ['top.aibase.com/topic/%E6%90%9C%E7%B4%A2'], + target: '/topic/搜索', + }, + { + title: '写作工具', + source: ['top.aibase.com/topic/%E5%86%99%E4%BD%9C%E5%B7%A5%E5%85%B7'], + target: '/topic/写作工具', + }, + { + title: '视频生成', + source: ['top.aibase.com/topic/%E8%A7%86%E9%A2%91%E7%94%9F%E6%88%90'], + target: '/topic/视频生成', + }, + { + title: '招聘', + source: ['top.aibase.com/topic/%E6%8B%9B%E8%81%98'], + target: '/topic/招聘', + }, + { + title: '代码生成', + source: ['top.aibase.com/topic/%E4%BB%A3%E7%A0%81%E7%94%9F%E6%88%90'], + target: '/topic/代码生成', + }, + { + title: '大型语言模型', + source: ['top.aibase.com/topic/%E5%A4%A7%E5%9E%8B%E8%AF%AD%E8%A8%80%E6%A8%A1%E5%9E%8B'], + target: '/topic/大型语言模型', + }, + { + title: '语音识别', + source: ['top.aibase.com/topic/%E8%AF%AD%E9%9F%B3%E8%AF%86%E5%88%AB'], + target: '/topic/语音识别', + }, + { + title: '编程', + source: ['top.aibase.com/topic/%E7%BC%96%E7%A8%8B'], + target: '/topic/编程', + }, + { + title: '在线工具', + source: ['top.aibase.com/topic/%E5%9C%A8%E7%BA%BF%E5%B7%A5%E5%85%B7'], + target: '/topic/在线工具', + }, + { + title: 'API', + source: ['top.aibase.com/topic/API'], + target: '/topic/API', + }, + { + title: '趣味', + source: ['top.aibase.com/topic/%E8%B6%A3%E5%91%B3'], + target: '/topic/趣味', + }, + { + title: '客户支持', + source: ['top.aibase.com/topic/%E5%AE%A2%E6%88%B7%E6%94%AF%E6%8C%81'], + target: '/topic/客户支持', + }, + { + title: '语音合成', + source: ['top.aibase.com/topic/%E8%AF%AD%E9%9F%B3%E5%90%88%E6%88%90'], + target: '/topic/语音合成', + }, + { + title: '图像', + source: ['top.aibase.com/topic/%E5%9B%BE%E5%83%8F'], + target: '/topic/图像', + }, + { + title: '电子商务', + source: ['top.aibase.com/topic/%E7%94%B5%E5%AD%90%E5%95%86%E5%8A%A1'], + target: '/topic/电子商务', + }, + { + title: 'SEO优化', + source: ['top.aibase.com/topic/SEO%E4%BC%98%E5%8C%96'], + target: '/topic/SEO优化', + }, + { + title: 'AI辅助', + source: ['top.aibase.com/topic/AI%E8%BE%85%E5%8A%A9'], + target: '/topic/AI辅助', + }, + { + title: 'AI生成', + source: ['top.aibase.com/topic/AI%E7%94%9F%E6%88%90'], + target: '/topic/AI生成', + }, + { + title: '创作工具', + source: ['top.aibase.com/topic/%E5%88%9B%E4%BD%9C%E5%B7%A5%E5%85%B7'], + target: '/topic/创作工具', + }, + { + title: '免费', + source: ['top.aibase.com/topic/%E5%85%8D%E8%B4%B9'], + target: '/topic/免费', + }, + { + title: 'LinkedIn', + source: ['top.aibase.com/topic/LinkedIn'], + target: '/topic/LinkedIn', + }, + { + title: '博客', + source: ['top.aibase.com/topic/%E5%8D%9A%E5%AE%A2'], + target: '/topic/博客', + }, + { + title: '写作助手', + source: ['top.aibase.com/topic/%E5%86%99%E4%BD%9C%E5%8A%A9%E6%89%8B'], + target: '/topic/写作助手', + }, + { + title: '助手', + source: ['top.aibase.com/topic/%E5%8A%A9%E6%89%8B'], + target: '/topic/助手', + }, + { + title: '智能', + source: ['top.aibase.com/topic/%E6%99%BA%E8%83%BD'], + target: '/topic/智能', + }, + { + title: '健康', + source: ['top.aibase.com/topic/%E5%81%A5%E5%BA%B7'], + target: '/topic/健康', + }, + { + title: '多模态', + source: ['top.aibase.com/topic/%E5%A4%9A%E6%A8%A1%E6%80%81'], + target: '/topic/多模态', + }, + { + title: '任务管理', + source: ['top.aibase.com/topic/%E4%BB%BB%E5%8A%A1%E7%AE%A1%E7%90%86'], + target: '/topic/任务管理', + }, + { + title: '电子邮件', + source: ['top.aibase.com/topic/%E7%94%B5%E5%AD%90%E9%82%AE%E4%BB%B6'], + target: '/topic/电子邮件', + }, + { + title: '笔记', + source: ['top.aibase.com/topic/%E7%AC%94%E8%AE%B0'], + target: '/topic/笔记', + }, + { + title: '搜索引擎', + source: ['top.aibase.com/topic/%E6%90%9C%E7%B4%A2%E5%BC%95%E6%93%8E'], + target: '/topic/搜索引擎', + }, + { + title: '计算机视觉', + source: ['top.aibase.com/topic/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89'], + target: '/topic/计算机视觉', + }, + { + title: '社区', + source: ['top.aibase.com/topic/%E7%A4%BE%E5%8C%BA'], + target: '/topic/社区', + }, + { + title: '效率', + source: ['top.aibase.com/topic/%E6%95%88%E7%8E%87'], + target: '/topic/效率', + }, + { + title: '知识管理', + source: ['top.aibase.com/topic/%E7%9F%A5%E8%AF%86%E7%AE%A1%E7%90%86'], + target: '/topic/知识管理', + }, + { + title: 'LLM', + source: ['top.aibase.com/topic/LLM'], + target: '/topic/LLM', + }, + { + title: '智能聊天', + source: ['top.aibase.com/topic/%E6%99%BA%E8%83%BD%E8%81%8A%E5%A4%A9'], + target: '/topic/智能聊天', + }, + { + title: '社交', + source: ['top.aibase.com/topic/%E7%A4%BE%E4%BA%A4'], + target: '/topic/社交', + }, + { + title: '语言学习', + source: ['top.aibase.com/topic/%E8%AF%AD%E8%A8%80%E5%AD%A6%E4%B9%A0'], + target: '/topic/语言学习', + }, + { + title: '娱乐', + source: ['top.aibase.com/topic/%E5%A8%B1%E4%B9%90'], + target: '/topic/娱乐', + }, + { + title: '简历', + source: ['top.aibase.com/topic/%E7%AE%80%E5%8E%86'], + target: '/topic/简历', + }, + { + title: 'OpenAI', + source: ['top.aibase.com/topic/OpenAI'], + target: '/topic/OpenAI', + }, + { + title: '客户服务', + source: ['top.aibase.com/topic/%E5%AE%A2%E6%88%B7%E6%9C%8D%E5%8A%A1'], + target: '/topic/客户服务', + }, + { + title: '室内设计', + source: ['top.aibase.com/topic/%E5%AE%A4%E5%86%85%E8%AE%BE%E8%AE%A1'], + target: '/topic/室内设计', + }, + ], +}; diff --git a/lib/routes/aibase/util.ts b/lib/routes/aibase/util.ts new file mode 100644 index 000000000000000..c2f9289cc6ba135 --- /dev/null +++ b/lib/routes/aibase/util.ts @@ -0,0 +1,111 @@ +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'; +import { parseDate } from '@/utils/parse-date'; +import { art } from '@/utils/render'; +import path from 'node:path'; + +const defaultSrc = '_static/ee6af7e.js'; +const defaultToken = 'djflkdsoisknfoklsyhownfrlewfknoiaewf'; + +const rootUrl = 'https://top.aibase.com'; +const apiRootUrl = 'https://app.chinaz.com'; + +/** + * Converts a string to an array. + * If the string starts with '[', it is assumed to be a JSON array and is parsed accordingly. + * Otherwise, the string is wrapped in an array. + * + * @param str - The input string to convert to an array. + * @returns An array created from the input string. + */ +const strToArray = (str: string) => { + if (str.startsWith('[')) { + return JSON.parse(str); + } + return [str]; +}; + +art.defaults.imports.strToArray = strToArray; + +/** + * Retrieve a token asynchronously using a CheerioAPI instance. + * @param $ - The CheerioAPI instance. + * @returns A Promise that resolves to a string representing the token. + */ +const getToken = async ($: CheerioAPI): Promise => { + const scriptUrl = new URL($('script[src]').last()?.prop('src') ?? defaultSrc, rootUrl).href; + + const script = await ofetch(scriptUrl, { + responseType: 'text', + }); + + return script.match(/"\/(\w+)\/ai\/.*?\.aspx"/)?.[1] ?? defaultToken; +}; + +/** + * Build API URLs asynchronously using a CheerioAPI instance. + * @param $ - The CheerioAPI instance. + * @returns An object containing API URLs. + */ +const buildApiUrl = async ($: CheerioAPI) => { + const token = await getToken($); + + const apiRecommListUrl = new URL(`${token}/ai/GetAIProcRecommList.aspx`, apiRootUrl).href; + const apiRecommProcUrl = new URL(`${token}/ai/GetAIProcListByRecomm.aspx`, apiRootUrl).href; + const apiTagProcUrl = new URL(`${token}/ai/GetAiProductOfTag.aspx`, apiRootUrl).href; + + return { + apiRecommListUrl, + apiRecommProcUrl, + apiTagProcUrl, + }; +}; + +/** + * Process an array of items to generate a new array of processed items for RSS. + * @param items - An array of items to process. + * @returns An array of processed items. + */ +const processItems = (items: any[]): any[] => + items.map((item) => { + const title = item.name; + const image = item.imgurl; + const description = art(path.join(__dirname, 'templates/description.art'), { + images: image + ? [ + { + src: image, + alt: title, + }, + ] + : undefined, + item, + }); + const guid = `aibase-${item.zurl}`; + + return { + title, + description, + pubDate: timezone(parseDate(item.addtime), +8), + link: new URL(`tool/${item.zurl}`, rootUrl).href, + category: [...new Set([...strToArray(item.categories), ...strToArray(item.tags), item.catname, item.procattrname, item.procformname, item.proctypename])].filter(Boolean), + guid, + id: guid, + content: { + html: description, + text: item.desc, + }, + image, + banner: image, + updated: parseDate(item.UpdTime), + enclosure_url: item.logo, + enclosure_type: item.logo ? `image/${item.logo.split(/\./).pop()}` : undefined, + enclosure_title: title, + }; + }); + +export { rootUrl, processItems, buildApiUrl }; From 21e9405b53ddffad98db42be66097495843ef967 Mon Sep 17 00:00:00 2001 From: RieN 7z Date: Mon, 14 Oct 2024 00:46:12 +0800 Subject: [PATCH 124/740] feat: add route ipsw.dev (#17074) * [feat(routes)] Add ipsw.dev support * fix: use art-template * fix: host * fix: add __dirname * fix: namespace --------- --- lib/routes/ipsw.dev/index.ts | 64 +++++++++++++++++++ lib/routes/ipsw.dev/namespace.ts | 7 ++ lib/routes/ipsw.dev/templates/description.art | 20 ++++++ 3 files changed, 91 insertions(+) create mode 100644 lib/routes/ipsw.dev/index.ts create mode 100644 lib/routes/ipsw.dev/namespace.ts create mode 100644 lib/routes/ipsw.dev/templates/description.art diff --git a/lib/routes/ipsw.dev/index.ts b/lib/routes/ipsw.dev/index.ts new file mode 100644 index 000000000000000..a5ad5fd1be2bc3f --- /dev/null +++ b/lib/routes/ipsw.dev/index.ts @@ -0,0 +1,64 @@ +import { Data, Route } from '@/types'; +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', + categories: ['program-update'], + example: '/ipsw.dev/index/iPhone16,1', + parameters: { + productID: 'Product ID', + }, + name: 'Apple latest beta firmware', + maintainers: ['RieN7'], + handler, +}; + +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({ + method: 'get', + url: link, + headers: { + Referer: 'https://ipsw.dev/', + }, + }); + + const $ = load(resp.data); + + const productName = $('#IdentifierModal > div > div > div.modal-body > p:nth-child(1) > em').text(); + + const list: Data[] = $('.firmware') + .map((index, 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(); + const date = ele.find('td:nth-child(3)').text(); + const size = ele.find('td:nth-child(4)').text(); + return { + title: `${productName} - ${version}`, + 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, + }), + }; + }) + .get(); + + return { + title: `${productName} Released`, + link, + item: list, + }; +} diff --git a/lib/routes/ipsw.dev/namespace.ts b/lib/routes/ipsw.dev/namespace.ts new file mode 100644 index 000000000000000..e6c6cb1ff9b8052 --- /dev/null +++ b/lib/routes/ipsw.dev/namespace.ts @@ -0,0 +1,7 @@ +import { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'IPSW.dev', + url: 'ipsw.dev', + description: 'Download the latest beta firmware for iPhone, iPad, Mac, Apple Vision Pro, and Apple TV. Check the signing status of the beta firmware.', +}; diff --git a/lib/routes/ipsw.dev/templates/description.art b/lib/routes/ipsw.dev/templates/description.art new file mode 100644 index 000000000000000..c0faef7bfac60d2 --- /dev/null +++ b/lib/routes/ipsw.dev/templates/description.art @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + +
    Version{{ version }}
    Build{{ build }}
    Released{{ released }}
    Size{{ size }}
    \ No newline at end of file From 5360e267ebba418ece2497006339288c26a97940 Mon Sep 17 00:00:00 2001 From: mobyw <44370805+mobyw@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:32:49 +0800 Subject: [PATCH 125/740] feat(route): update routes for uestc jwc and gr (#17092) * feat(route): update routes for uestc jwc and gr * fix: add missing path arg of uestc gr * feat: update example of uestc gr --- lib/routes/uestc/gr.ts | 102 +++++++++++++++++++++++++--------------- lib/routes/uestc/jwc.ts | 77 +++++++++++++++++++----------- 2 files changed, 114 insertions(+), 65 deletions(-) diff --git a/lib/routes/uestc/gr.ts b/lib/routes/uestc/gr.ts index e7a635683e6b001..36e39cecdc91dd3 100644 --- a/lib/routes/uestc/gr.ts +++ b/lib/routes/uestc/gr.ts @@ -1,17 +1,38 @@ -import { Route } from '@/types'; +import { Data, DataItem, 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 InvalidParameterError from '@/errors/types/invalid-parameter'; +import type { Context } from 'hono'; -const baseUrl = 'https://gr.uestc.edu.cn/tongzhi/'; -const baseIndexUrl = 'https://gr.uestc.edu.cn'; +const baseUrl = 'https://gr.uestc.edu.cn/'; +const detailUrl = 'https://gr.uestc.edu.cn/'; + +const dateTimeRegex = /(\d{4}-\d{2}-\d{2} \d{2}:\d{2})/; + +const typeUrlMap = { + important: 'tongzhi/', + teaching: 'tongzhi/119', + degree: 'tongzhi/129', + student: 'tongzhi/122', + practice: 'tongzhi/123', +}; + +const typeNameMap = { + important: '重要公告', + teaching: '教学管理', + degree: '学位管理', + student: '学生管理', + practice: '就业实践', +}; export const route: Route = { - path: '/gr', + path: '/gr/:type?', categories: ['university'], - example: '/uestc/gr', - parameters: {}, + example: '/uestc/gr/student', + parameters: { type: '默认为 `important`' }, features: { requireConfig: false, requirePuppeteer: false, @@ -29,46 +50,53 @@ export const route: Route = { maintainers: ['huyyi', 'mobyw'], handler, url: 'gr.uestc.edu.cn/', + description: `\ + | 重要公告 | 教学管理 | 学位管理 | 学生管理 | 就业实践 | + | --------- | -------- | -------- | -------- | -------- | + | important | teaching | degree | student | practice |`, }; -async function handler() { - const response = await got.get(baseIndexUrl); +async function handler(ctx: Context): Promise { + const type = ctx.req.param('type') || 'important'; + if (type in typeUrlMap === false) { + throw new InvalidParameterError('type not supported'); + } + const typeName = typeNameMap[type]; - const $ = load(response.data); + const indexContent = await ofetch(baseUrl + typeUrlMap[type]); - const items = []; - $('[href^="/tongzhi/"]').each((_, item) => { - items.push(baseIndexUrl + item.attribs.href); - }); + const $ = load(indexContent); + const entries = $('div.title').toArray(); + + const items = entries.map(async (entry) => { + const element = $(entry); + const newsTitle = element.find('a').text() ?? ''; + const newsLink = detailUrl + element.find('a').attr('href'); - const out = await Promise.all( - items.map(async (newsUrl) => { - const newsDetail = await cache.tryGet(newsUrl, async () => { - const result = await got.get(newsUrl); + const newsDetail = await cache.tryGet(newsLink, async () => { + const newsContent = await ofetch(newsLink); + const content = load(newsContent); - const $ = load(result.data); + const basicInfo = content('div.topic_detail_header').find('div.info').text(); + const match = dateTimeRegex.exec(basicInfo); - const title = '[' + $('.over').text() + '] ' + $('div.title').text(); - const author = $('.info').text().split('|')[1].trim().substring(3); - const date = parseDate($('.info').text().split('|')[0].trim().substring(4)); - const description = $('.content').html(); + return { + title: newsTitle, + link: newsLink, + pubDate: match ? timezone(parseDate(match[1]), +8) : null, + description: content('div.content').html(), + }; + }); + + return newsDetail; + }); - return { - title, - link: newsUrl, - author, - pubDate: date, - description, - }; - }); - return newsDetail; - }) - ); + const out = await Promise.all(items); return { - title: '研究生院通知', + title: `研究生院通知(${typeName})`, link: baseUrl, - description: '电子科技大学研究生院通知公告', - item: out, + description: `电子科技大学研究生院通知(${typeName})`, + item: out as DataItem[], }; } diff --git a/lib/routes/uestc/jwc.ts b/lib/routes/uestc/jwc.ts index 324e0f34c8c5050..f310aa15f4cd0cb 100644 --- a/lib/routes/uestc/jwc.ts +++ b/lib/routes/uestc/jwc.ts @@ -1,22 +1,33 @@ -import { Route } from '@/types'; -import got from '@/utils/got'; +import { Data, DataItem, Route } from '@/types'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; import InvalidParameterError from '@/errors/types/invalid-parameter'; - -const dateRegex = /(20\d{2})\/(\d{2})\/(\d{2})/; +import type { Context } from 'hono'; const baseUrl = 'https://www.jwc.uestc.edu.cn/'; const detailUrl = 'https://www.jwc.uestc.edu.cn/info/'; -const map = { +const dateTimeRegex = /(\d{4}-\d{2}-\d{2} \d{2}:\d{2})/; + +const typeUrlMap = { important: 'hard/?page=1', student: 'list/256/?page=1', teacher: 'list/255/?page=1', - teach: 'list/40/?page=1', + teaching: 'list/40/?page=1', office: 'list/ff80808160bcf79c0160c010a8d20020/?page=1', }; +const typeNameMap = { + important: '重要公告', + student: '学生事务公告', + teacher: '教师事务公告', + teaching: '教学新闻', + office: '办公室', +}; + export const route: Route = { path: '/jwc/:type?', categories: ['university'], @@ -32,51 +43,61 @@ export const route: Route = { }, radar: [ { - source: ['jwc.uestc.edu.cn/'], + source: ['www.jwc.uestc.edu.cn/'], target: '/jwc', }, ], name: '教务处', maintainers: ['achjqz', 'mobyw'], handler, - url: 'jwc.uestc.edu.cn/', - description: `| 重要公告 | 学生事务公告 | 教师事务公告 | 教学新闻 | 办公室 | + url: 'www.jwc.uestc.edu.cn/', + description: `\ + | 重要公告 | 学生事务公告 | 教师事务公告 | 教学新闻 | 办公室 | | --------- | ------------ | ------------ | -------- | ------ | - | important | student | teacher | teach | office |`, + | important | student | teacher | teaching | office |`, }; -async function handler(ctx) { +async function handler(ctx: Context): Promise { const type = ctx.req.param('type') || 'important'; - const pageUrl = map[type]; - if (!pageUrl) { + if (type in typeUrlMap === false) { throw new InvalidParameterError('type not supported'); } + const typeName = typeNameMap[type]; - const response = await got.get(baseUrl + pageUrl); + const indexContent = await ofetch(baseUrl + typeUrlMap[type]); - const $ = load(response.data); + const $ = load(indexContent); + const entries = $('div.textAreo.clearfix').toArray(); - const items = $('div.textAreo.clearfix'); + const items = entries.map(async (entry) => { + const element = $(entry); + const newsTitle = element.find('a').attr('title') ?? ''; + const newsLink = detailUrl + element.find('a').attr('newsid'); - const out = $(items) - .map((_, item) => { - item = $(item); - const newsTitle = item.find('a').attr('title'); - const newsLink = detailUrl + item.find('a').attr('newsid'); - const newsDate = parseDate(item.find('i').text().replace(dateRegex, '$1-$2-$3')); + const newsDetail = await cache.tryGet(newsLink, async () => { + const newsContent = await ofetch(newsLink); + const content = load(newsContent); + + const basicInfo = content('div.detail_header').find('div.item').text(); + const match = dateTimeRegex.exec(basicInfo); return { title: newsTitle, link: newsLink, - pubDate: newsDate, + pubDate: match ? timezone(parseDate(match[1]), +8) : null, + description: content('div.NewText').html(), }; - }) - .get(); + }); + + return newsDetail; + }); + + const out = await Promise.all(items); return { - title: '教务处通知', + title: `教务处通知(${typeName})`, link: baseUrl, - description: '电子科技大学教务处通知', - item: out, + description: `电子科技大学教务处通知(${typeName})`, + item: out as DataItem[], }; } From bb74dad38733e6133c26312431649db4872d0d5c Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:31:06 +0800 Subject: [PATCH 126/740] =?UTF-8?q?feat(route):=20add=20=E5=9B=BD=E9=97=A8?= =?UTF-8?q?=E4=BC=A0=E5=AA=92=E5=9C=A8=E7=BA=BF=E4=B8=AD=E5=9B=BD=E6=B5=B7?= =?UTF-8?q?=E5=85=B3=20(#17093)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 国门传媒在线中国海关 * fix: categories --------- --- lib/routes/gmcmonline/chinacustoms.ts | 130 ++++++++++++++++++++++++++ lib/routes/gmcmonline/namespace.ts | 8 ++ 2 files changed, 138 insertions(+) create mode 100644 lib/routes/gmcmonline/chinacustoms.ts create mode 100644 lib/routes/gmcmonline/namespace.ts diff --git a/lib/routes/gmcmonline/chinacustoms.ts b/lib/routes/gmcmonline/chinacustoms.ts new file mode 100644 index 000000000000000..9386d1579edc8f9 --- /dev/null +++ b/lib/routes/gmcmonline/chinacustoms.ts @@ -0,0 +1,130 @@ +import { Route } from '@/types'; + +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +export const handler = async (ctx) => { + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; + + const rootUrl = 'http://chinacustoms.gmcmonline.com'; + const magRootUrl = 'http://manager.gmcmonline.com'; + + const { data: response } = await got(rootUrl); + + const $ = load(response); + + const author = $('p.copyright a').text(); + const language = $('html').prop('lang'); + + let items = $('ul.booklist li a') + .toArray() + .slice(0, limit) + .map((item) => { + item = $(item); + + const title = item.find('p.txt').text(); + const image = new URL(item.find('img').prop('src'), rootUrl).href; + + return { + title, + link: new URL(item.prop('href'), rootUrl).href, + pubDate: parseDate(title, 'YYYY年MM期'), + author, + image, + banner: image, + language, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + $$('ol.breadcrumb li a').first().remove(); + + const current = $$('ol.breadcrumb li a').first().text(); + const pubDate = parseDate($$('div.title').text(), 'YYYY年MM月DD日'); + const image = new URL($$('div.coverline img').prop('src'), rootUrl).href; + + return $$('a.txt') + .toArray() + .map((i) => { + i = $(i); + + const id = i.prop('href').match(/c\/(\d+)\.shtml/)?.[1] ?? undefined; + + if (!id) { + return; + } + + const title = i.prop('title') || i.text(); + const guid = `gmcmonline-chinacustoms-${id}`; + + return { + title, + pubDate, + link: new URL(i.prop('href'), item.link).href, + category: [current, i.closest('div.class-box').find('div.title-box span').text().replaceAll(/【|】/g, '') || undefined].filter(Boolean), + author, + guid, + id: guid, + image, + banner: image, + language, + enclosure_url: new URL(`front/article/${id}/pdf?magazineID=2`, magRootUrl).href, + enclosure_type: 'application/pdf', + enclosure_title: title, + }; + }) + .filter(Boolean); + }) + ) + ); + + const title = $('title').text(); + const image = new URL($('div.img-box img').prop('src'), rootUrl).href; + + return { + title, + description: title, + link: rootUrl, + item: items.flat(), + allowEmpty: true, + image, + author: title, + language, + }; +}; + +export const route: Route = { + path: '/chinacustoms', + name: '中国海关', + url: 'chinacustoms.gmcmonline.com', + maintainers: ['nczitzk'], + handler, + example: '/gmcmonline/chinacustoms', + parameters: undefined, + description: undefined, + categories: ['reading'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['chinacustoms.gmcmonline.com'], + target: '/chinacustoms', + }, + ], +}; diff --git a/lib/routes/gmcmonline/namespace.ts b/lib/routes/gmcmonline/namespace.ts new file mode 100644 index 000000000000000..973f04bf92bb4cd --- /dev/null +++ b/lib/routes/gmcmonline/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '国门传媒在线', + url: 'gmcmonline.com', + categories: ['journal'], + description: '', +}; From 3cd690ad240d766a052c09e36392c4db6a920281 Mon Sep 17 00:00:00 2001 From: kaho <15116355657l@gmail.com> Date: Mon, 14 Oct 2024 03:01:33 +0800 Subject: [PATCH 127/740] fix(route): dlsite (#17103) * fix(route): dlsite * revert * fix: `/dlsite/ci-en/:id/article` * fix: route order --- lib/routes/dlsite/campaign.ts | 3 +-- lib/routes/dlsite/new.ts | 3 +-- lib/routes/dlsite/{ => z-index}/index.ts | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) rename lib/routes/dlsite/{ => z-index}/index.ts (83%) diff --git a/lib/routes/dlsite/campaign.ts b/lib/routes/dlsite/campaign.ts index bcf575ce24b5ef1..05c9e9b7b3b5bbd 100644 --- a/lib/routes/dlsite/campaign.ts +++ b/lib/routes/dlsite/campaign.ts @@ -149,9 +149,8 @@ async function handler(ctx) { } const link = setUrl(info); - const response = await got(link, { + const response = await got(new URL(link, host), { method: 'GET', - prefixUrl: host, }); const data = response.data; const $ = load(data); diff --git a/lib/routes/dlsite/new.ts b/lib/routes/dlsite/new.ts index f4b4d3bb468b327..aa9838b8a26d342 100644 --- a/lib/routes/dlsite/new.ts +++ b/lib/routes/dlsite/new.ts @@ -81,9 +81,8 @@ async function handler(ctx) { const link = info.url.slice(1); - const response = await got(link, { + const response = await got(new URL(link, host), { method: 'GET', - prefixUrl: host, }); const data = response.data; const $ = load(data); diff --git a/lib/routes/dlsite/index.ts b/lib/routes/dlsite/z-index/index.ts similarity index 83% rename from lib/routes/dlsite/index.ts rename to lib/routes/dlsite/z-index/index.ts index 2afcd5944383559..74349ce218c3a4e 100644 --- a/lib/routes/dlsite/index.ts +++ b/lib/routes/dlsite/z-index/index.ts @@ -1,5 +1,5 @@ import { Route } from '@/types'; -import { ProcessItems } from './utils'; +import { ProcessItems } from '../utils'; export const route: Route = { path: '*', From 2dd0033b4b5d49d53b694f040206424709b59bca Mon Sep 17 00:00:00 2001 From: Dlouxgit <57781857+Dlouxgit@users.noreply.github.com> Date: Mon, 14 Oct 2024 13:26:19 +0800 Subject: [PATCH 128/740] fix(route/5eplay): update data acquisition method (#17120) fix #17067 --- lib/routes/5eplay/index.ts | 52 +------------------------------------- 1 file changed, 1 insertion(+), 51 deletions(-) diff --git a/lib/routes/5eplay/index.ts b/lib/routes/5eplay/index.ts index 60e15b73798648c..26c76bf4de63dab 100644 --- a/lib/routes/5eplay/index.ts +++ b/lib/routes/5eplay/index.ts @@ -1,11 +1,8 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; -import zlib from 'zlib'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; -import { config } from '@/config'; -import { getAcwScV2ByArg1 } from './utils'; export const route: Route = { path: '/article', @@ -34,70 +31,23 @@ export const route: Route = { async function handler() { const rootUrl = 'https://csgo.5eplay.com/'; const apiUrl = `${rootUrl}api/article?page=1&type_id=0&time=0&order_by=0`; - const articleUrl = `${rootUrl}article`; const { data: response } = await got({ method: 'get', url: apiUrl, }); - // get acw_sc__v2 - const acw_sc__v2 = await cache.tryGet( - articleUrl, - async () => { - // Zlib Z_BUF_ERROR: unexpected end of file, should close decompress - const detailResponse = await got( - { - method: 'get', - url: articleUrl, - }, - { - decompress: false, - } - ); - - const unzipData = zlib.createUnzip({ - chunkSize: 20 * 1024, - }); - unzipData.write(detailResponse.body); - - let acw_sc__v2 = ''; - for await (const data of unzipData) { - const strData = data.toString(); - const matches = strData.match(/var arg1='(.*?)';/); - if (matches) { - acw_sc__v2 = getAcwScV2ByArg1(matches[1]); - break; - } - } - return acw_sc__v2; - }, - Math.min(config.cache.routeExpire, 25 * 60), - false - ); - const items = await Promise.all( response.data.list.map((item) => cache.tryGet(item.jump_link, async () => { - if (!acw_sc__v2) { - return { - title: item.title, - description: item.title + (item.images?.[0] ? `` : ''), - pubDate: parseDate(item.dateline * 1000), - link: item.jump_link, - }; - } const { data: detailResponse } = await got({ method: 'get', url: item.jump_link, - headers: { - cookie: `acw_sc__v2=${acw_sc__v2}`, - }, }); const $ = load(detailResponse); const content = $('.article-text'); - const res = []; + const res: string[] = []; content.find('> p, > blockquote').each((i, e) => { res.push($(e).text()); From 220ef9feb0294f4232cbfc938c3581476f1c42ba Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:30:38 -0700 Subject: [PATCH 129/740] chore(deps): bump simplecc-wasm from 1.0.0 to 1.1.0 (#17126) * chore(deps): bump simplecc-wasm from 1.0.0 to 1.1.0 Bumps [simplecc-wasm](https://github.com/fengkx/simplecc-wasm) from 1.0.0 to 1.1.0. - [Changelog](https://github.com/fengkx/simplecc-wasm/blob/master/CHANGELOG.md) - [Commits](https://github.com/fengkx/simplecc-wasm/compare/v1.0.0...v1.1.0) --- updated-dependencies: - dependency-name: simplecc-wasm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 71 +++++++++++++++++++++++++++----------------------- 2 files changed, 40 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index 3432c39bff7f475..3305e1b7743455d 100644 --- a/package.json +++ b/package.json @@ -117,7 +117,7 @@ "rfc4648": "1.5.3", "rss-parser": "3.13.0", "sanitize-html": "2.13.1", - "simplecc-wasm": "1.0.0", + "simplecc-wasm": "1.1.0", "socks-proxy-agent": "8.0.4", "source-map": "0.7.4", "telegram": "2.25.15", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1d9394c6279beb5..1baffa25f105c5a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -210,8 +210,8 @@ importers: specifier: 2.13.1 version: 2.13.1 simplecc-wasm: - specifier: 1.0.0 - version: 1.0.0 + specifier: 1.1.0 + version: 1.1.0 socks-proxy-agent: specifier: 8.0.4 version: 8.0.4 @@ -1966,8 +1966,8 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@unhead/schema@1.11.7': - resolution: {integrity: sha512-j9uN7T63aUXrZ6yx2CfjVT7xZHjn0PZO7TPMaWqMFjneIH/NONKvDVCMEqDlXeqdSIERIYtk/xTHgCUMer5eyw==} + '@unhead/schema@1.11.8': + resolution: {integrity: sha512-p3n0iQwILqUZGzCxhJD09Hehy2Jz+CZtMEhFL64VMNG/ZVh0MqAZnNnZRQ40ZPKuq3rbasvedwDtgcRg4qeEJw==} '@vercel/nft@0.27.4': resolution: {integrity: sha512-Rioz3LJkEKicKCi9BSyc1RXZ5R6GmXosFMeBSThh6msWSOiArKhb7c75MiWwZEgPL7x0/l3TAfH/l0cxKNuUFA==} @@ -3237,8 +3237,8 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} - get-east-asian-width@1.2.0: - resolution: {integrity: sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==} + get-east-asian-width@1.3.0: + resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} engines: {node: '>=18'} get-intrinsic@1.2.4: @@ -4443,14 +4443,14 @@ packages: parse-srcset@1.0.2: resolution: {integrity: sha512-/2qh0lav6CmI15FzA3i/2Bzk2zCgQhGMkvhOhKNcBVQ1ldgpbfiNTVslmooUmWJcADi1f1kIeynbDRVzNlfR6Q==} - parse5-htmlparser2-tree-adapter@7.0.0: - resolution: {integrity: sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==} + parse5-htmlparser2-tree-adapter@7.1.0: + resolution: {integrity: sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==} parse5-parser-stream@7.1.2: resolution: {integrity: sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==} - parse5@7.1.2: - resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} + parse5@7.2.0: + resolution: {integrity: sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==} parseley@0.12.1: resolution: {integrity: sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==} @@ -4973,8 +4973,8 @@ packages: simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} - simplecc-wasm@1.0.0: - resolution: {integrity: sha512-mb9+D3yeGpuXpMiDNVOMtF/ACDGa5to2lE0tgAHvz6XyxWVnTBTYTA+ez2DR/doeDAU56AoWJPA5FdWETClf1Q==} + simplecc-wasm@1.1.0: + resolution: {integrity: sha512-0nmH9WrzxpI8GOZkltH0NKAlcPe42rXek01noMSdelCmj8RYSL06SDDG/YWhvVTbMcuN1fq5imOeXpUJmhbcPQ==} slice-ansi@5.0.0: resolution: {integrity: sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==} @@ -5253,8 +5253,8 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.50: - resolution: {integrity: sha512-na2EcZqmdA2iV9zHV7OHQDxxdciEpxrjbkp+aHmZgnZKHzoElLajP59np5/4+sare9fQBfixgvXKx8ev1d7ytw==} + tldts-core@6.1.51: + resolution: {integrity: sha512-bu9oCYYWC1iRjx+3UnAjqCsfrWNZV1ghNQf49b3w5xE8J/tNShHTzp5syWJfwGH+pxUgTTLUnzHnfuydW7wmbg==} tldts@6.1.50: resolution: {integrity: sha512-q9GOap6q3KCsLMdOjXhWU5jVZ8/1dIib898JBRLsN+tBhENpBDcAVQbE0epADOjw11FhQQy9AcbqKGBQPUfTQA==} @@ -5760,6 +5760,11 @@ packages: engines: {node: '>= 14'} hasBin: true + yaml@2.6.0: + resolution: {integrity: sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==} + engines: {node: '>= 14'} + hasBin: true + yargs-parser@15.0.3: resolution: {integrity: sha512-/MVEVjTXy/cGAjdtQf8dW3V9b97bPN7rNn8ETj6BmAQL7ibC7O1Q9SPJbGjgh3SlwoBNXMzj/ZGIj8mBgl12YA==} @@ -7153,7 +7158,7 @@ snapshots: '@scalar/types@0.0.14': dependencies: '@scalar/openapi-types': 0.1.2 - '@unhead/schema': 1.11.7 + '@unhead/schema': 1.11.8 '@sec-ant/readable-stream@0.4.1': {} @@ -7268,7 +7273,7 @@ snapshots: dependencies: '@types/node': 22.7.5 '@types/tough-cookie': 4.0.5 - parse5: 7.1.2 + parse5: 7.2.0 '@types/json-bigint@1.0.4': {} @@ -7453,7 +7458,7 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@unhead/schema@1.11.7': + '@unhead/schema@1.11.8': dependencies: hookable: 5.5.3 zhead: 2.2.4 @@ -7917,8 +7922,8 @@ snapshots: domutils: 3.1.0 encoding-sniffer: 0.2.0 htmlparser2: 9.1.0 - parse5: 7.1.2 - parse5-htmlparser2-tree-adapter: 7.0.0 + parse5: 7.2.0 + parse5-htmlparser2-tree-adapter: 7.1.0 parse5-parser-stream: 7.1.2 undici: 6.20.0 whatwg-mimetype: 4.0.0 @@ -8936,7 +8941,7 @@ snapshots: get-caller-file@2.0.5: {} - get-east-asian-width@1.2.0: {} + get-east-asian-width@1.3.0: {} get-intrinsic@1.2.4: dependencies: @@ -9389,7 +9394,7 @@ snapshots: is-fullwidth-code-point@5.0.0: dependencies: - get-east-asian-width: 1.2.0 + get-east-asian-width: 1.3.0 is-glob@4.0.3: dependencies: @@ -9495,7 +9500,7 @@ snapshots: https-proxy-agent: 7.0.5 is-potential-custom-element-name: 1.0.1 nwsapi: 2.2.13 - parse5: 7.1.2 + parse5: 7.2.0 rrweb-cssom: 0.7.1 saxes: 6.0.0 symbol-tree: 3.2.4 @@ -10200,7 +10205,7 @@ snapshots: openapi3-ts@4.4.0: dependencies: - yaml: 2.5.1 + yaml: 2.6.0 optionator@0.8.3: dependencies: @@ -10305,16 +10310,16 @@ snapshots: parse-srcset@1.0.2: {} - parse5-htmlparser2-tree-adapter@7.0.0: + parse5-htmlparser2-tree-adapter@7.1.0: dependencies: domhandler: 5.0.3 - parse5: 7.1.2 + parse5: 7.2.0 parse5-parser-stream@7.1.2: dependencies: - parse5: 7.1.2 + parse5: 7.2.0 - parse5@7.1.2: + parse5@7.2.0: dependencies: entities: 4.5.0 @@ -10883,7 +10888,7 @@ snapshots: dependencies: is-arrayish: 0.3.2 - simplecc-wasm@1.0.0: {} + simplecc-wasm@1.1.0: {} slice-ansi@5.0.0: dependencies: @@ -11012,7 +11017,7 @@ snapshots: string-width@7.2.0: dependencies: emoji-regex: 10.4.0 - get-east-asian-width: 1.2.0 + get-east-asian-width: 1.3.0 strip-ansi: 7.1.0 string_decoder@1.3.0: @@ -11181,11 +11186,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.50: {} + tldts-core@6.1.51: {} tldts@6.1.50: dependencies: - tldts-core: 6.1.50 + tldts-core: 6.1.51 tmp@0.0.33: dependencies: @@ -11639,10 +11644,12 @@ snapshots: dependencies: eslint-visitor-keys: 3.4.3 lodash: 4.17.21 - yaml: 2.5.1 + yaml: 2.6.0 yaml@2.5.1: {} + yaml@2.6.0: {} + yargs-parser@15.0.3: dependencies: camelcase: 5.3.1 From cc4752315fcb6f76614b526b2e477abda341bc3d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 01:30:53 -0700 Subject: [PATCH 130/740] chore(deps): bump @tonyrl/rand-user-agent from 2.0.81 to 2.0.82 (#17124) * chore(deps): bump @tonyrl/rand-user-agent from 2.0.81 to 2.0.82 Bumps [@tonyrl/rand-user-agent](https://github.com/TonyRL/rand-user-agent) from 2.0.81 to 2.0.82. - [Release notes](https://github.com/TonyRL/rand-user-agent/releases) - [Commits](https://github.com/TonyRL/rand-user-agent/compare/v2.0.81...v2.0.82) --- updated-dependencies: - dependency-name: "@tonyrl/rand-user-agent" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 3305e1b7743455d..c39f5f6eb510ba9 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@rss3/sdk": "0.0.22", "@scalar/hono-api-reference": "0.5.153", "@sentry/node": "7.119.1", - "@tonyrl/rand-user-agent": "2.0.81", + "@tonyrl/rand-user-agent": "2.0.82", "aes-js": "3.1.2", "art-template": "4.13.2", "bbcodejs": "0.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1baffa25f105c5a..d40012cf3bef8b9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,8 +51,8 @@ importers: specifier: 7.119.1 version: 7.119.1 '@tonyrl/rand-user-agent': - specifier: 2.0.81 - version: 2.0.81 + specifier: 2.0.82 + version: 2.0.82 aes-js: specifier: 3.1.2 version: 3.1.2 @@ -1752,8 +1752,8 @@ packages: resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} engines: {node: '>=14.16'} - '@tonyrl/rand-user-agent@2.0.81': - resolution: {integrity: sha512-pL8is8iSle1gVPeNGSIKNpnyDaxSChWAtG7Kbbx1wq91Y8NJ+O+S/AsNvrQ7GVzKZF7rPTiRGl2eHNDVjdR2/A==} + '@tonyrl/rand-user-agent@2.0.82': + resolution: {integrity: sha512-uh0pAksx59diJaKzmLjDFaeAEl8nIjdFq97L4hUOr8AlBZoiB1UWSXjDqt+lBTqRBxsfyE/joVql4/X8mL/rqA==} engines: {node: '>=14.16'} '@tootallnate/quickjs-emscripten@0.23.0': @@ -7219,7 +7219,7 @@ snapshots: dependencies: defer-to-connect: 2.0.1 - '@tonyrl/rand-user-agent@2.0.81': {} + '@tonyrl/rand-user-agent@2.0.82': {} '@tootallnate/quickjs-emscripten@0.23.0': {} From db6cb9d3e4239e56de6ff9600f6e34f60de31588 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 21:38:03 +0800 Subject: [PATCH 131/740] chore(deps): bump tldts from 6.1.50 to 6.1.51 (#17123) * chore(deps): bump tldts from 6.1.50 to 6.1.51 Bumps [tldts](https://github.com/remusao/tldts) from 6.1.50 to 6.1.51. - [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.50...v6.1.51) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install * revert: "chore(deps): bump @tonyrl/rand-user-agent from 2.0.81 to 2.0.82 (#17124)" This reverts commit cc4752315fcb6f76614b526b2e477abda341bc3d. --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 ++-- pnpm-lock.yaml | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index c39f5f6eb510ba9..8d7d882e91fdebb 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@rss3/sdk": "0.0.22", "@scalar/hono-api-reference": "0.5.153", "@sentry/node": "7.119.1", - "@tonyrl/rand-user-agent": "2.0.82", + "@tonyrl/rand-user-agent": "2.0.81", "aes-js": "3.1.2", "art-template": "4.13.2", "bbcodejs": "0.0.4", @@ -123,7 +123,7 @@ "telegram": "2.25.15", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.50", + "tldts": "6.1.51", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d40012cf3bef8b9..0651aea595b5545 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -51,8 +51,8 @@ importers: specifier: 7.119.1 version: 7.119.1 '@tonyrl/rand-user-agent': - specifier: 2.0.82 - version: 2.0.82 + specifier: 2.0.81 + version: 2.0.81 aes-js: specifier: 3.1.2 version: 3.1.2 @@ -228,8 +228,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.50 - version: 6.1.50 + specifier: 6.1.51 + version: 6.1.51 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -1752,8 +1752,8 @@ packages: resolution: {integrity: sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw==} engines: {node: '>=14.16'} - '@tonyrl/rand-user-agent@2.0.82': - resolution: {integrity: sha512-uh0pAksx59diJaKzmLjDFaeAEl8nIjdFq97L4hUOr8AlBZoiB1UWSXjDqt+lBTqRBxsfyE/joVql4/X8mL/rqA==} + '@tonyrl/rand-user-agent@2.0.81': + resolution: {integrity: sha512-pL8is8iSle1gVPeNGSIKNpnyDaxSChWAtG7Kbbx1wq91Y8NJ+O+S/AsNvrQ7GVzKZF7rPTiRGl2eHNDVjdR2/A==} engines: {node: '>=14.16'} '@tootallnate/quickjs-emscripten@0.23.0': @@ -5256,8 +5256,8 @@ packages: tldts-core@6.1.51: resolution: {integrity: sha512-bu9oCYYWC1iRjx+3UnAjqCsfrWNZV1ghNQf49b3w5xE8J/tNShHTzp5syWJfwGH+pxUgTTLUnzHnfuydW7wmbg==} - tldts@6.1.50: - resolution: {integrity: sha512-q9GOap6q3KCsLMdOjXhWU5jVZ8/1dIib898JBRLsN+tBhENpBDcAVQbE0epADOjw11FhQQy9AcbqKGBQPUfTQA==} + tldts@6.1.51: + resolution: {integrity: sha512-33lfQoL0JsDogIbZ8fgRyvv77GnRtwkNE/MOKocwUgPO1WrSfsq7+vQRKxRQZai5zd+zg97Iv9fpFQSzHyWdLA==} hasBin: true tmp@0.0.33: @@ -7219,7 +7219,7 @@ snapshots: dependencies: defer-to-connect: 2.0.1 - '@tonyrl/rand-user-agent@2.0.82': {} + '@tonyrl/rand-user-agent@2.0.81': {} '@tootallnate/quickjs-emscripten@0.23.0': {} @@ -11188,7 +11188,7 @@ snapshots: tldts-core@6.1.51: {} - tldts@6.1.50: + tldts@6.1.51: dependencies: tldts-core: 6.1.51 @@ -11228,7 +11228,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.50 + tldts: 6.1.51 tr46@0.0.3: {} From 0474ab5f9c2e92761cb7c4ab10918368ade9369b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 21:47:35 +0800 Subject: [PATCH 132/740] chore(deps): bump hono from 4.6.3 to 4.6.4 (#17127) * chore(deps): bump hono from 4.6.3 to 4.6.4 Bumps [hono](https://github.com/honojs/hono) from 4.6.3 to 4.6.4. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.3...v4.6.4) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * chore: fix pnpm install --------- 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 8d7d882e91fdebb..06caad10ba29f59 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "fanfou-sdk": "5.0.0", "form-data": "4.0.1", "googleapis": "144.0.0", - "hono": "4.6.3", + "hono": "4.6.4", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0651aea595b5545..2a7cd999e23a9ca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,10 +10,10 @@ importers: dependencies: '@hono/node-server': specifier: 1.13.2 - version: 1.13.2(hono@4.6.3) + version: 1.13.2(hono@4.6.4) '@hono/zod-openapi': specifier: 0.16.4 - version: 0.16.4(hono@4.6.3)(zod@3.23.8) + version: 0.16.4(hono@4.6.4)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -46,7 +46,7 @@ importers: version: 0.0.22 '@scalar/hono-api-reference': specifier: 0.5.153 - version: 0.5.153(hono@4.6.3) + version: 0.5.153(hono@4.6.4) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -108,8 +108,8 @@ importers: specifier: 144.0.0 version: 144.0.0 hono: - specifier: 4.6.3 - version: 4.6.3 + specifier: 4.6.4 + version: 4.6.4 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -419,7 +419,7 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.8(@types/node@22.7.5)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.5)) vitest: specifier: 2.0.5 version: 2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -1966,8 +1966,8 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@unhead/schema@1.11.8': - resolution: {integrity: sha512-p3n0iQwILqUZGzCxhJD09Hehy2Jz+CZtMEhFL64VMNG/ZVh0MqAZnNnZRQ40ZPKuq3rbasvedwDtgcRg4qeEJw==} + '@unhead/schema@1.11.9': + resolution: {integrity: sha512-0V37bxG4sQuiLw3M5DMD+b99ndOOngecMlekQ122TDvBb24W8rWwkHhXvAu5eFg6bQXPdQF1A0U0PuRMcCj/ZA==} '@vercel/nft@0.27.4': resolution: {integrity: sha512-Rioz3LJkEKicKCi9BSyc1RXZ5R6GmXosFMeBSThh6msWSOiArKhb7c75MiWwZEgPL7x0/l3TAfH/l0cxKNuUFA==} @@ -1985,8 +1985,8 @@ packages: '@vitest/pretty-format@2.0.5': resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==} - '@vitest/pretty-format@2.1.2': - resolution: {integrity: sha512-FIoglbHrSUlOJPDGIrh2bjX1sNars5HbxlcsFKCtKzu4+5lpsRhOCVcuzp0fEhAGHkPZRIXVNzPcpSlkoZ3LuA==} + '@vitest/pretty-format@2.1.3': + resolution: {integrity: sha512-XH1XdtoLZCpqV59KRbPrIhFCOO0hErxrQCMcvnQete3Vibb9UeIOX02uFPfVn3Z9ZXsq78etlfyhnkmIZSzIwQ==} '@vitest/runner@2.0.5': resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==} @@ -3407,8 +3407,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.3: - resolution: {integrity: sha512-0LeEuBNFeSHGqZ9sNVVgZjB1V5fmhkBSB0hZrpqStSMLOWgfLy0dHOvrjbJh0H2khsjet6rbHfWTHY0kpYThKQ==} + hono@4.6.4: + resolution: {integrity: sha512-T5WqBkTOcIQblqBKB5mpzaH/A+dSpvVe938xZJCHOmOuYfF7DSwE/9/10+BMvwSPq9N/f6LiQ38HxrZSQOsXKw==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -5549,8 +5549,8 @@ packages: vite: optional: true - vite@5.4.8: - resolution: {integrity: sha512-FqrItQ4DT1NC4zCUqMB4c4AZORMKIa0m8/URVCZ77OZ/QSNeJ54bU1vrFADbDsuwfIPcgknRkmqakQcgnL4GiQ==} + vite@5.4.9: + resolution: {integrity: sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -6732,20 +6732,20 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.2(hono@4.6.3)': + '@hono/node-server@1.13.2(hono@4.6.4)': dependencies: - hono: 4.6.3 + hono: 4.6.4 - '@hono/zod-openapi@0.16.4(hono@4.6.3)(zod@3.23.8)': + '@hono/zod-openapi@0.16.4(hono@4.6.4)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.3.0(hono@4.6.3)(zod@3.23.8) - hono: 4.6.3 + '@hono/zod-validator': 0.3.0(hono@4.6.4)(zod@3.23.8) + hono: 4.6.4 zod: 3.23.8 - '@hono/zod-validator@0.3.0(hono@4.6.3)(zod@3.23.8)': + '@hono/zod-validator@0.3.0(hono@4.6.4)(zod@3.23.8)': dependencies: - hono: 4.6.3 + hono: 4.6.4 zod: 3.23.8 '@humanfs/core@0.19.0': {} @@ -7148,17 +7148,17 @@ snapshots: '@rss3/api-core': 0.0.22 '@rss3/api-utils': 0.0.22 - '@scalar/hono-api-reference@0.5.153(hono@4.6.3)': + '@scalar/hono-api-reference@0.5.153(hono@4.6.4)': dependencies: '@scalar/types': 0.0.14 - hono: 4.6.3 + hono: 4.6.4 '@scalar/openapi-types@0.1.2': {} '@scalar/types@0.0.14': dependencies: '@scalar/openapi-types': 0.1.2 - '@unhead/schema': 1.11.8 + '@unhead/schema': 1.11.9 '@sec-ant/readable-stream@0.4.1': {} @@ -7458,7 +7458,7 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@unhead/schema@1.11.8': + '@unhead/schema@1.11.9': dependencies: hookable: 5.5.3 zhead: 2.2.4 @@ -7510,7 +7510,7 @@ snapshots: dependencies: tinyrainbow: 1.2.0 - '@vitest/pretty-format@2.1.2': + '@vitest/pretty-format@2.1.3': dependencies: tinyrainbow: 1.2.0 @@ -9140,7 +9140,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.3: {} + hono@4.6.4: {} hookable@5.5.3: {} @@ -11427,7 +11427,7 @@ snapshots: debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.8(@types/node@22.7.5) + vite: 5.4.9(@types/node@22.7.5) transitivePeerDependencies: - '@types/node' - less @@ -11439,18 +11439,18 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.8(@types/node@22.7.5)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.5)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.8(@types/node@22.7.5) + vite: 5.4.9(@types/node@22.7.5) transitivePeerDependencies: - supports-color - typescript - vite@5.4.8(@types/node@22.7.5): + vite@5.4.9(@types/node@22.7.5): dependencies: esbuild: 0.21.5 postcss: 8.4.47 @@ -11463,7 +11463,7 @@ snapshots: dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 - '@vitest/pretty-format': 2.1.2 + '@vitest/pretty-format': 2.1.3 '@vitest/runner': 2.0.5 '@vitest/snapshot': 2.0.5 '@vitest/spy': 2.0.5 @@ -11477,7 +11477,7 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.8(@types/node@22.7.5) + vite: 5.4.9(@types/node@22.7.5) vite-node: 2.0.5(@types/node@22.7.5) why-is-node-running: 2.3.0 optionalDependencies: From e4deee086f20a7d0c7550a6200a1b16c4578ac96 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Mon, 14 Oct 2024 23:18:02 +0800 Subject: [PATCH 133/740] feat(route): add route for skeb (#17047) * feat(route): add route for skeb * fix: wrap function call in map() to resolve ESLint warning * refactor: Enhance type safety and rename functions for Work and Creator processing * refactor: optimize followings API and caching logic * fix: remove request_key * fix: resolve request_key issues in works API - Fetch request_key from initial API response and cache it - Replace hardcoded User-Agent with config.ua * fix: misc improvements - Remove unnecessary InvalidParameterError checks and imports - Simplify route names by removing "Skeb" prefix - Set refresh to false in Skeb API cache - Fix typo in search.ts filename * fix: remove URL fragments from radar sources * refactor: Optimize category structure and enhance data processing - Remove 'request_masters' and 'first_requesters' categories as they are not creators - Implement template rendering for richer output - Enhance work data processing with audio handling - Improve creator data with commission status information * fix: add __dirname * fix: prevent potential function loop from unexpected API errors * Update lib/routes/skeb/works.ts Co-authored-by: Tony * fix: correct Skeb bearer token naming and references --------- --- lib/config.ts | 6 + lib/routes/skeb/following-creators.ts | 52 +++++++++ lib/routes/skeb/following-works.ts | 52 +++++++++ lib/routes/skeb/friend-works.ts | 52 +++++++++ lib/routes/skeb/index.ts | 131 ++++++++++++++++++++++ lib/routes/skeb/namespace.ts | 6 + lib/routes/skeb/search.ts | 77 +++++++++++++ lib/routes/skeb/templates/creator.art | 8 ++ lib/routes/skeb/templates/work.art | 10 ++ lib/routes/skeb/utils.ts | 155 ++++++++++++++++++++++++++ lib/routes/skeb/works.ts | 88 +++++++++++++++ 11 files changed, 637 insertions(+) create mode 100644 lib/routes/skeb/following-creators.ts create mode 100644 lib/routes/skeb/following-works.ts create mode 100644 lib/routes/skeb/friend-works.ts create mode 100644 lib/routes/skeb/index.ts create mode 100644 lib/routes/skeb/namespace.ts create mode 100644 lib/routes/skeb/search.ts create mode 100644 lib/routes/skeb/templates/creator.art create mode 100644 lib/routes/skeb/templates/work.art create mode 100644 lib/routes/skeb/utils.ts create mode 100644 lib/routes/skeb/works.ts diff --git a/lib/config.ts b/lib/config.ts index e2e0e162f8794f5..eaf103dddb8f0d7 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -266,6 +266,9 @@ export type Config = { scihub: { host?: string; }; + skeb: { + bearerToken?: string; + }; spotify: { clientId?: string; clientSecret?: string; @@ -655,6 +658,9 @@ const calculateValue = () => { scihub: { host: envs.SCIHUB_HOST || 'https://sci-hub.se/', }, + skeb: { + bearerToken: envs.SKEB_BEARER_TOKEN, + }, spotify: { clientId: envs.SPOTIFY_CLIENT_ID, clientSecret: envs.SPOTIFY_CLIENT_SECRET, diff --git a/lib/routes/skeb/following-creators.ts b/lib/routes/skeb/following-creators.ts new file mode 100644 index 000000000000000..ac1f7840c2750d9 --- /dev/null +++ b/lib/routes/skeb/following-creators.ts @@ -0,0 +1,52 @@ +import { Data, DataItem, Route } from '@/types'; +import { config } from '@/config'; +import ConfigNotFoundError from '@/errors/types/config-not-found'; +import { getFollowingsItems } from './utils'; + +export const route: Route = { + path: '/following_creators/:username', + categories: ['picture'], + example: '/following_creators/@brm2_1925', + parameters: { username: 'Skeb Username with @' }, + features: { + requireConfig: [ + { + name: 'SKEB_BEARER_TOKEN', + optional: false, + description: '在瀏覽器開發者工具(F12)的主控台中輸入 `localStorage.getItem("token")` 獲取', + }, + ], + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Following Creators', + maintainers: ['SnowAgar25'], + handler, + radar: [ + { + title: 'Following Creators', + source: ['skeb.jp/:username'], + target: '/following_creators/:username', + }, + ], + description: 'Get the list of creators the specified user is following on Skeb.', +}; + +async function handler(ctx): Promise { + const username = ctx.req.param('username'); + + if (!config.skeb || !config.skeb.bearerToken) { + throw new ConfigNotFoundError('Skeb followings RSS is disabled due to the lack of relevant config'); + } + + const items = await getFollowingsItems(username, 'following_creators'); + + return { + title: `Skeb - ${username} - フォロー中のクリエイター`, + link: `https://skeb.jp/${username}`, + item: items as DataItem[], + }; +} diff --git a/lib/routes/skeb/following-works.ts b/lib/routes/skeb/following-works.ts new file mode 100644 index 000000000000000..227d31f9f4a1783 --- /dev/null +++ b/lib/routes/skeb/following-works.ts @@ -0,0 +1,52 @@ +import { Data, DataItem, Route } from '@/types'; +import { config } from '@/config'; +import ConfigNotFoundError from '@/errors/types/config-not-found'; +import { getFollowingsItems } from './utils'; + +export const route: Route = { + path: '/following_works/:username', + categories: ['picture'], + example: '/following_works/@brm2_1925', + parameters: { username: 'Skeb Username with @' }, + features: { + requireConfig: [ + { + name: 'SKEB_BEARER_TOKEN', + optional: false, + description: '在瀏覽器開發者工具(F12)的主控台中輸入 `localStorage.getItem("token")` 獲取', + }, + ], + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Following Works', + maintainers: ['SnowAgar25'], + handler, + radar: [ + { + title: 'Following Works', + source: ['skeb.jp/:username'], + target: '/following_works/:username', + }, + ], + description: "Get the latest works for the specified user's followings on Skeb.", +}; + +async function handler(ctx): Promise { + const username = ctx.req.param('username'); + + if (!config.skeb || !config.skeb.bearerToken) { + throw new ConfigNotFoundError('Skeb followings RSS is disabled due to the lack of relevant config'); + } + + const items = await getFollowingsItems(username, 'following_works'); + + return { + title: `Skeb - ${username} - フォロー中のクリエイターの新着作品`, + link: `https://skeb.jp/${username}`, + item: items as DataItem[], + }; +} diff --git a/lib/routes/skeb/friend-works.ts b/lib/routes/skeb/friend-works.ts new file mode 100644 index 000000000000000..43d22528e0b3e87 --- /dev/null +++ b/lib/routes/skeb/friend-works.ts @@ -0,0 +1,52 @@ +import { Data, DataItem, Route } from '@/types'; +import { config } from '@/config'; +import ConfigNotFoundError from '@/errors/types/config-not-found'; +import { getFollowingsItems } from './utils'; + +export const route: Route = { + path: '/friend_works/:username', + categories: ['picture'], + example: '/friend_works/@brm2_1925', + parameters: { username: 'Skeb Username with @' }, + features: { + requireConfig: [ + { + name: 'SKEB_BEARER_TOKEN', + optional: false, + description: '在瀏覽器開發者工具(F12)的主控台中輸入 `localStorage.getItem("token")` 獲取', + }, + ], + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Friend Works', + maintainers: ['SnowAgar25'], + handler, + radar: [ + { + title: 'Friend Works', + source: ['skeb.jp/:username'], + target: '/friend_works/:username', + }, + ], + description: "Get the latest requests for the specified user's followings on Skeb.", +}; + +async function handler(ctx): Promise { + const username = ctx.req.param('username'); + + if (!config.skeb || !config.skeb.bearerToken) { + throw new ConfigNotFoundError('Skeb followings RSS is disabled due to the lack of relevant config'); + } + + const items = await getFollowingsItems(username, 'friend_works'); + + return { + title: `Skeb - ${username} - フォロー中のクライアントの新着リクエスト`, + link: `https://skeb.jp/${username}`, + item: items as DataItem[], + }; +} diff --git a/lib/routes/skeb/index.ts b/lib/routes/skeb/index.ts new file mode 100644 index 000000000000000..24420fe9fd4ea17 --- /dev/null +++ b/lib/routes/skeb/index.ts @@ -0,0 +1,131 @@ +import { Route, Data, DataItem } from '@/types'; +import ofetch from '@/utils/ofetch'; +import cache from '@/utils/cache'; +import { baseUrl, processWork, processCreator } from './utils'; +import { config } from '@/config'; + +const categoryMap = { + // Works categories + new_art_works: '新着作品 (Illust)', + new_voice_works: '新着作品 (Voice)', + new_novel_works: '新着作品 (Novel)', + new_video_works: '新着作品 (Video)', + new_music_works: '新着作品 (Music)', + new_correction_works: '新着作品 (Advice)', + new_comic_works: '新着作品 (Comic)', + popular_works: '人気の作品 (Popular)', + // Creators categories + popular_creators: '人気クリエイター', + new_creators: '新着クリエイター', +}; + +const workCategories = new Set(['new_art_works', 'new_voice_works', 'new_novel_works', 'new_video_works', 'new_music_works', 'new_correction_works', 'new_comic_works', 'popular_works']); + +export const route: Route = { + path: '/:category', + categories: ['picture'], + example: '/new_art_works', + parameters: { category: 'Category, the div id of the section title on the homepage. Default is new_art_works' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Skeb', + maintainers: ['SnowAgar25'], + handler, + radar: [ + { + title: '新着作品 (Illust)', + source: ['skeb.jp'], + target: '/new_art_works', + }, + { + title: '新着作品 (Voice)', + source: ['skeb.jp'], + target: '/new_voice_works', + }, + { + title: '新着作品 (Novel)', + source: ['skeb.jp'], + target: '/new_novel_works', + }, + { + title: '新着作品 (Video)', + source: ['skeb.jp'], + target: '/new_video_works', + }, + { + title: '新着作品 (Music)', + source: ['skeb.jp'], + target: '/new_music_works', + }, + { + title: '新着作品 (Advice)', + source: ['skeb.jp'], + target: '/new_correction_works', + }, + { + title: '新着作品 (Comic)', + source: ['skeb.jp'], + target: '/new_comic_works', + }, + { + title: '人気の作品 (Popular)', + source: ['skeb.jp'], + target: '/popular_works', + }, + { + title: '人気クリエイター', + source: ['skeb.jp'], + target: '/popular_creators', + }, + { + title: '新着クリエイター', + source: ['skeb.jp'], + target: '/new_creators', + }, + ], +}; + +async function handler(ctx): Promise { + const category = ctx.req.param('category') || 'new_art_works'; + + if (!(category in categoryMap)) { + throw new Error('Invalid category'); + } + + const url = `${baseUrl}/api`; + + const apiData = await cache.tryGet( + url, + async () => { + const data = await ofetch(url); + return data; + }, + config.cache.routeExpire, + false + ); + + if (!apiData || typeof apiData !== 'object') { + throw new Error('Invalid data received from API'); + } + + const items = await cache.tryGet(category, async () => { + if (!(category in apiData) || !Array.isArray(apiData[category])) { + return []; + } + + const processItem = workCategories.has(category) ? processWork : processCreator; + return (await Promise.all(apiData[category].map(async (item) => await processItem(item)).filter(Boolean))) as DataItem[]; + }); + + return { + title: `Skeb - ${categoryMap[category]}`, + link: `${baseUrl}/#${category}`, + item: items as DataItem[], + }; +} diff --git a/lib/routes/skeb/namespace.ts b/lib/routes/skeb/namespace.ts new file mode 100644 index 000000000000000..90499f96e4ab5fb --- /dev/null +++ b/lib/routes/skeb/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Skeb', + url: 'skeb.jp', +}; diff --git a/lib/routes/skeb/search.ts b/lib/routes/skeb/search.ts new file mode 100644 index 000000000000000..c2a8300f26b10f3 --- /dev/null +++ b/lib/routes/skeb/search.ts @@ -0,0 +1,77 @@ +import { Data, DataItem, Route } from '@/types'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { processWork, baseUrl } from './utils'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; + +export const route: Route = { + path: '/search/:keyword', + categories: ['picture'], + example: '/search/初音ミク', + parameters: { keyword: 'Search keyword' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Search Results', + maintainers: ['SnowAgar25'], + handler, + description: 'Get the search results for works on Skeb', +}; + +async function handler(ctx): Promise { + const keyword = ctx.req.param('keyword'); + + if (!keyword) { + throw new InvalidParameterError('Invalid search keyword'); + } + + const url = 'https://hb1jt3kre9-dsn.algolia.net/1/indexes/*/queries'; + + const items = await cache.tryGet(`skeb:search:${keyword}`, async () => { + const data = await ofetch(url, { + method: 'POST', + headers: { + 'x-algolia-application-id': 'HB1JT3KRE9', + 'x-algolia-api-key': '9a4ce7d609e71bf29e977925e4c6740c', + }, + body: { + requests: [ + { + indexName: 'User', + query: keyword, + params: 'hitsPerPage=40', + filters: 'genres:art OR genres:comic OR genres:voice OR genres:novel OR genres:video OR genres:music OR genres:correction', + }, + { + indexName: 'Request', + query: keyword, + params: 'hitsPerPage=40&filters=genre%3Aart%20OR%20genre%3Acomic%20OR%20genre%3Avoice%20OR%20genre%3Anovel%20OR%20genre%3Avideo%20OR%20genre%3Amusic%20OR%20genre%3Acorrection', + }, + ], + }, + }); + + if (!data || !data.results || !Array.isArray(data.results) || data.results.length < 2) { + throw new Error('Invalid data received from API'); + } + + const works = data.results[1].hits; + + if (!Array.isArray(works)) { + throw new TypeError('Invalid hits data received from API'); + } + + return works.map((item) => processWork(item)).filter(Boolean); + }); + + return { + title: `Skeb - Search Results for "${keyword}"`, + link: `${baseUrl}/search?q=${encodeURIComponent(keyword)}`, + item: items as DataItem[], + }; +} diff --git a/lib/routes/skeb/templates/creator.art b/lib/routes/skeb/templates/creator.art new file mode 100644 index 000000000000000..bb64c9a1b962c68 --- /dev/null +++ b/lib/routes/skeb/templates/creator.art @@ -0,0 +1,8 @@ +{{ 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 new file mode 100644 index 000000000000000..6c0903453d75844 --- /dev/null +++ b/lib/routes/skeb/templates/work.art @@ -0,0 +1,10 @@ +{{ if imageUrl }} +
    +{{ /if }} +{{ if audioUrl }} +
    +{{ /if }} +{{ body }} diff --git a/lib/routes/skeb/utils.ts b/lib/routes/skeb/utils.ts new file mode 100644 index 000000000000000..bb8275ed2c65654 --- /dev/null +++ b/lib/routes/skeb/utils.ts @@ -0,0 +1,155 @@ +import { config } from '@/config'; +import { DataItem } from '@/types'; +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'; + +interface Work { + path: string; + private_thumbnail_image_urls: null | string; + private: boolean; + genre: string; + tipped: boolean; + creator_id: number; + client_id: number; + vtt_url: null | string; + thumbnail_image_urls: { + src: string; + srcset: string; + }; + preview_url: null | string; + duration: null | number; + nsfw: boolean; + hardcore: boolean; + consored_thumbnail_image_urls: { + src: string; + srcset: string; + }; + body: string; + nc: number; + word_count: number; + transcoder: string; + creator_acceptable_same_genre: boolean; +} + +interface Creator { + id: number; + creator: boolean; + nsfw_acceptable: boolean; + acceptable: boolean; + name: string; + screen_name: string; + avatar_url: string; + header_url: string | null; + appeal_receivable: boolean; + popular_creator_rank: number | null; + request_master_rank: number | null; + first_requester_rank: number | null; + deleted_at: string | null; + tip_acceptable_by: string; + accept_expiration_days: number; + skills: { genre: string }[]; + nc: number; +} + +export function processWork(work: Work): DataItem | null { + if (!work || typeof work !== 'object' || work.private === true) { + return null; + } + + const imageUrl = work.thumbnail_image_urls?.srcset?.split(',').pop()?.trim().split(' ')[0] || ''; + const body = work.body || ''; + + const audioUrl = work.genre === 'music' || work.genre === 'voice' ? work.preview_url : null; + + const renderedHtml = art(path.join(__dirname, 'templates/work.art'), { + imageUrl, + body, + audioUrl, + }); + + return { + title: work.path || '', + link: `${baseUrl}${work.path || ''}`, + description: renderedHtml, + }; +} + +const skillMap = { + art: 'Illust', + voice: 'Voice', + novel: 'Novel', + video: 'Video', + music: 'Music', + correction: 'Advice', + comic: 'Comic', +}; + +export function processCreator(creator: Creator): DataItem | null { + if (!creator || typeof creator !== 'object') { + return null; + } + + const avatarUrl = creator.avatar_url || ''; + + let renderedHtml; + + if (creator.creator) { + const acceptingCommissions = creator.acceptable ? 'Yes' : 'No'; + const nsfwAcceptable = creator.nsfw_acceptable ? 'Yes' : 'No'; + + let skills = ''; + if (Array.isArray(creator.skills) && creator.skills.length > 0) { + skills = creator.skills + .map((skill) => skillMap[skill.genre] || skill.genre) + .filter(Boolean) + .join(', '); + } + + renderedHtml = art(path.join(__dirname, 'templates/creator.art'), { + avatarUrl, + acceptingCommissions, + nsfwAcceptable, + skills, + }); + } + + return { + title: creator.name || '', + link: `${baseUrl}/@${creator.screen_name || ''}`, + description: renderedHtml, + }; +} + +export async function getFollowingsItems(username: string, path: 'friend_works' | 'following_works' | 'following_creators'): Promise { + const url = `${baseUrl}/api/users/${username.replace('@', '')}/followings`; + + const followings_data = await cache.tryGet( + `skeb:followings_data:${username}`, + async () => { + const data = await ofetch(url, { + headers: { + Authorization: `Bearer ${config.skeb.bearerToken}`, + }, + }); + return data; + }, + config.cache.routeExpire, + false + ); + + if (!followings_data || typeof followings_data !== 'object') { + throw new Error('Failed to fetch followings data'); + } + + if (path === 'following_creators') { + return followings_data[path].map((item) => processCreator(item)).filter(Boolean) as DataItem[]; + } + return followings_data[path].map((item) => processWork(item)).filter(Boolean) as DataItem[]; +} diff --git a/lib/routes/skeb/works.ts b/lib/routes/skeb/works.ts new file mode 100644 index 000000000000000..6c80a85596d79e2 --- /dev/null +++ b/lib/routes/skeb/works.ts @@ -0,0 +1,88 @@ +import { Data, DataItem, Route } from '@/types'; +import { config } from '@/config'; +import ConfigNotFoundError from '@/errors/types/config-not-found'; +import { baseUrl, processWork } from './utils'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/works/:username', + categories: ['picture'], + example: '/works/@brm2_1925', + parameters: { username: 'Skeb Username with @' }, + features: { + requireConfig: [ + { + name: 'SKEB_BEARER_TOKEN', + optional: false, + description: '在瀏覽器開發者工具(F12)的主控台中輸入 `localStorage.getItem("token")` 獲取', + }, + ], + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Creator Works', + maintainers: ['SnowAgar25'], + handler, + radar: [ + { + title: 'Creator Works', + source: ['skeb.jp/:username'], + target: '/works/:username', + }, + ], + description: 'Get the latest works of a specific creator on Skeb', +}; + +async function handler(ctx): Promise { + const username = ctx.req.param('username'); + + if (!config.skeb || !config.skeb.bearerToken) { + throw new ConfigNotFoundError('Skeb works RSS is disabled due to the lack of relevant config'); + } + + const url = `${baseUrl}/api/users/${username.replace('@', '')}/works`; + + const items = await cache.tryGet(url, async () => { + const fetchData = async (retryCount = 0, maxRetries = 3) => { + const data = await ofetch(url, { + retry: 0, + method: 'GET', + query: { role: 'creator', sort: 'date', offset: '0' }, + headers: { + 'User-Agent': config.ua, + Cookie: `request_key=${cache.get('skeb:request_key')}`, + Authorization: `Bearer ${config.skeb.bearerToken}`, + }, + }).catch((error) => { + if (retryCount >= maxRetries) { + throw new Error('Max retries reached'); + } + const newRequestKey = error.response?._data?.match(/request_key=(.*?);/)?.[1]; + if (newRequestKey) { + cache.set('skeb:request_key', newRequestKey); + return fetchData(retryCount + 1, maxRetries); + } + throw error; + }); + return data; + }; + + const data = await fetchData(); + + if (!data || !Array.isArray(data)) { + throw new Error('Invalid data received from API'); + } + + return data.map((item) => processWork(item)).filter(Boolean); + }); + + return { + title: `Skeb - ${username}'s Works`, + link: `${baseUrl}/${username}`, + item: items as DataItem[], + }; +} From b3d8bc861d809f73bdc65b8f8752d4e0007bc273 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 15 Oct 2024 00:37:05 +0800 Subject: [PATCH 134/740] feat: extract content (#17099) * feat: extract content * chore: update * cache.tryGet * fix: cache whole item --------- --- lib/routes/rsshub/transform/html.ts | 182 ++++++++++++++++------------ 1 file changed, 107 insertions(+), 75 deletions(-) diff --git a/lib/routes/rsshub/transform/html.ts b/lib/routes/rsshub/transform/html.ts index d63c73782c24b14..55b897cbeb6d9be 100644 --- a/lib/routes/rsshub/transform/html.ts +++ b/lib/routes/rsshub/transform/html.ts @@ -1,8 +1,10 @@ -import { Route } from '@/types'; +import { DataItem, Route } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; +import sanitizeHtml from 'sanitize-html'; +import cache from '@/utils/cache'; export const route: Route = { path: '/transform/html/:url/:routeParams', @@ -23,24 +25,24 @@ export const route: Route = { supportScihub: false, }, name: 'Transformation - HTML', - maintainers: ['ttttmr'], - handler, + maintainers: ['ttttmr', 'hyoban'], description: `Pass URL and transformation rules to convert HTML/JSON into RSS. Specify options (in the format of query string) in parameter \`routeParams\` parameter to extract data from HTML. -| Key | Meaning | Accepted Values | Default | -| ----------------- | -------------------------------------------------------------- | --------------- | ---------------------- | -| \`title\` | The title of the RSS | \`string\` | Extract from \`\` | -| \`item\` | The HTML elements as \`item\` using CSS selector | \`string\` | html | -| \`itemTitle\` | The HTML elements as \`title\` in \`item\` using CSS selector | \`string\` | \`item\` element | -| \`itemTitleAttr\` | The attributes of \`title\` element as title | \`string\` | Element text | -| \`itemLink\` | The HTML elements as \`link\` in \`item\` using CSS selector | \`string\` | \`item\` element | -| \`itemLinkAttr\` | The attributes of \`link\` element as link | \`string\` | \`href\` | -| \`itemDesc\` | The HTML elements as \`descrption\` in \`item\` using CSS selector | \`string\` | \`item\` element | -| \`itemDescAttr\` | The attributes of \`descrption\` element as description | \`string\` | Element html | -| \`itemPubDate\` | The HTML elements as \`pubDate\` in \`item\` using CSS selector | \`string\` | \`item\` element | -| \`itemPubDateAttr\` | The attributes of \`pubDate\` element as pubDate | \`string\` | Element html | +| Key | Meaning | Accepted Values | Default | +| ------------------- | ------------------------------------------------------------------------------------------------------------- | --------------- | ------------------------ | +| \`title\` | The title of the RSS | \`string\` | Extract from \`<title>\` | +| \`item\` | The HTML elements as \`item\` using CSS selector | \`string\` | html | +| \`itemTitle\` | The HTML elements as \`title\` in \`item\` using CSS selector | \`string\` | \`item\` element | +| \`itemTitleAttr\` | The attributes of \`title\` element as title | \`string\` | Element text | +| \`itemLink\` | The HTML elements as \`link\` in \`item\` using CSS selector | \`string\` | \`item\` element | +| \`itemLinkAttr\` | The attributes of \`link\` element as link | \`string\` | \`href\` | +| \`itemDesc\` | The HTML elements as \`descrption\` in \`item\` using CSS selector | \`string\` | \`item\` element | +| \`itemDescAttr\` | The attributes of \`descrption\` element as description | \`string\` | Element html | +| \`itemPubDate\` | The HTML elements as \`pubDate\` in \`item\` using CSS selector | \`string\` | \`item\` element | +| \`itemPubDateAttr\` | The attributes of \`pubDate\` element as pubDate | \`string\` | Element html | +| \`itemContent\` | The HTML elements as \`description\` in \`item\` using CSS selector ( in \`itemLink\` page for full content ) | \`string\` | | Parameters parsing in the above example: @@ -54,66 +56,96 @@ Specify options (in the format of query string) in parameter \`routeParams\` par | 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'.`); + } + const url = ctx.req.param('url'); + const response = await got({ + method: 'get', + url, + }); -async function handler(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'.`); - } - const url = ctx.req.param('url'); - const response = await got({ - method: 'get', - url, - }); - - const routeParams = new URLSearchParams(ctx.req.param('routeParams')); - const $ = load(response.data); - const rssTitle = routeParams.get('title') || $('title').text(); - const item = routeParams.get('item') || 'html'; - const items = $(item) - .toArray() - .map((item) => { - try { - item = $(item); - - const titleEle = routeParams.get('itemTitle') ? item.find(routeParams.get('itemTitle')) : item; - const title = routeParams.get('itemTitleAttr') ? titleEle.attr(routeParams.get('itemTitleAttr')) : titleEle.text(); - - let link; - const linkEle = routeParams.get('itemLink') ? item.find(routeParams.get('itemLink')) : item; - if (routeParams.get('itemLinkAttr')) { - link = linkEle.attr(routeParams.get('itemLinkAttr')); - } else { - link = linkEle.is('a') ? linkEle.attr('href') : linkEle.find('a').attr('href'); - } - // 补全绝对链接 - link = link.trim(); - if (link && !link.startsWith('http')) { - link = `${new URL(url).origin}${link}`; + const routeParams = new URLSearchParams(ctx.req.param('routeParams')); + const $ = load(response.data); + const rssTitle = routeParams.get('title') || $('title').text(); + const item = routeParams.get('item') || 'html'; + let items: DataItem[] = $(item) + .toArray() + .map((item) => { + try { + item = $(item); + + const titleEle = routeParams.get('itemTitle') ? item.find(routeParams.get('itemTitle')) : item; + const title = routeParams.get('itemTitleAttr') ? titleEle.attr(routeParams.get('itemTitleAttr')) : titleEle.text(); + + let link; + const linkEle = routeParams.get('itemLink') ? item.find(routeParams.get('itemLink')) : item; + if (routeParams.get('itemLinkAttr')) { + link = linkEle.attr(routeParams.get('itemLinkAttr')); + } else { + link = linkEle.is('a') ? linkEle.attr('href') : linkEle.find('a').attr('href'); + } + // 补全绝对链接 + link = link.trim(); + if (link && !link.startsWith('http')) { + link = `${new URL(url).origin}${link}`; + } + + const descEle = routeParams.get('itemDesc') ? item.find(routeParams.get('itemDesc')) : item; + const desc = routeParams.get('itemDescAttr') ? descEle.attr(routeParams.get('itemDescAttr')) : descEle.html(); + + const pubDateEle = routeParams.get('itemPubDate') ? item.find(routeParams.get('itemPubDate')) : item; + const pubDate = routeParams.get('itemPubDateAttr') ? pubDateEle.attr(routeParams.get('itemPubDateAttr')) : pubDateEle.html(); + + return { + title, + link, + description: desc, + pubDate, + }; + } catch { + return null; } + }) + .filter((i) => !!i); - const descEle = routeParams.get('itemDesc') ? item.find(routeParams.get('itemDesc')) : item; - const desc = routeParams.get('itemDescAttr') ? descEle.attr(routeParams.get('itemDescAttr')) : descEle.html(); - - const pubDateEle = routeParams.get('itemPubDate') ? item.find(routeParams.get('itemPubDate')) : item; - const pubDate = routeParams.get('itemPubDateAttr') ? pubDateEle.attr(routeParams.get('itemPubDateAttr')) : pubDateEle.html(); - - return { - title, - link, - description: desc, - pubDate, - }; - } catch { - return null; - } - }) - .filter(Boolean); - - return { - title: rssTitle, - link: url, - description: `Proxy ${url}`, - item: items, - }; -} + const itemContentSelector = routeParams.get('itemContent'); + if (itemContentSelector) { + items = await Promise.all( + items.map((item) => { + if (!item.link) { + return item; + } + + return cache.tryGet(item.link, async () => { + const response = await got({ + method: 'get', + url: item.link, + }); + if (!response || typeof response === 'string') { + return item; + } + + const $ = load(response.data); + const content = $(itemContentSelector).html(); + if (!content) { + return item; + } + + item.description = sanitizeHtml(content, { allowedTags: [...sanitizeHtml.defaults.allowedTags, 'img'] }); + + return item; + }); + }) + ); + } + + return { + title: rssTitle, + link: url, + description: `Proxy ${url}`, + item: items, + }; + }, +}; From 74f9863a1944dc1f3a1e346e9ad8f3d0847bcd6e Mon Sep 17 00:00:00 2001 From: Yun Du <27944418+Muyun99@users.noreply.github.com> Date: Tue, 15 Oct 2024 01:40:56 +0800 Subject: [PATCH 135/740] fix(route): add cool paper Robotics RSS and fix kimi url (#17132) --- lib/routes/papers/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/routes/papers/index.ts b/lib/routes/papers/index.ts index 47cb03656e425ed..ead2927feb3098a 100644 --- a/lib/routes/papers/index.ts +++ b/lib/routes/papers/index.ts @@ -20,7 +20,7 @@ export const handler = async (ctx) => { const feedUrl = new URL(`${category}/feed`, rootUrl).href; const site = category.split(/\//)[0]; - const apiKimiUrl = new URL(`${site}/kimi/`, rootUrl).href; + const apiKimiUrl = new URL(`${site}/kimi?paper=`, rootUrl).href; const feed = await parser.parseURL(feedUrl); @@ -91,6 +91,7 @@ export const route: Route = { | 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'], @@ -124,5 +125,10 @@ export const route: Route = { source: ['papers.cool/arxiv/cs.LG'], target: '/arxiv/cs.LG', }, + { + title: 'arXiv Robotics (cs.RO)', + source: ['papers.cool/arxiv/cs.RO'], + target: '/arxiv/cs.RO', + }, ], }; From e953515cd2ee58a4edd29a45a4a084642701f807 Mon Sep 17 00:00:00 2001 From: Mas0nShi <60805843+Mas0nShi@users.noreply.github.com> Date: Tue, 15 Oct 2024 02:24:36 +0800 Subject: [PATCH 136/740] refactor(route/hex-rays): update data acquisition method (#17130) This commit refactors the data acquisition method in the hex-rays route. It adds type annotations for the Data, DataItem, and Route types. It also imports the Context type from the hono library. The maintainers list is updated to include Mas0n. The handler function now takes a Context parameter and returns a Promise<Data>. The link to fetch data is updated to 'https://hex-rays.com/blog/'. The parsing logic for the list of articles is modified to use the correct selectors. The category and description properties of each article are updated to match the new HTML structure. The image property is added to the returned data object. --- lib/routes/hex-rays/index.ts | 52 ++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 29 deletions(-) diff --git a/lib/routes/hex-rays/index.ts b/lib/routes/hex-rays/index.ts index b2dd027233dfa31..3644c57ede99281 100644 --- a/lib/routes/hex-rays/index.ts +++ b/lib/routes/hex-rays/index.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import type { Data, DataItem, Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -23,51 +23,45 @@ export const route: Route = { }, ], name: 'Hex-Rays News', - maintainers: ['hellodword ', 'TonyRL'], + maintainers: ['hellodword ', 'TonyRL', 'Mas0n'], handler, url: 'hex-rays.com/', }; -async function handler() { - const link = 'https://www.hex-rays.com/blog/'; +async function handler(/* ctx*/): Promise<Data> { + const link = 'https://hex-rays.com/blog/'; const response = await got.get(link); const $ = load(response.data); - const list = $('.post-list-container') - .map((_, ele) => ({ - title: $('h3 > a', ele).text(), - link: $('h3 > a', ele).attr('href'), - pubDate: parseDate($('.post-meta:nth-of-type(1)', ele).first().text().trim().replace('Posted on:', '')), - author: $('.post-meta:nth-of-type(2)', ele).first().text().replace('By:', '').trim(), - })) - .get(); + const list: DataItem[] = $('.article ') + .toArray() + .map( + (ele): DataItem => ({ + title: $('h2 > a', ele).text(), + link: $('h2 > a', ele).attr('href'), + pubDate: parseDate($('div.by-line > time', ele).attr('datetime')!), + author: $('div.by-line > a', ele).text(), + }) + ); - const items = await Promise.all( - list.map((item) => - cache.tryGet(item.link, async () => { + const items: DataItem[] = await Promise.all( + list.map((item: DataItem) => + cache.tryGet(item.link!, async () => { const detailResponse = await got.get(item.link); const content = load(detailResponse.data); - - item.category = ( - content('.category-link') - .toArray() - .map((e) => $(e).text()) + - ',' + - content('.tag-link') - .toArray() - .map((e) => $(e).text()) - ).split(','); - - item.description = content('.post-content').html(); - + item.category = content('.div.topics > a') + .toArray() + .map((ele) => content(ele).text()); + item.description = content('.post-body').toString(); return item; }) - ) + ) as Promise<DataItem>[] ); return { title: 'Hex-Rays Blog', link, item: items, + image: 'https://hex-rays.com/hubfs/Ico-logo.png', }; } From bf66164260dcbf5db15a28cd305c9ac579bc9926 Mon Sep 17 00:00:00 2001 From: "xxx.Yan" <14977542+AntiKnot@users.noreply.github.com> Date: Tue, 15 Oct 2024 02:36:17 +0800 Subject: [PATCH 137/740] fix(route/parliament.uk): page link and items selector (#17129) * chore(route): add nytimes popular routes * fix(route/parliament.uk): fix return link * fix(route/parliament.uk): fix items selector --------- --- lib/routes/parliament.uk/commonslibrary.ts | 8 ++++---- lib/routes/parliament.uk/lordslibrary.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/routes/parliament.uk/commonslibrary.ts b/lib/routes/parliament.uk/commonslibrary.ts index 957a297d5ece4dc..5be6eb7036b42ec 100644 --- a/lib/routes/parliament.uk/commonslibrary.ts +++ b/lib/routes/parliament.uk/commonslibrary.ts @@ -23,8 +23,8 @@ export const route: Route = { async function handler(ctx) { const { topic } = ctx.req.param(); - const baseUrl = 'https://commonslibrary.parliament.uk/type'; - const url = `${baseUrl}/${topic}/`; + const baseUrl = 'https://commonslibrary.parliament.uk'; + const url = `${baseUrl}/type/${topic}/`; const browser = await puppeteer(); const page = await browser.newPage(); await page.setRequestInterception(true); @@ -38,7 +38,7 @@ async function handler(ctx) { const html = await page.evaluate(() => document.documentElement.innerHTML); await page.close(); const $ = load(html); - const items = $('article.card--horizontal') + const items = $('div.l-box.l-box--no-border.card__text') .map((_, article) => ({ title: $(article).find('.card__text a').text().trim(), link: $(article).find('.card__text a').attr('href'), @@ -49,7 +49,7 @@ async function handler(ctx) { browser.close(); return { title: `parliament - lordslibrary - ${topic}`, - link: baseUrl, + link: url, item: items, }; } diff --git a/lib/routes/parliament.uk/lordslibrary.ts b/lib/routes/parliament.uk/lordslibrary.ts index e2d07f1cadac004..002185021fe65a5 100644 --- a/lib/routes/parliament.uk/lordslibrary.ts +++ b/lib/routes/parliament.uk/lordslibrary.ts @@ -23,8 +23,8 @@ export const route: Route = { async function handler(ctx) { const { topic } = ctx.req.param(); - const baseUrl = 'https://lordslibrary.parliament.uk/type'; - const url = `${baseUrl}/${topic}/`; + const baseUrl = 'https://lordslibrary.parliament.uk'; + const url = `${baseUrl}/type/${topic}/`; const browser = await puppeteer(); const page = await browser.newPage(); await page.setRequestInterception(true); @@ -38,7 +38,7 @@ async function handler(ctx) { const html = await page.evaluate(() => document.documentElement.innerHTML); await page.close(); const $ = load(html); - const items = $('article.card--horizontal') + const items = $('div.l-box.l-box--no-border.card__text') .map((_, article) => ({ title: $(article).find('.card__text a').text().trim(), link: $(article).find('.card__text a').attr('href'), @@ -49,7 +49,7 @@ async function handler(ctx) { browser.close(); return { title: `parliament - lordslibrary - ${topic}`, - link: baseUrl, + link: url, item: items, }; } From 2de569b4d2f0c83ffdd4334b04f51950481242e4 Mon Sep 17 00:00:00 2001 From: DIYgod <i@diygod.me> Date: Tue, 15 Oct 2024 16:41:55 +0800 Subject: [PATCH 138/740] feat(twitter): limit remainingInt to 2 --- lib/routes/twitter/api/web-api/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index b656924675f1ed5..046f973753eca22 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -154,10 +154,11 @@ export const twitterGot = async ( dispatcher: dispatchers?.agent, onResponse: async ({ response }) => { const remaining = response.headers.get('x-rate-limit-remaining'); + const remainingInt = Number.parseInt(remaining || '0'); const reset = response.headers.get('x-rate-limit-reset'); logger.debug(`twitter debug: twitter rate limit remaining for token ${auth?.token} is ${remaining} and reset at ${reset}`); if (auth) { - if (remaining === '0' && reset) { + if (remaining && remainingInt < 2 && reset) { const resetTime = new Date(Number.parseInt(reset) * 1000); const delay = (resetTime.getTime() - Date.now()) / 1000; logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}, will unlock after ${delay}s`); From bf2e71ce80e20f2111998e77bc8ea8e98e5e15b8 Mon Sep 17 00:00:00 2001 From: DIYgod <i@diygod.me> Date: Tue, 15 Oct 2024 20:11:41 +0800 Subject: [PATCH 139/740] fix(twitter): cache unlock --- lib/routes/twitter/api/web-api/utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 046f973753eca22..b9331440ec74dd2 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -197,6 +197,9 @@ export const twitterGot = async ( logger.debug(`twitter debug: delete twitter cookie for token ${auth.token} with status ${response.status}, remaining tokens: ${config.twitter.authToken?.length}`); await cache.set(`${lockPrefix}${auth.token}`, '1', 86400); } + } else { + logger.debug(`twitter debug: unlock twitter cookie with success for token ${auth.token}`); + await cache.set(`${lockPrefix}${auth.token}`, '', 1); } } }, @@ -205,8 +208,6 @@ export const twitterGot = async ( if (auth?.token) { logger.debug(`twitter debug: update twitter cookie for token ${auth.token}`); await cache.set(`twitter:cookie:${auth.token}`, JSON.stringify(dispatchers?.jar.serializeSync()), config.cache.contentExpire); - logger.debug(`twitter debug: unlock twitter cookie with success for token ${auth.token}`); - await cache.set(`${lockPrefix}${auth.token}`, '', 1); } return response._data; From 8b9ffecefae8f94ba9c910fcd4e014297c7628a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 05:44:18 -0700 Subject: [PATCH 140/740] chore(deps-dev): bump @typescript-eslint/parser from 8.8.1 to 8.9.0 (#17143) * chore(deps-dev): bump @typescript-eslint/parser from 8.8.1 to 8.9.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.8.1 to 8.9.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.9.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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 99 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 83 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 06caad10ba29f59..c922cdc3e0ceb09 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "@types/title": "3.4.3", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.8.1", - "@typescript-eslint/parser": "8.8.1", + "@typescript-eslint/parser": "8.9.0", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.101", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a7cd999e23a9ca..172f3e83228365a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -344,10 +344,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.8.1 - version: 8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3) + version: 8.8.1(@typescript-eslint/parser@8.9.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3) '@typescript-eslint/parser': - specifier: 8.8.1 - version: 8.8.1(eslint@9.12.0)(typescript@5.6.3) + specifier: 8.9.0 + version: 8.9.0(eslint@9.12.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.4 version: 0.27.4 @@ -1917,8 +1917,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.8.1': - resolution: {integrity: sha512-hQUVn2Lij2NAxVFEdvIGxT9gP1tq2yM83m+by3whWFsWC+1y8pxxxHUFE1UqDu2VsGi2i6RLcv4QvouM84U+ow==} + '@typescript-eslint/parser@8.9.0': + resolution: {integrity: sha512-U+BLn2rqTTHnc4FL3FJjxaXptTxmf9sNftJK62XLz4+GxG3hLHm/SUNaaXP5Y4uTiuYoL5YLy4JBCJe3+t8awQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1931,6 +1931,10 @@ packages: resolution: {integrity: sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.9.0': + resolution: {integrity: sha512-bZu9bUud9ym1cabmOYH9S6TnbWRzpklVmwqICeOulTCZ9ue2/pczWzQvt/cGj2r2o1RdKoZbuEMalJJSYw3pHQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.8.1': resolution: {integrity: sha512-qSVnpcbLP8CALORf0za+vjLYj1Wp8HSoiI8zYU5tHxRVj30702Z1Yw4cLwfNKhTPWp5+P+k1pjmD5Zd1nhxiZA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1944,6 +1948,10 @@ packages: resolution: {integrity: sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.9.0': + resolution: {integrity: sha512-SjgkvdYyt1FAPhU9c6FiYCXrldwYYlIQLkuc+LfAhCna6ggp96ACncdtlbn8FmnG72tUkXclrDExOpEYf1nfJQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.8.1': resolution: {integrity: sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1953,16 +1961,35 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.9.0': + resolution: {integrity: sha512-9iJYTgKLDG6+iqegehc5+EqE6sqaee7kb8vWpmHZ86EqwDjmlqNNHeqDVqb9duh+BY6WCNHfIGvuVU3Tf9Db0g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@8.8.1': resolution: {integrity: sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.9.0': + resolution: {integrity: sha512-PKgMmaSo/Yg/F7kIZvrgrWa1+Vwn036CdNUvYFEkYbPwOH4i8xvkaRlu148W3vtheWK9ckKRIz7PBP5oUlkrvQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@8.8.1': resolution: {integrity: sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.9.0': + resolution: {integrity: sha512-Ht4y38ubk4L5/U8xKUBfKNYGmvKvA1CANoxiTRMM+tOLk3lbF3DvzZCxJCRSE+2GdCMSh6zq9VZJc3asc1XuAA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -2756,8 +2783,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.36: - resolution: {integrity: sha512-HYTX8tKge/VNp6FGO+f/uVDmUkq+cEfcxYhKf15Akc4M5yxt5YmorwlAitKWjWhWQnKcDRBAQKXkhqqXMqcrjw==} + electron-to-chromium@1.5.38: + resolution: {integrity: sha512-VbeVexmZ1IFh+5EfrYz1I0HTzHVIlJa112UEWhciPyeOcKJGeTv6N8WnG4wsQB81DGCaVEGhpSb6o6a8WYFXXg==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -7205,7 +7232,7 @@ snapshots: '@stylistic/eslint-plugin@2.9.0(eslint@9.12.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.9.0(eslint@9.12.0)(typescript@5.6.3) eslint: 9.12.0 eslint-visitor-keys: 4.1.0 espree: 10.2.0 @@ -7375,10 +7402,10 @@ snapshots: '@types/node': 22.7.5 optional: true - '@typescript-eslint/eslint-plugin@8.8.1(@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.8.1(@typescript-eslint/parser@8.9.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.8.1(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.9.0(eslint@9.12.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.8.1 '@typescript-eslint/type-utils': 8.8.1(eslint@9.12.0)(typescript@5.6.3) '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.3) @@ -7393,12 +7420,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.8.1(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.9.0(eslint@9.12.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.8.1 - '@typescript-eslint/types': 8.8.1 - '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.8.1 + '@typescript-eslint/scope-manager': 8.9.0 + '@typescript-eslint/types': 8.9.0 + '@typescript-eslint/typescript-estree': 8.9.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.9.0 debug: 4.3.7 eslint: 9.12.0 optionalDependencies: @@ -7411,6 +7438,11 @@ snapshots: '@typescript-eslint/types': 8.8.1 '@typescript-eslint/visitor-keys': 8.8.1 + '@typescript-eslint/scope-manager@8.9.0': + dependencies: + '@typescript-eslint/types': 8.9.0 + '@typescript-eslint/visitor-keys': 8.9.0 + '@typescript-eslint/type-utils@8.8.1(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) @@ -7425,6 +7457,8 @@ snapshots: '@typescript-eslint/types@8.8.1': {} + '@typescript-eslint/types@8.9.0': {} + '@typescript-eslint/typescript-estree@8.8.1(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.8.1 @@ -7440,6 +7474,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.9.0(typescript@5.6.3)': + dependencies: + '@typescript-eslint/types': 8.9.0 + '@typescript-eslint/visitor-keys': 8.9.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.8.1(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) @@ -7451,11 +7500,27 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.9.0(eslint@9.12.0)(typescript@5.6.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) + '@typescript-eslint/scope-manager': 8.9.0 + '@typescript-eslint/types': 8.9.0 + '@typescript-eslint/typescript-estree': 8.9.0(typescript@5.6.3) + eslint: 9.12.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@8.8.1': dependencies: '@typescript-eslint/types': 8.8.1 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.9.0': + dependencies: + '@typescript-eslint/types': 8.9.0 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.9': @@ -7765,7 +7830,7 @@ snapshots: browserslist@4.24.0: dependencies: caniuse-lite: 1.0.30001668 - electron-to-chromium: 1.5.36 + electron-to-chromium: 1.5.38 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) @@ -8306,7 +8371,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.36: {} + electron-to-chromium@1.5.38: {} ellipsize@0.1.0: {} From 3dbe8c05d4f1b4dbfe24a4ad39fe943d10467538 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 15 Oct 2024 22:44:22 +0800 Subject: [PATCH 141/740] feat(route/transform): encoding option (#17136) * feat: encoding option * update --- lib/routes/rsshub/transform/html.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/routes/rsshub/transform/html.ts b/lib/routes/rsshub/transform/html.ts index 55b897cbeb6d9be..1084bf240df254a 100644 --- a/lib/routes/rsshub/transform/html.ts +++ b/lib/routes/rsshub/transform/html.ts @@ -43,6 +43,7 @@ Specify options (in the format of query string) in parameter \`routeParams\` par | \`itemPubDate\` | The HTML elements as \`pubDate\` in \`item\` using CSS selector | \`string\` | \`item\` element | | \`itemPubDateAttr\` | The attributes of \`pubDate\` element as pubDate | \`string\` | Element html | | \`itemContent\` | The HTML elements as \`description\` in \`item\` using CSS selector ( in \`itemLink\` page for full content ) | \`string\` | | +| \`encoding\` | The encoding of the HTML content | \`string\` | utf-8 | Parameters parsing in the above example: @@ -64,14 +65,19 @@ Specify options (in the format of query string) in parameter \`routeParams\` par const response = await got({ method: 'get', url, + responseType: 'arrayBuffer', }); const routeParams = new URLSearchParams(ctx.req.param('routeParams')); - const $ = load(response.data); + const encoding = routeParams.get('encoding') || 'utf-8'; + const decoder = new TextDecoder(encoding); + + const $ = load(decoder.decode(response.data)); const rssTitle = routeParams.get('title') || $('title').text(); const item = routeParams.get('item') || 'html'; let items: DataItem[] = $(item) .toArray() + .slice(0, 20) .map((item) => { try { item = $(item); @@ -122,12 +128,13 @@ Specify options (in the format of query string) in parameter \`routeParams\` par const response = await got({ method: 'get', url: item.link, + responseType: 'arrayBuffer', }); if (!response || typeof response === 'string') { return item; } - const $ = load(response.data); + const $ = load(decoder.decode(response.data)); const content = $(itemContentSelector).html(); if (!content) { return item; From 8b70a691d50ae4e6f5956eac4612dc76c2d6a19e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 22:46:39 +0800 Subject: [PATCH 142/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.8.1 to 8.9.0 (#17138) * chore(deps-dev): bump @typescript-eslint/eslint-plugin Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.8.1 to 8.9.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.9.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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 101 +++++++++---------------------------------------- 2 files changed, 19 insertions(+), 84 deletions(-) diff --git a/package.json b/package.json index c922cdc3e0ceb09..324e3a13c87ca79 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.8.1", + "@typescript-eslint/eslint-plugin": "8.9.0", "@typescript-eslint/parser": "8.9.0", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 172f3e83228365a..aa8dd1f36d2d193 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -343,8 +343,8 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.8.1 - version: 8.8.1(@typescript-eslint/parser@8.9.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3) + specifier: 8.9.0 + version: 8.9.0(@typescript-eslint/parser@8.9.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.9.0 version: 8.9.0(eslint@9.12.0)(typescript@5.6.3) @@ -1906,8 +1906,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.8.1': - resolution: {integrity: sha512-xfvdgA8AP/vxHgtgU310+WBnLB4uJQ9XdyP17RebG26rLtDrQJV3ZYrcopX91GrHmMoH8bdSwMRh2a//TiJ1jQ==} + '@typescript-eslint/eslint-plugin@8.9.0': + resolution: {integrity: sha512-Y1n621OCy4m7/vTXNlCbMVp87zSd7NH0L9cXD8aIpOaNlzeWxIK4+Q19A68gSmTNRZn92UjocVUWDthGxtqHFg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1927,16 +1927,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.8.1': - resolution: {integrity: sha512-X4JdU+66Mazev/J0gfXlcC/dV6JI37h+93W9BRYXrSn0hrE64IoWgVkO9MSJgEzoWkxONgaQpICWg8vAN74wlA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.9.0': resolution: {integrity: sha512-bZu9bUud9ym1cabmOYH9S6TnbWRzpklVmwqICeOulTCZ9ue2/pczWzQvt/cGj2r2o1RdKoZbuEMalJJSYw3pHQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.8.1': - resolution: {integrity: sha512-qSVnpcbLP8CALORf0za+vjLYj1Wp8HSoiI8zYU5tHxRVj30702Z1Yw4cLwfNKhTPWp5+P+k1pjmD5Zd1nhxiZA==} + '@typescript-eslint/type-utils@8.9.0': + resolution: {integrity: sha512-JD+/pCqlKqAk5961vxCluK+clkppHY07IbV3vett97KOV+8C6l+CPEPwpUuiMwgbOz/qrN3Ke4zzjqbT+ls+1Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1944,23 +1940,10 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.8.1': - resolution: {integrity: sha512-WCcTP4SDXzMd23N27u66zTKMuEevH4uzU8C9jf0RO4E04yVHgQgW+r+TeVTNnO1KIfrL8ebgVVYYMMO3+jC55Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.9.0': resolution: {integrity: sha512-SjgkvdYyt1FAPhU9c6FiYCXrldwYYlIQLkuc+LfAhCna6ggp96ACncdtlbn8FmnG72tUkXclrDExOpEYf1nfJQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.8.1': - resolution: {integrity: sha512-A5d1R9p+X+1js4JogdNilDuuq+EHZdsH9MjTVxXOdVFfTJXunKJR/v+fNNyO4TnoOn5HqobzfRlc70NC6HTcdg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.9.0': resolution: {integrity: sha512-9iJYTgKLDG6+iqegehc5+EqE6sqaee7kb8vWpmHZ86EqwDjmlqNNHeqDVqb9duh+BY6WCNHfIGvuVU3Tf9Db0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1970,22 +1953,12 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.8.1': - resolution: {integrity: sha512-/QkNJDbV0bdL7H7d0/y0qBbV2HTtf0TIyjSDTvvmQEzeVx8jEImEbLuOA4EsvE8gIgqMitns0ifb5uQhMj8d9w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.9.0': resolution: {integrity: sha512-PKgMmaSo/Yg/F7kIZvrgrWa1+Vwn036CdNUvYFEkYbPwOH4i8xvkaRlu148W3vtheWK9ckKRIz7PBP5oUlkrvQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.8.1': - resolution: {integrity: sha512-0/TdC3aeRAsW7MDvYRwEc1Uwm0TIBfzjPFgg60UU2Haj5qsCs9cc3zNgY71edqE3LbWfF/WoZQd3lJoDXFQpag==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.9.0': resolution: {integrity: sha512-Ht4y38ubk4L5/U8xKUBfKNYGmvKvA1CANoxiTRMM+tOLk3lbF3DvzZCxJCRSE+2GdCMSh6zq9VZJc3asc1XuAA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -5030,8 +5003,8 @@ packages: resolution: {integrity: sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==} engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} - sonic-boom@4.1.0: - resolution: {integrity: sha512-NGipjjRicyJJ03rPiZCJYjwlsuP2d1/5QUviozRXC7S3WdVWNK5e3Ojieb9CCyfhq2UC+3+SRd9nG3I2lPRvUw==} + sonic-boom@4.2.0: + resolution: {integrity: sha512-INb7TM37/mAcsGmc9hyyI6+QR3rR1zVRu36B0NeGXKnOOLiZOfER5SA+N7X7k3yUYRzLWafduTDvJAfDswwEww==} source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} @@ -7402,14 +7375,14 @@ snapshots: '@types/node': 22.7.5 optional: true - '@typescript-eslint/eslint-plugin@8.8.1(@typescript-eslint/parser@8.9.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.9.0(@typescript-eslint/parser@8.9.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 '@typescript-eslint/parser': 8.9.0(eslint@9.12.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.8.1 - '@typescript-eslint/type-utils': 8.8.1(eslint@9.12.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.8.1 + '@typescript-eslint/scope-manager': 8.9.0 + '@typescript-eslint/type-utils': 8.9.0(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.9.0(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.9.0 eslint: 9.12.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7433,20 +7406,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.8.1': - dependencies: - '@typescript-eslint/types': 8.8.1 - '@typescript-eslint/visitor-keys': 8.8.1 - '@typescript-eslint/scope-manager@8.9.0': dependencies: '@typescript-eslint/types': 8.9.0 '@typescript-eslint/visitor-keys': 8.9.0 - '@typescript-eslint/type-utils@8.8.1(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.9.0(eslint@9.12.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) - '@typescript-eslint/utils': 8.8.1(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.9.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.9.0(eslint@9.12.0)(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: @@ -7455,25 +7423,8 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@8.8.1': {} - '@typescript-eslint/types@8.9.0': {} - '@typescript-eslint/typescript-estree@8.8.1(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 8.8.1 - '@typescript-eslint/visitor-keys': 8.8.1 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.9.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.9.0 @@ -7489,17 +7440,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.8.1(eslint@9.12.0)(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) - '@typescript-eslint/scope-manager': 8.8.1 - '@typescript-eslint/types': 8.8.1 - '@typescript-eslint/typescript-estree': 8.8.1(typescript@5.6.3) - eslint: 9.12.0 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.9.0(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) @@ -7511,11 +7451,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.8.1': - dependencies: - '@typescript-eslint/types': 8.8.1 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.9.0': dependencies: '@typescript-eslint/types': 8.9.0 @@ -10450,7 +10385,7 @@ snapshots: quick-format-unescaped: 4.0.4 real-require: 0.2.0 safe-stable-stringify: 2.5.0 - sonic-boom: 4.1.0 + sonic-boom: 4.2.0 thread-stream: 3.1.0 pluralize@8.0.0: {} @@ -10987,7 +10922,7 @@ snapshots: ip-address: 9.0.5 smart-buffer: 4.2.0 - sonic-boom@4.1.0: + sonic-boom@4.2.0: dependencies: atomic-sleep: 1.0.0 From e3d71d1df75764346a60e1b1e515a12a7266a002 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 23:01:15 +0800 Subject: [PATCH 143/740] chore(deps-dev): bump discord-api-types from 0.37.101 to 0.37.102 (#17141) * chore(deps-dev): bump discord-api-types from 0.37.101 to 0.37.102 Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.101 to 0.37.102. - [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.101...0.37.102) --- updated-dependencies: - dependency-name: discord-api-types dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 324e3a13c87ca79..c18eb4cbf3de5ea 100644 --- a/package.json +++ b/package.json @@ -167,7 +167,7 @@ "@typescript-eslint/parser": "8.9.0", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", - "discord-api-types": "0.37.101", + "discord-api-types": "0.37.102", "eslint": "9.12.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa8dd1f36d2d193..634069d31860f63 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -355,8 +355,8 @@ importers: specifier: 2.0.5 version: 2.0.5(vitest@2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: - specifier: 0.37.101 - version: 0.37.101 + specifier: 0.37.102 + version: 0.37.102 eslint: specifier: 9.12.0 version: 9.12.0 @@ -2689,8 +2689,8 @@ packages: resolution: {integrity: sha512-d9paCbverdqmuwR+B40phSqiHhgPKiP8dpsMz5WT9U6ug2VVQ3tqXNCedpa6iGHg6mgv9lHaoq5DJUu2IXMjsQ==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.101: - resolution: {integrity: sha512-2wizd94t7G3A8U5Phr3AiuL4gSvhqistDwWnlk1VLTit8BI1jWUncFqFQNdPbHqS3661+Nx/iEyIwtVjPuBP3w==} + discord-api-types@0.37.102: + resolution: {integrity: sha512-5+m5twqG8n77rLhKuh2c/971UWszEL/c3KbdvVLUBTPXuS8PbYC/7W7NYhwP02qowjj6CHoKYZbD0ppOUCsT6g==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -8223,7 +8223,7 @@ snapshots: directory-import@3.3.1: {} - discord-api-types@0.37.101: {} + discord-api-types@0.37.102: {} doctrine@3.0.0: dependencies: From a180b266efb22ff429602a80e4d2259c23553cd7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 23:01:32 +0800 Subject: [PATCH 144/740] chore(deps): bump @scalar/hono-api-reference from 0.5.153 to 0.5.154 (#17139) * chore(deps): bump @scalar/hono-api-reference from 0.5.153 to 0.5.154 Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.153 to 0.5.154. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 c18eb4cbf3de5ea..772689bbbf6ef50 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.22", - "@scalar/hono-api-reference": "0.5.153", + "@scalar/hono-api-reference": "0.5.154", "@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 634069d31860f63..272cb8b813900ce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: 0.0.22 version: 0.0.22 '@scalar/hono-api-reference': - specifier: 0.5.153 - version: 0.5.153(hono@4.6.4) + specifier: 0.5.154 + version: 0.5.154(hono@4.6.4) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1690,18 +1690,18 @@ packages: '@rss3/sdk@0.0.22': resolution: {integrity: sha512-yBfxbEoVxzBWeCccWDTH6VXy+TxkTnW7D8QwKbq+IQVb8ou7g1vw9oLy4E4yEu2CJ8XEZNE2BaTl2l0BWxcGOQ==} - '@scalar/hono-api-reference@0.5.153': - resolution: {integrity: sha512-Eo4AeRanOthMI9uD/vC1GZ70ztt9aty+xoL9tUe1TUvhoTpFmGOLKzwRCFyqMSc0W16qcWXo/hkVY0BcYS+oEg==} + '@scalar/hono-api-reference@0.5.154': + resolution: {integrity: sha512-v5ufLt7OG27BsPqO20YtnLvIcTsRZjU5jbFbpMUguW+SFgRWh1gji2RlC4BfK5x9hrK1Ek0hz46OMYweWp4I3w==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 - '@scalar/openapi-types@0.1.2': - resolution: {integrity: sha512-TxiAbs9Rw5qnMs/vvg+4Zx1Xf/5RhJXf8w6JOYSgvp4d2IKkOKc9eSOhid8ySvz7bWCjF2yWd8eHNc/BFs8cXg==} + '@scalar/openapi-types@0.1.3': + resolution: {integrity: sha512-UPUquC/ZSAdeSDbpdqMzeBVcgeytqJTj9P3QR4X9IRti5I1jXoCOUBY84CGGLXfcWquB7wfwHxn3DqQEnQmBVw==} engines: {node: '>=18'} - '@scalar/types@0.0.14': - resolution: {integrity: sha512-4yzW5d9nWtRE3eVNfLnuVUScSMf325PYJ9qCJ8CpaVP7hnWrTv9xGw/2n7csEKzu3QJkdff0myibHfxXJ6ICig==} + '@scalar/types@0.0.15': + resolution: {integrity: sha512-9fSBoAuJTsmnt2FTkm/F6LRq+TIeeRI0H8wz+7J3pHfcw0YGFEZrRZOo1WZ8fpovD0fQgg+r4BPrtN8+qJ12wQ==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7148,16 +7148,16 @@ snapshots: '@rss3/api-core': 0.0.22 '@rss3/api-utils': 0.0.22 - '@scalar/hono-api-reference@0.5.153(hono@4.6.4)': + '@scalar/hono-api-reference@0.5.154(hono@4.6.4)': dependencies: - '@scalar/types': 0.0.14 + '@scalar/types': 0.0.15 hono: 4.6.4 - '@scalar/openapi-types@0.1.2': {} + '@scalar/openapi-types@0.1.3': {} - '@scalar/types@0.0.14': + '@scalar/types@0.0.15': dependencies: - '@scalar/openapi-types': 0.1.2 + '@scalar/openapi-types': 0.1.3 '@unhead/schema': 1.11.9 '@sec-ant/readable-stream@0.4.1': {} From e0d51bac2c590b776777bfe8f99c34d9edf5f843 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:07:56 -0700 Subject: [PATCH 145/740] chore(deps): bump undici from 6.20.0 to 6.20.1 (#17140) * chore(deps): bump undici from 6.20.0 to 6.20.1 Bumps [undici](https://github.com/nodejs/undici) from 6.20.0 to 6.20.1. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v6.20.0...v6.20.1) --- updated-dependencies: - dependency-name: undici dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 772689bbbf6ef50..2b1492cac1f389b 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "tough-cookie": "5.0.0", "tsx": "4.19.1", "twitter-api-v2": "1.18.0", - "undici": "6.20.0", + "undici": "6.20.1", "uuid": "10.0.0", "winston": "3.15.0", "xxhash-wasm": "1.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 272cb8b813900ce..054ed03600f5bb8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -115,7 +115,7 @@ importers: version: 9.0.5 http-cookie-agent: specifier: 6.0.6 - version: 6.0.6(tough-cookie@5.0.0)(undici@6.20.0) + version: 6.0.6(tough-cookie@5.0.0)(undici@6.20.1) https-proxy-agent: specifier: 7.0.5 version: 7.0.5 @@ -243,8 +243,8 @@ importers: specifier: 1.18.0 version: 1.18.0 undici: - specifier: 6.20.0 - version: 6.20.0 + specifier: 6.20.1 + version: 6.20.1 uuid: specifier: 10.0.0 version: 10.0.0 @@ -5425,8 +5425,8 @@ packages: undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - undici@6.20.0: - resolution: {integrity: sha512-AITZfPuxubm31Sx0vr8bteSalEbs9wQb/BOBi9FPlD9Qpd6HxZ4Q0+hI742jBhkPb4RT2v5MQzaW5VhRVyj+9A==} + undici@6.20.1: + resolution: {integrity: sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==} engines: {node: '>=18.17'} unicode-canonical-property-names-ecmascript@2.0.1: @@ -7925,7 +7925,7 @@ snapshots: parse5: 7.2.0 parse5-htmlparser2-tree-adapter: 7.1.0 parse5-parser-stream: 7.1.2 - undici: 6.20.0 + undici: 6.20.1 whatwg-mimetype: 4.0.0 chownr@2.0.0: {} @@ -9202,12 +9202,12 @@ snapshots: http-cache-semantics@4.1.1: {} - http-cookie-agent@6.0.6(tough-cookie@5.0.0)(undici@6.20.0): + http-cookie-agent@6.0.6(tough-cookie@5.0.0)(undici@6.20.1): dependencies: agent-base: 7.1.1 tough-cookie: 5.0.0 optionalDependencies: - undici: 6.20.0 + undici: 6.20.1 transitivePeerDependencies: - supports-color @@ -11323,7 +11323,7 @@ snapshots: undici-types@6.19.8: {} - undici@6.20.0: {} + undici@6.20.1: {} unicode-canonical-property-names-ecmascript@2.0.1: {} From 7e18a29ec1af515bf628d4f70441e6bc1b2f9a61 Mon Sep 17 00:00:00 2001 From: Nano <nanoapezlk@gmail.com> Date: Wed, 16 Oct 2024 01:34:42 +0800 Subject: [PATCH 146/740] chore: add maintainer in two routes (#17133) * chore(route/bilibili): add maintainer * chore(route/weibo): add maintainer --- lib/routes/bilibili/video.ts | 2 +- lib/routes/weibo/user.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/bilibili/video.ts b/lib/routes/bilibili/video.ts index d230deb8dc159bd..4013e17877fbb84 100644 --- a/lib/routes/bilibili/video.ts +++ b/lib/routes/bilibili/video.ts @@ -25,7 +25,7 @@ export const route: Route = { }, ], name: 'UP 主投稿', - maintainers: ['DIYgod'], + maintainers: ['DIYgod', 'Konano'], handler, }; diff --git a/lib/routes/weibo/user.ts b/lib/routes/weibo/user.ts index 241e0ef9f5b9791..bcf48479d266396 100644 --- a/lib/routes/weibo/user.ts +++ b/lib/routes/weibo/user.ts @@ -35,7 +35,7 @@ export const route: Route = { }, ], name: '博主', - maintainers: ['DIYgod', 'iplusx', 'Rongronggg9'], + maintainers: ['DIYgod', 'iplusx', 'Rongronggg9', 'Konano'], handler, description: `:::warning 部分博主仅登录可见,未提供 Cookie 的情况下不支持订阅,可以通过打开 \`https://m.weibo.cn/u/:uid\` 验证 From 516becd8890a77466dd1f4f5de7b09926a6a3bd8 Mon Sep 17 00:00:00 2001 From: After9 <ap66.ron@gmail.com> Date: Wed, 16 Oct 2024 01:56:45 +0800 Subject: [PATCH 147/740] feat: add hko route (#17082) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 添加koa路由 ## Involved Issue / 该 PR 相关 Issue Close # ## Example for the Proposed Route(s) / 路由地址示例 ## New RSS Route Checklist / 新 RSS 路由检查表 - [x] New Route / 新的路由 - [x] Follows [Script Standard](https://docs.rsshub.app/joinus/advanced/script-standard) / 跟随 [路由规范](https://docs.rsshub.app/zh/joinus/advanced/script-standard) - [x] Documentation / 文档说明 - [ ] Full text / 全文获取 - [ ] Use cache / 使用缓存 - [ ] Anti-bot or rate limit / 反爬/频率限制 - [ ] If yes, do your code reflect this sign? / 如果有, 是否有对应的措施? - [ ] [Date and time](https://docs.rsshub.app/joinus/advanced/pub-date) / [日期和时间](https://docs.rsshub.app/zh/joinus/advanced/pub-date) - [ ] Parsed / 可以解析 - [ ] Correct time zone / 时区正确 - [ ] New package added / 添加了新的包 - [x] ## Note / 说明 - 新增路由暂时用于提供經香港天文台分析的全球5.0級或以上及本地有感的地震資訊。 - 后期会扩展新增新增更多其它自然公益资讯。 * try: use nodejs v20.14.0 * fix: change puppeteer to ofetch * fix: update example path * Update lib/routes/hko/app.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * fix: use utilities to handle date and time * fix: migrate old route --------- --- lib/routes-deprecated/hko/weather.js | 44 ---------------------- lib/routes/hko/earthquake.ts | 56 ++++++++++++++++++++++++++++ lib/routes/hko/namespace.ts | 8 ++++ lib/routes/hko/weather.ts | 56 ++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+), 44 deletions(-) delete mode 100644 lib/routes-deprecated/hko/weather.js create mode 100644 lib/routes/hko/earthquake.ts create mode 100644 lib/routes/hko/namespace.ts create mode 100644 lib/routes/hko/weather.ts diff --git a/lib/routes-deprecated/hko/weather.js b/lib/routes-deprecated/hko/weather.js deleted file mode 100644 index 816b6ece4cfea33..000000000000000 --- a/lib/routes-deprecated/hko/weather.js +++ /dev/null @@ -1,44 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - const url = 'http://rss.weather.gov.hk/rss/CurrentWeather.xml'; - const cache = await ctx.cache.get(url); - if (cache) { - return JSON.parse(cache); - } - - const { data } = await got({ method: 'get', url }); - const $ = cheerio.load(data, { - xmlMode: true, - }); - const weather = $('description').slice(1, 2).text(); - - const $$ = cheerio.load(weather); - const items = []; - $$('table') - .find('td') - .each((index, element) => { - if (index % 2) { - return; - } - const area = $$(element).text(); - const degree = $$(element).next().text().split(' ')[0]; - - const item = { - title: area, - description: degree, - }; - items.push(item); - }); - const result = { - title: 'Current Weather Report', - description: ` provided by the Hong Kong Observatory: ${$('pubDate').text()}`, - link: url, - item: items, - }; - // one hour cache - ctx.cache.set(url, JSON.stringify(result)); - - ctx.state.data = result; -}; diff --git a/lib/routes/hko/earthquake.ts b/lib/routes/hko/earthquake.ts new file mode 100644 index 000000000000000..8010d98f6e763c4 --- /dev/null +++ b/lib/routes/hko/earthquake.ts @@ -0,0 +1,56 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +export const route: Route = { + path: '/earthquake', + name: '全球地震資訊網', + maintainers: ['after9'], + handler, + example: '/hko/earthquake', + categories: ['forecast'], + description: '来自香港天文台的全球5级以上地震记录', +}; + +async function handler() { + const title = '来自香港天文台的全球5级以上地震记录'; + const link = 'https://www.hko.gov.hk/tc/gts/equake/quake-info.htm'; + const description = '提供經天文台分析的全球5.0級或以上及本地有感的地震資訊。'; + + // 发送 HTTP GET 请求到 API 并解构返回的数据对象 + const response = await ofetch('https://www.hko.gov.hk/gts/QEM/eq_app-30d_uc.xml', { + headers: { + accept: 'application/xml', + }, + }); + + const $ = load(response); + + const items = $('Earthquake > EventGroup > Event') + // 使用“toArray()”方法将选择的所有 DOM 元素以数组的形式返回。 + .toArray() + // 使用“map()”方法遍历数组,并从每个元素中解析需要的数据。 + .map((item) => { + item = $(item); + const degree = item.find('Mag').text(); + const city = item.find('City').text(); + const citystring = item.find('citystring').text(); + const hktDate = item.find('HKTDate').text(); + const hktTime = item.find('HKTTime').text(); + const latAndLon = '經緯:[' + item.find('Lat').text() + ',' + item.find('Lon').text() + ']'; + return { + title: `[震級:${degree}] [地點:${city}]`, + description: `${citystring}, ${latAndLon}`, + pubDate: timezone(parseDate(hktDate + hktTime, 'YYYYMMDDHHMM'), +8), + }; + }); + + return { + title, + link, + description, + item: items, + }; +} diff --git a/lib/routes/hko/namespace.ts b/lib/routes/hko/namespace.ts new file mode 100644 index 000000000000000..ede87d46949525c --- /dev/null +++ b/lib/routes/hko/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Hong Kong Observatory', + url: 'www.hko.gov.hk', + categories: ['forecast'], + description: '来自香港天文台的全球地震记录', +}; diff --git a/lib/routes/hko/weather.ts b/lib/routes/hko/weather.ts new file mode 100644 index 000000000000000..10145ffd4b8355a --- /dev/null +++ b/lib/routes/hko/weather.ts @@ -0,0 +1,56 @@ +import type { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +const handler = async () => { + const url = 'http://rss.weather.gov.hk/rss/CurrentWeather.xml'; + const pageUrl = 'https://www.weather.gov.hk/en/wxinfo/currwx/current.htm'; + + const data = await ofetch(url); + const $ = cheerio.load(data, { + xmlMode: true, + }); + + const description = $('item').first().find('description'); + + const $$ = cheerio.load(description.text()); + + const items = $$('table tr') + .toArray() + .map((item) => { + const $item = $(item); + const area = $item.find('td').first().text(); + const degree = $item.find('td').last().text(); + + return { + title: area, + description: degree, + pubDate: parseDate($('pubDate').text()), + link: pageUrl, + guid: `${$('guid').text()}#${area}`, + }; + }); + + return { + title: 'Current Weather Report', + description: `provided by the Hong Kong Observatory: ${$('pubDate').text()}`, + link: pageUrl, + item: items, + }; +}; + +export const route: Route = { + path: '/weather', + radar: [ + { + source: ['www.weather.gov.hk/en/wxinfo/currwx/current.htm'], + }, + ], + name: 'Current Weather Report', + example: '/hko/weather', + maintainers: ['calpa'], + categories: ['forecast'], + handler, + url: 'www.weather.gov.hk/en/wxinfo/currwx/current.htm', +}; From 36b84b25bb7bdb40c8a3c9f67afd7ad86858a02d Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 16 Oct 2024 02:12:37 +0800 Subject: [PATCH 148/740] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD=E5=9B=BD?= =?UTF-8?q?=E6=97=A0=E6=9C=BA=E7=9B=90=E5=B7=A5=E4=B8=9A=E5=8D=8F=E4=BC=9A?= =?UTF-8?q?=20(#17117)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 中国无机盐工业协会 * fix typo * fix typo * fix: use url pattern --- lib/routes/cisia/index.ts | 264 ++++++++++++++++++++++++++++++++++ lib/routes/cisia/namespace.ts | 8 ++ 2 files changed, 272 insertions(+) create mode 100644 lib/routes/cisia/index.ts create mode 100644 lib/routes/cisia/namespace.ts diff --git a/lib/routes/cisia/index.ts b/lib/routes/cisia/index.ts new file mode 100644 index 000000000000000..2263a61a8345f2e --- /dev/null +++ b/lib/routes/cisia/index.ts @@ -0,0 +1,264 @@ +import { Route } from '@/types'; + +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +export const handler = async (ctx) => { + const { id = '9' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; + + const domain = 'www.cisia.org'; + const rootUrl = `http://${domain}`; + const currentUrl = new URL(`site/term/${id}.html`, rootUrl).href; + + const { data: response } = await got(currentUrl); + + const $ = load(response); + + let items = $('ul.list_first li') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + const a = item.find('a'); + + return { + title: a.text(), + pubDate: parseDate(item.find('span.time').text()), + link: new URL(a.prop('href'), rootUrl).href, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + if (!/^https?:\/\/www\.cisia\.org(\/[^\s]*)?$/.test(item.link)) { + return item; + } + + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + const title = $$('div.TextTitle').text(); + const description = $$('div.NewsText').html(); + const pubDate = $$('div.shar') + .text() + .match(/(\d{4}-\d{2}-\d{2})/)?.[1]; + + item.title = title; + item.description = description; + item.pubDate = pubDate ? parseDate(pubDate) : item.pubDate; + item.author = $$('meta[name="Description"]').prop('content'); + item.content = { + html: description, + text: $$('div.NewsText').text(), + }; + + return item; + }) + ) + ); + + const image = new URL($('div.logo img').prop('src'), rootUrl).href; + + return { + title: $('title').text(), + description: $('meta[name="Description"]').prop('content'), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: $('meta[name="Keywords"]').prop('content'), + }; +}; + +export const route: Route = { + path: '/:id?', + name: '栏目', + url: 'www.cisia.org', + maintainers: ['nczitzk'], + handler, + example: '/cisia/9', + parameters: { id: '栏目 id,默认为 `9`,即协会动态,可在对应分类页 URL 中找到' }, + description: `:::tip + 若订阅 [市场信息](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)。 + ::: + + <details> + <summary>更多分类</summary> + + #### [分支机构信息](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/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/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/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/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/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/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) | + + </details> + `, + categories: ['government'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.cisia.org/site/term/:id'], + target: (params) => { + const id = params.id.replace(/\.html/, ''); + + return id ? `/${id}` : ''; + }, + }, + { + title: '分支机构信息 - 企业动态', + source: ['www.cisia.org/site/term/17.html'], + target: '/17', + }, + { + title: '分支机构信息 - 产品展示', + source: ['www.cisia.org/site/term/18.html'], + target: '/18', + }, + { + title: '新闻中心 - 协会动态', + source: ['www.cisia.org/site/term/9.html'], + target: '/9', + }, + { + title: '新闻中心 - 行业新闻', + source: ['www.cisia.org/site/term/10.html'], + target: '/10', + }, + { + title: '新闻中心 - 通知公告', + source: ['www.cisia.org/site/term/11.html'], + target: '/11', + }, + { + title: '新闻中心 - 市场信息', + source: ['www.cisia.org/site/term/12.html'], + target: '/12', + }, + { + title: '政策法规 - 宏观聚焦', + source: ['www.cisia.org/site/term/20.html'], + target: '/20', + }, + { + title: '政策法规 - 技术园区', + source: ['www.cisia.org/site/term/396.html'], + target: '/396', + }, + { + title: '合作交流 - 国际交流', + source: ['www.cisia.org/site/term/23.html'], + target: '/23', + }, + { + title: '合作交流 - 行业交流', + source: ['www.cisia.org/site/term/24.html'], + target: '/24', + }, + { + title: '合作交流 - 企业调研', + source: ['www.cisia.org/site/term/25.html'], + target: '/25', + }, + { + title: '合作交流 - 会展信息', + source: ['www.cisia.org/site/term/84.html'], + target: '/84', + }, + { + title: '合作交流 - 宣传专题', + source: ['www.cisia.org/site/term/430.html'], + target: '/430', + }, + { + title: '党建工作 - 党委文件', + source: ['www.cisia.org/site/term/27.html'], + target: '/27', + }, + { + title: '党建工作 - 学习园地', + source: ['www.cisia.org/site/term/28.html'], + target: '/28', + }, + { + title: '党建工作 - 两会专题', + source: ['www.cisia.org/site/term/443.html'], + target: '/443', + }, + { + title: '网上服务平台 - 前沿科技', + source: ['www.cisia.org/site/term/31.html'], + target: '/31', + }, + { + title: '网上服务平台 - 新材料新技术', + source: ['www.cisia.org/site/term/133.html'], + target: '/133', + }, + { + title: '网上服务平台 - 文件共享', + source: ['www.cisia.org/site/term/30.html'], + target: '/30', + }, + { + title: '会员社区 - 会员分布', + source: ['www.cisia.org/site/term/35.html'], + target: '/35', + }, + { + title: '会员社区 - 会员风采', + source: ['www.cisia.org/site/term/68.html'], + target: '/68', + }, + ], +}; diff --git a/lib/routes/cisia/namespace.ts b/lib/routes/cisia/namespace.ts new file mode 100644 index 000000000000000..2f4ebba0e3d220f --- /dev/null +++ b/lib/routes/cisia/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国无机盐工业协会', + url: 'www.cisia.org', + categories: ['government'], + description: '', +}; From 37d2a80deea5c592f99d75b7ec58bc62d01622e3 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 15 Oct 2024 18:29:08 -0700 Subject: [PATCH 149/740] fix(route): famitsu (#17153) --- lib/routes/famitsu/category.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/famitsu/category.ts b/lib/routes/famitsu/category.ts index e666837a5e4ab8b..20970ce31b23739 100644 --- a/lib/routes/famitsu/category.ts +++ b/lib/routes/famitsu/category.ts @@ -106,7 +106,7 @@ async function handler(ctx) { }, }); - const list = (data.pageProps.categoryArticleData as CategoryArticle[]) + const list = (data.pageProps.categoryArticleDataForPc as CategoryArticle[]) .filter((item) => !item.advertiserName) .map((item) => { const publicationDate = item.publishedAt?.slice(0, 7).replace('-', ''); From 9dccb13af4890ec9d2a8604f8c2750208acf39a2 Mon Sep 17 00:00:00 2001 From: Nano <nanoapezlk@gmail.com> Date: Wed, 16 Oct 2024 19:01:27 +0800 Subject: [PATCH 150/740] fix(route/damai): allow to return empty results (#17162) * fix(route/damai): allow to return empty results fixed #17158 * chore(route/damai): set antiCrawler to be true --- lib/routes/damai/activity.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/routes/damai/activity.ts b/lib/routes/damai/activity.ts index ff26f7b209c683a..bcf0962bcf926f4 100644 --- a/lib/routes/damai/activity.ts +++ b/lib/routes/damai/activity.ts @@ -15,13 +15,13 @@ export const route: Route = { features: { requireConfig: false, requirePuppeteer: false, - antiCrawler: false, + antiCrawler: true, supportBT: false, supportPodcast: false, supportScihub: false, }, name: '票务更新', - maintainers: ['hoilc'], + maintainers: ['hoilc', 'Konano'], handler, description: `城市、分类名、子分类名,请参见[大麦网搜索页面](https://search.damai.cn/search.htm)`, }; @@ -55,6 +55,7 @@ async function handler(ctx) { return { title: `大麦网票务 - ${city || '全国'} - ${category || '全部分类'}${subcategory ? ' - ' + subcategory : ''}${keyword ? ' - ' + keyword : ''}`, link: 'https://search.damai.cn/search.htm', + allowEmpty: true, item: list.map((item) => ({ title: item.nameNoHtml, author: item.actors ? load(item.actors, null, false).text() : '大麦网', From aa0c21150aebdf3e41798b700169bf59cf43d94e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 04:04:40 -0700 Subject: [PATCH 151/740] chore(deps): bump proxy-chain from 2.5.3 to 2.5.4 (#17160) * chore(deps): bump proxy-chain from 2.5.3 to 2.5.4 Bumps [proxy-chain](https://github.com/apify/proxy-chain) from 2.5.3 to 2.5.4. - [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.3...v2.5.4) --- updated-dependencies: - dependency-name: proxy-chain dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 76 +++++++++++++++++++++++++------------------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/package.json b/package.json index 2b1492cac1f389b..35e9aeb184a1c16 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "ofetch": "1.4.1", "otplib": "12.0.1", "pac-proxy-agent": "7.0.2", - "proxy-chain": "2.5.3", + "proxy-chain": "2.5.4", "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 054ed03600f5bb8..c3a1a736c93cfe5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -174,8 +174,8 @@ importers: specifier: 7.0.2 version: 7.0.2 proxy-chain: - specifier: 2.5.3 - version: 2.5.3 + specifier: 2.5.4 + version: 2.5.4 puppeteer: specifier: 22.6.2 version: 22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) @@ -1966,8 +1966,8 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@unhead/schema@1.11.9': - resolution: {integrity: sha512-0V37bxG4sQuiLw3M5DMD+b99ndOOngecMlekQ122TDvBb24W8rWwkHhXvAu5eFg6bQXPdQF1A0U0PuRMcCj/ZA==} + '@unhead/schema@1.11.10': + resolution: {integrity: sha512-lXh7cm5XtFaw3gc+ZVXTSfIHXiBpAywbjtEiOsz5TR4GxOjj2rtfOAl4C3Difk1yupP6L2otYmOZdn/i8EXSJg==} '@vercel/nft@0.27.4': resolution: {integrity: sha512-Rioz3LJkEKicKCi9BSyc1RXZ5R6GmXosFMeBSThh6msWSOiArKhb7c75MiWwZEgPL7x0/l3TAfH/l0cxKNuUFA==} @@ -2026,8 +2026,8 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + acorn@8.13.0: + resolution: {integrity: sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==} engines: {node: '>=0.4.0'} hasBin: true @@ -2301,8 +2301,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001668: - resolution: {integrity: sha512-nWLrdxqCdblixUO+27JtGJJE/txpJlyUy5YN1u53wLZkP0emYCo5zgS6QYft7VUYR42LGgi/S5hdLZTrnyIddw==} + caniuse-lite@1.0.30001669: + resolution: {integrity: sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -2756,8 +2756,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.38: - resolution: {integrity: sha512-VbeVexmZ1IFh+5EfrYz1I0HTzHVIlJa112UEWhciPyeOcKJGeTv6N8WnG4wsQB81DGCaVEGhpSb6o6a8WYFXXg==} + electron-to-chromium@1.5.39: + resolution: {integrity: sha512-4xkpSR6CjuiaNyvwiWDI85N9AxsvbPawB8xc7yzLPonYTuP19BVgYweKyUMFtHEZgIcHWMt1ks5Cqx2m+6/Grg==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -4581,8 +4581,8 @@ packages: resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==} engines: {node: '>= 14'} - proxy-chain@2.5.3: - resolution: {integrity: sha512-FwjU/eNqadMffDpC+mmcvq4Er7hVJWmZqr/QnxKMvExqzgPWNSz7A0XIOVGVjdzwAIAkpmYlqfW9vDlKOFgldw==} + proxy-chain@2.5.4: + resolution: {integrity: sha512-Tsdqbo3fyteHO3dHtxcBE6uKlhg4sO2qtDxmiM805l3O08R6zRbGTeIDbW1ksSv/n4xPQ3B0YiK+KZ2D9YIfBA==} engines: {node: '>=14'} proxy-from-env@1.1.0: @@ -5345,8 +5345,8 @@ packages: tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - tslib@2.7.0: - resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + tslib@2.8.0: + resolution: {integrity: sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==} tsx@4.19.1: resolution: {integrity: sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==} @@ -7158,7 +7158,7 @@ snapshots: '@scalar/types@0.0.15': dependencies: '@scalar/openapi-types': 0.1.3 - '@unhead/schema': 1.11.9 + '@unhead/schema': 1.11.10 '@sec-ant/readable-stream@0.4.1': {} @@ -7458,7 +7458,7 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@unhead/schema@1.11.9': + '@unhead/schema@1.11.10': dependencies: hookable: 5.5.3 zhead: 2.2.4 @@ -7467,8 +7467,8 @@ snapshots: dependencies: '@mapbox/node-pre-gyp': 1.0.11 '@rollup/pluginutils': 4.2.1 - acorn: 8.12.1 - acorn-import-attributes: 1.9.5(acorn@8.12.1) + acorn: 8.13.0 + acorn-import-attributes: 1.9.5(acorn@8.13.0) async-sema: 3.1.1 bindings: 1.5.0 estree-walker: 2.0.2 @@ -7544,17 +7544,17 @@ snapshots: dependencies: event-target-shim: 5.0.1 - acorn-import-attributes@1.9.5(acorn@8.12.1): + acorn-import-attributes@1.9.5(acorn@8.13.0): dependencies: - acorn: 8.12.1 + acorn: 8.13.0 - acorn-jsx@5.3.2(acorn@8.12.1): + acorn-jsx@5.3.2(acorn@8.13.0): dependencies: - acorn: 8.12.1 + acorn: 8.13.0 acorn@5.7.4: {} - acorn@8.12.1: {} + acorn@8.13.0: {} aes-js@3.1.2: {} @@ -7643,11 +7643,11 @@ snapshots: ast-types@0.13.4: dependencies: - tslib: 2.7.0 + tslib: 2.8.0 async-mutex@0.3.2: dependencies: - tslib: 2.7.0 + tslib: 2.8.0 async-sema@3.1.1: {} @@ -7764,8 +7764,8 @@ snapshots: browserslist@4.24.0: dependencies: - caniuse-lite: 1.0.30001668 - electron-to-chromium: 1.5.38 + caniuse-lite: 1.0.30001669 + electron-to-chromium: 1.5.39 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) @@ -7839,7 +7839,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001668: {} + caniuse-lite@1.0.30001669: {} caseless@0.12.0: {} @@ -8306,7 +8306,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.38: {} + electron-to-chromium@1.5.39: {} ellipsize@0.1.0: {} @@ -8658,14 +8658,14 @@ snapshots: espree@10.2.0: dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) + acorn: 8.13.0 + acorn-jsx: 5.3.2(acorn@8.13.0) eslint-visitor-keys: 4.1.0 espree@9.6.1: dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) + acorn: 8.13.0 + acorn-jsx: 5.3.2(acorn@8.13.0) eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -10467,11 +10467,11 @@ snapshots: transitivePeerDependencies: - supports-color - proxy-chain@2.5.3: + proxy-chain@2.5.4: dependencies: socks: 2.8.3 socks-proxy-agent: 8.0.4 - tslib: 2.7.0 + tslib: 2.8.0 transitivePeerDependencies: - supports-color @@ -10804,7 +10804,7 @@ snapshots: rxjs@7.8.1: dependencies: - tslib: 2.7.0 + tslib: 2.8.0 safe-buffer@5.2.1: {} @@ -11092,7 +11092,7 @@ snapshots: synckit@0.9.2: dependencies: '@pkgr/core': 0.1.1 - tslib: 2.7.0 + tslib: 2.8.0 tapable@2.2.1: {} @@ -11258,7 +11258,7 @@ snapshots: tslib@1.14.1: {} - tslib@2.7.0: {} + tslib@2.8.0: {} tsx@4.19.1: dependencies: From 9e7560405e263bf4d1c7391abc0f595d5e227408 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 04:05:20 -0700 Subject: [PATCH 152/740] chore(deps): bump hono from 4.6.4 to 4.6.5 (#17159) * chore(deps): bump hono from 4.6.4 to 4.6.5 Bumps [hono](https://github.com/honojs/hono) from 4.6.4 to 4.6.5. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.4...v4.6.5) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 35e9aeb184a1c16..7f7711ec02f7900 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "fanfou-sdk": "5.0.0", "form-data": "4.0.1", "googleapis": "144.0.0", - "hono": "4.6.4", + "hono": "4.6.5", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3a1a736c93cfe5..1dce3d75e7db3d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,10 +10,10 @@ importers: dependencies: '@hono/node-server': specifier: 1.13.2 - version: 1.13.2(hono@4.6.4) + version: 1.13.2(hono@4.6.5) '@hono/zod-openapi': specifier: 0.16.4 - version: 0.16.4(hono@4.6.4)(zod@3.23.8) + version: 0.16.4(hono@4.6.5)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -46,7 +46,7 @@ importers: version: 0.0.22 '@scalar/hono-api-reference': specifier: 0.5.154 - version: 0.5.154(hono@4.6.4) + version: 0.5.154(hono@4.6.5) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -108,8 +108,8 @@ importers: specifier: 144.0.0 version: 144.0.0 hono: - specifier: 4.6.4 - version: 4.6.4 + specifier: 4.6.5 + version: 4.6.5 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3407,8 +3407,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.4: - resolution: {integrity: sha512-T5WqBkTOcIQblqBKB5mpzaH/A+dSpvVe938xZJCHOmOuYfF7DSwE/9/10+BMvwSPq9N/f6LiQ38HxrZSQOsXKw==} + hono@4.6.5: + resolution: {integrity: sha512-qsmN3V5fgtwdKARGLgwwHvcdLKursMd+YOt69eGpl1dUCJb8mCd7hZfyZnBYjxCegBG7qkJRQRUy2oO25yHcyQ==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6732,20 +6732,20 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.2(hono@4.6.4)': + '@hono/node-server@1.13.2(hono@4.6.5)': dependencies: - hono: 4.6.4 + hono: 4.6.5 - '@hono/zod-openapi@0.16.4(hono@4.6.4)(zod@3.23.8)': + '@hono/zod-openapi@0.16.4(hono@4.6.5)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.3.0(hono@4.6.4)(zod@3.23.8) - hono: 4.6.4 + '@hono/zod-validator': 0.3.0(hono@4.6.5)(zod@3.23.8) + hono: 4.6.5 zod: 3.23.8 - '@hono/zod-validator@0.3.0(hono@4.6.4)(zod@3.23.8)': + '@hono/zod-validator@0.3.0(hono@4.6.5)(zod@3.23.8)': dependencies: - hono: 4.6.4 + hono: 4.6.5 zod: 3.23.8 '@humanfs/core@0.19.0': {} @@ -7148,10 +7148,10 @@ snapshots: '@rss3/api-core': 0.0.22 '@rss3/api-utils': 0.0.22 - '@scalar/hono-api-reference@0.5.154(hono@4.6.4)': + '@scalar/hono-api-reference@0.5.154(hono@4.6.5)': dependencies: '@scalar/types': 0.0.15 - hono: 4.6.4 + hono: 4.6.5 '@scalar/openapi-types@0.1.3': {} @@ -9140,7 +9140,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.4: {} + hono@4.6.5: {} hookable@5.5.3: {} From 7ba90ff183bf9c86e5379a8bbd540b74b4e20cee Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Wed, 16 Oct 2024 21:30:23 +0800 Subject: [PATCH 153/740] docs: fix Skeb route examples and description (#17156) --- lib/routes/skeb/following-creators.ts | 2 +- lib/routes/skeb/following-works.ts | 2 +- lib/routes/skeb/friend-works.ts | 2 +- lib/routes/skeb/index.ts | 4 ++-- lib/routes/skeb/search.ts | 2 +- lib/routes/skeb/works.ts | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/routes/skeb/following-creators.ts b/lib/routes/skeb/following-creators.ts index ac1f7840c2750d9..3c149f2868cbd98 100644 --- a/lib/routes/skeb/following-creators.ts +++ b/lib/routes/skeb/following-creators.ts @@ -6,7 +6,7 @@ import { getFollowingsItems } from './utils'; export const route: Route = { path: '/following_creators/:username', categories: ['picture'], - example: '/following_creators/@brm2_1925', + example: '/skeb/following_creators/@brm2_1925', parameters: { username: 'Skeb Username with @' }, features: { requireConfig: [ diff --git a/lib/routes/skeb/following-works.ts b/lib/routes/skeb/following-works.ts index 227d31f9f4a1783..0b3bf0cd1e1d8b1 100644 --- a/lib/routes/skeb/following-works.ts +++ b/lib/routes/skeb/following-works.ts @@ -6,7 +6,7 @@ import { getFollowingsItems } from './utils'; export const route: Route = { path: '/following_works/:username', categories: ['picture'], - example: '/following_works/@brm2_1925', + example: '/skeb/following_works/@brm2_1925', parameters: { username: 'Skeb Username with @' }, features: { requireConfig: [ diff --git a/lib/routes/skeb/friend-works.ts b/lib/routes/skeb/friend-works.ts index 43d22528e0b3e87..ed01a49f5475517 100644 --- a/lib/routes/skeb/friend-works.ts +++ b/lib/routes/skeb/friend-works.ts @@ -6,7 +6,7 @@ import { getFollowingsItems } from './utils'; export const route: Route = { path: '/friend_works/:username', categories: ['picture'], - example: '/friend_works/@brm2_1925', + example: '/skeb/friend_works/@brm2_1925', parameters: { username: 'Skeb Username with @' }, features: { requireConfig: [ diff --git a/lib/routes/skeb/index.ts b/lib/routes/skeb/index.ts index 24420fe9fd4ea17..7d3503f0978d180 100644 --- a/lib/routes/skeb/index.ts +++ b/lib/routes/skeb/index.ts @@ -24,8 +24,8 @@ const workCategories = new Set(['new_art_works', 'new_voice_works', 'new_novel_w export const route: Route = { path: '/:category', categories: ['picture'], - example: '/new_art_works', - parameters: { category: 'Category, the div id of the section title on the homepage. Default is new_art_works' }, + example: '/skeb/new_art_works', + parameters: { category: 'Category, the div id of the section title on the homepage.' }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/skeb/search.ts b/lib/routes/skeb/search.ts index c2a8300f26b10f3..682a23eb813fe7d 100644 --- a/lib/routes/skeb/search.ts +++ b/lib/routes/skeb/search.ts @@ -7,7 +7,7 @@ import InvalidParameterError from '@/errors/types/invalid-parameter'; export const route: Route = { path: '/search/:keyword', categories: ['picture'], - example: '/search/初音ミク', + example: '/skeb/search/初音ミク', parameters: { keyword: 'Search keyword' }, features: { requireConfig: false, diff --git a/lib/routes/skeb/works.ts b/lib/routes/skeb/works.ts index 6c80a85596d79e2..ff599f456f17fdd 100644 --- a/lib/routes/skeb/works.ts +++ b/lib/routes/skeb/works.ts @@ -8,7 +8,7 @@ import ofetch from '@/utils/ofetch'; export const route: Route = { path: '/works/:username', categories: ['picture'], - example: '/works/@brm2_1925', + example: '/skeb/works/@brm2_1925', parameters: { username: 'Skeb Username with @' }, features: { requireConfig: [ From e3f43dcec3de71f70b588842dfcd4a470786bee3 Mon Sep 17 00:00:00 2001 From: Flamma <booped@outlook.de> Date: Wed, 16 Oct 2024 23:36:17 +0800 Subject: [PATCH 154/740] =?UTF-8?q?feat(route):=20add=20route=20for=20HFUT?= =?UTF-8?q?=E5=90=88=E8=82=A5=E5=B7=A5=E4=B8=9A=E5=A4=A7=E5=AD=A6=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E5=85=AC=E5=91=8A=20(#17122)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 新增HFUT合肥工业大学通知公告路由 * fix function mistake * fix pr mistakes --- lib/routes/hfut/hf/notice.ts | 43 +++++++++++++++++++ lib/routes/hfut/hf/utils.ts | 80 ++++++++++++++++++++++++++++++++++++ lib/routes/hfut/namespace.ts | 6 +++ lib/routes/hfut/xc/notice.ts | 43 +++++++++++++++++++ lib/routes/hfut/xc/utils.ts | 73 ++++++++++++++++++++++++++++++++ 5 files changed, 245 insertions(+) create mode 100644 lib/routes/hfut/hf/notice.ts create mode 100644 lib/routes/hfut/hf/utils.ts create mode 100644 lib/routes/hfut/namespace.ts create mode 100644 lib/routes/hfut/xc/notice.ts create mode 100644 lib/routes/hfut/xc/utils.ts diff --git a/lib/routes/hfut/hf/notice.ts b/lib/routes/hfut/hf/notice.ts new file mode 100644 index 000000000000000..cff0e9492b2954b --- /dev/null +++ b/lib/routes/hfut/hf/notice.ts @@ -0,0 +1,43 @@ +import { Route } from '@/types'; +import parseList from './utils'; + +export const route: Route = { + path: '/hf/notice/:type?', + categories: ['university'], + example: '/hfut/hf/notice/tzgg', + parameters: { type: '分类,见下表(默认为 `tzgg`)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportRadar: true, + supportScihub: false, + }, + radar: [ + { + source: ['news.hfut.edu.cn'], + }, + ], + name: '合肥校区通知', + 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 |`, +}; + +async function handler(ctx) { + // set default router type + const type = ctx.req.param('type') ?? 'tzgg'; + + const { link, title, resultList } = await parseList(ctx, type); + + return { + title, + link, + description: '合肥工业大学 - 通知公告', + item: resultList, + }; +} diff --git a/lib/routes/hfut/hf/utils.ts b/lib/routes/hfut/hf/utils.ts new file mode 100644 index 000000000000000..874121db6bdd399 --- /dev/null +++ b/lib/routes/hfut/hf/utils.ts @@ -0,0 +1,80 @@ +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +const typeMap = { + tzgg: { name: 'tzgg', url: 'https://news.hfut.edu.cn/tzgg2.htm', root: 'https://news.hfut.edu.cn', title: '合肥工业大学 - 通知公告' }, + jxky: { name: 'jxky', url: 'https://news.hfut.edu.cn/tzgg2.htm', root: 'https://news.hfut.edu.cn', title: '合肥工业大学 - 通知公告 - 教学科研' }, + qttz: { name: 'qttz', url: 'https://news.hfut.edu.cn/tzgg2.htm', root: 'https://news.hfut.edu.cn', title: '合肥工业大学 - 通知公告 - 其它通知' }, +}; + +const commLink = 'https://news.hfut.edu.cn/'; + +const parseList = async (ctx, type) => { + const link = typeMap[type].url; + const title = typeMap[type].title; + + const response = await got(link); + const $ = load(response.data); + + const resultList = await parseArticle(typeMap[type].name, $); + + return { + title, + link, + resultList, + }; +}; + +async function parseArticle(type, $) { + let data = $('#tzz').find('li').toArray(); + + if (type === 'jxky') { + data = $('#c01').find('li').toArray(); + } else if (type === 'qttz') { + data = $('#c02').find('li').toArray(); + } + + const items = data.map((item) => { + item = $(item); + const oriLink = item.find('a').attr('href'); + let linkRes = oriLink; + if (!oriLink.startsWith('http')) { + linkRes = commLink + item.find('a').attr('href'); + } + const pubDate = parseDate(item.find('i').text(), 'YYYY-MM-DD'); + + return { + title: item.find('p').text(), + pubDate, + link: linkRes, + }; + }); + + const resultItems = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + let description; + try { + const response = await got(item.link); + const $ = load(response.data); + description = $('.wp_articlecontent').html() ?? $('.v_news_content').html() ?? item.link; + } catch { + description = item.link; + } + + return { + title: item.title, + link: item.link, + description, + pubDate: item.pubDate, + }; + }) + ) + ); + + return resultItems; +} + +export default parseList; diff --git a/lib/routes/hfut/namespace.ts b/lib/routes/hfut/namespace.ts new file mode 100644 index 000000000000000..723f877f1de21d1 --- /dev/null +++ b/lib/routes/hfut/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '合肥工业大学', + url: 'hfut.edu.cn', +}; diff --git a/lib/routes/hfut/xc/notice.ts b/lib/routes/hfut/xc/notice.ts new file mode 100644 index 000000000000000..1dc36c663c7162c --- /dev/null +++ b/lib/routes/hfut/xc/notice.ts @@ -0,0 +1,43 @@ +import { Route } from '@/types'; +import parseList from './utils'; + +export const route: Route = { + path: '/xc/notice/:type?', + categories: ['university'], + example: '/hfut/xc/notice/tzgg', + parameters: { type: '分类,见下表(默认为 `tzgg`)' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportRadar: true, + supportScihub: false, + }, + radar: [ + { + source: ['xc.hfut.edu.cn'], + }, + ], + name: '宣城校区通知', + maintainers: ['batemax'], + handler, + description: `| 通知公告(https://xc.hfut.edu.cn/1955/list.htm) | 院系动态-工作通知(https://xc.hfut.edu.cn/gztz/list.htm) | + | ------------ | -------------- | + | tzgg | gztz |`, +}; + +async function handler(ctx) { + // set default router type + const type = ctx.req.param('type') ?? 'tzgg'; + + const { link, title, resultList } = await parseList(ctx, type); + + return { + title, + link, + description: '合肥工业大学宣城校区 - 通知公告', + item: resultList, + }; +} diff --git a/lib/routes/hfut/xc/utils.ts b/lib/routes/hfut/xc/utils.ts new file mode 100644 index 000000000000000..3e2c998fed6813b --- /dev/null +++ b/lib/routes/hfut/xc/utils.ts @@ -0,0 +1,73 @@ +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +const typeMap = { + tzgg: { name: 'tzgg', url: 'https://xc.hfut.edu.cn/1955/list.htm', root: 'https://xc.hfut.edu.cn', title: '合肥工业大学宣城校区 - 通知公告' }, + gztz: { name: 'gztz', url: 'https://xc.hfut.edu.cn/gztz/list.htm', root: 'https://xc.hfut.edu.cn', title: '合肥工业大学宣城校区 - 院系动态 - 工作通知' }, +}; + +const commLink = 'https://xc.hfut.edu.cn/'; + +const parseList = async (ctx, type) => { + const link = typeMap[type].url; + const title = typeMap[type].title; + + const response = await got(link); + const $ = load(response.data); + + const resultList = await parseArticle($); + + return { + title, + link, + resultList, + }; +}; + +async function parseArticle($) { + const data = $('#wp_news_w6').find('li').toArray(); + + const items = data.map((item) => { + item = $(item); + const oriLink = item.find('a').attr('href'); + let linkRes = oriLink; + if (!oriLink.startsWith('http')) { + linkRes = commLink + item.find('a').attr('href'); + } + const pubDate = parseDate(item.find('.news_meta').text(), 'YYYY-MM-DD'); + + return { + title: item.find('a').attr('title'), + pubDate, + link: linkRes, + }; + }); + + const resultItems = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + let description; + try { + const response = await got(item.link); + const $ = load(response.data); + description = $('.wp_articlecontent').html() ?? $('.v_news_content').html() ?? item.link; + } catch { + description = item.link; + } + + return { + title: item.title, + link: item.link, + description, + pubDate: item.pubDate, + }; + }) + ) + ); + + return resultItems; +} + +export default parseList; From a5e0ccd3e7a9a9f000ec71035d7d0cbb662d486a Mon Sep 17 00:00:00 2001 From: Neko Aria <990879119@qq.com> Date: Wed, 16 Oct 2024 23:50:39 +0800 Subject: [PATCH 155/740] fix(route/picuki): update title parsing logic (#17131) --- lib/routes/picuki/profile.ts | 89 ++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 39 deletions(-) diff --git a/lib/routes/picuki/profile.ts b/lib/routes/picuki/profile.ts index 9297b5f41e0be4d..4a7185cf01489b2 100644 --- a/lib/routes/picuki/profile.ts +++ b/lib/routes/picuki/profile.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { DataItem, Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -16,20 +16,29 @@ function deVideo(media) { let media_deVideo = ''; $('img,video').each((_, medium) => { const tag = medium.name; - medium = $(medium); - const poster = medium.attr('poster'); + const mediumElement = $(medium); + const poster = mediumElement.attr('poster'); // 如果有 poster 属性,表明它是视频,将它替换为它的 poster;如果不是,就原样返回 - media_deVideo += poster ? `<img src='${poster}' alt='video poster'>` : tag === 'img' ? medium.toString() : ''; + media_deVideo += (() => { + if (poster) { + return `<img src='${poster}' alt='video poster'>`; + } else if (tag === 'img') { + return mediumElement.toString(); + } else { + return ''; + } + })(); }); return media_deVideo; } export const route: Route = { - path: '/profile/:id/:functionalFlag?', + path: '/profile/:id/:type?/:functionalFlag?', categories: ['social-media'], example: '/picuki/profile/stefaniejoosten', parameters: { id: 'Instagram user id', + type: 'Type of profile page (profile or tagged)', functionalFlag: `functional flag, see the table below | functionalFlag | Video embedding | Fetching Instagram Stories | | -------------- | --------------------------------------- | -------------------------- | @@ -51,9 +60,13 @@ export const route: Route = { source: ['www.picuki.com/profile/:id'], target: '/profile/:id', }, + { + source: ['www.picuki.com/profile-tagged/:id'], + target: '/profile/:id/tagged', + }, ], name: 'User Profile - Picuki', - maintainers: ['hoilc', 'Rongronggg9', 'devinmugen'], + maintainers: ['hoilc', 'Rongronggg9', 'devinmugen', 'NekoAria'], handler, description: ` :::warning @@ -67,61 +80,58 @@ async function handler(ctx) { const browser = await puppeteer(); const id = ctx.req.param('id'); - const displayVideo = ctx.req.param('functionalFlag') !== '0'; - const includeStories = ctx.req.param('functionalFlag') === '10'; + const type = ctx.req.param('type') ?? 'profile'; + const functionalFlag = ctx.req.param('functionalFlag') ?? '1'; + const displayVideo = functionalFlag !== '0'; + const includeStories = functionalFlag === '10'; - const profileUrl = `https://www.picuki.com/profile/${id}`; + const profileUrl = `https://www.picuki.com/${type === 'tagged' ? 'profile-tagged' : 'profile'}/${id}`; - const data = await cache.tryGet( - `picuki-${id}-profile-${includeStories}`, - async () => { - const _r = await puppeteerGet(profileUrl, browser, includeStories); - return _r; - }, - config.cache.routeExpire, - false - ); + const key = `picuki-${id}-${type}-${includeStories}`; + const data = await cache.tryGet(key, () => puppeteerGet(profileUrl, browser, includeStories), config.cache.routeExpire, false); const $ = load(data); const profileName = $('.profile-name-bottom').text(); + const profileTitle = type === 'tagged' ? `${profileName} (@${id}) tagged posts - Picuki` : `${profileName} (@${id}) public posts - Picuki`; const profileImg = $('.profile-avatar > img').attr('src'); const profileDescription = $('.profile-description').text(); - const list = $('ul.box-photos [data-s="media"]').get(); + const list = $('ul.box-photos [data-s="media"]').toArray(); + + let items: DataItem[] = []; - let items = []; + let description: string; if (includeStories) { const stories_wrapper = $('.stories_wrapper'); if (stories_wrapper.length) { const storyItems = $(stories_wrapper) .find('.item') - .get() + .toArray() .map((item) => { const $item = $(item); - let title = $item.find('.stories_count'); - title = title.length ? title.text() : ''; - const pubDate = title ? chrono.parseDate(title) : new Date(); + const titleElement = $item.find('.stories_count'); + const title = titleElement.length ? titleElement.text() : ''; + const pubDate = chrono.parseDate(title) || new Date(); const postBox = $item.find('.launchLightbox'); const poster = postBox.attr('data-video-poster'); const href = postBox.attr('href'); const type = postBox.attr('data-post-type'); // video / image const origin = postBox.attr('data-origin'); const storiesBackground = $item.find('.stories_background'); - const storiesBackgroundUrl = storiesBackground && storiesBackground.css('background-image').match(/url\('?(.*)'?\)/); - const storiesBackgroundUrlSrc = storiesBackgroundUrl && storiesBackgroundUrl[1]; - let description; + const storiesBackgroundUrl = storiesBackground?.css('background-image')?.match(/url\('?(.*)'?\)/); + const storiesBackgroundUrlSrc = storiesBackgroundUrl?.[1]; if (type === 'video') { description = art(path.join(__dirname, 'templates/video.art'), { videoSrcs: [href, origin].filter(Boolean), - videoPoster: poster || storiesBackgroundUrlSrc || '', + videoPoster: poster ?? storiesBackgroundUrlSrc ?? '', }); } else if (type === 'image') { - description = `<img src="${href || poster || storiesBackgroundUrlSrc || ''}" alt="Instagram Story">`; + description = `<img src="${href ?? poster ?? storiesBackgroundUrlSrc ?? ''}" alt="Instagram Story">`; } return { - title: 'Instagram Story' + (pubDate ? '' : `: ${title}`), + title: title ? `Instagram Story: ${title}` : 'Instagram Story', author: `@${id}`, description, link: href, @@ -149,8 +159,8 @@ async function handler(ctx) { $('.single-photo img').each((_, item) => { html += $(item).toString(); }); - $('.single-photo video').each((_, item) => { - item = $(item); + $('.single-photo video').each((_, element) => { + const item = $(element); let videoSrc = item.attr('src'); if (videoSrc === undefined) { videoSrc = item.children().attr('src'); @@ -158,8 +168,9 @@ async function handler(ctx) { const videoPoster = item.attr('poster'); let origin = item.parent().attr('onclick'); if (origin) { - origin = origin.match(/window\.open\('([^']*)'/); - origin = origin && origin[1]; + const regex = /window\.open\('([^']*)'/; + const match = regex.exec(origin); + origin = match?.[1]; } html += art(path.join(__dirname, 'templates/video.art'), { videoSrcs: [videoSrc, origin].filter(Boolean), @@ -172,15 +183,15 @@ async function handler(ctx) { items = [ ...items, ...(await Promise.all( - list.map(async (post) => { - post = $(post); + list.map(async (item) => { + const post = $(item); const postLink = post.find('.photo > a').attr('href'); const postTime = post.find('.time'); - const pubDate = postTime ? chrono.parseDate(postTime.text()) : new Date(); + const pubDate = postTime?.text() ? (chrono.parseDate(postTime.text()) ?? new Date()) : new Date(); const media_displayVideo = await getMedia(postLink); const postText = post - .find('.photo-description') + .find('.photo-action-description') .text() .trim() .replaceAll(/[^\S\n]+/g, ' ') @@ -206,7 +217,7 @@ async function handler(ctx) { await browser.close(); return { - title: `${profileName} (@${id}) - Picuki`, + title: profileTitle, link: profileUrl, image: profileImg, description: profileDescription, From 983bc8f360839d3fe1840991bc7bd2f57f72ad38 Mon Sep 17 00:00:00 2001 From: Neko Aria <990879119@qq.com> Date: Thu, 17 Oct 2024 00:18:10 +0800 Subject: [PATCH 156/740] fix(route/zaobao): update list parsing logic (#17152) --- lib/routes/zaobao/util.ts | 84 +++++++++++++++++++-------------------- 1 file changed, 41 insertions(+), 43 deletions(-) diff --git a/lib/routes/zaobao/util.ts b/lib/routes/zaobao/util.ts index 19fc63a51a6d2ff..4de18e3a57ecd81 100644 --- a/lib/routes/zaobao/util.ts +++ b/lib/routes/zaobao/util.ts @@ -38,7 +38,7 @@ const parseList = async ( }> => { const response = await got_ins.get(baseUrl + sectionUrl); const $ = load(response.data); - let data = /realtime/.test(sectionUrl) ? $('.card-listing .card') : $('.article-list').find('.article-type'); + let data = $('.card-listing .card'); if (data.length === 0) { // for HK version data = $('.clearfix').find('.list-block'); @@ -104,48 +104,7 @@ const parseList = async ( const articleBody = articleBodyNode.html(); - const imageDataArray = []; - if ($1('.inline-figure-img').length) { - // for SG version - imageDataArray.push({ - type: 'normalHTML', - html: $1('.inline-figure-img') - .html() - .replace(/\/\/.*\.com\/s3fs-public/, '//static.zaobao.com/s3fs-public') - .replace(/s3\/files/, 's3fs-public'), - }); - } - if ($1('.body-content .loadme picture img').length) { - // Unused? - imageDataArray.push({ - type: 'data', - src: $1('.body-content .loadme picture source') - .attr('data-srcset') - .replace(/\/\/.*\.com\/s3fs-public/, '//static.zaobao.com/s3fs-public') - .replace(/s3\/files/, 's3fs-public'), - title: $1('.body-content .loadme picture img').attr('title'), - }); - } - if ($1('.inline-figure-gallery').length) { - // for SG version - imageDataArray.push({ - type: 'normalHTML', - html: $1('.inline-figure-gallery') - .html() - .replaceAll(/\/\/.*\.com\/s3fs-public/g, '//static.zaobao.com/s3fs-public') - .replaceAll('s3/files', 's3fs-public'), - }); - } - if ($1('#carousel-article').length) { - // for HK version, HK version of multi images use same selector as single image, so g is needed for all pages - imageDataArray.push({ - type: 'normalHTML', - html: $1('#carousel-article .carousel-inner') - .html() - .replaceAll(/\/\/.*\.com\/s3fs-public/g, '//static.zaobao.com/s3fs-public') - .replaceAll('s3/files', 's3fs-public'), - }); - } + const imageDataArray = processImageData($1); return { // <- for SG version -> for HK version @@ -182,4 +141,43 @@ const orderContent = (parent) => { } }; +interface ImageData { + type: string; + html: string; + src?: string; + title?: string; +} + +const processImageData = ($1) => { + const imageDataArray: ImageData[] = []; + + const imageSelectors = [ + '.inline-figure-img', // for SG version + '.body-content .loadme picture img', // Unused? + '.inline-figure-gallery', // for SG version + '#carousel-article', // for HK version, HK version of multi images use same selector as single image, so g is needed for all pages + ]; + + for (const selector of imageSelectors) { + if ($1(selector).length) { + let html = $1(selector === '#carousel-article' ? '#carousel-article .carousel-inner' : selector).html(); + + if (html) { + html = html.replaceAll(/\/\/.*\.com\/s3fs-public/g, '//static.zaobao.com/s3fs-public').replaceAll('s3/files', 's3fs-public'); + + imageDataArray.push({ + type: selector === '.body-content .loadme picture img' ? 'data' : 'normalHTML', + html, + ...(selector === '.body-content .loadme picture img' && { + src: $1('.body-content .loadme picture source').attr('data-srcset'), + title: $1(selector).attr('title'), + }), + }); + } + } + } + + return imageDataArray; +}; + export { parseList, orderContent }; From 1309c5083eb60913580d1bb1ae84b0bd3b8aeaa3 Mon Sep 17 00:00:00 2001 From: chris zheng <chrisis58@foxmail.com> Date: Thu, 17 Oct 2024 01:07:51 +0800 Subject: [PATCH 157/740] feat(route): add route for graduacted school of CJLU (China Jiliang University) (#17149) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(namespace): add namespace for CJLU * feat(route): Add route for graduate school of CJLU 为中国计量大学研究生院添加路由 支持将`教师通知`和`研究生通知`页面转化为 RSS 订阅源 * doc: modify discription of some params 修改参数描述 * fix(radar rule): modify radar rule 修改 radar 规则,以正确提供订阅源 * fix: add exception handling 增加异常处理 * chore: optimize conditional logic 优化判断逻辑 * Update lib/routes/cjlu/yjsy/index.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * fix(radar rule): list all source choices 在 radar 规则中列出全部的类型 修改行尾符为 LF * fix(example): correct example of the route 订正路由的案例 --------- --- lib/routes/cjlu/namespace.ts | 10 ++++ lib/routes/cjlu/yjsy/index.ts | 107 ++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+) create mode 100644 lib/routes/cjlu/namespace.ts create mode 100644 lib/routes/cjlu/yjsy/index.ts diff --git a/lib/routes/cjlu/namespace.ts b/lib/routes/cjlu/namespace.ts new file mode 100644 index 000000000000000..f1763025c3ba620 --- /dev/null +++ b/lib/routes/cjlu/namespace.ts @@ -0,0 +1,10 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'China Jiliang University', + url: 'www.cjlu.edu.cn', + + zh: { + name: '中国计量大学', + }, +}; diff --git a/lib/routes/cjlu/yjsy/index.ts b/lib/routes/cjlu/yjsy/index.ts new file mode 100644 index 000000000000000..1785e2dc3d6a6b8 --- /dev/null +++ b/lib/routes/cjlu/yjsy/index.ts @@ -0,0 +1,107 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import cache from '@/utils/cache'; +import timezone from '@/utils/timezone'; + +const host = 'https://yjsy.cjlu.edu.cn/'; + +const titleMap = new Map([ + ['yjstz', '中量大研究生院 —— 研究生通知'], + ['jstz', '中量大研究生院 —— 教师通知'], +]); + +export const route: Route = { + path: '/yjsy/:cate', + categories: ['university'], + example: '/cjlu/yjsy/yjstz', + parameters: { + cate: '订阅的类型,支持 yjstz(研究生通知)和 jstz(教师通知)', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + title: '研究生通知', + source: ['yjsy.cjlu.edu.cn/index/yjstz/:suffix', 'yjsy.cjlu.edu.cn/index/yjstz.htm'], + target: '/yjsy/yjstz', + }, + { + title: '教师通知', + source: ['yjsy.cjlu.edu.cn/index/jstz/:suffix', 'yjsy.cjlu.edu.cn/index/jstz.htm'], + target: '/yjsy/jstz', + }, + ], + name: '研究生院', + maintainers: ['chrisis58'], + handler, + description: `| 研究生通知 | 教师通知 | + | -------- | -------- | + | yjstz | jstz |`, +}; + +async function handler(ctx) { + const cate = ctx.req.param('cate'); + + const response = await ofetch(`${cate}.htm`, { + baseURL: `${host}/index/`, + responseType: 'text', + }); + + const $ = load(response); + + const list = $('div.grid685.right div.body ul') + .find('li') + .toArray() + .map((element) => { + const item = $(element); + + const a = item.find('a').first(); + + const timeStr = item.find('span').first().text().trim(); + const href = a.attr('href') ?? ''; + const route = href.startsWith('../') ? href.replace(/^\.\.\//, '') : href; + + return { + title: a.attr('title') ?? titleMap.get(cate), + pubDate: timezone(parseDate(timeStr, 'YYYY/MM/DD'), +8), + link: `${host}${route}`, + description: '', + }; + }); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + if (!item.link || item.link === host) { + return item; + } + + const res = await ofetch(item.link, { + responseType: 'text', + }); + const $ = load(res); + + const content = $('#vsb_content').html() ?? ''; + const attachments = $('form[name="_newscontent_fromname"] div ul').html() ?? ''; + + item.description = `${content}<br>${attachments}`; + return item; + }) + ) + ); + + return { + title: titleMap.get(cate), + link: `https://yjsy.cjlu.edu.cn/index/${cate}.htm`, + item: items, + }; +} From e4eedac24f4e59e10d40174a1fc93a255bf489a2 Mon Sep 17 00:00:00 2001 From: zreo0 <zhengbanzw@hotmail.com> Date: Thu, 17 Oct 2024 05:08:26 +0800 Subject: [PATCH 158/740] feat(route): add route aibase/news (#17164) --- lib/routes/aibase/news.ts | 118 ++++++++++++++++++++++++++++++++++++++ lib/routes/aibase/util.ts | 3 + 2 files changed, 121 insertions(+) create mode 100644 lib/routes/aibase/news.ts diff --git a/lib/routes/aibase/news.ts b/lib/routes/aibase/news.ts new file mode 100644 index 000000000000000..cdc173d01fb48a5 --- /dev/null +++ b/lib/routes/aibase/news.ts @@ -0,0 +1,118 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import { rootUrl, buildApiUrl } from './util'; + +export const route: Route = { + path: '/news', + name: '资讯', + url: 'www.aibase.com', + maintainers: ['zreo0'], + handler: async (ctx) => { + // 每页数量限制 + const limit = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + // 用项目中已有的获取页面方法,获取页面以及 Token + const currentUrl = new URL('discover', rootUrl).href; + const currentHtml = await ofetch(currentUrl); + const $ = load(currentHtml); + const logoSrc = $('img.logo').prop('src'); + const image = logoSrc ? new URL(logoSrc, rootUrl).href : ''; + const author = $('title').text().split(/_/).pop(); + const { apiInfoListUrl } = await buildApiUrl($); + // 获取资讯列表,解析数据 + const data: NewsItem[] = await ofetch(apiInfoListUrl, { + headers: { + accept: 'application/json;charset=utf-8', + }, + query: { + pagesize: limit, + page: 1, + type: 1, + isen: 0, + }, + }); + const items = data.map((item) => ({ + // 文章标题 + title: item.title, + // 文章链接 + link: `https://www.aibase.com/zh/news/${item.Id}`, + // 文章正文 + description: item.summary, + // 文章发布日期 + pubDate: parseDate(item.addtime), + // 文章作者 + author: item.author || 'AI Base', + })); + + return { + title: 'AI新闻资讯', + description: 'AI新闻资讯 - 不错过全球AI革新的每一个时刻', + language: 'zh-cn', + link: 'https://www.aibase.com/zh/news', + item: items, + allowEmpty: true, + image, + author, + }; + }, + example: '/aibase/news', + description: '获取 AI 资讯列表', + categories: ['new-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.aibase.com/zh/news'], + target: '/news', + }, + ], +}; + +/** API 返回的资讯结构 */ +interface NewsItem { + /** 文章 ID */ + Id: number; + /** 文章标题 */ + title: string; + /** 文章副标题 */ + subtitle: string; + /** 文章简要描述 */ + description: string; + /** 文章主图 */ + thumb: string; + classname: string; + /** 正文总结 */ + summary: string; + /** 标签,字符串,样例:[\"人工智能\",\"Hingham高中\"] */ + tags: string; + /** 可能是来源 */ + sourcename: string; + /** 作者 */ + author: string; + status: number; + url: string; + type: number; + added: number; + /** 添加时间 */ + addtime: string; + /** 更新时间 */ + upded: number; + updtime: string; + isshoulu: number; + vurl: string; + vsize: number; + weight: number; + isailog: number; + sites: string; + categrates: string; + /** 访问量 */ + pv: number; +} diff --git a/lib/routes/aibase/util.ts b/lib/routes/aibase/util.ts index c2f9289cc6ba135..066473c8b85d87b 100644 --- a/lib/routes/aibase/util.ts +++ b/lib/routes/aibase/util.ts @@ -57,11 +57,14 @@ const buildApiUrl = async ($: CheerioAPI) => { const apiRecommListUrl = new URL(`${token}/ai/GetAIProcRecommList.aspx`, apiRootUrl).href; const apiRecommProcUrl = new URL(`${token}/ai/GetAIProcListByRecomm.aspx`, apiRootUrl).href; const apiTagProcUrl = new URL(`${token}/ai/GetAiProductOfTag.aspx`, apiRootUrl).href; + // AI 资讯列表 + const apiInfoListUrl = new URL(`${token}/ai/GetAiInfoList.aspx`, apiRootUrl).href; return { apiRecommListUrl, apiRecommProcUrl, apiTagProcUrl, + apiInfoListUrl, }; }; From 578e2f12fe1d587a1a068439f0343793a1bd46b8 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 17 Oct 2024 20:32:13 +0800 Subject: [PATCH 159/740] feat(route/bilibili): generate and replace `b_lsid` in cookie --- lib/routes/bilibili/cache.ts | 20 +++++++++++++++++++- lib/routes/bilibili/video.ts | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/routes/bilibili/cache.ts b/lib/routes/bilibili/cache.ts index 34c2502c397c1a9..7e4c4951caf6975 100644 --- a/lib/routes/bilibili/cache.ts +++ b/lib/routes/bilibili/cache.ts @@ -8,8 +8,18 @@ import puppeteer from '@/utils/puppeteer'; import { JSDOM } from 'jsdom'; let disableConfigCookie = false; + const getCookie = () => { if (!disableConfigCookie && Object.keys(config.bilibili.cookies).length > 0) { + // Update b_lsid in cookies + for (const key of Object.keys(config.bilibili.cookies)) { + const cookie = config.bilibili.cookies[key]; + if (cookie) { + const updatedCookie = cookie.replace(/b_lsid=[0-9A-F]+_[0-9A-F]+/, `b_lsid=${generateBLsid()}`); + config.bilibili.cookies[key] = updatedCookie; + } + } + return config.bilibili.cookies[Object.keys(config.bilibili.cookies)[Math.floor(Math.random() * Object.keys(config.bilibili.cookies).length)]]; } const key = 'bili-cookie'; @@ -22,7 +32,9 @@ const getCookie = () => { page.on('requestfinished', async (request) => { if (request.url() === 'https://api.bilibili.com/x/internal/gaia-gateway/ExClimbWuzhi') { const cookies = await page.cookies(); - const cookieString = cookies.map((cookie) => `${cookie.name}=${cookie.value}`).join('; '); + let cookieString = cookies.map((cookie) => `${cookie.name}=${cookie.value}`).join('; '); + + cookieString = cookieString.replace(/b_lsid=[0-9A-F]+_[0-9A-F]+/, `b_lsid=${generateBLsid()}`); resolve(cookieString); } }); @@ -35,6 +47,12 @@ const getCookie = () => { }); }; +const generateBLsid = () => { + const randomString = Array.from({ length: 8 }, () => '0123456789ABCDEF'[Math.floor(Math.random() * 16)]).join(''); + const timestamp = Date.now(); + return `${randomString}_${timestamp.toString(16).toUpperCase()}`; +}; + const clearCookie = () => { cache.set('bili-cookie'); disableConfigCookie = true; diff --git a/lib/routes/bilibili/video.ts b/lib/routes/bilibili/video.ts index 4013e17877fbb84..7e4ea66ad1e355f 100644 --- a/lib/routes/bilibili/video.ts +++ b/lib/routes/bilibili/video.ts @@ -25,7 +25,7 @@ export const route: Route = { }, ], name: 'UP 主投稿', - maintainers: ['DIYgod', 'Konano'], + maintainers: ['DIYgod', 'Konano', 'pseudoyu'], handler, }; From 80dca3e2d1ae92c30ee059bb5d0762870dfb7544 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 07:03:39 -0700 Subject: [PATCH 160/740] chore(deps): bump @scalar/hono-api-reference from 0.5.154 to 0.5.155 (#17174) * chore(deps): bump @scalar/hono-api-reference from 0.5.154 to 0.5.155 Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.154 to 0.5.155. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 7f7711ec02f7900..45d65ac7f12849b 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.22", - "@scalar/hono-api-reference": "0.5.154", + "@scalar/hono-api-reference": "0.5.155", "@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 1dce3d75e7db3d3..d33571459fbc9a4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: 0.0.22 version: 0.0.22 '@scalar/hono-api-reference': - specifier: 0.5.154 - version: 0.5.154(hono@4.6.5) + specifier: 0.5.155 + version: 0.5.155(hono@4.6.5) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1690,8 +1690,8 @@ packages: '@rss3/sdk@0.0.22': resolution: {integrity: sha512-yBfxbEoVxzBWeCccWDTH6VXy+TxkTnW7D8QwKbq+IQVb8ou7g1vw9oLy4E4yEu2CJ8XEZNE2BaTl2l0BWxcGOQ==} - '@scalar/hono-api-reference@0.5.154': - resolution: {integrity: sha512-v5ufLt7OG27BsPqO20YtnLvIcTsRZjU5jbFbpMUguW+SFgRWh1gji2RlC4BfK5x9hrK1Ek0hz46OMYweWp4I3w==} + '@scalar/hono-api-reference@0.5.155': + resolution: {integrity: sha512-7sUxr/EFUyO3suACAIN5dUXKAyZAI3XEW/J/qSkMZHyWPBfhJb/ZhvaU+hNQlR0GEb3zg5aC6D9qK3Z3zEXjAA==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -1700,8 +1700,8 @@ packages: resolution: {integrity: sha512-UPUquC/ZSAdeSDbpdqMzeBVcgeytqJTj9P3QR4X9IRti5I1jXoCOUBY84CGGLXfcWquB7wfwHxn3DqQEnQmBVw==} engines: {node: '>=18'} - '@scalar/types@0.0.15': - resolution: {integrity: sha512-9fSBoAuJTsmnt2FTkm/F6LRq+TIeeRI0H8wz+7J3pHfcw0YGFEZrRZOo1WZ8fpovD0fQgg+r4BPrtN8+qJ12wQ==} + '@scalar/types@0.0.16': + resolution: {integrity: sha512-9Pcp4xdQuRGwf4bZmx1e6NKz5QD06kG4S8kxryD3UfVCtnDDqBG6vUWJjjkFzlUK/jvAx7Rl92C4mK5GrauTng==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -2756,8 +2756,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.39: - resolution: {integrity: sha512-4xkpSR6CjuiaNyvwiWDI85N9AxsvbPawB8xc7yzLPonYTuP19BVgYweKyUMFtHEZgIcHWMt1ks5Cqx2m+6/Grg==} + electron-to-chromium@1.5.40: + resolution: {integrity: sha512-LYm78o6if4zTasnYclgQzxEcgMoIcybWOhkATWepN95uwVVWV0/IW10v+2sIeHE+bIYWipLneTftVyQm45UY7g==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -4504,8 +4504,8 @@ packages: performance-now@2.1.0: resolution: {integrity: sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==} - picocolors@1.1.0: - resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} @@ -5253,8 +5253,8 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.51: - resolution: {integrity: sha512-bu9oCYYWC1iRjx+3UnAjqCsfrWNZV1ghNQf49b3w5xE8J/tNShHTzp5syWJfwGH+pxUgTTLUnzHnfuydW7wmbg==} + tldts-core@6.1.52: + resolution: {integrity: sha512-j4OxQI5rc1Ve/4m/9o2WhWSC4jGc4uVbCINdOEJRAraCi0YqTqgMcxUx7DbmuP0G3PCixoof/RZB0Q5Kh9tagw==} tldts@6.1.51: resolution: {integrity: sha512-33lfQoL0JsDogIbZ8fgRyvv77GnRtwkNE/MOKocwUgPO1WrSfsq7+vQRKxRQZai5zd+zg97Iv9fpFQSzHyWdLA==} @@ -5815,7 +5815,7 @@ snapshots: '@babel/code-frame@7.25.7': dependencies: '@babel/highlight': 7.25.7 - picocolors: 1.1.0 + picocolors: 1.1.1 '@babel/compat-data@7.25.8': {} @@ -5982,7 +5982,7 @@ snapshots: '@babel/helper-validator-identifier': 7.25.7 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.1.0 + picocolors: 1.1.1 '@babel/parser@7.25.8': dependencies: @@ -7148,14 +7148,14 @@ snapshots: '@rss3/api-core': 0.0.22 '@rss3/api-utils': 0.0.22 - '@scalar/hono-api-reference@0.5.154(hono@4.6.5)': + '@scalar/hono-api-reference@0.5.155(hono@4.6.5)': dependencies: - '@scalar/types': 0.0.15 + '@scalar/types': 0.0.16 hono: 4.6.5 '@scalar/openapi-types@0.1.3': {} - '@scalar/types@0.0.15': + '@scalar/types@0.0.16': dependencies: '@scalar/openapi-types': 0.1.3 '@unhead/schema': 1.11.10 @@ -7765,7 +7765,7 @@ snapshots: browserslist@4.24.0: dependencies: caniuse-lite: 1.0.30001669 - electron-to-chromium: 1.5.39 + electron-to-chromium: 1.5.40 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) @@ -8306,7 +8306,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.39: {} + electron-to-chromium@1.5.40: {} ellipsize@0.1.0: {} @@ -10359,7 +10359,7 @@ snapshots: performance-now@2.1.0: {} - picocolors@1.1.0: {} + picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -10393,7 +10393,7 @@ snapshots: postcss@8.4.47: dependencies: nanoid: 3.3.7 - picocolors: 1.1.0 + picocolors: 1.1.1 source-map-js: 1.2.1 postman-request@2.88.1-postman.40: @@ -11186,11 +11186,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.51: {} + tldts-core@6.1.52: {} tldts@6.1.51: dependencies: - tldts-core: 6.1.51 + tldts-core: 6.1.52 tmp@0.0.33: dependencies: @@ -11358,7 +11358,7 @@ snapshots: dependencies: browserslist: 4.24.0 escalade: 3.2.0 - picocolors: 1.1.0 + picocolors: 1.1.1 upper-case@1.1.3: {} From 7680bbcc0f4281708307dfa573d19aad37b0e7fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 07:04:05 -0700 Subject: [PATCH 161/740] chore(deps): bump tldts from 6.1.51 to 6.1.52 (#17172) * chore(deps): bump tldts from 6.1.51 to 6.1.52 Bumps [tldts](https://github.com/remusao/tldts) from 6.1.51 to 6.1.52. - [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.51...v6.1.52) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 45d65ac7f12849b..8465295ba17adaa 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "telegram": "2.25.15", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.51", + "tldts": "6.1.52", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d33571459fbc9a4..f7bdcd8ff57e511 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,8 +228,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.51 - version: 6.1.51 + specifier: 6.1.52 + version: 6.1.52 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5256,8 +5256,8 @@ packages: tldts-core@6.1.52: resolution: {integrity: sha512-j4OxQI5rc1Ve/4m/9o2WhWSC4jGc4uVbCINdOEJRAraCi0YqTqgMcxUx7DbmuP0G3PCixoof/RZB0Q5Kh9tagw==} - tldts@6.1.51: - resolution: {integrity: sha512-33lfQoL0JsDogIbZ8fgRyvv77GnRtwkNE/MOKocwUgPO1WrSfsq7+vQRKxRQZai5zd+zg97Iv9fpFQSzHyWdLA==} + tldts@6.1.52: + resolution: {integrity: sha512-fgrDJXDjbAverY6XnIt0lNfv8A0cf7maTEaZxNykLGsLG7XP+5xhjBTrt/ieAsFjAlZ+G5nmXomLcZDkxXnDzw==} hasBin: true tmp@0.0.33: @@ -11188,7 +11188,7 @@ snapshots: tldts-core@6.1.52: {} - tldts@6.1.51: + tldts@6.1.52: dependencies: tldts-core: 6.1.52 @@ -11228,7 +11228,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.51 + tldts: 6.1.52 tr46@0.0.3: {} From 65114a5b41bc02186af079cf1bfe9b04288d0db1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 07:05:24 -0700 Subject: [PATCH 162/740] chore(deps-dev): bump @types/node from 22.7.5 to 22.7.6 (#17173) * chore(deps-dev): bump @types/node from 22.7.5 to 22.7.6 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.7.5 to 22.7.6. - [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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 8465295ba17adaa..d1e08a3801914d3 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.7.5", + "@types/node": "22.7.6", "@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 f7bdcd8ff57e511..e83ef481d380fba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -325,8 +325,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.7.5 - version: 22.7.5 + specifier: 22.7.6 + version: 22.7.6 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -353,7 +353,7 @@ importers: version: 0.27.4 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.7.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.102 version: 0.37.102 @@ -419,10 +419,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.5)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.6)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.7.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1858,8 +1858,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.7.5': - resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} + '@types/node@22.7.6': + resolution: {integrity: sha512-/d7Rnj0/ExXDMcioS78/kf1lMzYk4BZV8MZGTBKzTGZ6/406ukkbYlIsZmMPhcR5KlkunDHQLrtAVmSq7r+mSw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6784,7 +6784,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.7.5 + '@types/node': 22.7.6 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7252,12 +7252,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.6 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.7.5 + '@types/node': 22.7.6 '@types/html-to-text@9.0.4': {} @@ -7265,13 +7265,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.6 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.6 '@types/tough-cookie': 4.0.5 parse5: 7.2.0 @@ -7281,7 +7281,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.6 '@types/jsrsasign@10.5.13': {} @@ -7291,7 +7291,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.6 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7313,14 +7313,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.6 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.6 form-data: 4.0.1 - '@types/node@22.7.5': + '@types/node@22.7.6': dependencies: undici-types: 6.19.8 @@ -7334,7 +7334,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.7.5 + '@types/node': 22.7.6 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7348,7 +7348,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.7.5 + '@types/node': 22.7.6 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7372,7 +7372,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.6 optional: true '@typescript-eslint/eslint-plugin@8.9.0(@typescript-eslint/parser@8.9.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3)': @@ -7481,7 +7481,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7495,7 +7495,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.7.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10451,7 +10451,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.7.5 + '@types/node': 22.7.6 long: 5.2.3 proxy-agent@6.4.0: @@ -11421,13 +11421,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.7.5): + vite-node@2.0.5(@types/node@22.7.6): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.7.5) + vite: 5.4.9(@types/node@22.7.6) transitivePeerDependencies: - '@types/node' - less @@ -11439,27 +11439,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.5)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.6)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.9(@types/node@22.7.5) + vite: 5.4.9(@types/node@22.7.6) transitivePeerDependencies: - supports-color - typescript - vite@5.4.9(@types/node@22.7.5): + vite@5.4.9(@types/node@22.7.6): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.0 optionalDependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.6 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.7.5)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.7.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11477,11 +11477,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.7.5) - vite-node: 2.0.5(@types/node@22.7.5) + vite: 5.4.9(@types/node@22.7.6) + vite-node: 2.0.5(@types/node@22.7.6) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.7.5 + '@types/node': 22.7.6 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From c986500e2dad08b29f4ca9ae45d293c11b40808c Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Thu, 17 Oct 2024 22:05:56 +0800 Subject: [PATCH 163/740] fix(route/the): Adjust default limit to get the latest articles (#17171) --- lib/routes/the/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/the/index.ts b/lib/routes/the/index.ts index 97d6a8d1b7d9c9d..a4e5d52398d54aa 100644 --- a/lib/routes/the/index.ts +++ b/lib/routes/the/index.ts @@ -13,7 +13,7 @@ import timezone from '@/utils/timezone'; export const handler = async (ctx) => { const { filter } = ctx.req.param(); - const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 40; const rootUrl = 'https://the.bi/s'; const filters = parseFilterStr(filter); From b8695ad28a425b64732b8cad17bd4c4b20abaac0 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 17 Oct 2024 22:54:00 +0800 Subject: [PATCH 164/740] refactor: reuse lsid() in bilibili util --- lib/routes/bilibili/cache.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/routes/bilibili/cache.ts b/lib/routes/bilibili/cache.ts index 7e4c4951caf6975..a4a43e83ecda6e0 100644 --- a/lib/routes/bilibili/cache.ts +++ b/lib/routes/bilibili/cache.ts @@ -15,7 +15,7 @@ const getCookie = () => { for (const key of Object.keys(config.bilibili.cookies)) { const cookie = config.bilibili.cookies[key]; if (cookie) { - const updatedCookie = cookie.replace(/b_lsid=[0-9A-F]+_[0-9A-F]+/, `b_lsid=${generateBLsid()}`); + const updatedCookie = cookie.replace(/b_lsid=[0-9A-F]+_[0-9A-F]+/, `b_lsid=${utils.lsid()}`); config.bilibili.cookies[key] = updatedCookie; } } @@ -34,7 +34,7 @@ const getCookie = () => { const cookies = await page.cookies(); let cookieString = cookies.map((cookie) => `${cookie.name}=${cookie.value}`).join('; '); - cookieString = cookieString.replace(/b_lsid=[0-9A-F]+_[0-9A-F]+/, `b_lsid=${generateBLsid()}`); + cookieString = cookieString.replace(/b_lsid=[0-9A-F]+_[0-9A-F]+/, `b_lsid=${utils.lsid()}`); resolve(cookieString); } }); @@ -47,12 +47,6 @@ const getCookie = () => { }); }; -const generateBLsid = () => { - const randomString = Array.from({ length: 8 }, () => '0123456789ABCDEF'[Math.floor(Math.random() * 16)]).join(''); - const timestamp = Date.now(); - return `${randomString}_${timestamp.toString(16).toUpperCase()}`; -}; - const clearCookie = () => { cache.set('bili-cookie'); disableConfigCookie = true; From f8d7e71f2b2851e77e3994bb6aa49f5ea577138e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=B5=A9=E5=AE=87?= <37102468+HaoyuLee@users.noreply.github.com> Date: Thu, 17 Oct 2024 22:59:21 +0800 Subject: [PATCH 165/740] =?UTF-8?q?fix:=20route=20=E2=80=98/gov/zj/search/?= =?UTF-8?q?:websiteid=3F/:word/:cateid=3F=E2=80=99=20result.item=20dedupli?= =?UTF-8?q?cation=20(#16730)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: 宁波市人力资源保障局-某分类-公告列表 * feat: 宁波国资委-某分类-公告列表 * Update lib/routes/gov/zj/ningborsjnotice.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/gov/zj/ningbogzw-notice.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/gov/zj/ningbogzw-notice.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/gov/zj/ningborsjnotice.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * fix: description content indent update * fix: route ‘/gov/zj/search/:websiteid?/:word/:cateid?’ result.item deduplication * fix: route ‘/gov/zj/search/:websiteid?/:word/:cateid?’ result.item deduplication --------- --- lib/routes/gov/zj/search.ts | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/routes/gov/zj/search.ts b/lib/routes/gov/zj/search.ts index e3f2942fababfb9..e8c0bd9efb085ca 100644 --- a/lib/routes/gov/zj/search.ts +++ b/lib/routes/gov/zj/search.ts @@ -1,9 +1,8 @@ -import { Route } from '@/types'; +import { Route, DataItem } from '@/types'; import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import { load } from 'cheerio'; import dayjs from 'dayjs'; - export const route: Route = { path: '/zj/search/:websiteid?/:word/:cateid?', categories: ['government'], @@ -24,18 +23,18 @@ export const route: Route = { url: 'search.zj.gov.cn/jsearchfront/search.do', maintainers: ['HaoyuLee'], description: ` - | 行政区域 | websiteid | - | ------------ | -- | - | 宁波市本级 | 330201000000000 | +| 行政区域 | websiteid | +| ------------ | -- | +| 宁波市本级 | 330201000000000 | - | 搜索关键词 | word | +| 搜索关键词 | word | - | 信息分类 | cateid | +| 信息分类 | cateid | - | 排序类型 | sortType | - | ------------ | -- | - | 按相关度 | 1 | - | 按时间 | 2 | +| 排序类型 | sortType | +| ------------ | -- | +| 按相关度 | 1 | +| 按时间 | 2 | `, async handler(ctx) { const { websiteid = '330201000000000', word = '人才', cateid = 658, sortType = 2 } = ctx.req.param(); @@ -71,10 +70,16 @@ export const route: Route = { description: $('.newsDescribe>a').text() || '', }; }) || []; + const res = {}; + for (const current of items) { + if (!res[current.link]) { + res[current.link] = current; + } + } return { title: '浙江省人民政府-全省政府网站统一搜索', link: 'https://search.zj.gov.cn/jsearchfront/search.do', - item: items, + item: Object.entries(res).map(([, value]) => value) as DataItem[], }; }, }; From 3d34710b6eee0907f0f7658f4bfbd6f79e890669 Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Thu, 17 Oct 2024 16:42:25 +0100 Subject: [PATCH 166/740] feat(route): add icable route (#17105) * feat(route) add icable route * fix Disallow specified syntax * fix Move function definitions to the highest possible scope. * fix Disallow unnecessary escape characters * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review * Apply suggestions from code review --- lib/routes/i-cable/namespace.ts | 6 ++ lib/routes/i-cable/news.ts | 77 ++++++++++++++++++++ lib/routes/i-cable/templates/description.art | 8 ++ 3 files changed, 91 insertions(+) create mode 100644 lib/routes/i-cable/namespace.ts create mode 100644 lib/routes/i-cable/news.ts create mode 100644 lib/routes/i-cable/templates/description.art diff --git a/lib/routes/i-cable/namespace.ts b/lib/routes/i-cable/namespace.ts new file mode 100644 index 000000000000000..9a0945cbdde5cb4 --- /dev/null +++ b/lib/routes/i-cable/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '有線新聞', + url: 'i-cable.com', +}; diff --git a/lib/routes/i-cable/news.ts b/lib/routes/i-cable/news.ts new file mode 100644 index 000000000000000..d8819db08be361e --- /dev/null +++ b/lib/routes/i-cable/news.ts @@ -0,0 +1,77 @@ +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'], + example: '/i-cable/news', + parameters: { category: '分類,默認為新聞資訊' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.i-cable.com'], + target: '/news', + }, + { + source: ['www.i-cable.com/category/:category'], + target: '/news/:category', + }, + ], + name: '新聞', + maintainers: ['quiniapiezoelectricity'], + handler, + url: 'www.i-cable.com/', + description: ` +:::tip +分類只可用分類名稱,如:新聞資訊/港聞 +:::`, +}; + +async function handler(ctx) { + const category = ctx.req.param('category') ?? '新聞資訊'; + const limit = ctx.req.query('limit') ?? 20; + const root = 'https://www.i-cable.com/wp-json/wp/v2'; + + const response = await cache.tryGet(`${root}/categories?slug=${category}`, async () => await got(`${root}/categories?slug=${category}`), config.cache.routeExpire, false); + if (response.data.length < 1) { + throw new InvalidParameterError(`Invalid Category: ${category}`); + } + const metadata = response.data[0]; + + 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, + }); + return { + title: item.title.rendered, + link: item.link, + pubDate: item.date_gmt, + description, + category: item._embedded['wp:term'][0].map((term) => term.name) ?? [], + }; + }); + + return { + title: `有線新聞 - ${metadata.name}`, + description: metadata.description, + link: metadata.link, + item: items, + }; +} diff --git a/lib/routes/i-cable/templates/description.art b/lib/routes/i-cable/templates/description.art new file mode 100644 index 000000000000000..1748ab4221bd89f --- /dev/null +++ b/lib/routes/i-cable/templates/description.art @@ -0,0 +1,8 @@ +{{ if media.length > 0 }} + {{ each media }} + <figure><img src="{{ $value.source_url }}" /></figure> + {{ /each }} +{{ /if }} +{{ if content }} + {{@ content }} +{{ /if }} \ No newline at end of file From f455df8a3534a5713db9910ef9d02e4868959fe1 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 17 Oct 2024 09:25:53 -0700 Subject: [PATCH 167/740] fix(route): dcfever (#17179) --- lib/routes/dcfever/trading.ts | 8 +++----- lib/routes/dcfever/utils.ts | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/lib/routes/dcfever/trading.ts b/lib/routes/dcfever/trading.ts index 6641f7f4e8bb800..daf1cc4e9b227c8 100644 --- a/lib/routes/dcfever/trading.ts +++ b/lib/routes/dcfever/trading.ts @@ -29,16 +29,14 @@ async function handler(ctx) { const response = await ofetch(link.href); const $ = load(response); - const list = $('.item_list li a') + const list = $('.item_grid_wrap div a') .toArray() - .filter((item) => $(item).attr('href') !== '/documents/advertising.php') .map((item) => { item = $(item); - item.find('.optional').remove(); return { - title: item.find('.trade_title').text(), + title: item.find('.lazyloadx').attr('alt'), link: new URL(item.attr('href'), link.href).href, - author: item.find('.trade_info').text(), + author: item.find('.trade_info div span').eq(1).text(), }; }); diff --git a/lib/routes/dcfever/utils.ts b/lib/routes/dcfever/utils.ts index 8f8527bbf96883c..c22231477166588 100644 --- a/lib/routes/dcfever/utils.ts +++ b/lib/routes/dcfever/utils.ts @@ -63,11 +63,20 @@ const parseTradeItem = (item) => const response = await ofetch(item.link); const $ = load(response); - $('.selector_text').remove(); - $('.selector_image_div').each((_, div) => { + const photoSelector = $('#trading_item_section .description') + .contents() + .filter((_, e) => e.type === 'comment') + .toArray() + .map((e) => e.data) + .join(''); + + const $photo = load(photoSelector, null, false); + + $photo('.selector_text').remove(); + $photo('.selector_image_div').each((_, div) => { delete div.attribs.onclick; }); - $('.desktop_photo_selector img').each((_, img) => { + $photo('.desktop_photo_selector img').each((_, img) => { if (img.attribs.src.endsWith('_sqt.jpg')) { img.attribs.src = img.attribs.src.replace('_sqt.jpg', '.jpg'); } @@ -76,7 +85,7 @@ const parseTradeItem = (item) => item.description = art(path.join(__dirname, 'templates/trading.art'), { info: $('.info_col'), description: $('.description_text').html(), - photo: $('.desktop_photo_selector').html(), + photo: $photo('.desktop_photo_selector').html(), }); return item; From 9f44e77237eb46c54eabe6a06e8059430c1eb9c2 Mon Sep 17 00:00:00 2001 From: Otstar Lin <i@ixk.me> Date: Fri, 18 Oct 2024 09:47:17 +0800 Subject: [PATCH 168/740] fix(route/bilibili): add addDmVerifyInfoWithInter to bypass the risk control mechanism (#17147) --- lib/config.ts | 2 + lib/routes/bilibili/cache.ts | 10 ++-- lib/routes/bilibili/utils.ts | 88 ++++++++++++++++++++++++++++++++++-- lib/routes/bilibili/video.ts | 14 +++--- 4 files changed, 96 insertions(+), 18 deletions(-) diff --git a/lib/config.ts b/lib/config.ts index eaf103dddb8f0d7..87d28699df773ef 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -81,6 +81,7 @@ export type Config = { bilibili: { cookies: Record<string, string | undefined>; dmImgList?: string; + dmImgInter?: string; }; bitbucket: { username?: string; @@ -472,6 +473,7 @@ const calculateValue = () => { bilibili: { cookies: bilibili_cookies, dmImgList: envs.BILIBILI_DM_IMG_LIST, + dmImgInter: envs.BILIBILI_DM_IMG_INTER, }, bitbucket: { username: envs.BITBUCKET_USERNAME, diff --git a/lib/routes/bilibili/cache.ts b/lib/routes/bilibili/cache.ts index a4a43e83ecda6e0..102b776f181213a 100644 --- a/lib/routes/bilibili/cache.ts +++ b/lib/routes/bilibili/cache.ts @@ -141,13 +141,9 @@ const getUsernameAndFaceFromUID = async (uid) => { if (!name || !face) { const cookie = await getCookie(); const wbiVerifyString = await getWbiVerifyString(); - // await got(`https://space.bilibili.com/${uid}/`, { - // headers: { - // Referer: `https://www.bilibili.com/`, - // Cookie: cookie, - // }, - // }); - const params = utils.addWbiVerifyInfo(`mid=${uid}&token=&platform=web&web_location=1550101`, wbiVerifyString); + const dmImgList = utils.getDmImgList(); + const renderData = await getRenderData(uid); + const params = utils.addWbiVerifyInfo(utils.addRenderData(utils.addDmVerifyInfo(`mid=${uid}&token=&platform=web&web_location=1550101`, dmImgList), renderData), wbiVerifyString); const { data: nameResponse } = await got(`https://api.bilibili.com/x/space/wbi/acc/info?${params}`, { headers: { Referer: `https://space.bilibili.com/${uid}/`, diff --git a/lib/routes/bilibili/utils.ts b/lib/routes/bilibili/utils.ts index 2f2f974d2d45556..7a776e724ab1930 100644 --- a/lib/routes/bilibili/utils.ts +++ b/lib/routes/bilibili/utils.ts @@ -95,8 +95,8 @@ function getDmImgList() { const dmImgList = JSON.parse(config.bilibili.dmImgList); return JSON.stringify([dmImgList[Math.floor(Math.random() * dmImgList.length)]]); } - const x = Math.max(generateGaussianInteger(650, 5), 0); - const y = Math.max(generateGaussianInteger(400, 5), 0); + const x = Math.max(generateGaussianInteger(1245, 5), 0); + const y = Math.max(generateGaussianInteger(1285, 5), 0); const path = [ { x: 3 * x + 2 * y, @@ -109,12 +109,92 @@ function getDmImgList() { return JSON.stringify(path); } -function addDmVerifyInfo(params, dmImgList) { +function getDmImgInter() { + if (config.bilibili.dmImgInter !== undefined) { + const dmImgInter = JSON.parse(config.bilibili.dmImgInter); + return JSON.stringify([dmImgInter[Math.floor(Math.random() * dmImgInter.length)]]); + } + const p1 = getDmImgInterWh(274, 601); + const s1 = getDmImgInterOf(134, 30); + const p2 = getDmImgInterWh(332, 64); + const s2 = getDmImgInterOf(1101, 338); + const of = getDmImgInterOf(0, 0); + const wh = getDmImgInterWh(1245, 1285); + const ds = [ + { + t: getDmImgInterT('div'), + c: getDmImgInterC('clearfix g-search search-container'), + p: [p1[0], p1[2], p1[1]], + s: [s1[2], s1[0], s1[1]], + }, + { + t: getDmImgInterT('div'), + c: getDmImgInterC('wrapper'), + p: [p2[0], p2[2], p2[1]], + s: [s2[2], s2[0], s2[1]], + }, + ]; + return JSON.stringify({ ds, wh, of }); +} + +function getDmImgInterT(tag: string) { + return { + a: 4, + article: 29, + button: 7, + div: 2, + em: 27, + form: 17, + h1: 11, + h2: 12, + h3: 13, + h4: 14, + h5: 15, + h6: 16, + img: 5, + input: 6, + label: 25, + li: 10, + ol: 9, + option: 20, + p: 3, + section: 28, + select: 19, + span: 1, + strong: 26, + table: 21, + td: 23, + textarea: 18, + th: 24, + tr: 22, + ul: 8, + }[tag]; +} + +function getDmImgInterC(className: string) { + return Buffer.from(className).toString('base64').slice(0, -2); +} + +function getDmImgInterOf(top: number, left: number) { + const seed = Math.floor(514 * Math.random()); + return [3 * top + 2 * left + seed, 4 * top - 4 * left + 2 * seed, seed]; +} + +function getDmImgInterWh(width: number, height: number) { + const seed = Math.floor(114 * Math.random()); + return [2 * width + 2 * height + 3 * seed, 4 * width - height + seed, seed]; +} + +function addDmVerifyInfo(params: string, dmImgList: string) { const dmImgStr = Buffer.from('no webgl').toString('base64').slice(0, -2); const dmCoverImgStr = Buffer.from('no webgl').toString('base64').slice(0, -2); return `${params}&dm_img_list=${dmImgList}&dm_img_str=${dmImgStr}&dm_cover_img_str=${dmCoverImgStr}`; } +function addDmVerifyInfoWithInter(params: string, dmImgList: string, dmImgInter: string) { + return `${addDmVerifyInfo(params, dmImgList)}&dm_img_inter=${dmImgInter}`; +} + const bvidTime = 1_589_990_400; export default { @@ -124,7 +204,9 @@ export default { hexsign, addWbiVerifyInfo, getDmImgList, + getDmImgInter, addDmVerifyInfo, + addDmVerifyInfoWithInter, bvidTime, addRenderData, }; diff --git a/lib/routes/bilibili/video.ts b/lib/routes/bilibili/video.ts index 7e4ea66ad1e355f..457b1fd55c92853 100644 --- a/lib/routes/bilibili/video.ts +++ b/lib/routes/bilibili/video.ts @@ -35,19 +35,17 @@ async function handler(ctx) { const cookie = await cache.getCookie(); const wbiVerifyString = await cache.getWbiVerifyString(); const dmImgList = utils.getDmImgList(); + const dmImgInter = utils.getDmImgInter(); const renderData = await cache.getRenderData(uid); const [name, face] = await cache.getUsernameAndFaceFromUID(uid); - // await got(`https://space.bilibili.com/${uid}/video?tid=0&page=1&keyword=&order=pubdate`, { - // headers: { - // Referer: `https://space.bilibili.com/${uid}/`, - // Cookie: cookie, - // }, - // }); - const params = utils.addWbiVerifyInfo(utils.addRenderData(utils.addDmVerifyInfo(`mid=${uid}&ps=30&tid=0&pn=1&keyword=&order=pubdate&platform=web&web_location=1550101&order_avoided=true`, dmImgList), renderData), wbiVerifyString); + const params = utils.addWbiVerifyInfo( + utils.addRenderData(utils.addDmVerifyInfoWithInter(`mid=${uid}&ps=30&tid=0&pn=1&keyword=&order=pubdate&platform=web&web_location=1550101&order_avoided=true`, dmImgList, dmImgInter), renderData), + wbiVerifyString + ); const response = await got(`https://api.bilibili.com/x/space/wbi/arc/search?${params}`, { headers: { - Referer: `https://space.bilibili.com/${uid}/video?tid=0&page=1&keyword=&order=pubdate`, + Referer: `https://space.bilibili.com/${uid}/video?tid=0&pn=1&keyword=&order=pubdate`, Cookie: cookie, }, }); From 692c66eebc2f4bcf28f48f15fb30bb321b2372c1 Mon Sep 17 00:00:00 2001 From: lzk <linzhikang2013@163.com> Date: Fri, 18 Oct 2024 12:08:09 +0800 Subject: [PATCH 169/740] fix(route/weibo): Solve the problem that Weibo Radar rules cannot be generated correctly (#17144) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修复配置 ACCESS_KEY 导致 healthcheck 失败的问题 * 修复微博Radar规则未正确生成的问题 * Revert "修复配置 ACCESS_KEY 导致 healthcheck 失败的问题" This reverts commit 6f81cbcdc966176297fbede4474ff8b37c702e6d. --------- Co-authored-by: linzhikang <linzhikang@bytedance.com> --- lib/routes/weibo/user.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/routes/weibo/user.ts b/lib/routes/weibo/user.ts index bcf48479d266396..1938df7b1e79fcc 100644 --- a/lib/routes/weibo/user.ts +++ b/lib/routes/weibo/user.ts @@ -30,7 +30,15 @@ export const route: Route = { }, radar: [ { - source: ['m.weibo.cn/u/:uid', 'm.weibo.cn/profile/:uid', 'weibo.com/u/:uid', 'www.weibo.com/u/:uid'], + source: ['m.weibo.cn/u/:uid', 'm.weibo.cn/profile/:uid'], + target: '/user/:uid', + }, + { + source: ['weibo.com/u/:uid'], + target: '/user/:uid', + }, + { + source: ['www.weibo.com/u/:uid'], target: '/user/:uid', }, ], From 1758862b88d6b57dcef1ff4a3e237431c1b40b5e Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Fri, 18 Oct 2024 12:34:57 +0800 Subject: [PATCH 170/740] fix(route): fix Twitter Username+password login (#17166) fix #17089 --- lib/routes/twitter/api/mobile-api/login.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/routes/twitter/api/mobile-api/login.ts b/lib/routes/twitter/api/mobile-api/login.ts index 1e4c4570f6cc2b1..ed231e5ec951ef2 100644 --- a/lib/routes/twitter/api/mobile-api/login.ts +++ b/lib/routes/twitter/api/mobile-api/login.ts @@ -133,6 +133,11 @@ async function login({ username, password, authenticationSecret }) { }, }); logger.debug('Twitter login 4 finished: LoginEnterPassword.'); + for (const subtask of task3.data?.subtasks || []) { + if (subtask.open_account) { + return subtask.open_account; + } + } const task4 = await got.post('https://api.x.com/1.1/onboarding/task.json', { headers, From 69a35d2f563e9c9e5e4400c1c635decba3c7806c Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Fri, 18 Oct 2024 06:02:46 +0100 Subject: [PATCH 171/740] feat(route): add straits times route (#17163) * feat(route): add straits times route * Update lib/routes/straitstimes/index.ts --------- --- lib/routes/straitstimes/index.ts | 135 ++++++++++++++++++ lib/routes/straitstimes/namespace.ts | 7 + .../straitstimes/templates/description.art | 27 ++++ 3 files changed, 169 insertions(+) create mode 100644 lib/routes/straitstimes/index.ts create mode 100644 lib/routes/straitstimes/namespace.ts create mode 100644 lib/routes/straitstimes/templates/description.art diff --git a/lib/routes/straitstimes/index.ts b/lib/routes/straitstimes/index.ts new file mode 100644 index 000000000000000..f0995231902fd8b --- /dev/null +++ b/lib/routes/straitstimes/index.ts @@ -0,0 +1,135 @@ +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'; + +export const route: Route = { + path: '/:category?/:section?', + categories: ['traditional-media'], + example: '/straitstimes/singapore', + parameters: { + category: 'Category, see below for more information', + section: 'Section, see below for more information', + }, + features: { + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + requireConfig: false, + }, + name: 'News', + maintainers: ['quiniapiezoelectricity'], + handler, + description: ` +| Category | \`:category\` | +| ---------------------- | --------------------------- | +| Singapore | \`singapore\` | +| Asia | \`asia\` | +| World | \`world\` | +| Opinion | \`opinion\` | +| Life | \`life\` | +| Business | \`business\` | +| Jobs | \`jobs\` | +| Parenting & Education | \`parenting-and-education\` | +| Food | \`food\` | +| Tech | \`tech\` | +| Sport | \`sport\` | +| Podcasts | \`podcasts\` |, + +| Section | \`:section\` | +| ---------------------- | --------------------------- | +| Top Stories | \`top-stories\` | +| Latest | \`latest\` |`, + radar: [ + { + source: ['www.straitstimes.com/:category'], + target: '/:category', + }, + { + source: ['www.straitstimes.com'], + target: '/', + }, + ], +}; + +async function handler(ctx) { + const category = ctx.req.param('category') ? ctx.req.param('category').toLowerCase() : 'singapore'; + 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', + url: `https://newsapi.sphdigital.com/v2/feed/section/st?page=1&platform=${platform}§ion=${category}/star&subscribed=false&version=4.0`, + headers: { + 'x-api-key': apiKey, + }, + }); + feed = response.data.data; + const sections = new Set(feed.filter((item) => item.items[0].itemType === 'SectionFooter').map((items) => items.items[0].sectionFooterData.link.id)); + let slug = section && sections.has(`${category}-${section}-more/star`) ? `${category}-${section}-more/star` : undefined; + if (section === undefined) { + for (const section of ['latest', 'top-picks', 'top-stories']) { + if (sections.has(`${category}-${section}-more/star`)) { + slug = `${category}-${section}-more/star`; + break; + } + } + } + if (slug) { + const response = await got({ + method: 'get', + url: `https://newsapi.sphdigital.com/v2/feed/section/st?page=1&platform=${platform}§ion=${slug}&subscribed=false&version=4.0`, + headers: { + 'x-api-key': apiKey, + }, + }); + feed = response.data.data; + } + const articles = feed.filter((item) => item.items[0].itemType === 'Article'); + const items = await Promise.all( + articles.map((item) => + cache.tryGet(item.items[0].articleData.url, async () => { + const article = item.items[0].articleData; + if (article.authors) { + item.author = article.authors.map((author) => author.name).join(', '); + } + if (article.keywords) { + item.category = article.keywords.map((keyword) => keyword.name); + } + item.title = article.headline; + item.pubDate = parseDate(article.publicationTime, 'X'); + item.updated = parseDate(article.updatedTime, 'X'); + item.link = article.url; + let content = article.teaser; + if (article.documentId) { + const response = await got({ + method: 'get', + url: `https://newsapi.sphdigital.com/v2/feed/article/st/${article.documentId}?platform=${platform}&version=4.0`, + headers: { + 'x-api-key': apiKey, + }, + }); + content = response.data.data.body; + } + item.description = art(path.join(__dirname, 'templates/description.art'), { + images: article.images ?? [], + article: content, + }); + return item; + }) + ) + ); + + return { + title: `The Strait Times - ${category.replaceAll('-', ' ').toUpperCase()}`, + link: `https://www.straitstimes.com/${category.toLowerCase()}`, + item: items, + }; +} diff --git a/lib/routes/straitstimes/namespace.ts b/lib/routes/straitstimes/namespace.ts new file mode 100644 index 000000000000000..c23481dd38552e3 --- /dev/null +++ b/lib/routes/straitstimes/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Strait Times', + url: 'straitstimes.com', + description: '', +}; diff --git a/lib/routes/straitstimes/templates/description.art b/lib/routes/straitstimes/templates/description.art new file mode 100644 index 000000000000000..697ad38bc2f202a --- /dev/null +++ b/lib/routes/straitstimes/templates/description.art @@ -0,0 +1,27 @@ +{{ if images }} + {{ each images }} + {{if $value.url }} + <figure> + <img src= + {{ if $value.large }} + "{{ $value.large }}" + {{ else }} + "{{ $value.url }}" + {{ /if }} + {{ if $value.height }} + height="{{ $value.height }}" + {{ /if }} + {{ if $value.width }} + width="{{ $value.width }}" + {{ /if }} + > + {{ if $value.caption }} + <figcaption>{{ $value.caption }}</figcaption> + {{ /if }} + </figure> + {{ /if }} + {{ /each }} +{{ /if }} +{{ if article }} + {{@ article }} +{{ /if }} \ No newline at end of file From ff76aa72678d770c8eda77ef50f2467e6f5e1ac3 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Fri, 18 Oct 2024 13:59:37 +0800 Subject: [PATCH 172/740] feat(route): add route for skebetter (#17181) * feat(route): add route for skebetter * feat: add radar * Update lib/routes/skebetter/index.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/skebetter/manga.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/skebetter/illust.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * fix: import config --------- --- lib/routes/skebetter/illust.ts | 83 +++++++++++++++++++++++++++++++ lib/routes/skebetter/index.ts | 83 +++++++++++++++++++++++++++++++ lib/routes/skebetter/manga.ts | 65 ++++++++++++++++++++++++ lib/routes/skebetter/namespace.ts | 6 +++ lib/routes/skebetter/utils.ts | 72 +++++++++++++++++++++++++++ 5 files changed, 309 insertions(+) create mode 100644 lib/routes/skebetter/illust.ts create mode 100644 lib/routes/skebetter/index.ts create mode 100644 lib/routes/skebetter/manga.ts create mode 100644 lib/routes/skebetter/namespace.ts create mode 100644 lib/routes/skebetter/utils.ts diff --git a/lib/routes/skebetter/illust.ts b/lib/routes/skebetter/illust.ts new file mode 100644 index 000000000000000..c5d0fa943a96eed --- /dev/null +++ b/lib/routes/skebetter/illust.ts @@ -0,0 +1,83 @@ +import { Data, DataItem, Route } from '@/types'; +import cache from '@/utils/cache'; +import { processItems, fetchData } from './utils'; +import { config } from '@/config'; + +export const route: Route = { + path: '/illust/:type', + categories: ['anime'], + example: '/skebetter/illust/hot', + parameters: { type: 'Type, see below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Illust', + maintainers: ['SnowAgar25'], + handler, + radar: [ + { + title: 'Illust - Hot', + source: ['skebetter.com/illust'], + target: '/illust/hot', + }, + { + title: 'Illust - Week', + source: ['skebetter.com/illust'], + target: '/illust/week', + }, + { + title: 'Illust - Month', + source: ['skebetter.com/illust'], + target: '/illust/month', + }, + { + title: 'Illust - Latest', + source: ['skebetter.com/illust'], + target: '/illust/latest', + }, + ], + description: ` +| 急上昇 | 週間 | 月間 | 新着 | +| ----- | ---- | ---- | ---- | +| hot | week | month| latest |`, +}; + +async function handler(ctx): Promise<Data> { + const type = ctx.req.param('type'); + const baseUrl = 'https://api.twieromanga.com/api/illust/hot'; + const typeMap = { + hot: '急上昇', + week: '週間', + month: '月間', + latest: '新着', + }; + const linkMap = { + hot: '', + week: '?term=week', + month: '?term=month', + latest: '?term=latest', + }; + + const url = `${baseUrl}?type=${type}`; + + const items = await cache.tryGet( + url, + async () => { + const data = await fetchData(url); + return processItems(data, 'illust'); + }, + config.cache.routeExpire, + false + ); + + return { + title: `Skebetter Illust - ${typeMap[type]}`, + link: `https://skebetter.com/illust${linkMap[type]}`, + item: items as DataItem[], + }; +} diff --git a/lib/routes/skebetter/index.ts b/lib/routes/skebetter/index.ts new file mode 100644 index 000000000000000..3ccd93e0bd73c35 --- /dev/null +++ b/lib/routes/skebetter/index.ts @@ -0,0 +1,83 @@ +import { Data, DataItem, Route } from '@/types'; +import cache from '@/utils/cache'; +import { processItems, fetchData } from './utils'; +import { config } from '@/config'; + +export const route: Route = { + path: '/:type', + categories: ['anime'], + example: '/skebetter/hot', + parameters: { type: 'Type, see below' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Hot', + maintainers: ['SnowAgar25'], + handler, + radar: [ + { + title: 'Skebetter - Hot', + source: ['skebetter.com'], + target: '/hot', + }, + { + title: 'Skebetter - Week', + source: ['skebetter.com'], + target: '/week', + }, + { + title: 'Skebetter - Month', + source: ['skebetter.com'], + target: '/month', + }, + { + title: 'Skebetter - Latest', + source: ['skebetter.com'], + target: '/latest', + }, + ], + description: ` +| 急上昇 | 週間 | 月間 | 新着 | +| ----- | ---- | ---- | ---- | +| hot | week | month| latest |`, +}; + +async function handler(ctx): Promise<Data> { + const type = ctx.req.param('type'); + const baseUrl = 'https://api.twieromanga.com/api/hotv2'; + const typeMap = { + hot: '急上昇', + week: '週間', + month: '月間', + latest: '新着', + }; + const linkMap = { + hot: '', + week: '?term=week', + month: '?term=month', + latest: '?term=latest', + }; + + const url = `${baseUrl}?type=${type}`; + + const items = await cache.tryGet( + url, + async () => { + const data = await fetchData(url); + return processItems(data, 'index'); + }, + config.cache.routeExpire, + false + ); + + return { + title: `Skebetter - ${typeMap[type]}`, + link: `https://skebetter.com/${linkMap[type]}`, + item: items as DataItem[], + }; +} diff --git a/lib/routes/skebetter/manga.ts b/lib/routes/skebetter/manga.ts new file mode 100644 index 000000000000000..4b63cf301597c05 --- /dev/null +++ b/lib/routes/skebetter/manga.ts @@ -0,0 +1,65 @@ +import { Data, DataItem, Route } from '@/types'; +import cache from '@/utils/cache'; +import { processItems, fetchData } from './utils'; +import { config } from '@/config'; + +export const route: Route = { + path: '/manga/:order', + categories: ['anime'], + example: '/skebetter/manga/1', + parameters: { order: 'Order, see below.' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Manga', + maintainers: ['SnowAgar25'], + handler, + radar: [ + { + title: 'Manga - Latest', + source: ['skebetter.com/series'], + target: '/manga/1', + }, + { + title: 'Manga - Hot', + source: ['skebetter.com/series'], + target: '/manga/2', + }, + ], + description: ` +| 新着 (Latest) | 人気 (Hot) | +| ---- | ---- | +| 1 | 2 |`, +}; + +async function handler(ctx): Promise<Data> { + const order = ctx.req.param('order') ?? '1'; + const baseUrl = 'https://api.twieromanga.com/api/mangaseries'; + const orderMap = { + '1': '新着', + '2': '人気', + }; + + const url = `${baseUrl}?order=${order}`; + + const items = await cache.tryGet( + url, + async () => { + const data = await fetchData(url, true); + return processItems(data, 'manga'); + }, + config.cache.routeExpire, + false + ); + + return { + title: `Skebetter Manga - ${orderMap[order]}`, + link: `https://skebetter.com/series?order=${order}`, + item: items as DataItem[], + }; +} diff --git a/lib/routes/skebetter/namespace.ts b/lib/routes/skebetter/namespace.ts new file mode 100644 index 000000000000000..45678549413629f --- /dev/null +++ b/lib/routes/skebetter/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Skebetter', + url: 'skebetter.com', +}; diff --git a/lib/routes/skebetter/utils.ts b/lib/routes/skebetter/utils.ts new file mode 100644 index 000000000000000..a6267eade755119 --- /dev/null +++ b/lib/routes/skebetter/utils.ts @@ -0,0 +1,72 @@ +import { DataItem } from '@/types'; +import { ofetch } from 'ofetch'; + +export interface MediaUrl { + h: number; + w: number; + sh: number; + sw: number; + type: string; + media_id: string | null; + media_uri: string; + media_index: number; +} + +export interface Tweet { + id: string; + screen_name: string; + series_id?: number; + text: string; + date: string; + img: string; + user_name: string; + fav: string; + retweet: string; + user_id: string; + media_url: string; + media_count: number; + hashtags?: Record<string, unknown>; + media_urls: MediaUrl[]; + score: string; + rank: number; +} + +export const processItems = (data: Tweet[], type: 'index' | 'illust' | 'manga'): DataItem[] => + data.map((item) => { + const baseAuthorUrl = `https://skebetter.com/author/${item.user_id}`; + const description = ` + <p>❤${item.fav} 🔁${item.retweet}</p> + ${item.media_urls.map((media) => `<img src="${media.media_uri}" />`).join('')} + `; + + if (type === 'manga') { + return { + title: item.text, + description, + author: item.user_name, + link: `https://skebetter.com/series/${item.series_id}`, + }; + } + + if (type === 'illust') { + return { + title: item.text, + description, + author: item.user_name, + link: `${baseAuthorUrl}/illust/${item.id}`, + }; + } + + // type === 'index' + return { + title: item.text, + description, + author: item.user_name, + link: item.series_id ? `https://skebetter.com/series/${item.series_id}` : `${baseAuthorUrl}/manga/${item.id}`, + }; + }); + +export const fetchData = async (url: string, isManga: boolean = false) => { + const response = await ofetch(url); + return isManga ? (response as Tweet[]) : (response.tweet as Tweet[]); +}; From 6ac864917f576dd19ac8090dd80304be046adbbd Mon Sep 17 00:00:00 2001 From: James Gu <jameswdgu@gmail.com> Date: Fri, 18 Oct 2024 14:16:28 +0800 Subject: [PATCH 173/740] feat(route): ktown4u (#17182) * add ktown4u route * delete source * fix some feedback * Apply suggestions from code review --------- --- lib/routes/ktown4u/artist-brandlist.ts | 61 ++++++++++++++++++++++++++ lib/routes/ktown4u/namespace.ts | 6 +++ 2 files changed, 67 insertions(+) create mode 100644 lib/routes/ktown4u/artist-brandlist.ts create mode 100644 lib/routes/ktown4u/namespace.ts diff --git a/lib/routes/ktown4u/artist-brandlist.ts b/lib/routes/ktown4u/artist-brandlist.ts new file mode 100644 index 000000000000000..f488becbe078ed3 --- /dev/null +++ b/lib/routes/ktown4u/artist-brandlist.ts @@ -0,0 +1,61 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/artistBrandlist/:grpNo/:grpNo2?', + categories: ['shopping'], + example: '/ktown4u/artistBrandlist/234590/1723449', + parameters: { grpNo: 'artist id (Get in url)', grpNo2: 'product category id (Get in url), empty for all categories' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: [], + target: '/artistBrandlist/:grpNo/:grpNo2', + }, + ], + name: 'Get the products on sale', + maintainers: ['JamesWDGu'], + handler: async (ctx) => { + const { grpNo, grpNo2 = '' } = ctx.req.param(); + const data = await ofetch(`https://cn.ktown4u.com/selectArtistBrandList?cateGrpNo=${grpNo2}¤tPage=1&goodsSearch=newgoods&grpNo=${grpNo}&searchType=ARTIST`, { + method: 'POST', + headers: { + accept: 'application/json, text/plain, */*', + 'accept-language': 'en,zh-CN;q=0.9,zh;q=0.8', + }, + parseResponse: JSON.parse, + }); + const items = data.map((item) => ({ + title: item.GOODS_NM, + url: item.IMG_PATH, + link: `https://cn.ktown4u.com/iteminfo?goods_no=${item.GOODS_NO}`, + description: desc(item), + pubDate: parseDate(item.RELEASE_DT), + })); + + return { + title: rssTitle(data), + link: `https://cn.ktown4u.com/artistBrandlist?grp_no=${grpNo}&grp_no2=${grpNo2}`, + item: items, + }; + }, +}; + +const rssTitle = (data) => `ktown4u ${data[0].GRP_NM}`; + +const desc = (item) => { + const saleState = item.SALE_YN === 'N' ? '【售罄】' : ''; + let price = `${item.CURR_F_CD}${item.DISP_PRICE}`; + if (item.DISP_PRICE !== item.DISP_DC_PRICE) { + price = `${item.CURR_F_CD}${item.DISP_DC_PRICE} / 原价:${price}`; + } + return `${saleState} ${price} <br> <img src=${item.IMG_PATH}> <br> ${item.GOODS_NM}`; +}; diff --git a/lib/routes/ktown4u/namespace.ts b/lib/routes/ktown4u/namespace.ts new file mode 100644 index 000000000000000..3029dc12bd0b9cb --- /dev/null +++ b/lib/routes/ktown4u/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Ktown4u', + url: 'ktown4u.com', +}; From fc80e4400ede10209583b6b9f05cfecc1bc6cf8c Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 18 Oct 2024 17:04:03 +0800 Subject: [PATCH 174/740] feat(router/twitter): modify twitter list configs --- lib/routes/twitter/list.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/routes/twitter/list.ts b/lib/routes/twitter/list.ts index 32da445ab94c302..96f461458b7ce6d 100644 --- a/lib/routes/twitter/list.ts +++ b/lib/routes/twitter/list.ts @@ -4,19 +4,11 @@ import utils from './utils'; export const route: Route = { path: '/list/:id/:routeParams?', - categories: ['social-media'], - example: '/twitter/list/ladyleet/javascript', - parameters: { id: 'username', name: 'list name', routeParams: 'extra parameters, see the table above' }, + categories: ['social-media', 'popular'], + example: '/twitter/list/1502570462752219136', + parameters: { id: 'list id, get from url', routeParams: 'extra parameters, see the table above' }, features: { requireConfig: [ - { - name: 'TWITTER_USERNAME', - description: 'Please see above for details.', - }, - { - name: 'TWITTER_PASSWORD', - description: 'Please see above for details.', - }, { name: 'TWITTER_AUTH_TOKEN', description: 'Please see above for details.', @@ -29,7 +21,7 @@ export const route: Route = { supportScihub: false, }, name: 'List timeline', - maintainers: ['DIYgod', 'xyqfer'], + maintainers: ['DIYgod', 'xyqfer', 'pseudoyu'], handler, radar: [ { From ad7de5d0cf854f370d90e22dde112586b4f0146a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 06:15:13 -0700 Subject: [PATCH 175/740] chore(deps-dev): bump @typescript-eslint/parser from 8.9.0 to 8.10.0 (#17185) * chore(deps-dev): bump @typescript-eslint/parser from 8.9.0 to 8.10.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.9.0 to 8.10.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.10.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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 99 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 83 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index d1e08a3801914d3..155def63c3a1bcf 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "@types/title": "3.4.3", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.9.0", - "@typescript-eslint/parser": "8.9.0", + "@typescript-eslint/parser": "8.10.0", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.102", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e83ef481d380fba..c2439de199fbe69 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -344,10 +344,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.9.0 - version: 8.9.0(@typescript-eslint/parser@8.9.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3) + version: 8.9.0(@typescript-eslint/parser@8.10.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3) '@typescript-eslint/parser': - specifier: 8.9.0 - version: 8.9.0(eslint@9.12.0)(typescript@5.6.3) + specifier: 8.10.0 + version: 8.10.0(eslint@9.12.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.4 version: 0.27.4 @@ -1917,8 +1917,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.9.0': - resolution: {integrity: sha512-U+BLn2rqTTHnc4FL3FJjxaXptTxmf9sNftJK62XLz4+GxG3hLHm/SUNaaXP5Y4uTiuYoL5YLy4JBCJe3+t8awQ==} + '@typescript-eslint/parser@8.10.0': + resolution: {integrity: sha512-E24l90SxuJhytWJ0pTQydFT46Nk0Z+bsLKo/L8rtQSL93rQ6byd1V/QbDpHUTdLPOMsBCcYXZweADNCfOCmOAg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1927,6 +1927,10 @@ packages: typescript: optional: true + '@typescript-eslint/scope-manager@8.10.0': + resolution: {integrity: sha512-AgCaEjhfql9MDKjMUxWvH7HjLeBqMCBfIaBbzzIcBbQPZE7CPh1m6FF+L75NUMJFMLYhCywJXIDEMa3//1A0dw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.9.0': resolution: {integrity: sha512-bZu9bUud9ym1cabmOYH9S6TnbWRzpklVmwqICeOulTCZ9ue2/pczWzQvt/cGj2r2o1RdKoZbuEMalJJSYw3pHQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1940,10 +1944,23 @@ packages: typescript: optional: true + '@typescript-eslint/types@8.10.0': + resolution: {integrity: sha512-k/E48uzsfJCRRbGLapdZgrX52csmWJ2rcowwPvOZ8lwPUv3xW6CcFeJAXgx4uJm+Ge4+a4tFOkdYvSpxhRhg1w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.9.0': resolution: {integrity: sha512-SjgkvdYyt1FAPhU9c6FiYCXrldwYYlIQLkuc+LfAhCna6ggp96ACncdtlbn8FmnG72tUkXclrDExOpEYf1nfJQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.10.0': + resolution: {integrity: sha512-3OE0nlcOHaMvQ8Xu5gAfME3/tWVDpb/HxtpUZ1WeOAksZ/h/gwrBzCklaGzwZT97/lBbbxJ16dMA98JMEngW4w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/typescript-estree@8.9.0': resolution: {integrity: sha512-9iJYTgKLDG6+iqegehc5+EqE6sqaee7kb8vWpmHZ86EqwDjmlqNNHeqDVqb9duh+BY6WCNHfIGvuVU3Tf9Db0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1953,12 +1970,22 @@ packages: typescript: optional: true + '@typescript-eslint/utils@8.10.0': + resolution: {integrity: sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.9.0': resolution: {integrity: sha512-PKgMmaSo/Yg/F7kIZvrgrWa1+Vwn036CdNUvYFEkYbPwOH4i8xvkaRlu148W3vtheWK9ckKRIz7PBP5oUlkrvQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@8.10.0': + resolution: {integrity: sha512-k8nekgqwr7FadWk548Lfph6V3r9OVqjzAIVskE7orMZR23cGJjAOVazsZSJW+ElyjfTM4wx/1g88Mi70DDtG9A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.9.0': resolution: {integrity: sha512-Ht4y38ubk4L5/U8xKUBfKNYGmvKvA1CANoxiTRMM+tOLk3lbF3DvzZCxJCRSE+2GdCMSh6zq9VZJc3asc1XuAA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2756,8 +2783,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.40: - resolution: {integrity: sha512-LYm78o6if4zTasnYclgQzxEcgMoIcybWOhkATWepN95uwVVWV0/IW10v+2sIeHE+bIYWipLneTftVyQm45UY7g==} + electron-to-chromium@1.5.41: + resolution: {integrity: sha512-dfdv/2xNjX0P8Vzme4cfzHqnPm5xsZXwsolTYr0eyW18IUmNyG08vL+fttvinTfhKfIKdRoqkDIC9e9iWQCNYQ==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -7205,7 +7232,7 @@ snapshots: '@stylistic/eslint-plugin@2.9.0(eslint@9.12.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.9.0(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.10.0(eslint@9.12.0)(typescript@5.6.3) eslint: 9.12.0 eslint-visitor-keys: 4.1.0 espree: 10.2.0 @@ -7375,10 +7402,10 @@ snapshots: '@types/node': 22.7.6 optional: true - '@typescript-eslint/eslint-plugin@8.9.0(@typescript-eslint/parser@8.9.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.9.0(@typescript-eslint/parser@8.10.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.9.0(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.10.0(eslint@9.12.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.9.0 '@typescript-eslint/type-utils': 8.9.0(eslint@9.12.0)(typescript@5.6.3) '@typescript-eslint/utils': 8.9.0(eslint@9.12.0)(typescript@5.6.3) @@ -7393,12 +7420,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.9.0(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.10.0(eslint@9.12.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.9.0 - '@typescript-eslint/types': 8.9.0 - '@typescript-eslint/typescript-estree': 8.9.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.9.0 + '@typescript-eslint/scope-manager': 8.10.0 + '@typescript-eslint/types': 8.10.0 + '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.10.0 debug: 4.3.7 eslint: 9.12.0 optionalDependencies: @@ -7406,6 +7433,11 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/scope-manager@8.10.0': + dependencies: + '@typescript-eslint/types': 8.10.0 + '@typescript-eslint/visitor-keys': 8.10.0 + '@typescript-eslint/scope-manager@8.9.0': dependencies: '@typescript-eslint/types': 8.9.0 @@ -7423,8 +7455,25 @@ snapshots: - eslint - supports-color + '@typescript-eslint/types@8.10.0': {} + '@typescript-eslint/types@8.9.0': {} + '@typescript-eslint/typescript-estree@8.10.0(typescript@5.6.3)': + dependencies: + '@typescript-eslint/types': 8.10.0 + '@typescript-eslint/visitor-keys': 8.10.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/typescript-estree@8.9.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.9.0 @@ -7440,6 +7489,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@8.10.0(eslint@9.12.0)(typescript@5.6.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) + '@typescript-eslint/scope-manager': 8.10.0 + '@typescript-eslint/types': 8.10.0 + '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) + eslint: 9.12.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/utils@8.9.0(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) @@ -7451,6 +7511,11 @@ snapshots: - supports-color - typescript + '@typescript-eslint/visitor-keys@8.10.0': + dependencies: + '@typescript-eslint/types': 8.10.0 + eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.9.0': dependencies: '@typescript-eslint/types': 8.9.0 @@ -7765,7 +7830,7 @@ snapshots: browserslist@4.24.0: dependencies: caniuse-lite: 1.0.30001669 - electron-to-chromium: 1.5.40 + electron-to-chromium: 1.5.41 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.0) @@ -8306,7 +8371,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.40: {} + electron-to-chromium@1.5.41: {} ellipsize@0.1.0: {} From d7372481653f952347944861924a6c32c075c6bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 18 Oct 2024 06:31:10 -0700 Subject: [PATCH 176/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.9.0 to 8.10.0 (#17184) * chore(deps-dev): bump @typescript-eslint/eslint-plugin Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.9.0 to 8.10.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.10.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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 112 ++++++++++--------------------------------------- 2 files changed, 23 insertions(+), 91 deletions(-) diff --git a/package.json b/package.json index 155def63c3a1bcf..f341f9834637e27 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.9.0", + "@typescript-eslint/eslint-plugin": "8.10.0", "@typescript-eslint/parser": "8.10.0", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c2439de199fbe69..5b98de5e753026c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -343,8 +343,8 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.9.0 - version: 8.9.0(@typescript-eslint/parser@8.10.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3) + specifier: 8.10.0 + version: 8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.10.0 version: 8.10.0(eslint@9.12.0)(typescript@5.6.3) @@ -1906,8 +1906,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.9.0': - resolution: {integrity: sha512-Y1n621OCy4m7/vTXNlCbMVp87zSd7NH0L9cXD8aIpOaNlzeWxIK4+Q19A68gSmTNRZn92UjocVUWDthGxtqHFg==} + '@typescript-eslint/eslint-plugin@8.10.0': + resolution: {integrity: sha512-phuB3hoP7FFKbRXxjl+DRlQDuJqhpOnm5MmtROXyWi3uS/Xg2ZXqiQfcG2BJHiN4QKyzdOJi3NEn/qTnjUlkmQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1931,12 +1931,8 @@ packages: resolution: {integrity: sha512-AgCaEjhfql9MDKjMUxWvH7HjLeBqMCBfIaBbzzIcBbQPZE7CPh1m6FF+L75NUMJFMLYhCywJXIDEMa3//1A0dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.9.0': - resolution: {integrity: sha512-bZu9bUud9ym1cabmOYH9S6TnbWRzpklVmwqICeOulTCZ9ue2/pczWzQvt/cGj2r2o1RdKoZbuEMalJJSYw3pHQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/type-utils@8.9.0': - resolution: {integrity: sha512-JD+/pCqlKqAk5961vxCluK+clkppHY07IbV3vett97KOV+8C6l+CPEPwpUuiMwgbOz/qrN3Ke4zzjqbT+ls+1Q==} + '@typescript-eslint/type-utils@8.10.0': + resolution: {integrity: sha512-PCpUOpyQSpxBn230yIcK+LeCQaXuxrgCm2Zk1S+PTIRJsEfU6nJ0TtwyH8pIwPK/vJoA+7TZtzyAJSGBz+s/dg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1948,10 +1944,6 @@ packages: resolution: {integrity: sha512-k/E48uzsfJCRRbGLapdZgrX52csmWJ2rcowwPvOZ8lwPUv3xW6CcFeJAXgx4uJm+Ge4+a4tFOkdYvSpxhRhg1w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.9.0': - resolution: {integrity: sha512-SjgkvdYyt1FAPhU9c6FiYCXrldwYYlIQLkuc+LfAhCna6ggp96ACncdtlbn8FmnG72tUkXclrDExOpEYf1nfJQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.10.0': resolution: {integrity: sha512-3OE0nlcOHaMvQ8Xu5gAfME3/tWVDpb/HxtpUZ1WeOAksZ/h/gwrBzCklaGzwZT97/lBbbxJ16dMA98JMEngW4w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1961,35 +1953,16 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.9.0': - resolution: {integrity: sha512-9iJYTgKLDG6+iqegehc5+EqE6sqaee7kb8vWpmHZ86EqwDjmlqNNHeqDVqb9duh+BY6WCNHfIGvuVU3Tf9Db0g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/utils@8.10.0': resolution: {integrity: sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.9.0': - resolution: {integrity: sha512-PKgMmaSo/Yg/F7kIZvrgrWa1+Vwn036CdNUvYFEkYbPwOH4i8xvkaRlu148W3vtheWK9ckKRIz7PBP5oUlkrvQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.10.0': resolution: {integrity: sha512-k8nekgqwr7FadWk548Lfph6V3r9OVqjzAIVskE7orMZR23cGJjAOVazsZSJW+ElyjfTM4wx/1g88Mi70DDtG9A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.9.0': - resolution: {integrity: sha512-Ht4y38ubk4L5/U8xKUBfKNYGmvKvA1CANoxiTRMM+tOLk3lbF3DvzZCxJCRSE+2GdCMSh6zq9VZJc3asc1XuAA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -2213,8 +2186,8 @@ packages: bare-path@2.1.3: resolution: {integrity: sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==} - bare-stream@2.3.0: - resolution: {integrity: sha512-pVRWciewGUeCyKEuRxwv06M079r+fRjAQjBEK2P6OYGrO43O+Z0LrPZZEjlc4mB6C2RpZ9AxJ1s7NLEtOHO6eA==} + bare-stream@2.3.1: + resolution: {integrity: sha512-Vm8kAeOcfzHPTH8sq0tHBnUqYrkXdroaBVVylqFT4cF5wnMfKEIxxy2jIGu2zKVNl9P8MAP9XBWwXJ9N2+jfEw==} base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -5227,8 +5200,8 @@ packages: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} engines: {node: '>=18'} - text-decoder@1.2.0: - resolution: {integrity: sha512-n1yg1mOj9DNpk3NeZOx7T6jchTbyJS3i3cucbNN6FcdPriMZx7NsgrGpWWdWZZGxD7ES1XB+3uoqHMgOKaN+fg==} + text-decoder@1.2.1: + resolution: {integrity: sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ==} text-hex@1.0.0: resolution: {integrity: sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==} @@ -7402,14 +7375,14 @@ snapshots: '@types/node': 22.7.6 optional: true - '@typescript-eslint/eslint-plugin@8.9.0(@typescript-eslint/parser@8.10.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 '@typescript-eslint/parser': 8.10.0(eslint@9.12.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.9.0 - '@typescript-eslint/type-utils': 8.9.0(eslint@9.12.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.9.0(eslint@9.12.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.9.0 + '@typescript-eslint/scope-manager': 8.10.0 + '@typescript-eslint/type-utils': 8.10.0(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.10.0(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.10.0 eslint: 9.12.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7438,15 +7411,10 @@ snapshots: '@typescript-eslint/types': 8.10.0 '@typescript-eslint/visitor-keys': 8.10.0 - '@typescript-eslint/scope-manager@8.9.0': - dependencies: - '@typescript-eslint/types': 8.9.0 - '@typescript-eslint/visitor-keys': 8.9.0 - - '@typescript-eslint/type-utils@8.9.0(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.10.0(eslint@9.12.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.9.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.9.0(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.10.0(eslint@9.12.0)(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: @@ -7457,8 +7425,6 @@ snapshots: '@typescript-eslint/types@8.10.0': {} - '@typescript-eslint/types@8.9.0': {} - '@typescript-eslint/typescript-estree@8.10.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.10.0 @@ -7474,21 +7440,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.9.0(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 8.9.0 - '@typescript-eslint/visitor-keys': 8.9.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/utils@8.10.0(eslint@9.12.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) @@ -7500,27 +7451,11 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.9.0(eslint@9.12.0)(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) - '@typescript-eslint/scope-manager': 8.9.0 - '@typescript-eslint/types': 8.9.0 - '@typescript-eslint/typescript-estree': 8.9.0(typescript@5.6.3) - eslint: 9.12.0 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/visitor-keys@8.10.0': dependencies: '@typescript-eslint/types': 8.10.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.9.0': - dependencies: - '@typescript-eslint/types': 8.9.0 - eslint-visitor-keys: 3.4.3 - '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.10': @@ -7763,7 +7698,7 @@ snapshots: dependencies: bare-events: 2.5.0 bare-path: 2.1.3 - bare-stream: 2.3.0 + bare-stream: 2.3.1 optional: true bare-os@2.4.4: @@ -7774,9 +7709,8 @@ snapshots: bare-os: 2.4.4 optional: true - bare-stream@2.3.0: + bare-stream@2.3.1: dependencies: - b4a: 1.6.7 streamx: 2.20.1 optional: true @@ -11055,7 +10989,7 @@ snapshots: dependencies: fast-fifo: 1.3.2 queue-tick: 1.0.1 - text-decoder: 1.2.0 + text-decoder: 1.2.1 optionalDependencies: bare-events: 2.5.0 @@ -11212,9 +11146,7 @@ snapshots: glob: 10.4.5 minimatch: 9.0.5 - text-decoder@1.2.0: - dependencies: - b4a: 1.6.7 + text-decoder@1.2.1: {} text-hex@1.0.0: {} From 6355d535ccaa4fc158436e42882a465ef6ca5a54 Mon Sep 17 00:00:00 2001 From: Urabartin <162798205+Urabartin@users.noreply.github.com> Date: Fri, 18 Oct 2024 23:18:59 +0800 Subject: [PATCH 177/740] feat(route): MissKON (#17178) --- lib/routes/misskon/namespace.ts | 6 +++ lib/routes/misskon/posts.ts | 33 ++++++++++++++++ lib/routes/misskon/tag.ts | 38 +++++++++++++++++++ lib/routes/misskon/top.ts | 67 +++++++++++++++++++++++++++++++++ lib/routes/misskon/utils.ts | 41 ++++++++++++++++++++ 5 files changed, 185 insertions(+) create mode 100644 lib/routes/misskon/namespace.ts create mode 100644 lib/routes/misskon/posts.ts create mode 100644 lib/routes/misskon/tag.ts create mode 100644 lib/routes/misskon/top.ts create mode 100644 lib/routes/misskon/utils.ts diff --git a/lib/routes/misskon/namespace.ts b/lib/routes/misskon/namespace.ts new file mode 100644 index 000000000000000..de6dff0c8f80752 --- /dev/null +++ b/lib/routes/misskon/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'MissKON', + url: 'misskon.com', +}; diff --git a/lib/routes/misskon/posts.ts b/lib/routes/misskon/posts.ts new file mode 100644 index 000000000000000..445bf6bc13af9c4 --- /dev/null +++ b/lib/routes/misskon/posts.ts @@ -0,0 +1,33 @@ +import { Route } from '@/types'; +import { ENDPOINT, getPosts } from './utils'; + +export const route: Route = { + path: '/posts/:routeParams?', + categories: ['picture'], + example: '/misskon/posts/search=video&tags_exclude=353,3100&per_page=5', + parameters: { routeParams: 'Additional parameters for filtering posts, refer to [WordPress API Reference](https://developer.wordpress.org/rest-api/reference/posts/#arguments) for details.' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['misskon.com/'], + target: '/posts', + }, + ], + name: 'Posts', + maintainers: ['Urabartin'], + handler: async (ctx) => { + const { routeParams = '' } = ctx.req.param(); + return { + title: `MissKON - ${routeParams || 'Posts'}`, + link: `${ENDPOINT}/posts` + (routeParams ? `?${routeParams}` : ''), + item: await getPosts(routeParams), + }; + }, +}; diff --git a/lib/routes/misskon/tag.ts b/lib/routes/misskon/tag.ts new file mode 100644 index 000000000000000..73b591fed3115ca --- /dev/null +++ b/lib/routes/misskon/tag.ts @@ -0,0 +1,38 @@ +import { Route } from '@/types'; +import { getPosts, getTags } from './utils'; + +export const route: Route = { + path: '/tag/:tag', + categories: ['picture'], + example: '/misskon/tag/cosplay', + parameters: { tag: 'Any tag that exists in MissKon' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['misskon.com/tag/:tag/'], + target: '/tag/:tag', + }, + ], + name: 'Tag', + maintainers: ['Urabartin'], + handler: async (ctx) => { + const { tag } = ctx.req.param(); + const tagData = await getTags(tag); + const searchParams = new URLSearchParams(); + searchParams.set('tags', tagData.id); + const items = await getPosts(searchParams.toString()); + return { + title: `MissKON - ${tagData.name}`, + link: tagData.link, + description: tagData.description, + item: items, + }; + }, +}; diff --git a/lib/routes/misskon/top.ts b/lib/routes/misskon/top.ts new file mode 100644 index 000000000000000..542480a49f07220 --- /dev/null +++ b/lib/routes/misskon/top.ts @@ -0,0 +1,67 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { getPosts } from './utils'; + +export const route: Route = { + path: '/top/:k', + categories: ['picture'], + example: '/misskon/top/60', + parameters: { k: 'Top k days, can be 3, 7, 30 or 60' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + title: 'Top 3 days', + source: ['misskon.com/top3/'], + target: '/top/3', + }, + { + title: 'Top 7 days', + source: ['misskon.com/top7/'], + target: '/top/7', + }, + { + title: 'Top 30 days', + source: ['misskon.com/top30/'], + target: '/top/30', + }, + { + title: 'Top 60 days', + source: ['misskon.com/top60/'], + target: '/top/60', + }, + ], + name: 'Top k days', + maintainers: ['Urabartin'], + handler: async (ctx) => { + const { k } = ctx.req.param(); + if (!['3', '7', '30', '60'].includes(k)) { + throw new Error(`Invalid k: k=${k}`); + } + const topLink = `https://misskon.com/top${k}/`; + const response = await ofetch(topLink); + const $ = load(response); + + const feedTitle = $('.page-title').text(); + const feedDesc = $('.content > p').first().text(); + const itemSlugs = $('#main-content article.item-list > h2 a') + .toArray() + .map((link) => new URL($(link).attr('href') || '').pathname.slice(1, -1)); + const searchParams = new URLSearchParams(); + searchParams.set('slug', itemSlugs.join(',')); + searchParams.set('per_page', itemSlugs.length.toString()); + return { + title: `MissKON - ${feedTitle}`, + link: topLink, + description: feedDesc, + item: await getPosts(searchParams), + }; + }, +}; diff --git a/lib/routes/misskon/utils.ts b/lib/routes/misskon/utils.ts new file mode 100644 index 000000000000000..7445fa20a30c80c --- /dev/null +++ b/lib/routes/misskon/utils.ts @@ -0,0 +1,41 @@ +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +const ENDPOINT = 'https://misskon.com/wp-json/wp/v2'; +const getPosts = async (searchParams) => { + const url = new URL(`${ENDPOINT}/posts?${searchParams}`); + url.searchParams.append('_embed', 'wp:term'); + const data = await ofetch(url.href); + return data.map((item) => { + const $ = load(item.content.rendered); + $('input').each(function () { + $(this).replaceWith($(this).attr('value') || ''); + }); + $('script').remove(); + return { + title: item.title.rendered, + link: item.link, + description: $.html(), + pubDate: timezone(parseDate(item.date_gmt), 0), + category: item._embedded['wp:term'] + .flat() + .filter((x) => x.taxonomy === 'post_tag') + .map((x) => x.name), + }; + }); +}; +const getTags = async (slug) => { + const data = await ofetch(`${ENDPOINT}/tags?slug=${slug}`); + if (data.length === 0) { + throw new Error(`Invalid tag slug: ${slug}`); + } + return { + id: data[0].id, + name: data[0].name, + link: data[0].link, + description: data[0].description, + }; +}; +export { ENDPOINT, getPosts, getTags }; From 861b15f0e6190ce8202aa4d84b6dbd4a61d1efca Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Sat, 19 Oct 2024 00:00:29 +0800 Subject: [PATCH 178/740] feat(route): add InfoQ Presentations (#17180) * feat(route): add InfoQ Presentations * fix typo --- lib/routes/infoq/presentations.ts | 203 +++++++++++++++++++++ lib/routes/infoq/templates/description.art | 41 +++++ 2 files changed, 244 insertions(+) create mode 100644 lib/routes/infoq/presentations.ts create mode 100644 lib/routes/infoq/templates/description.art diff --git a/lib/routes/infoq/presentations.ts b/lib/routes/infoq/presentations.ts new file mode 100644 index 000000000000000..bb328de14e3719e --- /dev/null +++ b/lib/routes/infoq/presentations.ts @@ -0,0 +1,203 @@ +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 { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import { art } from '@/utils/render'; +import path from 'node:path'; + +export const handler = async (ctx) => { + const { conference } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 12; + + const rootUrl = 'https://www.infoq.com'; + const currentUrl = new URL(`${conference ? `${conference}/` : ''}presentations/`, rootUrl).href; + + const { data: response } = await got(currentUrl); + + const $ = load(response); + + const language = $('html').prop('lang'); + + let items = $('ul[data-tax="presentations"] li[data-path]') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + const a = item.find('h3.card__title a'); + + 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'), { + images: image + ? [ + { + src: image, + alt: title, + }, + ] + : undefined, + intro: item.find('p.card__excerpt').text(), + }); + const link = new URL(a.prop('href'), rootUrl).href; + const guid = `infoq-${item.prop('data-path').replace(/^\//, '')}`; + const length = item.find('div.card__length').text() || undefined; + + return { + title, + description, + pubDate: parseDate(item.find('span.card__date span').text().trim()), + link, + category: item + .find('div.card__topics') + .toArray() + .map((c) => $(c).text().trim()), + author: item + .find('div.card__authors a') + .toArray() + .map((a) => $(a).text().trim()) + .join('/'), + guid, + id: guid, + content: { + html: description, + text: item.find('p.card__excerpt').text(), + }, + image, + banner: image, + language, + enclosure_url: length ? link : undefined, + enclosure_type: length ? 'video/mp4' : undefined, + enclosure_title: title, + itunes_duration: length, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + $$('div.player').prevAll().remove(); + $$('div.event__list-box').remove(); + + const length = $$('div.player__actions span').text() || undefined; + + const script = $$('script[type="text/javascript"]').text(); + const videoSrc = script.match(/P\.s\s=\s'(.*?)';/)?.[1] ?? undefined; + const poster = script.match(/P\.c\(.*?isWideScreen,\s'(.*?)',\s/)?.[1] ?? undefined; + const topicsStr = script.match(/var\stopicsInPage\s=\sJSON\.parse\('(.*?)'\);/)?.[1]?.replace(/\\/g, '') ?? undefined; + + if (videoSrc) { + $$('div.player').replaceWith( + art(path.join(__dirname, 'templates/description.art'), { + videos: [ + { + src: videoSrc, + poster, + type: `video/${videoSrc.split(/\./).pop()}`, + }, + ], + }) + ); + } + + const title = $$('meta[property="og:title"]').prop('content').trim(); + const image = $$('meta[property="twitter:image"]').prop('content') || $$('meta[property="og:image"]').prop('content'); + + item.title = title; + item.pubDate = parseDate($$('p.date').text()); + item.link = $$('meta[property="og:url"]').prop('content'); + item.category = topicsStr ? JSON.parse(topicsStr).map((t) => t.name) : $$('meta[name="keywords"]').prop('content').split(/,/); + item.author = $$('ul.authors a.author__link') + .toArray() + .map((a) => $$(a).text()) + .join('/'); + + $$('div.article__content').nextAll().remove(); + + const description = art(path.join(__dirname, 'templates/description.art'), { + images: image + ? [ + { + src: image, + alt: title, + }, + ] + : undefined, + description: $$('article.article').html(), + }); + + item.description = description; + item.content = { + html: description, + text: $$('article.article').text(), + }; + item.image = image; + item.banner = image; + item.language = language; + item.enclosure_url = videoSrc; + item.enclosure_type = item.enclosure_url ? 'video/mp4' : undefined; + item.enclosure_title = title; + item.itunes_duration = length; + + return item; + }) + ) + ); + + const title = $('title').text(); + const image = $('meta[property="og:image"]').prop('content'); + + return { + title, + description: $('meta[name="description"]').prop('content'), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: title.split(/-/).pop(), + language, + }; +}; + +export const route: Route = { + path: '/presentations/:conference?', + name: 'Presentations', + url: 'www.infoq.com', + maintainers: ['nczitzk'], + handler, + example: '/infoq/presentations', + parameters: { conference: 'Conference, all by default, can be found in URL' }, + description: `:::tip + If you subscribe to [InfoQ Live Jan 2024](https://www.infoq.com/infoq-live-jan-2024/presentations/),where the URL is \`https://www.infoq.com/infoq-live-jan-2024/presentations/\`, extract the part \`https://www.infoq.com/\` to the end, which is \`/presentations/\`, and use it as the parameter to fill in. Therefore, the route will be [\`/infoq/presentations/infoq-live-jan-2024\`](https://rsshub.app/infoq/presentations/infoq-live-jan-2024). + ::: + `, + categories: ['programming'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.infoq.com/presentations', 'www.infoq.com/:conference/presentations'], + target: (params) => { + const conference = params.conference; + + return `/presentations${conference ? `/${conference}` : ''}`; + }, + }, + ], +}; diff --git a/lib/routes/infoq/templates/description.art b/lib/routes/infoq/templates/description.art new file mode 100644 index 000000000000000..5b807209cc5d212 --- /dev/null +++ b/lib/routes/infoq/templates/description.art @@ -0,0 +1,41 @@ +{{ if images }} + {{ each images image }} + {{ if image?.src }} + <figure> + <img + {{ if image.alt }} + alt="{{ image.alt }}" + {{ /if }} + src="{{ image.src }}"> + </figure> + {{ /if }} + {{ /each }} +{{ /if }} + +{{ if videos }} + {{ each videos video }} + {{ if video?.src }} + <video + {{ set poster = video.poster || image?.src }} + {{ if poster }} + poster="{{ poster }}" + {{ /if }} + controls> + <source + src="{{ video.src }}" + type="{{ video.type }}"> + <object data="{{ video.src }}"> + <embed src="{{ video.src }}"> + </object> + </video> + {{ /if }} + {{ /each }} +{{ /if }} + +{{ if intro }} + <blockquote>{{ intro }}</blockquote> +{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file From 708994584acb06f8094ec11e46b06afb3ae758dc Mon Sep 17 00:00:00 2001 From: tourist <49434568+Blank0120@users.noreply.github.com> Date: Sat, 19 Oct 2024 02:57:06 +0800 Subject: [PATCH 179/740] feat(route/nudt): Add more RSS source about yjszs (#17188) --- lib/routes/nudt/yjszs.ts | 46 ++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 13 deletions(-) diff --git a/lib/routes/nudt/yjszs.ts b/lib/routes/nudt/yjszs.ts index 802c5c1eacd57fa..e0fdd1674f8596c 100644 --- a/lib/routes/nudt/yjszs.ts +++ b/lib/routes/nudt/yjszs.ts @@ -5,21 +5,35 @@ import { parseDate } from '@/utils/parse-date'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import timezone from '@/utils/timezone'; -/* 研究生院*/ +/* 研究生院 */ const host = 'http://yjszs.nudt.edu.cn'; +// 目前研究生院最近仍在更新的链接 const yjszs = new Map([ + // http://yjszs.nudt.edu.cn/pubweb/homePageList/recruitStudents.view?keyId=2 // http://yjszs.nudt.edu.cn//pubweb/homePageList/searchContent.view - ['tzgg', { title: '国防科技大学研究生院 - 通知公告', view: 'searchContent' }], + ['2', { title: '国防科技大学研究生院 - 通知公告' }], + // http://yjszs.nudt.edu.cn/pubweb/homePageList/recruitStudents.view?keyId=1 + ['1', { title: '国防科技大学研究生院 - 首页' }], + // http://yjszs.nudt.edu.cn/pubweb/homePageList/recruitStudents.view?keyId=8 + ['8', { title: '国防科技大学研究生院 - 招生简章' }], + // http://yjszs.nudt.edu.cn/pubweb/homePageList/recruitStudents.view?keyId=12 + ['12', { title: '国防科技大学研究生院 - 学校政策' }], // http://yjszs.nudt.edu.cn//pubweb/homePageList/recruitStudents.view?keyId=16 - ['sszs', { title: '国防科技大学研究生院 - 硕士招生', view: 'recruitStudents', keyId: '16' }], + ['16', { title: '国防科技大学研究生院 - 硕士招生' }], + // http://yjszs.nudt.edu.cn/pubweb/homePageList/recruitStudents.view?keyId=17 + ['17', { title: '国防科技大学研究生院 - 博士招生' }], + // http://yjszs.nudt.edu.cn/pubweb/homePageList/recruitStudents.view?keyId=23 + ['23', { title: '国防科技大学研究生院 - 院所发文' }], + // http://yjszs.nudt.edu.cn/pubweb/homePageList/recruitStudents.view?keyId=25 + ['25', { title: '国防科技大学研究生院 - 数据统计' }], ]); export const route: Route = { - path: '/yjszs/:type?', + path: '/yjszs/:keyId?', categories: ['university'], - example: '/nudt/yjszs/sszs', - parameters: { type: '分类,见下表,默认为硕士招生' }, + example: '/nudt/yjszs/2', + parameters: { keyId: '分类,见下表,默认为通知公告' }, features: { requireConfig: false, requirePuppeteer: false, @@ -28,22 +42,28 @@ export const route: Route = { supportPodcast: false, supportScihub: false, }, + radar: [ + { + source: ['yjszs.nudt.edu.cn'], + }, + ], name: '研究生院', maintainers: ['Blank0120'], handler, url: 'yjszs.nudt.edu.cn/', - description: `| 通知公告 | 硕士招生 | - | -------- | -------- | - | tzgg | sszs |`, + description: `| 通知公告 | 首页 | 招生简章 | 学校政策 | 硕士招生 | 博士招生 | 院所发文 | 数据统计 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | 2 | 1 | 8 | 12 | 16 | 17 | 23 | 25 |`, }; async function handler(ctx) { - const type = ctx.req.param('type') ?? 'sszs'; - const info = yjszs.get(type); + const keyId = ctx.req.param('keyId') ?? '2'; + const info = yjszs.get(keyId); if (!info) { - throw new InvalidParameterError('invalid type'); + throw new InvalidParameterError('invalid keyId'); } - const link = `${host}/pubweb/homePageList/${info.view}.view?keyId=${info.keyId ?? ''}`; + let link = `${host}/pubweb/homePageList`; + link += keyId === '2' ? `/searchContent.view` : `/recruitStudents.view?keyId=${keyId}`; const response = await got({ method: 'get', url: link, From 9852d9d1dc992248dc943199bbbd3825c0566bbc Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Sat, 19 Oct 2024 12:50:41 +0800 Subject: [PATCH 180/740] feat(route/fediverse): try official rss first to reduce requests --- lib/routes/fediverse/timeline.ts | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/lib/routes/fediverse/timeline.ts b/lib/routes/fediverse/timeline.ts index dc199a2d8c48f94..7fce06307e99b7a 100644 --- a/lib/routes/fediverse/timeline.ts +++ b/lib/routes/fediverse/timeline.ts @@ -5,6 +5,7 @@ import { parseDate } from '@/utils/parse-date'; import ofetch from '@/utils/ofetch'; import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; +import parser from '@/utils/rss-parser'; export const route: Route = { path: '/timeline/:account', @@ -21,7 +22,7 @@ export const route: Route = { supportScihub: false, }, name: 'Timeline', - maintainers: ['DIYgod'], + maintainers: ['DIYgod', 'pseudoyu'], handler, }; @@ -51,12 +52,29 @@ async function handler(ctx) { Accept: 'application/jrd+json', }, }); - const jsonLink = acc.links.find((link) => link.rel === 'self' && activityPubTypes.has(link.type))?.href; const link = acc.links.find((link) => link.rel === 'http://webfinger.net/rel/profile-page')?.href; + const officialFeed = await parser.parseURL(`${link}.rss`); + + if (officialFeed) { + return { + title: `${officialFeed.title} (Fediverse@${account})`, + description: officialFeed.description, + image: officialFeed.image?.url, + link: officialFeed.link, + item: officialFeed.items.map((item) => ({ + title: item.title, + description: item.content, + link: item.link, + pubDate: item.pubDate ? parseDate(item.pubDate) : null, + guid: item.guid, + })), + }; + } const self = await ofetch(jsonLink, requestOptions); + // If RSS feed is not available, fallback to original method const outbox = await ofetch(self.outbox, requestOptions); const firstOutbox = await ofetch(outbox.first, requestOptions); From 78bf6daf6c6f2546b57cdb579f3f9cbdf2c4cd77 Mon Sep 17 00:00:00 2001 From: Otstar Lin <i@ixk.me> Date: Sat, 19 Oct 2024 14:03:37 +0800 Subject: [PATCH 181/740] fix(route/twitter): Mask the error output to avoid leak token (#17193) --- lib/routes/twitter/api/web-api/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index b9331440ec74dd2..d01965943023d93 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -116,7 +116,7 @@ export const twitterGot = async ( agent, }; } else if (auth) { - throw new ConfigNotFoundError(`Twitter cookie for token ${auth?.token} is not valid`); + throw new ConfigNotFoundError(`Twitter cookie for token ${auth?.token?.replace(/(\w{8})(\w+)/, (_, v1, v2) => v1 + '*'.repeat(v2.length))} is not valid`); } const jsonCookie = dispatchers ? Object.fromEntries( From 08a869df113f52dad3a99507a0bbeaad4f74b287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=B9=E6=9E=97=E9=87=8C=E6=9C=89=E5=86=B0?= <zhullyb@outlook.com> Date: Sat, 19 Oct 2024 14:37:20 +0800 Subject: [PATCH 182/740] =?UTF-8?q?feat(route/zjut):=20Add=20=E6=B5=99?= =?UTF-8?q?=E6=B1=9F=E5=B7=A5=E4=B8=9A=E5=A4=A7=E5=AD=A6=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E6=9C=BA=E5=AD=A6=E9=99=A2=20(#17192)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route/zjut): Add 浙江工业大学计算机学院 * fix(route/zjut): improve timezone setting --- lib/routes/zjut/cs/index.ts | 105 ++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 lib/routes/zjut/cs/index.ts diff --git a/lib/routes/zjut/cs/index.ts b/lib/routes/zjut/cs/index.ts new file mode 100644 index 000000000000000..7ccdf383f8f427b --- /dev/null +++ b/lib/routes/zjut/cs/index.ts @@ -0,0 +1,105 @@ +import { Data, Route } from '@/types'; +import cache from '@/utils/cache'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; +import timezone from '@/utils/timezone'; + +const rootUrl = 'https://cs.zjut.edu.cn/jsp/newsclass.jsp?wcId='; +const host = 'cs.zjut.edu.cn'; + +export const route: Route = { + path: '/cs/:type', + categories: ['university'], + example: '/zjut/cs/54', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '浙江工业大学计算机科学与技术学院、软件学院', + maintainers: ['zhullyb'], + url: 'cs.zjut.edu.cn', + handler, + radar: [ + { + source: ['cs.zjut.edu.cn/jsp/newsclass.jsp?wcId=:type'], + target: '/cs/:type', + }, + ], + description: `| 新闻资讯 | 学术动态 | 通知公告 | +| ------- | ------- | ------- | +| 54 | 55 | 53 |`, +}; + +async function handler(ctx) { + const type = Number.parseInt(ctx.req.param('type')); + const response = await ofetch(rootUrl + type); + const $ = load(response); + + const list = $('dl.news') + .toArray() + .map((item) => { + const cheerioItem = $(item); + const a = cheerioItem.find('a'); + + try { + const title = a.text() || ''; + let link = a.attr('href'); + if (!link) { + link = ''; + } else if (!link.startsWith('http')) { + link = 'https://' + host + '/jsp/' + link; + } + const pubDate = timezone(parseDate(cheerioItem.find('.datetime').text().slice(1, -1)), +8); + + return { + title, + link, + pubDate, + }; + } catch { + return { + title: '', + link: '', + pubDate: Date.now(), + }; + } + }) + .filter((item) => item.title && item.link); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const newItem = { + ...item, + description: '', + }; + if (host === new URL(item.link).hostname) { + if (new URL(item.link).pathname.startsWith('/upload')) { + // 链接为一个文件,直接返回链接 + newItem.description = item.link; + } else { + const response = await ofetch(item.link); + const $ = load(response); + newItem.description = $('div.news1content').html() || ''; + } + } else { + // 涉及到其他站点,不方便做统一的 html 解析,直接返回链接 + newItem.description = item.link; + } + return newItem; + }) + ) + ); + + return { + title: $('li#classname').text() + ' - 浙江工业大学计算机科学与技术学院、软件学院', + link: rootUrl + type, + item: items, + } as Data; +} From 7ad44657ef228af4ff81e0d4d48355516ba4ffb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=B9=E6=9E=97=E9=87=8C=E6=9C=89=E5=86=B0?= <zhullyb@outlook.com> Date: Sat, 19 Oct 2024 14:38:14 +0800 Subject: [PATCH 183/740] =?UTF-8?q?feat(route/zjut):=20Add=20=E6=B5=99?= =?UTF-8?q?=E6=B1=9F=E5=B7=A5=E4=B8=9A=E5=A4=A7=E5=AD=A6=E6=95=99=E5=8A=A1?= =?UTF-8?q?=E5=A4=84=20(#17190)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route/zjut): Add 浙江工业大学教务处 * fix(route/zjut): return url for static file in description * fix(route/zjut): remove unexisting type * fix(route/zjut): improve timezone setting --- lib/routes/zjut/jwc/index.ts | 117 +++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 lib/routes/zjut/jwc/index.ts diff --git a/lib/routes/zjut/jwc/index.ts b/lib/routes/zjut/jwc/index.ts new file mode 100644 index 000000000000000..1708484809d9d37 --- /dev/null +++ b/lib/routes/zjut/jwc/index.ts @@ -0,0 +1,117 @@ +import { Data, Route } from '@/types'; +import cache from '@/utils/cache'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; +import timezone from '@/utils/timezone'; + +const rootUrl = 'http://www.jwc.zjut.edu.cn/'; +const host = 'www.jwc.zjut.edu.cn'; + +export const route: Route = { + path: '/jwc/:type', + categories: ['university'], + example: '/zjut/jwc/1839', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '浙江工业大学教务处', + maintainers: ['zhullyb'], + url: 'www.jwc.zjut.edu.cn', + handler, + radar: [ + { + source: ['www.jwc.zjut.edu.cn/:type/list.htm'], + target: '/jwc/:type', + }, + ], + description: `| 板块 | 参数 | +| ------- | ------- | +| 新闻动态 | 1838 | +| 课程思政 | 1842 | +| 校内动态 | 2613 | +| 学习思考 | 2614 | +| 成果展示 | 2615 | +| 媒体聚焦 | 2616 | +| 制度文件 | 2617 | +| 教学运行 | 1849 | +| 实践竞赛 | 1850 | +| 留学生Notice | 1851 | +| 项目申报 | 1852 | +| 学籍管理 | 1853 | +| 办事指南 | 1839 |`, +}; + +async function handler(ctx) { + const type = Number.parseInt(ctx.req.param('type')); + const response = await ofetch(rootUrl + type + '/list.htm'); + const $ = load(response); + + const list = $('.news.clearfix') + .toArray() + .map((item) => { + const cheerioItem = $(item); + const a = cheerioItem.find('a'); + + try { + const title = a.attr('title') || ''; + let link = a.attr('href'); + if (!link) { + link = ''; + } else if (!link.startsWith('http')) { + link = rootUrl.slice(0, -1) + link; + } + const pubDate = timezone(parseDate(cheerioItem.find('.news_meta').text()), +8); + + return { + title, + link, + pubDate, + }; + } catch { + return { + title: '', + link: '', + pubDate: Date.now(), + }; + } + }) + .filter((item) => item.title && item.link); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const newItem = { + ...item, + description: '', + }; + if (host === new URL(item.link).hostname) { + if (new URL(item.link).pathname.startsWith('/_upload')) { + // 链接为一个文件,直接返回链接 + newItem.description = item.link; + } else { + const response = await ofetch(item.link); + const $ = load(response); + newItem.description = $('.wp_articlecontent').html() || ''; + } + } else { + // 涉及到其他站点,不方便做统一的 html 解析,直接返回链接 + newItem.description = item.link; + } + return newItem; + }) + ) + ); + + return { + title: $('head > title').text() + ' - 浙江工业大学教务处', + link: rootUrl + type + '/list.htm', + item: items, + } as Data; +} From adca4dd227f314e0b3b9436cbc0e0a25c0457233 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Sat, 19 Oct 2024 14:58:45 +0800 Subject: [PATCH 184/740] fix(route/douban): douban nil topic error --- lib/routes/douban/other/topic.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/routes/douban/other/topic.ts b/lib/routes/douban/other/topic.ts index 0cf538aff92e3d1..6e7e4d0dcc1a5da 100644 --- a/lib/routes/douban/other/topic.ts +++ b/lib/routes/douban/other/topic.ts @@ -4,7 +4,7 @@ import got from '@/utils/got'; export const route: Route = { path: '/topic/:id/:sort?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/douban/topic/48823', parameters: { id: '话题id', sort: '排序方式,hot或new,默认为new' }, features: { @@ -16,7 +16,7 @@ export const route: Route = { supportScihub: false, }, name: '话题', - maintainers: ['LogicJake'], + maintainers: ['LogicJake', 'pseudoyu'], handler, }; @@ -36,8 +36,14 @@ async function handler(ctx) { }); const data = response.data.items; - const title = data[0].topic.name; - const description = data[0].topic.introduction; + + let title = id; + let description = ''; + + if (data[0].topic !== null) { + title = data[0].topic.name; + description = data[0].topic.introduction; + } const out = await Promise.all( data.map(async (item) => { From dff6ff5e2456bc50bc1431bf86fe141a8121e17f Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Sat, 19 Oct 2024 15:43:28 +0800 Subject: [PATCH 185/740] feat(route/cnki): revise cnki by adding official rss source --- lib/routes/cnki/journals.ts | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/routes/cnki/journals.ts b/lib/routes/cnki/journals.ts index 844baaa4a72753d..a2941e065fc0cc9 100644 --- a/lib/routes/cnki/journals.ts +++ b/lib/routes/cnki/journals.ts @@ -4,6 +4,7 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { ProcessItem } from './utils'; +import parser from '@/utils/rss-parser'; const rootUrl = 'https://navi.cnki.net'; @@ -22,16 +23,38 @@ export const route: Route = { }, radar: [ { - source: ['navi.cnki.net/knavi/journals/:name/detail'], + source: ['navi.cnki.net/knavi/journals/:name/detail', 'rss.cnki.net/kns/rss.aspx?Journal=:name&Virtual=knavi'], }, ], name: '期刊', - maintainers: ['Fatpandac', 'Derekmini'], + maintainers: ['Fatpandac', 'Derekmini', 'pseudoyu'], handler, }; async function handler(ctx) { const name = ctx.req.param('name'); + const rssUrl = `https://rss.cnki.net/kns/rss.aspx?Journal=${name}&Virtual=knavi`; + + const rssResponse = await got.get(rssUrl); + const feed = await parser.parseString(rssResponse.data); + + if (feed.items && feed.items.length !== 0) { + const items = feed.items.map((item) => ({ + title: item.title, + description: item.content, + pubDate: parseDate(item.pubDate), + link: item.link, + author: item.author, + })); + + return { + title: feed.title, + link: feed.link, + description: feed.description, + item: items, + }; + } + const journalUrl = `${rootUrl}/knavi/journals/${name}/detail`; const title = await got.get(journalUrl).then((res) => load(res.data)('head > title').text()); From 27c56bb4b8b9cecb0e5796814a62434df840d5b8 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Sat, 19 Oct 2024 16:27:54 +0800 Subject: [PATCH 186/740] fix(route/cnki): add err handling for rss parser --- lib/routes/cnki/journals.ts | 40 +++++++++++++++++++++---------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/lib/routes/cnki/journals.ts b/lib/routes/cnki/journals.ts index a2941e065fc0cc9..c9407b6a3f5c3c5 100644 --- a/lib/routes/cnki/journals.ts +++ b/lib/routes/cnki/journals.ts @@ -5,6 +5,7 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { ProcessItem } from './utils'; import parser from '@/utils/rss-parser'; +import logger from '@/utils/logger'; const rootUrl = 'https://navi.cnki.net'; @@ -36,23 +37,28 @@ async function handler(ctx) { const rssUrl = `https://rss.cnki.net/kns/rss.aspx?Journal=${name}&Virtual=knavi`; const rssResponse = await got.get(rssUrl); - const feed = await parser.parseString(rssResponse.data); - - if (feed.items && feed.items.length !== 0) { - const items = feed.items.map((item) => ({ - title: item.title, - description: item.content, - pubDate: parseDate(item.pubDate), - link: item.link, - author: item.author, - })); - - return { - title: feed.title, - link: feed.link, - description: feed.description, - item: items, - }; + + try { + const feed = await parser.parseString(rssResponse.data); + + if (feed.items && feed.items.length !== 0) { + const items = feed.items.map((item) => ({ + title: item.title, + description: item.content, + pubDate: parseDate(item.pubDate), + link: item.link, + author: item.author, + })); + + return { + title: feed.title, + link: feed.link, + description: feed.description, + item: items, + }; + } + } catch (error) { + logger.error(error); } const journalUrl = `${rootUrl}/knavi/journals/${name}/detail`; From 57b7cc39ac09d0649eb9115d2e224c2767eb67bf Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Sat, 19 Oct 2024 17:50:21 +0800 Subject: [PATCH 187/740] feat(route/apnews): Expand range of application (#16355) * feat(route/apnews): Expand range of application * . --- lib/routes/apnews/topics.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/routes/apnews/topics.ts b/lib/routes/apnews/topics.ts index 5c693c71240194d..df0ff55300776c8 100644 --- a/lib/routes/apnews/topics.ts +++ b/lib/routes/apnews/topics.ts @@ -5,7 +5,7 @@ import { fetchArticle, removeDuplicateByKey } from './utils'; const HOME_PAGE = 'https://apnews.com'; export const route: Route = { - path: '/topics/:topic?', + path: ['/topics/:topic?', '/nav/:nav{.*}?'], categories: ['traditional-media', 'popular'], example: '/apnews/topics/apf-topnews', view: ViewType.Articles, @@ -35,8 +35,9 @@ export const route: Route = { }; async function handler(ctx) { - const { topic = 'trending-news' } = ctx.req.param(); - const url = `${HOME_PAGE}/hub/${topic}`; + const { topic = 'trending-news', nav = '' } = ctx.req.param(); + const useNav = ctx.req.routePath === '/apnews/nav/:nav{.*}?'; + const url = useNav ? `${HOME_PAGE}/${nav}` : `${HOME_PAGE}/hub/${topic}`; const response = await got(url); const $ = load(response.data); From a495a6c9e01eaa4f3e3dd2b1a55b50050ccc1708 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Sat, 19 Oct 2024 21:06:57 +0800 Subject: [PATCH 188/740] fix(route/ixigua): ixigua json parse issue --- lib/routes/ixigua/user-video.ts | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/lib/routes/ixigua/user-video.ts b/lib/routes/ixigua/user-video.ts index c1dd8cc965c3995..d9bed9df03e8ac1 100644 --- a/lib/routes/ixigua/user-video.ts +++ b/lib/routes/ixigua/user-video.ts @@ -30,7 +30,7 @@ export const route: Route = { }, ], name: '用户视频投稿', - maintainers: [], + maintainers: ['FlashWingShadow', 'Fatpandac', 'pseudoyu'], handler, }; @@ -39,13 +39,24 @@ async function handler(ctx) { const disableEmbed = ctx.req.param('disableEmbed'); const url = `${host}/home/${uid}/?wid_try=1`; - const response = await got(url); - const $ = load(response.data); - const jsData = $('#SSR_HYDRATED_DATA').html().replace('window._SSR_HYDRATED_DATA=', '').replaceAll('undefined', '""'); - const data = JSON.parse(jsData); + const { data } = await got(url); + const $ = load(data); + const jsData = $('#SSR_HYDRATED_DATA').html(); - const videoInfos = data.AuthorVideoList.videoList; - const userInfo = data.AuthorDetailInfo; + if (!jsData) { + throw new Error('Failed to find SSR_HYDRATED_DATA'); + } + + const jsonData = JSON.parse(jsData.match(/var\s+data\s*=\s*({.*?});/s)?.[1].replaceAll('undefined', 'null') || '{}'); + + const { + AuthorVideoList: { videoList: videoInfos }, + AuthorDetailInfo: userInfo, + } = jsonData; + + if (!videoInfos || !userInfo) { + throw new Error('Failed to extract required data from JSON'); + } return { title: `${userInfo.name} 的西瓜视频`, From 1d77ba37852d25ed78a5e894e9d2d225de443298 Mon Sep 17 00:00:00 2001 From: mocusez <mocusz@163.com> Date: Sun, 20 Oct 2024 01:08:18 +1100 Subject: [PATCH 189/740] fix(route/xaut): update new homepage (#17194) --- lib/routes/xaut/index.ts | 33 +++++++++++++-------------------- lib/routes/xaut/namespace.ts | 2 +- 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/lib/routes/xaut/index.ts b/lib/routes/xaut/index.ts index 7768d41c964885c..19f7bf187ac37c7 100644 --- a/lib/routes/xaut/index.ts +++ b/lib/routes/xaut/index.ts @@ -1,6 +1,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; +import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { load } from 'cheerio'; @@ -8,7 +9,7 @@ export const route: Route = { path: '/index/:category?', categories: ['university'], example: '/xaut/index/tzgg', - parameters: { category: '通知类别,默认为通知公告' }, + parameters: { category: '通知类别,默认为学校新闻' }, features: { requireConfig: false, requirePuppeteer: false, @@ -20,19 +21,19 @@ export const route: Route = { name: '学校主页', maintainers: ['mocusez'], handler, - description: `| 通知公告 | 校园要闻 | 媒体播报 | 学术活动 | - | :------: | :------: | :------: | :------: | - | tzgg | xyyw | mtbd | xshd |`, + description: `| 学校新闻 | 砥志研思 | 立德树人 | 传道授业 | 校闻周知 | + | :------: | :------: | :------: | :------: | :------: | + | xxxw | dzys | ldsr | cdsy | xwzz |`, }; async function handler(ctx) { let category = ctx.req.param('category'); - const dic_html = { tzgg: 'tzgg.htm', xyyw: 'xyyw.htm', mtbd: 'mtbd1.htm', xshd: 'xshd.htm' }; - const dic_title = { tzgg: '通知公告', xyyw: '校园要闻', mtbd: '媒体播报', xshd: '学术活动' }; + const dic_html = { xxxw: 'xxxw.htm', dzys: 'dzys.htm', ldsr: 'ldsr.htm', cdsy: 'cdsy.htm', xwzz: 'xwzz.htm' }; + const dic_title = { xxxw: '学校新闻', dzys: '砥志研思', ldsr: '立德树人', cdsy: '传道授业', xwzz: '校闻周知' }; // 设置默认值 if (dic_title[category] === undefined) { - category = 'tzgg'; + category = 'xxxw'; } const response = await got({ @@ -42,26 +43,18 @@ async function handler(ctx) { const data = response.body; const $ = load(data); - // 这个列表指通知公告详情列表 - const list = $('.newslist_block ul a') + const list = $('div.nlist ul li') .map((_, item) => { item = $(item); - const temp = item.find('span').text(); - // link原来长这样:'../info/1196/13990.htm' - const link = item.attr('href').replace(/^\.\./, 'http://www.xaut.edu.cn'); - let date = parseDate(temp.slice(-10, -1), 'YYYY-MM-DD'); - let title = temp.slice(0, -10); - - if (category === 'xshd') { - date = parseDate(temp.slice(-11, -1).replace('年', '-').replace('月', '-').replace('日', ''), 'YYYY-MM-DD'); - title = temp.slice(0, -11); - } + const link = item.find('a').attr('href').replace(/^\.\./, 'http://www.xaut.edu.cn'); + const pubDate = timezone(parseDate(item.find('div.time').text().trim()), +8); + const title = item.find('h5').text(); return { title, link, - pubDate: date, + pubDate, }; }) .get(); diff --git a/lib/routes/xaut/namespace.ts b/lib/routes/xaut/namespace.ts index ca23d46f71262d0..fddaf8e73e5bde9 100644 --- a/lib/routes/xaut/namespace.ts +++ b/lib/routes/xaut/namespace.ts @@ -2,5 +2,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '西安理工大学', - url: 'index.xaut.edu.cn', + url: 'www.xaut.edu.cn', }; From 2fee4250fb1a7077dff4d85271e268a7b7695c1a Mon Sep 17 00:00:00 2001 From: Himingway <badppg@qq.com> Date: Sun, 20 Oct 2024 00:27:11 +0800 Subject: [PATCH 190/740] =?UTF-8?q?feat(route):=20add=20route=20for=20?= =?UTF-8?q?=E6=B5=A6=E4=B8=9C=E6=96=B0=E5=8C=BA-=E6=94=BF=E5=8A=A1?= =?UTF-8?q?=E5=85=AC=E5=BC=80=20=20(#17115)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * newly add 浦东新区-政务公开 route * newly add 浦东新区-政务公开 route * Update zwgk.ts * newly add 浦东新区-政务公开 route update * newly add 浦东新区-政务公开 route update * newly add 浦东新区-政务公开 route update * newly add 浦东新区-政务公开 route update * Update lib/routes/gov/pudong/zwgk.ts --------- --- lib/routes/gov/pudong/zwgk.ts | 65 +++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 lib/routes/gov/pudong/zwgk.ts diff --git a/lib/routes/gov/pudong/zwgk.ts b/lib/routes/gov/pudong/zwgk.ts new file mode 100644 index 000000000000000..4bf720ee1e4b8be --- /dev/null +++ b/lib/routes/gov/pudong/zwgk.ts @@ -0,0 +1,65 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; // 解析日期的工具函数 +import cache from '@/utils/cache'; + +export const route: Route = { + path: '/pudong/zwgk', + categories: ['government'], + example: '/gov/pudong/zwgk', + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.pudong.gov.cn/zwgk/zxxxgk/index.html'], + target: '/pudong/zwgk', + }, + ], + name: '政务公开-浦东新区', + maintainers: ['himingway'], + handler, +}; + +async function handler() { + const response = await ofetch('https://www.pudong.gov.cn/zwgk-search-front/api/data/affair', { + method: 'POST', + body: { + channelList: ['5144'], + pageSize: 20, + }, + }); + const data = response.data.list; + + const list = data.map((item) => ({ + title: item.title, + link: item.url, + pubDate: parseDate(item.display_date), + })); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const response = await ofetch(item.link); + const $ = load(response); + item.description = $('#ivs_content').first().html(); + return item; + }) + ) + ); + + return { + // 源标题 + title: '信息公开_政务公开-上海市浦东新区门户网站', + // 源链接 + link: 'https://www.pudong.gov.cn/zwgk/zxxxgk/index.html', + // 源文章 + item: items, + }; +} From cbe0201ca25893667cb079bd8da2e7d95eff4d6a Mon Sep 17 00:00:00 2001 From: Arnaud Gissinger <37625778+mathix420@users.noreply.github.com> Date: Sat, 19 Oct 2024 18:40:57 +0200 Subject: [PATCH 191/740] feat(route/rsshub/transform): Add support for link prefixes (#17187) --- lib/routes/rsshub/transform/json.ts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lib/routes/rsshub/transform/json.ts b/lib/routes/rsshub/transform/json.ts index ec4ba9601d89821..782754738ec0182 100644 --- a/lib/routes/rsshub/transform/json.ts +++ b/lib/routes/rsshub/transform/json.ts @@ -39,14 +39,15 @@ export const route: Route = { handler, description: `Specify options (in the format of query string) in parameter \`routeParams\` parameter to extract data from JSON. -| Key | Meaning | Accepted Values | Default | -| ------------- | ---------------------------------------- | --------------- | ------------------------------------------ | -| \`title\` | The title of the RSS | \`string\` | Extracted from home page of current domain | -| \`item\` | The JSON Path as \`item\` element | \`string\` | Entire JSON response | -| \`itemTitle\` | The JSON Path as \`title\` in \`item\` | \`string\` | None | -| \`itemLink\` | The JSON Path as \`link\` in \`item\` | \`string\` | None | -| \`itemDesc\` | The JSON Path as \`description\` in \`item\` | \`string\` | None | -| \`itemPubDate\` | The JSON Path as \`pubDate\` in \`item\` | \`string\` | None | +| Key | Meaning | Accepted Values | Default | +| ------------------ | -------------------------------------------- | ----------------- | ------------------------------------------ | +| \`title\` | The title of the RSS | \`string\` | Extracted from home page of current domain | +| \`item\` | The JSON Path as \`item\` element | \`string\` | Entire JSON response | +| \`itemTitle\` | The JSON Path as \`title\` in \`item\` | \`string\` | None | +| \`itemLink\` | The JSON Path as \`link\` in \`item\` | \`string\` | None | +| \`itemLinkPrefix\` | Optional Prefix for \`itemLink\` value | \`string\` | None | +| \`itemDesc\` | The JSON Path as \`description\` in \`item\` | \`string\` | None | +| \`itemPubDate\` | The JSON Path as \`pubDate\` in \`item\` | \`string\` | None | :::tip JSON Path only supports format like \`a.b.c\`. if you need to access arrays, like \`a[0].b\`, you can write it as \`a.0.b\`. @@ -92,6 +93,11 @@ async function handler(ctx) { const items = jsonGet(response.data, routeParams.get('item')).map((item) => { let link = jsonGet(item, routeParams.get('itemLink')).trim(); + const linkPrefix = routeParams.get('itemLinkPrefix'); + + if (link && linkPrefix) { + link = `${linkPrefix}${link}`; + } // 补全绝对链接 if (link && !link.startsWith('http')) { link = `${new URL(url).origin}${link}`; From 4505df7c1629929b90b342d69c746114263143c8 Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Sat, 19 Oct 2024 18:23:54 +0100 Subject: [PATCH 192/740] =?UTF-8?q?feat(route):=20add=20tkww=20=E5=A4=A7?= =?UTF-8?q?=E5=85=AC=E6=96=87=E5=8C=AF=20route=20(#17189)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add tkww 大公文匯 route * fix Prevent passing a function reference directly to iterator methods. * fix description * Update lib/routes/tkww/namespace.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update index.ts --------- --- lib/routes/tkww/index.ts | 83 ++++++++++++++++++++++++++++++++++++ lib/routes/tkww/namespace.ts | 6 +++ 2 files changed, 89 insertions(+) create mode 100644 lib/routes/tkww/index.ts create mode 100644 lib/routes/tkww/namespace.ts diff --git a/lib/routes/tkww/index.ts b/lib/routes/tkww/index.ts new file mode 100644 index 000000000000000..ec812ae5d620995 --- /dev/null +++ b/lib/routes/tkww/index.ts @@ -0,0 +1,83 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { config } from '@/config'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; + +export const route: Route = { + path: '/:column{.+}?', + categories: ['traditional-media'], + example: '/tkww/hong_kong', + parameters: { + column: '欄目,默認為 home (首頁)', + }, + features: { + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '新聞', + maintainers: ['quiniapiezoelectricity'], + radar: [ + { + source: ['www.tkww.hk/:column'], + target: '/:column', + }, + ], + handler, + description: ` +:::tip +欄目可用\`名稱\`或對應網頁的\`path\`, +如 \`https://www.tkww.hk/hong_kong\` 的欄目可以填\`香港\`或是\`hong_kong\` +而 \`https://www.tkww.hk/china/shanghai\` 的欄目則需填\`china/shanghai\` +:::`, +}; + +async function handler(ctx) { + const column = ctx.req.param('column') ?? 'home'; + + const columns = await cache.tryGet('https://www.tkww.hk/columns.json', async () => await got('https://www.tkww.hk/columns.json'), config.cache.routeExpire, false); + + let metadata; + let scope = columns.data.data; + for (const segment of column.split('/').filter((item) => typeof item === 'string')) { + metadata = scope.find((item) => item.name === segment || item.dirname === segment); + scope = metadata?.children ?? []; + } + + if (metadata === undefined) { + throw new InvalidParameterError(`Invalid Column: ${column}`); + } + + const stories = await got(`https://www.tkww.hk/columns/${metadata.uuid}/tkww/app/stories.json`); + + const items = await Promise.all( + stories.data.data.stories.map((item) => + cache.tryGet(item.url, async () => { + item.link = item.url; + item.description = item.summary; + item.pubDate = item.publishTime; + item.category = []; + if (item.keywords) { + item.category = [...item.category, ...item.keywords]; + } + if (item.tags) { + item.category = [...item.category, ...item.tags]; + } + item.category = [...new Set(item.category)]; + const response = await got(item.jsonUrl); + item.description = response.data.data.content; + return item; + }) + ) + ); + + return { + title: metadata.seoTitle, + description: metadata.seoDescription, + link: metadata.url, + item: items, + }; +} diff --git a/lib/routes/tkww/namespace.ts b/lib/routes/tkww/namespace.ts new file mode 100644 index 000000000000000..a57b54156a2f2ab --- /dev/null +++ b/lib/routes/tkww/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '大公文匯網', + url: 'www.tkww.hk', +}; From 090f8f3498dab32a96ee733ee6525b260f426e37 Mon Sep 17 00:00:00 2001 From: xizeyoupan <44920131+xizeyoupan@users.noreply.github.com> Date: Sun, 20 Oct 2024 04:01:52 +0800 Subject: [PATCH 193/740] docs: add require config for coolapk (#17197) --- lib/routes/coolapk/dyh.ts | 8 +++++++- lib/routes/coolapk/hot.ts | 8 +++++++- lib/routes/coolapk/huati.ts | 8 +++++++- lib/routes/coolapk/namespace.ts | 6 ++++++ lib/routes/coolapk/toutiao.ts | 8 +++++++- lib/routes/coolapk/tuwen.ts | 15 ++++++++++----- lib/routes/coolapk/user-dynamic.ts | 8 +++++++- 7 files changed, 51 insertions(+), 10 deletions(-) diff --git a/lib/routes/coolapk/dyh.ts b/lib/routes/coolapk/dyh.ts index 8b386a72505c264..ba865265aa5ab53 100644 --- a/lib/routes/coolapk/dyh.ts +++ b/lib/routes/coolapk/dyh.ts @@ -9,7 +9,13 @@ export const route: Route = { example: '/coolapk/dyh/1524', parameters: { dyhId: '看看号ID' }, features: { - requireConfig: false, + requireConfig: [ + { + name: 'ALLOW_USER_HOTLINK_TEMPLATE', + optional: true, + description: '设置为`true`并添加`image_hotlink_template`参数来代理图片', + }, + ], requirePuppeteer: false, antiCrawler: false, supportBT: false, diff --git a/lib/routes/coolapk/hot.ts b/lib/routes/coolapk/hot.ts index e12624ad9fe4b28..fa7211abe9513d8 100644 --- a/lib/routes/coolapk/hot.ts +++ b/lib/routes/coolapk/hot.ts @@ -72,7 +72,13 @@ export const route: Route = { example: '/coolapk/hot', parameters: { type: '默认为`jrrm`', period: '默认为`daily`' }, features: { - requireConfig: false, + requireConfig: [ + { + name: 'ALLOW_USER_HOTLINK_TEMPLATE', + optional: true, + description: '设置为`true`并添加`image_hotlink_template`参数来代理图片', + }, + ], requirePuppeteer: false, antiCrawler: false, supportBT: false, diff --git a/lib/routes/coolapk/huati.ts b/lib/routes/coolapk/huati.ts index 7fc9820e895ffe0..67dc7d951ce6925 100644 --- a/lib/routes/coolapk/huati.ts +++ b/lib/routes/coolapk/huati.ts @@ -9,7 +9,13 @@ export const route: Route = { example: '/coolapk/huati/iPhone', parameters: { tag: '话题名称' }, features: { - requireConfig: false, + requireConfig: [ + { + name: 'ALLOW_USER_HOTLINK_TEMPLATE', + optional: true, + description: '设置为`true`并添加`image_hotlink_template`参数来代理图片', + }, + ], requirePuppeteer: false, antiCrawler: false, supportBT: false, diff --git a/lib/routes/coolapk/namespace.ts b/lib/routes/coolapk/namespace.ts index f9969354ad5a3c8..bc71d210bc9f7b2 100644 --- a/lib/routes/coolapk/namespace.ts +++ b/lib/routes/coolapk/namespace.ts @@ -3,4 +3,10 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '酷安', url: 'coolapk.com', + description: ` +:::tip +即日起,多数路由图片防盗链。 +需要将 \`ALLOW_USER_HOTLINK_TEMPLATE\` 环境变量设置为 \`true\` ,然后配置\`image_hotlink_template\` 。 +详见 [#16715](https://github.com/DIYgod/RSSHub/issues/16715) +:::`, }; diff --git a/lib/routes/coolapk/toutiao.ts b/lib/routes/coolapk/toutiao.ts index e4a6fd8104c4bf2..74da783ff1d5957 100644 --- a/lib/routes/coolapk/toutiao.ts +++ b/lib/routes/coolapk/toutiao.ts @@ -8,7 +8,13 @@ export const route: Route = { example: '/coolapk/toutiao', parameters: { type: '默认为history' }, features: { - requireConfig: false, + requireConfig: [ + { + name: 'ALLOW_USER_HOTLINK_TEMPLATE', + optional: true, + description: '设置为`true`并添加`image_hotlink_template`参数来代理图片', + }, + ], requirePuppeteer: false, antiCrawler: false, supportBT: false, diff --git a/lib/routes/coolapk/tuwen.ts b/lib/routes/coolapk/tuwen.ts index ece427b0d6abbd5..65a87d081cafaf2 100644 --- a/lib/routes/coolapk/tuwen.ts +++ b/lib/routes/coolapk/tuwen.ts @@ -3,12 +3,18 @@ import got from '@/utils/got'; import utils from './utils'; export const route: Route = { - path: ['/tuwen/:type?', '/tuwen-xinxian'], + path: ['/tuwen/:type?'], categories: ['social-media'], example: '/coolapk/tuwen', parameters: { type: '默认为hot' }, features: { - requireConfig: false, + requireConfig: [ + { + name: 'ALLOW_USER_HOTLINK_TEMPLATE', + optional: true, + description: '设置为`true`并添加`image_hotlink_template`参数来代理图片', + }, + ], requirePuppeteer: false, antiCrawler: false, supportBT: false, @@ -25,16 +31,15 @@ export const route: Route = { async function handler(ctx) { const type = ctx.req.param('type') || 'hot'; - const requestPath = ctx.req.path; let feedTitle; const fullUrl = new URL('/v6/page/dataList', utils.base_url); - if (requestPath.startsWith('/coolapk/tuwen-xinxian') || type === 'latest') { + if (type === 'latest') { // 实时 fullUrl.searchParams.append('url', `/feed/digestList?${new URLSearchParams('cacheExpires=300&type=12&message_status=all&is_html_article=1&filterEmptyPicture=1&filterTag=二手交易,酷安自贸区,薅羊毛小分队').toString()}`); fullUrl.searchParams.append('title', '新鲜图文'); fullUrl.searchParams.append('subTitle', ''); feedTitle = '酷安 - 新鲜图文'; - } else if (requestPath.startsWith('/coolapk/tuwen')) { + } else { // 精选 fullUrl.searchParams.append('url', `#/feed/digestList?${new URLSearchParams('type=12&is_html_article=1&recommend=3,4').toString()}`); fullUrl.searchParams.append('title', '图文'); diff --git a/lib/routes/coolapk/user-dynamic.ts b/lib/routes/coolapk/user-dynamic.ts index 965df483525cc93..a23425839d561b9 100644 --- a/lib/routes/coolapk/user-dynamic.ts +++ b/lib/routes/coolapk/user-dynamic.ts @@ -9,7 +9,13 @@ export const route: Route = { example: '/coolapk/user/3177668/dynamic', parameters: { uid: '在个人界面右上分享-复制链接获取' }, features: { - requireConfig: false, + requireConfig: [ + { + name: 'ALLOW_USER_HOTLINK_TEMPLATE', + optional: true, + description: '设置为`true`并添加`image_hotlink_template`参数来代理图片', + }, + ], requirePuppeteer: false, antiCrawler: false, supportBT: false, From 9964bbbfb11c14a77dc8c156a43875a701ade066 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Mon, 21 Oct 2024 01:41:26 +0800 Subject: [PATCH 194/740] =?UTF-8?q?fix(route):=20=E4=B8=AD=E5=8D=8E?= =?UTF-8?q?=E4=BA=BA=E6=B0=91=E5=85=B1=E5=92=8C=E5=9B=BD=E5=9B=BD=E5=AE=B6?= =?UTF-8?q?=E5=8F=91=E5=B1=95=E5=92=8C=E6=94=B9=E9=9D=A9=E5=A7=94=E5=91=98?= =?UTF-8?q?=E4=BC=9A=E4=BB=B7=E6=A0=BC=E7=9B=91=E6=B5=8B=E4=B8=AD=E5=BF=83?= =?UTF-8?q?=20(#17201)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/gov/jgjcndrc/index.ts | 161 ++++++++++++++++++------------- 1 file changed, 95 insertions(+), 66 deletions(-) diff --git a/lib/routes/gov/jgjcndrc/index.ts b/lib/routes/gov/jgjcndrc/index.ts index 36b54c93d029680..535c44be5bf7d19 100644 --- a/lib/routes/gov/jgjcndrc/index.ts +++ b/lib/routes/gov/jgjcndrc/index.ts @@ -1,96 +1,125 @@ import { 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'; -export const route: Route = { - path: '/jgjcndrc/:id?', - categories: ['government'], - example: '/gov/jgjcndrc', - parameters: { id: '栏目 id,见下表,默认为 692,即通知公告' }, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - name: '价格监测中心', - maintainers: ['nczitzk'], - handler, - description: `| 通知公告 | 中心工作动态 | 地方工作动态 | 监测信息 | 分析预测 | 调查报告 | - | -------- | ------------ | ------------ | -------- | -------- | -------- | - | 692 | 693 | 694 | 695 | 696 | 697 | - - | 价格指数 | 地方价格监测 | 价格监测报告制度 | 监测法规 | 媒体聚焦 | - | -------- | ------------ | ---------------- | -------- | -------- | - | 698 | 699 | 700 | 701 | 753 | - - #### 监测信息 +export const handler = async (ctx) => { + const { columnId = '1832739866673426433', subColumnId } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; - | 国内外市场价格监测情况周报 | 主要粮油副食品日报 | 生猪出厂价与玉米价格周报 | 国际市场石油价格每日 动态 | - | -------------------------- | ------------------ | ------------------------ | ------------------------- | - | 749 | 703 | 704 | 705 | + const rootUrl = 'https://www.jgjcndrc.org.cn'; + const currentUrl = new URL(`list?clmId=${columnId}${subColumnId ? `&sclmId=${subColumnId}` : ''}`, rootUrl).href; + const apiColumnUrl = new URL(`prod-api/portal/artPageByColumn/${subColumnId ?? columnId}`, rootUrl).href; - | 非学科类培训服务价格 | 监测周期价格动态 | 月度监测行情表 | 猪料、鸡料、蛋料比价 | - | -------------------- | ---------------- | -------------- | -------------------- | - | 821 | 706 | 707 | 708 |`, -}; + const { data: currentResponse } = await got(currentUrl); -async function handler(ctx) { - const { id = 'sytzgg' } = ctx.req.param(); - const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 30; + const $ = load(currentResponse); - const rootUrl = 'http://www.jgjcndrc.org.cn'; - const currentUrl = new URL(`list.aspx?clmId=${id}`, rootUrl).href; + const language = $('html').prop('lang'); - const { data: response } = await got(currentUrl); + const { data: response } = await got(apiColumnUrl, { + searchParams: { + pageNum: 1, + pageSize: limit, + }, + }); - const $ = load(response); + let items = response.data.slice(0, limit).map((item) => { + const guid = `jgjcndrc-${item.articleId}`; - let items = $('ul.list_02 li.li a[title]') - .slice(0, limit) - .toArray() - .map((item) => { - item = $(item); - - return { - title: item.text(), - link: new URL(item.prop('href'), rootUrl).href, - pubDate: parseDate(item.prev().text()), - }; - }); + return { + title: item.articleTitle, + pubDate: parseDate(item.pubDate), + link: new URL(`prod-api/portal/article/${item.articleId}`, rootUrl).href, + guid, + id: guid, + language, + }; + }); items = await Promise.all( items.map((item) => cache.tryGet(item.link, async () => { const { data: detailResponse } = await got(item.link); - const content = load(detailResponse); - - item.title = content('div.txt_title1').text(); - item.description = content('div#zoom').html(); - item.pubDate = parseDate(content('div.txt_subtitle1').text().trim()); + const data = detailResponse.data; + + const title = data.articleTitle; + const description = data.articleContent; + const guid = `jgjcndrc-${data.articleId}`; + + item.title = title; + item.description = description; + item.pubDate = timezone(parseDate(data.pubDate), +8); + item.link = data.linkUrl || new URL(data.articleUrl, rootUrl).href; + item.category = data.parentColumns.map((c) => c.columnName); + item.guid = guid; + item.id = guid; + item.content = { + html: description, + text: description, + }; + item.language = language; return item; }) ) ); - const author = $('title').text(); - const subtitle = $('li.L').first().text(); - const image = new URL($('img.logo2').prop('src'), rootUrl).href; + const image = new URL($('header img').last().prop('src'), rootUrl).href; return { - item: items, - title: `${author} - ${subtitle}`, + title: `${$('title').text()}${$('div.tit').text() ? ` - ${$('div.tit').text()}` : ''}`, + description: $('meta[name="description"]').prop('content'), link: currentUrl, - description: author, - language: $('html').prop('lang'), + item: items, + allowEmpty: true, image, - subtitle, - author, + author: $('header h1').text(), + language, }; -} +}; + +export const route: Route = { + path: '/jgjcndrc/:columnId?/:subColumnId?', + name: '中华人民共和国国家发展和改革委员会价格监测中心', + url: 'www.jgjcndrc.org.cn', + maintainers: ['nczitzk'], + handler, + example: '/gov/jgjcndrc/1832739866673426433', + parameters: { + columnId: '栏目 id,默认为 `1832739866673426433`,即通知公告,可在对应栏目页 URL 中找到', + subColumnId: '子栏目 id,默认为空,可在对应子栏目页 URL 中找到', + }, + description: `:::tip + 若订阅 [通知公告](https://www.jgjcndrc.org.cn/list?clmId=1832739866673426433),网址为 \`https://www.jgjcndrc.org.cn/list?clmId=1832739866673426433\`。截取 \`clmId\` 的参数部分 \`1832739866673426433\` 作为参数填入,此时路由为 [\`/gov/jgjcndrc/1832739866673426433\`](https://rsshub.app/gov/jgjcndrc/1832739866673426433)。 + + 若订阅 [国内外市场价格监测情况周报](https://www.jgjcndrc.org.cn/list?clmId=1832298113994649601&sclmId=1832751799531220993),网址为 \`https://www.jgjcndrc.org.cn/list?clmId=1832298113994649601&sclmId=1832751799531220993\`。截取 \`clmId\` 和 \`sclmId\` 的参数部分 \`1832298113994649601\` 和 \`1832751799531220993\` 作为参数填入,此时路由为 [\`/gov/jgjcndrc/1832298113994649601/1832751799531220993\`](https://rsshub.app/gov/jgjcndrc/1832298113994649601/1832751799531220993)。 + :::`, + categories: ['government'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.jgjcndrc.org.cn/list'], + target: (_, url) => { + url = new URL(url); + const columnId = url.searchParams.get('clmId'); + const subColumnId = url.searchParams.get('sclmId'); + + return `/jgjcndrc${columnId ? `/${columnId}${subColumnId ? `/${subColumnId}` : ''}` : ''}`; + }, + }, + ], +}; From 2c898cf3fd5818ab286ad2a7e1653a2e309a6f96 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Mon, 21 Oct 2024 02:01:35 +0800 Subject: [PATCH 195/740] chore: block PR with empty description --- scripts/workflow/test-route/identify.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/workflow/test-route/identify.mjs b/scripts/workflow/test-route/identify.mjs index 4aa342d8c4cd123..98b68a9fe17dcc3 100644 --- a/scripts/workflow/test-route/identify.mjs +++ b/scripts/workflow/test-route/identify.mjs @@ -6,8 +6,8 @@ export default async function identify({ github, context, core }, body, number, core.debug(`sender: ${sender}`); core.debug(`body: ${body}`); // Remove all HTML comments before performing the match - const bodyNoCmts = body.replaceAll(/<!--[\S\s]*?-->/g, ''); - const m = bodyNoCmts.match(/```routes\s+([\S\s]*?)```/); + const bodyNoCmts = body?.replaceAll(/<!--[\S\s]*?-->/g, ''); + const m = bodyNoCmts?.match(/```routes\s+([\S\s]*?)```/); core.debug(`match: ${m}`); let routes = null; From 23341247b81a6ef9892d146a198703503d15cd33 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Sun, 20 Oct 2024 13:56:38 -0700 Subject: [PATCH 196/740] fix(route): dribbble (#17205) --- lib/routes/dribbble/keyword.ts | 2 +- lib/routes/dribbble/popular.ts | 2 +- lib/routes/dribbble/user.ts | 2 +- lib/routes/dribbble/utils.ts | 34 ++++++++++++++++------------------ 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/lib/routes/dribbble/keyword.ts b/lib/routes/dribbble/keyword.ts index 3e2b933aa92fe39..b40f939c3b90bd8 100644 --- a/lib/routes/dribbble/keyword.ts +++ b/lib/routes/dribbble/keyword.ts @@ -25,5 +25,5 @@ async function handler(ctx) { const title = `Dribbble - keyword ${keyword}`; - return await utils.getData(ctx, url, title); + return await utils.getData(url, title); } diff --git a/lib/routes/dribbble/popular.ts b/lib/routes/dribbble/popular.ts index 6fcfbe491e90d7e..628394e818ca859 100644 --- a/lib/routes/dribbble/popular.ts +++ b/lib/routes/dribbble/popular.ts @@ -32,5 +32,5 @@ async function handler(ctx) { const title = 'Dribbble - Popular Shots'; - return await utils.getData(ctx, url, title); + return await utils.getData(url, title); } diff --git a/lib/routes/dribbble/user.ts b/lib/routes/dribbble/user.ts index 2a665bdc12a9849..5dedf78c417d926 100644 --- a/lib/routes/dribbble/user.ts +++ b/lib/routes/dribbble/user.ts @@ -30,5 +30,5 @@ async function handler(ctx) { const title = `Dribbble - user ${name}`; - return await utils.getData(ctx, url, title); + return await utils.getData(url, title); } diff --git a/lib/routes/dribbble/utils.ts b/lib/routes/dribbble/utils.ts index 1f20f7d1b463ce8..53435b1701fa977 100644 --- a/lib/routes/dribbble/utils.ts +++ b/lib/routes/dribbble/utils.ts @@ -2,22 +2,24 @@ 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 { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; +const host = 'https://dribbble.com'; + // Refactored function to load a link asynchronously async function loadContent(link) { // Make a GET request to the specified and retrieve the response - const response = await got(link); - const $ = load(response.data); + const response = await ofetch(link); + const $ = load(response); const shotData = JSON.parse( $('script') .text() - .match(/shotData:\s({.+?}),\n/)[1] + .match(/shotData:\s({.+?}),\n/)?.[1] ?? '{}' ); // Join multiple shots together by selecting elements with class 'media-shot' or 'main-shot' or 'block-media-wrapper' @@ -91,9 +93,7 @@ async function loadContent(link) { // Refactored code with comments for clarity -function ProcessFeed(list, caches) { - const host = 'https://dribbble.com'; - +function ProcessFeed(list) { // Use Promise.all to process all items in the list asynchronously return Promise.all( list.map((item) => { @@ -101,18 +101,20 @@ function ProcessFeed(list, caches) { // The link of item is "/signup/new" when access "https://dribbble.com/search/something" // So get url by id - const itemId = $(item).attr('id').replace('screenshot-', ''); + const itemId = $(item).data('thumbnail-id'); // Construct the full item URL using the host and the item ID - const itemUrl = new URL(`/shots/${itemId}`, host).href; + const guid = new URL(`/shots/${itemId}`, host).href; + const itemUrl = new URL($(item).find('.shot-thumbnail-link').attr('href')!, host).href; // Return a Promise that resolves to an object combining the single item data and the additional data - return caches.tryGet(itemUrl, async () => { + return cache.tryGet(guid, async () => { const { description, pubDate, author, category } = await loadContent(itemUrl); return { title: $('.shot-title').text(), link: itemUrl, + guid, description, pubDate, author, @@ -126,25 +128,21 @@ function ProcessFeed(list, caches) { /** * Retrieves data from a given URL and processes it. * - * @param {Object} ctx - The context object. * @param {string} url - The URL to retrieve data from. * @param {string} title - The title of the data. * @return {Object} - An object containing the retrieved data and metadata. */ -const getData = async (ctx, url, title) => { +const getData = async (url, title) => { // Make a GET request to the specified URL - const response = await got(url); - - // Extract the response data - const data = response.data; + const response = await ofetch(url); // Load the response data into a cheerio object - const $ = load(data); + const $ = load(response); // Get all the list items under the 'ol.dribbbles.group' element const list = $('ol.dribbbles.group > li').toArray(); // Process the list items using the ProcessFeed function - const result = await ProcessFeed(list, cache); + const result = await ProcessFeed(list); // Return an object containing the retrieved data and metadata return { From f20428cde63ad41299a87682a4697288d4828c3c Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Sun, 20 Oct 2024 14:06:30 -0700 Subject: [PATCH 197/740] fix(route): customs (#17204) * fix(route): customs * docs: add back warning --- lib/routes/gov/customs/list.ts | 7 +++++-- lib/routes/gov/customs/namespace.ts | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 lib/routes/gov/customs/namespace.ts diff --git a/lib/routes/gov/customs/list.ts b/lib/routes/gov/customs/list.ts index 599efd3b93422e7..7aa23b615daaa5b 100644 --- a/lib/routes/gov/customs/list.ts +++ b/lib/routes/gov/customs/list.ts @@ -31,8 +31,8 @@ export const route: Route = { handler, url: 'www.customs.gov.cn/', description: `:::warning - 由于区域限制,建议在国内 IP 的机器上自建 - :::`, +由于区域限制,建议在国内 IP 的机器上自建 +:::`, }; async function handler(ctx) { @@ -81,6 +81,9 @@ async function handler(ctx) { const out = await Promise.all( list.map((info) => cache.tryGet(info.link, async () => { + if (info.link.endsWith('.pdf') || info.link.endsWith('.doc')) { + return info; + } const response = await puppeteerGet(info.link, browser); const $ = load(response); let date; diff --git a/lib/routes/gov/customs/namespace.ts b/lib/routes/gov/customs/namespace.ts new file mode 100644 index 000000000000000..e67beeae3740858 --- /dev/null +++ b/lib/routes/gov/customs/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中华人民共和国海关总署', + url: 'www.customs.gov.cn', + categories: ['government'], +}; From f7347d9f0224208c9e4a3f06b3a21c3d964a43a3 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Sun, 20 Oct 2024 14:19:46 -0700 Subject: [PATCH 198/740] fix(route): 163 (#17206) --- lib/routes/163/music/playlist.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/163/music/playlist.ts b/lib/routes/163/music/playlist.ts index 350321408902b56..4c59cb0ca74f13f 100644 --- a/lib/routes/163/music/playlist.ts +++ b/lib/routes/163/music/playlist.ts @@ -67,7 +67,8 @@ async function handler(ctx) { date: new Date(thisSong.album.publishTime).toLocaleDateString(), picUrl: thisSong.album.picUrl, }), - link: `https://music.163.com/#/song?id=${item.id}`, + link: `https://music.163.com/song?id=${item.id}`, + guid: `https://music.163.com/#/song?id=${item.id}`, pubDate: new Date(item.at), author: singer, }; From 1a6986f2db60704b627dcc7bb1c2c6ac4c7d3aac Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Sun, 20 Oct 2024 14:52:41 -0700 Subject: [PATCH 199/740] fix(route): gameapps (#17207) --- lib/routes/gameapps/index.ts | 15 ++++++++------- lib/routes/gameapps/templates/description.art | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/routes/gameapps/index.ts b/lib/routes/gameapps/index.ts index 6aee2775ede7139..7ef3c7c30c286bf 100644 --- a/lib/routes/gameapps/index.ts +++ b/lib/routes/gameapps/index.ts @@ -3,7 +3,7 @@ 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 parser from '@/utils/rss-parser'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -12,13 +12,13 @@ import path from 'node:path'; export const route: Route = { path: '/', + example: '/gameapps', radar: [ { source: ['gameapps.hk/'], - target: '', }, ], - name: 'Unknown', + name: '最新消息', maintainers: ['TonyRL'], handler, url: 'gameapps.hk/', @@ -31,7 +31,7 @@ async function handler() { const items = await Promise.all( feed.items.map((item) => cache.tryGet(item.link, async () => { - const { data: response } = await got(item.link, { + const response = await ofetch(item.link, { headers: { Referer: baseUrl, }, @@ -71,12 +71,13 @@ async function handler() { } item.description = art(path.join(__dirname, 'templates/description.art'), { - src: $('div.introduction.media.news-intro div.media-left').find('img').attr('src'), - intro: $('div.introduction.media.news-intro div.media-body').html().trim(), - desc: content.html().trim(), + 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.pubDate = parseDate(item.pubDate); + item.enclosure_url = $('div.introduction.media.news-intro div.media-left').find('img').attr('src'); + item.enclosure_type = 'image/jpeg'; return item; }) diff --git a/lib/routes/gameapps/templates/description.art b/lib/routes/gameapps/templates/description.art index d41376f7f63928c..7ba352613e8e526 100644 --- a/lib/routes/gameapps/templates/description.art +++ b/lib/routes/gameapps/templates/description.art @@ -1,3 +1,2 @@ -<img src="{{ src }}"><br> {{@ intro }} {{@ desc }} From 939a828b2cc0b93376701ae5470831432278e840 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Mon, 21 Oct 2024 08:15:14 +0800 Subject: [PATCH 200/740] feat(route/apnews): Add `gtm` parsing method & misc refactor (#17203) --- lib/routes/apnews/sitemap.ts | 10 +--------- lib/routes/apnews/topics.ts | 2 +- lib/routes/apnews/utils.ts | 24 +++++++++++++++++++++++- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/lib/routes/apnews/sitemap.ts b/lib/routes/apnews/sitemap.ts index 495fa4f2f2b9420..066ded45595d42e 100644 --- a/lib/routes/apnews/sitemap.ts +++ b/lib/routes/apnews/sitemap.ts @@ -1,9 +1,8 @@ import { Route, ViewType } from '@/types'; -import { fetchArticle } from './utils'; +import { asyncPoolAll, fetchArticle } from './utils'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -import asyncPool from 'tiny-async-pool'; import timezone from '@/utils/timezone'; const HOME_PAGE = 'https://apnews.com'; @@ -90,10 +89,3 @@ async function handler(ctx) { link: 'https://apnews.com', }; } -async function asyncPoolAll<IN, OUT>(poolLimit: number, array: readonly IN[], iteratorFn: (generator: IN) => Promise<OUT>) { - const results: Awaited<OUT[]> = []; - for await (const result of asyncPool(poolLimit, array, iteratorFn)) { - results.push(result); - } - return results; -} diff --git a/lib/routes/apnews/topics.ts b/lib/routes/apnews/topics.ts index df0ff55300776c8..92bb1b070a8c42e 100644 --- a/lib/routes/apnews/topics.ts +++ b/lib/routes/apnews/topics.ts @@ -57,7 +57,7 @@ async function handler(ctx) { title: $('title').text(), description: $("meta[property='og:description']").text(), link: url, - item: removeDuplicateByKey(items, 'guid'), + item: removeDuplicateByKey(items, 'link'), language: $('html').attr('lang'), }; } diff --git a/lib/routes/apnews/utils.ts b/lib/routes/apnews/utils.ts index f1b0c1c728480ba..17ff80487cd3994 100644 --- a/lib/routes/apnews/utils.ts +++ b/lib/routes/apnews/utils.ts @@ -2,6 +2,7 @@ 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()]; @@ -12,7 +13,21 @@ export function fetchArticle(item) { const data = await ofetch(item.link); const $ = load(data); if ($('#link-ld-json').length === 0) { - return item; + const gtmRaw = $('meta[name="gtm-dataLayer"]').attr('content'); + if (gtmRaw) { + const gtmParsed = JSON.parse(gtmRaw); + return { + title: gtmParsed.headline, + pubDate: parseDate(gtmParsed.publication_date), + description: $('div.RichTextStoryBody').html() || $(':is(.VideoLead, .VideoPage-pageSubHeading)').html(), + category: gtmParsed.tag_array.split(','), + guid: $("meta[name='brightspot.contentId']").attr('content'), + author: gtmParsed.author, + ...item, + }; + } else { + return item; + } } const rawLdjson = JSON.parse($('#link-ld-json').text()); let ldjson; @@ -46,3 +61,10 @@ export function fetchArticle(item) { } }); } +export async function asyncPoolAll<IN, OUT>(poolLimit: number, array: readonly IN[], iteratorFn: (generator: IN) => Promise<OUT>) { + const results: Awaited<OUT[]> = []; + for await (const result of asyncPool(poolLimit, array, iteratorFn)) { + results.push(result); + } + return results; +} From 195327be7e2d3b64302be4adf095e10f206219ab Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Mon, 21 Oct 2024 09:22:44 +0800 Subject: [PATCH 201/740] chore: remove cnki radar url with url params --- lib/routes/cnki/journals.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/cnki/journals.ts b/lib/routes/cnki/journals.ts index c9407b6a3f5c3c5..e2034dfdcb49d5e 100644 --- a/lib/routes/cnki/journals.ts +++ b/lib/routes/cnki/journals.ts @@ -24,7 +24,7 @@ export const route: Route = { }, radar: [ { - source: ['navi.cnki.net/knavi/journals/:name/detail', 'rss.cnki.net/kns/rss.aspx?Journal=:name&Virtual=knavi'], + source: ['navi.cnki.net/knavi/journals/:name/detail'], }, ], name: '期刊', From 5b0ec7d1cc27798d86f407d4ac81b0f1456f5b00 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Sun, 20 Oct 2024 18:45:50 -0700 Subject: [PATCH 202/740] fix(route): mingpao more fancybox (#17209) --- lib/routes/mingpao/index.ts | 133 +++++++++++++++++++++++--------- lib/routes/mingpao/namespace.ts | 2 +- 2 files changed, 98 insertions(+), 37 deletions(-) diff --git a/lib/routes/mingpao/index.ts b/lib/routes/mingpao/index.ts index 23447ef577db129..79131dd6d63566d 100644 --- a/lib/routes/mingpao/index.ts +++ b/lib/routes/mingpao/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 parser from '@/utils/rss-parser'; -import { load } from 'cheerio'; +import * as cheerio from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import logger from '@/utils/logger'; const renderFanBox = (media) => art(path.join(__dirname, 'templates/fancybox.art'), { @@ -22,11 +21,79 @@ const renderDesc = (media, desc) => desc, }); +const fixFancybox = (element, $) => { + const $e = $(element); + const url = new URL($e.attr('href')); + let video; + if (url.hostname === 'videop.mingpao.com') { + video = new URL(url.searchParams.get('file')); + video.hostname = 'cfrvideo.mingpao.com'; // use cloudflare cdn + video = video.href; + } + return { + href: url.href, + title: $e.attr('title'), + video, + }; +}; + export const route: Route = { path: '/:type?/:category?', - name: 'Unknown', + name: '新聞', + example: '/mingpao/ins/all', + parameters: { + type: { + description: '新聞類型', + default: 'ins', + options: [ + { value: 'ins', label: '即時新聞' }, + { value: 'pns', label: '每日明報' }, + ], + }, + category: '頻道,見下表', + }, + radar: [ + { + title: '即時新聞', + source: ['news.mingpao.com/ins/:categoryName/section/:date/:category'], + target: '/mingpao/ins/:category', + }, + { + title: '每日明報', + source: ['news.mingpao.com/pns/:categoryName/section/:date/:category'], + target: '/mingpao/pns/:category', + }, + ], maintainers: ['TonyRL'], handler, + description: `| category | 即時新聞頻道 | +| -------- | ------------ | +| all | 總目錄 | +| s00001 | 港聞 | +| s00002 | 經濟 | +| s00003 | 地產 | +| s00004 | 兩岸 | +| s00005 | 國際 | +| s00006 | 體育 | +| s00007 | 娛樂 | +| s00022 | 文摘 | +| s00024 | 熱點 | + +| category | 每日明報頻道 | +| -------- | ------------ | +| s00001 | 要聞 | +| s00002 | 港聞 | +| s00003 | 社評 | +| s00004 | 經濟 | +| s00005 | 副刊 | +| s00011 | 教育 | +| s00012 | 觀點 | +| s00013 | 中國 | +| s00014 | 國際 | +| s00015 | 體育 | +| s00016 | 娛樂 | +| s00017 | English | +| s00018 | 作家專欄 |`, }; async function handler(ctx) { @@ -35,26 +102,16 @@ async function handler(ctx) { const link = `https://news.mingpao.com/rss/${type}/${category}.xml`; const feed = await parser.parseURL(link); - const items = await Promise.all( feed.items.map((item) => cache.tryGet(item.link, async () => { - let response; - try { - response = await got(item.link, { - headers: { - Referer: 'https://news.mingpao.com/', - }, - }); - } catch (error) { - if (error instanceof got.MaxRedirectsError) { - logger.error(`MaxRedirectsError when requesting ${decodeURIComponent(item.link)}`); - return item; - } - throw error; - } + const response = await ofetch(item.link, { + headers: { + Referer: 'https://news.mingpao.com/', + }, + }); - const $ = load(response.data); + const $ = cheerio.load(response); const fancyboxImg = $('a.fancybox').length ? $('a.fancybox') : $('a.fancybox-buttons'); // remove unwanted elements @@ -68,21 +125,25 @@ async function handler(ctx) { item.category = item.categories; // fix fancybox image - const fancybox = fancyboxImg.toArray().map((e) => { - e = $(e); - const href = new URL(e.attr('href')); - let video; - if (href.hostname === 'videop.mingpao.com') { - video = new URL(href.searchParams.get('file')); - video.hostname = 'cfrvideo.mingpao.com'; // use cloudflare cdn - video = video.href; - } - return { - href: href.href, - title: e.attr('title'), - video, - }; - }); + let fancybox = fancyboxImg.toArray().map((e) => fixFancybox(e, $)); + const script = $('script') + .toArray() + .find((e) => $(e).text()?.includes("$('#lower').prepend('")); + const lowerContent = script + ? $(script) + .text() + ?.match(/\$\('#lower'\)\.prepend\('(.*)'\);/)?.[1] + ?.replaceAll(/\\"/g, '"') + : ''; + if (lowerContent) { + const $ = cheerio.load(lowerContent, null, false); + fancybox = [ + ...fancybox, + ...$('a.fancybox') + .toArray() + .map((e) => fixFancybox(e, $)), + ]; + } // remove unwanted key value delete item.categories; @@ -91,7 +152,7 @@ async function handler(ctx) { delete item.creator; delete item.isoDate; - item.description = renderDesc(fancybox, $('.txt4').html() ?? $('.article_content.line_1_5em').html()); + 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('/')); diff --git a/lib/routes/mingpao/namespace.ts b/lib/routes/mingpao/namespace.ts index b50003246a08031..ef9de56b0ee5d2b 100644 --- a/lib/routes/mingpao/namespace.ts +++ b/lib/routes/mingpao/namespace.ts @@ -1,6 +1,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'Ming Pao 明报', + name: '明報', url: 'mingpao.com', }; From 8d76a0055d5513b7857a22626977dc6811f1353e Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Sun, 20 Oct 2024 20:41:31 -0700 Subject: [PATCH 203/740] style(eslint): update no-restricted-syntax (#17215) --- eslint.config.mjs | 5 +- lib/routes/51read/article.ts | 6 +-- lib/routes/69shu/article.ts | 2 +- lib/routes/6v123/utils.ts | 4 +- lib/routes/baidu/search.ts | 8 ++-- lib/routes/bangumi/tv/other/followrank.ts | 6 +-- lib/routes/biodiscover/index.ts | 6 +-- lib/routes/chikubi/utils.ts | 2 +- lib/routes/ecnu/contest.ts | 6 +-- lib/routes/foreverblog/feeds.ts | 32 ++++++------- lib/routes/github/pulse.ts | 54 +++++++++++----------- lib/routes/google/search.ts | 8 ++-- lib/routes/hameln/chapter.ts | 4 +- lib/routes/linkedin/utils.ts | 6 +-- lib/routes/parliament.uk/commonslibrary.ts | 6 +-- lib/routes/parliament.uk/lordslibrary.ts | 6 +-- lib/routes/pixivision/index.ts | 6 +-- lib/routes/smzdm/product.ts | 14 +++--- lib/routes/sogou/search.ts | 8 ++-- lib/routes/syosetu/chapter.ts | 4 +- lib/routes/wechat/ershcimi.ts | 6 +-- lib/routes/withgoogle/explorables.ts | 4 +- lib/routes/yilinzazhi/index.ts | 6 +-- lib/routes/yilinzazhi/latest.ts | 8 ++-- 24 files changed, 108 insertions(+), 109 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 5ed642847d8a046..b7137de1118c2db 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -99,7 +99,10 @@ export default [{ 'no-restricted-syntax': ['warn', { selector: "CallExpression[callee.property.name='get'][arguments.length=0]", - message: "Please use toArray instead.", + message: "Please use .toArray() instead.", + }, { + selector: "CallExpression[callee.property.name='toArray'] MemberExpression[object.callee.property.name='map']", + message: "Please use .toArray() before .map().", }], 'no-unneeded-ternary': 'error', diff --git a/lib/routes/51read/article.ts b/lib/routes/51read/article.ts index a2e50b94135edef..6240362fa8b6220 100644 --- a/lib/routes/51read/article.ts +++ b/lib/routes/51read/article.ts @@ -42,8 +42,8 @@ async function handler(ctx) { const pageLength = $chapter('.ml-page select') .find('option') - .map((_, option) => option.attribs.value) - .toArray().length; + .toArray() + .map((option) => option.attribs.value).length; const item = await createItem(chapter, pageLength); @@ -63,8 +63,8 @@ const createItem = async (baseUrl: string, page: number) => { const $latest = load(await ofetch(url)); const item = await Promise.all( $latest('.kb-jp li>a') - .map((_, chapter) => buildItem(chapter.attribs.href)) .toArray() + .map((chapter) => buildItem(chapter.attribs.href)) .toReversed() ); return item; diff --git a/lib/routes/69shu/article.ts b/lib/routes/69shu/article.ts index 9224253320a20e9..26c63fdb624d6ce 100644 --- a/lib/routes/69shu/article.ts +++ b/lib/routes/69shu/article.ts @@ -32,8 +32,8 @@ export const route: Route = { const item = await Promise.all( $('.qustime li>a') - .map((_, chapter) => createItem(chapter.attribs.href)) .toArray() + .map((chapter) => createItem(chapter.attribs.href)) ); return { diff --git a/lib/routes/6v123/utils.ts b/lib/routes/6v123/utils.ts index e08f5a4b315f90c..d1425e8c58e4f7f 100644 --- a/lib/routes/6v123/utils.ts +++ b/lib/routes/6v123/utils.ts @@ -19,11 +19,11 @@ export async function loadDetailPage(link) { .replaceAll(/,免费下载,迅雷下载|,6v电影/g, ''), description: $('meta[name="description"]').attr('content'), enclosure_urls: $('table td') - .map((i, e) => ({ + .toArray() + .map((e) => ({ title: $(e).text().replace('磁力:', ''), magnet: $(e).find('a').attr('href'), })) - .toArray() .filter((item) => item.magnet?.includes('magnet')), }; } diff --git a/lib/routes/baidu/search.ts b/lib/routes/baidu/search.ts index caf46980d62ddbf..1d9bbdeb1478d2e 100644 --- a/lib/routes/baidu/search.ts +++ b/lib/routes/baidu/search.ts @@ -42,15 +42,16 @@ async function handler(ctx) { const contentLeft = $('#content_left'); const containers = contentLeft.find('.c-container'); return containers - .map((i, el) => { + .toArray() + .map((el) => { const element = $(el); const link = element.find('h3 a').first().attr('href'); if (link && !visitedLinks.has(link)) { visitedLinks.add(link); const imgs = element .find('img') - .map((_j, _el) => $(_el).attr('src')) - .toArray(); + .toArray() + .map((_el) => $(_el).attr('src')); const description = element.find('.c-gap-top-small [class^="content-right_"]').first().text() || element.find('.c-row').first().text() || element.find('.cos-row').first().text(); return { title: element.find('h3').first().text(), @@ -61,7 +62,6 @@ async function handler(ctx) { } return null; }) - .toArray() .filter((e) => e?.link); }, config.cache.routeExpire, diff --git a/lib/routes/bangumi/tv/other/followrank.ts b/lib/routes/bangumi/tv/other/followrank.ts index c0b466daf13cdd9..253a65c48de38d8 100644 --- a/lib/routes/bangumi/tv/other/followrank.ts +++ b/lib/routes/bangumi/tv/other/followrank.ts @@ -43,7 +43,8 @@ async function handler(ctx) { const $ = load(response); const items = $('.featuredItems .mainItem') - .map((_, item) => { + .toArray() + .map((item) => { const $item = $(item); const link = 'https://bgm.tv' + $item.find('a').first().attr('href'); const imageUrl = $item @@ -56,8 +57,7 @@ async function handler(ctx) { link, description: `<img src="${imageUrl}"><br>${info}`, }; - }) - .toArray(); + }); const RANK_TYPES = { tv: '动画', diff --git a/lib/routes/biodiscover/index.ts b/lib/routes/biodiscover/index.ts index afd6e69cf503383..0b71e5ef4de1b63 100644 --- a/lib/routes/biodiscover/index.ts +++ b/lib/routes/biodiscover/index.ts @@ -24,11 +24,11 @@ async function handler(ctx) { const $ = load(response.data); const items = $('.new_list .newList_box') - .map((_, item) => ({ + .toArray() + .map((item) => ({ pubDate: parseDate($(item).find('.news_flow_tag .times').text().trim()), link: 'http://www.biodiscover.com' + $(item).find('h2 a').attr('href'), - })) - .toArray(); + })); return { title: '生物探索 - ' + $('.header li.sel a').text(), diff --git a/lib/routes/chikubi/utils.ts b/lib/routes/chikubi/utils.ts index cc5d3a1ce0914d3..2edbdea745f69ac 100644 --- a/lib/routes/chikubi/utils.ts +++ b/lib/routes/chikubi/utils.ts @@ -68,8 +68,8 @@ function processDescription(description: string): string { const $ = load(description); return $('body') .children() - .map((_, el) => $(el).clone().wrap('<div>').parent().html()) .toArray() + .map((el) => $(el).clone().wrap('<div>').parent().html()) .join(''); } diff --git a/lib/routes/ecnu/contest.ts b/lib/routes/ecnu/contest.ts index ad0299f21666814..f3054f80e58c0c6 100644 --- a/lib/routes/ecnu/contest.ts +++ b/lib/routes/ecnu/contest.ts @@ -44,7 +44,8 @@ async function handler(ctx) { const $trList = $('div > div > table > tbody > tr'); const items = $trList .filter((_, el) => !publicOnly || $(el).find('i').attr('class').includes('green')) - .map((_, el) => { + .toArray() + .map((el) => { const $tdList = $(el).find('td'); const title = $tdList.eq(0).text(); const startTime = $tdList.eq(1).text(); @@ -59,8 +60,7 @@ async function handler(ctx) { }), link, }; - }) - .toArray(); + }); return { title: `ECNU ACM ${publicOnly ? '公开' : ''}比赛`, diff --git a/lib/routes/foreverblog/feeds.ts b/lib/routes/foreverblog/feeds.ts index ba72cccfa6ddf96..39d911344a96011 100644 --- a/lib/routes/foreverblog/feeds.ts +++ b/lib/routes/foreverblog/feeds.ts @@ -35,23 +35,21 @@ async function handler() { const $ = load(response.data); const $articles = $('article[class="post post-type-normal"]'); - const items = $articles - .map((_, el) => { - const $titleDiv = $(el).find('h1[class="post-title"]'); - const title = $titleDiv.text().trim(); - const link = $titleDiv.find('a').eq(0).attr('href'); - const author = $(el).find('div[class="post-author"]').text().trim(); - const postDate = $(el).find('time').text().trim(); - const pubDate = timezone(parseDate(postDate, 'MM-DD'), +8); - const description = `${author}: ${title}`; - return { - title: description, - description, - link, - pubDate, - }; - }) - .toArray(); + const items = $articles.toArray().map((el) => { + const $titleDiv = $(el).find('h1[class="post-title"]'); + const title = $titleDiv.text().trim(); + const link = $titleDiv.find('a').eq(0).attr('href'); + const author = $(el).find('div[class="post-author"]').text().trim(); + const postDate = $(el).find('time').text().trim(); + const pubDate = timezone(parseDate(postDate, 'MM-DD'), +8); + const description = `${author}: ${title}`; + return { + title: description, + description, + link, + pubDate, + }; + }); return { title: '十年之约——专题展示', diff --git a/lib/routes/github/pulse.ts b/lib/routes/github/pulse.ts index 12ed3c7890fe251..e3b640a2a077c62 100644 --- a/lib/routes/github/pulse.ts +++ b/lib/routes/github/pulse.ts @@ -54,8 +54,8 @@ async function handler(ctx) { const $overview = $mainSections.eq(1); const overviewItems = $overview .find('ul ul li') - .map((_, el) => $(el).text()) - .toArray(); + .toArray() + .map((el) => $(el).text()); const $commitActivity = $mainSections.eq(2); let commitActivity; @@ -71,32 +71,30 @@ async function handler(ctx) { let githubActivity; const $sections = $githubActivity.find('h3'); if ($sections.length) { - githubActivity = $sections - .map((_, section) => { - const $section = $(section); - const $sectionSiblings = $section.nextUntil('h3'); - const $paragraph = $section.nextUntil('ul'); - const $list = $sectionSiblings.last(); - return { - heading: $section.text(), - paragraph: $paragraph.length > 0 ? $paragraph.text() : undefined, - items: $list - .children() - .map((_, item) => { - const $item = $(item); - const $link = $item.find('a'); - const $details = $item.find('p'); - const $relativeTime = $details.find('relative-time'); - $relativeTime.replaceWith($relativeTime.attr('datetime')); - return { - link: { text: $link.text(), url: $link.attr('href') }, - details: $details.text(), - }; - }) - .toArray(), - }; - }) - .toArray(); + githubActivity = $sections.toArray().map((section) => { + const $section = $(section); + const $sectionSiblings = $section.nextUntil('h3'); + const $paragraph = $section.nextUntil('ul'); + const $list = $sectionSiblings.last(); + return { + heading: $section.text(), + paragraph: $paragraph.length > 0 ? $paragraph.text() : undefined, + items: $list + .children() + .toArray() + .map((item) => { + const $item = $(item); + const $link = $item.find('a'); + const $details = $item.find('p'); + const $relativeTime = $details.find('relative-time'); + $relativeTime.replaceWith($relativeTime.attr('datetime')); + return { + link: { text: $link.text(), url: $link.attr('href') }, + details: $details.text(), + }; + }), + }; + }); } return { diff --git a/lib/routes/google/search.ts b/lib/routes/google/search.ts index 85f27f02849f003..2fb7e994fbb4e1e 100644 --- a/lib/routes/google/search.ts +++ b/lib/routes/google/search.ts @@ -52,14 +52,15 @@ async function handler(ctx) { const content = $('#rso'); return content .find('> div') - .map((i, el) => { + .toArray() + .map((el) => { const element = $(el); const link = element.find('div > div > div > div > div > span > a').first().attr('href'); const title = element.find('div > div > div> div > div > span > a > h3').first().text(); const imgs = element .find('img') - .map((_j, _el) => $(_el).attr('src')) - .toArray(); + .toArray() + .map((_el) => $(_el).attr('src')); const description = element.find('div[style="-webkit-line-clamp:2"]').first().text() || element.find('div[role="heading"]').first().text(); const author = element.find('div > div > div > div > div > span > a > div > div > span').first().text() || ''; return { @@ -69,7 +70,6 @@ async function handler(ctx) { author, }; }) - .toArray() .filter((e) => e?.link); }, config.cache.routeExpire, diff --git a/lib/routes/hameln/chapter.ts b/lib/routes/hameln/chapter.ts index ba040ecbaee4017..678c67bdbda9802 100644 --- a/lib/routes/hameln/chapter.ts +++ b/lib/routes/hameln/chapter.ts @@ -39,7 +39,8 @@ async function handler(ctx) { const description = $('div.ss:nth-child(2)').text(); const chapter_list = $('tr[bgcolor]') - .map((_, chapter) => { + .toArray() + .map((chapter) => { const $_chapter = $(chapter); const chapter_link = $_chapter.find('a'); return { @@ -48,7 +49,6 @@ async function handler(ctx) { pubDate: timezone(parseDate($_chapter.find('nobr').text(), 'YYYYMMDD HH:mm'), +9), }; }) - .toArray() .sort((a, b) => (a.pubDate <= b.pubDate ? 1 : -1)) .slice(0, limit); diff --git a/lib/routes/linkedin/utils.ts b/lib/routes/linkedin/utils.ts index 40ef3db80e55f11..a91e390cf63d081 100644 --- a/lib/routes/linkedin/utils.ts +++ b/lib/routes/linkedin/utils.ts @@ -85,7 +85,8 @@ function parseJobSearch(data) { // Parse data const jobs = $('li') - .map((i, elem) => { + .toArray() + .map((elem) => { const elemHtml = $(elem); const link = elemHtml.find('a.base-card__full-link, a.base-card--link')?.attr('href')?.split('?')[0]; const title = elemHtml.find('h3.base-search-card__title')?.text()?.trim(); @@ -94,8 +95,7 @@ function parseJobSearch(data) { const pubDate = elemHtml.find('time')?.attr('datetime'); return new Job(title, link, company, location, pubDate); - }) - .toArray(); + }); return jobs; } diff --git a/lib/routes/parliament.uk/commonslibrary.ts b/lib/routes/parliament.uk/commonslibrary.ts index 5be6eb7036b42ec..a316c64a9765371 100644 --- a/lib/routes/parliament.uk/commonslibrary.ts +++ b/lib/routes/parliament.uk/commonslibrary.ts @@ -39,13 +39,13 @@ async function handler(ctx) { await page.close(); const $ = load(html); const items = $('div.l-box.l-box--no-border.card__text') - .map((_, article) => ({ + .toArray() + .map((article) => ({ title: $(article).find('.card__text a').text().trim(), link: $(article).find('.card__text a').attr('href'), description: $(article).find('p').last().text().trim(), pubDate: timezone($(article).find('.card__date time').attr('datetime')), - })) - .toArray(); + })); browser.close(); return { title: `parliament - lordslibrary - ${topic}`, diff --git a/lib/routes/parliament.uk/lordslibrary.ts b/lib/routes/parliament.uk/lordslibrary.ts index 002185021fe65a5..bf625de82dd2296 100644 --- a/lib/routes/parliament.uk/lordslibrary.ts +++ b/lib/routes/parliament.uk/lordslibrary.ts @@ -39,13 +39,13 @@ async function handler(ctx) { await page.close(); const $ = load(html); const items = $('div.l-box.l-box--no-border.card__text') - .map((_, article) => ({ + .toArray() + .map((article) => ({ title: $(article).find('.card__text a').text().trim(), link: $(article).find('.card__text a').attr('href'), description: $(article).find('p').last().text().trim(), pubDate: timezone($(article).find('.card__date time').attr('datetime')), - })) - .toArray(); + })); browser.close(); return { title: `parliament - lordslibrary - ${topic}`, diff --git a/lib/routes/pixivision/index.ts b/lib/routes/pixivision/index.ts index 0ee57ceeb563508..e67186cf80e30ac 100644 --- a/lib/routes/pixivision/index.ts +++ b/lib/routes/pixivision/index.ts @@ -51,11 +51,11 @@ async function handler(ctx): Promise<Data> { const $ = load(response); const list = $('li.article-card-container a[data-gtm-action="ClickTitle"]') - .map((_, elem) => ({ + .toArray() + .map((elem) => ({ title: $(elem).text(), link: new URL($(elem).attr('href') ?? '', baseUrl).href, - })) - .toArray(); + })); const items = await Promise.all( list.map(async (item) => { diff --git a/lib/routes/smzdm/product.ts b/lib/routes/smzdm/product.ts index b03577ff3c0e95e..14e9ca19a74cb08 100644 --- a/lib/routes/smzdm/product.ts +++ b/lib/routes/smzdm/product.ts @@ -36,20 +36,20 @@ async function handler(ctx) { // get simple info from list const items: DataItem[] = $('ul#feed-main-list li') - .map(function () { - const altText = $(this).find('img').attr('alt'); - const link = $(this).find('h5.feed-block-title a').attr('href'); - const price = $(this).find('.z-highlight').text(); + .toArray() + .map((elem) => { + const altText = $(elem).find('img').attr('alt'); + const link = $(elem).find('h5.feed-block-title a').attr('href'); + const price = $(elem).find('.z-highlight').text(); const title = altText + ' ' + price; - const description = $(this).find('.feed-block-descripe').text().replaceAll(/\s+/g, ''); + const description = $(elem).find('.feed-block-descripe').text().replaceAll(/\s+/g, ''); return { title, link, description, }; - }) - .toArray(); + }); // get detail info from each item const out = await Promise.all( diff --git a/lib/routes/sogou/search.ts b/lib/routes/sogou/search.ts index 96ff94c63b5df3a..5df85d561205c61 100644 --- a/lib/routes/sogou/search.ts +++ b/lib/routes/sogou/search.ts @@ -42,12 +42,13 @@ async function handler(ctx) { const result = $('#main'); return result .find('.vrwrap') - .map((i, el) => { + .toArray() + .map((el) => { const element = $(el); const imgs = element .find('img') - .map((j, el2) => $(el2).attr('src')) - .toArray(); + .toArray() + .map((el2) => $(el2).attr('src')); const link = element.find('h3 a').first().attr('href'); const title = element.find('h3').first().text(); const description = element.find('.text-layout').first().text() || element.find('.space-txt').first().text() || element.find('[class^="translate"]').first().text(); @@ -61,7 +62,6 @@ async function handler(ctx) { pubDate, }; }) - .toArray() .filter((e) => e?.link); }, config.cache.routeExpire, diff --git a/lib/routes/syosetu/chapter.ts b/lib/routes/syosetu/chapter.ts index 5fb22c03523bc9c..21bf0a34a0b2c2c 100644 --- a/lib/routes/syosetu/chapter.ts +++ b/lib/routes/syosetu/chapter.ts @@ -43,7 +43,8 @@ async function handler(ctx) { const description = $('#novel_ex').html(); const chapter_list = $('dl.novel_sublist2') - .map((_, chapter) => { + .toArray() + .map((chapter) => { const $_chapter = $(chapter); const chapter_link = $_chapter.find('a'); return { @@ -52,7 +53,6 @@ async function handler(ctx) { pubDate: timezone(parseDate($_chapter.find('dt').text(), 'YYYY/MM/DD HH:mm'), +9), }; }) - .toArray() .sort((a, b) => (a.pubDate <= b.pubDate ? 1 : -1)) .slice(0, limit); diff --git a/lib/routes/wechat/ershcimi.ts b/lib/routes/wechat/ershcimi.ts index 8be4d6606addafc..cbf89218c1a5cae 100644 --- a/lib/routes/wechat/ershcimi.ts +++ b/lib/routes/wechat/ershcimi.ts @@ -31,7 +31,8 @@ async function handler(ctx) { const response = await got(url); const $ = load(response.data); const items = $('.weui_media_box') - .map((_, ele) => { + .toArray() + .map((ele) => { const $item = load(ele); const link = $item('.weui_media_title a').attr('href'); return { @@ -40,8 +41,7 @@ async function handler(ctx) { link, pubDate: timezone(parseDate($item('.weui_media_extra_info').attr('title')), +8), }; - }) - .toArray(); + }); return { title: `微信公众号 - ${$('span.name').text()}`, diff --git a/lib/routes/withgoogle/explorables.ts b/lib/routes/withgoogle/explorables.ts index 868ace82b2ab0d8..4dd5489156d5b74 100644 --- a/lib/routes/withgoogle/explorables.ts +++ b/lib/routes/withgoogle/explorables.ts @@ -24,7 +24,8 @@ export const route: Route = { const $ = load(response); const items = await Promise.all( $('div.explorable-card') - .map(async (_, el) => { + .toArray() + .map(async (el) => { const title = $(el).find('h3').text(); const image = $(el).find('img').attr('src'); const link = baseUrl + $(el).find('a').attr('href'); @@ -43,7 +44,6 @@ export const route: Route = { }; })) as DataItem; }) - .toArray() ); return { title: 'PAIR - AI Exploreables', diff --git a/lib/routes/yilinzazhi/index.ts b/lib/routes/yilinzazhi/index.ts index 08b90b0011d20b5..61799df8d826838 100644 --- a/lib/routes/yilinzazhi/index.ts +++ b/lib/routes/yilinzazhi/index.ts @@ -25,7 +25,8 @@ async function handler(): Promise<Data> { const $ = load(response.data); const contents: DataItem[] = $('section.content') .find('li') - .map((_, target) => { + .toArray() + .map((target) => { const li = $(target); const aTag = li.find('a'); @@ -37,8 +38,7 @@ async function handler(): Promise<Data> { link, description: '', }; - }) - .toArray(); + }); const items = (await Promise.all( contents.map((content) => diff --git a/lib/routes/yilinzazhi/latest.ts b/lib/routes/yilinzazhi/latest.ts index c01d3283d777782..7e1458ed283cd82 100644 --- a/lib/routes/yilinzazhi/latest.ts +++ b/lib/routes/yilinzazhi/latest.ts @@ -48,13 +48,13 @@ async function handler(): Promise<Data> { const stage = $(yearSection!) .find('a') - .map<typeof yearSection, Stage>(function () { - const aTag = $(this); + .toArray() + .map<Stage>((elem) => { + const aTag = $(elem); const link = baseUrl + aTag.attr('href'); const title = aTag.text(); return { link, title }; - }) - .toArray()[0]; + })[0]; const catalogs = (await cache.tryGet(stage.link, async () => { const stageRes = await got(stage.link); From 71e1fce88a8f9bb582606595e66d33699fce2da7 Mon Sep 17 00:00:00 2001 From: Leo <47264468+whzxc@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:07:33 +0800 Subject: [PATCH 204/740] fix(route/ps): monthly-games (#17211) * fix(route/ps): monthly-games list target element updated to #monthly-games * fix(route/ps): link tag --------- Co-authored-by: wanghao9 <wanghao9@sugon.com> --- lib/routes/ps/monthly-games.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/ps/monthly-games.ts b/lib/routes/ps/monthly-games.ts index b66a406a45662e9..277139be1ef6b36 100644 --- a/lib/routes/ps/monthly-games.ts +++ b/lib/routes/ps/monthly-games.ts @@ -38,17 +38,17 @@ async function handler() { const { data: response } = await got(baseUrl); const $ = load(response); - const list = $('.cmp-experiencefragment--your-latest-monthly-games .box') + const list = $('#monthly-games .box--light ') .toArray() - .map((item) => { - item = $(item); + .map((e) => { + 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(), }), - link: item.find('.button a').attr('href'), + link: item.find('.btn--cta').attr('href'), }; }); From 2e9116aca922e033bb5c8e755370464f0ce1f042 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Mon, 21 Oct 2024 21:17:37 +0800 Subject: [PATCH 205/740] feat(route): add popular category to bluesky --- lib/routes/bsky/posts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index a5a9540c2fbd36c..24f6d124cc7e5ba 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -10,7 +10,7 @@ import path from 'node:path'; export const route: Route = { path: '/profile/:handle', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/bsky/profile/bsky.app', parameters: { handle: 'User handle, can be found in URL' }, features: { From 8c1226ff86ac3ae1484f7570ab171c4cecfa7894 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Mon, 21 Oct 2024 21:37:38 +0800 Subject: [PATCH 206/740] fix: douban topic item link (#17224) --- lib/routes/douban/other/topic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/douban/other/topic.ts b/lib/routes/douban/other/topic.ts index 6e7e4d0dcc1a5da..75c855972a064f0 100644 --- a/lib/routes/douban/other/topic.ts +++ b/lib/routes/douban/other/topic.ts @@ -54,7 +54,7 @@ async function handler(ctx) { let link; let title; if (type === 'status') { - link = item.target.status.sharing_url.split('?')[0]; + link = item.target.status.sharing_url; author = item.target.status.author.name; title = author + '的广播'; date = item.target.status.create_time; From 76e3727d436eb8e02509dc3180e6f4c825e5e370 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 06:41:28 -0700 Subject: [PATCH 207/740] chore(deps): bump @scalar/hono-api-reference from 0.5.155 to 0.5.156 (#17219) * chore(deps): bump @scalar/hono-api-reference from 0.5.155 to 0.5.156 Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.155 to 0.5.156. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 50 +++++++++++++++++++++++++------------------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/package.json b/package.json index f341f9834637e27..e2e4ca557c4391c 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.22", - "@scalar/hono-api-reference": "0.5.155", + "@scalar/hono-api-reference": "0.5.156", "@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 5b98de5e753026c..6c46f1a10322875 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: 0.0.22 version: 0.0.22 '@scalar/hono-api-reference': - specifier: 0.5.155 - version: 0.5.155(hono@4.6.5) + specifier: 0.5.156 + version: 0.5.156(hono@4.6.5) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1302,8 +1302,8 @@ packages: resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.2.0': - resolution: {integrity: sha512-vH9PiIMMwvhCx31Af3HiGzsVNULDbyVkHXwlemn/B0TFj/00ho3y55efXrUZTfQipxoHC5u4xq6zblww1zm1Ig==} + '@eslint/plugin-kit@0.2.1': + resolution: {integrity: sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@hono/node-server@1.13.2': @@ -1690,18 +1690,18 @@ packages: '@rss3/sdk@0.0.22': resolution: {integrity: sha512-yBfxbEoVxzBWeCccWDTH6VXy+TxkTnW7D8QwKbq+IQVb8ou7g1vw9oLy4E4yEu2CJ8XEZNE2BaTl2l0BWxcGOQ==} - '@scalar/hono-api-reference@0.5.155': - resolution: {integrity: sha512-7sUxr/EFUyO3suACAIN5dUXKAyZAI3XEW/J/qSkMZHyWPBfhJb/ZhvaU+hNQlR0GEb3zg5aC6D9qK3Z3zEXjAA==} + '@scalar/hono-api-reference@0.5.156': + resolution: {integrity: sha512-/byPVH0rs40qxuOInnikDeq+19wQZ0NIq0K3WJMNBeZvr0lpGqsBf4frj0soon8UAVq/uZnOMcK6jwcC50a0bg==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 - '@scalar/openapi-types@0.1.3': - resolution: {integrity: sha512-UPUquC/ZSAdeSDbpdqMzeBVcgeytqJTj9P3QR4X9IRti5I1jXoCOUBY84CGGLXfcWquB7wfwHxn3DqQEnQmBVw==} + '@scalar/openapi-types@0.1.4': + resolution: {integrity: sha512-+wRXgmqzgDnj8Dxqf4OOPMPo4or/LRd1Bsy4pnrIW0yBt8rKSdtBb+jH/aRnhgDDmKVjWxJ+KFk7WlSKvZwNTw==} engines: {node: '>=18'} - '@scalar/types@0.0.16': - resolution: {integrity: sha512-9Pcp4xdQuRGwf4bZmx1e6NKz5QD06kG4S8kxryD3UfVCtnDDqBG6vUWJjjkFzlUK/jvAx7Rl92C4mK5GrauTng==} + '@scalar/types@0.0.17': + resolution: {integrity: sha512-wUrvNnYFMULsHENX/9TP3oyECRTtZsP06mOZU+RlWg9sRtzWVTjlBCahkgUETL93J+Bz2RLFSKVgPyNN4fpIpA==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -3190,8 +3190,8 @@ packages: resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} engines: {node: '>= 6'} - formidable@3.5.1: - resolution: {integrity: sha512-WJWKelbRHN41m5dumb0/k8TeAx7Id/y3a+Z7QfhxP/htI9Js5zYaEDtG8uMgG0vM0lOlqnmjE99/kfpOYi/0Og==} + formidable@3.5.2: + resolution: {integrity: sha512-Jqc1btCy3QzRbJaICGwKcBfGWuLADRerLzDqi2NwSt/UkXLsHJw2TVResiaoBufHVHy9aSgClOHCeJsSsFLTbg==} fs-extra@10.1.0: resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} @@ -3400,8 +3400,8 @@ packages: heap@0.2.7: resolution: {integrity: sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==} - hexoid@1.0.0: - resolution: {integrity: sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g==} + hexoid@2.0.0: + resolution: {integrity: sha512-qlspKUK7IlSQv2o+5I7yhUd7TxlOG2Vr5LTa3ve2XSNVKAL/n/u/7KLvKmFNimomDIKvZFXWHv0T12mv7rT8Aw==} engines: {node: '>=8'} hmacsha1@1.0.0: @@ -6728,7 +6728,7 @@ snapshots: '@eslint/object-schema@2.1.4': {} - '@eslint/plugin-kit@0.2.0': + '@eslint/plugin-kit@0.2.1': dependencies: levn: 0.4.1 @@ -7148,16 +7148,16 @@ snapshots: '@rss3/api-core': 0.0.22 '@rss3/api-utils': 0.0.22 - '@scalar/hono-api-reference@0.5.155(hono@4.6.5)': + '@scalar/hono-api-reference@0.5.156(hono@4.6.5)': dependencies: - '@scalar/types': 0.0.16 + '@scalar/types': 0.0.17 hono: 4.6.5 - '@scalar/openapi-types@0.1.3': {} + '@scalar/openapi-types@0.1.4': {} - '@scalar/types@0.0.16': + '@scalar/types@0.0.17': dependencies: - '@scalar/openapi-types': 0.1.3 + '@scalar/openapi-types': 0.1.4 '@unhead/schema': 1.11.10 '@sec-ant/readable-stream@0.4.1': {} @@ -8616,7 +8616,7 @@ snapshots: '@eslint/core': 0.6.0 '@eslint/eslintrc': 3.1.0 '@eslint/js': 9.12.0 - '@eslint/plugin-kit': 0.2.0 + '@eslint/plugin-kit': 0.2.1 '@humanfs/node': 0.16.5 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.1 @@ -8876,10 +8876,10 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 - formidable@3.5.1: + formidable@3.5.2: dependencies: dezalgo: 1.0.4 - hexoid: 1.0.0 + hexoid: 2.0.0 once: 1.4.0 fs-extra@10.1.0: @@ -9135,7 +9135,7 @@ snapshots: heap@0.2.7: {} - hexoid@1.0.0: {} + hexoid@2.0.0: {} hmacsha1@1.0.0: {} @@ -11056,7 +11056,7 @@ snapshots: debug: 4.3.7 fast-safe-stringify: 2.1.1 form-data: 4.0.1 - formidable: 3.5.1 + formidable: 3.5.2 methods: 1.1.2 mime: 2.6.0 qs: 6.13.0 From 9d87d13450f2a9272886a744581a9846d4fb187e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 06:41:56 -0700 Subject: [PATCH 208/740] chore(deps-dev): bump @eslint/js from 9.12.0 to 9.13.0 (#17221) * chore(deps-dev): bump @eslint/js from 9.12.0 to 9.13.0 Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.12.0 to 9.13.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.13.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 e2e4ca557c4391c..0946c43abc56fb5 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "@babel/preset-env": "7.25.8", "@babel/preset-typescript": "7.25.7", "@eslint/eslintrc": "3.1.0", - "@eslint/js": "9.12.0", + "@eslint/js": "9.13.0", "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "2.9.0", "@types/aes-js": "3.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6c46f1a10322875..529ff990a6a2b13 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -268,8 +268,8 @@ importers: specifier: 3.1.0 version: 3.1.0 '@eslint/js': - specifier: 9.12.0 - version: 9.12.0 + specifier: 9.13.0 + version: 9.13.0 '@microsoft/eslint-formatter-sarif': specifier: 3.1.0 version: 3.1.0 @@ -1298,6 +1298,10 @@ packages: resolution: {integrity: sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.13.0': + resolution: {integrity: sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==} + 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} @@ -6726,6 +6730,8 @@ snapshots: '@eslint/js@9.12.0': {} + '@eslint/js@9.13.0': {} + '@eslint/object-schema@2.1.4': {} '@eslint/plugin-kit@0.2.1': From 3c7e8a266f28a28b6277d9bc863be240b7001607 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 07:08:46 -0700 Subject: [PATCH 209/740] chore(deps-dev): bump eslint from 9.12.0 to 9.13.0 (#17218) * chore(deps-dev): bump eslint from 9.12.0 to 9.13.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.12.0 to 9.13.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.12.0...v9.13.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 132 +++++++++++++++++++++++-------------------------- 2 files changed, 64 insertions(+), 70 deletions(-) diff --git a/package.json b/package.json index 0946c43abc56fb5..f3d0f132d4d7301 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,7 @@ "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.102", - "eslint": "9.12.0", + "eslint": "9.13.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.11.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 529ff990a6a2b13..fe41e932530d8f5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -275,7 +275,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 2.9.0 - version: 2.9.0(eslint@9.12.0)(typescript@5.6.3) + version: 2.9.0(eslint@9.13.0)(typescript@5.6.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -344,10 +344,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.10.0 - version: 8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3) + version: 8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.10.0 - version: 8.10.0(eslint@9.12.0)(typescript@5.6.3) + version: 8.10.0(eslint@9.13.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.4 version: 0.27.4 @@ -358,26 +358,26 @@ importers: specifier: 0.37.102 version: 0.37.102 eslint: - specifier: 9.12.0 - version: 9.12.0 + specifier: 9.13.0 + version: 9.13.0 eslint-config-prettier: specifier: 9.1.0 - version: 9.1.0(eslint@9.12.0) + version: 9.1.0(eslint@9.13.0) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.12.0) + version: 8.1.0(eslint@9.13.0) eslint-plugin-n: specifier: 17.11.1 - version: 17.11.1(eslint@9.12.0) + version: 17.11.1(eslint@9.13.0) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.12.0))(eslint@9.12.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0))(eslint@9.13.0)(prettier@3.3.3) eslint-plugin-unicorn: specifier: 56.0.0 - version: 56.0.0(eslint@9.12.0) + version: 56.0.0(eslint@9.13.0) eslint-plugin-yml: specifier: 1.14.0 - version: 1.14.0(eslint@9.12.0) + version: 1.14.0(eslint@9.13.0) fs-extra: specifier: 11.2.0 version: 11.2.0 @@ -1278,8 +1278,8 @@ packages: resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.6.0': - resolution: {integrity: sha512-8I2Q8ykA4J0x0o7cg67FPVnehcqWTBehu/lmY+bolPFHGjh49YzGBMXTvpqVgEbBdvNCSxj6iFgiIyHzf03lzg==} + '@eslint/core@0.7.0': + resolution: {integrity: sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@2.1.4': @@ -1294,10 +1294,6 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.12.0': - resolution: {integrity: sha512-eohesHH8WFRUprDNyEREgqP6beG6htMeUYeCpkEgBCieCMme5r9zFWjzAJp//9S+Kub4rqE+jXe9Cp1a7IYIIA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.13.0': resolution: {integrity: sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2969,8 +2965,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.12.0: - resolution: {integrity: sha512-UVIOlTEWxwIopRL1wgSQYdnVDcEvs2wyaO6DGo5mXqe3r16IoCNWkR29iHhyaP4cICWjbgbmFUGAhh0GJRuGZw==} + eslint@9.13.0: + resolution: {integrity: sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -6681,9 +6677,9 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.0(eslint@9.12.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@9.13.0)': dependencies: - eslint: 9.12.0 + eslint: 9.13.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.11.1': {} @@ -6696,7 +6692,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/core@0.6.0': {} + '@eslint/core@0.7.0': {} '@eslint/eslintrc@2.1.4': dependencies: @@ -6728,8 +6724,6 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.12.0': {} - '@eslint/js@9.13.0': {} '@eslint/object-schema@2.1.4': {} @@ -7209,10 +7203,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.9.0(eslint@9.12.0)(typescript@5.6.3)': + '@stylistic/eslint-plugin@2.9.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.10.0(eslint@9.12.0)(typescript@5.6.3) - eslint: 9.12.0 + '@typescript-eslint/utils': 8.10.0(eslint@9.13.0)(typescript@5.6.3) + eslint: 9.13.0 eslint-visitor-keys: 4.1.0 espree: 10.2.0 estraverse: 5.3.0 @@ -7381,15 +7375,15 @@ snapshots: '@types/node': 22.7.6 optional: true - '@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.12.0)(typescript@5.6.3))(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.10.0(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.10.0(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/type-utils': 8.10.0(eslint@9.12.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.10.0(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.10.0(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.10.0(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.10.0 - eslint: 9.12.0 + eslint: 9.13.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -7399,14 +7393,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.10.0(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.10.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 8.10.0 '@typescript-eslint/types': 8.10.0 '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.10.0 debug: 4.3.7 - eslint: 9.12.0 + eslint: 9.13.0 optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -7417,10 +7411,10 @@ snapshots: '@typescript-eslint/types': 8.10.0 '@typescript-eslint/visitor-keys': 8.10.0 - '@typescript-eslint/type-utils@8.10.0(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.10.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.10.0(eslint@9.12.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.10.0(eslint@9.13.0)(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: @@ -7446,13 +7440,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.10.0(eslint@9.12.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.10.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) '@typescript-eslint/scope-manager': 8.10.0 '@typescript-eslint/types': 8.10.0 '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) - eslint: 9.12.0 + eslint: 9.13.0 transitivePeerDependencies: - supports-color - typescript @@ -8459,18 +8453,18 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.12.0): + eslint-compat-utils@0.5.1(eslint@9.13.0): dependencies: - eslint: 9.12.0 + eslint: 9.13.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.12.0): + eslint-config-prettier@9.1.0(eslint@9.13.0): dependencies: - eslint: 9.12.0 + eslint: 9.13.0 - eslint-filtered-fix@0.3.0(eslint@9.12.0): + eslint-filtered-fix@0.3.0(eslint@9.13.0): dependencies: - eslint: 9.12.0 + eslint: 9.13.0 optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -8481,54 +8475,54 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.12.0): + eslint-nibble@8.1.0(eslint@9.13.0): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.12.0 - eslint-filtered-fix: 0.3.0(eslint@9.12.0) + eslint: 9.13.0 + eslint-filtered-fix: 0.3.0(eslint@9.13.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.12.0): + eslint-plugin-es-x@7.8.0(eslint@9.13.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) '@eslint-community/regexpp': 4.11.1 - eslint: 9.12.0 - eslint-compat-utils: 0.5.1(eslint@9.12.0) + eslint: 9.13.0 + eslint-compat-utils: 0.5.1(eslint@9.13.0) - eslint-plugin-n@17.11.1(eslint@9.12.0): + eslint-plugin-n@17.11.1(eslint@9.13.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) enhanced-resolve: 5.17.1 - eslint: 9.12.0 - eslint-plugin-es-x: 7.8.0(eslint@9.12.0) + eslint: 9.13.0 + eslint-plugin-es-x: 7.8.0(eslint@9.13.0) get-tsconfig: 4.8.1 globals: 15.11.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.12.0))(eslint@9.12.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0))(eslint@9.13.0)(prettier@3.3.3): dependencies: - eslint: 9.12.0 + eslint: 9.13.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 9.1.0(eslint@9.12.0) + eslint-config-prettier: 9.1.0(eslint@9.13.0) - eslint-plugin-unicorn@56.0.0(eslint@9.12.0): + eslint-plugin-unicorn@56.0.0(eslint@9.13.0): dependencies: '@babel/helper-validator-identifier': 7.25.7 - '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.38.1 - eslint: 9.12.0 + eslint: 9.13.0 esquery: 1.6.0 globals: 15.11.0 indent-string: 4.0.0 @@ -8541,11 +8535,11 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-yml@1.14.0(eslint@9.12.0): + eslint-plugin-yml@1.14.0(eslint@9.13.0): dependencies: debug: 4.3.7 - eslint: 9.12.0 - eslint-compat-utils: 0.5.1(eslint@9.12.0) + eslint: 9.13.0 + eslint-compat-utils: 0.5.1(eslint@9.13.0) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.3 @@ -8614,14 +8608,14 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.12.0: + eslint@9.13.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.12.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) '@eslint-community/regexpp': 4.11.1 '@eslint/config-array': 0.18.0 - '@eslint/core': 0.6.0 + '@eslint/core': 0.7.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.12.0 + '@eslint/js': 9.13.0 '@eslint/plugin-kit': 0.2.1 '@humanfs/node': 0.16.5 '@humanwhocodes/module-importer': 1.0.1 From 9e7948be1c3dc738cff5cf5a6e4f3bd2e184b154 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 22:31:40 +0800 Subject: [PATCH 210/740] chore(deps-dev): bump @types/node from 22.7.6 to 22.7.7 (#17220) * chore(deps-dev): bump @types/node from 22.7.6 to 22.7.7 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.7.6 to 22.7.7. - [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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 f3d0f132d4d7301..bf069d5bcf3dd9c 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.7.6", + "@types/node": "22.7.7", "@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 fe41e932530d8f5..f39eb5cf50eb463 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -325,8 +325,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.7.6 - version: 22.7.6 + specifier: 22.7.7 + version: 22.7.7 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -353,7 +353,7 @@ importers: version: 0.27.4 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.7.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.7.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.102 version: 0.37.102 @@ -419,10 +419,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.6)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.7)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.7.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.7.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1858,8 +1858,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.7.6': - resolution: {integrity: sha512-/d7Rnj0/ExXDMcioS78/kf1lMzYk4BZV8MZGTBKzTGZ6/406ukkbYlIsZmMPhcR5KlkunDHQLrtAVmSq7r+mSw==} + '@types/node@22.7.7': + resolution: {integrity: sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6784,7 +6784,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.7.6 + '@types/node': 22.7.7 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7252,12 +7252,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.7.6 + '@types/node': 22.7.7 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.7.6 + '@types/node': 22.7.7 '@types/html-to-text@9.0.4': {} @@ -7265,13 +7265,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.7.6 + '@types/node': 22.7.7 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.7.6 + '@types/node': 22.7.7 '@types/tough-cookie': 4.0.5 parse5: 7.2.0 @@ -7281,7 +7281,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.7.6 + '@types/node': 22.7.7 '@types/jsrsasign@10.5.13': {} @@ -7291,7 +7291,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.7.6 + '@types/node': 22.7.7 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7313,14 +7313,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.7.6 + '@types/node': 22.7.7 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.7.6 + '@types/node': 22.7.7 form-data: 4.0.1 - '@types/node@22.7.6': + '@types/node@22.7.7': dependencies: undici-types: 6.19.8 @@ -7334,7 +7334,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.7.6 + '@types/node': 22.7.7 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7348,7 +7348,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.7.6 + '@types/node': 22.7.7 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7372,7 +7372,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.7.6 + '@types/node': 22.7.7 optional: true '@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': @@ -7481,7 +7481,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7495,7 +7495,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.7.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.7.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10450,7 +10450,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.7.6 + '@types/node': 22.7.7 long: 5.2.3 proxy-agent@6.4.0: @@ -11418,13 +11418,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.7.6): + vite-node@2.0.5(@types/node@22.7.7): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.7.6) + vite: 5.4.9(@types/node@22.7.7) transitivePeerDependencies: - '@types/node' - less @@ -11436,27 +11436,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.6)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.7)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.9(@types/node@22.7.6) + vite: 5.4.9(@types/node@22.7.7) transitivePeerDependencies: - supports-color - typescript - vite@5.4.9(@types/node@22.7.6): + vite@5.4.9(@types/node@22.7.7): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.0 optionalDependencies: - '@types/node': 22.7.6 + '@types/node': 22.7.7 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.7.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.7.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11474,11 +11474,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.7.6) - vite-node: 2.0.5(@types/node@22.7.6) + vite: 5.4.9(@types/node@22.7.7) + vite-node: 2.0.5(@types/node@22.7.7) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.7.6 + '@types/node': 22.7.7 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From fc81c228433716e9092c58bf851f6069e28240d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 07:48:05 -0700 Subject: [PATCH 211/740] chore(deps): bump rate-limiter-flexible from 5.0.3 to 5.0.4 (#17217) * chore(deps): bump rate-limiter-flexible from 5.0.3 to 5.0.4 Bumps [rate-limiter-flexible](https://github.com/animir/node-rate-limiter-flexible) from 5.0.3 to 5.0.4. - [Release notes](https://github.com/animir/node-rate-limiter-flexible/releases) - [Commits](https://github.com/animir/node-rate-limiter-flexible/commits) --- updated-dependencies: - dependency-name: rate-limiter-flexible dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 bf069d5bcf3dd9c..8a5b9fc96d960c9 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,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": "5.0.3", + "rate-limiter-flexible": "5.0.4", "re2js": "0.4.2", "rfc4648": "1.5.3", "rss-parser": "3.13.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f39eb5cf50eb463..fd9d9eb8158b3fe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -195,8 +195,8 @@ importers: specifier: 9.1.1 version: 9.1.1 rate-limiter-flexible: - specifier: 5.0.3 - version: 5.0.3 + specifier: 5.0.4 + version: 5.0.4 re2js: specifier: 0.4.2 version: 0.4.2 @@ -4710,8 +4710,8 @@ packages: resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==} engines: {node: '>=10'} - rate-limiter-flexible@5.0.3: - resolution: {integrity: sha512-lWx2y8NBVlTOLPyqs+6y7dxfEpT6YFqKy3MzWbCy95sTTOhOuxufP2QvRyOHpfXpB9OUJPbVLybw3z3AVAS5fA==} + rate-limiter-flexible@5.0.4: + resolution: {integrity: sha512-ftYHrIfSqWYDIJZ4yPTrgOduByAp+86gUS9iklv0JoXVM8eQCAjTnydCj1hAT4MmhmkSw86NaFEJ28m/LC1pKA==} re2js@0.4.2: resolution: {integrity: sha512-wuv0p0BGbrVIkobV8zh82WjDurXko0QNCgaif6DdRAljgVm2iio4PVYCwjAxGaWen1/QZXWDM67dIslmz7AIbA==} @@ -10595,7 +10595,7 @@ snapshots: quick-lru@5.1.1: {} - rate-limiter-flexible@5.0.3: {} + rate-limiter-flexible@5.0.4: {} re2js@0.4.2: {} From ec16c68c93901894f5149254597b4160af4c22cd Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Mon, 21 Oct 2024 23:35:00 +0800 Subject: [PATCH 212/740] fix: use ofetch utility --- lib/routes/skebetter/utils.ts | 2 +- lib/routes/voronoiapp/common.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/skebetter/utils.ts b/lib/routes/skebetter/utils.ts index a6267eade755119..271fe55398d918b 100644 --- a/lib/routes/skebetter/utils.ts +++ b/lib/routes/skebetter/utils.ts @@ -1,5 +1,5 @@ import { DataItem } from '@/types'; -import { ofetch } from 'ofetch'; +import ofetch from '@/utils/ofetch'; export interface MediaUrl { h: number; diff --git a/lib/routes/voronoiapp/common.ts b/lib/routes/voronoiapp/common.ts index 9cdd56f48f75b94..9b14bc9b030d440 100644 --- a/lib/routes/voronoiapp/common.ts +++ b/lib/routes/voronoiapp/common.ts @@ -1,6 +1,6 @@ import { ViewType, type Data, type DataItem, type Route } from '@/types'; import { parseDate } from '@/utils/parse-date'; -import { ofetch } from 'ofetch'; +import ofetch from '@/utils/ofetch'; import type { Post } from './types'; export async function getPostItems(params: { From e84594315858526a3dfd861bd97a35dbcd4fa924 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Mon, 21 Oct 2024 08:59:08 -0700 Subject: [PATCH 213/740] fix(route): xueqiu token url (#17225) --- lib/routes/xueqiu/cookies.ts | 6 +++--- lib/routes/xueqiu/favorite.ts | 10 ++++++---- lib/routes/xueqiu/hots.ts | 12 ++++++------ lib/routes/xueqiu/stock-info.ts | 9 +++++---- lib/routes/xueqiu/today.ts | 2 +- lib/routes/xueqiu/user.ts | 9 +++++---- 6 files changed, 26 insertions(+), 22 deletions(-) diff --git a/lib/routes/xueqiu/cookies.ts b/lib/routes/xueqiu/cookies.ts index c7b091027693130..a5b8d940c5e9949 100644 --- a/lib/routes/xueqiu/cookies.ts +++ b/lib/routes/xueqiu/cookies.ts @@ -3,11 +3,11 @@ import cache from '@/utils/cache'; import { config } from '@/config'; import { getAcwScV2ByArg1 } from '@/routes/5eplay/utils'; -export const parseToken = () => +export const parseToken = (link: string) => cache.tryGet( 'xueqiu:token', async () => { - const r = await ofetch('https://xueqiu.com'); + const r = await ofetch(link); let acw_sc__v2 = ''; const matches = r.match(/var arg1='(.*?)';/); @@ -15,7 +15,7 @@ export const parseToken = () => acw_sc__v2 = getAcwScV2ByArg1(matches[1]); } const acw_sc__v2_cookie = `acw_sc__v2=${acw_sc__v2}`; - const res = await ofetch.raw('https://xueqiu.com', { + const res = await ofetch.raw(link, { headers: { Cookie: acw_sc__v2_cookie, }, diff --git a/lib/routes/xueqiu/favorite.ts b/lib/routes/xueqiu/favorite.ts index 7b2d2147f230804..cb1e6197138a42c 100644 --- a/lib/routes/xueqiu/favorite.ts +++ b/lib/routes/xueqiu/favorite.ts @@ -30,7 +30,9 @@ export const route: Route = { async function handler(ctx) { const id = ctx.req.param('id'); - const token = await parseToken(); + + const link = `https://xueqiu.com/u/${id}`; + const token = await parseToken(link); const res2 = await got({ method: 'get', url: 'https://xueqiu.com/favorites.json', @@ -39,7 +41,7 @@ async function handler(ctx) { }), headers: { Cookie: token, - Referer: `https://xueqiu.com/u/${id}`, + Referer: link, }, }); const data = res2.data.list; @@ -52,13 +54,13 @@ async function handler(ctx) { }, headers: { Cookie: token, - Referer: `https://xueqiu.com/u/${id}`, + Referer: link, }, }); return { title: `${screen_name} 的雪球收藏动态`, - link: `https://xueqiu.com/u/${id}`, + link, description: `${screen_name} 的雪球收藏动态`, item: data.map((item) => ({ title: item.title, diff --git a/lib/routes/xueqiu/hots.ts b/lib/routes/xueqiu/hots.ts index dc20dd40f6be15e..ffaf9d52057b29b 100644 --- a/lib/routes/xueqiu/hots.ts +++ b/lib/routes/xueqiu/hots.ts @@ -30,7 +30,7 @@ export const route: Route = { }; async function handler() { - const token = await parseToken(); + const token = await parseToken('https://xueqiu.com'); const res2 = await got({ method: 'get', url: 'https://xueqiu.com/statuses/hots.json', @@ -44,20 +44,20 @@ async function handler() { }), headers: { Cookie: token, - Referer: `https://xueqiu.com/`, + Referer: 'https://xueqiu.com/', }, }); const data = res2.data; return { - title: `热帖 - 雪球`, - link: `https://xueqiu.com/`, - description: `雪球热门帖子`, + title: '热帖 - 雪球', + link: 'https://xueqiu.com/', + description: '雪球热门帖子', item: data.map((item) => { const description = item.text; return { title: item.title ?? sanitizeHtml(description, { allowedTags: [], allowedAttributes: {} }), - description: item.text, + description, pubDate: parseDate(item.created_at), link: `https://xueqiu.com${item.target}`, author: item.user.screen_name, diff --git a/lib/routes/xueqiu/stock-info.ts b/lib/routes/xueqiu/stock-info.ts index ac0397c92994ecf..d595ec01d18d10c 100644 --- a/lib/routes/xueqiu/stock-info.ts +++ b/lib/routes/xueqiu/stock-info.ts @@ -46,12 +46,13 @@ async function handler(ctx) { }; const source = typename[type]; + const link = `https://xueqiu.com/S/${id}`; const res1 = await got({ method: 'get', - url: `https://xueqiu.com/S/${id}`, + url: link, }); - const token = await parseToken(); + const token = await parseToken(link); const $ = load(res1.data); // 使用 cheerio 加载返回的 HTML const stock_name = $('.stock-name').text().split('(')[0]; @@ -73,14 +74,14 @@ async function handler(ctx) { }), headers: { Cookie: token, - Referer: `https://xueqiu.com/u/${id}`, + Referer: link, }, }); const data = res2.data.list; return { title: `${id} ${stock_name} - ${source}`, - link: `https://xueqiu.com/S/${id}`, + link, description: `${stock_name} - ${source}`, item: data.map((item) => ({ title: item.title || sanitizeHtml(item.description, { allowedTags: [], allowedAttributes: {} }), diff --git a/lib/routes/xueqiu/today.ts b/lib/routes/xueqiu/today.ts index d262a341d53908e..2235d017eec324f 100644 --- a/lib/routes/xueqiu/today.ts +++ b/lib/routes/xueqiu/today.ts @@ -36,7 +36,7 @@ async function handler(ctx) { const currentUrl = `${rootUrl}/today`; const apiUrl = `${rootUrl}/statuses/hot/listV2.json?since_id=-1&size=${size}`; - const token = await parseToken(); + const token = await parseToken(currentUrl); const response = await got({ method: 'get', url: apiUrl, diff --git a/lib/routes/xueqiu/user.ts b/lib/routes/xueqiu/user.ts index 17ac9ffd393f3c1..4e8f89f63d035e2 100644 --- a/lib/routes/xueqiu/user.ts +++ b/lib/routes/xueqiu/user.ts @@ -48,7 +48,8 @@ async function handler(ctx) { 11: '交易', }; - const token = await parseToken(); + const link = `${rootUrl}/u/${id}`; + const token = await parseToken(link); const res2 = await got({ method: 'get', url: `${rootUrl}/v4/statuses/user_timeline.json`, @@ -59,7 +60,7 @@ async function handler(ctx) { }), headers: { Cookie: token, - Referer: `${rootUrl}/u/${id}`, + Referer: link, }, }); const data = res2.data.statuses.filter((s) => s.mark !== 1); // 去除置顶动态 @@ -71,7 +72,7 @@ async function handler(ctx) { method: 'get', url: rootUrl + item.target, headers: { - Referer: `${rootUrl}/u/${id}`, + Referer: link, Cookie: token, }, }); @@ -94,7 +95,7 @@ async function handler(ctx) { return { title: `${data[0].user.screen_name} 的雪球${typename[type]}动态`, - link: `${rootUrl}/u/${id}`, + link, description: `${data[0].user.screen_name} 的雪球${typename[type]}动态`, item: items, }; From 96436e8accaf72c1bc8ee8b8ea6b7467a542e5e9 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Mon, 21 Oct 2024 09:22:39 -0700 Subject: [PATCH 214/740] fix(route): economist espresso (#17227) --- lib/routes/economist/espresso.ts | 84 +++++++++----------------------- 1 file changed, 22 insertions(+), 62 deletions(-) diff --git a/lib/routes/economist/espresso.ts b/lib/routes/economist/espresso.ts index 901a78cb8bf5dcc..10634b838da41ca 100644 --- a/lib/routes/economist/espresso.ts +++ b/lib/routes/economist/espresso.ts @@ -1,8 +1,11 @@ import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; -import { load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; import { config } from '@/config'; +import { parseDate } from '@/utils/parse-date'; +import xxhash from 'xxhash-wasm'; +import sanitizeHtml from 'sanitize-html'; const link = 'https://www.economist.com/the-world-in-brief'; @@ -32,76 +35,33 @@ export const route: Route = { }; async function handler() { - const $ = await cache.tryGet( + const { h64ToString } = await xxhash(); + const nextData = await cache.tryGet( link, async () => { - const response = await got(link); - return load(response.data); + const response = await ofetch(link); + const $ = cheerio.load(response); + return JSON.parse($('script#__NEXT_DATA__').text()); }, config.cache.routeExpire, false ); - const nextData = JSON.parse($('script#__NEXT_DATA__').text()); - const parts = nextData.props.pageProps.content.hasPart.parts[0].hasPart.parts.filter((part) => part.type.includes('Article') && part.headline !== ''); - - const renderHTML = (node) => { - let el; - switch (node.type) { - case 'tag': - el = $(`<${node.name}>`); - for (const name in node.attribs) { - el.attr(name, node.attribs[name]); - } - if (node.children) { - el.append(node.children.map((childNode) => renderHTML(childNode))); - } - return el; - case 'text': - return node.data; - default: - el = $('<div>'); - el.append(node.map((n) => renderHTML(n))); - return el; - } - }; - - const gobbetPart = parts.shift(); - const gobbets = gobbetPart.text.map((node, index) => { - const html = renderHTML(node).html(); - return { - guid: `${gobbetPart.id}/${index}`, - link, - title: gobbetPart.headline, - pubDate: gobbetPart.datePublished, - description: html, - }; - }); - - const articles = parts.map((part) => { - const image = part.image.main; - const imgNode = { - type: 'tag', - name: 'img', - attribs: { width: image.width, height: image.height, src: image.url.canonical }, - }; - - const html = renderHTML([imgNode, ...part.text]).html(); - - return { - link, - guid: part.id, - title: part.headline, - pubDate: part.datePublished, - description: html, - }; - }); + const { content, metadata } = nextData.props.pageProps; + const items = content.gobbets.map((item) => ({ + link, + title: sanitizeHtml(item, { allowedTags: [], allowedAttributes: {} }), + pubDate: parseDate(content.datePublished), + description: item, + guid: `${link}#${h64ToString(item)}`, + })); return { - title: $('head title').text(), + title: metadata.title, link, - description: $('meta[property="og:description"]').attr('content'), + description: metadata.description, language: 'en-gb', - item: [...gobbets, ...articles], + image: metadata.imageUrl, + item: items, }; } From 651f51c4aad6844b78fdc38de5ca8f833955273f Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Tue, 22 Oct 2024 01:35:40 +0800 Subject: [PATCH 215/740] fix(route): Correct misuse of `fulltext` query (#17230) * Update common.ts * . --- lib/routes/apnews/api.ts | 2 +- lib/routes/apnews/rss.ts | 2 +- lib/routes/apnews/sitemap.ts | 2 +- lib/routes/apnews/topics.ts | 2 +- lib/routes/reuters/common.ts | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/routes/apnews/api.ts b/lib/routes/apnews/api.ts index c0c0372f4b65909..f0edc8582bb5e32 100644 --- a/lib/routes/apnews/api.ts +++ b/lib/routes/apnews/api.ts @@ -67,7 +67,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('mode') === 'fulltext' ? await Promise.all(list.map((item) => fetchArticle(item))) : list; + const items = ctx.req.query('fulltext') === 'true' ? await Promise.all(list.map((item) => fetchArticle(item))) : list; return { title: `${res.tagObjs[0].name} - AP News`, diff --git a/lib/routes/apnews/rss.ts b/lib/routes/apnews/rss.ts index 8402bde6a315052..c14ad46713dfb4f 100644 --- a/lib/routes/apnews/rss.ts +++ b/lib/routes/apnews/rss.ts @@ -38,7 +38,7 @@ async function handler(ctx) { const url = `${HOME_PAGE}/${rss}.rss`; const res = await parser.parseURL(url); - const items = ctx.req.query('mode') === 'fulltext' ? await Promise.all(res.items.map((item) => fetchArticle(item))) : res; + const items = ctx.req.query('fulltext') === 'true' ? await Promise.all(res.items.map((item) => fetchArticle(item))) : res; return { ...res, diff --git a/lib/routes/apnews/sitemap.ts b/lib/routes/apnews/sitemap.ts index 066ded45595d42e..655ab7f088d01fd 100644 --- a/lib/routes/apnews/sitemap.ts +++ b/lib/routes/apnews/sitemap.ts @@ -81,7 +81,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('mode') === 'fulltext' ? await asyncPoolAll(20, list, (item) => fetchArticle(item)) : list; + const items = ctx.req.query('fulltext') === 'true' ? await asyncPoolAll(20, list, (item) => fetchArticle(item)) : list; return { title: `AP News sitemap:${route}`, diff --git a/lib/routes/apnews/topics.ts b/lib/routes/apnews/topics.ts index 92bb1b070a8c42e..66a31bd3a5fc41b 100644 --- a/lib/routes/apnews/topics.ts +++ b/lib/routes/apnews/topics.ts @@ -50,7 +50,7 @@ async function handler(ctx) { link: $(e).find('a').attr('href'), })) .filter((e) => typeof e.link === 'string') - .map((item) => (ctx.req.query('mode') === 'fulltext' ? fetchArticle(item) : item)) + .map((item) => (ctx.req.query('fulltext') === 'true' ? fetchArticle(item) : item)) ); return { diff --git a/lib/routes/reuters/common.ts b/lib/routes/reuters/common.ts index 74e7ff10845ee6c..6521ae77b07d022 100644 --- a/lib/routes/reuters/common.ts +++ b/lib/routes/reuters/common.ts @@ -190,7 +190,7 @@ async function handler(ctx) { const results = await Promise.allSettled( items.map((item) => - ctx.req.query('mode') === 'fulltext' + ctx.req.query('fulltext') === 'true' ? cache.tryGet(item.link, async () => { const detailResponse = await ofetch(item.link); const content = load(detailResponse.data); From 8dd3e0b875a324bf90c14daf8fd078e00393b55b Mon Sep 17 00:00:00 2001 From: Thomas <1688389+Rakambda@users.noreply.github.com> Date: Mon, 21 Oct 2024 19:43:35 +0200 Subject: [PATCH 216/740] feat: support twitter lists through mobile api (#17176) --- lib/routes/twitter/api/mobile-api/api.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/routes/twitter/api/mobile-api/api.ts b/lib/routes/twitter/api/mobile-api/api.ts index 12244baeeea3b13..6552fc1f2d99fe1 100644 --- a/lib/routes/twitter/api/mobile-api/api.ts +++ b/lib/routes/twitter/api/mobile-api/api.ts @@ -116,6 +116,16 @@ const tweetDetail = (userId, params) => ['threaded_conversation_with_injections_v2'] ); +const listTweets = (listId, params = {}) => + paginationTweets( + gqlMap.ListTimeline, + listId, + { + ...params, + }, + ['list', 'timeline_response', 'timeline'] + ); + function gatherLegacyFromData(entries, filterNested, userId) { const tweets = []; const filteredEntries = []; @@ -172,6 +182,7 @@ const getUserTweetsAndRepliesByID = async (id, params = {}) => gatherLegacyFromD const getUserMediaByID = async (id, params = {}) => gatherLegacyFromData(await timelineMedia(id, params)); // const getUserLikesByID = async (id, params = {}) => gatherLegacyFromData(await timelineLikes(id, params)); const getUserTweetByStatus = async (id, params = {}) => gatherLegacyFromData(await tweetDetail(id, params), ['homeConversation-', 'conversationthread-']); +const getListById = async (id, params = {}) => gatherLegacyFromData(await listTweets(id, params)); const excludeRetweet = function (tweets) { const excluded = []; @@ -273,6 +284,8 @@ const getUserTweet = (id, params) => cacheTryGet(id, params, getUserTweetByStatu const getSearch = async (keywords, params = {}) => gatherLegacyFromData(await timelineKeywords(keywords, params)); +const getList = (id, params = {}) => cache.tryGet(`twitter:${id}:getListById:${JSON.stringify(params)}`, () => getListById(id, params), config.cache.routeExpire, false); + export default { getUser, getUserTweets, @@ -281,6 +294,7 @@ export default { // getUserLikes, excludeRetweet, getSearch, + getList, getUserTweet, init: () => void 0, }; From 1a943195311c216ec67ce7ce2de7b063f25edb63 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Tue, 22 Oct 2024 03:08:39 +0800 Subject: [PATCH 217/740] feat(misskey): add withRenotes and mediaOnly options for user timeline (#17191) * feat(misskey): add withRenotes and mediaOnly options for user timeline - Add optional route parameters `withRenotes` and `mediaOnly` - Update route documentation with new parameter descriptions and examples - Modify `parseNotes` function to handle renotes * feat: handle reply message * Update lib/routes/misskey/user-timeline.ts --------- --- lib/routes/misskey/templates/note.art | 6 ++ lib/routes/misskey/types.ts | 111 ++++++++++++++++++++++++++ lib/routes/misskey/user-timeline.ts | 35 +++++++- lib/routes/misskey/utils.ts | 50 ++++++++---- 4 files changed, 184 insertions(+), 18 deletions(-) create mode 100644 lib/routes/misskey/types.ts diff --git a/lib/routes/misskey/templates/note.art b/lib/routes/misskey/templates/note.art index c748ed2e1887df3..b4922d5acd280bc 100644 --- a/lib/routes/misskey/templates/note.art +++ b/lib/routes/misskey/templates/note.art @@ -1,3 +1,9 @@ +{{ if reply }} + <blockquote> + <p>{{ reply.text }}</p> + </blockquote> +{{ /if }} + {{ if text }} <p>{{ text.replace(/\n/g, '<br>') }}</p> {{ /if }} diff --git a/lib/routes/misskey/types.ts b/lib/routes/misskey/types.ts new file mode 100644 index 000000000000000..e6b695f4293824a --- /dev/null +++ b/lib/routes/misskey/types.ts @@ -0,0 +1,111 @@ +// https://github.com/misskey-dev/misskey/blob/d2e8dc4fe3c6e90e68001ed1f092d4e3d2454283/packages/backend/src/misc/json-schema.ts + +// https://github.com/misskey-dev/misskey/blob/d2e8dc4fe3c6e90e68001ed1f092d4e3d2454283/packages/backend/src/models/json-schema/note.ts +export interface MisskeyNote { + id: string; + createdAt: string; + userId: string; + user: MisskeyUser; + text: string | null; + cw: string | null; + visibility: 'public' | 'home' | 'followers' | 'specified'; + localOnly: boolean; + reactionAcceptance: string | null; + renoteCount: number; + repliesCount: number; + reactions: Record<string, number>; + reactionEmojis: Record<string, string>; + fileIds: string[]; + files: MisskeyFile[]; + replyId: string | null; + renoteId: string | null; + channelId: string | undefined; + channel?: { + id: string; + name: string; + color: string; + isSensitive: boolean; + allowRenoteToExternal: boolean; + userId: string | null; + }; + mentions?: string[]; + uri?: string; + url?: string; + reactionAndUserPairCache?: string[]; + poll?: { + expiresAt: string | null; + multiple: boolean; + choices: { + text: string; + votes: number; + isVoted: boolean; + }[]; + }; + emojis?: Record<string, string>; + tags?: string[]; + clippedCount?: number; + myReaction?: string | null; + + reply?: MisskeyNote; + renote?: MisskeyNote; +} + +// https://github.com/misskey-dev/misskey/blob/d2e8dc4fe3c6e90e68001ed1f092d4e3d2454283/packages/backend/src/models/json-schema/user.ts +interface MisskeyUser { + id: string; + name: string | null; + username: string; + host: string | null; + avatarUrl: string | null; + avatarBlurhash: string | null; + avatarDecorations: Array<{ + id: string; + url: string; + angle?: number; + flipH?: boolean; + offsetX?: number; + offsetY?: number; + }>; + isBot?: boolean; + isCat?: boolean; + instance?: { + name: string | null; + softwareName: string | null; + softwareVersion: string | null; + iconUrl: string | null; + faviconUrl: string | null; + themeColor: string | null; + }; + emojis: Record<string, string>; + onlineStatus: 'unknown' | 'online' | 'active' | 'offline'; + badgeRoles?: Array<{ + name: string; + iconUrl: string | null; + displayOrder: number; + }>; +} + +// https://github.com/misskey-dev/misskey/blob/d2e8dc4fe3c6e90e68001ed1f092d4e3d2454283/packages/backend/src/models/json-schema/drive-file.ts +interface MisskeyFile { + id: string; + createdAt: string; + name: string; + type: string; + md5: string; + size: number; + isSensitive: boolean; + blurhash: string | null; + properties: { + width?: number; + height?: number; + orientation?: number; + avgColor?: string; + }; + url: string; + thumbnailUrl: string | null; + comment: string | null; + folderId: string | null; + folder?: unknown | null; + userId: string | null; + user?: MisskeyUser | null; +} diff --git a/lib/routes/misskey/user-timeline.ts b/lib/routes/misskey/user-timeline.ts index 29fb2f35fc7825e..3d97eef28affadd 100644 --- a/lib/routes/misskey/user-timeline.ts +++ b/lib/routes/misskey/user-timeline.ts @@ -3,13 +3,28 @@ import utils from './utils'; import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; import InvalidParameterError from '@/errors/types/invalid-parameter'; +import { fallback, queryToBoolean } from '@/utils/readable-social'; +import querystring from 'querystring'; export const route: Route = { - path: '/users/notes/:username', + path: '/users/notes/:username/:routeParams?', categories: ['social-media', 'popular'], view: ViewType.SocialMedia, example: '/misskey/users/notes/support@misskey.io', - parameters: { username: 'misskey username format, like support@misskey.io' }, + parameters: { + username: 'Misskey username in the format of username@instance.domain', + routeParams: ` +| Key | Description | Accepted Values | Default | +| ----------- | ---------------------------------- | --------------- | ------- | +| withRenotes | Include renotes in the timeline | 0/1/true/false | false | +| mediaOnly | Only return posts containing media | 0/1/true/false | false | + +Note: \`withRenotes\` and \`mediaOnly\` are mutually exclusive and cannot both be set to true. + +Examples: +- /misskey/users/notes/mttb2ccp@misskey.io/withRenotes=true +- /misskey/users/notes/mttb2ccp@misskey.io/mediaOnly=true`, + }, features: { requireConfig: false, requirePuppeteer: false, @@ -19,7 +34,7 @@ export const route: Route = { supportScihub: false, }, name: 'User timeline', - maintainers: ['siygle'], + maintainers: ['siygle', 'SnowAgar25'], handler, }; @@ -33,7 +48,19 @@ async function handler(ctx) { throw new ConfigNotFoundError(`This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`); } - const { accountData } = await utils.getUserTimelineByUsername(pureUsername, site); + const routeParams = querystring.parse(ctx.req.param('routeParams')); + const withRenotes = fallback(undefined, queryToBoolean(routeParams.withRenotes), false); + const mediaOnly = fallback(undefined, queryToBoolean(routeParams.mediaOnly), false); + + // Check for conflicting parameters + if (withRenotes && mediaOnly) { + throw new InvalidParameterError('withRenotes and mediaOnly cannot both be true.'); + } + + const { accountData } = await utils.getUserTimelineByUsername(pureUsername, site, { + withRenotes, + mediaOnly, + }); return { title: `User timeline for ${username} on ${site}`, diff --git a/lib/routes/misskey/utils.ts b/lib/routes/misskey/utils.ts index 1828697096bb4fc..bc2eb823ca1339d 100644 --- a/lib/routes/misskey/utils.ts +++ b/lib/routes/misskey/utils.ts @@ -7,20 +7,40 @@ import path from 'node:path'; import cache from '@/utils/cache'; import got from '@/utils/got'; +import { MisskeyNote } from './types'; + const allowSiteList = ['misskey.io', 'madost.one', 'mk.nixnet.social']; -// docs on: https://misskey-hub.net/docs/api/entity/note.html -const parseNotes = (data, site) => - data.map((item) => { - const host = item.user.host === null ? site : item.user.host; - const author = `${item.user.name} (@${item.user.username}@${host})`; +const parseNotes = (data: MisskeyNote[], site: string) => + data.map((item: MisskeyNote) => { + const isRenote = item.renote && Object.keys(item.renote).length > 0; + const isReply = item.reply && Object.keys(item.reply).length > 0; + const noteToUse: MisskeyNote = isRenote ? (item.renote as MisskeyNote) : item; + + const host = noteToUse.user.host ?? site; + const author = `${noteToUse.user.name} (${noteToUse.user.username}@${host})`; + const description = art(path.join(__dirname, 'templates/note.art'), { - text: item.text, - files: item.files, + text: noteToUse.text, + files: noteToUse.files, + reply: item.reply, + site, }); - const title = `${author}: "${description}"`; - const link = `https://${host}/notes/${item.id}`; - const pubDate = parseDate(item.createdAt); + + let title = ''; + if (isReply && item.reply) { + const replyToHost = item.reply.user.host ?? site; + const replyToAuthor = `${item.reply.user.name} (${item.reply.user.username}@${replyToHost})`; + title = `Reply to ${replyToAuthor}: "${noteToUse.text ?? ''}"`; + } else if (isRenote) { + title = `Renote: ${author}: "${noteToUse.text ?? ''}"`; + } else { + title = `${author}: "${noteToUse.text ?? ''}"`; + } + + const link = `https://${host}/notes/${noteToUse.id}`; + const pubDate = parseDate(noteToUse.createdAt); + return { title, description, @@ -29,8 +49,7 @@ const parseNotes = (data, site) => author, }; }); - -async function getUserTimelineByUsername(username, site) { +async function getUserTimelineByUsername(username, site, { withRenotes = false, mediaOnly = false }) { const searchUrl = `https://${site}/api/users/search-by-username-and-host`; const cacheUid = `misskey_username/${site}/${username}`; @@ -47,12 +66,13 @@ async function getUserTimelineByUsername(username, site) { }); const userData = searchResponse.data.find((item) => item.username === username); - if (userData.length === 0) { + if (!userData) { throw new Error(`username ${username} not found`); } return userData.id; }); + // https://misskey.io/api-doc#tag/users/operation/users___notes const usernotesUrl = `https://${site}/api/users/notes`; const usernotesResponse = await got({ method: 'post', @@ -60,7 +80,9 @@ async function getUserTimelineByUsername(username, site) { json: { userId: accountId, withChannelNotes: true, - withRenotes: false, + withRenotes, + withReplies: !mediaOnly, // Disable replies if mediaOnly is true + withFiles: mediaOnly, limit: 10, offset: 0, }, From 58e61cc3ac33c4d1fa97c4c29c276038abb51948 Mon Sep 17 00:00:00 2001 From: haowenwu <haowenwu1@gmail.com> Date: Tue, 22 Oct 2024 04:03:21 +0800 Subject: [PATCH 218/740] feat(douban): add description (#17214) * feat(douban): add description * fix: restore old description --------- --- lib/routes/douban/people/status.ts | 48 +++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 7 deletions(-) diff --git a/lib/routes/douban/people/status.ts b/lib/routes/douban/people/status.ts index c1fd4dbbfae4245..3213120079fb249 100644 --- a/lib/routes/douban/people/status.ts +++ b/lib/routes/douban/people/status.ts @@ -4,6 +4,47 @@ import querystring from 'querystring'; import got from '@/utils/got'; import { fallback, queryToBoolean, queryToInteger } from '@/utils/readable-social'; import { config } from '@/config'; +export const route: Route = { + path: '/people/:userid/status/:routeParams?', + categories: ['social-media'], + example: '/douban/people/75118396/status', + parameters: { userid: '整数型用户 id', routeParams: '额外参数;见下' }, + name: '用户广播', + maintainers: ['alfredcai'], + handler, + description: ` +::: tip +- **目前只支持整数型 id** +- 字母型的 id,可以通过头像图片链接来找到其整数型 id,图片命名规则\`ul[userid]-*.jpg\`或\`u[userid]-*.jpg\`,即取文件名中间的数字 +- 例如:用户 id: \`MovieL\`他的头像图片链接:\`https://img1.doubanio.com/icon/ul1128221-98.jpg\`他的整数型 id: \`1128221\` +::: + +对于豆瓣用户广播内容,在 \`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 | + + 指定更多与默认值不同的参数选项可以改善 RSS 的可读性,如 + + [https://rsshub.app/douban/people/113894409/status/readable=1&authorNameBold=1&showAuthorInTitle=1&showAuthorInDesc=1&showAuthorAvatarInDesc=1&showEmojiForRetweet=1&showRetweetTextInTitle=1&addLinkForPics=1&showTimestampInDescription=1&showComments=1&widthOfPics=100](https://rsshub.app/douban/people/113894409/status/readable=1&authorNameBold=1&showAuthorInTitle=1&showAuthorInDesc=1&showAuthorAvatarInDesc=1&showEmojiForRetweet=1&showRetweetTextInTitle=1&addLinkForPics=1&showTimestampInDescription=1&showComments=1&widthOfPics=100) + + 的效果为 + + <img loading="lazy" src="/img/readable-douban.png" alt="豆瓣读书的可读豆瓣广播 RSS" />`, +}; const headers = { Referer: `https://m.douban.com/` }; @@ -444,13 +485,6 @@ async function getFullTextItems(items) { ); } -export const route: Route = { - path: '/people/:userid/status/:routeParams?', - name: 'Unknown', - maintainers: [], - handler, -}; - async function handler(ctx) { const userid = ctx.req.param('userid'); const url = `https://m.douban.com/rexxar/api/v2/status/user_timeline/${userid}`; From 69994a1e27711b8efe83bd98f2ab1323d9988620 Mon Sep 17 00:00:00 2001 From: mocusez <mocusz@163.com> Date: Tue, 22 Oct 2024 07:31:25 +1100 Subject: [PATCH 219/740] feat(route): Add SYCL.tech (#17223) * feat(route): Add SYCL.tech * refactor(route): Change SYCL.tech namespace to SYCL * refactor(route): Update SYCL.tech namespace to SYCL - Change Descritption language from Chinese to English. - Format the description --- lib/routes/sycl/feeds.ts | 47 ++++++++++++++++++++++++++++++++++++ lib/routes/sycl/namespace.ts | 6 +++++ 2 files changed, 53 insertions(+) create mode 100644 lib/routes/sycl/feeds.ts create mode 100644 lib/routes/sycl/namespace.ts diff --git a/lib/routes/sycl/feeds.ts b/lib/routes/sycl/feeds.ts new file mode 100644 index 000000000000000..d7896ace7c0fa33 --- /dev/null +++ b/lib/routes/sycl/feeds.ts @@ -0,0 +1,47 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/:feed?', + categories: ['programming'], + example: '/sycltech/news', + parameters: { feed: 'Feed source, defaults to news, references https://feeds.sycl.tech/' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Feeds', + maintainers: ['mocusez'], + handler, + description: `| Events | News | Research Paper | Videos | +| :----: | :--: | :-------------: | :----: | +| events | news | research_papers | videos |`, +}; + +async function handler(ctx) { + const feeds: string[] = ['news', 'events', 'research_papers', 'videos']; + let { feed = 'news' } = ctx.req.param(); + if (!feeds.includes(feed)) { + feed = 'news'; + } + const data = await ofetch(`https://feeds.sycl.tech/${feed}/feed.json`); + + const items = data.items.map((item) => ({ + title: item.title, + link: item.external_url, + description: item.content_html, + pubDate: parseDate(item.date_published), + author: item.author.name, + })); + + return { + title: `SYCL.tech ${feed}`, + link: `https://feeds.sycl.tech/${feed}/feed.json`, + item: items, + }; +} diff --git a/lib/routes/sycl/namespace.ts b/lib/routes/sycl/namespace.ts new file mode 100644 index 000000000000000..cefbb7fba34337a --- /dev/null +++ b/lib/routes/sycl/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'SYCL', + url: 'sycl.tech', +}; From 5dbc9931cde4fbb1f4dc4e7f51388de3919b3d57 Mon Sep 17 00:00:00 2001 From: haowenwu <whw@meitu.com> Date: Tue, 22 Oct 2024 11:02:38 +0800 Subject: [PATCH 220/740] fix(route): douban status item link (#17233) --- lib/routes/douban/people/status.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/routes/douban/people/status.ts b/lib/routes/douban/people/status.ts index 3213120079fb249..140776bf32c838e 100644 --- a/lib/routes/douban/people/status.ts +++ b/lib/routes/douban/people/status.ts @@ -95,11 +95,6 @@ function tryFixStatus(status) { } } - // 接口提供的URL最后有分享追踪器,要删去,否则路由无法工作 - if (status.sharing_url) { - status.sharing_url = status.sharing_url.split('?')[0]; - } - if (!result.isFixSuccess) { status.sharing_url = 'https://www.douban.com?rsshub_failed=' + now.getTime().toString(); if (!status.create_time) { From 871ae0832f5f7b99646c496da47f445f0cebbfa7 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 22 Oct 2024 11:15:54 +0800 Subject: [PATCH 221/740] feat(routes): add more popular routes --- lib/routes/bsky/posts.ts | 3 ++- lib/routes/gettr/user.ts | 5 +++-- lib/routes/linkedin/jobs.ts | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index 24f6d124cc7e5ba..41b5e7c00a15374 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,6 +11,7 @@ import path from 'node:path'; export const route: Route = { path: '/profile/:handle', categories: ['social-media', 'popular'], + view: ViewType.SocialMedia, example: '/bsky/profile/bsky.app', parameters: { handle: 'User handle, can be found in URL' }, features: { diff --git a/lib/routes/gettr/user.ts b/lib/routes/gettr/user.ts index a4ee40a3c3aa6a5..b1c9c7726e17b6b 100644 --- a/lib/routes/gettr/user.ts +++ b/lib/routes/gettr/user.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -15,7 +15,8 @@ const actionMap = { export const route: Route = { path: '/user/:id', - categories: ['social-media'], + categories: ['social-media', 'popular'], + view: ViewType.SocialMedia, example: '/gettr/user/jasonmillerindc', parameters: { id: 'User id' }, features: { diff --git a/lib/routes/linkedin/jobs.ts b/lib/routes/linkedin/jobs.ts index 9b87514c37686c0..ea60be49be84a23 100644 --- a/lib/routes/linkedin/jobs.ts +++ b/lib/routes/linkedin/jobs.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { EXP_LEVELS, EXP_LEVELS_QUERY_KEY, JOB_TYPES, JOB_TYPES_QUERY_KEY, KEYWORDS_QUERY_KEY, parseJobSearch, parseParamsToSearchParams, parseParamsToString, parseRouteParam } from './utils'; @@ -8,7 +8,8 @@ const JOB_SEARCH_PATH = '/jobs-guest/jobs/api/seeMoreJobPostings/search'; export const route: Route = { path: '/jobs/:job_types/:exp_levels/:keywords?/:routeParams?', - categories: ['social-media'], + categories: ['social-media', 'popular'], + view: ViewType.Notifications, example: '/linkedin/jobs/C-P/1/software engineer', parameters: { job_types: "See the following table for details, use '-' as delimiter", From 69f8a5b19cebfd260fe5a3eb8d9c01e489ab379c Mon Sep 17 00:00:00 2001 From: Keo <keocheung@outlook.com> Date: Tue, 22 Oct 2024 11:32:00 +0800 Subject: [PATCH 222/740] feat(route): add ALICESOFT (#17229) * feat(route): add ALICESOFT * update radar * add route url * Update infomation.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * add param desc * format * unifying --- lib/routes/alicesoft/infomation.ts | 88 ++++++++++++++++++++++++++++++ lib/routes/alicesoft/namespace.ts | 6 ++ 2 files changed, 94 insertions(+) create mode 100644 lib/routes/alicesoft/infomation.ts create mode 100644 lib/routes/alicesoft/namespace.ts diff --git a/lib/routes/alicesoft/infomation.ts b/lib/routes/alicesoft/infomation.ts new file mode 100644 index 000000000000000..dc855add300248b --- /dev/null +++ b/lib/routes/alicesoft/infomation.ts @@ -0,0 +1,88 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import cache from '@/utils/cache'; +import { load } from 'cheerio'; + +const baseUrl = 'https://www.alicesoft.com'; + +export const route: Route = { + url: 'www.alicesoft.com/information', + path: '/information/:category?/:game?', + categories: ['game'], + example: '/alicesoft/information/game/cat377', + parameters: { + category: 'Category in the URL, which can be accessed under カテゴリ一覧 on the website.', + game: 'Game-specific subcategory in the URL, which can be accessed under カテゴリ一覧 on the website. In this case, the category value should be `game`.', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.alicesoft.com/information', 'www.alicesoft.com/information/:category', 'www.alicesoft.com/information/:category/:game'], + target: '/information/:category/:game', + }, + ], + name: 'ニュース', + maintainers: ['keocheung'], + handler, +}; + +async function handler(ctx) { + const { category, game } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; + + let url = `${baseUrl}/information`; + if (category) { + url += `/${category}`; + if (game) { + url += `/${game}`; + } + } + + const response = await got(url); + const $ = load(response.data); + + let items = $('div.cont-main li') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + return { + title: item.find('p.txt').text(), + link: item.find('a').attr('href'), + pubDate: new Date(item.find('time').attr('datetime')), + }; + }); + + items = await Promise.all( + items.map((item) => { + if (!item.link.startsWith(`${baseUrl}/information/`)) { + return item; + } + return cache.tryGet(item.link, async () => { + const contentResponse = await got(item.link); + + const content = load(contentResponse.data); + content('iframe[src^="https://www.youtube.com/"]').removeAttr('height').removeAttr('width'); + item.description = `<div lang="ja-JP">${content('div.article-detail') + .html() + ?.replaceAll(/<p class="hl1">(.+?)<\/p>/g, '<h3>$1</h3>') + ?.replaceAll(/<p class="hl2">(.+?)<\/p>/g, '<h4>$1</h4>')}</div>`; + return item; + }); + }) + ); + + return { + title: 'ALICESOFT ' + $('article h2').clone().children().remove().end().text(), + link: url, + item: items, + language: 'ja', + }; +} diff --git a/lib/routes/alicesoft/namespace.ts b/lib/routes/alicesoft/namespace.ts new file mode 100644 index 000000000000000..343ccfe366fa34c --- /dev/null +++ b/lib/routes/alicesoft/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'ALICESOFT', + url: 'www.alicesoft.com', +}; From 89b3dfab1cc7a0dc48f6d47237d03c6378695e1b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 01:40:50 -0700 Subject: [PATCH 223/740] chore(deps): bump tldts from 6.1.52 to 6.1.53 (#17242) * chore(deps): bump tldts from 6.1.52 to 6.1.53 Bumps [tldts](https://github.com/remusao/tldts) from 6.1.52 to 6.1.53. - [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.52...v6.1.53) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 111 +++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 89 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 8a5b9fc96d960c9..b7bb156c1730740 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "telegram": "2.25.15", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.52", + "tldts": "6.1.53", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fd9d9eb8158b3fe..2111adc966ea05e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,8 +228,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.52 - version: 6.1.52 + specifier: 6.1.53 + version: 6.1.53 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -1931,6 +1931,10 @@ packages: resolution: {integrity: sha512-AgCaEjhfql9MDKjMUxWvH7HjLeBqMCBfIaBbzzIcBbQPZE7CPh1m6FF+L75NUMJFMLYhCywJXIDEMa3//1A0dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.11.0': + resolution: {integrity: sha512-Uholz7tWhXmA4r6epo+vaeV7yjdKy5QFCERMjs1kMVsLRKIrSdM6o21W2He9ftp5PP6aWOVpD5zvrvuHZC0bMQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.10.0': resolution: {integrity: sha512-PCpUOpyQSpxBn230yIcK+LeCQaXuxrgCm2Zk1S+PTIRJsEfU6nJ0TtwyH8pIwPK/vJoA+7TZtzyAJSGBz+s/dg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1944,6 +1948,10 @@ packages: resolution: {integrity: sha512-k/E48uzsfJCRRbGLapdZgrX52csmWJ2rcowwPvOZ8lwPUv3xW6CcFeJAXgx4uJm+Ge4+a4tFOkdYvSpxhRhg1w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.11.0': + resolution: {integrity: sha512-tn6sNMHf6EBAYMvmPUaKaVeYvhUsrE6x+bXQTxjQRp360h1giATU0WvgeEys1spbvb5R+VpNOZ+XJmjD8wOUHw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.10.0': resolution: {integrity: sha512-3OE0nlcOHaMvQ8Xu5gAfME3/tWVDpb/HxtpUZ1WeOAksZ/h/gwrBzCklaGzwZT97/lBbbxJ16dMA98JMEngW4w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1953,16 +1961,35 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.11.0': + resolution: {integrity: sha512-yHC3s1z1RCHoCz5t06gf7jH24rr3vns08XXhfEqzYpd6Hll3z/3g23JRi0jM8A47UFKNc3u/y5KIMx8Ynbjohg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@8.10.0': resolution: {integrity: sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.11.0': + resolution: {integrity: sha512-CYiX6WZcbXNJV7UNB4PLDIBtSdRmRI/nb0FMyqHPTQD1rMjA0foPLaPUV39C/MxkTd/QKSeX+Gb34PPsDVC35g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@8.10.0': resolution: {integrity: sha512-k8nekgqwr7FadWk548Lfph6V3r9OVqjzAIVskE7orMZR23cGJjAOVazsZSJW+ElyjfTM4wx/1g88Mi70DDtG9A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.11.0': + resolution: {integrity: sha512-EaewX6lxSjRJnc+99+dqzTeoDZUfyrA52d2/HRrkI830kgovWsmIiTfmr0NZorzqic7ga+1bS60lRBUgR3n/Bw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -2237,8 +2264,8 @@ packages: brotli@1.3.3: resolution: {integrity: sha512-oTKjJdShmDuGW94SyyaoQvAjf30dZaHnjJ8uAF+u2/vGJkJbJPJAT1gDiOJP5v1Zb6f9KEyW/1HpuaWIXtGHPg==} - browserslist@4.24.0: - resolution: {integrity: sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==} + browserslist@4.24.2: + resolution: {integrity: sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -2756,8 +2783,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.41: - resolution: {integrity: sha512-dfdv/2xNjX0P8Vzme4cfzHqnPm5xsZXwsolTYr0eyW18IUmNyG08vL+fttvinTfhKfIKdRoqkDIC9e9iWQCNYQ==} + electron-to-chromium@1.5.42: + resolution: {integrity: sha512-gIfKavKDw1mhvic9nbzA5lZw8QSHpdMwLwXc0cWidQz9B15pDoDdDH4boIatuFfeoCatb3a/NGL6CYRVFxGZ9g==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -5253,11 +5280,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.52: - resolution: {integrity: sha512-j4OxQI5rc1Ve/4m/9o2WhWSC4jGc4uVbCINdOEJRAraCi0YqTqgMcxUx7DbmuP0G3PCixoof/RZB0Q5Kh9tagw==} + tldts-core@6.1.53: + resolution: {integrity: sha512-IleS872aGdTB/UtocD2dSZBnQi/nqMIZxxezVgfcKKjw6+G2hJGzFw9buIDJO2MVJyEJe3rCAdyMTl2yvGMMrQ==} - tldts@6.1.52: - resolution: {integrity: sha512-fgrDJXDjbAverY6XnIt0lNfv8A0cf7maTEaZxNykLGsLG7XP+5xhjBTrt/ieAsFjAlZ+G5nmXomLcZDkxXnDzw==} + tldts@6.1.53: + resolution: {integrity: sha512-4uCStuOjPFaY2/LUjTSwdnJTC82W/gvSFL6FoTC9ehNOHboA9cyO3wX1erh2yGofVls37OdXr5sQLEfL5hS1TA==} hasBin: true tmp@0.0.33: @@ -5861,7 +5888,7 @@ snapshots: dependencies: '@babel/compat-data': 7.25.8 '@babel/helper-validator-option': 7.25.7 - browserslist: 4.24.0 + browserslist: 4.24.2 lru-cache: 5.1.1 semver: 6.3.1 @@ -7205,7 +7232,7 @@ snapshots: '@stylistic/eslint-plugin@2.9.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.11.0(eslint@9.13.0)(typescript@5.6.3) eslint: 9.13.0 eslint-visitor-keys: 4.1.0 espree: 10.2.0 @@ -7411,6 +7438,11 @@ snapshots: '@typescript-eslint/types': 8.10.0 '@typescript-eslint/visitor-keys': 8.10.0 + '@typescript-eslint/scope-manager@8.11.0': + dependencies: + '@typescript-eslint/types': 8.11.0 + '@typescript-eslint/visitor-keys': 8.11.0 + '@typescript-eslint/type-utils@8.10.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) @@ -7425,6 +7457,8 @@ snapshots: '@typescript-eslint/types@8.10.0': {} + '@typescript-eslint/types@8.11.0': {} + '@typescript-eslint/typescript-estree@8.10.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.10.0 @@ -7440,6 +7474,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.11.0(typescript@5.6.3)': + dependencies: + '@typescript-eslint/types': 8.11.0 + '@typescript-eslint/visitor-keys': 8.11.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.10.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) @@ -7451,11 +7500,27 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.11.0(eslint@9.13.0)(typescript@5.6.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) + '@typescript-eslint/scope-manager': 8.11.0 + '@typescript-eslint/types': 8.11.0 + '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) + eslint: 9.13.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@8.10.0': dependencies: '@typescript-eslint/types': 8.10.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.11.0': + dependencies: + '@typescript-eslint/types': 8.11.0 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.10': @@ -7761,12 +7826,12 @@ snapshots: dependencies: base64-js: 1.5.1 - browserslist@4.24.0: + browserslist@4.24.2: dependencies: caniuse-lite: 1.0.30001669 - electron-to-chromium: 1.5.41 + electron-to-chromium: 1.5.42 node-releases: 2.0.18 - update-browserslist-db: 1.1.1(browserslist@4.24.0) + update-browserslist-db: 1.1.1(browserslist@4.24.2) buffer-crc32@0.2.13: {} @@ -8060,7 +8125,7 @@ snapshots: core-js-compat@3.38.1: dependencies: - browserslist: 4.24.0 + browserslist: 4.24.2 core-js@2.6.12: {} @@ -8305,7 +8370,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.41: {} + electron-to-chromium@1.5.42: {} ellipsize@0.1.0: {} @@ -11183,11 +11248,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.52: {} + tldts-core@6.1.53: {} - tldts@6.1.52: + tldts@6.1.53: dependencies: - tldts-core: 6.1.52 + tldts-core: 6.1.53 tmp@0.0.33: dependencies: @@ -11225,7 +11290,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.52 + tldts: 6.1.53 tr46@0.0.3: {} @@ -11351,9 +11416,9 @@ snapshots: universalify@2.0.1: {} - update-browserslist-db@1.1.1(browserslist@4.24.0): + update-browserslist-db@1.1.1(browserslist@4.24.2): dependencies: - browserslist: 4.24.0 + browserslist: 4.24.2 escalade: 3.2.0 picocolors: 1.1.1 From 27d0f5b0152466f49fe0c21c88bf5b99cbe2738f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 01:48:45 -0700 Subject: [PATCH 224/740] chore(deps-dev): bump @typescript-eslint/parser from 8.10.0 to 8.11.0 (#17239) * chore(deps-dev): bump @typescript-eslint/parser from 8.10.0 to 8.11.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.10.0 to 8.11.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.11.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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index b7bb156c1730740..047c2da5e42b642 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "@types/title": "3.4.3", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.10.0", - "@typescript-eslint/parser": "8.10.0", + "@typescript-eslint/parser": "8.11.0", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.102", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2111adc966ea05e..ed806a4d0f1de84 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -344,10 +344,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.10.0 - version: 8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) + version: 8.10.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/parser': - specifier: 8.10.0 - version: 8.10.0(eslint@9.13.0)(typescript@5.6.3) + specifier: 8.11.0 + version: 8.11.0(eslint@9.13.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.4 version: 0.27.4 @@ -1917,8 +1917,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.10.0': - resolution: {integrity: sha512-E24l90SxuJhytWJ0pTQydFT46Nk0Z+bsLKo/L8rtQSL93rQ6byd1V/QbDpHUTdLPOMsBCcYXZweADNCfOCmOAg==} + '@typescript-eslint/parser@8.11.0': + resolution: {integrity: sha512-lmt73NeHdy1Q/2ul295Qy3uninSqi6wQI18XwSpm8w0ZbQXUpjCAWP1Vlv/obudoBiIjJVjlztjQ+d/Md98Yxg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -7402,10 +7402,10 @@ snapshots: '@types/node': 22.7.7 optional: true - '@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.10.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 8.10.0(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.11.0(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.10.0 '@typescript-eslint/type-utils': 8.10.0(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/utils': 8.10.0(eslint@9.13.0)(typescript@5.6.3) @@ -7420,12 +7420,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.10.0(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.10.0 + '@typescript-eslint/scope-manager': 8.11.0 + '@typescript-eslint/types': 8.11.0 + '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.11.0 debug: 4.3.7 eslint: 9.13.0 optionalDependencies: From 10fa4f9b0ee996f6ac4ac79be2ba243e0360662e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 01:49:57 -0700 Subject: [PATCH 225/740] chore(deps-dev): bump discord-api-types from 0.37.102 to 0.37.103 (#17238) * chore(deps-dev): bump discord-api-types from 0.37.102 to 0.37.103 Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.102 to 0.37.103. - [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.102...0.37.103) --- updated-dependencies: - dependency-name: discord-api-types dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 047c2da5e42b642..c828148227636d7 100644 --- a/package.json +++ b/package.json @@ -167,7 +167,7 @@ "@typescript-eslint/parser": "8.11.0", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", - "discord-api-types": "0.37.102", + "discord-api-types": "0.37.103", "eslint": "9.13.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed806a4d0f1de84..cfadcdc75213b7a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -355,8 +355,8 @@ importers: specifier: 2.0.5 version: 2.0.5(vitest@2.0.5(@types/node@22.7.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: - specifier: 0.37.102 - version: 0.37.102 + specifier: 0.37.103 + version: 0.37.103 eslint: specifier: 9.13.0 version: 9.13.0 @@ -2716,8 +2716,8 @@ packages: resolution: {integrity: sha512-d9paCbverdqmuwR+B40phSqiHhgPKiP8dpsMz5WT9U6ug2VVQ3tqXNCedpa6iGHg6mgv9lHaoq5DJUu2IXMjsQ==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.102: - resolution: {integrity: sha512-5+m5twqG8n77rLhKuh2c/971UWszEL/c3KbdvVLUBTPXuS8PbYC/7W7NYhwP02qowjj6CHoKYZbD0ppOUCsT6g==} + discord-api-types@0.37.103: + resolution: {integrity: sha512-r+qitxXKe2l6KFw5odPdZSSqdEou+7eNC7BfbZ7mny5Me/K06wCTeKUMVeH/YsI9+4QQudskeQ307kr/7ppQ1A==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -8287,7 +8287,7 @@ snapshots: directory-import@3.3.1: {} - discord-api-types@0.37.102: {} + discord-api-types@0.37.103: {} doctrine@3.0.0: dependencies: From cfac7e3155ec30cfd0f8960257e185728f82243c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:07:34 +0800 Subject: [PATCH 226/740] chore(deps): bump @rss3/sdk from 0.0.22 to 0.0.23 (#17241) * chore(deps): bump @rss3/sdk from 0.0.22 to 0.0.23 Bumps @rss3/sdk from 0.0.22 to 0.0.23. --- updated-dependencies: - dependency-name: "@rss3/sdk" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 c828148227636d7..64bb83c205e7097 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@opentelemetry/sdk-trace-base": "1.26.0", "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", - "@rss3/sdk": "0.0.22", + "@rss3/sdk": "0.0.23", "@scalar/hono-api-reference": "0.5.156", "@sentry/node": "7.119.1", "@tonyrl/rand-user-agent": "2.0.81", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cfadcdc75213b7a..d798547de4f4b3d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,8 +42,8 @@ importers: specifier: 2.2.3 version: 2.2.3 '@rss3/sdk': - specifier: 0.0.22 - version: 0.0.22 + specifier: 0.0.23 + version: 0.0.23 '@scalar/hono-api-reference': specifier: 0.5.156 version: 0.5.156(hono@4.6.5) @@ -1681,14 +1681,14 @@ packages: cpu: [x64] os: [win32] - '@rss3/api-core@0.0.22': - resolution: {integrity: sha512-5e53edybUCXK41TVRE1UaEmFdaZZhKHvi93dMJNHuR7AB048PM/1IbsaqIp8uVYfWEG1C6USe6ofOt1/XsNk+w==} + '@rss3/api-core@0.0.23': + resolution: {integrity: sha512-J7CK1ZfUfEavuVJwuNvoZ0PWeGEZueHGPej6O50k583iAsKc/T+1p8C3sP2mWAfKeHPkkvya5wlup1PjNWwUUg==} - '@rss3/api-utils@0.0.22': - resolution: {integrity: sha512-kUmdZerCdolr9p7saVN48Lpu75WP/Fa20c+iYbCerIeMcqo2aHnEgH8YUKdqbjMH+HkO1Vv6b4tIYkMkF+sa/Q==} + '@rss3/api-utils@0.0.23': + resolution: {integrity: sha512-lKFD1Dedj35ThvereZa1uqD9WHCYk4Q6bEDVEwgiBVileJ5EDyhcaHXrkizROGauuu4YeNMcWrtzJkRQ1CG1EA==} - '@rss3/sdk@0.0.22': - resolution: {integrity: sha512-yBfxbEoVxzBWeCccWDTH6VXy+TxkTnW7D8QwKbq+IQVb8ou7g1vw9oLy4E4yEu2CJ8XEZNE2BaTl2l0BWxcGOQ==} + '@rss3/sdk@0.0.23': + resolution: {integrity: sha512-1cF1AqLU0k6dMwqQ5Fch3rOAbh4UXJ4UZLtOwzp/RWyGoCvu3lUOUIdJF41omunuH/JJSP2z6rJTPj4S6a60eg==} '@scalar/hono-api-reference@0.5.156': resolution: {integrity: sha512-/byPVH0rs40qxuOInnikDeq+19wQZ0NIq0K3WJMNBeZvr0lpGqsBf4frj0soon8UAVq/uZnOMcK6jwcC50a0bg==} @@ -7160,20 +7160,20 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.24.0': optional: true - '@rss3/api-core@0.0.22': + '@rss3/api-core@0.0.23': dependencies: openapi-fetch: 0.11.3 ts-case-convert: 2.1.0 type-fest: 4.26.1 - '@rss3/api-utils@0.0.22': + '@rss3/api-utils@0.0.23': dependencies: - '@rss3/api-core': 0.0.22 + '@rss3/api-core': 0.0.23 - '@rss3/sdk@0.0.22': + '@rss3/sdk@0.0.23': dependencies: - '@rss3/api-core': 0.0.22 - '@rss3/api-utils': 0.0.22 + '@rss3/api-core': 0.0.23 + '@rss3/api-utils': 0.0.23 '@scalar/hono-api-reference@0.5.156(hono@4.6.5)': dependencies: From 4f38e2e51eb02a6729c78b5b1214c3da0814e08a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:08:25 +0800 Subject: [PATCH 227/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.10.0 to 8.11.0 (#17240) * chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.10.0 to 8.11.0 Dependabot couldn't find the original pull request head commit, 4104dc67e7cfc73e0e4ffa3bf5352e4fd62f9975. * chore: fix pnpm install --------- Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 93 ++++++++------------------------------------------ 2 files changed, 15 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index 64bb83c205e7097..ddb6d686c8d3189 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.10.0", + "@typescript-eslint/eslint-plugin": "8.11.0", "@typescript-eslint/parser": "8.11.0", "@vercel/nft": "0.27.4", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d798547de4f4b3d..b585245d07dbe69 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -343,8 +343,8 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.10.0 - version: 8.10.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) + specifier: 8.11.0 + version: 8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.11.0 version: 8.11.0(eslint@9.13.0)(typescript@5.6.3) @@ -1906,8 +1906,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.10.0': - resolution: {integrity: sha512-phuB3hoP7FFKbRXxjl+DRlQDuJqhpOnm5MmtROXyWi3uS/Xg2ZXqiQfcG2BJHiN4QKyzdOJi3NEn/qTnjUlkmQ==} + '@typescript-eslint/eslint-plugin@8.11.0': + resolution: {integrity: sha512-KhGn2LjW1PJT2A/GfDpiyOfS4a8xHQv2myUagTM5+zsormOmBlYsnQ6pobJ8XxJmh6hnHwa2Mbe3fPrDJoDhbA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1927,16 +1927,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.10.0': - resolution: {integrity: sha512-AgCaEjhfql9MDKjMUxWvH7HjLeBqMCBfIaBbzzIcBbQPZE7CPh1m6FF+L75NUMJFMLYhCywJXIDEMa3//1A0dw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.11.0': resolution: {integrity: sha512-Uholz7tWhXmA4r6epo+vaeV7yjdKy5QFCERMjs1kMVsLRKIrSdM6o21W2He9ftp5PP6aWOVpD5zvrvuHZC0bMQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.10.0': - resolution: {integrity: sha512-PCpUOpyQSpxBn230yIcK+LeCQaXuxrgCm2Zk1S+PTIRJsEfU6nJ0TtwyH8pIwPK/vJoA+7TZtzyAJSGBz+s/dg==} + '@typescript-eslint/type-utils@8.11.0': + resolution: {integrity: sha512-ItiMfJS6pQU0NIKAaybBKkuVzo6IdnAhPFZA/2Mba/uBjuPQPet/8+zh5GtLHwmuFRShZx+8lhIs7/QeDHflOg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1944,23 +1940,10 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.10.0': - resolution: {integrity: sha512-k/E48uzsfJCRRbGLapdZgrX52csmWJ2rcowwPvOZ8lwPUv3xW6CcFeJAXgx4uJm+Ge4+a4tFOkdYvSpxhRhg1w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.11.0': resolution: {integrity: sha512-tn6sNMHf6EBAYMvmPUaKaVeYvhUsrE6x+bXQTxjQRp360h1giATU0WvgeEys1spbvb5R+VpNOZ+XJmjD8wOUHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.10.0': - resolution: {integrity: sha512-3OE0nlcOHaMvQ8Xu5gAfME3/tWVDpb/HxtpUZ1WeOAksZ/h/gwrBzCklaGzwZT97/lBbbxJ16dMA98JMEngW4w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.11.0': resolution: {integrity: sha512-yHC3s1z1RCHoCz5t06gf7jH24rr3vns08XXhfEqzYpd6Hll3z/3g23JRi0jM8A47UFKNc3u/y5KIMx8Ynbjohg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1970,22 +1953,12 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.10.0': - resolution: {integrity: sha512-Oq4uZ7JFr9d1ZunE/QKy5egcDRXT/FrS2z/nlxzPua2VHFtmMvFNDvpq1m/hq0ra+T52aUezfcjGRIB7vNJF9w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.11.0': resolution: {integrity: sha512-CYiX6WZcbXNJV7UNB4PLDIBtSdRmRI/nb0FMyqHPTQD1rMjA0foPLaPUV39C/MxkTd/QKSeX+Gb34PPsDVC35g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.10.0': - resolution: {integrity: sha512-k8nekgqwr7FadWk548Lfph6V3r9OVqjzAIVskE7orMZR23cGJjAOVazsZSJW+ElyjfTM4wx/1g88Mi70DDtG9A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.11.0': resolution: {integrity: sha512-EaewX6lxSjRJnc+99+dqzTeoDZUfyrA52d2/HRrkI830kgovWsmIiTfmr0NZorzqic7ga+1bS60lRBUgR3n/Bw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7402,14 +7375,14 @@ snapshots: '@types/node': 22.7.7 optional: true - '@typescript-eslint/eslint-plugin@8.10.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.11.1 '@typescript-eslint/parser': 8.11.0(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/type-utils': 8.10.0(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.10.0 + '@typescript-eslint/scope-manager': 8.11.0 + '@typescript-eslint/type-utils': 8.11.0(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.11.0(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.11.0 eslint: 9.13.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7433,20 +7406,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.10.0': - dependencies: - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/visitor-keys': 8.10.0 - '@typescript-eslint/scope-manager@8.11.0': dependencies: '@typescript-eslint/types': 8.11.0 '@typescript-eslint/visitor-keys': 8.11.0 - '@typescript-eslint/type-utils@8.10.0(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.11.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.10.0(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.11.0(eslint@9.13.0)(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: @@ -7455,25 +7423,8 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@8.10.0': {} - '@typescript-eslint/types@8.11.0': {} - '@typescript-eslint/typescript-estree@8.10.0(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/visitor-keys': 8.10.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.11.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.11.0 @@ -7489,17 +7440,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.10.0(eslint@9.13.0)(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) - '@typescript-eslint/scope-manager': 8.10.0 - '@typescript-eslint/types': 8.10.0 - '@typescript-eslint/typescript-estree': 8.10.0(typescript@5.6.3) - eslint: 9.13.0 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.11.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) @@ -7511,11 +7451,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.10.0': - dependencies: - '@typescript-eslint/types': 8.10.0 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.11.0': dependencies: '@typescript-eslint/types': 8.11.0 From 3edfd23a0cfa216fda312c616e5cf9d67af2baf8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:29:16 +0800 Subject: [PATCH 228/740] chore(deps): bump hono from 4.6.5 to 4.6.6 (#17243) * chore(deps): bump hono from 4.6.5 to 4.6.6 Bumps [hono](https://github.com/honojs/hono) from 4.6.5 to 4.6.6. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.5...v4.6.6) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 ddb6d686c8d3189..2cbeedb5ba7ae1a 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "fanfou-sdk": "5.0.0", "form-data": "4.0.1", "googleapis": "144.0.0", - "hono": "4.6.5", + "hono": "4.6.6", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b585245d07dbe69..480587e0981136b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,10 +10,10 @@ importers: dependencies: '@hono/node-server': specifier: 1.13.2 - version: 1.13.2(hono@4.6.5) + version: 1.13.2(hono@4.6.6) '@hono/zod-openapi': specifier: 0.16.4 - version: 0.16.4(hono@4.6.5)(zod@3.23.8) + version: 0.16.4(hono@4.6.6)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -46,7 +46,7 @@ importers: version: 0.0.23 '@scalar/hono-api-reference': specifier: 0.5.156 - version: 0.5.156(hono@4.6.5) + version: 0.5.156(hono@4.6.6) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -108,8 +108,8 @@ importers: specifier: 144.0.0 version: 144.0.0 hono: - specifier: 4.6.5 - version: 4.6.5 + specifier: 4.6.6 + version: 4.6.6 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3407,8 +3407,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.5: - resolution: {integrity: sha512-qsmN3V5fgtwdKARGLgwwHvcdLKursMd+YOt69eGpl1dUCJb8mCd7hZfyZnBYjxCegBG7qkJRQRUy2oO25yHcyQ==} + hono@4.6.6: + resolution: {integrity: sha512-euUj5qwvtkG+p38GFs0LYacwaoS2hYRAGn9ysAggiwT2QBcPnT1XYUCW3hatW4C1KzAXTYuQ08BlVDJtAGuhlg==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6732,20 +6732,20 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.2(hono@4.6.5)': + '@hono/node-server@1.13.2(hono@4.6.6)': dependencies: - hono: 4.6.5 + hono: 4.6.6 - '@hono/zod-openapi@0.16.4(hono@4.6.5)(zod@3.23.8)': + '@hono/zod-openapi@0.16.4(hono@4.6.6)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.3.0(hono@4.6.5)(zod@3.23.8) - hono: 4.6.5 + '@hono/zod-validator': 0.3.0(hono@4.6.6)(zod@3.23.8) + hono: 4.6.6 zod: 3.23.8 - '@hono/zod-validator@0.3.0(hono@4.6.5)(zod@3.23.8)': + '@hono/zod-validator@0.3.0(hono@4.6.6)(zod@3.23.8)': dependencies: - hono: 4.6.5 + hono: 4.6.6 zod: 3.23.8 '@humanfs/core@0.19.0': {} @@ -7148,10 +7148,10 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.156(hono@4.6.5)': + '@scalar/hono-api-reference@0.5.156(hono@4.6.6)': dependencies: '@scalar/types': 0.0.17 - hono: 4.6.5 + hono: 4.6.6 '@scalar/openapi-types@0.1.4': {} @@ -9139,7 +9139,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.5: {} + hono@4.6.6: {} hookable@5.5.3: {} From 17aa1bed7aabbb04cbf40e65a6ed1c7c620420d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 17:30:45 +0800 Subject: [PATCH 229/740] chore(deps-dev): bump @types/node from 22.7.7 to 22.7.8 (#17235) * chore(deps-dev): bump @types/node from 22.7.7 to 22.7.8 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.7.7 to 22.7.8. - [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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 2cbeedb5ba7ae1a..da5062ee6b1acc2 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.7.7", + "@types/node": "22.7.8", "@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 480587e0981136b..9b483cfe4d40495 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -325,8 +325,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.7.7 - version: 22.7.7 + specifier: 22.7.8 + version: 22.7.8 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -353,7 +353,7 @@ importers: version: 0.27.4 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.7.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.103 version: 0.37.103 @@ -419,10 +419,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.7)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.8)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.7.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1858,8 +1858,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.7.7': - resolution: {integrity: sha512-SRxCrrg9CL/y54aiMCG3edPKdprgMVGDXjA3gB8UmmBW5TcXzRUYAh8EWzTnSJFAd1rgImPELza+A3bJ+qxz8Q==} + '@types/node@22.7.8': + resolution: {integrity: sha512-a922jJy31vqR5sk+kAdIENJjHblqcZ4RmERviFsER4WJcEONqxKcjNOlk0q7OUfrF5sddT+vng070cdfMlrPLg==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6784,7 +6784,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.7.7 + '@types/node': 22.7.8 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7252,12 +7252,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.8 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.7.7 + '@types/node': 22.7.8 '@types/html-to-text@9.0.4': {} @@ -7265,13 +7265,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.8 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.8 '@types/tough-cookie': 4.0.5 parse5: 7.2.0 @@ -7281,7 +7281,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.8 '@types/jsrsasign@10.5.13': {} @@ -7291,7 +7291,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.8 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7313,14 +7313,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.8 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.8 form-data: 4.0.1 - '@types/node@22.7.7': + '@types/node@22.7.8': dependencies: undici-types: 6.19.8 @@ -7334,7 +7334,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.7.7 + '@types/node': 22.7.8 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7348,7 +7348,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.7.7 + '@types/node': 22.7.8 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7372,7 +7372,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.8 optional: true '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': @@ -7481,7 +7481,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7495,7 +7495,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.7.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10450,7 +10450,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.7.7 + '@types/node': 22.7.8 long: 5.2.3 proxy-agent@6.4.0: @@ -11418,13 +11418,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.7.7): + vite-node@2.0.5(@types/node@22.7.8): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.7.7) + vite: 5.4.9(@types/node@22.7.8) transitivePeerDependencies: - '@types/node' - less @@ -11436,27 +11436,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.7)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.8)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.9(@types/node@22.7.7) + vite: 5.4.9(@types/node@22.7.8) transitivePeerDependencies: - supports-color - typescript - vite@5.4.9(@types/node@22.7.7): + vite@5.4.9(@types/node@22.7.8): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.0 optionalDependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.8 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.7.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11474,11 +11474,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.7.7) - vite-node: 2.0.5(@types/node@22.7.7) + vite: 5.4.9(@types/node@22.7.8) + vite-node: 2.0.5(@types/node@22.7.8) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.7.7 + '@types/node': 22.7.8 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From c06119b762fd031600cb730181317737084de9ee Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Tue, 22 Oct 2024 18:12:35 +0800 Subject: [PATCH 230/740] =?UTF-8?q?fix(route):=20=E5=8C=97=E4=BA=AC?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E4=BB=B7=E6=A0=BC=E6=97=A9=E6=8A=A5=20(#1724?= =?UTF-8?q?5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/beijingprice/index.ts | 50 ++++++++++---------------------- 1 file changed, 15 insertions(+), 35 deletions(-) diff --git a/lib/routes/beijingprice/index.ts b/lib/routes/beijingprice/index.ts index 573423c4d573a7a..ed35808614514c5 100644 --- a/lib/routes/beijingprice/index.ts +++ b/lib/routes/beijingprice/index.ts @@ -10,9 +10,7 @@ export const handler = async (ctx) => { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; const rootUrl = 'https://www.beijingprice.cn'; - const apiRootUrl = 'https://www.beijingprice.cn:8086'; const currentUrl = new URL(category.endsWith('/') ? category : `${category}/`, rootUrl).href; - const apiNewsUrl = new URL('price/priceInformation/MorningDayWeekNews/MorningNews', apiRootUrl).href; const { data: response } = await got(currentUrl); @@ -20,41 +18,23 @@ export const handler = async (ctx) => { const language = $('html').prop('lang'); - let items = []; - - if (/^jgzx\/jgzb\/?$/.test(category)) { - const { data: apiResponse } = await got(apiNewsUrl, { - searchParams: { - page: 1, - jsoncallback: '', - }, + let items = $('div.jgzx.rightcontent ul li') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + const a = item.find('a'); + const link = a.prop('href'); + + return { + title: a.text()?.trim() ?? a.prop('title'), + pubDate: parseDate(item.contents().last().text()), + link: link.startsWith('http') ? link : new URL(link, rootUrl).href, + language, + }; }); - items = (JSON.parse(apiResponse.replaceAll(/^\(|\)$/g, ''))?.[0]?.Info ?? []).map((item) => ({ - title: item.Title, - pubDate: parseDate(item.PublishDate), - link: item.Url, - language, - })); - } else { - items = $('div.jgzx.rightcontent ul li') - .slice(0, limit) - .toArray() - .map((item) => { - item = $(item); - - const a = item.find('a'); - const link = a.prop('href'); - - return { - title: a.text()?.trim() ?? a.prop('title'), - pubDate: parseDate(item.contents().last().text()), - link: link.startsWith('http') ? link : new URL(link, rootUrl).href, - language, - }; - }); - } - items = await Promise.all( items.map((item) => cache.tryGet(item.link, async () => { From 8f1e290814e064b23814fda3d5525abc5f3f3c4d Mon Sep 17 00:00:00 2001 From: haowenwu <whw@meitu.com> Date: Wed, 23 Oct 2024 00:05:52 +0800 Subject: [PATCH 231/740] feat(route/douban): add topic support (#17234) --- lib/routes/douban/other/topic.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/routes/douban/other/topic.ts b/lib/routes/douban/other/topic.ts index 75c855972a064f0..f4a239010b469db 100644 --- a/lib/routes/douban/other/topic.ts +++ b/lib/routes/douban/other/topic.ts @@ -16,7 +16,7 @@ export const route: Route = { supportScihub: false, }, name: '话题', - maintainers: ['LogicJake', 'pseudoyu'], + maintainers: ['LogicJake', 'pseudoyu', 'haowenwu'], handler, }; @@ -66,6 +66,19 @@ async function handler(ctx) { description += `<br><img src="${images[i].normal.url}" />`; } } + } else if (type === 'topic') { + link = item.target.group.sharing_url; + author = item.target.status.author.name; + title = item.target.title; + date = item.target.create_time; + description = item.target.abstract; + const images = item.target.photos; + if (images) { + let i; + for (i in images) { + description += `<br><img src="${images[i].src}" />`; + } + } } else { link = item.target.sharing_url; author = item.target.author.name; From f87db326a28ccf4f9407a49be328fb1eff14cc52 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Wed, 23 Oct 2024 01:23:38 +0800 Subject: [PATCH 232/740] fix(route): segmentfault invalid header error --- lib/routes/segmentfault/utils.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/routes/segmentfault/utils.ts b/lib/routes/segmentfault/utils.ts index bf5c4dbe44b2301..3aa8af3d59f2ec6 100644 --- a/lib/routes/segmentfault/utils.ts +++ b/lib/routes/segmentfault/utils.ts @@ -1,4 +1,3 @@ -import zlib from 'zlib'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -12,14 +11,11 @@ const acw_sc__v2 = (link, tryGet) => 'segmentfault:acw_sc__v2', async () => { const response = await got(link, { - decompress: false, + decompress: true, }); - const unzipData = zlib.createUnzip(); - unzipData.write(response.body); - let acw_sc__v2 = ''; - for await (const data of unzipData) { + for await (const data of response.body) { const strData = data.toString(); const matches = strData.match(/var arg1='(.*?)';/); if (matches) { From 18deadc77169a42062c2f01a77d929085a6df4f1 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 22 Oct 2024 13:53:33 -0700 Subject: [PATCH 233/740] fix(route): segmentfault (#17253) --- lib/routes/segmentfault/user.ts | 6 ++--- lib/routes/segmentfault/utils.ts | 46 ++++++++++++++++---------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lib/routes/segmentfault/user.ts b/lib/routes/segmentfault/user.ts index 4d2dfd9b4f5245d..2beca2b64359cce 100644 --- a/lib/routes/segmentfault/user.ts +++ b/lib/routes/segmentfault/user.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 { host, acw_sc__v2, parseList, parseItems } from './utils'; export const route: Route = { @@ -30,8 +30,8 @@ async function handler(ctx) { const name = ctx.req.param('name'); const apiURL = `${host}/gateway/homepage/${name}/timeline?size=20&offset=`; - const response = await got(apiURL); - const data = response.data.rows; + const response = await ofetch(apiURL); + const data = response.rows; const list = parseList(data); const { author } = list[0]; diff --git a/lib/routes/segmentfault/utils.ts b/lib/routes/segmentfault/utils.ts index 3aa8af3d59f2ec6..1a0489a500a49e7 100644 --- a/lib/routes/segmentfault/utils.ts +++ b/lib/routes/segmentfault/utils.ts @@ -1,4 +1,4 @@ -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; @@ -10,18 +10,12 @@ const acw_sc__v2 = (link, tryGet) => tryGet( 'segmentfault:acw_sc__v2', async () => { - const response = await got(link, { - decompress: true, - }); + const response = await ofetch(link); let acw_sc__v2 = ''; - for await (const data of response.body) { - const strData = data.toString(); - const matches = strData.match(/var arg1='(.*?)';/); - if (matches) { - acw_sc__v2 = getAcwScV2ByArg1(matches[1]); - break; - } + const matches = response.match(/var arg1='(.*?)';/); + if (matches) { + acw_sc__v2 = getAcwScV2ByArg1(matches[1]); } return acw_sc__v2; }, @@ -34,22 +28,28 @@ const parseList = (data) => title: item.title, link: new URL(item.url, host).href, author: item.user.name, - pubDate: parseDate(item.created, 'X'), + pubDate: parseDate(item.created || item.modified, 'X'), + description: item.excerpt, })); const parseItems = (cookie, item, tryGet) => tryGet(item.link, async () => { - const response = await got(item.link, { - headers: { - cookie: `acw_sc__v2=${cookie};`, - }, - }); - const content = load(response.data); - - item.description = content('article').html(); - item.category = content('.badge-tag') - .toArray() - .map((item) => content(item).text()); + let response; + try { + response = await ofetch(item.link, { + headers: { + cookie: `acw_sc__v2=${cookie};`, + }, + }); + const content = load(response); + + item.description = content('article').html(); + item.category = content('.badge-tag') + .toArray() + .map((item) => content(item).text()); + } catch { + // ignore + } return item; }); From 39d83bc28c90943bcb951d37b31fa1d9ec128cd1 Mon Sep 17 00:00:00 2001 From: haowenwu <haowenwu1@gmail.com> Date: Wed, 23 Oct 2024 05:37:28 +0800 Subject: [PATCH 234/740] fix(route/douban): remove parameter to avoid duplicate (#17251) --- lib/routes/douban/other/topic.ts | 4 ++-- lib/routes/douban/people/status.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/routes/douban/other/topic.ts b/lib/routes/douban/other/topic.ts index f4a239010b469db..99119dc2caca791 100644 --- a/lib/routes/douban/other/topic.ts +++ b/lib/routes/douban/other/topic.ts @@ -54,7 +54,7 @@ async function handler(ctx) { let link; let title; if (type === 'status') { - link = item.target.status.sharing_url; + link = item.target.status.sharing_url.split('&')[0]; author = item.target.status.author.name; title = author + '的广播'; date = item.target.status.create_time; @@ -67,7 +67,7 @@ async function handler(ctx) { } } } else if (type === 'topic') { - link = item.target.group.sharing_url; + link = item.target.sharing_url; author = item.target.status.author.name; title = item.target.title; date = item.target.create_time; diff --git a/lib/routes/douban/people/status.ts b/lib/routes/douban/people/status.ts index 140776bf32c838e..ad996d63809187b 100644 --- a/lib/routes/douban/people/status.ts +++ b/lib/routes/douban/people/status.ts @@ -95,6 +95,10 @@ function tryFixStatus(status) { } } + if (status.sharing_url) { + status.sharing_url = status.sharing_url.split('&')[0]; + } + if (!result.isFixSuccess) { status.sharing_url = 'https://www.douban.com?rsshub_failed=' + now.getTime().toString(); if (!status.create_time) { From 199d4febfc745ab42dcda61860a21289df98dc2f Mon Sep 17 00:00:00 2001 From: xbpk3t <yyzw@live.com> Date: Wed, 23 Oct 2024 10:41:54 +0800 Subject: [PATCH 235/740] fix(route): update 69shuba url (#17256) --- lib/routes/69shu/article.ts | 6 +++--- lib/routes/69shu/namespace.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/69shu/article.ts b/lib/routes/69shu/article.ts index 26c63fdb624d6ce..4371e35dce616ff 100644 --- a/lib/routes/69shu/article.ts +++ b/lib/routes/69shu/article.ts @@ -6,7 +6,7 @@ import type { Route, DataItem } from '@/types'; export const route: Route = { path: '/article/:id', name: '章节', - url: 'www.69shuba.pro', + url: 'www.69shuba.cx', maintainers: ['eternasuno'], example: '/69shu/article/47117', parameters: { id: '小说 id, 可在对应小说页 URL 中找到' }, @@ -21,13 +21,13 @@ export const route: Route = { }, radar: [ { - source: ['www.69shuba.pro/book/:id.htm'], + source: ['www.69shuba.cx/book/:id.htm'], target: '/article/:id', }, ], handler: async (ctx) => { const { id } = ctx.req.param(); - const link = `https://www.69shuba.pro/book/${id}.htm`; + const link = `https://www.69shuba.cx/book/${id}.htm`; const $ = load(await get(link)); const item = await Promise.all( diff --git a/lib/routes/69shu/namespace.ts b/lib/routes/69shu/namespace.ts index e02b40b527d26aa..df36fa4cd454d53 100644 --- a/lib/routes/69shu/namespace.ts +++ b/lib/routes/69shu/namespace.ts @@ -2,5 +2,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '69书吧', - url: '69shuba.pro', + url: '69shuba.cx', }; From 45fa8e5dd833219816d4f68575c64712ff252884 Mon Sep 17 00:00:00 2001 From: haowenwu <haowenwu1@gmail.com> Date: Wed, 23 Oct 2024 10:42:13 +0800 Subject: [PATCH 236/740] fix(route): adjust author name (#17257) --- lib/routes/douban/other/topic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/douban/other/topic.ts b/lib/routes/douban/other/topic.ts index 99119dc2caca791..f25526c01e4bd80 100644 --- a/lib/routes/douban/other/topic.ts +++ b/lib/routes/douban/other/topic.ts @@ -68,7 +68,7 @@ async function handler(ctx) { } } else if (type === 'topic') { link = item.target.sharing_url; - author = item.target.status.author.name; + author = item.target.author.name; title = item.target.title; date = item.target.create_time; description = item.target.abstract; From 52e72e2c60e77df7ed877308b522e760340b57da Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Wed, 23 Oct 2024 11:43:12 +0800 Subject: [PATCH 237/740] fix(docs): handle duplicated routes in docs --- scripts/workflow/build-docs.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/workflow/build-docs.ts b/scripts/workflow/build-docs.ts index c2faf99f9fafd5a..8aa2a39f256efe5 100644 --- a/scripts/workflow/build-docs.ts +++ b/scripts/workflow/build-docs.ts @@ -96,8 +96,17 @@ function generateMd(lang) { } }); + const processedPaths = new Set(); + for (const realPath of realPaths) { const data = docs[category][namespace].routes[realPath]; + if (Array.isArray(data.path)) { + if (processedPaths.has(data.path[0])) { + continue; + } + processedPaths.add(data.path[0]); + } + const test = testResult.find((t) => t.title === realPath); const parsedTest = test ? { From 9ba158d811388a50e329ffd7830f1bd7c91ebf14 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 01:55:06 -0700 Subject: [PATCH 238/740] chore(deps-dev): bump @babel/preset-typescript from 7.25.7 to 7.25.9 (#17262) * chore(deps-dev): bump @babel/preset-typescript from 7.25.7 to 7.25.9 Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.25.7 to 7.25.9. - [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.25.9/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 1265 ++++++++++++++++++++++++------------------------ 2 files changed, 630 insertions(+), 637 deletions(-) diff --git a/package.json b/package.json index da5062ee6b1acc2..478d7570d1f155e 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ }, "devDependencies": { "@babel/preset-env": "7.25.8", - "@babel/preset-typescript": "7.25.7", + "@babel/preset-typescript": "7.25.9", "@eslint/eslintrc": "3.1.0", "@eslint/js": "9.13.0", "@microsoft/eslint-formatter-sarif": "3.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9b483cfe4d40495..1b3d63559234818 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -260,10 +260,10 @@ importers: devDependencies: '@babel/preset-env': specifier: 7.25.8 - version: 7.25.8(@babel/core@7.25.8) + version: 7.25.8(@babel/core@7.25.9) '@babel/preset-typescript': - specifier: 7.25.7 - version: 7.25.7(@babel/core@7.25.8) + specifier: 7.25.9 + version: 7.25.9(@babel/core@7.25.9) '@eslint/eslintrc': specifier: 3.1.0 version: 3.1.0 @@ -419,7 +419,7 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.8)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.7.8)) vitest: specifier: 2.0.5 version: 2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -441,42 +441,42 @@ packages: '@babel/code-frame@7.0.0': resolution: {integrity: sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==} - '@babel/code-frame@7.25.7': - resolution: {integrity: sha512-0xZJFNE5XMpENsgfHYTw8FbX4kv53mFLn2i3XPoq69LyhYSCBJtitaHx9QnsVTrsogI4Z3+HtEfZ2/GFPOtf5g==} + '@babel/code-frame@7.25.9': + resolution: {integrity: sha512-z88xeGxnzehn2sqZ8UdGQEvYErF1odv2CftxInpSYJt6uHuPe9YjahKZITGs3l5LeI9d2ROG+obuDAoSlqbNfQ==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.25.8': - resolution: {integrity: sha512-ZsysZyXY4Tlx+Q53XdnOFmqwfB9QDTHYxaZYajWRoBLuLEAwI2UIbtxOjWh/cFaa9IKUlcB+DDuoskLuKu56JA==} + '@babel/compat-data@7.25.9': + resolution: {integrity: sha512-yD+hEuJ/+wAJ4Ox2/rpNv5HIuPG82x3ZlQvYVn8iYCprdxzE7P1udpGF1jyjQVBU4dgznN+k2h103vxZ7NdPyw==} engines: {node: '>=6.9.0'} - '@babel/core@7.25.8': - resolution: {integrity: sha512-Oixnb+DzmRT30qu9d3tJSQkxuygWm32DFykT4bRoORPa9hZ/L4KhVB/XiRm6KG+roIEM7DBQlmg27kw2HZkdZg==} + '@babel/core@7.25.9': + resolution: {integrity: sha512-WYvQviPw+Qyib0v92AwNIrdLISTp7RfDkM7bPqBvpbnhY4wq8HvHBZREVdYDXk98C8BkOIVnHAY3yvj7AVISxQ==} engines: {node: '>=6.9.0'} - '@babel/generator@7.25.7': - resolution: {integrity: sha512-5Dqpl5fyV9pIAD62yK9P7fcA768uVPUyrQmqpqstHWgMma4feF1x/oFysBCVZLY5wJ2GkMUCdsNDnGZrPoR6rA==} + '@babel/generator@7.25.9': + resolution: {integrity: sha512-omlUGkr5EaoIJrhLf9CJ0TvjBRpd9+AXRG//0GEQ9THSo8wPiTlbpy1/Ow8ZTrbXpjd9FHXfbFQx32I04ht0FA==} engines: {node: '>=6.9.0'} - '@babel/helper-annotate-as-pure@7.25.7': - resolution: {integrity: sha512-4xwU8StnqnlIhhioZf1tqnVWeQ9pvH/ujS8hRfw/WOza+/a+1qv69BWNy+oY231maTCWgKWhfBU7kDpsds6zAA==} + '@babel/helper-annotate-as-pure@7.25.9': + resolution: {integrity: sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==} engines: {node: '>=6.9.0'} - '@babel/helper-builder-binary-assignment-operator-visitor@7.25.7': - resolution: {integrity: sha512-12xfNeKNH7jubQNm7PAkzlLwEmCs1tfuX3UjIw6vP6QXi+leKh6+LyC/+Ed4EIQermwd58wsyh070yjDHFlNGg==} + '@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.7': - resolution: {integrity: sha512-DniTEax0sv6isaw6qSQSfV4gVRNtw2rte8HHM45t9ZR0xILaufBRNkpMifCRiAPyvL4ACD6v0gfCwCmtOQaV4A==} + '@babel/helper-compilation-targets@7.25.9': + resolution: {integrity: sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==} engines: {node: '>=6.9.0'} - '@babel/helper-create-class-features-plugin@7.25.7': - resolution: {integrity: sha512-bD4WQhbkx80mAyj/WCm4ZHcF4rDxkoLFO6ph8/5/mQ3z4vAzltQXAmbc7GvVJx5H+lk5Mi5EmbTeox5nMGCsbw==} + '@babel/helper-create-class-features-plugin@7.25.9': + resolution: {integrity: sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-create-regexp-features-plugin@7.25.7': - resolution: {integrity: sha512-byHhumTj/X47wJ6C6eLpK7wW/WBEcnUeb7D0FNc/jFQnQVw7DOso3Zz5u9x/zLrFVkHa89ZGDbkAa1D54NdrCQ==} + '@babel/helper-create-regexp-features-plugin@7.25.9': + resolution: {integrity: sha512-ORPNZ3h6ZRkOyAa/SaHU+XsLZr0UQzRwuDQ0cczIA17nAzZ+85G5cVkOJIj7QavLZGSe8QXUmNFxSZzjcZF9bw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -486,103 +486,103 @@ packages: peerDependencies: '@babel/core': ^7.4.0 || ^8.0.0-0 <8.0.0 - '@babel/helper-member-expression-to-functions@7.25.7': - resolution: {integrity: sha512-O31Ssjd5K6lPbTX9AAYpSKrZmLeagt9uwschJd+Ixo6QiRyfpvgtVQp8qrDR9UNFjZ8+DO34ZkdrN+BnPXemeA==} + '@babel/helper-member-expression-to-functions@7.25.9': + resolution: {integrity: sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==} engines: {node: '>=6.9.0'} - '@babel/helper-module-imports@7.25.7': - resolution: {integrity: sha512-o0xCgpNmRohmnoWKQ0Ij8IdddjyBFE4T2kagL/x6M3+4zUgc+4qTOUBoNe4XxDskt1HPKO007ZPiMgLDq2s7Kw==} + '@babel/helper-module-imports@7.25.9': + resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.25.7': - resolution: {integrity: sha512-k/6f8dKG3yDz/qCwSM+RKovjMix563SLxQFo0UhRNo239SP6n9u5/eLtKD6EAjwta2JHJ49CsD8pms2HdNiMMQ==} + '@babel/helper-module-transforms@7.25.9': + resolution: {integrity: sha512-TvLZY/F3+GvdRYFZFyxMvnsKi+4oJdgZzU3BoGN9Uc2d9C6zfNwJcKKhjqLAhK8i46mv93jsO74fDh3ih6rpHA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-optimise-call-expression@7.25.7': - resolution: {integrity: sha512-VAwcwuYhv/AT+Vfr28c9y6SHzTan1ryqrydSTFGjU0uDJHw3uZ+PduI8plCLkRsDnqK2DMEDmwrOQRsK/Ykjng==} + '@babel/helper-optimise-call-expression@7.25.9': + resolution: {integrity: sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==} engines: {node: '>=6.9.0'} - '@babel/helper-plugin-utils@7.25.7': - resolution: {integrity: sha512-eaPZai0PiqCi09pPs3pAFfl/zYgGaE6IdXtYvmf0qlcDTd3WCtO7JWCcRd64e0EQrcYgiHibEZnOGsSY4QSgaw==} + '@babel/helper-plugin-utils@7.25.9': + resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} engines: {node: '>=6.9.0'} - '@babel/helper-remap-async-to-generator@7.25.7': - resolution: {integrity: sha512-kRGE89hLnPfcz6fTrlNU+uhgcwv0mBE4Gv3P9Ke9kLVJYpi4AMVVEElXvB5CabrPZW4nCM8P8UyyjrzCM0O2sw==} + '@babel/helper-remap-async-to-generator@7.25.9': + resolution: {integrity: sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-replace-supers@7.25.7': - resolution: {integrity: sha512-iy8JhqlUW9PtZkd4pHM96v6BdJ66Ba9yWSE4z0W4TvSZwLBPkyDsiIU3ENe4SmrzRBs76F7rQXTy1lYC49n6Lw==} + '@babel/helper-replace-supers@7.25.9': + resolution: {integrity: sha512-IiDqTOTBQy0sWyeXyGSC5TBJpGFXBkRynjBeXsvbhQFKj2viwJC76Epz35YLU1fpe/Am6Vppb7W7zM4fPQzLsQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/helper-simple-access@7.25.7': - resolution: {integrity: sha512-FPGAkJmyoChQeM+ruBGIDyrT2tKfZJO8NcxdC+CWNJi7N8/rZpSxK7yvBJ5O/nF1gfu5KzN7VKG3YVSLFfRSxQ==} + '@babel/helper-simple-access@7.25.9': + resolution: {integrity: sha512-c6WHXuiaRsJTyHYLJV75t9IqsmTbItYfdj99PnzYGQZkYKvan5/2jKJ7gu31J3/BJ/A18grImSPModuyG/Eo0Q==} engines: {node: '>=6.9.0'} - '@babel/helper-skip-transparent-expression-wrappers@7.25.7': - resolution: {integrity: sha512-pPbNbchZBkPMD50K0p3JGcFMNLVUCuU/ABybm/PGNj4JiHrpmNyqqCphBk4i19xXtNV0JhldQJJtbSW5aUvbyA==} + '@babel/helper-skip-transparent-expression-wrappers@7.25.9': + resolution: {integrity: sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==} engines: {node: '>=6.9.0'} - '@babel/helper-string-parser@7.25.7': - resolution: {integrity: sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==} + '@babel/helper-string-parser@7.25.9': + resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.25.7': - resolution: {integrity: sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==} + '@babel/helper-validator-identifier@7.25.9': + resolution: {integrity: sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.25.7': - resolution: {integrity: sha512-ytbPLsm+GjArDYXJ8Ydr1c/KJuutjF2besPNbIZnZ6MKUxi/uTA22t2ymmA4WFjZFpjiAMO0xuuJPqK2nvDVfQ==} + '@babel/helper-validator-option@7.25.9': + resolution: {integrity: sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==} engines: {node: '>=6.9.0'} - '@babel/helper-wrap-function@7.25.7': - resolution: {integrity: sha512-MA0roW3JF2bD1ptAaJnvcabsVlNQShUaThyJbCDD4bCp8NEgiFvpoqRI2YS22hHlc2thjO/fTg2ShLMC3jygAg==} + '@babel/helper-wrap-function@7.25.9': + resolution: {integrity: sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.25.7': - resolution: {integrity: sha512-Sv6pASx7Esm38KQpF/U/OXLwPPrdGHNKoeblRxgZRLXnAtnkEe4ptJPDtAZM7fBLadbc1Q07kQpSiGQ0Jg6tRA==} + '@babel/helpers@7.25.9': + resolution: {integrity: sha512-oKWp3+usOJSzDZOucZUAMayhPz/xVjzymyDzUN8dk0Wd3RWMlGLXi07UCQ/CgQVb8LvXx3XBajJH4XGgkt7H7g==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.25.7': - resolution: {integrity: sha512-iYyACpW3iW8Fw+ZybQK+drQre+ns/tKpXbNESfrhNnPLIklLbXr7MYJ6gPEd0iETGLOK+SxMjVvKb/ffmk+FEw==} + '@babel/highlight@7.25.9': + resolution: {integrity: sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.25.8': - resolution: {integrity: sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==} + '@babel/parser@7.25.9': + resolution: {integrity: sha512-aI3jjAAO1fh7vY/pBGsn1i9LDbRP43+asrRlkPuTXW5yHXtd1NgTEMudbBoDDxrf1daEEfPJqR+JBMakzrR4Dg==} engines: {node: '>=6.0.0'} hasBin: true - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.7': - resolution: {integrity: sha512-UV9Lg53zyebzD1DwQoT9mzkEKa922LNUp5YkTJ6Uta0RbyXaQNUgcvSt7qIu1PpPzVb6rd10OVNTzkyBGeVmxQ==} + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9': + resolution: {integrity: sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.7': - resolution: {integrity: sha512-GDDWeVLNxRIkQTnJn2pDOM1pkCgYdSqPeT1a9vh9yIqu2uzzgw1zcqEb+IJOhy+dTBMlNdThrDIksr2o09qrrQ==} + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9': + resolution: {integrity: sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.7': - resolution: {integrity: sha512-wxyWg2RYaSUYgmd9MR0FyRGyeOMQE/Uzr1wzd/g5cf5bwi9A4v6HFdDm7y1MgDtod/fLOSTZY6jDgV0xU9d5bA==} + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9': + resolution: {integrity: sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.7': - resolution: {integrity: sha512-Xwg6tZpLxc4iQjorYsyGMyfJE7nP5MV8t/Ka58BgiA7Jw0fRqQNcANlLfdJ/yvBt9z9LD2We+BEkT7vLqZRWng==} + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9': + resolution: {integrity: sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.13.0 - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.7': - resolution: {integrity: sha512-UVATLMidXrnH+GMUIuxq55nejlj02HP7F5ETyBONzP6G87fPBogG4CH6kxrSrdIuAjdwNO9VzyaYsrZPscWUrw==} + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9': + resolution: {integrity: sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -593,26 +593,26 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-assertions@7.25.7': - resolution: {integrity: sha512-ZvZQRmME0zfJnDQnVBKYzHxXT7lYBB3Revz1GuS7oLXWMgqUPX4G+DDbT30ICClht9WKV34QVrZhSw6WdklwZQ==} + '@babel/plugin-syntax-import-assertions@7.25.9': + resolution: {integrity: sha512-4GHX5uzr5QMOOuzV0an9MFju4hKlm0OyePl/lHhcsTVae5t/IKVHnb8W67Vr6FuLlk5lPqLB7n7O+K5R46emYg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-attributes@7.25.7': - resolution: {integrity: sha512-AqVo+dguCgmpi/3mYBdu9lkngOBlQ2w2vnNpa6gfiCxQZLzV4ZbhsXitJ2Yblkoe1VQwtHSaNmIaGll/26YWRw==} + '@babel/plugin-syntax-import-attributes@7.25.9': + resolution: {integrity: sha512-u3EN9ub8LyYvgTnrgp8gboElouayiwPdnM7x5tcnW3iSt09/lQYPwMNK40I9IUxo7QOZhAsPHCmmuO7EPdruqg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-jsx@7.25.7': - resolution: {integrity: sha512-ruZOnKO+ajVL/MVx+PwNBPOkrnXTXoWMtte1MBpegfCArhqOe3Bj52avVj1huLLxNKYKXYaSxZ2F+woK1ekXfw==} + '@babel/plugin-syntax-jsx@7.25.9': + resolution: {integrity: sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-typescript@7.25.7': - resolution: {integrity: sha512-rR+5FDjpCHqqZN2bzZm18bVYGaejGq5ZkpVCJLXor/+zlSrSoc4KWcHI0URVWjl/68Dyr1uwZUz/1njycEAv9g==} + '@babel/plugin-syntax-typescript@7.25.9': + resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -623,302 +623,302 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-arrow-functions@7.25.7': - resolution: {integrity: sha512-EJN2mKxDwfOUCPxMO6MUI58RN3ganiRAG/MS/S3HfB6QFNjroAMelQo/gybyYq97WerCBAZoyrAoW8Tzdq2jWg==} + '@babel/plugin-transform-arrow-functions@7.25.9': + resolution: {integrity: sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-generator-functions@7.25.8': - resolution: {integrity: sha512-9ypqkozyzpG+HxlH4o4gdctalFGIjjdufzo7I2XPda0iBnZ6a+FO0rIEQcdSPXp02CkvGsII1exJhmROPQd5oA==} + '@babel/plugin-transform-async-generator-functions@7.25.9': + resolution: {integrity: sha512-RXV6QAzTBbhDMO9fWwOmwwTuYaiPbggWQ9INdZqAYeSHyG7FzQ+nOZaUUjNwKv9pV3aE4WFqFm1Hnbci5tBCAw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-async-to-generator@7.25.7': - resolution: {integrity: sha512-ZUCjAavsh5CESCmi/xCpX1qcCaAglzs/7tmuvoFnJgA1dM7gQplsguljoTg+Ru8WENpX89cQyAtWoaE0I3X3Pg==} + '@babel/plugin-transform-async-to-generator@7.25.9': + resolution: {integrity: sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoped-functions@7.25.7': - resolution: {integrity: sha512-xHttvIM9fvqW+0a3tZlYcZYSBpSWzGBFIt/sYG3tcdSzBB8ZeVgz2gBP7Df+sM0N1850jrviYSSeUuc+135dmQ==} + '@babel/plugin-transform-block-scoped-functions@7.25.9': + resolution: {integrity: sha512-toHc9fzab0ZfenFpsyYinOX0J/5dgJVA2fm64xPewu7CoYHWEivIWKxkK2rMi4r3yQqLnVmheMXRdG+k239CgA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-block-scoping@7.25.7': - resolution: {integrity: sha512-ZEPJSkVZaeTFG/m2PARwLZQ+OG0vFIhPlKHK/JdIMy8DbRJ/htz6LRrTFtdzxi9EHmcwbNPAKDnadpNSIW+Aow==} + '@babel/plugin-transform-block-scoping@7.25.9': + resolution: {integrity: sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-properties@7.25.7': - resolution: {integrity: sha512-mhyfEW4gufjIqYFo9krXHJ3ElbFLIze5IDp+wQTxoPd+mwFb1NxatNAwmv8Q8Iuxv7Zc+q8EkiMQwc9IhyGf4g==} + '@babel/plugin-transform-class-properties@7.25.9': + resolution: {integrity: sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-static-block@7.25.8': - resolution: {integrity: sha512-e82gl3TCorath6YLf9xUwFehVvjvfqFhdOo4+0iVIVju+6XOi5XHkqB3P2AXnSwoeTX0HBoXq5gJFtvotJzFnQ==} + '@babel/plugin-transform-class-static-block@7.25.9': + resolution: {integrity: sha512-UIf+72C7YJ+PJ685/PpATbCz00XqiFEzHX5iysRwfvNT0Ko+FaXSvRgLytFSp8xUItrG9pFM/KoBBZDrY/cYyg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 - '@babel/plugin-transform-classes@7.25.7': - resolution: {integrity: sha512-9j9rnl+YCQY0IGoeipXvnk3niWicIB6kCsWRGLwX241qSXpbA4MKxtp/EdvFxsc4zI5vqfLxzOd0twIJ7I99zg==} + '@babel/plugin-transform-classes@7.25.9': + resolution: {integrity: sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-computed-properties@7.25.7': - resolution: {integrity: sha512-QIv+imtM+EtNxg/XBKL3hiWjgdLjMOmZ+XzQwSgmBfKbfxUjBzGgVPklUuE55eq5/uVoh8gg3dqlrwR/jw3ZeA==} + '@babel/plugin-transform-computed-properties@7.25.9': + resolution: {integrity: sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-destructuring@7.25.7': - resolution: {integrity: sha512-xKcfLTlJYUczdaM1+epcdh1UGewJqr9zATgrNHcLBcV2QmfvPPEixo/sK/syql9cEmbr7ulu5HMFG5vbbt/sEA==} + '@babel/plugin-transform-destructuring@7.25.9': + resolution: {integrity: sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-dotall-regex@7.25.7': - resolution: {integrity: sha512-kXzXMMRzAtJdDEgQBLF4oaiT6ZCU3oWHgpARnTKDAqPkDJ+bs3NrZb310YYevR5QlRo3Kn7dzzIdHbZm1VzJdQ==} + '@babel/plugin-transform-dotall-regex@7.25.9': + resolution: {integrity: sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-duplicate-keys@7.25.7': - resolution: {integrity: sha512-by+v2CjoL3aMnWDOyCIg+yxU9KXSRa9tN6MbqggH5xvymmr9p4AMjYkNlQy4brMceBnUyHZ9G8RnpvT8wP7Cfg==} + '@babel/plugin-transform-duplicate-keys@7.25.9': + resolution: {integrity: sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.7': - resolution: {integrity: sha512-HvS6JF66xSS5rNKXLqkk7L9c/jZ/cdIVIcoPVrnl8IsVpLggTjXs8OWekbLHs/VtYDDh5WXnQyeE3PPUGm22MA==} + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9': + resolution: {integrity: sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-dynamic-import@7.25.8': - resolution: {integrity: sha512-gznWY+mr4ZQL/EWPcbBQUP3BXS5FwZp8RUOw06BaRn8tQLzN4XLIxXejpHN9Qo8x8jjBmAAKp6FoS51AgkSA/A==} + '@babel/plugin-transform-dynamic-import@7.25.9': + resolution: {integrity: sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-exponentiation-operator@7.25.7': - resolution: {integrity: sha512-yjqtpstPfZ0h/y40fAXRv2snciYr0OAoMXY/0ClC7tm4C/nG5NJKmIItlaYlLbIVAWNfrYuy9dq1bE0SbX0PEg==} + '@babel/plugin-transform-exponentiation-operator@7.25.9': + resolution: {integrity: sha512-KRhdhlVk2nObA5AYa7QMgTMTVJdfHprfpAk4DjZVtllqRg9qarilstTKEhpVjyt+Npi8ThRyiV8176Am3CodPA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-export-namespace-from@7.25.8': - resolution: {integrity: sha512-sPtYrduWINTQTW7FtOy99VCTWp4H23UX7vYcut7S4CIMEXU+54zKX9uCoGkLsWXteyaMXzVHgzWbLfQ1w4GZgw==} + '@babel/plugin-transform-export-namespace-from@7.25.9': + resolution: {integrity: sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-for-of@7.25.7': - resolution: {integrity: sha512-n/TaiBGJxYFWvpJDfsxSj9lEEE44BFM1EPGz4KEiTipTgkoFVVcCmzAL3qA7fdQU96dpo4gGf5HBx/KnDvqiHw==} + '@babel/plugin-transform-for-of@7.25.9': + resolution: {integrity: sha512-LqHxduHoaGELJl2uhImHwRQudhCM50pT46rIBNvtT/Oql3nqiS3wOwP+5ten7NpYSXrrVLgtZU3DZmPtWZo16A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-function-name@7.25.7': - resolution: {integrity: sha512-5MCTNcjCMxQ63Tdu9rxyN6cAWurqfrDZ76qvVPrGYdBxIj+EawuuxTu/+dgJlhK5eRz3v1gLwp6XwS8XaX2NiQ==} + '@babel/plugin-transform-function-name@7.25.9': + resolution: {integrity: sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-json-strings@7.25.8': - resolution: {integrity: sha512-4OMNv7eHTmJ2YXs3tvxAfa/I43di+VcF+M4Wt66c88EAED1RoGaf1D64cL5FkRpNL+Vx9Hds84lksWvd/wMIdA==} + '@babel/plugin-transform-json-strings@7.25.9': + resolution: {integrity: sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-literals@7.25.7': - resolution: {integrity: sha512-fwzkLrSu2fESR/cm4t6vqd7ebNIopz2QHGtjoU+dswQo/P6lwAG04Q98lliE3jkz/XqnbGFLnUcE0q0CVUf92w==} + '@babel/plugin-transform-literals@7.25.9': + resolution: {integrity: sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-logical-assignment-operators@7.25.8': - resolution: {integrity: sha512-f5W0AhSbbI+yY6VakT04jmxdxz+WsID0neG7+kQZbCOjuyJNdL5Nn4WIBm4hRpKnUcO9lP0eipUhFN12JpoH8g==} + '@babel/plugin-transform-logical-assignment-operators@7.25.9': + resolution: {integrity: sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-member-expression-literals@7.25.7': - resolution: {integrity: sha512-Std3kXwpXfRV0QtQy5JJcRpkqP8/wG4XL7hSKZmGlxPlDqmpXtEPRmhF7ztnlTCtUN3eXRUJp+sBEZjaIBVYaw==} + '@babel/plugin-transform-member-expression-literals@7.25.9': + resolution: {integrity: sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-amd@7.25.7': - resolution: {integrity: sha512-CgselSGCGzjQvKzghCvDTxKHP3iooenLpJDO842ehn5D2G5fJB222ptnDwQho0WjEvg7zyoxb9P+wiYxiJX5yA==} + '@babel/plugin-transform-modules-amd@7.25.9': + resolution: {integrity: sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-commonjs@7.25.7': - resolution: {integrity: sha512-L9Gcahi0kKFYXvweO6n0wc3ZG1ChpSFdgG+eV1WYZ3/dGbJK7vvk91FgGgak8YwRgrCuihF8tE/Xg07EkL5COg==} + '@babel/plugin-transform-modules-commonjs@7.25.9': + resolution: {integrity: sha512-dwh2Ol1jWwL2MgkCzUSOvfmKElqQcuswAZypBSUsScMXvgdT8Ekq5YA6TtqpTVWH+4903NmboMuH1o9i8Rxlyg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-systemjs@7.25.7': - resolution: {integrity: sha512-t9jZIvBmOXJsiuyOwhrIGs8dVcD6jDyg2icw1VL4A/g+FnWyJKwUfSSU2nwJuMV2Zqui856El9u+ElB+j9fV1g==} + '@babel/plugin-transform-modules-systemjs@7.25.9': + resolution: {integrity: sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-modules-umd@7.25.7': - resolution: {integrity: sha512-p88Jg6QqsaPh+EB7I9GJrIqi1Zt4ZBHUQtjw3z1bzEXcLh6GfPqzZJ6G+G1HBGKUNukT58MnKG7EN7zXQBCODw==} + '@babel/plugin-transform-modules-umd@7.25.9': + resolution: {integrity: sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-named-capturing-groups-regex@7.25.7': - resolution: {integrity: sha512-BtAT9LzCISKG3Dsdw5uso4oV1+v2NlVXIIomKJgQybotJY3OwCwJmkongjHgwGKoZXd0qG5UZ12JUlDQ07W6Ow==} + '@babel/plugin-transform-named-capturing-groups-regex@7.25.9': + resolution: {integrity: sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 - '@babel/plugin-transform-new-target@7.25.7': - resolution: {integrity: sha512-CfCS2jDsbcZaVYxRFo2qtavW8SpdzmBXC2LOI4oO0rP+JSRDxxF3inF4GcPsLgfb5FjkhXG5/yR/lxuRs2pySA==} + '@babel/plugin-transform-new-target@7.25.9': + resolution: {integrity: sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-nullish-coalescing-operator@7.25.8': - resolution: {integrity: sha512-Z7WJJWdQc8yCWgAmjI3hyC+5PXIubH9yRKzkl9ZEG647O9szl9zvmKLzpbItlijBnVhTUf1cpyWBsZ3+2wjWPQ==} + '@babel/plugin-transform-nullish-coalescing-operator@7.25.9': + resolution: {integrity: sha512-ENfftpLZw5EItALAD4WsY/KUWvhUlZndm5GC7G3evUsVeSJB6p0pBeLQUnRnBCBx7zV0RKQjR9kCuwrsIrjWog==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-numeric-separator@7.25.8': - resolution: {integrity: sha512-rm9a5iEFPS4iMIy+/A/PiS0QN0UyjPIeVvbU5EMZFKJZHt8vQnasbpo3T3EFcxzCeYO0BHfc4RqooCZc51J86Q==} + '@babel/plugin-transform-numeric-separator@7.25.9': + resolution: {integrity: sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-rest-spread@7.25.8': - resolution: {integrity: sha512-LkUu0O2hnUKHKE7/zYOIjByMa4VRaV2CD/cdGz0AxU9we+VA3kDDggKEzI0Oz1IroG+6gUP6UmWEHBMWZU316g==} + '@babel/plugin-transform-object-rest-spread@7.25.9': + resolution: {integrity: sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-object-super@7.25.7': - resolution: {integrity: sha512-pWT6UXCEW3u1t2tcAGtE15ornCBvopHj9Bps9D2DsH15APgNVOTwwczGckX+WkAvBmuoYKRCFa4DK+jM8vh5AA==} + '@babel/plugin-transform-object-super@7.25.9': + resolution: {integrity: sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-catch-binding@7.25.8': - resolution: {integrity: sha512-EbQYweoMAHOn7iJ9GgZo14ghhb9tTjgOc88xFgYngifx7Z9u580cENCV159M4xDh3q/irbhSjZVpuhpC2gKBbg==} + '@babel/plugin-transform-optional-catch-binding@7.25.9': + resolution: {integrity: sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-optional-chaining@7.25.8': - resolution: {integrity: sha512-q05Bk7gXOxpTHoQ8RSzGSh/LHVB9JEIkKnk3myAWwZHnYiTGYtbdrYkIsS8Xyh4ltKf7GNUSgzs/6P2bJtBAQg==} + '@babel/plugin-transform-optional-chaining@7.25.9': + resolution: {integrity: sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-parameters@7.25.7': - resolution: {integrity: sha512-FYiTvku63me9+1Nz7TOx4YMtW3tWXzfANZtrzHhUZrz4d47EEtMQhzFoZWESfXuAMMT5mwzD4+y1N8ONAX6lMQ==} + '@babel/plugin-transform-parameters@7.25.9': + resolution: {integrity: sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-methods@7.25.7': - resolution: {integrity: sha512-KY0hh2FluNxMLwOCHbxVOKfdB5sjWG4M183885FmaqWWiGMhRZq4DQRKH6mHdEucbJnyDyYiZNwNG424RymJjA==} + '@babel/plugin-transform-private-methods@7.25.9': + resolution: {integrity: sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-private-property-in-object@7.25.8': - resolution: {integrity: sha512-8Uh966svuB4V8RHHg0QJOB32QK287NBksJOByoKmHMp1TAobNniNalIkI2i5IPj5+S9NYCG4VIjbEuiSN8r+ow==} + '@babel/plugin-transform-private-property-in-object@7.25.9': + resolution: {integrity: sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-property-literals@7.25.7': - resolution: {integrity: sha512-lQEeetGKfFi0wHbt8ClQrUSUMfEeI3MMm74Z73T9/kuz990yYVtfofjf3NuA42Jy3auFOpbjDyCSiIkTs1VIYw==} + '@babel/plugin-transform-property-literals@7.25.9': + resolution: {integrity: sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-regenerator@7.25.7': - resolution: {integrity: sha512-mgDoQCRjrY3XK95UuV60tZlFCQGXEtMg8H+IsW72ldw1ih1jZhzYXbJvghmAEpg5UVhhnCeia1CkGttUvCkiMQ==} + '@babel/plugin-transform-regenerator@7.25.9': + resolution: {integrity: sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-reserved-words@7.25.7': - resolution: {integrity: sha512-3OfyfRRqiGeOvIWSagcwUTVk2hXBsr/ww7bLn6TRTuXnexA+Udov2icFOxFX9abaj4l96ooYkcNN1qi2Zvqwng==} + '@babel/plugin-transform-reserved-words@7.25.9': + resolution: {integrity: sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-shorthand-properties@7.25.7': - resolution: {integrity: sha512-uBbxNwimHi5Bv3hUccmOFlUy3ATO6WagTApenHz9KzoIdn0XeACdB12ZJ4cjhuB2WSi80Ez2FWzJnarccriJeA==} + '@babel/plugin-transform-shorthand-properties@7.25.9': + resolution: {integrity: sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-spread@7.25.7': - resolution: {integrity: sha512-Mm6aeymI0PBh44xNIv/qvo8nmbkpZze1KvR8MkEqbIREDxoiWTi18Zr2jryfRMwDfVZF9foKh060fWgni44luw==} + '@babel/plugin-transform-spread@7.25.9': + resolution: {integrity: sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-sticky-regex@7.25.7': - resolution: {integrity: sha512-ZFAeNkpGuLnAQ/NCsXJ6xik7Id+tHuS+NT+ue/2+rn/31zcdnupCdmunOizEaP0JsUmTFSTOPoQY7PkK2pttXw==} + '@babel/plugin-transform-sticky-regex@7.25.9': + resolution: {integrity: sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-template-literals@7.25.7': - resolution: {integrity: sha512-SI274k0nUsFFmyQupiO7+wKATAmMFf8iFgq2O+vVFXZ0SV9lNfT1NGzBEhjquFmD8I9sqHLguH+gZVN3vww2AA==} + '@babel/plugin-transform-template-literals@7.25.9': + resolution: {integrity: sha512-o97AE4syN71M/lxrCtQByzphAdlYluKPDBzDVzMmfCobUjjhAryZV0AIpRPrxN0eAkxXO6ZLEScmt+PNhj2OTw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typeof-symbol@7.25.7': - resolution: {integrity: sha512-OmWmQtTHnO8RSUbL0NTdtpbZHeNTnm68Gj5pA4Y2blFNh+V4iZR68V1qL9cI37J21ZN7AaCnkfdHtLExQPf2uA==} + '@babel/plugin-transform-typeof-symbol@7.25.9': + resolution: {integrity: sha512-v61XqUMiueJROUv66BVIOi0Fv/CUuZuZMl5NkRoCVxLAnMexZ0A3kMe7vvZ0nulxMuMp0Mk6S5hNh48yki08ZA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-typescript@7.25.7': - resolution: {integrity: sha512-VKlgy2vBzj8AmEzunocMun2fF06bsSWV+FvVXohtL6FGve/+L217qhHxRTVGHEDO/YR8IANcjzgJsd04J8ge5Q==} + '@babel/plugin-transform-typescript@7.25.9': + resolution: {integrity: sha512-7PbZQZP50tzv2KGGnhh82GSyMB01yKY9scIjf1a+GfZCtInOWqUH5+1EBU4t9fyR5Oykkkc9vFTs4OHrhHXljQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-escapes@7.25.7': - resolution: {integrity: sha512-BN87D7KpbdiABA+t3HbVqHzKWUDN3dymLaTnPFAMyc8lV+KN3+YzNhVRNdinaCPA4AUqx7ubXbQ9shRjYBl3SQ==} + '@babel/plugin-transform-unicode-escapes@7.25.9': + resolution: {integrity: sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-property-regex@7.25.7': - resolution: {integrity: sha512-IWfR89zcEPQGB/iB408uGtSPlQd3Jpq11Im86vUgcmSTcoWAiQMCTOa2K2yNNqFJEBVICKhayctee65Ka8OB0w==} + '@babel/plugin-transform-unicode-property-regex@7.25.9': + resolution: {integrity: sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-regex@7.25.7': - resolution: {integrity: sha512-8JKfg/hiuA3qXnlLx8qtv5HWRbgyFx2hMMtpDDuU2rTckpKkGu4ycK5yYHwuEa16/quXfoxHBIApEsNyMWnt0g==} + '@babel/plugin-transform-unicode-regex@7.25.9': + resolution: {integrity: sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-unicode-sets-regex@7.25.7': - resolution: {integrity: sha512-YRW8o9vzImwmh4Q3Rffd09bH5/hvY0pxg+1H1i0f7APoUeg12G7+HhLj9ZFNIrYkgBXhIijPJ+IXypN0hLTIbw==} + '@babel/plugin-transform-unicode-sets-regex@7.25.9': + resolution: {integrity: sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -934,30 +934,30 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 - '@babel/preset-typescript@7.25.7': - resolution: {integrity: sha512-rkkpaXJZOFN45Fb+Gki0c+KMIglk4+zZXOoMJuyEK8y8Kkc8Jd3BDmP7qPsz0zQMJj+UD7EprF+AqAXcILnexw==} + '@babel/preset-typescript@7.25.9': + resolution: {integrity: sha512-XWxw1AcKk36kgxf4C//fl0ikjLeqGUWn062/Fd8GtpTfDJOX6Ud95FK+4JlDA36BX4bNGndXi3a6Vr4Jo5/61A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/runtime-corejs2@7.25.7': - resolution: {integrity: sha512-xdsLBlDCJIZzwH1fBJ7GJu+bRFO0Sqv10WotmwMu83Joep1erPcWbTr84rZD42kPzSjtmrFgshdWHKfQTWOsng==} + '@babel/runtime-corejs2@7.25.9': + resolution: {integrity: sha512-pNsdrY8b2mxWmnyERkYBI38JB+aGsMr4vNwrtcj0kuXvPwAnRTQD+Rbm6G7qAmPPu+t0nTjP9FlxVznLtDoLjA==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.25.7': - resolution: {integrity: sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w==} + '@babel/runtime@7.25.9': + resolution: {integrity: sha512-4zpTHZ9Cm6L9L+uIqghQX8ZXg8HKFcjYO3qHoO8zTmRm6HQUJ8SSJ+KRvbMBZn0EGVlT4DRYeQ/6hjlyXBh+Kg==} engines: {node: '>=6.9.0'} - '@babel/template@7.25.7': - resolution: {integrity: sha512-wRwtAgI3bAS+JGU2upWNL9lSlDcRCqD05BZ1n3X2ONLH1WilFP6O1otQjeMK/1g0pvYcXC7b/qVUB1keofjtZA==} + '@babel/template@7.25.9': + resolution: {integrity: sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==} engines: {node: '>=6.9.0'} - '@babel/traverse@7.25.7': - resolution: {integrity: sha512-jatJPT1Zjqvh/1FyJs6qAHL+Dzb7sTb+xr7Q+gM1b+1oBsMsQQ4FkVKb6dFlJvLlVssqkRzV05Jzervt9yhnzg==} + '@babel/traverse@7.25.9': + resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.8': - resolution: {integrity: sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==} + '@babel/types@7.25.9': + resolution: {integrity: sha512-OwS2CM5KocvQ/k7dFJa8i5bNGJP0hXWfVCfDkqRFP1IreH1JDC7wG6eCYCi0+McbfT8OR/kNqsI0UU0xP9H6PQ==} engines: {node: '>=6.9.0'} '@bcoe/v8-coverage@0.2.3': @@ -2756,8 +2756,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.42: - resolution: {integrity: sha512-gIfKavKDw1mhvic9nbzA5lZw8QSHpdMwLwXc0cWidQz9B15pDoDdDH4boIatuFfeoCatb3a/NGL6CYRVFxGZ9g==} + electron-to-chromium@1.5.43: + resolution: {integrity: sha512-NxnmFBHDl5Sachd2P46O7UJiMaMHMLSofoIWVJq3mj8NJgG0umiSeljAVP9lGzjI0UDLJJ5jjoGjcrB8RSbjLQ==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -5253,8 +5253,8 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.53: - resolution: {integrity: sha512-IleS872aGdTB/UtocD2dSZBnQi/nqMIZxxezVgfcKKjw6+G2hJGzFw9buIDJO2MVJyEJe3rCAdyMTl2yvGMMrQ==} + tldts-core@6.1.54: + resolution: {integrity: sha512-5cc42+0G0EjYRDfIJHKraaT3I5kPm7j6or3Zh1T9sF+Ftj1T+isT4thicUyQQ1bwN7/xjHQIuY2fXCoXP8Haqg==} tldts@6.1.53: resolution: {integrity: sha512-4uCStuOjPFaY2/LUjTSwdnJTC82W/gvSFL6FoTC9ehNOHboA9cyO3wX1erh2yGofVls37OdXr5sQLEfL5hS1TA==} @@ -5264,10 +5264,6 @@ packages: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} - to-fast-properties@2.0.0: - resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} - engines: {node: '>=4'} - to-no-case@1.0.2: resolution: {integrity: sha512-Z3g735FxuZY8rodxV4gH7LxClE4H0hTIyHNIHdk+vpQxjLm0cwnKXq/OFVZ76SOQmto7txVcwSCwkU5kqp+FKg==} @@ -5549,8 +5545,8 @@ packages: vite: optional: true - vite@5.4.9: - resolution: {integrity: sha512-20OVpJHh0PAM0oSOELa5GaZNWeDjcAvQjGXy2Uyr+Tp+/D2/Hdz6NLgpJLsarPTA2QJ6v8mX2P1ZfbsSKvdMkg==} + vite@5.4.10: + resolution: {integrity: sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -5810,27 +5806,27 @@ snapshots: '@babel/code-frame@7.0.0': dependencies: - '@babel/highlight': 7.25.7 + '@babel/highlight': 7.25.9 - '@babel/code-frame@7.25.7': + '@babel/code-frame@7.25.9': dependencies: - '@babel/highlight': 7.25.7 + '@babel/highlight': 7.25.9 picocolors: 1.1.1 - '@babel/compat-data@7.25.8': {} + '@babel/compat-data@7.25.9': {} - '@babel/core@7.25.8': + '@babel/core@7.25.9': dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.25.7 - '@babel/generator': 7.25.7 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helpers': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/code-frame': 7.25.9 + '@babel/generator': 7.25.9 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) + '@babel/helpers': 7.25.9 + '@babel/parser': 7.25.9 + '@babel/template': 7.25.9 + '@babel/traverse': 7.25.9 + '@babel/types': 7.25.9 convert-source-map: 2.0.0 debug: 4.3.7 gensync: 1.0.0-beta.2 @@ -5839,672 +5835,671 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.25.7': + '@babel/generator@7.25.9': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.9 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.0.2 - '@babel/helper-annotate-as-pure@7.25.7': + '@babel/helper-annotate-as-pure@7.25.9': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.9 - '@babel/helper-builder-binary-assignment-operator-visitor@7.25.7': + '@babel/helper-builder-binary-assignment-operator-visitor@7.25.9': dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/traverse': 7.25.9 + '@babel/types': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/helper-compilation-targets@7.25.7': + '@babel/helper-compilation-targets@7.25.9': dependencies: - '@babel/compat-data': 7.25.8 - '@babel/helper-validator-option': 7.25.7 + '@babel/compat-data': 7.25.9 + '@babel/helper-validator-option': 7.25.9 browserslist: 4.24.2 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.25.7(@babel/core@7.25.8)': + '@babel/helper-create-class-features-plugin@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-member-expression-to-functions': 7.25.7 - '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/core': 7.25.9 + '@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.25.9(@babel/core@7.25.9) + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/traverse': 7.25.9 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/helper-create-regexp-features-plugin@7.25.7(@babel/core@7.25.8)': + '@babel/helper-create-regexp-features-plugin@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-annotate-as-pure': 7.25.9 regexpu-core: 6.1.1 semver: 6.3.1 - '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.8)': + '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 debug: 4.3.7 lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: - supports-color - '@babel/helper-member-expression-to-functions@7.25.7': + '@babel/helper-member-expression-to-functions@7.25.9': dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/traverse': 7.25.9 + '@babel/types': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/helper-module-imports@7.25.7': + '@babel/helper-module-imports@7.25.9': dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/traverse': 7.25.9 + '@babel/types': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.25.7(@babel/core@7.25.8)': + '@babel/helper-module-transforms@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-simple-access': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-simple-access': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/helper-optimise-call-expression@7.25.7': + '@babel/helper-optimise-call-expression@7.25.9': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.9 - '@babel/helper-plugin-utils@7.25.7': {} + '@babel/helper-plugin-utils@7.25.9': {} - '@babel/helper-remap-async-to-generator@7.25.7(@babel/core@7.25.8)': + '@babel/helper-remap-async-to-generator@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-wrap-function': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-wrap-function': 7.25.9 + '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.25.7(@babel/core@7.25.8)': + '@babel/helper-replace-supers@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-member-expression-to-functions': 7.25.7 - '@babel/helper-optimise-call-expression': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-member-expression-to-functions': 7.25.9 + '@babel/helper-optimise-call-expression': 7.25.9 + '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/helper-simple-access@7.25.7': + '@babel/helper-simple-access@7.25.9': dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/traverse': 7.25.9 + '@babel/types': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/helper-skip-transparent-expression-wrappers@7.25.7': + '@babel/helper-skip-transparent-expression-wrappers@7.25.9': dependencies: - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/traverse': 7.25.9 + '@babel/types': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/helper-string-parser@7.25.7': {} + '@babel/helper-string-parser@7.25.9': {} - '@babel/helper-validator-identifier@7.25.7': {} + '@babel/helper-validator-identifier@7.25.9': {} - '@babel/helper-validator-option@7.25.7': {} + '@babel/helper-validator-option@7.25.9': {} - '@babel/helper-wrap-function@7.25.7': + '@babel/helper-wrap-function@7.25.9': dependencies: - '@babel/template': 7.25.7 - '@babel/traverse': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.9 + '@babel/traverse': 7.25.9 + '@babel/types': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/helpers@7.25.7': + '@babel/helpers@7.25.9': dependencies: - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 + '@babel/template': 7.25.9 + '@babel/types': 7.25.9 - '@babel/highlight@7.25.7': + '@babel/highlight@7.25.9': dependencies: - '@babel/helper-validator-identifier': 7.25.7 + '@babel/helper-validator-identifier': 7.25.9 chalk: 2.4.2 js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/parser@7.25.8': + '@babel/parser@7.25.9': dependencies: - '@babel/types': 7.25.8 + '@babel/types': 7.25.9 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/plugin-transform-optional-chaining': 7.25.8(@babel/core@7.25.8) + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.25.9) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.8)': + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 + '@babel/core': 7.25.9 - '@babel/plugin-syntax-import-assertions@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-syntax-import-assertions@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-import-attributes@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-syntax-import-attributes@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-jsx@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-typescript@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.8)': + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-arrow-functions@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-arrow-functions@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-async-generator-functions@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-async-generator-functions@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.8) - '@babel/traverse': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.25.9) + '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-async-to-generator@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-async-to-generator@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-imports': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-remap-async-to-generator': 7.25.7(@babel/core@7.25.8) + '@babel/core': 7.25.9 + '@babel/helper-module-imports': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.25.9) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-block-scoped-functions@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-block-scoped-functions@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-block-scoping@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-block-scoping@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-class-properties@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-class-properties@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-static-block@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-class-static-block@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-classes@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-classes@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) - '@babel/traverse': 7.25.7 + '@babel/core': 7.25.9 + '@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.25.9) + '@babel/traverse': 7.25.9 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-computed-properties@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-computed-properties@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/template': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/template': 7.25.9 - '@babel/plugin-transform-destructuring@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-destructuring@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-dotall-regex@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-dotall-regex@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-duplicate-keys@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-duplicate-keys@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-dynamic-import@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-dynamic-import@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-exponentiation-operator@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-exponentiation-operator@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-builder-binary-assignment-operator-visitor': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-builder-binary-assignment-operator-visitor': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-export-namespace-from@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-export-namespace-from@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-for-of@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-for-of@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-function-name@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-function-name@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-json-strings@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-json-strings@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-literals@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-literals@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-logical-assignment-operators@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-logical-assignment-operators@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-member-expression-literals@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-member-expression-literals@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-modules-amd@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-modules-amd@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-modules-commonjs@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-simple-access': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-simple-access': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-systemjs@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-modules-systemjs@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 - '@babel/traverse': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-umd@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-modules-umd@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-module-transforms': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-named-capturing-groups-regex@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-named-capturing-groups-regex@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-new-target@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-new-target@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-nullish-coalescing-operator@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-nullish-coalescing-operator@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-numeric-separator@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-numeric-separator@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-object-rest-spread@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-object-rest-spread@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.8) + '@babel/core': 7.25.9 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-object-super@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-object-super@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-replace-supers': 7.25.7(@babel/core@7.25.8) + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-replace-supers': 7.25.9(@babel/core@7.25.9) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-optional-catch-binding@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-optional-catch-binding@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-optional-chaining@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-optional-chaining@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-parameters@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-parameters@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-private-methods@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-private-methods@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-property-in-object@7.25.8(@babel/core@7.25.8)': + '@babel/plugin-transform-private-property-in-object@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-property-literals@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-property-literals@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-regenerator@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-regenerator@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 regenerator-transform: 0.15.2 - '@babel/plugin-transform-reserved-words@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-reserved-words@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-shorthand-properties@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-shorthand-properties@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-spread@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-spread@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-sticky-regex@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-sticky-regex@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-template-literals@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-template-literals@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-typeof-symbol@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-typeof-symbol@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-typescript@7.25.7(@babel/core@7.25.8)': + '@babel/plugin-transform-typescript@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-annotate-as-pure': 7.25.7 - '@babel/helper-create-class-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-skip-transparent-expression-wrappers': 7.25.7 - '@babel/plugin-syntax-typescript': 7.25.7(@babel/core@7.25.8) + '@babel/core': 7.25.9 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.25.9) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-unicode-escapes@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-unicode-property-regex@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-unicode-regex@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/plugin-transform-unicode-sets-regex@7.25.7(@babel/core@7.25.8)': - dependencies: - '@babel/core': 7.25.8 - '@babel/helper-create-regexp-features-plugin': 7.25.7(@babel/core@7.25.8) - '@babel/helper-plugin-utils': 7.25.7 - - '@babel/preset-env@7.25.8(@babel/core@7.25.8)': - dependencies: - '@babel/compat-data': 7.25.8 - '@babel/core': 7.25.8 - '@babel/helper-compilation-targets': 7.25.7 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-validator-option': 7.25.7 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.8) - '@babel/plugin-syntax-import-assertions': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-syntax-import-attributes': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.8) - '@babel/plugin-transform-arrow-functions': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-async-generator-functions': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-async-to-generator': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-block-scoped-functions': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-block-scoping': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-class-properties': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-class-static-block': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-classes': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-computed-properties': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-destructuring': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-dotall-regex': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-duplicate-keys': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-dynamic-import': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-exponentiation-operator': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-export-namespace-from': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-for-of': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-function-name': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-json-strings': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-literals': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-logical-assignment-operators': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-member-expression-literals': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-modules-amd': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-modules-systemjs': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-modules-umd': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-named-capturing-groups-regex': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-new-target': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-nullish-coalescing-operator': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-numeric-separator': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-object-rest-spread': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-object-super': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-optional-catch-binding': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-optional-chaining': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-parameters': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-private-methods': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-private-property-in-object': 7.25.8(@babel/core@7.25.8) - '@babel/plugin-transform-property-literals': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-regenerator': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-reserved-words': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-shorthand-properties': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-spread': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-sticky-regex': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-template-literals': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-typeof-symbol': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-unicode-escapes': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-unicode-property-regex': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-unicode-regex': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-unicode-sets-regex': 7.25.7(@babel/core@7.25.8) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.25.8) - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.8) - babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.8) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.8) + '@babel/plugin-transform-unicode-escapes@7.25.9(@babel/core@7.25.9)': + dependencies: + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-transform-unicode-property-regex@7.25.9(@babel/core@7.25.9)': + dependencies: + '@babel/core': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-transform-unicode-regex@7.25.9(@babel/core@7.25.9)': + dependencies: + '@babel/core': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/plugin-transform-unicode-sets-regex@7.25.9(@babel/core@7.25.9)': + dependencies: + '@babel/core': 7.25.9 + '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@babel/helper-plugin-utils': 7.25.9 + + '@babel/preset-env@7.25.8(@babel/core@7.25.9)': + dependencies: + '@babel/compat-data': 7.25.9 + '@babel/core': 7.25.9 + '@babel/helper-compilation-targets': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-validator-option': 7.25.9 + '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.9) + '@babel/plugin-syntax-import-assertions': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-syntax-import-attributes': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.9) + '@babel/plugin-transform-arrow-functions': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-async-generator-functions': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-async-to-generator': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-block-scoped-functions': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-block-scoping': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-class-properties': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-class-static-block': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-classes': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-computed-properties': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-destructuring': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-dotall-regex': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-duplicate-keys': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-dynamic-import': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-exponentiation-operator': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-export-namespace-from': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-for-of': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-function-name': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-json-strings': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-literals': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-logical-assignment-operators': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-member-expression-literals': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-modules-amd': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-modules-commonjs': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-modules-systemjs': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-modules-umd': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-named-capturing-groups-regex': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-new-target': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-nullish-coalescing-operator': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-numeric-separator': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-object-rest-spread': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-object-super': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-optional-catch-binding': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-private-methods': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-private-property-in-object': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-property-literals': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-regenerator': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-reserved-words': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-shorthand-properties': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-spread': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-sticky-regex': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-template-literals': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-typeof-symbol': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-unicode-escapes': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-unicode-property-regex': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-unicode-regex': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-unicode-sets-regex': 7.25.9(@babel/core@7.25.9) + '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.25.9) + babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.9) + babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.9) + babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@7.25.9) core-js-compat: 3.38.1 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.25.8)': + '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/types': 7.25.8 + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/types': 7.25.9 esutils: 2.0.3 - '@babel/preset-typescript@7.25.7(@babel/core@7.25.8)': + '@babel/preset-typescript@7.25.9(@babel/core@7.25.9)': dependencies: - '@babel/core': 7.25.8 - '@babel/helper-plugin-utils': 7.25.7 - '@babel/helper-validator-option': 7.25.7 - '@babel/plugin-syntax-jsx': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-modules-commonjs': 7.25.7(@babel/core@7.25.8) - '@babel/plugin-transform-typescript': 7.25.7(@babel/core@7.25.8) + '@babel/core': 7.25.9 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-validator-option': 7.25.9 + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-modules-commonjs': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-typescript': 7.25.9(@babel/core@7.25.9) transitivePeerDependencies: - supports-color - '@babel/runtime-corejs2@7.25.7': + '@babel/runtime-corejs2@7.25.9': dependencies: core-js: 2.6.12 regenerator-runtime: 0.14.1 - '@babel/runtime@7.25.7': + '@babel/runtime@7.25.9': dependencies: regenerator-runtime: 0.14.1 - '@babel/template@7.25.7': + '@babel/template@7.25.9': dependencies: - '@babel/code-frame': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/types': 7.25.8 + '@babel/code-frame': 7.25.9 + '@babel/parser': 7.25.9 + '@babel/types': 7.25.9 - '@babel/traverse@7.25.7': + '@babel/traverse@7.25.9': dependencies: - '@babel/code-frame': 7.25.7 - '@babel/generator': 7.25.7 - '@babel/parser': 7.25.8 - '@babel/template': 7.25.7 - '@babel/types': 7.25.8 + '@babel/code-frame': 7.25.9 + '@babel/generator': 7.25.9 + '@babel/parser': 7.25.9 + '@babel/template': 7.25.9 + '@babel/types': 7.25.9 debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.25.8': + '@babel/types@7.25.9': dependencies: - '@babel/helper-string-parser': 7.25.7 - '@babel/helper-validator-identifier': 7.25.7 - to-fast-properties: 2.0.0 + '@babel/helper-string-parser': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 '@bcoe/v8-coverage@0.2.3': {} @@ -7010,7 +7005,7 @@ snapshots: '@postlight/parser@2.2.3': dependencies: - '@babel/runtime-corejs2': 7.25.7 + '@babel/runtime-corejs2': 7.25.9 '@postlight/ci-failed-test-reporter': 1.0.26 cheerio: 0.22.0 difflib: https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed @@ -7663,27 +7658,27 @@ snapshots: b4a@1.6.7: {} - babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.8): + babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.9): dependencies: - '@babel/compat-data': 7.25.8 - '@babel/core': 7.25.8 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) + '@babel/compat-data': 7.25.9 + '@babel/core': 7.25.9 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.9) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.8): + babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.9): dependencies: - '@babel/core': 7.25.8 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) + '@babel/core': 7.25.9 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.9) core-js-compat: 3.38.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.8): + babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.9): dependencies: - '@babel/core': 7.25.8 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.8) + '@babel/core': 7.25.9 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.9) transitivePeerDependencies: - supports-color @@ -7764,7 +7759,7 @@ snapshots: browserslist@4.24.2: dependencies: caniuse-lite: 1.0.30001669 - electron-to-chromium: 1.5.42 + electron-to-chromium: 1.5.43 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -8305,7 +8300,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.42: {} + electron-to-chromium@1.5.43: {} ellipsize@0.1.0: {} @@ -8517,7 +8512,7 @@ snapshots: eslint-plugin-unicorn@56.0.0(eslint@9.13.0): dependencies: - '@babel/helper-validator-identifier': 7.25.7 + '@babel/helper-validator-identifier': 7.25.9 '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) ci-info: 4.0.0 clean-regexp: 1.0.0 @@ -9760,8 +9755,8 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.25.8 - '@babel/types': 7.25.8 + '@babel/parser': 7.25.9 + '@babel/types': 7.25.9 source-map-js: 1.2.1 mailparser@3.7.1: @@ -10302,7 +10297,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.25.7 + '@babel/code-frame': 7.25.9 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -10648,7 +10643,7 @@ snapshots: regenerator-transform@0.15.2: dependencies: - '@babel/runtime': 7.25.7 + '@babel/runtime': 7.25.9 regexp-tree@0.1.27: {} @@ -11183,18 +11178,16 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.53: {} + tldts-core@6.1.54: {} tldts@6.1.53: dependencies: - tldts-core: 6.1.53 + tldts-core: 6.1.54 tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 - to-fast-properties@2.0.0: {} - to-no-case@1.0.2: {} to-regex-range@5.0.1: @@ -11424,7 +11417,7 @@ snapshots: debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.7.8) + vite: 5.4.10(@types/node@22.7.8) transitivePeerDependencies: - '@types/node' - less @@ -11436,18 +11429,18 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.9(@types/node@22.7.8)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.7.8)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.9(@types/node@22.7.8) + vite: 5.4.10(@types/node@22.7.8) transitivePeerDependencies: - supports-color - typescript - vite@5.4.9(@types/node@22.7.8): + vite@5.4.10(@types/node@22.7.8): dependencies: esbuild: 0.21.5 postcss: 8.4.47 @@ -11474,7 +11467,7 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.9(@types/node@22.7.8) + vite: 5.4.10(@types/node@22.7.8) vite-node: 2.0.5(@types/node@22.7.8) why-is-node-running: 2.3.0 optionalDependencies: From 01c0e1c0019a4802c5be7aafc5d77a55d1f4d281 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Wed, 23 Oct 2024 18:22:30 +0800 Subject: [PATCH 239/740] chore: remove apnews topic popular category --- lib/routes/apnews/topics.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/apnews/topics.ts b/lib/routes/apnews/topics.ts index 66a31bd3a5fc41b..bd89c1ba353a7b8 100644 --- a/lib/routes/apnews/topics.ts +++ b/lib/routes/apnews/topics.ts @@ -6,7 +6,7 @@ const HOME_PAGE = 'https://apnews.com'; export const route: Route = { path: ['/topics/:topic?', '/nav/:nav{.*}?'], - categories: ['traditional-media', 'popular'], + categories: ['traditional-media'], example: '/apnews/topics/apf-topnews', view: ViewType.Articles, parameters: { From 686a21fc7a473d8b5061100d0841f02a5042e4af Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Wed, 23 Oct 2024 18:50:59 +0800 Subject: [PATCH 240/740] chore: add more popular social media routes --- lib/routes/douban/people/status.ts | 5 +++-- lib/routes/plurk/top.ts | 5 +++-- lib/routes/plurk/topic.ts | 5 +++-- lib/routes/plurk/user.ts | 5 +++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/routes/douban/people/status.ts b/lib/routes/douban/people/status.ts index ad996d63809187b..1138a426b9731f2 100644 --- a/lib/routes/douban/people/status.ts +++ b/lib/routes/douban/people/status.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import querystring from 'querystring'; import got from '@/utils/got'; @@ -6,7 +6,8 @@ import { fallback, queryToBoolean, queryToInteger } from '@/utils/readable-socia import { config } from '@/config'; export const route: Route = { path: '/people/:userid/status/:routeParams?', - categories: ['social-media'], + categories: ['social-media', 'popular'], + view: ViewType.SocialMedia, example: '/douban/people/75118396/status', parameters: { userid: '整数型用户 id', routeParams: '额外参数;见下' }, name: '用户广播', diff --git a/lib/routes/plurk/top.ts b/lib/routes/plurk/top.ts index 1ce1924a1774d1e..61e643b8ee6ba58 100644 --- a/lib/routes/plurk/top.ts +++ b/lib/routes/plurk/top.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl, getPlurk } from './utils'; @@ -8,7 +8,8 @@ const categoryList = new Set(['topReplurks', 'topFavorites', 'topResponded']); export const route: Route = { path: '/top/:category?/:lang?', - categories: ['social-media'], + categories: ['social-media', 'popular'], + view: ViewType.SocialMedia, example: '/plurk/top/topReplurks', parameters: { category: 'Category, see the table below, `topReplurks` by default', lang: 'Language, see the table below, `en` by default' }, features: { diff --git a/lib/routes/plurk/topic.ts b/lib/routes/plurk/topic.ts index 7f4f6e8814bfd1b..08240ffed2d7ea6 100644 --- a/lib/routes/plurk/topic.ts +++ b/lib/routes/plurk/topic.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +6,8 @@ import { baseUrl, fetchFriends, getPlurk } from './utils'; export const route: Route = { path: '/topic/:topic', - categories: ['social-media'], + categories: ['social-media', 'popular'], + view: ViewType.SocialMedia, example: '/plurk/topic/standwithukraine', parameters: { topic: 'Topic ID, can be found in URL' }, features: { diff --git a/lib/routes/plurk/user.ts b/lib/routes/plurk/user.ts index ac5f24f0297fc6f..b23bec103500e30 100644 --- a/lib/routes/plurk/user.ts +++ b/lib/routes/plurk/user.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +6,8 @@ import { baseUrl, fetchFriends, getPlurk } from './utils'; export const route: Route = { path: '/user/:user', - categories: ['social-media'], + categories: ['social-media', 'popular'], + view: ViewType.SocialMedia, example: '/plurk/user/plurkoffice', parameters: { user: 'User ID, can be found in URL' }, features: { From d87aea1f4f1f2d7ee53e2b66a87e3f4e7521418b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 05:07:31 -0700 Subject: [PATCH 241/740] chore(deps-dev): bump @babel/preset-env from 7.25.8 to 7.25.9 (#17265) * chore(deps-dev): bump @babel/preset-env from 7.25.8 to 7.25.9 Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.25.8 to 7.25.9. - [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.25.9/packages/babel-preset-env) --- updated-dependencies: - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 478d7570d1f155e..5b42997e7848db2 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@babel/preset-env": "7.25.8", + "@babel/preset-env": "7.25.9", "@babel/preset-typescript": "7.25.9", "@eslint/eslintrc": "3.1.0", "@eslint/js": "9.13.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1b3d63559234818..5ecdfbb7f9ae086 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -259,8 +259,8 @@ importers: version: 3.23.8 devDependencies: '@babel/preset-env': - specifier: 7.25.8 - version: 7.25.8(@babel/core@7.25.9) + specifier: 7.25.9 + version: 7.25.9(@babel/core@7.25.9) '@babel/preset-typescript': specifier: 7.25.9 version: 7.25.9(@babel/core@7.25.9) @@ -923,8 +923,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/preset-env@7.25.8': - resolution: {integrity: sha512-58T2yulDHMN8YMUxiLq5YmWUnlDCyY1FsHM+v12VMx+1/FlrUj5tY50iDCpofFQEM8fMYOaY9YRvym2jcjn1Dg==} + '@babel/preset-env@7.25.9': + resolution: {integrity: sha512-XqDEt+hfsQukahSX9JOBDHhpUHDhj2zGSxoqWQFCMajOSBnbhBdgON/bU/5PkBA1yX5tqW6tTzuIPVsZTQ7h5Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -6377,7 +6377,7 @@ snapshots: '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) '@babel/helper-plugin-utils': 7.25.9 - '@babel/preset-env@7.25.8(@babel/core@7.25.9)': + '@babel/preset-env@7.25.9(@babel/core@7.25.9)': dependencies: '@babel/compat-data': 7.25.9 '@babel/core': 7.25.9 From da72ae2e0bf882e611a928316cbf7720780f374d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 05:10:06 -0700 Subject: [PATCH 242/740] chore(deps): bump telegram from 2.25.15 to 2.26.2 (#17266) * chore(deps): bump telegram from 2.25.15 to 2.26.2 Bumps [telegram](https://github.com/gram-js/gramjs) from 2.25.15 to 2.26.2. - [Release notes](https://github.com/gram-js/gramjs/releases) - [Commits](https://github.com/gram-js/gramjs/commits) --- updated-dependencies: - dependency-name: telegram dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 5b42997e7848db2..9a768716f985123 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "simplecc-wasm": "1.1.0", "socks-proxy-agent": "8.0.4", "source-map": "0.7.4", - "telegram": "2.25.15", + "telegram": "2.26.2", "tiny-async-pool": "2.1.0", "title": "3.5.3", "tldts": "6.1.53", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5ecdfbb7f9ae086..d7363ee8c3f558e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -219,8 +219,8 @@ importers: specifier: 0.7.4 version: 0.7.4 telegram: - specifier: 2.25.15 - version: 2.25.15 + specifier: 2.26.2 + version: 2.26.2 tiny-async-pool: specifier: 2.1.0 version: 2.1.0 @@ -5193,8 +5193,8 @@ packages: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} - telegram@2.25.15: - resolution: {integrity: sha512-kB6yNtrodeCrkM/ei/1Ksq8eOMUIlhZ/zWSAjFsJes1PCcYt6qblME7IPJI3re4FKLw0V+ptt4GH6/DGIu/OqA==} + telegram@2.26.2: + resolution: {integrity: sha512-KKXt4pVanB6xusgsyCZXAhFOWiUVVfoXZsFzXDrcWoWNbN67d42XIN25JLJ51Tnbe3MzNVUNk6jUeE6X0AYasQ==} test-exclude@7.0.1: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} @@ -11113,7 +11113,7 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 - telegram@2.25.15: + telegram@2.26.2: dependencies: '@cryptography/aes': 0.1.1 async-mutex: 0.3.2 From 4fdc6cca26538bedc0d4cb15c047e38b4fff0348 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 05:10:43 -0700 Subject: [PATCH 243/740] chore(deps): bump tldts from 6.1.53 to 6.1.54 (#17267) * chore(deps): bump tldts from 6.1.53 to 6.1.54 Bumps [tldts](https://github.com/remusao/tldts) from 6.1.53 to 6.1.54. - [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.53...v6.1.54) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 9a768716f985123..9f00166b7076ca8 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "telegram": "2.26.2", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.53", + "tldts": "6.1.54", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7363ee8c3f558e..5e91340935cc603 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,8 +228,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.53 - version: 6.1.53 + specifier: 6.1.54 + version: 6.1.54 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5256,8 +5256,8 @@ packages: tldts-core@6.1.54: resolution: {integrity: sha512-5cc42+0G0EjYRDfIJHKraaT3I5kPm7j6or3Zh1T9sF+Ftj1T+isT4thicUyQQ1bwN7/xjHQIuY2fXCoXP8Haqg==} - tldts@6.1.53: - resolution: {integrity: sha512-4uCStuOjPFaY2/LUjTSwdnJTC82W/gvSFL6FoTC9ehNOHboA9cyO3wX1erh2yGofVls37OdXr5sQLEfL5hS1TA==} + tldts@6.1.54: + resolution: {integrity: sha512-rDaL1t59gb/Lg0HPMUGdV1vAKLQcXwU74D26aMaYV4QW7mnMvShd1Vmkg3HYAPWx2JCTUmsrXt/Yl9eJ5UFBQw==} hasBin: true tmp@0.0.33: @@ -11180,7 +11180,7 @@ snapshots: tldts-core@6.1.54: {} - tldts@6.1.53: + tldts@6.1.54: dependencies: tldts-core: 6.1.54 @@ -11218,7 +11218,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.53 + tldts: 6.1.54 tr46@0.0.3: {} From 7d354e97f0d73ecc2da8d0e80e80448c0dcf2823 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 05:11:06 -0700 Subject: [PATCH 244/740] chore(deps-dev): bump @vercel/nft from 0.27.4 to 0.27.5 (#17264) * chore(deps-dev): bump @vercel/nft from 0.27.4 to 0.27.5 Bumps [@vercel/nft](https://github.com/vercel/nft) from 0.27.4 to 0.27.5. - [Release notes](https://github.com/vercel/nft/releases) - [Commits](https://github.com/vercel/nft/compare/0.27.4...0.27.5) --- updated-dependencies: - dependency-name: "@vercel/nft" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 9f00166b7076ca8..649190097fa9fc8 100644 --- a/package.json +++ b/package.json @@ -165,7 +165,7 @@ "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.11.0", "@typescript-eslint/parser": "8.11.0", - "@vercel/nft": "0.27.4", + "@vercel/nft": "0.27.5", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.103", "eslint": "9.13.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5e91340935cc603..ce9f14703e4002a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -349,8 +349,8 @@ importers: specifier: 8.11.0 version: 8.11.0(eslint@9.13.0)(typescript@5.6.3) '@vercel/nft': - specifier: 0.27.4 - version: 0.27.4 + specifier: 0.27.5 + version: 0.27.5 '@vitest/coverage-v8': specifier: 2.0.5 version: 2.0.5(vitest@2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) @@ -1969,8 +1969,8 @@ packages: '@unhead/schema@1.11.10': resolution: {integrity: sha512-lXh7cm5XtFaw3gc+ZVXTSfIHXiBpAywbjtEiOsz5TR4GxOjj2rtfOAl4C3Difk1yupP6L2otYmOZdn/i8EXSJg==} - '@vercel/nft@0.27.4': - resolution: {integrity: sha512-Rioz3LJkEKicKCi9BSyc1RXZ5R6GmXosFMeBSThh6msWSOiArKhb7c75MiWwZEgPL7x0/l3TAfH/l0cxKNuUFA==} + '@vercel/nft@0.27.5': + resolution: {integrity: sha512-b2A7M+4yMHdWKY7xCC+kBEcnMrpaSE84CnuauTjhKKoCEeej0byJMAB8h/RBVnw/HdZOAFVcxR0Izr3LL24FwA==} engines: {node: '>=16'} hasBin: true @@ -7458,7 +7458,7 @@ snapshots: hookable: 5.5.3 zhead: 2.2.4 - '@vercel/nft@0.27.4': + '@vercel/nft@0.27.5': dependencies: '@mapbox/node-pre-gyp': 1.0.11 '@rollup/pluginutils': 4.2.1 From 680928cce6899f9e76e16426d5cfb68684005fc4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 05:11:26 -0700 Subject: [PATCH 245/740] chore(deps-dev): bump @types/node from 22.7.8 to 22.7.9 (#17268) * chore(deps-dev): bump @types/node from 22.7.8 to 22.7.9 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.7.8 to 22.7.9. - [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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 649190097fa9fc8..e2a8010302bb537 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.7.8", + "@types/node": "22.7.9", "@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 ce9f14703e4002a..0ce1166f0940c9d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -325,8 +325,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.7.8 - version: 22.7.8 + specifier: 22.7.9 + version: 22.7.9 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -353,7 +353,7 @@ importers: version: 0.27.5 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.7.9)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.103 version: 0.37.103 @@ -419,10 +419,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.7.8)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.7.9)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.7.9)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1858,8 +1858,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.7.8': - resolution: {integrity: sha512-a922jJy31vqR5sk+kAdIENJjHblqcZ4RmERviFsER4WJcEONqxKcjNOlk0q7OUfrF5sddT+vng070cdfMlrPLg==} + '@types/node@22.7.9': + resolution: {integrity: sha512-jrTfRC7FM6nChvU7X2KqcrgquofrWLFDeYC1hKfwNWomVvrn7JIksqf344WN2X/y8xrgqBd2dJATZV4GbatBfg==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6779,7 +6779,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.7.8 + '@types/node': 22.7.9 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7247,12 +7247,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.7.9 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.7.8 + '@types/node': 22.7.9 '@types/html-to-text@9.0.4': {} @@ -7260,13 +7260,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.7.9 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.7.9 '@types/tough-cookie': 4.0.5 parse5: 7.2.0 @@ -7276,7 +7276,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.7.9 '@types/jsrsasign@10.5.13': {} @@ -7286,7 +7286,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.7.9 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7308,14 +7308,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.7.9 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.7.9 form-data: 4.0.1 - '@types/node@22.7.8': + '@types/node@22.7.9': dependencies: undici-types: 6.19.8 @@ -7329,7 +7329,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.7.8 + '@types/node': 22.7.9 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7343,7 +7343,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.7.8 + '@types/node': 22.7.9 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7367,7 +7367,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.7.8 + '@types/node': 22.7.9 optional: true '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': @@ -7476,7 +7476,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.9)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7490,7 +7490,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.7.9)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10445,7 +10445,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.7.8 + '@types/node': 22.7.9 long: 5.2.3 proxy-agent@6.4.0: @@ -11411,13 +11411,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.7.8): + vite-node@2.0.5(@types/node@22.7.9): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.7.8) + vite: 5.4.10(@types/node@22.7.9) transitivePeerDependencies: - '@types/node' - less @@ -11429,27 +11429,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.7.8)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.7.9)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.10(@types/node@22.7.8) + vite: 5.4.10(@types/node@22.7.9) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.7.8): + vite@5.4.10(@types/node@22.7.9): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.0 optionalDependencies: - '@types/node': 22.7.8 + '@types/node': 22.7.9 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.7.8)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.7.9)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11467,11 +11467,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.7.8) - vite-node: 2.0.5(@types/node@22.7.8) + vite: 5.4.10(@types/node@22.7.9) + vite-node: 2.0.5(@types/node@22.7.9) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.7.8 + '@types/node': 22.7.9 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From a3454ed515a09f212bbafa311b5c8207f9f4b30d Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Wed, 23 Oct 2024 21:33:52 +0800 Subject: [PATCH 246/740] chore: change github activity view to notification --- lib/routes/github/activity.ts | 2 +- lib/routes/github/trending.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/github/activity.ts b/lib/routes/github/activity.ts index 658567fb1c33484..bf892eeaba52a44 100644 --- a/lib/routes/github/activity.ts +++ b/lib/routes/github/activity.ts @@ -12,7 +12,7 @@ export const route: Route = { maintainers: ['hyoban'], example: '/github/activity/DIYgod', categories: ['programming', 'popular'], - view: ViewType.Articles, + view: ViewType.Notifications, parameters: { user: 'GitHub username', }, diff --git a/lib/routes/github/trending.ts b/lib/routes/github/trending.ts index 8abb894bc37f3e4..bb10ea86164c864 100644 --- a/lib/routes/github/trending.ts +++ b/lib/routes/github/trending.ts @@ -13,7 +13,7 @@ export const route: Route = { path: '/trending/:since/:language/:spoken_language?', categories: ['programming', 'popular'], example: '/github/trending/daily/javascript/en', - view: ViewType.Articles, + view: ViewType.Notifications, parameters: { since: { description: 'time range', From 44ce93e15d0e1b65033658ea13103ef257a49684 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 23 Oct 2024 21:49:52 +0800 Subject: [PATCH 247/740] =?UTF-8?q?fix(route):=20=E5=8C=97=E4=BA=AC?= =?UTF-8?q?=E4=BB=B7=E6=A0=BC=E4=BB=B7=E6=A0=BC=E6=97=A5=E6=8A=A5=20(#1727?= =?UTF-8?q?0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(route): 北京价格价格日报 * fix(route): 北京价格价格日报 --- lib/routes/beijingprice/index.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/routes/beijingprice/index.ts b/lib/routes/beijingprice/index.ts index ed35808614514c5..e019d2f98d97d86 100644 --- a/lib/routes/beijingprice/index.ts +++ b/lib/routes/beijingprice/index.ts @@ -26,19 +26,34 @@ export const handler = async (ctx) => { const a = item.find('a'); const link = a.prop('href'); + const msg = a.prop('msg'); + + const title = a.text()?.trim() ?? a.prop('title'); + + let enclosureUrl; + let enclosureType; + + if (msg) { + const parsedMsg = JSON.parse(msg); + enclosureUrl = new URL(`${parsedMsg.path}${parsedMsg.fileName}`, rootUrl).href; + enclosureType = `application/${parsedMsg.suffix}`; + } return { - title: a.text()?.trim() ?? a.prop('title'), + title, pubDate: parseDate(item.contents().last().text()), - link: link.startsWith('http') ? link : new URL(link, rootUrl).href, + link: enclosureUrl ?? (link.startsWith('http') ? link : new URL(link, rootUrl).href), language, + enclosure_url: enclosureUrl, + enclosure_type: enclosureType, + enclosure_title: enclosureUrl ? title : undefined, }; }); items = await Promise.all( items.map((item) => cache.tryGet(item.link, async () => { - if (!item.link.includes('www.beijingprice.cn')) { + if (!item.link.includes('www.beijingprice.cn') || item.link.endsWith('.pdf')) { return item; } From bc020b6f18df026eb887f822a9cfc8de160a2895 Mon Sep 17 00:00:00 2001 From: karasu <karasu.shing@gmail.com> Date: Wed, 23 Oct 2024 22:18:14 +0800 Subject: [PATCH 248/740] feat(route): sorrycc.com (#17261) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): 云谦的博客 * parseDate * change the route name --- lib/config.ts | 6 +++ lib/routes/sorrycc/index.ts | 85 +++++++++++++++++++++++++++++++++ lib/routes/sorrycc/namespace.ts | 6 +++ lib/routes/sorrycc/types.ts | 13 +++++ 4 files changed, 110 insertions(+) create mode 100644 lib/routes/sorrycc/index.ts create mode 100644 lib/routes/sorrycc/namespace.ts create mode 100644 lib/routes/sorrycc/types.ts diff --git a/lib/config.ts b/lib/config.ts index 87d28699df773ef..de1d1e9233400fc 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -270,6 +270,9 @@ export type Config = { skeb: { bearerToken?: string; }; + sorrycc: { + cookie?: string; + }; spotify: { clientId?: string; clientSecret?: string; @@ -663,6 +666,9 @@ const calculateValue = () => { skeb: { bearerToken: envs.SKEB_BEARER_TOKEN, }, + sorrycc: { + cookie: envs.SORRYCC_COOKIES, + }, spotify: { clientId: envs.SPOTIFY_CLIENT_ID, clientSecret: envs.SPOTIFY_CLIENT_SECRET, diff --git a/lib/routes/sorrycc/index.ts b/lib/routes/sorrycc/index.ts new file mode 100644 index 000000000000000..f9f3d6cc50352be --- /dev/null +++ b/lib/routes/sorrycc/index.ts @@ -0,0 +1,85 @@ +import { type DataItem, ViewType, type Data, type Route } from '@/types'; +import type { Context } from 'hono'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import cache from '@/utils/cache'; +import type { Post } from './types'; +import { config } from '@/config'; +import { parseDate } from '@/utils/parse-date'; + +const WORDPRESS_HASH = 'f05fca638390aed897fbe3c2fff03000'; + +export const route: Route = { + name: '文章', + categories: ['blog'], + path: '/', + example: '/sorrycc', + radar: [ + { + source: ['sorrycc.com'], + }, + ], + handler, + maintainers: ['KarasuShin'], + view: ViewType.Articles, + features: { + supportRadar: true, + requireConfig: [ + { + name: 'SORRYCC_COOKIES', + description: `登录用户的Cookie,获取方式:\n1. 登录sorrycc.com\n2. 打开浏览器开发者工具,切换到 Application 面板\n3. 点击侧边栏中的Storage -> Cookies -> https://sorrycc.com\n4. 复制 Cookie 中的 wordpress_logged_in_${WORDPRESS_HASH} 值`, + optional: true, + }, + ], + }, + description: '云谦的博客,部分内容存在权限校验,访问完整内容请部署RSSHub私有实例并配置授权信息', +}; + +async function handler(ctx: Context): Promise<Data> { + const host = 'https://sorrycc.com'; + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')!, 10) : 100; + const cookie = config.sorrycc.cookie; + + const data = await ofetch<Post[]>(`${host}/wp-json/wp/v2/posts?per_page=${limit}`); + + const items: DataItem[] = await Promise.all( + data.map(async (item) => { + const title = item.title.rendered; + const link = item.link; + const published = parseDate(item.date_gmt); + const updated = parseDate(item.modified_gmt); + if (item.categories.includes(7) && cookie) { + return (await cache.tryGet(link, async () => { + const article = await ofetch(link, { + headers: { + Cookie: `wordpress_logged_in_${WORDPRESS_HASH}=${cookie}`, + }, + }); + const $article = load(article); + const description = $article('.content').html(); + return { + title, + description, + link, + published, + updated, + }; + })) as unknown as DataItem; + } + return { + title, + description: item.content.rendered, + link, + published, + updated, + } as DataItem; + }) + ); + + return { + title: '文章', + item: items, + link: host, + image: `${host}/wp-content/uploads/2024/01/cropped-CC-1-32x32.png`, + }; +} diff --git a/lib/routes/sorrycc/namespace.ts b/lib/routes/sorrycc/namespace.ts new file mode 100644 index 000000000000000..6c1c27d4ef32346 --- /dev/null +++ b/lib/routes/sorrycc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '云谦的博客', + url: 'sorrycc.com', +}; diff --git a/lib/routes/sorrycc/types.ts b/lib/routes/sorrycc/types.ts new file mode 100644 index 000000000000000..ff84da8ae616837 --- /dev/null +++ b/lib/routes/sorrycc/types.ts @@ -0,0 +1,13 @@ +export interface Post { + id: number; + content: { + rendered: string; + }; + date_gmt: string; + modified_gmt: string; + link: string; + categories: number[]; + title: { + rendered: string; + }; +} From ed8fa7a5ead4e7535a41e1a0b50c79c2f856f4b6 Mon Sep 17 00:00:00 2001 From: Keo <keocheung@outlook.com> Date: Wed, 23 Oct 2024 22:50:37 +0800 Subject: [PATCH 249/740] fix(route/sis001): add cookie to solve anti-crawler (#17259) * fix(route/sis001): add cookie to resolve anti-crawler * fix desc * move base url to env config * update doc * fix: cache cookie --------- --- lib/config.ts | 6 +++++ lib/routes/sis001/author.ts | 15 +++++++----- lib/routes/sis001/common.ts | 42 ++++++++++++++++++++++++++++++---- lib/routes/sis001/forum.ts | 18 ++++++++------- lib/routes/sis001/namespace.ts | 3 +++ 5 files changed, 66 insertions(+), 18 deletions(-) diff --git a/lib/config.ts b/lib/config.ts index de1d1e9233400fc..e2e933e6eaf875a 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -267,6 +267,9 @@ export type Config = { scihub: { host?: string; }; + sis001: { + baseUrl?: string; + }; skeb: { bearerToken?: string; }; @@ -663,6 +666,9 @@ const calculateValue = () => { scihub: { host: envs.SCIHUB_HOST || 'https://sci-hub.se/', }, + sis001: { + baseUrl: envs.SIS001_BASE_URL || 'https://sis001.com', + }, skeb: { bearerToken: envs.SKEB_BEARER_TOKEN, }, diff --git a/lib/routes/sis001/author.ts b/lib/routes/sis001/author.ts index d724a0570eaf10b..eca6cf227707b5e 100644 --- a/lib/routes/sis001/author.ts +++ b/lib/routes/sis001/author.ts @@ -1,8 +1,10 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; +import { config } from '@/config'; import { load } from 'cheerio'; -import { baseUrl, getThread } from './common'; +import type { Context } from 'hono'; +import { getCookie, getThread } from './common'; export const route: Route = { path: '/author/:id?', @@ -22,11 +24,12 @@ export const route: Route = { handler, }; -async function handler(ctx) { +async function handler(ctx: Context) { const { id = '13131575' } = ctx.req.param(); - const url = `${baseUrl}/forum/space.php?uid=${id}`; + const url = `${config.sis001.baseUrl}/forum/space.php?uid=${id}`; - const response = await got(url); + const cookie = await getCookie(url); + const response = await got(url, { headers: { cookie } }); const $ = load(response.data); const username = $('div.bg div.title').text().replace('的个人空间', ''); @@ -37,12 +40,12 @@ async function handler(ctx) { item = $(item); return { title: item.text(), - link: `${baseUrl}/forum/${item.attr('href')}`, + link: `${config.sis001.baseUrl}/forum/${item.attr('href')}`, author: username, }; }); - items = await Promise.all(items.map((item) => cache.tryGet(item.link, async () => await getThread(item)))); + items = await Promise.all(items.map((item) => cache.tryGet(item.link, async () => await getThread(cookie, item)))); return { title: `${username}的主题`, diff --git a/lib/routes/sis001/common.ts b/lib/routes/sis001/common.ts index f3cda175638a549..352866c794816cf 100644 --- a/lib/routes/sis001/common.ts +++ b/lib/routes/sis001/common.ts @@ -2,11 +2,45 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; +import { DataItem } from '@/types'; +import CryptoJS from 'crypto-js'; +import cache from '@/utils/cache'; +import { config } from '@/config'; -const baseUrl = 'https://www.sis001.com'; +function getCookie(url: string): Promise<string> { + return cache.tryGet( + 'sis001:cookie', + async () => { + const response = await got(url); + const rsp = response.data; -async function getThread(item) { - const response = await got(item.link); + const regex = /toNumbers\("([a-fA-F0-9]+)"\)/g; + const matches: string[] = []; + let match: RegExpExecArray | null; + + while ((match = regex.exec(rsp)) !== null) { + matches.push(match[1]); + } + + if (matches.length !== 3) { + return ''; + } + + const key = CryptoJS.enc.Hex.parse(matches[0]); + const iv = CryptoJS.enc.Hex.parse(matches[1]); + const encrypted = CryptoJS.enc.Hex.parse(matches[2]); + + const decrypted = CryptoJS.AES.decrypt({ ciphertext: encrypted }, key, { iv, padding: CryptoJS.pad.NoPadding }); + + return 'CeRaHigh1=' + decrypted.toString(CryptoJS.enc.Hex); + }, + config.cache.routeExpire, + false + ); +} + +async function getThread(cookie: string, item: DataItem) { + const response = await got(item.link, { headers: { cookie } }); const $ = load(response.data); item.category = $('.posttags a') @@ -35,4 +69,4 @@ async function getThread(item) { return item; } -export { baseUrl, getThread }; +export { getCookie, getThread }; diff --git a/lib/routes/sis001/forum.ts b/lib/routes/sis001/forum.ts index 9791dbde3af0573..5775f3adb0b26be 100644 --- a/lib/routes/sis001/forum.ts +++ b/lib/routes/sis001/forum.ts @@ -1,8 +1,10 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; +import { config } from '@/config'; import { load } from 'cheerio'; -import { baseUrl, getThread } from './common'; +import type { Context } from 'hono'; +import { getCookie, getThread } from './common'; export const route: Route = { path: '/forum/:id?', @@ -18,16 +20,16 @@ export const route: Route = { supportScihub: false, }, name: '子版块', - maintainers: [], + maintainers: ['TonyRL'], handler, }; -async function handler(ctx) { +async function handler(ctx: Context) { const { id = 76 } = ctx.req.param(); - const url = `${baseUrl}/forum/forum-${id}-1.html`; - - const response = await got(url); + const url = `${config.sis001.baseUrl}/forum/forum-${id}-1.html`; + const cookie = await getCookie(url); + const response = await got(url, { headers: { cookie } }); const $ = load(response.data); let items = $('form table') @@ -39,12 +41,12 @@ async function handler(ctx) { item = $(item); return { title: item.find('th em').text() + ' ' + item.find('span a').eq(0).text(), - link: new URL(item.find('span a').eq(0).attr('href'), `${baseUrl}/forum/`).href, + link: new URL(item.find('span a').eq(0).attr('href'), `${config.sis001.baseUrl}/forum/`).href, author: item.find('.author a').text(), }; }); - items = await Promise.all(items.map((item) => cache.tryGet(item.link, async () => await getThread(item)))); + items = await Promise.all(items.map((item) => cache.tryGet(item.link, async () => await getThread(cookie, item)))); return { title: $('head title').text(), diff --git a/lib/routes/sis001/namespace.ts b/lib/routes/sis001/namespace.ts index 42ca5d651b0b043..2ae6f574c672513 100644 --- a/lib/routes/sis001/namespace.ts +++ b/lib/routes/sis001/namespace.ts @@ -3,4 +3,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '第一会所', url: 'sis001.com', + description: `:::tip + 第一会所有多个备用网址,本路由默认使用\`https://sis001.com\`,若该网址无法访问,可以在部署实例的时候通过\`SIS001_BASE_URL\`环境变量配置要使用的地址,如\`https://www.sis001.com\`等) + :::`, }; From 9f7bcc297f37dc996c4576149edd95e076d431b6 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Thu, 24 Oct 2024 00:15:06 +0800 Subject: [PATCH 250/740] =?UTF-8?q?feat(route):=20add=20=E5=90=8C=E8=8A=B1?= =?UTF-8?q?=E9=A1=BA=E8=B4=A2=E7=BB=8F7=C3=9724=E5=B0=8F=E6=97=B6=E8=A6=81?= =?UTF-8?q?=E9=97=BB=E7=9B=B4=E6=92=AD=20(#17271)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/10jqka/namespace.ts | 8 ++ lib/routes/10jqka/realtimenews.ts | 143 ++++++++++++++++++++++++++++++ 2 files changed, 151 insertions(+) create mode 100644 lib/routes/10jqka/namespace.ts create mode 100644 lib/routes/10jqka/realtimenews.ts diff --git a/lib/routes/10jqka/namespace.ts b/lib/routes/10jqka/namespace.ts new file mode 100644 index 000000000000000..2b85dd79a2ec0a3 --- /dev/null +++ b/lib/routes/10jqka/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '同花顺财经', + url: '10jqka.com.cn', + categories: ['finance'], + description: '', +}; diff --git a/lib/routes/10jqka/realtimenews.ts b/lib/routes/10jqka/realtimenews.ts new file mode 100644 index 000000000000000..d91db909f940737 --- /dev/null +++ b/lib/routes/10jqka/realtimenews.ts @@ -0,0 +1,143 @@ +import { Route } from '@/types'; + +import got from '@/utils/got'; +import { load } from 'cheerio'; +import iconv from 'iconv-lite'; +import { parseDate } from '@/utils/parse-date'; + +export const handler = async (ctx) => { + const { tag } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; + + const rootUrl = 'https://news.10jqka.com.cn'; + const apiUrl = new URL('tapp/news/push/stock', rootUrl).href; + const currentUrl = new URL('realtimenews.html', rootUrl).href; + + const { data: currentResponse } = await got(currentUrl, { + responseType: 'buffer', + }); + + const $ = load(iconv.decode(currentResponse, 'gbk')); + + const language = $('html').prop('lang'); + + const { data: response } = await got(apiUrl, { + searchParams: { + page: 1, + tag: tag ?? '', + }, + }); + + const items = + response.data?.list.slice(0, limit).map((item) => { + const title = item.title; + const description = item.digest; + const guid = `10jqka-${item.seq}`; + const image = item.picUrl; + + return { + title, + description, + pubDate: parseDate(item.ctime, 'X'), + link: item.url, + category: [...new Set([item.color === '2' ? '重要' : undefined, ...item.tags.map((c) => c.name), ...item.tagInfo.map((c) => c.name)])].filter(Boolean), + author: item.source, + guid, + id: guid, + content: { + html: description, + text: description, + }, + image, + banner: item.picUrl, + updated: parseDate(item.rtime, 'X'), + language, + }; + }) ?? []; + + const title = $('title').text(); + const image = $('h1 a img').prop('src'); + + return { + title, + description: title.split(/_/).pop(), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: $('meta[property="og:site_name"]').prop('content'), + language, + }; +}; + +export const route: Route = { + path: '/realtimenews/:tag?', + name: '7×24小时要闻直播', + url: 'news.10jqka.com.cn', + maintainers: ['nczitzk'], + handler, + example: '/10jqka/realtimenews', + parameters: { tag: '标签,默认为全部' }, + description: `:::tip + 若订阅 [7×24小时要闻直播](https://news.10jqka.com.cn/realtimenews.html) 的 \`公告\` 标签。将 \`公告\` 作为标签参数填入,此时路由为 [\`/10jqka/realtimenews/公告\`](https://rsshub.app/10jqka/realtimenews/公告)。 + + 若订阅 [7×24小时要闻直播](https://news.10jqka.com.cn/realtimenews.html) 的 \`公告\` 和 \`A股\` 标签。将 \`公告,A股\` 作为标签参数填入,此时路由为 [\`/10jqka/realtimenews/公告,A股\`](https://rsshub.app/10jqka/realtimenews/公告,A股)。 + ::: + + | 全部 | 重要 | A股 | 港股 | 美股 | 机会 | 异动 | 公告 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + `, + categories: ['finance'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + title: '全部', + source: ['news.10jqka.com.cn/realtimenews.html'], + target: '/realtimenews/全部', + }, + { + title: '重要', + source: ['news.10jqka.com.cn/realtimenews.html'], + target: '/realtimenews/重要', + }, + { + title: 'A股', + source: ['news.10jqka.com.cn/realtimenews.html'], + target: '/realtimenews/A股', + }, + { + title: '港股', + source: ['news.10jqka.com.cn/realtimenews.html'], + target: '/realtimenews/港股', + }, + { + title: '美股', + source: ['news.10jqka.com.cn/realtimenews.html'], + target: '/realtimenews/美股', + }, + { + title: '机会', + source: ['news.10jqka.com.cn/realtimenews.html'], + target: '/realtimenews/机会', + }, + { + title: '异动', + source: ['news.10jqka.com.cn/realtimenews.html'], + target: '/realtimenews/异动', + }, + { + title: '公告', + source: ['news.10jqka.com.cn/realtimenews.html'], + target: '/realtimenews/公告', + }, + ], +}; From 8aeb57703829ceb084cfc506e103453216864365 Mon Sep 17 00:00:00 2001 From: Neko Aria <990879119@qq.com> Date: Thu, 24 Oct 2024 01:33:13 +0800 Subject: [PATCH 251/740] feat(ci): extend `/test` command functionality for PR testing (#17154) * feat(ci): extend `/test` command functionality for PR testing * fix: optimize PR testing workflow --------- --- .github/workflows/issue-command.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/issue-command.yml b/.github/workflows/issue-command.yml index dd497b695422b9b..b80c2b5ea2dfa4d 100644 --- a/.github/workflows/issue-command.yml +++ b/.github/workflows/issue-command.yml @@ -42,12 +42,31 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 5 permissions: - issues: write attestations: write + issues: write + pull-requests: write steps: + - name: Fetch PR data (for PR) + if: github.event.issue.pull_request + uses: octokit/request-action@v2.x + id: pr-data + with: + route: GET /repos/{repo}/pulls/{number} + repo: ${{ github.repository }} + number: ${{ github.event.issue.number }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout + if: ${{ !github.event.issue.pull_request }} uses: actions/checkout@v4 + - name: Checkout PR + if: github.event.issue.pull_request + uses: actions/checkout@v4 + with: + ref: ${{ fromJson(steps.pr-data.outputs.data).head.ref }} + - name: Install pnpm uses: pnpm/action-setup@v4 @@ -105,7 +124,7 @@ jobs: await test({ github, context, core }, link, routes, number) - name: Print logs - if: (env.TEST_CONTINUE) + if: env.TEST_CONTINUE run: cat ${{ github.workspace }}/logs/combined.log - name: Upload Artifact From 74f8320ea37def08b65f3d3602745a6cf49a7866 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 24 Oct 2024 19:46:38 +0800 Subject: [PATCH 252/740] fix(route/rss3): add url validate --- lib/routes/rss3/index.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/routes/rss3/index.ts b/lib/routes/rss3/index.ts index 81d10534866f02a..e2613d40c6fff7b 100644 --- a/lib/routes/rss3/index.ts +++ b/lib/routes/rss3/index.ts @@ -9,7 +9,7 @@ export const route: Route = { categories: ['social-media'], example: '/rss3/vitalik.eth', name: 'Account Activities', - maintainers: ['DIYgod'], + maintainers: ['DIYgod', 'pseudoyu'], url: 'docs.rss3.io/api-reference#tag/decentralized/GET/decentralized/%7Baccount%7D', handler, description: 'Retrieve the activities associated with a specified account in the decentralized system.', @@ -123,6 +123,11 @@ export const route: Route = { async function handler(ctx) { const { account, network, tag } = ctx.req.param(); + // Check if account contains "://" + if (account.includes('://')) { + throw new Error('Account should not contain "://"'); + } + const { data } = await ofetch( `https://gi.rss3.io/decentralized/${account}?${new URLSearchParams({ limit: '20', From c840798fd5a70e094866eea0a10fe54edfbc23ee Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 24 Oct 2024 20:01:33 +0800 Subject: [PATCH 253/740] fix(route/rss3): should not contain path --- lib/routes/rss3/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/rss3/index.ts b/lib/routes/rss3/index.ts index e2613d40c6fff7b..bd96959f4088325 100644 --- a/lib/routes/rss3/index.ts +++ b/lib/routes/rss3/index.ts @@ -123,9 +123,9 @@ export const route: Route = { async function handler(ctx) { const { account, network, tag } = ctx.req.param(); - // Check if account contains "://" - if (account.includes('://')) { - throw new Error('Account should not contain "://"'); + // Check if account contains "://" or "/" + if (account.includes('://') || account.includes('/')) { + throw new Error('Account should not contain "://" or path components'); } const { data } = await ofetch( From 192f538435c3efe4d1a581bf8f7d484ae44e5b53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 06:21:17 -0700 Subject: [PATCH 254/740] chore(deps): bump @opentelemetry/sdk-trace-base from 1.26.0 to 1.27.0 (#17283) * chore(deps): bump @opentelemetry/sdk-trace-base from 1.26.0 to 1.27.0 Bumps [@opentelemetry/sdk-trace-base](https://github.com/open-telemetry/opentelemetry-js) from 1.26.0 to 1.27.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.26.0...v1.27.0) --- updated-dependencies: - dependency-name: "@opentelemetry/sdk-trace-base" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 66 ++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 52 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index e2a8010302bb537..357d93dbb6c5e12 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@opentelemetry/exporter-trace-otlp-http": "0.53.0", "@opentelemetry/resources": "1.26.0", "@opentelemetry/sdk-metrics": "1.26.0", - "@opentelemetry/sdk-trace-base": "1.26.0", + "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.23", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0ce1166f0940c9d..d7072fcb1ae0db2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,8 +33,8 @@ importers: specifier: 1.26.0 version: 1.26.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': - specifier: 1.26.0 - version: 1.26.0(@opentelemetry/api@1.9.0) + specifier: 1.27.0 + version: 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': specifier: 1.27.0 version: 1.27.0 @@ -1463,6 +1463,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/core@1.27.0': + resolution: {integrity: sha512-yQPKnK5e+76XuiqUH/gKyS8wv/7qITd5ln56QkBTf3uggr0VkXOXfcaAuG330UfdYu83wsyoBwqwxigpIG+Jkg==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/exporter-prometheus@0.53.0': resolution: {integrity: sha512-STP2FZQOykUByPnibbouTirNxnG69Ph8TiMXDsaZuWxGDJ7wsYsRQydJkAVpvG+p0hTMP/hIfZp9zT/1iHpIkQ==} engines: {node: '>=14'} @@ -1493,6 +1499,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/resources@1.27.0': + resolution: {integrity: sha512-jOwt2VJ/lUD5BLc+PMNymDrUCpm5PKi1E9oSVYAvz01U/VdndGmrtV3DU1pG4AwlYhJRHbHfOUIlpBeXCPw6QQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/sdk-logs@0.53.0': resolution: {integrity: sha512-dhSisnEgIj/vJZXZV6f6KcTnyLDx/VuQ6l3ejuZpMpPlh9S1qMHiZU9NMmOkVkwwHkMy3G6mEBwdP23vUZVr4g==} engines: {node: '>=14'} @@ -1511,6 +1523,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/sdk-trace-base@1.27.0': + resolution: {integrity: sha512-btz6XTQzwsyJjombpeqCX6LhiMQYpzt2pIYNPnw0IPO/3AhT6yjnf8Mnv3ZC2A4eRYOjqrg+bfaXg9XHDRJDWQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/semantic-conventions@1.27.0': resolution: {integrity: sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==} engines: {node: '>=14'} @@ -2186,8 +2204,8 @@ packages: bare-path@2.1.3: resolution: {integrity: sha512-lh/eITfU8hrj9Ru5quUp0Io1kJWIk1bTjzo7JH1P5dWmQ2EL4hFUlfI8FonAhSlgIfhn63p84CDY/x+PisgcXA==} - bare-stream@2.3.1: - resolution: {integrity: sha512-Vm8kAeOcfzHPTH8sq0tHBnUqYrkXdroaBVVylqFT4cF5wnMfKEIxxy2jIGu2zKVNl9P8MAP9XBWwXJ9N2+jfEw==} + bare-stream@2.3.2: + resolution: {integrity: sha512-EFZHSIBkDgSHIwj2l2QZfP4U5OcD4xFAOwhSb/vlr9PIqyGJGvB/nfClJbcnh3EY4jtPE4zsb5ztae96bVF79A==} base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -2307,8 +2325,8 @@ packages: caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} - chai@5.1.1: - resolution: {integrity: sha512-pT1ZgP8rPNqUgieVaEY+ryQr6Q4HXNg8Ei9UnLUrjN4IA7dvQC5JB+/kxVcPNDHyBcc/26CXPkbNzq3qwrOEKA==} + chai@5.1.2: + resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} engines: {node: '>=12'} chalk@1.1.3: @@ -2756,8 +2774,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.43: - resolution: {integrity: sha512-NxnmFBHDl5Sachd2P46O7UJiMaMHMLSofoIWVJq3mj8NJgG0umiSeljAVP9lGzjI0UDLJJ5jjoGjcrB8RSbjLQ==} + electron-to-chromium@1.5.45: + resolution: {integrity: sha512-vOzZS6uZwhhbkZbcRyiy99Wg+pYFV5hk+5YaECvx0+Z31NR3Tt5zS6dze2OepT6PCTzVzT0dIJItti+uAW5zmw==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -6907,6 +6925,11 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/core@1.27.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/exporter-prometheus@0.53.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -6946,6 +6969,12 @@ snapshots: '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/resources@1.27.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/sdk-logs@0.53.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -6966,6 +6995,13 @@ snapshots: '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/sdk-trace-base@1.27.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/semantic-conventions@1.27.0': {} '@otplib/core@12.0.1': {} @@ -7498,7 +7534,7 @@ snapshots: dependencies: '@vitest/spy': 2.0.5 '@vitest/utils': 2.0.5 - chai: 5.1.1 + chai: 5.1.2 tinyrainbow: 1.2.0 '@vitest/pretty-format@2.0.5': @@ -7693,7 +7729,7 @@ snapshots: dependencies: bare-events: 2.5.0 bare-path: 2.1.3 - bare-stream: 2.3.1 + bare-stream: 2.3.2 optional: true bare-os@2.4.4: @@ -7704,7 +7740,7 @@ snapshots: bare-os: 2.4.4 optional: true - bare-stream@2.3.1: + bare-stream@2.3.2: dependencies: streamx: 2.20.1 optional: true @@ -7759,7 +7795,7 @@ snapshots: browserslist@4.24.2: dependencies: caniuse-lite: 1.0.30001669 - electron-to-chromium: 1.5.43 + electron-to-chromium: 1.5.45 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -7837,7 +7873,7 @@ snapshots: caseless@0.12.0: {} - chai@5.1.1: + chai@5.1.2: dependencies: assertion-error: 2.0.1 check-error: 2.1.1 @@ -8300,7 +8336,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.43: {} + electron-to-chromium@1.5.45: {} ellipsize@0.1.0: {} @@ -11458,7 +11494,7 @@ snapshots: '@vitest/snapshot': 2.0.5 '@vitest/spy': 2.0.5 '@vitest/utils': 2.0.5 - chai: 5.1.1 + chai: 5.1.2 debug: 4.3.7 execa: 8.0.1 magic-string: 0.30.12 From e86563cefa89ad7bfcbd2ba89de19319af01f30d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 07:03:23 -0700 Subject: [PATCH 255/740] chore(deps): bump @opentelemetry/resources from 1.26.0 to 1.27.0 (#17284) * chore(deps): bump @opentelemetry/resources from 1.26.0 to 1.27.0 Bumps [@opentelemetry/resources](https://github.com/open-telemetry/opentelemetry-js) from 1.26.0 to 1.27.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.26.0...v1.27.0) --- updated-dependencies: - dependency-name: "@opentelemetry/resources" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 357d93dbb6c5e12..e81c7479f57eea6 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.53.0", "@opentelemetry/exporter-trace-otlp-http": "0.53.0", - "@opentelemetry/resources": "1.26.0", + "@opentelemetry/resources": "1.27.0", "@opentelemetry/sdk-metrics": "1.26.0", "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7072fcb1ae0db2..9f72a556e056468 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -27,8 +27,8 @@ importers: specifier: 0.53.0 version: 0.53.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': - specifier: 1.26.0 - version: 1.26.0(@opentelemetry/api@1.9.0) + specifier: 1.27.0 + version: 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': specifier: 1.26.0 version: 1.26.0(@opentelemetry/api@1.9.0) From b2a35b6a3431b1b6e324d220d4ce30d439352ca8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:13:00 +0800 Subject: [PATCH 256/740] chore(deps): bump @opentelemetry/sdk-metrics from 1.26.0 to 1.27.0 (#17282) * chore(deps): bump @opentelemetry/sdk-metrics from 1.26.0 to 1.27.0 Bumps [@opentelemetry/sdk-metrics](https://github.com/open-telemetry/opentelemetry-js) from 1.26.0 to 1.27.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.26.0...v1.27.0) --- updated-dependencies: - dependency-name: "@opentelemetry/sdk-metrics" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index e81c7479f57eea6..1747283844cf745 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@opentelemetry/exporter-prometheus": "0.53.0", "@opentelemetry/exporter-trace-otlp-http": "0.53.0", "@opentelemetry/resources": "1.27.0", - "@opentelemetry/sdk-metrics": "1.26.0", + "@opentelemetry/sdk-metrics": "1.27.0", "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9f72a556e056468..fb33e02d8258936 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: specifier: 1.27.0 version: 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': - specifier: 1.26.0 - version: 1.26.0(@opentelemetry/api@1.9.0) + specifier: 1.27.0 + version: 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': specifier: 1.27.0 version: 1.27.0(@opentelemetry/api@1.9.0) @@ -1517,6 +1517,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' + '@opentelemetry/sdk-metrics@1.27.0': + resolution: {integrity: sha512-JzWgzlutoXCydhHWIbLg+r76m+m3ncqvkCcsswXAQ4gqKS+LOHKhq+t6fx1zNytvLuaOUBur7EvWxECc4jPQKg==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.3.0 <1.10.0' + '@opentelemetry/sdk-trace-base@1.26.0': resolution: {integrity: sha512-olWQldtvbK4v22ymrKLbIcBi9L2SpMO84sCPY54IVsJhP9fRsxJT194C/AVaAuJzLE30EdhhM1VmvVYR7az+cw==} engines: {node: '>=14'} @@ -6988,6 +6994,12 @@ snapshots: '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-metrics@1.27.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base@1.26.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 From edce496ba0832a404709ce5a358fa589d86cfc07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:28:25 +0800 Subject: [PATCH 257/740] chore(deps): bump @opentelemetry/exporter-prometheus from 0.53.0 to 0.54.0 (#17286) * chore(deps): bump @opentelemetry/exporter-prometheus Bumps [@opentelemetry/exporter-prometheus](https://github.com/open-telemetry/opentelemetry-js) from 0.53.0 to 0.54.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/experimental/v0.53.0...experimental/v0.54.0) --- updated-dependencies: - dependency-name: "@opentelemetry/exporter-prometheus" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install * fix: use ATTR_SERVICE_NAME SEMRESATTRS_SERVICE_NAME is deprecated --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/utils/otel/metric.ts | 4 ++-- lib/utils/otel/trace.ts | 4 ++-- package.json | 2 +- pnpm-lock.yaml | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/utils/otel/metric.ts b/lib/utils/otel/metric.ts index 5b552c577b2ddad..7d173cc60a4b3db 100644 --- a/lib/utils/otel/metric.ts +++ b/lib/utils/otel/metric.ts @@ -1,6 +1,6 @@ import { Resource } from '@opentelemetry/resources'; import { PrometheusExporter, PrometheusSerializer } from '@opentelemetry/exporter-prometheus'; -import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; +import { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; import { MeterProvider } from '@opentelemetry/sdk-metrics'; import { Attributes } from '@opentelemetry/api'; import { config } from '@/config'; @@ -21,7 +21,7 @@ const exporter = new PrometheusExporter({}); const provider = new MeterProvider({ resource: new Resource({ - [SEMRESATTRS_SERVICE_NAME]: 'rsshub', + [ATTR_SERVICE_NAME]: 'rsshub', }), readers: [exporter], }); diff --git a/lib/utils/otel/trace.ts b/lib/utils/otel/trace.ts index d497f28b1937f71..00c5b1416da8d49 100644 --- a/lib/utils/otel/trace.ts +++ b/lib/utils/otel/trace.ts @@ -1,11 +1,11 @@ import { Resource } from '@opentelemetry/resources'; import { BasicTracerProvider, BatchSpanProcessor } from '@opentelemetry/sdk-trace-base'; -import { SEMRESATTRS_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; +import { ATTR_SERVICE_NAME } from '@opentelemetry/semantic-conventions'; import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'; const provider = new BasicTracerProvider({ resource: new Resource({ - [SEMRESATTRS_SERVICE_NAME]: 'rsshub', + [ATTR_SERVICE_NAME]: 'rsshub', }), }); diff --git a/package.json b/package.json index 1747283844cf745..7868d83ce3464f5 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@hono/zod-openapi": "0.16.4", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-prometheus": "0.53.0", + "@opentelemetry/exporter-prometheus": "0.54.0", "@opentelemetry/exporter-trace-otlp-http": "0.53.0", "@opentelemetry/resources": "1.27.0", "@opentelemetry/sdk-metrics": "1.27.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fb33e02d8258936..31ca0be407a60e2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,8 +21,8 @@ importers: specifier: 1.9.0 version: 1.9.0 '@opentelemetry/exporter-prometheus': - specifier: 0.53.0 - version: 0.53.0(@opentelemetry/api@1.9.0) + specifier: 0.54.0 + version: 0.54.0(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http': specifier: 0.53.0 version: 0.53.0(@opentelemetry/api@1.9.0) @@ -1469,8 +1469,8 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/exporter-prometheus@0.53.0': - resolution: {integrity: sha512-STP2FZQOykUByPnibbouTirNxnG69Ph8TiMXDsaZuWxGDJ7wsYsRQydJkAVpvG+p0hTMP/hIfZp9zT/1iHpIkQ==} + '@opentelemetry/exporter-prometheus@0.54.0': + resolution: {integrity: sha512-httb+/c36hZvkIR9SqwXj+fLeE2XDdWfZqGO24MboNMHihmnvjE0/LN29I9CjsJqC2jEi8FErfQha/JeOfsFaA==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 @@ -6936,12 +6936,12 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/exporter-prometheus@0.53.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/exporter-prometheus@0.54.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-metrics': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-metrics': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http@0.53.0(@opentelemetry/api@1.9.0)': dependencies: From 2d124dc134c17de22b642fc5eb56ebfad1d62492 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 24 Oct 2024 22:38:33 +0800 Subject: [PATCH 258/740] chore(deps): bump @opentelemetry/exporter-trace-otlp-http from 0.53.0 to 0.54.0 (#17281) * chore(deps): bump @opentelemetry/exporter-trace-otlp-http Bumps [@opentelemetry/exporter-trace-otlp-http](https://github.com/open-telemetry/opentelemetry-js) from 0.53.0 to 0.54.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/experimental/v0.53.0...experimental/v0.54.0) --- updated-dependencies: - dependency-name: "@opentelemetry/exporter-trace-otlp-http" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install * chore: bump pnpm to 9.12.2 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +- pnpm-lock.yaml | 118 +++++++++++++++---------------------------------- 2 files changed, 37 insertions(+), 85 deletions(-) diff --git a/package.json b/package.json index 7868d83ce3464f5..9a8f9fc20818275 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.54.0", - "@opentelemetry/exporter-trace-otlp-http": "0.53.0", + "@opentelemetry/exporter-trace-otlp-http": "0.54.0", "@opentelemetry/resources": "1.27.0", "@opentelemetry/sdk-metrics": "1.27.0", "@opentelemetry/sdk-trace-base": "1.27.0", @@ -192,7 +192,7 @@ "vitest": "2.0.5", "yaml-eslint-parser": "1.2.3" }, - "packageManager": "pnpm@9.12.0", + "packageManager": "pnpm@9.12.2", "engines": { "node": ">=22" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 31ca0be407a60e2..d7a1c4acddc5543 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,8 +24,8 @@ importers: specifier: 0.54.0 version: 0.54.0(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http': - specifier: 0.53.0 - version: 0.53.0(@opentelemetry/api@1.9.0) + specifier: 0.54.0 + version: 0.54.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': specifier: 1.27.0 version: 1.27.0(@opentelemetry/api@1.9.0) @@ -1449,20 +1449,14 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@opentelemetry/api-logs@0.53.0': - resolution: {integrity: sha512-8HArjKx+RaAI8uEIgcORbZIPklyh1YLjPSBus8hjRmvLi6DeFzgOcdZ7KwPabKj8mXF8dX0hyfAyGfycz0DbFw==} + '@opentelemetry/api-logs@0.54.0': + resolution: {integrity: sha512-9HhEh5GqFrassUndqJsyW7a0PzfyWr2eV2xwzHLIS+wX3125+9HE9FMRAKmJRwxZhgZGwH3HNQQjoMGZqmOeVA==} engines: {node: '>=14'} '@opentelemetry/api@1.9.0': resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==} engines: {node: '>=8.0.0'} - '@opentelemetry/core@1.26.0': - resolution: {integrity: sha512-1iKxXXE8415Cdv0yjG3G6hQnB5eVEsJce3QaawX8SjDn0mAS0ZM8fAbZZJD4ajvhC15cePvosSCut404KrIIvQ==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/core@1.27.0': resolution: {integrity: sha512-yQPKnK5e+76XuiqUH/gKyS8wv/7qITd5ln56QkBTf3uggr0VkXOXfcaAuG330UfdYu83wsyoBwqwxigpIG+Jkg==} engines: {node: '>=14'} @@ -1475,29 +1469,23 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-trace-otlp-http@0.53.0': - resolution: {integrity: sha512-m7F5ZTq+V9mKGWYpX8EnZ7NjoqAU7VemQ1E2HAG+W/u0wpY1x0OmbxAXfGKFHCspdJk8UKlwPGrpcB8nay3P8A==} + '@opentelemetry/exporter-trace-otlp-http@0.54.0': + resolution: {integrity: sha512-00X6rtr6Ew59+MM9pPSH7Ww5ScpWKBLiBA49awbPqQuVL/Bp0qp7O1cTxKHgjWdNkhsELzJxAEYwuRnDGrMXyA==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': ^1.0.0 - - '@opentelemetry/otlp-exporter-base@0.53.0': - resolution: {integrity: sha512-UCWPreGQEhD6FjBaeDuXhiMf6kkBODF0ZQzrk/tuQcaVDJ+dDQ/xhJp192H9yWnKxVpEjFrSSLnpqmX4VwX+eA==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': ^1.0.0 + '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-transformer@0.53.0': - resolution: {integrity: sha512-rM0sDA9HD8dluwuBxLetUmoqGJKSAbWenwD65KY9iZhUxdBHRLrIdrABfNDP7aiTjcgK8XFyTn5fhDz7N+W6DA==} + '@opentelemetry/otlp-exporter-base@0.54.0': + resolution: {integrity: sha512-g+H7+QleVF/9lz4zhaR9Dt4VwApjqG5WWupy5CTMpWJfHB/nLxBbX73GBZDgdiNfh08nO3rNa6AS7fK8OhgF5g==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/resources@1.26.0': - resolution: {integrity: sha512-CPNYchBE7MBecCSVy0HKpUISEeJOniWqcHaAHpmasZ3j9o6V3AyBzhRc90jdmemq0HOxDr6ylhUbDhBqqPpeNw==} + '@opentelemetry/otlp-transformer@0.54.0': + resolution: {integrity: sha512-jRexIASQQzdK4AjfNIBfn94itAq4Q8EXR9d3b/OVbhd3kKQKvMr7GkxYDjbeTbY7hHCOLcLfJ3dpYQYGOe8qOQ==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/api': ^1.3.0 '@opentelemetry/resources@1.27.0': resolution: {integrity: sha512-jOwt2VJ/lUD5BLc+PMNymDrUCpm5PKi1E9oSVYAvz01U/VdndGmrtV3DU1pG4AwlYhJRHbHfOUIlpBeXCPw6QQ==} @@ -1505,30 +1493,18 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/sdk-logs@0.53.0': - resolution: {integrity: sha512-dhSisnEgIj/vJZXZV6f6KcTnyLDx/VuQ6l3ejuZpMpPlh9S1qMHiZU9NMmOkVkwwHkMy3G6mEBwdP23vUZVr4g==} + '@opentelemetry/sdk-logs@0.54.0': + resolution: {integrity: sha512-HeWvOPiWhEw6lWvg+lCIi1WhJnIPbI4/OFZgHq9tKfpwF3LX6/kk3+GR8sGUGAEZfbjPElkkngzvd2s03zbD7Q==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': '>=1.4.0 <1.10.0' - '@opentelemetry/sdk-metrics@1.26.0': - resolution: {integrity: sha512-0SvDXmou/JjzSDOjUmetAAvcKQW6ZrvosU0rkbDGpXvvZN+pQF6JbK/Kd4hNdK4q/22yeruqvukXEJyySTzyTQ==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-metrics@1.27.0': resolution: {integrity: sha512-JzWgzlutoXCydhHWIbLg+r76m+m3ncqvkCcsswXAQ4gqKS+LOHKhq+t6fx1zNytvLuaOUBur7EvWxECc4jPQKg==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-trace-base@1.26.0': - resolution: {integrity: sha512-olWQldtvbK4v22ymrKLbIcBi9L2SpMO84sCPY54IVsJhP9fRsxJT194C/AVaAuJzLE30EdhhM1VmvVYR7az+cw==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/sdk-trace-base@1.27.0': resolution: {integrity: sha512-btz6XTQzwsyJjombpeqCX6LhiMQYpzt2pIYNPnw0IPO/3AhT6yjnf8Mnv3ZC2A4eRYOjqrg+bfaXg9XHDRJDWQ==} engines: {node: '>=14'} @@ -6920,17 +6896,12 @@ snapshots: '@open-draft/until@2.1.0': {} - '@opentelemetry/api-logs@0.53.0': + '@opentelemetry/api-logs@0.54.0': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/api@1.9.0': {} - '@opentelemetry/core@1.26.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/core@1.27.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -6943,56 +6914,44 @@ snapshots: '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/exporter-trace-otlp-http@0.53.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/exporter-trace-otlp-http@0.54.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base': 0.53.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.53.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-exporter-base': 0.54.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.54.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base@0.53.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/otlp-exporter-base@0.54.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.53.0(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.54.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer@0.53.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/otlp-transformer@0.54.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.53.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-logs': 0.53.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-metrics': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/api-logs': 0.54.0 + '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-logs': 0.54.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-metrics': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.27.0(@opentelemetry/api@1.9.0) protobufjs: 7.4.0 - '@opentelemetry/resources@1.26.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/resources@1.27.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/sdk-logs@0.53.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/sdk-logs@0.54.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.53.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) - - '@opentelemetry/sdk-metrics@1.26.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) + '@opentelemetry/api-logs': 0.54.0 + '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics@1.27.0(@opentelemetry/api@1.9.0)': dependencies: @@ -7000,13 +6959,6 @@ snapshots: '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base@1.26.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.26.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/sdk-trace-base@1.27.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 From 72af9b09941738a9a2ea5f1399d19525dcd8139b Mon Sep 17 00:00:00 2001 From: Keo <keocheung@outlook.com> Date: Thu, 24 Oct 2024 23:20:00 +0800 Subject: [PATCH 259/740] fix(route/sis001): fix namespace description (#17273) --- lib/routes/sis001/namespace.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/sis001/namespace.ts b/lib/routes/sis001/namespace.ts index 2ae6f574c672513..9203414a6e67702 100644 --- a/lib/routes/sis001/namespace.ts +++ b/lib/routes/sis001/namespace.ts @@ -4,6 +4,6 @@ export const namespace: Namespace = { name: '第一会所', url: 'sis001.com', description: `:::tip - 第一会所有多个备用网址,本路由默认使用\`https://sis001.com\`,若该网址无法访问,可以在部署实例的时候通过\`SIS001_BASE_URL\`环境变量配置要使用的地址,如\`https://www.sis001.com\`等) + 第一会所有多个备用网址,本路由默认使用\`https://sis001.com\`,若该网址无法访问,可以在部署实例的时候通过\`SIS001_BASE_URL\`环境变量配置要使用的地址,如\`https://www.sis001.com\`等 :::`, }; From b9e94f07c5330df63dfa449c53436dd214a8abc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=B9=E6=9E=97=E9=87=8C=E6=9C=89=E5=86=B0?= <zhullyb@outlook.com> Date: Thu, 24 Oct 2024 23:40:37 +0800 Subject: [PATCH 260/740] =?UTF-8?q?feat(route/zjut):=20Add=20=E6=B5=99?= =?UTF-8?q?=E6=B1=9F=E5=B7=A5=E4=B8=9A=E5=A4=A7=E5=AD=A6=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=20(#17274)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/zjut/www/index.ts | 110 +++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 lib/routes/zjut/www/index.ts diff --git a/lib/routes/zjut/www/index.ts b/lib/routes/zjut/www/index.ts new file mode 100644 index 000000000000000..67d5a5e11ba5c5a --- /dev/null +++ b/lib/routes/zjut/www/index.ts @@ -0,0 +1,110 @@ +import { Data, Route } from '@/types'; +import cache from '@/utils/cache'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; +import timezone from '@/utils/timezone'; + +const rootUrl = 'https://www.zjut.edu.cn/'; +const host = 'www.zjut.edu.cn'; + +export const route: Route = { + path: '/www/:type', + categories: ['university'], + example: '/zjut/www/4528', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '浙江工业大学首页', + maintainers: ['zhullyb'], + url: 'www.zjut.edu.cn', + handler, + radar: [ + { + source: ['www.zjut.edu.cn/:type/list.htm'], + target: '/www/:type', + }, + ], + description: `| 板块 | 参数 | +| ------- | ------- | +| 学术动态 | xsdt_4662 | +| 三创·人物 | 4527 | +| 通知公告 | 4528 | +| 美誉工大 | 5389 | +| 智库工大 | 5390 | +| 校区班车 | xqbc |`, +}; + +async function handler(ctx) { + const type = ctx.req.param('type'); + const response = await ofetch(rootUrl + type + '/list.htm'); + const $ = load(response); + + const list = $('li.news.clearfix') + .toArray() + .map((item) => { + const cheerioItem = $(item); + const a = cheerioItem.find('a'); + + try { + const title = a.text() || ''; + let link = a.attr('href'); + if (!link) { + link = ''; + } else if (!link.startsWith('http')) { + link = rootUrl.slice(0, -1) + link; + } + const pubDate = timezone(parseDate(cheerioItem.find('.news_meta').text().slice(1, -1)), +8); + + return { + title, + link, + pubDate, + }; + } catch { + return { + title: '', + link: '', + pubDate: Date.now(), + }; + } + }) + .filter((item) => item.title && item.link); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const newItem = { + ...item, + description: '', + }; + if (host === new URL(item.link).hostname) { + if (new URL(item.link).pathname.startsWith('/upload')) { + // 链接为一个文件,直接返回链接 + newItem.description = item.link; + } else { + const response = await ofetch(item.link); + const $ = load(response); + newItem.description = $('div.wp_articlecontent').html() || ''; + } + } else { + // 涉及到其他站点,不方便做统一的 html 解析,直接返回链接 + newItem.description = item.link; + } + return newItem; + }) + ) + ); + + return { + title: $('li#classname').text() + ' - 浙江工业大学', + link: rootUrl + type, + item: items, + } as Data; +} From 32bebcaff931a7b487c394ea52a91e79227b7373 Mon Sep 17 00:00:00 2001 From: Keo <keocheung@outlook.com> Date: Thu, 24 Oct 2024 23:49:39 +0800 Subject: [PATCH 261/740] fix(route/sis001): standardize guid for different base URLs (#17275) --- lib/routes/sis001/common.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/routes/sis001/common.ts b/lib/routes/sis001/common.ts index 352866c794816cf..92ee06aea8b23a1 100644 --- a/lib/routes/sis001/common.ts +++ b/lib/routes/sis001/common.ts @@ -43,6 +43,7 @@ async function getThread(cookie: string, item: DataItem) { const response = await got(item.link, { headers: { cookie } }); const $ = load(response.data); + item.guid = item.link?.replace(/^https?:\/\/.+?\//, 'https://www.sis001.com/'); item.category = $('.posttags a') .toArray() .map((a) => $(a).text()); From b8a46a161d37a9b699c1aaa1212e0260e8879acd Mon Sep 17 00:00:00 2001 From: karasu <karasu.shing@gmail.com> Date: Fri, 25 Oct 2024 00:07:59 +0800 Subject: [PATCH 262/740] fix(route/sorrycc): add pubDate (#17277) --- lib/routes/sorrycc/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/sorrycc/index.ts b/lib/routes/sorrycc/index.ts index f9f3d6cc50352be..6d96a4db939a01c 100644 --- a/lib/routes/sorrycc/index.ts +++ b/lib/routes/sorrycc/index.ts @@ -46,7 +46,7 @@ async function handler(ctx: Context): Promise<Data> { data.map(async (item) => { const title = item.title.rendered; const link = item.link; - const published = parseDate(item.date_gmt); + const pubDate = parseDate(item.date_gmt); const updated = parseDate(item.modified_gmt); if (item.categories.includes(7) && cookie) { return (await cache.tryGet(link, async () => { @@ -61,7 +61,7 @@ async function handler(ctx: Context): Promise<Data> { title, description, link, - published, + pubDate, updated, }; })) as unknown as DataItem; @@ -70,7 +70,7 @@ async function handler(ctx: Context): Promise<Data> { title, description: item.content.rendered, link, - published, + pubDate, updated, } as DataItem; }) From 8e399546ece1b3c2133f003544dbc83910e6f2d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=B9=E6=9E=97=E9=87=8C=E6=9C=89=E5=86=B0?= <zhullyb@outlook.com> Date: Fri, 25 Oct 2024 00:28:45 +0800 Subject: [PATCH 263/740] =?UTF-8?q?fix(route/zjut):=20fix=20the=20title=20?= =?UTF-8?q?of=20=E6=B5=99=E6=B1=9F=E5=B7=A5=E4=B8=9A=E5=A4=A7=E5=AD=A6?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=20(#17290)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/zjut/www/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/zjut/www/index.ts b/lib/routes/zjut/www/index.ts index 67d5a5e11ba5c5a..f86ccef2bf75936 100644 --- a/lib/routes/zjut/www/index.ts +++ b/lib/routes/zjut/www/index.ts @@ -103,7 +103,7 @@ async function handler(ctx) { ); return { - title: $('li#classname').text() + ' - 浙江工业大学', + title: $('head > title').text() + ' - 浙江工业大学', link: rootUrl + type, item: items, } as Data; From c46119dc8ab4a049f131be07b6850194cc04f8f3 Mon Sep 17 00:00:00 2001 From: tourist <49434568+Blank0120@users.noreply.github.com> Date: Fri, 25 Oct 2024 01:22:29 +0800 Subject: [PATCH 264/740] fix(route/nodejs): Aready has official rss, and tweak selector of nodejs, but still has language error. (#17289) --- lib/routes/nodejs/blog.ts | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/lib/routes/nodejs/blog.ts b/lib/routes/nodejs/blog.ts index 4153209e3fea13b..0d3700e7cbe8fa3 100644 --- a/lib/routes/nodejs/blog.ts +++ b/lib/routes/nodejs/blog.ts @@ -25,7 +25,8 @@ export const route: Route = { name: 'News', maintainers: ['nczitzk'], handler, - description: `| العربية | Catalan | Deutsch | Español | زبان فارسی | + description: `Official RSS Source: https://nodejs.org/en/feed/blog.xml + | العربية | Catalan | Deutsch | Español | زبان فارسی | | ------- | ------- | ------- | ------- | ---------- | | ar | ca | de | es | fa | @@ -55,16 +56,22 @@ async function handler(ctx) { const $ = load(response.data); - $('.summary').remove(); - - let items = $('ul.blog-index li a') + let items = $('article') .toArray() - .map((item) => { - item = $(item); + .map((article) => { + const $article = load(article); + + const author = $article('footer p').text(); + const pubDate = parseDate($article('footer time').attr('datetime')); + + const title = $article('a[aria-label]').prop('aria-label'); + const href = $article('a[aria-label]').attr('href'); return { - title: item.text(), - link: `${rootUrl}${item.attr('href')}`, + title, + link: `${rootUrl}${href}`, + author, + pubDate, }; }); @@ -76,17 +83,9 @@ async function handler(ctx) { url: item.link, }); - const content = load(detailResponse.data); - - item.pubDate = parseDate(content('time').attr('datetime')); - item.author = content('.blogpost-meta') - .text() - .match(/by (.*), /)?.[1]; - - content('.blogpost-header').remove(); - - item.description = content('article').html(); + const $content = load(detailResponse.data); + item.description = $content('main').html(); return item; }) ) From 7a74a131d531d170648d05e6fc9ed95d48ec438b Mon Sep 17 00:00:00 2001 From: lzk <linzhikang2013@163.com> Date: Fri, 25 Oct 2024 02:01:02 +0800 Subject: [PATCH 265/740] feat: HOTLINK_TEMPLATE environment variable applied to audio and video link (#17287) Co-authored-by: linzhikang <linzhikang@bytedance.com> --- lib/middleware/anti-hotlink.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/middleware/anti-hotlink.ts b/lib/middleware/anti-hotlink.ts index a5a0ad3c7b96c89..6b04cda304c7696 100644 --- a/lib/middleware/anti-hotlink.ts +++ b/lib/middleware/anti-hotlink.ts @@ -117,6 +117,7 @@ const middleware: MiddlewareHandler = async (ctx, next) => { // Force config hotlink template on conflict if (config.hotlink.template) { imageHotlinkTemplate = filterPath(ctx.req.path) ? config.hotlink.template : undefined; + multimediaHotlinkTemplate = filterPath(ctx.req.path) ? config.hotlink.template : undefined; } if (!imageHotlinkTemplate && !multimediaHotlinkTemplate) { From 9a651febef61ccc3bf9e2b372c690df02a1607a8 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:15:53 -0700 Subject: [PATCH 266/740] refactor: split bangumi (#17293) * refactor: split bangumi * fix: template path * feat!: remove `/user/wish/:id` since it's equivalent to /user/collections/:id/2/1 * refactor: use ofetch --- .../{bangumi/moe => bangumi.moe}/index.ts | 11 ++-- lib/routes/bangumi.moe/namespace.ts | 6 ++ .../{bangumi => bangumi.online}/namespace.ts | 2 +- .../online => bangumi.online}/online.ts | 6 +- .../templates}/image.art | 0 .../tv => bangumi.tv}/calendar/_base.ts | 0 .../tv => bangumi.tv}/calendar/today.ts | 14 ++--- .../{bangumi/tv => bangumi.tv}/group/reply.ts | 8 +-- .../{bangumi/tv => bangumi.tv}/group/topic.ts | 38 ++++++------ lib/routes/bangumi.tv/namespace.ts | 6 ++ .../tv => bangumi.tv}/other/followrank.ts | 9 +-- .../tv => bangumi.tv}/person/index.ts | 8 +-- .../tv => bangumi.tv}/subject/comments.ts | 4 +- .../{bangumi/tv => bangumi.tv}/subject/ep.ts | 14 ++--- .../tv => bangumi.tv}/subject/index.ts | 4 +- .../subject/offcial-subject-api.ts | 4 +- .../tv => bangumi.tv}/subject/utils.ts | 0 .../tv => bangumi.tv/templates}/ep.art | 0 .../tv => bangumi.tv/templates}/subject.art | 0 .../tv => bangumi.tv/templates}/today.art | 0 .../{bangumi/tv => bangumi.tv}/user/blog.ts | 20 +++--- .../tv => bangumi.tv}/user/collections.ts | 40 ++++++++---- lib/routes/bangumi/tv/user/wish.ts | 62 ------------------- 23 files changed, 105 insertions(+), 151 deletions(-) rename lib/routes/{bangumi/moe => bangumi.moe}/index.ts (94%) create mode 100644 lib/routes/bangumi.moe/namespace.ts rename lib/routes/{bangumi => bangumi.online}/namespace.ts (81%) rename lib/routes/{bangumi/online => bangumi.online}/online.ts (91%) rename lib/routes/{bangumi/templates/online => bangumi.online/templates}/image.art (100%) rename lib/routes/{bangumi/tv => bangumi.tv}/calendar/_base.ts (100%) rename lib/routes/{bangumi/tv => bangumi.tv}/calendar/today.ts (89%) rename lib/routes/{bangumi/tv => bangumi.tv}/group/reply.ts (94%) rename lib/routes/{bangumi/tv => bangumi.tv}/group/topic.ts (54%) create mode 100644 lib/routes/bangumi.tv/namespace.ts rename lib/routes/{bangumi/tv => bangumi.tv}/other/followrank.ts (90%) rename lib/routes/{bangumi/tv => bangumi.tv}/person/index.ts (92%) rename lib/routes/{bangumi/tv => bangumi.tv}/subject/comments.ts (95%) rename lib/routes/{bangumi/tv => bangumi.tv}/subject/ep.ts (73%) rename lib/routes/{bangumi/tv => bangumi.tv}/subject/index.ts (94%) rename lib/routes/{bangumi/tv => bangumi.tv}/subject/offcial-subject-api.ts (93%) rename lib/routes/{bangumi/tv => bangumi.tv}/subject/utils.ts (100%) rename lib/routes/{bangumi/templates/tv => bangumi.tv/templates}/ep.art (100%) rename lib/routes/{bangumi/templates/tv => bangumi.tv/templates}/subject.art (100%) rename lib/routes/{bangumi/templates/tv => bangumi.tv/templates}/today.art (100%) rename lib/routes/{bangumi/tv => bangumi.tv}/user/blog.ts (81%) rename lib/routes/{bangumi/tv => bangumi.tv}/user/collections.ts (83%) delete mode 100644 lib/routes/bangumi/tv/user/wish.ts diff --git a/lib/routes/bangumi/moe/index.ts b/lib/routes/bangumi.moe/index.ts similarity index 94% rename from lib/routes/bangumi/moe/index.ts rename to lib/routes/bangumi.moe/index.ts index 1dea1500b281dcc..e8a3667a8a576a4 100644 --- a/lib/routes/bangumi/moe/index.ts +++ b/lib/routes/bangumi.moe/index.ts @@ -5,21 +5,22 @@ import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/moe/*', + path: '/*', + categories: ['anime'], radar: [ { source: ['bangumi.moe/'], - target: '/moe', }, ], - name: 'Unknown', - maintainers: [], + name: 'Latest', + example: '/bangumi.moe', + maintainers: ['nczitzk'], handler, url: 'bangumi.moe/', }; async function handler(ctx) { - const isLatest = getSubPath(ctx) === '/moe'; + const isLatest = getSubPath(ctx) === '/'; const rootUrl = 'https://bangumi.moe'; let response; diff --git a/lib/routes/bangumi.moe/namespace.ts b/lib/routes/bangumi.moe/namespace.ts new file mode 100644 index 000000000000000..39f74acda7aff1f --- /dev/null +++ b/lib/routes/bangumi.moe/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '萌番组', + url: 'bangumi.online', +}; diff --git a/lib/routes/bangumi/namespace.ts b/lib/routes/bangumi.online/namespace.ts similarity index 81% rename from lib/routes/bangumi/namespace.ts rename to lib/routes/bangumi.online/namespace.ts index c2670f8bca306f7..48b8e5f4bb055bd 100644 --- a/lib/routes/bangumi/namespace.ts +++ b/lib/routes/bangumi.online/namespace.ts @@ -2,5 +2,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'アニメ新番組', - url: 'bangumi.moe', + url: 'bangumi.online', }; diff --git a/lib/routes/bangumi/online/online.ts b/lib/routes/bangumi.online/online.ts similarity index 91% rename from lib/routes/bangumi/online/online.ts rename to lib/routes/bangumi.online/online.ts index 02dcc058b404f93..9312fc8b5c5f8d2 100644 --- a/lib/routes/bangumi/online/online.ts +++ b/lib/routes/bangumi.online/online.ts @@ -8,9 +8,9 @@ import { parseDate } from '@/utils/parse-date'; import path from 'node:path'; export const route: Route = { - path: '/online', + path: '/', categories: ['anime'], - example: '/bangumi/online', + example: '/bangumi.online', parameters: {}, features: { requireConfig: false, @@ -40,7 +40,7 @@ async function handler() { const items = list.map((item) => ({ title: `${item.title.zh ?? item.title.ja} - 第 ${item.volume} 集`, - description: art(path.join(__dirname, '../templates/online/image.art'), { + description: art(path.join(__dirname, 'templates/image.art'), { src: `https:${item.cover}`, alt: `${item.title_zh} - 第 ${item.volume} 集`, }), diff --git a/lib/routes/bangumi/templates/online/image.art b/lib/routes/bangumi.online/templates/image.art similarity index 100% rename from lib/routes/bangumi/templates/online/image.art rename to lib/routes/bangumi.online/templates/image.art diff --git a/lib/routes/bangumi/tv/calendar/_base.ts b/lib/routes/bangumi.tv/calendar/_base.ts similarity index 100% rename from lib/routes/bangumi/tv/calendar/_base.ts rename to lib/routes/bangumi.tv/calendar/_base.ts diff --git a/lib/routes/bangumi/tv/calendar/today.ts b/lib/routes/bangumi.tv/calendar/today.ts similarity index 89% rename from lib/routes/bangumi/tv/calendar/today.ts rename to lib/routes/bangumi.tv/calendar/today.ts index a82807c2a951694..2f12eaa9cae9b6d 100644 --- a/lib/routes/bangumi/tv/calendar/today.ts +++ b/lib/routes/bangumi.tv/calendar/today.ts @@ -8,9 +8,9 @@ import { art } from '@/utils/render'; import path from 'node:path'; export const route: Route = { - path: '/tv/calendar/today', + path: '/calendar/today', categories: ['anime'], - example: '/bangumi/tv/calendar/today', + example: '/bangumi.tv/calendar/today', parameters: {}, features: { requireConfig: false, @@ -42,10 +42,10 @@ async function handler() { const todayList = list.find((l) => l.weekday.id % 7 === day); const todayBgmId = new Set(todayList.items.map((t) => t.id.toString())); - const images = todayList.items.reduce((p, c) => { - p[c.id] = (c.images || {}).large; - return p; - }, {}); + const images: { [key: string]: string } = {}; + for (const item of todayList.items) { + images[item.id] = (item.images || {}).large; + } const todayBgm = data.items.filter((d) => todayBgmId.has(d.bgmId)); for (const bgm of todayBgm) { bgm.image = images[bgm.bgmId]; @@ -65,7 +65,7 @@ async function handler() { const link = `https://bangumi.tv/subject/${bgm.bgmId}`; const id = `${link}#${new Intl.DateTimeFormat('zh-CN').format(updated)}`; - const html = art(path.resolve(__dirname, '../../templates/tv/today.art'), { + const html = art(path.join(__dirname, '../templates/today.art'), { bgm, siteMeta, }); diff --git a/lib/routes/bangumi/tv/group/reply.ts b/lib/routes/bangumi.tv/group/reply.ts similarity index 94% rename from lib/routes/bangumi/tv/group/reply.ts rename to lib/routes/bangumi.tv/group/reply.ts index 6e4cd264f509ccd..33a25c0dab1a4c6 100644 --- a/lib/routes/bangumi/tv/group/reply.ts +++ b/lib/routes/bangumi.tv/group/reply.ts @@ -1,13 +1,13 @@ import { Route } from '@/types'; -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'; export const route: Route = { - path: '/tv/topic/:id', + path: '/topic/:id', categories: ['anime'], - example: '/bangumi/tv/topic/367032', + example: '/bangumi.tv/topic/367032', parameters: { id: '话题 id, 在话题页面地址栏查看' }, features: { requireConfig: false, @@ -31,7 +31,7 @@ async function handler(ctx) { // bangumi.tv未提供获取小组话题的API,因此仍需要通过抓取网页来获取 const topicID = ctx.req.param('id'); const link = `https://bgm.tv/group/topic/${topicID}`; - const { data: html } = await got(link); + const html = await ofetch(link); const $ = load(html); const title = $('#pageHeader h1').text(); const latestReplies = $('.row_reply') diff --git a/lib/routes/bangumi/tv/group/topic.ts b/lib/routes/bangumi.tv/group/topic.ts similarity index 54% rename from lib/routes/bangumi/tv/group/topic.ts rename to lib/routes/bangumi.tv/group/topic.ts index 95f9b37aada29d1..2ba94387fc73be5 100644 --- a/lib/routes/bangumi/tv/group/topic.ts +++ b/lib/routes/bangumi.tv/group/topic.ts @@ -1,14 +1,14 @@ 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'; -const base_url = 'https://bgm.tv'; +const baseUrl = 'https://bgm.tv'; export const route: Route = { - path: '/tv/group/:id', + path: '/group/:id', categories: ['anime'], - example: '/bangumi/tv/group/boring', + example: '/bangumi.tv/group/boring', parameters: { id: '小组 id, 在小组页面地址栏查看' }, features: { requireConfig: false, @@ -30,29 +30,29 @@ export const route: Route = { async function handler(ctx) { const groupID = ctx.req.param('id'); - const link = `${base_url}/group/${groupID}/forum`; - const { data: html } = await got(link); + const link = `${baseUrl}/group/${groupID}/forum`; + const html = await ofetch(link); const $ = load(html); const title = 'Bangumi - ' + $('.SecondaryNavTitle').text(); const items = await Promise.all( $('.topic_list .topic') .toArray() - .map(async (elem) => { - const link = new URL($('.subject a', elem).attr('href'), base_url).href; - const fullText = await cache.tryGet(link, async () => { - const { data: html } = await got(link); + .map((elem) => { + const link = new URL($('.subject a', elem).attr('href'), baseUrl).href; + return cache.tryGet(link, async () => { + const html = await ofetch(link); const $ = load(html); - return $('.postTopic .topic_content').html(); + const fullText = $('.postTopic .topic_content').html(); + const summary = 'Reply: ' + $('.posts', elem).text(); + return { + link, + title: $('.subject a', elem).attr('title'), + pubDate: parseDate($('.lastpost .time', elem).text()), + description: fullText ? summary + '<br><br>' + fullText : summary, + author: $('.author a', elem).text(), + }; }); - const summary = 'Reply: ' + $('.posts', elem).text(); - return { - link, - title: $('.subject a', elem).attr('title'), - pubDate: parseDate($('.lastpost .time', elem).text()), - description: fullText ? summary + '<br><br>' + fullText : summary, - author: $('.author a', elem).text(), - }; }) ); diff --git a/lib/routes/bangumi.tv/namespace.ts b/lib/routes/bangumi.tv/namespace.ts new file mode 100644 index 000000000000000..718427a25db9a8b --- /dev/null +++ b/lib/routes/bangumi.tv/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Bangumi 番组计划', + url: 'bangumi.tv', +}; diff --git a/lib/routes/bangumi/tv/other/followrank.ts b/lib/routes/bangumi.tv/other/followrank.ts similarity index 90% rename from lib/routes/bangumi/tv/other/followrank.ts rename to lib/routes/bangumi.tv/other/followrank.ts index 253a65c48de38d8..52d76918c07dedb 100644 --- a/lib/routes/bangumi/tv/other/followrank.ts +++ b/lib/routes/bangumi.tv/other/followrank.ts @@ -1,12 +1,11 @@ import { Route } from '@/types'; import { load } from 'cheerio'; -import { config } from '@/config'; import ofetch from '@/utils/ofetch'; export const route: Route = { path: '/:type/followrank', categories: ['anime'], - example: '/bangumi/anime/followrank', + example: '/bangumi.tv/anime/followrank', parameters: { type: '类型:anime - 动画,book - 图书,music - 音乐,game - 游戏,real - 三次元' }, features: { requireConfig: false, @@ -34,11 +33,7 @@ async function handler(ctx) { } const url = `https://bgm.tv/${type}`; - const response = await ofetch(url, { - headers: { - 'User-Agent': config.trueUA, - }, - }); + const response = await ofetch(url); const $ = load(response); diff --git a/lib/routes/bangumi/tv/person/index.ts b/lib/routes/bangumi.tv/person/index.ts similarity index 92% rename from lib/routes/bangumi/tv/person/index.ts rename to lib/routes/bangumi.tv/person/index.ts index 58cc88fef36a4f9..d4e566f81e071a9 100644 --- a/lib/routes/bangumi/tv/person/index.ts +++ b/lib/routes/bangumi.tv/person/index.ts @@ -1,12 +1,12 @@ import { Route } from '@/types'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/tv/person/:id', + path: '/person/:id', categories: ['anime'], - example: '/bangumi/tv/person/32943', + example: '/bangumi.tv/person/32943', parameters: { id: '人物 id, 在人物页面的地址栏查看' }, features: { requireConfig: false, @@ -30,7 +30,7 @@ async function handler(ctx) { // bangumi.tv未提供获取“人物信息”的API,因此仍需要通过抓取网页来获取 const personID = ctx.req.param('id'); const link = `https://bgm.tv/person/${personID}/works?sort=date`; - const { data: html } = await got(link); + const html = await ofetch(link); const $ = load(html); const personName = $('.nameSingle a').text(); const works = $('.item') diff --git a/lib/routes/bangumi/tv/subject/comments.ts b/lib/routes/bangumi.tv/subject/comments.ts similarity index 95% rename from lib/routes/bangumi/tv/subject/comments.ts rename to lib/routes/bangumi.tv/subject/comments.ts index 685a907c7c2d287..4f52ee191b469db 100644 --- a/lib/routes/bangumi/tv/subject/comments.ts +++ b/lib/routes/bangumi.tv/subject/comments.ts @@ -1,11 +1,11 @@ -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; const getComments = async (subjectID, minLength) => { // bangumi.tv未提供获取“吐槽(comments)”的API,因此仍需要通过抓取网页来获取 const link = `https://bgm.tv/subject/${subjectID}/comments`; - const { data: html } = await got(link); + const html = await ofetch(link); const $ = load(html); const title = $('.nameSingle').find('a').text(); const comments = $('.item') diff --git a/lib/routes/bangumi/tv/subject/ep.ts b/lib/routes/bangumi.tv/subject/ep.ts similarity index 73% rename from lib/routes/bangumi/tv/subject/ep.ts rename to lib/routes/bangumi.tv/subject/ep.ts index dcebbc3d12ff523..04d41847bc09b61 100644 --- a/lib/routes/bangumi/tv/subject/ep.ts +++ b/lib/routes/bangumi.tv/subject/ep.ts @@ -1,7 +1,7 @@ import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; @@ -9,14 +9,8 @@ import { getLocalName } from './utils'; const getEps = async (subjectID, showOriginalName) => { const url = `https://api.bgm.tv/subject/${subjectID}?responseGroup=large`; - const { data: epsInfo } = await got(url); - const activeEps = []; - - for (const e of epsInfo.eps) { - if (e.status === 'Air') { - activeEps.push(e); - } - } + const epsInfo = await ofetch(url); + const activeEps = epsInfo.eps.filter((e) => e.status === 'Air'); return { title: getLocalName(epsInfo, showOriginalName), @@ -24,7 +18,7 @@ const getEps = async (subjectID, showOriginalName) => { description: epsInfo.summary, item: activeEps.map((e) => ({ title: `ep.${e.sort} ${getLocalName(e, showOriginalName)}`, - description: art(path.resolve(__dirname, '../../templates/tv/ep.art'), { + description: art(path.join(__dirname, '../templates/ep.art'), { e, epsInfo, }), diff --git a/lib/routes/bangumi/tv/subject/index.ts b/lib/routes/bangumi.tv/subject/index.ts similarity index 94% rename from lib/routes/bangumi/tv/subject/index.ts rename to lib/routes/bangumi.tv/subject/index.ts index 83416b2d83528ef..cbc7a4cbee89fe5 100644 --- a/lib/routes/bangumi/tv/subject/index.ts +++ b/lib/routes/bangumi.tv/subject/index.ts @@ -6,9 +6,9 @@ import { queryToBoolean } from '@/utils/readable-social'; import InvalidParameterError from '@/errors/types/invalid-parameter'; export const route: Route = { - path: '/tv/subject/:id/:type?/:showOriginalName?', + path: '/subject/:id/:type?/:showOriginalName?', categories: ['anime'], - example: '/bangumi/tv/subject/328609/ep/true', + example: '/bangumi.tv/subject/328609/ep/true', parameters: { id: '条目 id, 在条目页面的地址栏查看', type: '条目类型,可选值为 `ep`, `comments`, `blogs`, `topics`,默认为 `ep`', showOriginalName: '显示番剧标题原名,可选值 0/1/false/true,默认为 false' }, features: { requireConfig: false, diff --git a/lib/routes/bangumi/tv/subject/offcial-subject-api.ts b/lib/routes/bangumi.tv/subject/offcial-subject-api.ts similarity index 93% rename from lib/routes/bangumi/tv/subject/offcial-subject-api.ts rename to lib/routes/bangumi.tv/subject/offcial-subject-api.ts index be2b992ae3a1e97..cefadca81aa41c0 100644 --- a/lib/routes/bangumi/tv/subject/offcial-subject-api.ts +++ b/lib/routes/bangumi.tv/subject/offcial-subject-api.ts @@ -1,4 +1,4 @@ -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { getLocalName } from './utils'; @@ -17,7 +17,7 @@ const getFromAPI = (type) => { return async (subjectID, showOriginalName) => { // 官方提供的条目API文档见 https://github.com/bangumi/api/blob/3f3fa6390c468816f9883d24be488e41f8946159/docs-raw/Subject-API.md const url = `https://api.bgm.tv/subject/${subjectID}?responseGroup=large`; - const { data: subjectInfo } = await got(url); + const subjectInfo = await ofetch(url); return { title: `${getLocalName(subjectInfo, showOriginalName)}的 Bangumi ${mapping[type].cn}`, link: `https://bgm.tv/subject/${subjectInfo.id}/${mapping[type].en}`, diff --git a/lib/routes/bangumi/tv/subject/utils.ts b/lib/routes/bangumi.tv/subject/utils.ts similarity index 100% rename from lib/routes/bangumi/tv/subject/utils.ts rename to lib/routes/bangumi.tv/subject/utils.ts diff --git a/lib/routes/bangumi/templates/tv/ep.art b/lib/routes/bangumi.tv/templates/ep.art similarity index 100% rename from lib/routes/bangumi/templates/tv/ep.art rename to lib/routes/bangumi.tv/templates/ep.art diff --git a/lib/routes/bangumi/templates/tv/subject.art b/lib/routes/bangumi.tv/templates/subject.art similarity index 100% rename from lib/routes/bangumi/templates/tv/subject.art rename to lib/routes/bangumi.tv/templates/subject.art diff --git a/lib/routes/bangumi/templates/tv/today.art b/lib/routes/bangumi.tv/templates/today.art similarity index 100% rename from lib/routes/bangumi/templates/tv/today.art rename to lib/routes/bangumi.tv/templates/today.art diff --git a/lib/routes/bangumi/tv/user/blog.ts b/lib/routes/bangumi.tv/user/blog.ts similarity index 81% rename from lib/routes/bangumi/tv/user/blog.ts rename to lib/routes/bangumi.tv/user/blog.ts index b005291e1f12e47..da55b03efb58a8f 100644 --- a/lib/routes/bangumi/tv/user/blog.ts +++ b/lib/routes/bangumi.tv/user/blog.ts @@ -1,14 +1,14 @@ 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'; export const route: Route = { - path: '/tv/user/blog/:id', + path: '/user/blog/:id', categories: ['anime'], - example: '/bangumi/tv/user/blog/sai', + example: '/bangumi.tv/user/blog/sai', parameters: { id: '用户 id, 在用户页面地址栏查看' }, features: { requireConfig: false, @@ -22,6 +22,9 @@ export const route: Route = { { source: ['bgm.tv/user/:id'], }, + { + source: ['bangumi.tv/user/:id'], + }, ], name: '用户日志', maintainers: ['nczitzk'], @@ -30,11 +33,8 @@ export const route: Route = { async function handler(ctx) { const currentUrl = `https://bgm.tv/user/${ctx.req.param('id')}/blog`; - const response = await got({ - method: 'get', - url: currentUrl, - }); - const $ = load(response.data); + const response = await ofetch(currentUrl); + const $ = load(response); const list = $('#entry_list div.item') .find('h2.title') .toArray() @@ -51,8 +51,8 @@ async function handler(ctx) { const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { - const res = await got({ method: 'get', url: item.link }); - const content = load(res.data); + const res = await ofetch(item.link); + const content = load(res); item.description = content('#entry_content').html(); return item; diff --git a/lib/routes/bangumi/tv/user/collections.ts b/lib/routes/bangumi.tv/user/collections.ts similarity index 83% rename from lib/routes/bangumi/tv/user/collections.ts rename to lib/routes/bangumi.tv/user/collections.ts index e1b43e4df078235..dc4676445161b4c 100644 --- a/lib/routes/bangumi/tv/user/collections.ts +++ b/lib/routes/bangumi.tv/user/collections.ts @@ -1,5 +1,5 @@ import { Route } from '@/types'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; @@ -53,9 +53,9 @@ const getTypeNames = (subjectType) => { }; export const route: Route = { - path: '/tv/user/collections/:id/:subjectType/:type', + path: '/user/collections/:id/:subjectType/:type', categories: ['anime'], - example: '/bangumi/tv/user/collections/sai/1/1', + example: '/bangumi.tv/user/collections/sai/1/1', parameters: { id: '用户 id, 在用户页面地址栏查看', subjectType: { @@ -89,9 +89,26 @@ export const route: Route = { supportPodcast: false, supportScihub: false, }, - radar: [], + radar: [ + { + source: ['bgm.tv/anime/list/:id'], + target: '/bangumi.tv/user/collections/:id/all/all', + }, + { + source: ['bangumi.tv/anime/list/:id'], + target: '/bangumi.tv/user/collections/:id/all/all', + }, + { + source: ['bgm.tv/anime/list/:id/wish'], + target: '/bangumi.tv/user/collections/:id/2/1', + }, + { + source: ['bangumi.tv/anime/list/:id/wish'], + target: '/bangumi.tv/user/collections/:id/2/1', + }, + ], name: 'Bangumi 用户收藏列表', - maintainers: ['youyou-sudo'], + maintainers: ['youyou-sudo', 'honue'], handler, }; @@ -125,30 +142,28 @@ async function handler(ctx) { } const userDataUrl = `https://api.bgm.tv/v0/users/${userId}`; - const userData = await got(userDataUrl, { - method: 'get', + const userData = await ofetch(userDataUrl, { headers: { 'User-Agent': config.trueUA, }, }); const collectionDataUrl = `https://api.bgm.tv/v0/users/${userId}/collections?${subjectType && subjectType !== 'all' ? `subject_type=${subjectType}` : ''}${type && type !== 'all' ? `&type=${type}` : ''}`; - const collectionData = await got(collectionDataUrl, { - method: 'get', + const collectionData = await ofetch(collectionDataUrl, { headers: { 'User-Agent': config.trueUA, }, }); - const userNickname = userData.data.nickname; - const items = collectionData.data.data.map((item) => { + const userNickname = userData.nickname; + const items = collectionData.data.map((item) => { const titles = item.subject.name_cn || item.subject.name; const updateTime = item.updated_at; const subjectId = item.subject_id; return { title: `${type === 'all' ? `${getTypeNames(item.subject_type)[item.type]}:` : ''}${titles}`, - description: art(path.join(__dirname, '../../templates/tv/subject.art'), { + description: art(path.join(__dirname, '../templates/subject.art'), { routeSubjectType: subjectType, subjectTypeName: subjectTypeNames[item.subject_type], subjectType: item.subject_type, @@ -160,7 +175,6 @@ async function handler(ctx) { }), link: `https://bgm.tv/subject/${subjectId}`, pubDate: timezone(parseDate(updateTime), 0), - urls: `https://bgm.tv/subject/${subjectId}`, }; }); return { diff --git a/lib/routes/bangumi/tv/user/wish.ts b/lib/routes/bangumi/tv/user/wish.ts deleted file mode 100644 index 355f017d6892d73..000000000000000 --- a/lib/routes/bangumi/tv/user/wish.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { Route } from '@/types'; -import got from '@/utils/got'; -import { load } from 'cheerio'; -import timezone from '@/utils/timezone'; -import { parseDate } from '@/utils/parse-date'; -import { config } from '@/config'; -export const route: Route = { - path: '/tv/user/wish/:id', - categories: ['anime'], - example: '/bangumi/tv/user/wish/sai', - parameters: { id: '用户 id, 在用户页面地址栏查看' }, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - radar: [ - { - source: ['bgm.tv/anime/list/:id/wish'], - }, - ], - name: '用户想看', - maintainers: ['honue'], - handler, -}; - -async function handler(ctx) { - const userid = ctx.req.param('id'); - const url = `https://bgm.tv/anime/list/${userid}/wish`; - const response = await got({ - url, - method: 'get', - headers: { - 'User-Agent': config.trueUA, - }, - }); - const $ = load(response.body); - - const username = $('.name').find('a').html(); - const items = $('#browserItemList') - .find('li') - .toArray() - .map((item) => { - const aTag = $(item).find('h3').children('a'); - const jdate = $(item).find('.collectInfo').find('span').html(); - return { - title: aTag.html(), - link: 'https://bgm.tv' + aTag.attr('href'), - pubDate: timezone(parseDate(jdate), 0), - }; - }); - - return { - title: `${username}想看的动画`, - link: url, - item: items, - description: `${username}想看的动画列表`, - }; -} From 97d0369d2e8d429595b0466886100f6fc0be48a7 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:04:31 -0700 Subject: [PATCH 267/740] feat(route): dxy board (#17294) * feat(route): dxy board * fix: update types --- lib/routes/dxy/board.ts | 96 +++++++++++++++ lib/routes/dxy/profile/thread.ts | 2 +- lib/routes/dxy/special.ts | 21 ++-- lib/routes/dxy/types.ts | 195 +++++++++++++++++++++++++++++++ lib/routes/dxy/utils.ts | 25 ++-- 5 files changed, 320 insertions(+), 19 deletions(-) create mode 100644 lib/routes/dxy/board.ts create mode 100644 lib/routes/dxy/types.ts diff --git a/lib/routes/dxy/board.ts b/lib/routes/dxy/board.ts new file mode 100644 index 000000000000000..35b55bba66e024a --- /dev/null +++ b/lib/routes/dxy/board.ts @@ -0,0 +1,96 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { phoneBaseUrl, webBaseUrl, generateNonce, sign, getPost } from './utils'; +import { config } from '@/config'; +import { BoardInfo, PostListData } from './types'; + +export const route: Route = { + path: '/bbs/board/:boardId', + categories: ['bbs'], + example: '/dxy/bbs/board/46', + parameters: { specialId: '板块 ID,可在对应板块页 URL 中找到' }, + name: '板块', + maintainers: ['TonyRL'], + radar: [ + { + source: ['www.dxy.cn/bbs/newweb/pc/category/:boardIdId'], + target: '/bbs/board/:boardIdId', + }, + { + source: ['3g.dxy.cn/bbs/board/:boardIdId'], + target: '/bbs/board/:boardIdId', + }, + ], + handler, +}; + +async function handler(ctx) { + const { boardId } = ctx.req.param(); + const { limit = '20' } = ctx.req.query(); + + const boardDetail = (await cache.tryGet(`dxy:board:detail:${boardId}`, async () => { + const detailParams = { + boardId, + timestamp: Date.now(), + noncestr: generateNonce(8, 'number'), + }; + + const detail = await ofetch(`${phoneBaseUrl}/bbsapi/bbs/board/detail`, { + query: { + ...detailParams, + sign: sign(detailParams), + }, + }); + if (detail.code !== 'success') { + throw new Error(detail.message); + } + return detail.data; + })) as BoardInfo; + + const boardList = (await cache.tryGet( + `dxy:board:list:${boardId}`, + async () => { + const listParams = { + boardId, + postType: '0', + orderType: '1', + pageNum: '1', + pageSize: limit, + timestamp: Date.now(), + noncestr: generateNonce(8, 'number'), + }; + + const recommendList = await ofetch(`${phoneBaseUrl}/bbsapi/bbs/board/post/list`, { + query: { + ...listParams, + sign: sign(listParams), + }, + }); + if (recommendList.code !== 'success') { + throw new Error(recommendList.message); + } + return recommendList.data; + }, + config.cache.routeExpire, + false + )) as PostListData; + + const list = boardList.result.map((item) => ({ + title: item.subject, + author: item.postUser.nickname, + category: [boardDetail.title], + link: `${webBaseUrl}/bbs/newweb/pc/post/${item.postId}`, + postId: item.postId, + })); + + const items = await Promise.all(list.map((item) => getPost(item, cache.tryGet))); + + return { + title: boardDetail.title, + description: `${boardDetail.postCount} 內容 ${boardDetail.followCount} 关注`, + link: `${webBaseUrl}/bbs/newweb/pc/category/${boardId}`, + image: boardDetail.boardAvatar, + item: items, + }; +} diff --git a/lib/routes/dxy/profile/thread.ts b/lib/routes/dxy/profile/thread.ts index df9b2adffd52868..a34b6fb91249f23 100644 --- a/lib/routes/dxy/profile/thread.ts +++ b/lib/routes/dxy/profile/thread.ts @@ -89,7 +89,7 @@ async function handler(ctx) { description: postInfo.simpleBody, pubDate: parseDate(createdTime, 'x'), author: postInfo.postUser.nickname, - category: postInfo.boardInfo.title, + category: [postInfo.boardInfo.title], link: `${webBaseUrl}/bbs/newweb/pc/post/${entityId}`, postId: entityId, }; diff --git a/lib/routes/dxy/special.ts b/lib/routes/dxy/special.ts index c277ae7dd3832fb..3d41e6e656157df 100644 --- a/lib/routes/dxy/special.ts +++ b/lib/routes/dxy/special.ts @@ -1,9 +1,10 @@ import { 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 { phoneBaseUrl, webBaseUrl, generateNonce, sign, getPost } from './utils'; import { config } from '@/config'; +import { RecommendListData, SpecialBoardDetail } from './types'; export const route: Route = { path: '/bbs/special/:specialId', @@ -27,7 +28,7 @@ async function handler(ctx) { const specialId = ctx.req.param('specialId'); const { limit = '10' } = ctx.req.query(); - const specialDetail = await cache.tryGet(`dxy:special:detail:${specialId}`, async () => { + const specialDetail = (await cache.tryGet(`dxy:special:detail:${specialId}`, async () => { const detailParams = { specialId, requestType: 'h5', @@ -35,8 +36,8 @@ async function handler(ctx) { noncestr: generateNonce(8, 'number'), }; - const { data: detail } = await got(`${phoneBaseUrl}/newh5/bbs/special/detail`, { - searchParams: { + const detail = await ofetch(`${phoneBaseUrl}/newh5/bbs/special/detail`, { + query: { ...detailParams, sign: sign(detailParams), }, @@ -45,9 +46,9 @@ async function handler(ctx) { throw new Error(detail.message); } return detail.data; - }); + })) as SpecialBoardDetail; - const recommendList = await cache.tryGet( + const recommendList = (await cache.tryGet( `dxy:special:recommend-list-v3:${specialId}`, async () => { const listParams = { @@ -59,8 +60,8 @@ async function handler(ctx) { noncestr: generateNonce(8, 'number'), }; - const { data: recommendList } = await got(`${phoneBaseUrl}/newh5/bbs/special/post/recommend-list-v3`, { - searchParams: { + const recommendList = await ofetch(`${phoneBaseUrl}/newh5/bbs/special/post/recommend-list-v3`, { + query: { ...listParams, sign: sign(listParams), }, @@ -72,7 +73,7 @@ async function handler(ctx) { }, config.cache.routeExpire, false - ); + )) as RecommendListData; const list = recommendList.result.map((item) => { const { postInfo, dataTime, entityId } = item; @@ -81,7 +82,7 @@ async function handler(ctx) { description: postInfo.simpleBody, pubDate: parseDate(dataTime, 'x'), author: postInfo.postUser.nickname, - category: postInfo.postSpecial.specialName, + category: [postInfo.postSpecial.specialName], link: `${webBaseUrl}/bbs/newweb/pc/post/${entityId}`, postId: entityId, }; diff --git a/lib/routes/dxy/types.ts b/lib/routes/dxy/types.ts new file mode 100644 index 000000000000000..40c221f638273a2 --- /dev/null +++ b/lib/routes/dxy/types.ts @@ -0,0 +1,195 @@ +interface BoardPerm { + errCode: number; +} +interface PostPerm { + errCode: number; +} + +export interface BoardInfo { + id: number; + boardId: number; + title: string; + shortTitle: string; + postCount: number; + followCount: number; + boardAvatar: string; + boardPerm: BoardPerm; + followStatus: boolean; +} + +interface PostUser { + userId: number; + avatar: string; + username: string; + nickname: string; + bbsStatus: number; + userTitle: UserTitle; +} + +interface PostDetail { + postId: number; + boardId: number; + reads: number; + pv: number; + subject: string; + postUser: PostUser; + screenUrlList: string[]; + videoScreen: boolean; + isEditorRecommend: boolean; +} + +export interface PostListData { + pageNum: number; + pageSize: number; + total: number; + result: PostDetail[]; + empty: boolean; +} + +interface UserTitle { + type: number; + titles: string[]; +} + +interface TagInfo { + tagName: string; +} + +interface PostSpecial { + specialId: number; + specialName: string; + followCount: number; + postCount: number; + followStatus: boolean; + personalSpecial: boolean; + avatar: string; + customAvatar: string; + backgroundColor: string; + type: number; +} + +interface Video { + videoId: number; + videoUrl: string; + cover: string; + size: number; + duration: number; + auditState: number; + userVideoState: number; +} + +interface Post { + id: number; + rootId: number; + createTime: number; + simpleBody: string; + subject: string; + body: string; + coverPic: string; + isVideoCover: boolean; + isVideoCoverPic: boolean; + postTime: number; + reads: number; + pv: number; + replies: number; + qualityPost: boolean; + contentType: number; + postStatus: number; + signatured: number; + userVote: boolean; + postSpecial: PostSpecial; + isEditorRecommend: boolean; + isTop: boolean; + ipLocation: string; + isCurrentUser: boolean; + anonymous: boolean; + boardInfo: BoardInfo; + votes: number; + archived: boolean; + approved: boolean; + video?: Video; + postPerm: PostPerm; + showStatus: boolean; + postUser: PostUser; + hintInfos: false[]; + isDisableRepost: boolean; + tagInfos: TagInfo[]; + isVoteActivityPost: boolean; + isShowCaseTag: boolean; + isPaidContent: boolean; + isNeedPay: boolean; +} + +export interface PostData { + code: string; + message: string; + data: Post; +} + +interface SpecialAdmin { + userId: number; + username: string; + nickname: string; + avatar: string; + followers: number; + bbsVotes: number; + level: number; + talentStatus: number; + levelStatus: number; + professional: boolean; + enterpriseStatus: boolean; + identificationTitle: string; + blueVip: boolean; + talentBoard: false[]; + userTitle: UserTitle; + enterpriseName: string; +} + +export interface SpecialBoardDetail { + id: number; + name: string; + content: string; + categoryId: number; + type: number; + submitted: number; + status: number; + rangeed: number; + userId: number; + followCount: number; + postCount: number; + backgroundColor: string; + pushMessage: number; + bestTime: number; + updateTime: number; + createTime: number; + modifyTime: number; + followStatus: boolean; + tabOption: number; + specialAvatar: string; + pushStatus: boolean; + specialAdmins: SpecialAdmin[]; + isContribute: boolean; + post: false[]; + isOpenPostEntrance: boolean; +} + +interface RecommendPost { + entityId: number; + entityType: number; + dataTime: number; + sortValue: number; + recommendReason: string; + postInfo: Post; + feedType: number; + source: string; + pointMap: Record<string, unknown>; + globalId: string; +} + +export interface RecommendListData { + pageNum: number; + pageSize: number; + total: number; + result: RecommendPost[]; + empty: boolean; +} diff --git a/lib/routes/dxy/utils.ts b/lib/routes/dxy/utils.ts index eaba4b5a5f9a117..b404e3920fa0af6 100644 --- a/lib/routes/dxy/utils.ts +++ b/lib/routes/dxy/utils.ts @@ -1,7 +1,8 @@ import CryptoJS from 'crypto-js'; -import got from '@/utils/got'; -import { load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; import { parseDate } from '@/utils/parse-date'; +import { PostData } from './types'; const APP_SIGN_KEY = '4bTogwpz7RzNO2VTFtW7zcfRkAE97ox6ZSgcQi7FgYdqrHqKB7aGqEZ4o7yssa2aEXoV3bQwh12FFgVNlpyYk2Yjm9d2EZGeGu3'; const phoneBaseUrl = 'https://3g.dxy.cn'; @@ -39,8 +40,8 @@ const getPost = (item, tryGet) => noncestr: generateNonce(8, 'number'), }; - const { data: post } = await got('https://www.dxy.cn/bbs/newweb/post/detail', { - searchParams: { + const post = await ofetch<PostData>('https://www.dxy.cn/bbs/newweb/post/detail', { + query: { ...postParams, sign: sign(postParams), }, @@ -49,16 +50,24 @@ const getPost = (item, tryGet) => throw new Error(post.message); } - const $ = load(post.data.body, null, false); + const $ = cheerio.load(post.data.body, null, false); $('img').each((_, img) => { img = $(img); - img.removeAttr('data-osrc'); - img.removeAttr('data-hsrc'); + if (img.data('hsrc')) { + img.attr('src', img.data('hsrc')); + img.removeAttr('data-hsrc'); + } + if (img.data('osrc')) { + img.attr('src', img.data('osrc')); + img.removeAttr('data-osrc'); + } }); item.description = $.html(); - item.updated = parseDate(post.data.lastEditTime, 'x'); + item.pubDate = parseDate(post.data.createTime, 'x'); + item.updated = post.data.lastEditTime ? parseDate(post.data.lastEditTime, 'x') : item.pubDate; + item.category = [...new Set([...item.category, ...post.data.tagInfos.map((tag) => tag.tagName)])]; return item; }); From b007418c5a8fa2996f3f15dc77ff1280ff51ca30 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Fri, 25 Oct 2024 07:43:45 +0800 Subject: [PATCH 268/740] feat(bsky): add filter support for profile feeds (#17295) --- lib/routes/bsky/posts.ts | 25 ++++++++++++++++++++++--- lib/routes/bsky/utils.ts | 6 +++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index 41b5e7c00a15374..3b8e67da719ef95 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -7,13 +7,17 @@ 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'; export const route: Route = { - path: '/profile/:handle', + path: '/profile/:handle/:routeParams?', categories: ['social-media', 'popular'], view: ViewType.SocialMedia, example: '/bsky/profile/bsky.app', - parameters: { handle: 'User handle, can be found in URL' }, + parameters: { + handle: 'User handle, can be found in URL', + routeParams: 'Filter parameter, Use filter to customize content types', + }, features: { requireConfig: false, requirePuppeteer: false, @@ -30,13 +34,28 @@ export const route: Route = { name: 'Post', maintainers: ['TonyRL'], handler, + description: ` +| Filter Value | Description | +|--------------|-------------| +| posts_with_replies | Includes Posts, Replies, and Reposts | +| posts_no_replies | Includes Posts and Reposts, without Replies | +| posts_with_media | Shows only Posts containing media | +| posts_and_author_threads | Shows Posts and Threads, without Replies and Reposts | + +Default value for filter is \`posts_and_author_threads\` if not specified. + +Example: +- \`/bsky/profile/bsky.app/filter=posts_with_replies\``, }; async function handler(ctx) { const handle = ctx.req.param('handle'); + const routeParams = querystring.parse(ctx.req.param('routeParams')); + const filter = routeParams.filter || 'posts_and_author_threads'; + const DID = await resolveHandle(handle, cache.tryGet); const profile = await getProfile(DID, cache.tryGet); - const authorFeed = await getAuthorFeed(DID, cache.tryGet); + const authorFeed = await getAuthorFeed(DID, filter, cache.tryGet); const items = authorFeed.feed.map(({ post }) => ({ title: post.record.text.split('\n')[0], diff --git a/lib/routes/bsky/utils.ts b/lib/routes/bsky/utils.ts index 3ffe67f638bf3f9..6aff1ab5eca50cc 100644 --- a/lib/routes/bsky/utils.ts +++ b/lib/routes/bsky/utils.ts @@ -28,14 +28,14 @@ const getProfile = (did, tryGet) => }); // https://github.com/bluesky-social/atproto/blob/main/lexicons/app/bsky/feed/getAuthorFeed.json -const getAuthorFeed = (did, tryGet) => +const getAuthorFeed = (did, filter, tryGet) => tryGet( - `bsky:authorFeed:${did}`, + `bsky:authorFeed:${did}:${filter}`, async () => { const { data } = await got('https://public.api.bsky.app/xrpc/app.bsky.feed.getAuthorFeed', { searchParams: { actor: did, - filter: 'posts_and_author_threads', + filter, limit: 30, }, }); From 8f815d62409ec2a99b8b047263411cac3f4a3b87 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 24 Oct 2024 16:59:37 -0700 Subject: [PATCH 269/740] fix(route): macupdate (#17296) --- lib/routes/macupdate/app.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/routes/macupdate/app.ts b/lib/routes/macupdate/app.ts index 7aa22dd6b280645..c7da81eecb65644 100644 --- a/lib/routes/macupdate/app.ts +++ b/lib/routes/macupdate/app.ts @@ -1,5 +1,5 @@ import { Route } from '@/types'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -31,7 +31,7 @@ async function handler(ctx) { const baseUrl = 'https://www.macupdate.com'; const link = `${baseUrl}/app/mac/${appId}${appSlug ? `/${appSlug}` : ''}`; - const { data: response } = await got(link); + const response = await ofetch(link); const $ = load(response); const nextData = JSON.parse($('#__NEXT_DATA__').text()); @@ -39,7 +39,7 @@ async function handler(ctx) { const { asPath, appData: { data: appData }, - } = nextData.props.initialProps.pageProps; + } = nextData.props.pageProps; const item = { title: `${appData.title} ${appData.version}`, @@ -51,10 +51,6 @@ async function handler(ctx) { author: appData.developer.name, }; - ctx.set('json', { - pageProps: nextData.props.initialProps.pageProps, - }); - return { title: appData.title, description: appData.description, From 765a382ec407bb3f826f1401478868548055a64a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=B9=E6=9E=97=E9=87=8C=E6=9C=89=E5=86=B0?= <zhullyb@outlook.com> Date: Fri, 25 Oct 2024 10:50:38 +0800 Subject: [PATCH 270/740] =?UTF-8?q?fix(route/zjut):=20fix=20the=20date=20p?= =?UTF-8?q?arser=20of=20=E6=B5=99=E6=B1=9F=E5=B7=A5=E4=B8=9A=E5=A4=A7?= =?UTF-8?q?=E5=AD=A6=E9=A6=96=E9=A1=B5=20(#17299)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/zjut/www/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/zjut/www/index.ts b/lib/routes/zjut/www/index.ts index f86ccef2bf75936..943f939e8d10d8d 100644 --- a/lib/routes/zjut/www/index.ts +++ b/lib/routes/zjut/www/index.ts @@ -60,7 +60,7 @@ async function handler(ctx) { } else if (!link.startsWith('http')) { link = rootUrl.slice(0, -1) + link; } - const pubDate = timezone(parseDate(cheerioItem.find('.news_meta').text().slice(1, -1)), +8); + const pubDate = timezone(parseDate(cheerioItem.find('.news_meta').text()), +8); return { title, From 25f9249511e052b93d3b25da39d9ec4825272991 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 25 Oct 2024 10:51:57 +0800 Subject: [PATCH 271/740] feat(route): add more design popular routes --- lib/routes/notefolio/search.ts | 47 ++++++++++++++++++++++++++++++---- lib/routes/zcool/top.ts | 20 +++++++++------ lib/routes/zcool/user.ts | 5 ++-- 3 files changed, 57 insertions(+), 15 deletions(-) diff --git a/lib/routes/notefolio/search.ts b/lib/routes/notefolio/search.ts index 6114db874080846..6f7df2a24480708 100644 --- a/lib/routes/notefolio/search.ts +++ b/lib/routes/notefolio/search.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -70,12 +70,49 @@ const categoryMap = [ */ export const route: Route = { path: '/search/:category?/:order?/:time?/:query?', - categories: ['design'], + categories: ['design', 'popular'], + view: ViewType.Pictures, example: '/notefolio/search/1/pick/all/life', parameters: { - category: 'Category, see below, `all` by default', - order: 'Order, `pick` as Notefolio Pick, `published` as Newest, `like` as like, `pick` by default', - time: 'Time, `all` as All the time, `one-day` as Latest 24 hours, `week` as Latest week, `month` as Latest month, `three-month` as Latest 3 months, `all` by default', + category: { + description: 'Category, see below', + options: [ + { value: 'all', label: 'All (전체)' }, + { value: '1', label: 'Video / Motion Graphics (영상/모션그래픽)' }, + { value: '2', label: 'Graphic Design (그래픽 디자인)' }, + { value: '3', label: 'Branding / Editing (브랜딩/편집)' }, + { value: '4', label: 'UI/UX (UI/UX)' }, + { value: '5', label: 'Illustration (일러스트레이션)' }, + { value: '6', label: 'Digital Art (디지털 아트)' }, + { value: '7', label: 'Character Design (캐릭터 디자인)' }, + { value: '8', label: 'Product Package Design (제품/패키지 디자인)' }, + { value: '9', label: 'Photography (포토그래피)' }, + { value: '10', label: 'Typography (타이포그래피)' }, + { value: '11', label: 'Crafts (공예)' }, + { value: '12', label: 'Fine Art (파인아트)' }, + ], + default: 'all', + }, + order: { + description: 'Order, `pick` as Notefolio Pick, `published` as Newest, `like` as like, `pick` by default', + options: [ + { value: 'pick', label: 'Notefolio Pick' }, + { value: 'published', label: 'Newest' }, + { value: 'like', label: 'Like' }, + ], + default: 'pick', + }, + time: { + description: 'Time', + options: [ + { value: 'all', label: 'All the time' }, + { value: 'one-day', label: 'Latest 24 hours' }, + { value: 'week', label: 'Latest week' }, + { value: 'month', label: 'Latest month' }, + { value: 'three-month', label: 'Latest 3 months' }, + ], + default: 'all', + }, query: 'Keyword, empty by default', }, features: { diff --git a/lib/routes/zcool/top.ts b/lib/routes/zcool/top.ts index 7e619e690015c4e..f3647d67af408ff 100644 --- a/lib/routes/zcool/top.ts +++ b/lib/routes/zcool/top.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -8,9 +8,18 @@ const baseUrl = 'https://www.zcool.com.cn'; export const route: Route = { path: '/top/:type', - categories: ['design'], + categories: ['design', 'popular'], + view: ViewType.Pictures, example: '/zcool/top/design', - parameters: { type: '推荐类型,详见下面的表格' }, + parameters: { + type: { + description: '推荐类型', + options: [ + { value: 'design', label: '作品榜单' }, + { value: 'article', label: '文章榜单' }, + ], + }, + }, features: { requireConfig: false, requirePuppeteer: false, @@ -22,11 +31,6 @@ export const route: Route = { name: '作品总榜单', maintainers: ['yuuow'], handler, - description: `榜单类型 - - | design | article | - | -------- | -------- | - | 作品榜单 | 文章榜单 |`, }; async function handler(ctx) { diff --git a/lib/routes/zcool/user.ts b/lib/routes/zcool/user.ts index beac412846ad914..2b5cc4dd549e6dd 100644 --- a/lib/routes/zcool/user.ts +++ b/lib/routes/zcool/user.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -9,7 +9,8 @@ import InvalidParameterError from '@/errors/types/invalid-parameter'; export const route: Route = { path: '/user/:uid', - categories: ['design'], + categories: ['design', 'popular'], + view: ViewType.Pictures, example: '/zcool/user/baiyong', parameters: { uid: '个性域名前缀或者用户ID' }, features: { From 0cd478e7b4dc97e563ea31e3d94410a4566655d0 Mon Sep 17 00:00:00 2001 From: After9 <ap66.ron@gmail.com> Date: Fri, 25 Oct 2024 11:07:01 +0800 Subject: [PATCH 272/740] fix: hko earthquake route pubDate issue fixing (#17298) --- lib/routes/hko/earthquake.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/hko/earthquake.ts b/lib/routes/hko/earthquake.ts index 8010d98f6e763c4..9bccb0c314b6306 100644 --- a/lib/routes/hko/earthquake.ts +++ b/lib/routes/hko/earthquake.ts @@ -43,7 +43,7 @@ async function handler() { return { title: `[震級:${degree}] [地點:${city}]`, description: `${citystring}, ${latAndLon}`, - pubDate: timezone(parseDate(hktDate + hktTime, 'YYYYMMDDHHMM'), +8), + pubDate: timezone(parseDate(hktDate + hktTime, 'YYYYMMDDHHmm'), +8), }; }); From 92ea6af0a19d3863829daa4d13e4871eaf6c609a Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 24 Oct 2024 20:37:31 -0700 Subject: [PATCH 273/740] docs: fix sis001 tip rendering --- lib/routes/sis001/namespace.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/sis001/namespace.ts b/lib/routes/sis001/namespace.ts index 9203414a6e67702..2d305b27d10dcc1 100644 --- a/lib/routes/sis001/namespace.ts +++ b/lib/routes/sis001/namespace.ts @@ -3,7 +3,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '第一会所', url: 'sis001.com', - description: `:::tip + description: `::: tip 第一会所有多个备用网址,本路由默认使用\`https://sis001.com\`,若该网址无法访问,可以在部署实例的时候通过\`SIS001_BASE_URL\`环境变量配置要使用的地址,如\`https://www.sis001.com\`等 - :::`, +:::`, }; From 2c46c71d4412f8ea7ca3889316437d158518cab5 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 25 Oct 2024 11:42:24 +0800 Subject: [PATCH 274/740] feat(route): add several popular routes --- lib/routes/ajmide/index.ts | 5 +- lib/routes/bjp/apod.ts | 5 +- lib/routes/fantia/search.ts | 80 ++++++++++++++++++++++++++--- lib/routes/fantia/user.ts | 5 +- lib/routes/google/doodles.ts | 5 +- lib/routes/imdb/chart.ts | 18 +++++-- lib/routes/konachan/post.ts | 16 ++++-- lib/routes/magnumphotos/magazine.ts | 5 +- lib/routes/pixabay/search.ts | 17 ++++-- lib/routes/podwise/collections.ts | 5 +- lib/routes/themoviedb/seasons.ts | 5 +- lib/routes/tingtingfm/program.ts | 5 +- lib/routes/voronoiapp/common.ts | 2 +- lib/routes/yyets/article.ts | 21 ++++++-- lib/routes/yyets/today.ts | 5 +- 15 files changed, 160 insertions(+), 39 deletions(-) diff --git a/lib/routes/ajmide/index.ts b/lib/routes/ajmide/index.ts index 6c24803c7298bc7..6f13ece4b235675 100644 --- a/lib/routes/ajmide/index.ts +++ b/lib/routes/ajmide/index.ts @@ -1,10 +1,11 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:id', - categories: ['multimedia'], + categories: ['multimedia', 'popular'], + view: ViewType.Audios, example: '/ajmide/10603594', parameters: { id: '播客 id,可以从播客页面 URL 中找到' }, features: { diff --git a/lib/routes/bjp/apod.ts b/lib/routes/bjp/apod.ts index 9f909c12a0e72a3..8258b102c4ee7ab 100644 --- a/lib/routes/bjp/apod.ts +++ b/lib/routes/bjp/apod.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; @@ -7,7 +7,8 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/apod', - categories: ['picture'], + categories: ['picture', 'popular'], + view: ViewType.Pictures, example: '/bjp/apod', parameters: {}, features: { diff --git a/lib/routes/fantia/search.ts b/lib/routes/fantia/search.ts index ee65b51b9d431ca..79db7f755d5dc03 100644 --- a/lib/routes/fantia/search.ts +++ b/lib/routes/fantia/search.ts @@ -1,18 +1,82 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; export const route: Route = { path: '/search/:type?/:caty?/:period?/:order?/:rating?/:keyword?', - categories: ['picture'], + categories: ['picture', 'popular'], + view: ViewType.Pictures, example: '/fantia/search/posts/all/daily', parameters: { - type: 'Type, see the table below, `posts` by default', - caty: 'Category, see the table below, can also be found in search page URL, `すべてのクリエイター` by default', - period: 'Ranking period, see the table below, empty by default', - order: 'Sorting, see the table below, `更新の新しい順` by default', - rating: 'Rating, see the table below, `すべて` by default', + type: { + description: 'Type, see the table below, `posts` by default', + options: [ + { value: 'fanclubs', label: 'クリエイター' }, + { value: 'posts', label: '投稿' }, + { value: 'products', label: '商品' }, + { value: 'commissions', label: 'コミッション' }, + ], + default: 'posts', + }, + caty: { + description: 'Category, see the table below, can also be found in search page URL, `すべてのクリエイター` by default', + options: [ + { value: 'all', label: 'すべてのクリエイター' }, + { value: 'illust', label: 'イラスト' }, + { value: 'comic', label: '漫画' }, + { value: 'cosplay', label: 'コスプレ' }, + { value: 'youtuber', label: 'YouTuber・配信者' }, + { value: 'vtuber', label: 'Vtuber' }, + { value: 'voice', label: '音声作品・ASMR' }, + { value: 'voiceactor', label: '声優・歌い手' }, + { value: 'idol', label: 'アイドル' }, + { value: 'anime', label: 'アニメ・映像・写真' }, + { value: '3d', label: '3D' }, + { value: 'game', label: 'ゲーム制作' }, + { value: 'music', label: '音楽' }, + { value: 'novel', label: '小説' }, + { value: 'doll', label: 'ドール' }, + { value: 'art', label: 'アート・デザイン' }, + { value: 'program', label: 'プログラム' }, + { value: 'handmade', label: '創作・ハンドメイド' }, + { value: 'history', label: '歴史・評論・情報' }, + { value: 'railroad', label: '鉄道・旅行・ミリタリー' }, + { value: 'shop', label: 'ショップ' }, + { value: 'other', label: 'その他' }, + ], + default: 'all', + }, + period: { + description: 'Ranking period, see the table below, empty by default', + options: [ + { value: 'daily', label: 'デイリー' }, + { value: 'weekly', label: 'ウィークリー' }, + { value: 'monthly', label: 'マンスリー' }, + { value: 'all', label: '全期間' }, + ], + default: '', + }, + order: { + description: 'Sorting, see the table below, `更新の新しい順` by default', + options: [ + { value: 'updater', label: '更新の新しい順' }, + { value: 'update_old', label: '更新の古い順' }, + { value: 'newer', label: '投稿の新しい順' }, + { value: 'create_old', label: '投稿の古い順' }, + { value: 'popular', label: 'お気に入り数順' }, + ], + default: 'updater', + }, + rating: { + description: 'Rating, see the table below, `すべて` by default', + options: [ + { value: 'all', label: 'すべて' }, + { value: 'general', label: '一般のみ' }, + { value: 'adult', label: 'R18 のみ' }, + ], + default: 'all', + }, keyword: 'Keyword, empty by default', }, features: { @@ -24,7 +88,7 @@ export const route: Route = { supportScihub: false, }, name: 'Search', - maintainers: [], + maintainers: ['nczitzk'], handler, description: `Type diff --git a/lib/routes/fantia/user.ts b/lib/routes/fantia/user.ts index 826feabe83c919c..0db26a4f15d4e05 100644 --- a/lib/routes/fantia/user.ts +++ b/lib/routes/fantia/user.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -6,7 +6,8 @@ import { config } from '@/config'; export const route: Route = { path: '/user/:id', - categories: ['picture'], + categories: ['picture', 'popular'], + view: ViewType.Pictures, example: '/fantia/user/3498', parameters: { id: 'User id, can be found in user profile URL' }, features: { diff --git a/lib/routes/google/doodles.ts b/lib/routes/google/doodles.ts index 27d9ecbc65f7278..79e7822c8e413a3 100644 --- a/lib/routes/google/doodles.ts +++ b/lib/routes/google/doodles.ts @@ -1,9 +1,10 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; export const route: Route = { path: '/doodles/:language?', - categories: ['picture'], + categories: ['picture', 'popular'], + view: ViewType.Pictures, example: '/google/doodles/zh-CN', parameters: { language: 'Language, default to `zh-CN`, for other language values, you can get it from [Google Doodles official website](https://www.google.com/doodles)' }, features: { diff --git a/lib/routes/imdb/chart.ts b/lib/routes/imdb/chart.ts index 0c935de309965bc..4d1611280c65360 100644 --- a/lib/routes/imdb/chart.ts +++ b/lib/routes/imdb/chart.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import * as cheerio from 'cheerio'; import type { Context } from 'hono'; @@ -12,8 +12,20 @@ const render = (data) => art(path.join(__dirname, 'templates', 'chart.art'), dat export const route: Route = { path: '/chart/:chart?', - categories: ['multimedia'], - parameters: { chart: 'The chart to display, `top` by default' }, + categories: ['multimedia', 'popular'], + view: ViewType.Notifications, + parameters: { + chart: { + description: 'The chart to display, `top` by default', + options: [ + { value: 'top', label: 'Top 250 Movies' }, + { value: 'moviemeter', label: 'Most Popular Movies' }, + { value: 'toptv', label: 'Top 250 TV Shows' }, + { value: 'tvmeter', label: 'Most Popular TV Shows' }, + ], + default: 'top', + }, + }, example: '/imdb/chart', radar: [ { diff --git a/lib/routes/konachan/post.ts b/lib/routes/konachan/post.ts index 6540c02e24470af..b05197e61af2745 100644 --- a/lib/routes/konachan/post.ts +++ b/lib/routes/konachan/post.ts @@ -1,13 +1,23 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import queryString from 'query-string'; export const route: Route = { path: '/post/popular_recent/:period?', - categories: ['picture'], + categories: ['picture', 'popular'], + view: ViewType.Pictures, example: '/konachan/post/popular_recent/1d', parameters: { - period: '展示时间', + period: { + description: '展示时间', + options: [ + { value: '1d', label: '最近 24 小时' }, + { value: '1w', label: '最近一周' }, + { value: '1m', label: '最近一月' }, + { value: '1y', label: '最近一年' }, + ], + default: '1d', + }, }, radar: [ { diff --git a/lib/routes/magnumphotos/magazine.ts b/lib/routes/magnumphotos/magazine.ts index 6ca90ef7c8d6feb..3afaee83025080c 100644 --- a/lib/routes/magnumphotos/magazine.ts +++ b/lib/routes/magnumphotos/magazine.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import parser from '@/utils/rss-parser'; import ofetch from '@/utils/ofetch'; @@ -6,7 +6,8 @@ import { load } from 'cheerio'; const host = 'https://www.magnumphotos.com'; export const route: Route = { path: '/magazine', - categories: ['picture'], + categories: ['picture', 'popular'], + view: ViewType.Pictures, example: '/magnumphotos/magazine', parameters: {}, features: { diff --git a/lib/routes/pixabay/search.ts b/lib/routes/pixabay/search.ts index 6e0a378f3bec056..199287609df612e 100644 --- a/lib/routes/pixabay/search.ts +++ b/lib/routes/pixabay/search.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -10,9 +10,20 @@ import path from 'node:path'; export const route: Route = { path: '/search/:q/:order?', - categories: ['picture'], + categories: ['picture', 'popular'], + view: ViewType.Pictures, example: '/pixabay/search/cat', - parameters: { q: 'Search term', order: 'Order, `popular` or `latest`, `latest` by default' }, + parameters: { + q: 'Search term', + order: { + description: 'Order', + options: [ + { value: 'popular', label: 'popular' }, + { value: 'latest', label: 'latest' }, + ], + default: 'latest', + }, + }, features: { requireConfig: [ { diff --git a/lib/routes/podwise/collections.ts b/lib/routes/podwise/collections.ts index 438ab1adba792fa..77de1718e5caa97 100644 --- a/lib/routes/podwise/collections.ts +++ b/lib/routes/podwise/collections.ts @@ -1,10 +1,11 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { load } from 'cheerio'; import ofetch from '@/utils/ofetch'; // 统一使用的请求库 export const route: Route = { path: '/explore', - categories: ['multimedia'], + categories: ['multimedia', 'popular'], + view: ViewType.Audios, example: '/podwise/explore', radar: [ { diff --git a/lib/routes/themoviedb/seasons.ts b/lib/routes/themoviedb/seasons.ts index 0de7c8195619746..b5e82f5009d4119 100644 --- a/lib/routes/themoviedb/seasons.ts +++ b/lib/routes/themoviedb/seasons.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import apiKey from './api-key'; @@ -6,7 +6,8 @@ import { handleDescription } from './utils'; export const route: Route = { path: '/tv/:id/seasons/:lang?', - categories: ['multimedia'], + categories: ['multimedia', 'popular'], + view: ViewType.Notifications, example: '/themoviedb/tv/70593/seasons/en-US', parameters: { id: 'TV show ID', lang: 'Language' }, features: { diff --git a/lib/routes/tingtingfm/program.ts b/lib/routes/tingtingfm/program.ts index d39fcdeb6653155..d6cb883a7c49943 100644 --- a/lib/routes/tingtingfm/program.ts +++ b/lib/routes/tingtingfm/program.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +12,8 @@ import { getClientVal, sign } from './utils'; export const route: Route = { path: '/program/:programId', - categories: ['multimedia'], + categories: ['multimedia', 'popular'], + view: ViewType.Audios, example: '/tingtingfm/program/M7VJv6Jj4R', parameters: { programId: '节目 ID,可以在 URL 中找到' }, features: { diff --git a/lib/routes/voronoiapp/common.ts b/lib/routes/voronoiapp/common.ts index 9b14bc9b030d440..7bffb78a1275b46 100644 --- a/lib/routes/voronoiapp/common.ts +++ b/lib/routes/voronoiapp/common.ts @@ -234,7 +234,7 @@ export const TabParam = { export const CommonRouteProperties: Pick<Route, 'url' | 'categories' | 'maintainers' | 'view'> = { url: 'voronoiapp.com', - categories: ['picture'], + categories: ['picture', 'popular'], view: ViewType.Pictures, maintainers: ['Cesaryuan'], }; diff --git a/lib/routes/yyets/article.ts b/lib/routes/yyets/article.ts index aa23e9e015e5ec9..716fb863781f7b4 100644 --- a/lib/routes/yyets/article.ts +++ b/lib/routes/yyets/article.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -9,9 +9,24 @@ const baseURL = 'https://yysub.net'; export const route: Route = { path: '/article/:type?', - categories: ['multimedia'], + categories: ['multimedia', 'popular'], + view: ViewType.Articles, example: '/yyets/article', - parameters: { type: '[' }, + parameters: { + type: { + description: '类型', + options: [ + { value: 'all', label: '全部' }, + { value: 'news', label: '影视资讯' }, + { value: 'report', label: '收视快报' }, + { value: 'm_review', label: '人人影评' }, + { value: 't_review', label: '人人剧评' }, + { value: 'new_review', label: '新剧评测' }, + { value: 'recom', label: '片单推荐' }, + ], + default: 'all', + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/yyets/today.ts b/lib/routes/yyets/today.ts index 0bd05556babb7fa..1602febfcc7d919 100644 --- a/lib/routes/yyets/today.ts +++ b/lib/routes/yyets/today.ts @@ -1,10 +1,11 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; export const route: Route = { path: '/today', - categories: ['multimedia'], + categories: ['multimedia', 'popular'], + view: ViewType.Notifications, example: '/yyets/today', parameters: {}, features: { From 1600de0eed38cf389b2b3d9598067047ce8fe629 Mon Sep 17 00:00:00 2001 From: Neko Aria <990879119@qq.com> Date: Fri, 25 Oct 2024 11:50:25 +0800 Subject: [PATCH 275/740] refactor(route/bangumi): remove unnecessary type defaulting (#17293) (#17300) --- lib/routes/bangumi.tv/other/followrank.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/routes/bangumi.tv/other/followrank.ts b/lib/routes/bangumi.tv/other/followrank.ts index 52d76918c07dedb..08e6e0f2dd1a576 100644 --- a/lib/routes/bangumi.tv/other/followrank.ts +++ b/lib/routes/bangumi.tv/other/followrank.ts @@ -27,10 +27,7 @@ export const route: Route = { }; async function handler(ctx) { - let type = ctx.req.param('type'); - if (!type || type === 'tv') { - type = 'anime'; - } + const type = ctx.req.param('type'); const url = `https://bgm.tv/${type}`; const response = await ofetch(url); From 1d637532d45e73f92ec9482fc098f91e3cf43740 Mon Sep 17 00:00:00 2001 From: After9 <ap66.ron@gmail.com> Date: Fri, 25 Oct 2024 12:03:24 +0800 Subject: [PATCH 276/740] feat: add route for openrice.com (#17276) * feat: add route for openrice.com * fix: Optimize the code according to the recommendations of review * fix: Remove the initial assignment of variable urlPath --- lib/routes/openrice/namespace.ts | 8 ++ lib/routes/openrice/offers.ts | 80 +++++++++++++++++++ lib/routes/openrice/promos.ts | 74 +++++++++++++++++ lib/routes/openrice/templates/description.art | 4 + 4 files changed, 166 insertions(+) create mode 100644 lib/routes/openrice/namespace.ts create mode 100644 lib/routes/openrice/offers.ts create mode 100644 lib/routes/openrice/promos.ts create mode 100644 lib/routes/openrice/templates/description.art diff --git a/lib/routes/openrice/namespace.ts b/lib/routes/openrice/namespace.ts new file mode 100644 index 000000000000000..f84c62ca7f0f756 --- /dev/null +++ b/lib/routes/openrice/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Openrice開飯喇', + url: 'www.openrice.com', + categories: ['shopping'], + description: '美食網站Openrice相关資訊', +}; diff --git a/lib/routes/openrice/offers.ts b/lib/routes/openrice/offers.ts new file mode 100644 index 000000000000000..abe00683aa504aa --- /dev/null +++ b/lib/routes/openrice/offers.ts @@ -0,0 +1,80 @@ +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 = { + path: '/:lang/hongkong/offers', + maintainers: ['after9'], + handler, + categories: ['shopping'], + example: '/openrice/zh/hongkong/offers', + parameters: { lang: '语言,缺省为 zh' }, + name: '香港餐廳精選優惠券', + description: ` + | 简体 | 繁體 | EN | + | ----- | ------ | ----- | + | zh-cn | zh | en | + `, +}; + +async function handler(ctx) { + const lang = ctx.req.param('lang') ?? 'zh'; + + const apiPath = '/api/offers'; + let urlPath: string; + switch (lang) { + case 'zh-cn': + urlPath = '/zh-cn/hongkong/offers'; + break; + case 'en': + urlPath = '/en/hongkong/offers'; + break; + case 'zh': + default: + urlPath = '/zh/hongkong/offers'; + break; + } + const response = await ofetch(baseUrl + apiPath, { + headers: { + accept: 'application/json', + }, + query: { + uiLang: lang, + uiCity: 'hongkong', + page: 1, + sortBy: 'PublishTime', + couponTypeId: 1, + }, + }); + const pageInfo = response.pageInfo; + const highlightedOffers = response.highlightedOffers; + const normalOffers = response.searchResult.paginationResult.results; + const data = [...highlightedOffers, ...normalOffers]; + + const resultList = data.map((item) => { + const title = item.title ?? ''; + 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'), { + description: descriptionText, + image: coverImg, + }); + return { + title, + description, + link, + }; + }); + + return { + title: pageInfo.seoInfo.title ?? 'OpenRice Hong Kong Offers', + link: baseUrl + urlPath, + description: pageInfo.seoInfo.metadataDictionary.name.find((item: { key: string; value: string }) => item.key === 'description')?.value ?? 'OpenRice Hong Kong Offers', + item: resultList, + }; +} diff --git a/lib/routes/openrice/promos.ts b/lib/routes/openrice/promos.ts new file mode 100644 index 000000000000000..abd42d63d5d065e --- /dev/null +++ b/lib/routes/openrice/promos.ts @@ -0,0 +1,74 @@ +import { Route } from '@/types'; +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 = { + path: '/:lang/hongkong/promos', + maintainers: ['after9'], + handler, + categories: ['shopping'], + example: '/openrice/zh/hongkong/promos', + parameters: { lang: '语言,缺省为 zh' }, + name: '香港餐厅滋讯', + description: ` + | 简体 | 繁體 | EN | + | ----- | ------ | ----- | + | zh-cn | zh | en | + `, +}; + +async function handler(ctx) { + const lang = ctx.req.param('lang') ?? 'zh'; + + let urlPath; + switch (lang) { + case 'zh-cn': + urlPath = '/zh-cn/hongkong/promos'; + break; + case 'en': + urlPath = '/en/hongkong/promos'; + break; + case 'zh': + default: + urlPath = '/zh/hongkong/promos'; + break; + } + const response = await ofetch(baseUrl + urlPath, {}); + const $ = load(response); + + const title = $('title').text() ?? "Openrice - What's Hot"; + const description = $('meta[name="description"]').attr('content') ?? "What's Hot from Openrice"; + + const data = $('.article-listing-content-cell-wrapper'); + const resultList = data.toArray().map((item) => { + const $item = $(item); + const title = $item.find('.title-name').text() ?? ''; + const link = $item.find('a.sr1-listing-content-cell').attr('href') ?? ''; + const coverImg = + $item + .find('.cover-photo') + .attr('style') + ?.match(/url\(['"]?(.*?)['"]?\)/)?.[1] ?? null; + const description = art(path.join(__dirname, 'templates/description.art'), { + description: $item.find('.article-details .desc').text() ?? '', + image: coverImg, + }); + return { + title, + description, + link, + }; + }); + + return { + title, + link: baseUrl + urlPath, + description, + item: resultList, + }; +} diff --git a/lib/routes/openrice/templates/description.art b/lib/routes/openrice/templates/description.art new file mode 100644 index 000000000000000..9aa75c6f8c0a8a8 --- /dev/null +++ b/lib/routes/openrice/templates/description.art @@ -0,0 +1,4 @@ +{{ description }} +{{ if image }} +<img src="{{ image }}"> +{{ /if }} \ No newline at end of file From 4aa40e5205d2d9078b89f38a5dc47db88849a53b Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 25 Oct 2024 12:12:36 +0800 Subject: [PATCH 277/740] feat(route): add more popular acg routes --- lib/routes/acfun/article.ts | 32 +++++++++++++++++++++++++++--- lib/routes/acfun/bangumi.ts | 5 +++-- lib/routes/acfun/video.ts | 6 ++++-- lib/routes/cngal/weekly.ts | 5 +++-- lib/routes/dlsite/campaign.ts | 13 ++++++++++-- lib/routes/dlsite/ci-en/article.ts | 5 +++-- lib/routes/dlsite/new.ts | 12 ++++++++--- lib/routes/dora-world/article.ts | 5 +++-- lib/routes/eventernote/actors.ts | 5 +++-- lib/routes/idolypride/news.ts | 5 +++-- 10 files changed, 71 insertions(+), 22 deletions(-) diff --git a/lib/routes/acfun/article.ts b/lib/routes/acfun/article.ts index 3c7b623e911944d..597e3acefb73a59 100644 --- a/lib/routes/acfun/article.ts +++ b/lib/routes/acfun/article.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -37,9 +37,35 @@ const timeRangeEnum = new Set(['all', 'oneDay', 'threeDay', 'oneWeek', 'oneMonth export const route: Route = { path: '/article/:categoryId/:sortType?/:timeRange?', - categories: ['anime'], + categories: ['anime', 'popular'], + view: ViewType.Articles, example: '/acfun/article/110', - parameters: { categoryId: '分区 ID,见下表', sortType: '排序,见下表,默认为 `createTime`', timeRange: '时间范围,见下表,仅在排序是 `hotScore` 有效,默认为 `all`' }, + parameters: { + categoryId: { + description: '分区 ID', + options: Object.keys(categoryMap).map((id) => ({ value: id, label: categoryMap[id].title })), + }, + sortType: { + description: '排序', + options: [ + { value: 'createTime', label: '最新发表' }, + { value: 'lastCommentTime', label: '最新动态' }, + { value: 'hotScore', label: '最热文章' }, + ], + default: 'createTime', + }, + timeRange: { + description: '时间范围,仅在排序是 `hotScore` 有效', + options: [ + { value: 'all', label: '时间不限' }, + { value: 'oneDay', label: '24 小时' }, + { value: 'threeDay', label: '三天' }, + { value: 'oneWeek', label: '一周' }, + { value: 'oneMonth', label: '一个月' }, + ], + default: 'all', + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/acfun/bangumi.ts b/lib/routes/acfun/bangumi.ts index 34774763f747a23..9eef398bb8fe844 100644 --- a/lib/routes/acfun/bangumi.ts +++ b/lib/routes/acfun/bangumi.ts @@ -1,10 +1,11 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/bangumi/:id', - categories: ['anime'], + categories: ['anime', 'popular'], + view: ViewType.Videos, example: '/acfun/bangumi/5022158', parameters: { id: '番剧 id' }, features: { diff --git a/lib/routes/acfun/video.ts b/lib/routes/acfun/video.ts index 6db5451b746f5e5..51dbbd57e9f5d32 100644 --- a/lib/routes/acfun/video.ts +++ b/lib/routes/acfun/video.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -15,7 +15,9 @@ export const route: Route = { parameters: { uid: '用户 UID', }, - categories: ['anime'], + categories: ['anime', 'popular'], + example: '/acfun/user/video/6102', + view: ViewType.Videos, maintainers: ['wdssmq'], handler, }; diff --git a/lib/routes/cngal/weekly.ts b/lib/routes/cngal/weekly.ts index 0ee1e8eb317e6a0..03f351af45bbbaa 100644 --- a/lib/routes/cngal/weekly.ts +++ b/lib/routes/cngal/weekly.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -9,7 +9,8 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/weekly', - categories: ['anime'], + categories: ['anime', 'popular'], + view: ViewType.Articles, example: '/cngal/weekly', parameters: {}, features: { diff --git a/lib/routes/dlsite/campaign.ts b/lib/routes/dlsite/campaign.ts index 05c9e9b7b3b5bbd..fd9e070750565df 100644 --- a/lib/routes/dlsite/campaign.ts +++ b/lib/routes/dlsite/campaign.ts @@ -122,9 +122,18 @@ const setUrl = (info) => { export const route: Route = { path: '/campaign/:type/:free?', - categories: ['anime'], + categories: ['anime', 'popular'], example: '/dlsite/campaign/home', - parameters: { type: 'Type, see table above', free: 'Free only, empty means false, other value means true' }, + parameters: { + type: { + description: '类型', + options: Object.values(infos).map((info) => ({ value: info.type, label: info.name })), + }, + free: { + description: '免费', + options: [{ value: '1', label: '是' }], + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/dlsite/ci-en/article.ts b/lib/routes/dlsite/ci-en/article.ts index 42332d901b68aba..b71297c91e5700b 100644 --- a/lib/routes/dlsite/ci-en/article.ts +++ b/lib/routes/dlsite/ci-en/article.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +7,8 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/ci-en/:id/article', - categories: ['anime'], + categories: ['anime', 'popular'], + view: ViewType.Articles, example: '/dlsite/ci-en/7400/article', parameters: { id: 'Creator id, can be found in URL' }, features: { diff --git a/lib/routes/dlsite/new.ts b/lib/routes/dlsite/new.ts index aa9838b8a26d342..ed26f19234dab4b 100644 --- a/lib/routes/dlsite/new.ts +++ b/lib/routes/dlsite/new.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; @@ -53,9 +53,15 @@ const infos = { export const route: Route = { path: '/new/:type', - categories: ['anime'], + categories: ['anime', 'popular'], + view: ViewType.Articles, example: '/dlsite/new/home', - parameters: { type: 'Type, see table below' }, + parameters: { + type: { + description: '类型', + options: Object.values(infos).map((info) => ({ value: info.type, label: info.name })), + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/dora-world/article.ts b/lib/routes/dora-world/article.ts index 5403f8665072729..d6ea10f153342e8 100644 --- a/lib/routes/dora-world/article.ts +++ b/lib/routes/dora-world/article.ts @@ -1,4 +1,4 @@ -import { Route, Data, DataItem } from '@/types'; +import { Route, Data, DataItem, ViewType } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import cache from '@/utils/cache'; @@ -9,7 +9,8 @@ const baseUrl = 'https://www.dora-world.com'; export const route: Route = { path: '/article/:topic/:topicId?', - categories: ['anime'], + categories: ['anime', 'popular'], + view: ViewType.Articles, example: '/dora-world/article/contents', parameters: { topic: 'Topic name, can be found in URL. For example: the topic name of [https://www.dora-world.com/movie](https://www.dora-world.com/movie) is `movie`', diff --git a/lib/routes/eventernote/actors.ts b/lib/routes/eventernote/actors.ts index 993bd3dba2b556c..4ef28e2727ff551 100644 --- a/lib/routes/eventernote/actors.ts +++ b/lib/routes/eventernote/actors.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -14,7 +14,8 @@ const pageCount = 10; export const route: Route = { path: '/actors/:name/:id', - categories: ['anime'], + categories: ['anime', 'popular'], + view: ViewType.Videos, example: '/eventernote/actors/三森すずこ/2634', parameters: { name: '声优姓名', id: '声优 ID' }, features: { diff --git a/lib/routes/idolypride/news.ts b/lib/routes/idolypride/news.ts index 2bd302d918048b1..2cdc1a13ea683ca 100644 --- a/lib/routes/idolypride/news.ts +++ b/lib/routes/idolypride/news.ts @@ -1,11 +1,12 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; export const route: Route = { path: '/news', - categories: ['anime'], + categories: ['anime', 'popular'], + view: ViewType.Articles, example: '/idolypride/news', parameters: {}, features: { From e480f605f65b67cd554b469ecbf50f24ba682c0e Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 25 Oct 2024 12:28:26 +0800 Subject: [PATCH 278/740] feat(route): add more popular reading tags --- lib/routes/bookfere/category.ts | 18 +++++++++++++++--- lib/routes/inoreader/index.ts | 9 ++++++--- lib/routes/inoreader/rss.ts | 5 +++-- lib/routes/pixivision/index.ts | 5 +++-- lib/routes/yilinzazhi/index.ts | 5 +++-- lib/routes/yilinzazhi/latest.ts | 5 +++-- 6 files changed, 33 insertions(+), 14 deletions(-) diff --git a/lib/routes/bookfere/category.ts b/lib/routes/bookfere/category.ts index 8ecd286fbb24863..b8e895bcf93c446 100644 --- a/lib/routes/bookfere/category.ts +++ b/lib/routes/bookfere/category.ts @@ -1,13 +1,25 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:category', - categories: ['reading'], + categories: ['reading', 'popular'], + view: ViewType.Articles, example: '/bookfere/skills', - parameters: { category: '分类名' }, + parameters: { + category: { + description: '分类名', + options: [ + { value: 'weekly', label: '每周一书' }, + { value: 'skills', label: '使用技巧' }, + { value: 'books', label: '图书推荐' }, + { value: 'news', label: '新闻速递' }, + { value: 'essay', label: '精选短文' }, + ], + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/inoreader/index.ts b/lib/routes/inoreader/index.ts index 3f5669149d05001..feed3b4308fcf75 100644 --- a/lib/routes/inoreader/index.ts +++ b/lib/routes/inoreader/index.ts @@ -1,12 +1,15 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/html_clip/:user/:tag', - name: 'Unknown', - maintainers: [], + example: '/inoreader/html_clip/1005137674/user-favorites', + categories: ['reading', 'popular'], + view: ViewType.Articles, + name: 'HTML Clip', + maintainers: ['EthanWng97'], handler, }; diff --git a/lib/routes/inoreader/rss.ts b/lib/routes/inoreader/rss.ts index 2a5e95ae4135ce7..fba2ed46beeb114 100644 --- a/lib/routes/inoreader/rss.ts +++ b/lib/routes/inoreader/rss.ts @@ -1,10 +1,11 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import parser from '@/utils/rss-parser'; import { load } from 'cheerio'; export const route: Route = { path: '/rss/:user/:tag', - categories: ['reading'], + categories: ['reading', 'popular'], + view: ViewType.Articles, example: '/inoreader/rss/1005137674/user-favorites', parameters: { user: 'user id, the interger after user/ in the example URL', tag: 'tag, the string after tag/ in the example URL' }, features: { diff --git a/lib/routes/pixivision/index.ts b/lib/routes/pixivision/index.ts index e67186cf80e30ac..62719be44ce5c0d 100644 --- a/lib/routes/pixivision/index.ts +++ b/lib/routes/pixivision/index.ts @@ -1,4 +1,4 @@ -import { Route, DataItem, Data } from '@/types'; +import { Route, DataItem, Data, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +7,8 @@ import { processContent } from './utils'; export const route: Route = { path: '/:lang/:category?', - categories: ['anime'], + categories: ['anime', 'popular'], + view: ViewType.Articles, example: '/pixivision/zh-tw', parameters: { lang: 'Language', category: 'Category' }, features: { diff --git a/lib/routes/yilinzazhi/index.ts b/lib/routes/yilinzazhi/index.ts index 61799df8d826838..2eea833e9d889e9 100644 --- a/lib/routes/yilinzazhi/index.ts +++ b/lib/routes/yilinzazhi/index.ts @@ -1,11 +1,12 @@ -import { Data, DataItem, Route } from '@/types'; +import { Data, DataItem, Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; export const route: Route = { path: '/', - categories: ['reading'], + categories: ['reading', 'popular'], + view: ViewType.Articles, example: '/yilinzazhi', radar: [ { diff --git a/lib/routes/yilinzazhi/latest.ts b/lib/routes/yilinzazhi/latest.ts index 7e1458ed283cd82..828caf48918f4c0 100644 --- a/lib/routes/yilinzazhi/latest.ts +++ b/lib/routes/yilinzazhi/latest.ts @@ -1,4 +1,4 @@ -import { Data, DataItem, Route } from '@/types'; +import { Data, DataItem, Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +6,8 @@ import dayjs from 'dayjs'; export const route: Route = { path: '/latest', - categories: ['reading'], + categories: ['reading', 'popular'], + view: ViewType.Articles, example: '/yilinzazhi/latest', radar: [ { From 54083d0ba8a721028bd93362eeea41b88a1223d5 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 25 Oct 2024 13:30:47 +0800 Subject: [PATCH 279/740] feat(route): add more popular financial routes --- lib/routes/ainvest/news.ts | 5 +-- lib/routes/baidu/gushitong/index.ts | 5 +-- lib/routes/bigquant/collections.ts | 5 +-- lib/routes/binance/announcement.ts | 21 ++++++------ lib/routes/bitget/announcement.ts | 5 +-- lib/routes/bloomberg/authors.ts | 5 +-- lib/routes/bloomberg/index.ts | 10 ++++-- lib/routes/eastmoney/report/index.ts | 18 +++++++++-- lib/routes/eastmoney/search/index.ts | 5 +-- lib/routes/eastmoney/ttjj/user.ts | 5 +-- lib/routes/fastbull/express-news.ts | 5 +-- lib/routes/fastbull/news.ts | 5 +-- lib/routes/finviz/news.ts | 12 +++++-- lib/routes/followin/index.ts | 33 +++++++++++++++++-- lib/routes/followin/news.ts | 18 +++++++++-- lib/routes/fx678/kx.ts | 5 +-- lib/routes/gelonghui/home.ts | 18 +++++++++-- lib/routes/gelonghui/hot-article.ts | 17 +++++++--- lib/routes/gelonghui/keyword.ts | 5 +-- lib/routes/gelonghui/live.ts | 5 +-- lib/routes/gelonghui/subject.ts | 5 +-- lib/routes/gelonghui/user.ts | 5 +-- lib/routes/jin10/index.ts | 5 +-- lib/routes/jin10/topic.ts | 5 +-- lib/routes/jinse/lives.ts | 13 ++++++-- lib/routes/jinse/timeline.ts | 28 ++++++++++++++-- lib/routes/jiuyangongshe/community.ts | 4 ++- lib/routes/laohu8/personal.ts | 5 +-- lib/routes/mckinsey/cn/index.ts | 13 ++++++-- lib/routes/stcn/index.ts | 46 +++++++++++++++++++++++++-- lib/routes/stockedge/daily-news.ts | 5 +-- lib/routes/techflowpost/express.ts | 5 +-- lib/routes/techflowpost/index.ts | 4 ++- lib/routes/theblockbeats/index.ts | 26 +++++++++++++-- lib/routes/youzhiyouxing/materials.ts | 21 ++++++++++-- lib/routes/zhitongcaijing/index.ts | 5 +-- 36 files changed, 310 insertions(+), 92 deletions(-) diff --git a/lib/routes/ainvest/news.ts b/lib/routes/ainvest/news.ts index cc23dc3b96272e4..ed384c9e0113007 100644 --- a/lib/routes/ainvest/news.ts +++ b/lib/routes/ainvest/news.ts @@ -1,13 +1,14 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { getHeaders, randomString, decryptAES } from './utils'; export const route: Route = { path: '/news', - categories: ['finance'], + categories: ['finance', 'popular'], example: '/ainvest/news', parameters: {}, + view: ViewType.Articles, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/baidu/gushitong/index.ts b/lib/routes/baidu/gushitong/index.ts index c8bcd175e0a737d..452131d24e17d8c 100644 --- a/lib/routes/baidu/gushitong/index.ts +++ b/lib/routes/baidu/gushitong/index.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -13,7 +13,8 @@ const STATUS_MAP = { export const route: Route = { path: '/gushitong/index', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Notifications, example: '/baidu/gushitong/index', parameters: {}, features: { diff --git a/lib/routes/bigquant/collections.ts b/lib/routes/bigquant/collections.ts index 2dc716dec1d80be..f0a009959861c7b 100644 --- a/lib/routes/bigquant/collections.ts +++ b/lib/routes/bigquant/collections.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import MarkdownIt from 'markdown-it'; @@ -8,7 +8,8 @@ const md = MarkdownIt({ export const route: Route = { path: '/collections', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/bigquant/collections', parameters: {}, features: { diff --git a/lib/routes/binance/announcement.ts b/lib/routes/binance/announcement.ts index 5d91c04bfb420eb..cf641f7609df4f0 100644 --- a/lib/routes/binance/announcement.ts +++ b/lib/routes/binance/announcement.ts @@ -1,4 +1,4 @@ -import { DataItem, Route } from '@/types'; +import { DataItem, Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -132,7 +132,8 @@ const handler: Route['handler'] = async (ctx) => { export const route: Route = { path: '/announcement/:type', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/binance/announcement/new-cryptocurrency-listing', parameters: { type: { @@ -154,14 +155,14 @@ export const route: Route = { description: ` Type category - - new-cryptocurrency-listing => New Cryptocurrency Listing - - latest-binance-news => Latest Binance News - - latest-activities => Latest Activities - - new-fiat-listings => New Fiat Listings - - api-updates => API Updates - - crypto-airdrop => Crypto Airdrop - - wallet-maintenance-updates => Wallet Maintenance Updates - - delisting => Delisting + - new-cryptocurrency-listing => New Cryptocurrency Listing + - latest-binance-news => Latest Binance News + - latest-activities => Latest Activities + - new-fiat-listings => New Fiat Listings + - api-updates => API Updates + - crypto-airdrop => Crypto Airdrop + - wallet-maintenance-updates => Wallet Maintenance Updates + - delisting => Delisting `, maintainers: ['enpitsulin'], handler, diff --git a/lib/routes/bitget/announcement.ts b/lib/routes/bitget/announcement.ts index 0ea809b2ad11262..499816a48e6da9e 100644 --- a/lib/routes/bitget/announcement.ts +++ b/lib/routes/bitget/announcement.ts @@ -1,4 +1,4 @@ -import { DataItem, Route } from '@/types'; +import { DataItem, Route, ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import cache from '@/utils/cache'; @@ -139,7 +139,8 @@ const findTypeLabel = (type: string) => { export const route: Route = { path: '/announcement/:type/:lang?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/bitget/announcement/all/zh-CN', parameters: { type: { diff --git a/lib/routes/bloomberg/authors.ts b/lib/routes/bloomberg/authors.ts index 154f9e02e356a08..6ce5d2689b15ca0 100644 --- a/lib/routes/bloomberg/authors.ts +++ b/lib/routes/bloomberg/authors.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { load } from 'cheerio'; import got from '@/utils/got'; import rssParser from '@/utils/rss-parser'; @@ -30,7 +30,8 @@ const parseAuthorNewsList = async (slug) => { export const route: Route = { path: '/authors/:id/:slug/:source?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/bloomberg/authors/ARbTQlRLRjE/matthew-s-levine', parameters: { id: 'Author ID, can be found in URL', slug: 'Author Slug, can be found in URL', source: 'Data source, either `api` or `rss`,`api` by default' }, features: { diff --git a/lib/routes/bloomberg/index.ts b/lib/routes/bloomberg/index.ts index 9a0b8d43a39c6c4..f2d53fb33498558 100644 --- a/lib/routes/bloomberg/index.ts +++ b/lib/routes/bloomberg/index.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { rootUrl, asyncPoolAll, parseNewsList, parseArticle } from './utils'; const site_title_mapping = { '/': 'News', @@ -17,10 +17,14 @@ const site_title_mapping = { export const route: Route = { path: '/:site?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/bloomberg/bbiz', parameters: { - site: 'Site ID, can be found below', + site: { + description: 'Site ID, can be found below', + options: Object.keys(site_title_mapping).map((key) => ({ value: key, label: site_title_mapping[key] })), + }, }, features: { requireConfig: false, diff --git a/lib/routes/eastmoney/report/index.ts b/lib/routes/eastmoney/report/index.ts index 2c33e0f7f56e42e..3dedde7ef6a8874 100644 --- a/lib/routes/eastmoney/report/index.ts +++ b/lib/routes/eastmoney/report/index.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; import cache from '@/utils/cache'; import got from '@/utils/got'; @@ -12,9 +12,21 @@ const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: '/report/:category', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/eastmoney/report/strategyreport', - parameters: { category: '研报类型' }, + parameters: { + category: { + description: '研报类型', + options: [ + { value: 'strategyreport', label: '策略报告' }, + { value: 'macresearch', label: '宏观研究' }, + { value: 'brokerreport', label: '券商晨报' }, + { value: 'industry', label: '行业研报' }, + { value: 'stock', label: '个股研报' }, + ], + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/eastmoney/search/index.ts b/lib/routes/eastmoney/search/index.ts index 0ac7f54009f1049..c49c1281d2dec65 100644 --- a/lib/routes/eastmoney/search/index.ts +++ b/lib/routes/eastmoney/search/index.ts @@ -1,11 +1,12 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { parseDate } from '@/utils/parse-date'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; export const route: Route = { path: '/search/:keyword', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/eastmoney/search/web3', parameters: { keyword: '关键词,可以设置为自己需要检索的关键词' }, features: { diff --git a/lib/routes/eastmoney/ttjj/user.ts b/lib/routes/eastmoney/ttjj/user.ts index 7f11f88572b3c0b..4f3460f45bc78a7 100644 --- a/lib/routes/eastmoney/ttjj/user.ts +++ b/lib/routes/eastmoney/ttjj/user.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -6,7 +6,8 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/ttjj/user/:uid', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.SocialMedia, example: '/eastmoney/ttjj/user/6551094298949188', parameters: { uid: '用户id, 可以通过天天基金App分享用户主页到浏览器,在相应的URL中找到' }, features: { diff --git a/lib/routes/fastbull/express-news.ts b/lib/routes/fastbull/express-news.ts index 5c175376260b17b..732105595ce2573 100644 --- a/lib/routes/fastbull/express-news.ts +++ b/lib/routes/fastbull/express-news.ts @@ -1,11 +1,12 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/express-news', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/fastbull/express-news', parameters: {}, features: { diff --git a/lib/routes/fastbull/news.ts b/lib/routes/fastbull/news.ts index b010820569838a2..1711b3bfb95bd0d 100644 --- a/lib/routes/fastbull/news.ts +++ b/lib/routes/fastbull/news.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +11,8 @@ import path from 'node:path'; export const route: Route = { path: ['/news', '/'], - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/fastbull/news', parameters: {}, features: { diff --git a/lib/routes/finviz/news.ts b/lib/routes/finviz/news.ts index a6068a58bf2ed9b..1599e6eb623f270 100644 --- a/lib/routes/finviz/news.ts +++ b/lib/routes/finviz/news.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import { load } from 'cheerio'; import timezone from '@/utils/timezone'; @@ -12,9 +12,15 @@ const categories = { export const route: Route = { path: '/:category?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/finviz', - parameters: { category: 'Category, see below, News by default' }, + parameters: { + category: { + description: 'Category, see below, News by default', + options: Object.keys(categories).map((key) => ({ value: key, label: key })), + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/followin/index.ts b/lib/routes/followin/index.ts index c2a8fab1444d69e..6c47b8bb8928eb2 100644 --- a/lib/routes/followin/index.ts +++ b/lib/routes/followin/index.ts @@ -1,13 +1,40 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { apiUrl, favicon, getBParam, getBuildId, getGToken, parseList, parseItem } from './utils'; export const route: Route = { path: '/:categoryId?/:lang?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/followin', - parameters: { categoryId: 'Category ID, see table below, `1` by default', lang: 'Language, see table below, `en` by default' }, + parameters: { + categoryId: { + description: 'Category ID', + options: [ + { value: '1', label: 'For You' }, + { value: '9', label: 'Market' }, + { value: '13', label: 'Meme' }, + { value: '14', label: 'BRC20' }, + { value: '3', label: 'NFT' }, + { value: '5', label: 'Thread' }, + { value: '6', label: 'In-depth' }, + { value: '8', label: 'Tutorials' }, + { value: '11', label: 'Videos' }, + ], + default: '1', + }, + lang: { + description: 'Language', + options: [ + { value: 'en', label: 'English' }, + { value: 'zh-Hans', label: '简体中文' }, + { value: 'zh-Hant', label: '繁體中文' }, + { value: 'vi', label: 'Tiếng Việt' }, + ], + default: 'en', + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/followin/news.ts b/lib/routes/followin/news.ts index 76c89b35ef51f5f..b2905eedf9a29dc 100644 --- a/lib/routes/followin/news.ts +++ b/lib/routes/followin/news.ts @@ -1,13 +1,25 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { baseUrl, favicon, getBuildId, parseList, parseItem } from './utils'; export const route: Route = { path: '/news/:lang?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/followin/news', - parameters: { lang: 'Language, see table above, `en` by default' }, + parameters: { + lang: { + description: 'Language', + options: [ + { value: 'en', label: 'English' }, + { value: 'zh-Hans', label: '简体中文' }, + { value: 'zh-Hant', label: '繁體中文' }, + { value: 'vi', label: 'Tiếng Việt' }, + ], + default: 'en', + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/fx678/kx.ts b/lib/routes/fx678/kx.ts index 55b9bda76d536cd..46a9577228249bc 100644 --- a/lib/routes/fx678/kx.ts +++ b/lib/routes/fx678/kx.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; import got from '@/utils/got'; @@ -7,7 +7,8 @@ import timezone from '@/utils/timezone'; export const route: Route = { path: '/kx', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Notifications, example: '/fx678/kx', parameters: {}, features: { diff --git a/lib/routes/gelonghui/home.ts b/lib/routes/gelonghui/home.ts index 09066f93a52c8fd..3b9be27c16c449a 100644 --- a/lib/routes/gelonghui/home.ts +++ b/lib/routes/gelonghui/home.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -6,9 +6,21 @@ import { parseItem } from './utils'; export const route: Route = { path: '/home/:tag?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/gelonghui/home', - parameters: { tag: '分类标签,见下表,默认为 `web_home_page`' }, + parameters: { + tag: { + description: '分类标签,见下表,默认为 `web_home_page`', + options: [ + { value: 'web_home_page', label: '推荐' }, + { value: 'stock', label: '股票' }, + { value: 'fund', label: '基金' }, + { value: 'new_stock', label: '新股' }, + { value: 'research', label: '研报' }, + ], + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/gelonghui/hot-article.ts b/lib/routes/gelonghui/hot-article.ts index a4c4802adc6f638..0abdae684f79389 100644 --- a/lib/routes/gelonghui/hot-article.ts +++ b/lib/routes/gelonghui/hot-article.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,9 +6,18 @@ import { parseItem } from './utils'; export const route: Route = { path: '/hot-article/:type?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/gelonghui/hot-article', - parameters: { type: '`day` 为日排行,`week` 为周排行,默认为 `day`' }, + parameters: { + type: { + description: '`day` 为日排行,`week` 为周排行,默认为 `day`', + options: [ + { value: 'day', label: '日排行' }, + { value: 'week', label: '周排行' }, + ], + }, + }, features: { requireConfig: false, requirePuppeteer: false, @@ -24,7 +33,7 @@ export const route: Route = { }, ], name: '最热文章', - maintainers: [], + maintainers: ['nczitzk'], handler, url: 'gelonghui.com/', }; diff --git a/lib/routes/gelonghui/keyword.ts b/lib/routes/gelonghui/keyword.ts index 81fc717da39dc59..2016d50ca10a970 100644 --- a/lib/routes/gelonghui/keyword.ts +++ b/lib/routes/gelonghui/keyword.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -6,7 +6,8 @@ import { parseItem } from './utils'; export const route: Route = { path: '/keyword/:keyword', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/gelonghui/keyword/早报', parameters: { keyword: '搜索关键字' }, features: { diff --git a/lib/routes/gelonghui/live.ts b/lib/routes/gelonghui/live.ts index f6f4567884610ba..a22c7cdad4b7698 100644 --- a/lib/routes/gelonghui/live.ts +++ b/lib/routes/gelonghui/live.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,7 +11,8 @@ const baseUrl = 'https://www.gelonghui.com'; export const route: Route = { path: '/live', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/gelonghui/live', parameters: {}, features: { diff --git a/lib/routes/gelonghui/subject.ts b/lib/routes/gelonghui/subject.ts index 0e6cbb814a063ff..d47c96b95c33b1c 100644 --- a/lib/routes/gelonghui/subject.ts +++ b/lib/routes/gelonghui/subject.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,7 +7,8 @@ import { parseItem } from './utils'; export const route: Route = { path: '/subject/:id', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/gelonghui/subject/4', parameters: { id: '主题编号,可在主题页 URL 中找到' }, features: { diff --git a/lib/routes/gelonghui/user.ts b/lib/routes/gelonghui/user.ts index 9f1df56603f2fca..16473e702405ce6 100644 --- a/lib/routes/gelonghui/user.ts +++ b/lib/routes/gelonghui/user.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -6,7 +6,8 @@ import { parseItem } from './utils'; export const route: Route = { path: '/user/:id', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/gelonghui/user/5273', parameters: { id: '用户编号,可在用户页 URL 中找到' }, features: { diff --git a/lib/routes/jin10/index.ts b/lib/routes/jin10/index.ts index 939ddb98f7fd9c3..ff4d02af6ead426 100644 --- a/lib/routes/jin10/index.ts +++ b/lib/routes/jin10/index.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -12,7 +12,8 @@ import { config } from '@/config'; export const route: Route = { path: '/:important?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Notifications, example: '/jin10', parameters: { important: '只看重要,任意值开启,留空关闭' }, features: { diff --git a/lib/routes/jin10/topic.ts b/lib/routes/jin10/topic.ts index 8d69d9744f059e5..73f2b538ef09acd 100644 --- a/lib/routes/jin10/topic.ts +++ b/lib/routes/jin10/topic.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; @@ -7,7 +7,8 @@ import { config } from '@/config'; export const route: Route = { path: '/topic/:id', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/jin10/topic/396', parameters: { id: 'N' }, features: { diff --git a/lib/routes/jinse/lives.ts b/lib/routes/jinse/lives.ts index ed2cb67a493d19c..11b256a378f47f1 100644 --- a/lib/routes/jinse/lives.ts +++ b/lib/routes/jinse/lives.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -19,9 +19,16 @@ const categories = { export const route: Route = { path: '/lives/:category?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Notifications, example: '/jinse/lives', - parameters: { category: '分类,见下表,默认为全部' }, + parameters: { + category: { + description: '分类', + options: Object.entries(categories).map(([value, label]) => ({ value, label })), + default: '0', + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/jinse/timeline.ts b/lib/routes/jinse/timeline.ts index ff7532a332b8c12..fb48384e0775862 100644 --- a/lib/routes/jinse/timeline.ts +++ b/lib/routes/jinse/timeline.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -11,9 +11,31 @@ import path from 'node:path'; export const route: Route = { path: '/timeline/:category?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/jinse/timeline', - parameters: { category: '分类,见下表,默认为头条' }, + parameters: { + category: { + description: '分类', + options: [ + { value: '头条', label: '头条' }, + { value: '独家', label: '独家' }, + { value: '铭文', label: '铭文' }, + { value: '产业', label: '产业' }, + { value: '项目', label: '项目' }, + { value: '政策', label: '政策' }, + { value: 'AI', label: 'AI' }, + { value: 'Web 3.0', label: 'Web 3.0' }, + { value: '以太坊 2.0', label: '以太坊 2.0' }, + { value: 'DeFi', label: 'DeFi' }, + { value: 'Layer2', label: 'Layer2' }, + { value: 'NFT', label: 'NFT' }, + { value: 'DAO', label: 'DAO' }, + { value: '百科', label: '百科' }, + ], + default: '头条', + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/jiuyangongshe/community.ts b/lib/routes/jiuyangongshe/community.ts index cbbfa1c850280d8..05138854fa78974 100644 --- a/lib/routes/jiuyangongshe/community.ts +++ b/lib/routes/jiuyangongshe/community.ts @@ -1,4 +1,4 @@ -import type { Data, Route } from '@/types'; +import { Data, Route, ViewType } from '@/types'; import type { Context } from 'hono'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; @@ -97,6 +97,8 @@ const render = (data) => art(path.join(__dirname, 'templates', 'community-descri export const route: Route = { path: '/community', + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/jiuyangongshe/community', maintainers: ['TonyRL'], name: '社群', diff --git a/lib/routes/laohu8/personal.ts b/lib/routes/laohu8/personal.ts index 697a8a0c3ef8f87..ad00e46efba7f7f 100644 --- a/lib/routes/laohu8/personal.ts +++ b/lib/routes/laohu8/personal.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -8,7 +8,8 @@ const rootUrl = 'https://www.laohu8.com'; export const route: Route = { path: '/personal/:id', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/laohu8/personal/3527667596890271', parameters: { id: '用户 ID,见网址链接' }, features: { diff --git a/lib/routes/mckinsey/cn/index.ts b/lib/routes/mckinsey/cn/index.ts index 2ca56154073dc49..a9770fb5c7246f1 100644 --- a/lib/routes/mckinsey/cn/index.ts +++ b/lib/routes/mckinsey/cn/index.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { categories } from './category-map'; @@ -8,9 +8,16 @@ const endpoint = `${baseUrl}/wp-json`; export const route: Route = { path: '/cn/:category?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/mckinsey/cn', - parameters: { category: '分类,见下表,默认为全部' }, + parameters: { + category: { + description: '分类', + options: Object.entries(categories).map(([value, label]) => ({ value, label: label.name })), + default: '25', + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/stcn/index.ts b/lib/routes/stcn/index.ts index 1622828767c040b..9afab1df532775b 100644 --- a/lib/routes/stcn/index.ts +++ b/lib/routes/stcn/index.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -7,9 +7,49 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:id?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/stcn/yw', - parameters: { id: '栏目 id,见下表,默认为要闻' }, + parameters: { + id: { + description: '栏目 id', + options: [ + { value: 'kx', label: '快讯' }, + { value: 'yw', label: '要闻' }, + { value: 'gs', label: '股市' }, + { value: 'company', label: '公司' }, + { value: 'data', label: '数据' }, + { value: 'fund', label: '基金' }, + { value: 'finance', label: '金融' }, + { value: 'comment', label: '评论' }, + { value: 'cj', label: '产经' }, + { value: 'ct', label: '创投' }, + { value: 'kcb', label: '科创板' }, + { value: 'xsb', label: '新三板' }, + { value: 'tj', label: '投教' }, + { value: 'zk', label: 'ESG' }, + { value: 'gd', label: '滚动' }, + { value: 'gsyl', label: '股市一览' }, + { value: 'djjd', label: '独家解读' }, + { value: 'gsxw', label: '公司新闻' }, + { value: 'gsdt', label: '公司动态' }, + { value: 'djsj', label: '独家数据' }, + { value: 'kd', label: '看点数据' }, + { value: 'zj', label: '资金流向' }, + { value: 'sj_kcb', label: '科创板' }, + { value: 'hq', label: '行情总貌' }, + { value: 'zl', label: '专栏' }, + { value: 'author', label: '作者' }, + { value: 'cjhy', label: '行业' }, + { value: 'cjqc', label: '汽车' }, + { value: 'tjkt', label: '投教课堂' }, + { value: 'zczs', label: '政策知识' }, + { value: 'tjdt', label: '投教动态' }, + { value: 'zthd', label: '专题活动' }, + ], + default: 'yw', + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/stockedge/daily-news.ts b/lib/routes/stockedge/daily-news.ts index 9664a566ff414fc..e7c88fad57ed366 100644 --- a/lib/routes/stockedge/daily-news.ts +++ b/lib/routes/stockedge/daily-news.ts @@ -1,10 +1,11 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import { getData, getList } from './utils'; export const route: Route = { path: '/daily-updates/news', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Notifications, example: '/stockedge/daily-updates/news', parameters: {}, features: { diff --git a/lib/routes/techflowpost/express.ts b/lib/routes/techflowpost/express.ts index ae5245fd0300ab7..9842c94e91ce515 100644 --- a/lib/routes/techflowpost/express.ts +++ b/lib/routes/techflowpost/express.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; @@ -6,7 +6,8 @@ import dayjs from 'dayjs'; export const route: Route = { path: '/express', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/techflowpost/express', radar: [ { diff --git a/lib/routes/techflowpost/index.ts b/lib/routes/techflowpost/index.ts index d98ffa6c11477b3..f9ce49c0b21c752 100644 --- a/lib/routes/techflowpost/index.ts +++ b/lib/routes/techflowpost/index.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; @@ -12,6 +12,8 @@ export const route: Route = { }, ], name: '首页', + categories: ['finance', 'popular'], + view: ViewType.Articles, maintainers: ['nczitzk'], handler, url: 'techflowpost.com/', diff --git a/lib/routes/theblockbeats/index.ts b/lib/routes/theblockbeats/index.ts index 1fced055be15c12..4fc1112c7621fe9 100644 --- a/lib/routes/theblockbeats/index.ts +++ b/lib/routes/theblockbeats/index.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; @@ -41,9 +41,29 @@ const channelMap = { export const route: Route = { path: '/:channel?/:original?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/theblockbeats/newsflash', - parameters: { channel: '类型,见下表,默认为快讯', original: '文章类型,仅 `channel` 为 `article` 时有效,见下表,留空为全部' }, + parameters: { + channel: { + description: '类型', + options: [ + { value: 'newsflash', label: '快讯' }, + { value: 'article', label: '文章' }, + ], + default: 'newsflash', + }, + original: { + description: '文章类型,仅 `channel` 为 `article` 时有效', + options: [ + { value: '0', label: '全部' }, + { value: '1', label: '深度' }, + { value: '2', label: '精选' }, + { value: '3', label: '热点追踪' }, + ], + default: '0', + }, + }, name: '新闻快讯', maintainers: ['Fatpandac', 'jameshih'], handler, diff --git a/lib/routes/youzhiyouxing/materials.ts b/lib/routes/youzhiyouxing/materials.ts index e71c9abacf59d85..87971418605258b 100644 --- a/lib/routes/youzhiyouxing/materials.ts +++ b/lib/routes/youzhiyouxing/materials.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,9 +6,24 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/materials/:id?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/youzhiyouxing/materials', - parameters: { id: '分类,见下表,默认为全部' }, + parameters: { + id: { + description: '分类', + options: [ + { value: '0', label: '全部' }, + { value: '4', label: '知行小酒馆' }, + { value: '2', label: '知行黑板报' }, + { value: '10', label: '无人知晓' }, + { value: '1', label: '孟岩专栏' }, + { value: '3', label: '知行读书会' }, + { value: '11', label: '你好,同路人' }, + ], + default: '0', + }, + }, features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/zhitongcaijing/index.ts b/lib/routes/zhitongcaijing/index.ts index 9d574bc26b407a8..576698c0405be79 100644 --- a/lib/routes/zhitongcaijing/index.ts +++ b/lib/routes/zhitongcaijing/index.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -70,7 +70,8 @@ const ids = { export const route: Route = { path: '/:id?/:category?', - categories: ['finance'], + categories: ['finance', 'popular'], + view: ViewType.Articles, example: '/zhitongcaijing', parameters: { id: '栏目 id,可在对应栏目页 URL 中找到,默认为 recommend,即推荐', category: '分类 id,可在对应栏目子分类页 URL 中找到,默认为全部' }, features: { From a19dc7df73bcf0a59aa8a4af70fb36ecc403049f Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 25 Oct 2024 17:07:21 +0800 Subject: [PATCH 280/740] refactor(route/telegram): use ofetch in telegram routes --- lib/routes/telegram/blog.ts | 10 +++++----- lib/routes/telegram/channel.ts | 11 ++++++----- lib/routes/telegram/stickerpack.ts | 5 ++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/routes/telegram/blog.ts b/lib/routes/telegram/blog.ts index 28811c4da7decce..dce3188af317ef8 100644 --- a/lib/routes/telegram/blog.ts +++ b/lib/routes/telegram/blog.ts @@ -1,7 +1,7 @@ import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import * as cheerio from 'cheerio'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { @@ -32,8 +32,8 @@ export const route: Route = { async function handler() { const link = 'https://telegram.org/blog'; - const res = await got(link); - const $$ = cheerio.load(res.body); + const res = await ofetch(link); + const $$ = cheerio.load(res); const items = await Promise.all( $$('.dev_blog_card_link_wrap') @@ -42,8 +42,8 @@ async function handler() { const $ = $$(each); const link = 'https://telegram.org' + $.attr('href'); return cache.tryGet(link, async () => { - const result = await got(link); - const $ = cheerio.load(result.body); + const result = await ofetch(link); + const $ = cheerio.load(result); return { title: $('#dev_page_title').text(), link, diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index d8fd9efcb542f23..15ca3ced5c5c327 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -2,7 +2,7 @@ import { Route, ViewType } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; import cache from '@/utils/cache'; import { config } from '@/config'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; @@ -106,7 +106,7 @@ For backward compatibility reasons, invalid \`routeParams\` will be treated as \ }, ], name: 'Channel', - maintainers: ['DIYgod', 'Rongronggg9'], + maintainers: ['DIYgod', 'Rongronggg9', 'pseudoyu'], handler, description: ` :::tip @@ -154,19 +154,20 @@ async function handler(ctx) { searchQuery = fallback(undefined, routeParams.searchQuery, null); } + // TODO: some channels are not available in t.me/s/, need extra handling logics const resourceUrl = searchQuery ? `https://t.me/s/${username}?q=${encodeURIComponent(searchQuery)}` : `https://t.me/s/${username}`; const data = await cache.tryGet( resourceUrl, async () => { - const _r = await got(resourceUrl); - return _r.data; + const _r = await ofetch(resourceUrl); + return _r; }, config.cache.routeExpire, false ); - const $ = load(data); + const $ = load(data as string); /* * Since 2024/4/20, t.me/s/ mistakenly have every '&' in **hyperlinks** replaced by '&'. diff --git a/lib/routes/telegram/stickerpack.ts b/lib/routes/telegram/stickerpack.ts index dbe39ad5668bfbf..2c9e2eb91a7147d 100644 --- a/lib/routes/telegram/stickerpack.ts +++ b/lib/routes/telegram/stickerpack.ts @@ -1,5 +1,5 @@ import { Route, ViewType } from '@/types'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; @@ -28,9 +28,8 @@ async function handler(ctx) { } const name = ctx.req.param('name'); - const response = await got({ + const response = await ofetch(`https://api.telegram.org/bot${config.telegram.token}/getStickerSet?name=${name}`, { method: 'get', - url: `https://api.telegram.org/bot${config.telegram.token}/getStickerSet?name=${name}`, }); const data = response.data.result; From 971f9a2373fdffc3dba6d26858f486ad93bb7ff1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 04:03:31 -0700 Subject: [PATCH 281/740] chore(deps): bump twitter-api-v2 from 1.18.0 to 1.18.1 (#17304) * chore(deps): bump twitter-api-v2 from 1.18.0 to 1.18.1 Bumps [twitter-api-v2](https://github.com/plhery/node-twitter-api-v2) from 1.18.0 to 1.18.1. - [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.18.0...1.18.1) --- updated-dependencies: - dependency-name: twitter-api-v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 9a8f9fc20818275..270281071e09949 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.1", - "twitter-api-v2": "1.18.0", + "twitter-api-v2": "1.18.1", "undici": "6.20.1", "uuid": "10.0.0", "winston": "3.15.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d7a1c4acddc5543..076f0658376cf5f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -240,8 +240,8 @@ importers: specifier: 4.19.1 version: 4.19.1 twitter-api-v2: - specifier: 1.18.0 - version: 1.18.0 + specifier: 1.18.1 + version: 1.18.1 undici: specifier: 6.20.1 version: 6.20.1 @@ -5253,8 +5253,8 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.54: - resolution: {integrity: sha512-5cc42+0G0EjYRDfIJHKraaT3I5kPm7j6or3Zh1T9sF+Ftj1T+isT4thicUyQQ1bwN7/xjHQIuY2fXCoXP8Haqg==} + tldts-core@6.1.55: + resolution: {integrity: sha512-BL+BuKHHaOpntE5BGI6naXjULU6aRlgaYdfDHR3T/hdbNTWkWUZ9yuc11wGnwgpvRwlyUiIK+QohYK3olaVU6Q==} tldts@6.1.54: resolution: {integrity: sha512-rDaL1t59gb/Lg0HPMUGdV1vAKLQcXwU74D26aMaYV4QW7mnMvShd1Vmkg3HYAPWx2JCTUmsrXt/Yl9eJ5UFBQw==} @@ -5358,8 +5358,8 @@ packages: tweetnacl@0.14.5: resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} - twitter-api-v2@1.18.0: - resolution: {integrity: sha512-dhrj9wV2qQnHqlbFzt9qpb3mdK1oFcK3llFUnlFe8al19SrXlF3jHk3Y42wT0VRtF9LwpUeJ4QdHiqAiDgrTrg==} + twitter-api-v2@1.18.1: + resolution: {integrity: sha512-6pChAlfH/7VakKnPfVdG2fjxVJJgKCXvvWhuEOCdJ52Y+rzmAmsnTKDgjhnj11XgboSYQx1bn3j2VWyR+vnRiA==} type-check@0.3.2: resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} @@ -11178,11 +11178,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.54: {} + tldts-core@6.1.55: {} tldts@6.1.54: dependencies: - tldts-core: 6.1.54 + tldts-core: 6.1.55 tmp@0.0.33: dependencies: @@ -11267,7 +11267,7 @@ snapshots: tweetnacl@0.14.5: {} - twitter-api-v2@1.18.0: {} + twitter-api-v2@1.18.1: {} type-check@0.3.2: dependencies: From 6bfad6c0fbcb05cd45f34b59cb44ce7bd1d5ea13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Oct 2024 04:03:47 -0700 Subject: [PATCH 282/740] chore(deps): bump tldts from 6.1.54 to 6.1.55 (#17305) * chore(deps): bump tldts from 6.1.54 to 6.1.55 Bumps [tldts](https://github.com/remusao/tldts) from 6.1.54 to 6.1.55. - [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.54...v6.1.55) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 270281071e09949..1f2605a63583be1 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "telegram": "2.26.2", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.54", + "tldts": "6.1.55", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 076f0658376cf5f..8c520f6f2f89bb8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,8 +228,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.54 - version: 6.1.54 + specifier: 6.1.55 + version: 6.1.55 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5256,8 +5256,8 @@ packages: tldts-core@6.1.55: resolution: {integrity: sha512-BL+BuKHHaOpntE5BGI6naXjULU6aRlgaYdfDHR3T/hdbNTWkWUZ9yuc11wGnwgpvRwlyUiIK+QohYK3olaVU6Q==} - tldts@6.1.54: - resolution: {integrity: sha512-rDaL1t59gb/Lg0HPMUGdV1vAKLQcXwU74D26aMaYV4QW7mnMvShd1Vmkg3HYAPWx2JCTUmsrXt/Yl9eJ5UFBQw==} + tldts@6.1.55: + resolution: {integrity: sha512-HxQR/9roQ07Pwc8RyyrJMAxRz5/ssoF3qIPPUiIo3zUt6yMdmYZjM2OZIFMiZ3jHyz9jrGHEHuQZrUhoc1LkDw==} hasBin: true tmp@0.0.33: @@ -11180,7 +11180,7 @@ snapshots: tldts-core@6.1.55: {} - tldts@6.1.54: + tldts@6.1.55: dependencies: tldts-core: 6.1.55 @@ -11218,7 +11218,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.54 + tldts: 6.1.55 tr46@0.0.3: {} From 287b825b4fd48f75be8285d30484551bcafb1bc0 Mon Sep 17 00:00:00 2001 From: huanfei <41602338+huanfe1@users.noreply.github.com> Date: Fri, 25 Oct 2024 19:04:54 +0800 Subject: [PATCH 283/740] fix: tencent news show author avatar (#17301) --- lib/routes/tencent/news/author.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/routes/tencent/news/author.ts b/lib/routes/tencent/news/author.ts index b36f801013b2a4b..49b4b0abf4e25c8 100644 --- a/lib/routes/tencent/news/author.ts +++ b/lib/routes/tencent/news/author.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, Data } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); @@ -25,15 +25,16 @@ export const route: Route = { }, radar: [ { - source: ['new.qq.com/omn/author/:mid'], + title: '当前作者文章', + source: ['news.qq.com/omn/author/:mid'], }, ], - name: '更新', + name: '作者', maintainers: ['LogicJake', 'miles170'], handler, }; -async function handler(ctx) { +async function handler(ctx): Promise<Data> { const mid = ctx.req.param('mid'); const userType = /^\d+$/.test(mid) ? 'chlid' : 'guestSuid'; const homePageInfoUrl = `https://i.news.qq.com/i/getUserHomepageInfo?${userType}=${mid}`; @@ -99,5 +100,6 @@ async function handler(ctx) { description, link: `https://new.qq.com/omn/author/${mid}`, item: items, + image: userInfo?.shareImg, }; } From 3b73b604023344bb15e25d6310620d385a98426a Mon Sep 17 00:00:00 2001 From: tourist <49434568+Blank0120@users.noreply.github.com> Date: Fri, 25 Oct 2024 19:07:53 +0800 Subject: [PATCH 284/740] style: format docs of RSSHub (#17306) --- lib/routes/12371/zxfb.ts | 4 +- lib/routes/36kr/index.ts | 6 +- lib/routes/8264/list.ts | 82 ++++----- lib/routes/afdian/explore.ts | 18 +- lib/routes/bloomberg/index.ts | 30 ++-- lib/routes/chinadegrees/province.ts | 66 +++---- lib/routes/chinaisa/index.ts | 264 ++++++++++++++-------------- lib/routes/cs/index.ts | 64 +++---- lib/routes/cs/video.ts | 2 +- lib/routes/douban/book/latest.ts | 4 +- lib/routes/gov/chongqing/gzw.ts | 4 +- lib/routes/hust/gs.ts | 2 +- lib/routes/infzm/index.ts | 6 +- lib/routes/kanxue/topic.ts | 44 ++--- lib/routes/miui/firmware/index.ts | 14 +- lib/routes/modian/zhongchou.ts | 40 ++--- lib/routes/ncku/phys.ts | 1 + lib/routes/nippon/index.ts | 4 +- lib/routes/nodejs/blog.ts | 3 +- lib/routes/nosec/index.ts | 18 +- lib/routes/sara/index.ts | 4 +- lib/routes/sysu/ygafz.ts | 10 +- lib/routes/tesla/cx.ts | 94 +++++----- lib/routes/tgbus/list.ts | 4 +- lib/routes/thepetcity/index.ts | 12 +- lib/routes/zju/cst/index.ts | 4 +- lib/routes/zsxq/group.ts | 4 +- 27 files changed, 405 insertions(+), 403 deletions(-) diff --git a/lib/routes/12371/zxfb.ts b/lib/routes/12371/zxfb.ts index cb87d363c9e3649..06d1860d08d24c0 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/36kr/index.ts b/lib/routes/36kr/index.ts index 4b9bc982380dca3..c026c55916db1a0 100644 --- a/lib/routes/36kr/index.ts +++ b/lib/routes/36kr/index.ts @@ -27,9 +27,9 @@ export const route: Route = { }, name: '资讯, 快讯, 用户文章, 主题文章, 专题文章, 搜索文章, 搜索快讯', maintainers: ['nczitzk', 'fashioncj'], - description: `| 最新资讯频道 | 快讯 | 推荐资讯|生活|房产|职场|搜索文章|搜索快讯| - | ------- | -------- | -------- | -------- | -------- | --------| -------- | -------- | - | news | newsflashes | recommend | life | estate | workplace | search/articles/关键词 | search/articles/关键词 |`, + description: `| 最新资讯频道 | 快讯 | 推荐资讯 | 生活 | 房产 | 职场 | 搜索文章 | 搜索快讯 | + | ------- | -------- | -------- | -------- | -------- | --------| -------- | -------- | + | news | newsflashes | recommend | life | estate | workplace | search/articles/关键词 | search/articles/关键词 |`, handler, }; diff --git a/lib/routes/8264/list.ts b/lib/routes/8264/list.ts index 0206f67e4db95ef..9ac5d4883a3a60c 100644 --- a/lib/routes/8264/list.ts +++ b/lib/routes/8264/list.ts @@ -28,62 +28,62 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `| 热门推荐 | 户外知识 | 户外装备 | - | -------- | -------- | -------- | - | 751 | 238 | 204 | +| -------- | -------- | -------- | +| 751 | 238 | 204 | - <details> - <summary>更多列表</summary> +<details> + <summary>更多列表</summary> - #### 热门推荐 + #### 热门推荐 - | 业界 | 国际 | 专访 | 图说 | 户外 | 登山 | 攀岩 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 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 | - </details>`, + | 防潮垫 | 电子导航 | 冰岩绳索 | 综合装备 | + | ------ | -------- | -------- | -------- | + | 214 | 216 | 215 | 223 | +</details>`, }; async function handler(ctx) { diff --git a/lib/routes/afdian/explore.ts b/lib/routes/afdian/explore.ts index 14437242a98ea8e..d8f4d93ae80391e 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 | - - 目录类型 - - | 所有 | 绘画 | 视频 | 写作 | 游戏 | 音乐 | 播客 | 摄影 | 技术 | Vtuber | 舞蹈 | 体育 | 旅游 | 美食 | 时尚 | 数码 | 动画 | 其他 | - | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | - | 所有 | 绘画 | 视频 | 写作 | 游戏 | 音乐 | 播客 | 摄影 | 技术 | Vtuber | 舞蹈 | 体育 | 旅游 | 美食 | 时尚 | 数码 | 动画 | 其他 |`, + | 推荐 | 最热 | + | ---- | ---- | + | rec | hot | + + 目录类型 + + | 所有 | 绘画 | 视频 | 写作 | 游戏 | 音乐 | 播客 | 摄影 | 技术 | Vtuber | 舞蹈 | 体育 | 旅游 | 美食 | 时尚 | 数码 | 动画 | 其他 | + | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ------ | ---- | ---- | ---- | ---- | ---- | ---- | ---- | ---- | + | 所有 | 绘画 | 视频 | 写作 | 游戏 | 音乐 | 播客 | 摄影 | 技术 | Vtuber | 舞蹈 | 体育 | 旅游 | 美食 | 时尚 | 数码 | 动画 | 其他 |`, handler, }; diff --git a/lib/routes/bloomberg/index.ts b/lib/routes/bloomberg/index.ts index f2d53fb33498558..778a865fd92467d 100644 --- a/lib/routes/bloomberg/index.ts +++ b/lib/routes/bloomberg/index.ts @@ -37,21 +37,21 @@ 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/chinadegrees/province.ts b/lib/routes/chinadegrees/province.ts index f37fb760d3024b4..418cc8596acbd1d 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 7d54d7eb07179ad..5de50965fc8b638 100644 --- a/lib/routes/chinaisa/index.ts +++ b/lib/routes/chinaisa/index.ts @@ -20,144 +20,144 @@ export const route: Route = { name: '栏目', maintainers: ['nczitzk'], handler, - description: `| 栏目 | id | - | -------- | ---------------------------------------------------------------- | + description: `| 栏目 | id | + | -------- | --------------------------------------------------------------- | | 钢协动态 | 58af05dfb6b4300151760176d2aad0a04c275aaadbb1315039263f021f920dcd | | 钢协要闻 | 67ea4f106bd8f0843c0538d43833c463a0cd411fc35642cbd555a5f39fcf352b | | 会议报道 | e5070694f299a43b20d990e53b6a69dc02e755fef644ae667cf75deaff80407a | | 领导讲话 | a873c2e67b26b4a2d8313da769f6e106abc9a1ff04b7f1a50674dfa47cf91a7b | | 图片新闻 | 806254321b2459bddb3c2cb5590fef6332bd849079d3082daf6153d7f8d62e1e | - <details> - <summary>更多栏目</summary> - - #### 党建工作 - - | 栏目 | 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 | - </details>`, +<details> + <summary>更多栏目</summary> + + #### 党建工作 + + | 栏目 | 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 | +</details>`, }; async function handler(ctx) { diff --git a/lib/routes/cs/index.ts b/lib/routes/cs/index.ts index b4446df9efc8ca5..fd8aec323a2987c 100644 --- a/lib/routes/cs/index.ts +++ b/lib/routes/cs/index.ts @@ -19,52 +19,52 @@ 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 | - <details> - <summary>更多栏目</summary> +<details> + <summary>更多栏目</summary> - #### 要闻 + #### 要闻 - | 财经要闻 | 观点评论 | 民生消费 | - | -------- | -------- | --------- | - | 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 | - </details>`, + | 中证快讯 7x24 | IPO 鉴真 | 公司能见度 | + | ------------- | -------- | ---------- | + | sylm/jsbd | yc/ipojz | yc/gsnjd | +</details>`, handler, }; diff --git a/lib/routes/cs/video.ts b/lib/routes/cs/video.ts index b45cab9cfccf78b..a84c50b6336cbdf 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/douban/book/latest.ts b/lib/routes/douban/book/latest.ts index 1de7c4db609f67a..5dd33b905d3863d 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/gov/chongqing/gzw.ts b/lib/routes/gov/chongqing/gzw.ts index 39ee3786b6f9f10..bb7dc2bc883d503 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/hust/gs.ts b/lib/routes/hust/gs.ts index 563133913369e4b..1f3eb6a77f60ff0 100644 --- a/lib/routes/hust/gs.ts +++ b/lib/routes/hust/gs.ts @@ -91,7 +91,7 @@ export const route: Route = { | --------------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | --------------------------------------------------- | --------------------------------------------- | | [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) | | ------------------------------------------------------------- | ------------------------------------------------------------- | diff --git a/lib/routes/infzm/index.ts b/lib/routes/infzm/index.ts index 27c76a468a02c9b..8dc23476db2103e 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/kanxue/topic.ts b/lib/routes/kanxue/topic.ts index c4856d2706ad598..fbe9b606a1fef2f 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 | - - | 类型 | type | - | -------- | ------ | - | 最新主题 | latest | - | 精华主题 | digest |`, + | -------------- | --------- | + | 智能设备 | 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 |`, }; const timeDiff = 1000 * 60 * 60 * 24 * 3; diff --git a/lib/routes/miui/firmware/index.ts b/lib/routes/miui/firmware/index.ts index ffdeb734f61e6aa..3ea80b0256b8026 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 | - - | region | region | - | ------ | ------ | - | China | cn | - | Global | global |`, + | ------- | ----------- | + | release | dev | + + | region | region | + | ------ | ------ | + | China | cn | + | Global | global |`, handler, }; diff --git a/lib/routes/modian/zhongchou.ts b/lib/routes/modian/zhongchou.ts index 24d1d779b6ff84f..921dfa00b088dc9 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/ncku/phys.ts b/lib/routes/ncku/phys.ts index 0243c97662d3d85..1230d0cd789f6a9 100644 --- a/lib/routes/ncku/phys.ts +++ b/lib/routes/ncku/phys.ts @@ -25,6 +25,7 @@ export const route: Route = { }, name: 'Phys News', description: `| 分類 | catagory | +| ---- | ---- | | 物理系 | 24 | | 獎助學金 | scholarship | | 招生與錄取報到 | admission | diff --git a/lib/routes/nippon/index.ts b/lib/routes/nippon/index.ts index 3e0e9485aa78330..8d741aa6f9a045e 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/nodejs/blog.ts b/lib/routes/nodejs/blog.ts index 0d3700e7cbe8fa3..e4b3da5c6ac07bb 100644 --- a/lib/routes/nodejs/blog.ts +++ b/lib/routes/nodejs/blog.ts @@ -26,7 +26,8 @@ export const route: Route = { maintainers: ['nczitzk'], handler, description: `Official RSS Source: https://nodejs.org/en/feed/blog.xml - | العربية | Catalan | Deutsch | Español | زبان فارسی | + + | العربية | Catalan | Deutsch | Español | زبان فارسی | | ------- | ------- | ------- | ------- | ---------- | | ar | ca | de | es | fa | diff --git a/lib/routes/nosec/index.ts b/lib/routes/nosec/index.ts index 10e0b6bab7a4d33..543e0fb88ead09a 100644 --- a/lib/routes/nosec/index.ts +++ b/lib/routes/nosec/index.ts @@ -21,15 +21,15 @@ export const route: Route = { parameters: { keykind: '对应文章分类' }, name: 'Posts', maintainers: ['hellodword'], - description: ` | 分类 | 标识 | - | :------- | :--------- | - | 威胁情报 | \`threaten\` | - | 安全动态 | \`security\` | - | 漏洞预警 | \`hole\` | - | 数据泄露 | \`leakage\` | - | 专题报告 | \`speech\` | - | 技术分析 | \`skill\` | - | 安全工具 | \`tool\` |`, + description: `| 分类 | 标识 | + | :------- | :--------- | + | 威胁情报 | \`threaten\` | + | 安全动态 | \`security\` | + | 漏洞预警 | \`hole\` | + | 数据泄露 | \`leakage\` | + | 专题报告 | \`speech\` | + | 技术分析 | \`skill\` | + | 安全工具 | \`tool\` |`, handler, radar: [ { diff --git a/lib/routes/sara/index.ts b/lib/routes/sara/index.ts index 6dd22efb39bac37..055a5e2a86ba475 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/sysu/ygafz.ts b/lib/routes/sysu/ygafz.ts index 56f5c7c3bf1feea..b4968de1a98ca7a 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/tesla/cx.ts b/lib/routes/tesla/cx.ts index b553e6513c780db..9a1fae69ab57c63 100644 --- a/lib/routes/tesla/cx.ts +++ b/lib/routes/tesla/cx.ts @@ -32,75 +32,75 @@ export const route: Route = { 分类为 **充电免停** 时,城市参数不起作用 ::: - <details> - <summary>可选城市</summary> +<details> + <summary>可选城市</summary> - | 成都 | 深圳 | 洛阳 | 北京 | 南京 | 绍兴 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 成都 | 深圳 | 洛阳 | 北京 | 南京 | 绍兴 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 西安 | 上海 | 阿坝藏族羌族自治州 | 重庆 | 郑州 | 天津 | - | ---- | ---- | ------------------ | ---- | ---- | ---- | + | 西安 | 上海 | 阿坝藏族羌族自治州 | 重庆 | 郑州 | 天津 | + | ---- | ---- | ------------------ | ---- | ---- | ---- | - | 晋中 | 三亚 | 湖州 | 苏州 | 扬州 | 秦皇岛 | - | ---- | ---- | ---- | ---- | ---- | ------ | + | 晋中 | 三亚 | 湖州 | 苏州 | 扬州 | 秦皇岛 | + | ---- | ---- | ---- | ---- | ---- | ------ | - | 长沙 | 武汉 | 安阳 | 温州 | 瑞安 | 石家庄 | - | ---- | ---- | ---- | ---- | ---- | ------ | + | 长沙 | 武汉 | 安阳 | 温州 | 瑞安 | 石家庄 | + | ---- | ---- | ---- | ---- | ---- | ------ | - | 佛山 | 广州 | 杭州 | 烟台 | 沧州 | 张家港 | - | ---- | ---- | ---- | ---- | ---- | ------ | + | 佛山 | 广州 | 杭州 | 烟台 | 沧州 | 张家港 | + | ---- | ---- | ---- | ---- | ---- | ------ | - | 金华 | 临沧 | 大理 | 南昌 | 贵阳 | 信阳 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 金华 | 临沧 | 大理 | 南昌 | 贵阳 | 信阳 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 张家口 | 铜仁 | 沈阳 | 合肥 | 黔东 | 高邮 | - | ------ | ---- | ---- | ---- | ---- | ---- | + | 张家口 | 铜仁 | 沈阳 | 合肥 | 黔东 | 高邮 | + | ------ | ---- | ---- | ---- | ---- | ---- | - | 三河 | 安顺 | 莆田 | 阳江 | 南宁 | 台州 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 三河 | 安顺 | 莆田 | 阳江 | 南宁 | 台州 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 余姚 | 淄博 | 三明 | 中山 | 宁波 | 厦门 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 余姚 | 淄博 | 三明 | 中山 | 宁波 | 厦门 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 永康 | 慈溪 | 台山 | 福州 | 无锡 | 宜昌 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 永康 | 慈溪 | 台山 | 福州 | 无锡 | 宜昌 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 泉州 | 肇庆 | 太仓 | 珠海 | 邢台 | 衡水 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 泉州 | 肇庆 | 太仓 | 珠海 | 邢台 | 衡水 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 温岭 | 宜兴 | 东莞 | 威海 | 南通 | 舟山 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 温岭 | 宜兴 | 东莞 | 威海 | 南通 | 舟山 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 都匀 | 长治 | 江阴 | 云浮 | 常州 | 唐山 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 都匀 | 长治 | 江阴 | 云浮 | 常州 | 唐山 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 平湖 | 商丘 | 保定 | 泰州 | 青岛 | 龙口 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 平湖 | 商丘 | 保定 | 泰州 | 青岛 | 龙口 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 泰安 | 岳阳 | 惠州 | 徐州 | 哈尔滨 | 潍坊 | - | ---- | ---- | ---- | ---- | ------ | ---- | + | 泰安 | 岳阳 | 惠州 | 徐州 | 哈尔滨 | 潍坊 | + | ---- | ---- | ---- | ---- | ------ | ---- | - | 大同 | 嘉兴 | 毕节 | 临汾 | 江门 | 诸暨 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 大同 | 嘉兴 | 毕节 | 临汾 | 江门 | 诸暨 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 儋州 | 衢州 | 大连 | 昆山 | 靖江 | 常熟 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 儋州 | 衢州 | 大连 | 昆山 | 靖江 | 常熟 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 罗定 | 丽江 | 晋江 | 乐清 | 茂名 | 福清 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 罗定 | 丽江 | 晋江 | 乐清 | 茂名 | 福清 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 廊坊 | 兰溪 | 汕尾 | 滨州 | 昆明 | 玉环 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 廊坊 | 兰溪 | 汕尾 | 滨州 | 昆明 | 玉环 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 绵阳 | 漳州 | 德州 | 聊城 | 龙岩 | 临沂 | - | ---- | ---- | ---- | ---- | ---- | ---- | + | 绵阳 | 漳州 | 德州 | 聊城 | 龙岩 | 临沂 | + | ---- | ---- | ---- | ---- | ---- | ---- | - | 新沂 | 桐乡 | 迪庆藏族自治州 | 汕头 | 潮州 | 驻马店 | - | ---- | ---- | -------------- | ---- | ---- | ------ | + | 新沂 | 桐乡 | 迪庆藏族自治州 | 汕头 | 潮州 | 驻马店 | + | ---- | ---- | -------------- | ---- | ---- | ------ | - | 曲阜 | 郴州 | 济源 | 兴义 | - | ---- | ---- | ---- | ---- | - </details>`, + | 曲阜 | 郴州 | 济源 | 兴义 | + | ---- | ---- | ---- | ---- | +</details>`, }; async function handler(ctx) { diff --git a/lib/routes/tgbus/list.ts b/lib/routes/tgbus/list.ts index 136ddb2af03546d..79e1aac0af8f370 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/thepetcity/index.ts b/lib/routes/thepetcity/index.ts index fb43599da5a5ae0..6801b02e003b93f 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/zju/cst/index.ts b/lib/routes/zju/cst/index.ts index 399ddff53635178..e844348773d7603 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/zsxq/group.ts b/lib/routes/zsxq/group.ts index 6bb7d9916006213..60ae887d6609b59 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<Data> { From c97564446c27eb95f751d6de00b82bacafa067f7 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Fri, 25 Oct 2024 08:48:32 -0700 Subject: [PATCH 285/740] feat: log redirect (#17307) --- lib/utils/ofetch.ts | 5 +++++ package.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/utils/ofetch.ts b/lib/utils/ofetch.ts index 0ea437355eee41f..2cddd52e3cd268a 100644 --- a/lib/utils/ofetch.ts +++ b/lib/utils/ofetch.ts @@ -26,6 +26,11 @@ const rofetch = createFetch().create({ headers: { 'user-agent': config.ua, }, + onResponse({ request, response }) { + if (response.redirected) { + logger.http(`Redirecting to ${response.url} for ${request}`); + } + }, }); export default rofetch; diff --git a/package.json b/package.json index 1f2605a63583be1..0c0fc5cbb250c0e 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "scripts": { "build": "tsx scripts/workflow/build-routes.ts", "build:docs": "tsx scripts/workflow/build-docs.ts", - "dev": "cross-env NODE_ENV=dev tsx watch --clear-screen=false lib/index.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", "format": "prettier \"**/*.{ts,tsx,js,json}\" --write && eslint --cache --fix \"**/*.{ts,tsx,js,yml}\"", "format:check": "prettier \"**/*.{ts,tsx,js,json}\" --check && eslint --cache \"**/*.{ts,tsx,js,yml}\"", From b76ffa1154cfca6b2968aa6384c6b8ce31f533d9 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Fri, 25 Oct 2024 11:59:09 -0700 Subject: [PATCH 286/740] fix(route): oup (#17309) --- lib/routes/oup/index.ts | 39 ++++++++++++++-------------- lib/routes/oup/templates/article.art | 4 --- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/lib/routes/oup/index.ts b/lib/routes/oup/index.ts index b4c056e476009ba..278efc5927b2e27 100644 --- a/lib/routes/oup/index.ts +++ b/lib/routes/oup/index.ts @@ -3,7 +3,7 @@ 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 { parseDate } from '@/utils/parse-date'; import path from 'node:path'; @@ -29,46 +29,47 @@ export const route: Route = { source: ['academic.oup.com/', 'academic.oup.com/:name/issue'], }, ], - name: 'Oxford Academic', - maintainers: [], + name: 'Oxford Academic - Journal', + maintainers: ['Fatpandac'], handler, url: 'academic.oup.com/', - description: `#### Journal {#oxford-university-press-oxford-academic-journal}`, }; async function handler(ctx) { const name = ctx.req.param('name'); const url = `${rootUrl}/${name}/issue`; - const response = await got(url); - const cookies = response.headers['set-cookie'].map((item) => item.split(';')[0]).join(';'); - const $ = load(response.data); + const response = await ofetch.raw(url); + const cookies = response.headers + .getSetCookie() + .map((item) => item.split(';')[0]) + .join(';'); + const $ = load(response._data); const list = $('div.al-article-items') - .map((_, item) => ({ + .toArray() + .map((item) => ({ title: $(item).find('a.at-articleLink').text(), link: new URL($(item).find('a.at-articleLink').attr('href'), rootUrl).href, - })) - .get(); + })); const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { - const detailResponse = await got(item.link, { + const detailResponse = await ofetch(item.link, { headers: { Cookie: cookies, }, }); - const content = load(detailResponse.data); + const $ = load(detailResponse); - item.author = content('a.linked-name.js-linked-name-trigger').text(); + item.author = $('.al-authors-list button').text(); item.description = art(path.join(__dirname, 'templates/article.art'), { - abstractContent: content('section.abstract > p.chapter-para').text(), - keywords: content('div.kwd-group > a') - .map((_, item) => $(item).text()) - .get() - .join(','), + abstractContent: $('section.abstract > p.chapter-para').text(), }); - item.pubDate = parseDate(content('div.citation-date').text()); + item.pubDate = parseDate($('div.citation-date').text()); + item.category = $('div.kwd-group > a') + .toArray() + .map((item) => $(item).text()); return item; }) diff --git a/lib/routes/oup/templates/article.art b/lib/routes/oup/templates/article.art index 56c9cf29764890b..05639ab238edf9c 100644 --- a/lib/routes/oup/templates/article.art +++ b/lib/routes/oup/templates/article.art @@ -1,6 +1,2 @@ <h2>Abstract</h2> <p>{{abstractContent}}</p> -{{ if keywords }} -<h2>Keywords</h2> -<p>{{keywords}}</p> -{{ /if }} From 5f6d57526a284a9f36e28209c0e1e820c25e18d2 Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Sat, 26 Oct 2024 19:59:37 +0800 Subject: [PATCH 287/740] fix(route): update base URL from afdian.net to afdian.com in afdian dynamic and explore routes (#17312) --- lib/routes/afdian/dynamic.ts | 2 +- lib/routes/afdian/explore.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/afdian/dynamic.ts b/lib/routes/afdian/dynamic.ts index 2819a48a9e5c652..539279154e22d19 100644 --- a/lib/routes/afdian/dynamic.ts +++ b/lib/routes/afdian/dynamic.ts @@ -13,7 +13,7 @@ export const route: Route = { async function handler(ctx) { const url_slug = ctx.req.param('uid').replace('@', ''); - const baseUrl = 'https://afdian.net'; + const baseUrl = 'https://afdian.com'; const userInfoRes = await got(`${baseUrl}/api/user/get-profile-by-slug`, { searchParams: { url_slug, diff --git a/lib/routes/afdian/explore.ts b/lib/routes/afdian/explore.ts index d8f4d93ae80391e..1f51c1d57cd6e04 100644 --- a/lib/routes/afdian/explore.ts +++ b/lib/routes/afdian/explore.ts @@ -49,7 +49,7 @@ export const route: Route = { async function handler(ctx) { const { type = 'rec', category = '所有' } = ctx.req.param(); - const baseUrl = 'https://afdian.net'; + const baseUrl = 'https://afdian.com'; const link = `${baseUrl}/api/creator/list`; const res = await got(link, { searchParams: { From aa713c082d5e3f31031e6ff4856cb3d5546e3cac Mon Sep 17 00:00:00 2001 From: mobyw <mobyw66@gmail.com> Date: Sun, 27 Oct 2024 00:08:31 +0800 Subject: [PATCH 288/740] =?UTF-8?q?feat(route/qq):=20add=20=E8=85=BE?= =?UTF-8?q?=E8=AE=AF=E9=A2=91=E9=81=93=20(/qq/pd)=20route=20(#17316)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route/qq): add qq/pd route * chore(format): remove `any` type hints * chore(types): add types for qq/pd * fix(route): fix route example of /qq/pd/guild --- lib/routes/qq/pd/guild.ts | 146 ++++++++++++++++++++++++++++++++++++++ lib/routes/qq/pd/types.ts | 82 +++++++++++++++++++++ lib/routes/qq/pd/utils.ts | 119 +++++++++++++++++++++++++++++++ 3 files changed, 347 insertions(+) create mode 100644 lib/routes/qq/pd/guild.ts create mode 100644 lib/routes/qq/pd/types.ts create mode 100644 lib/routes/qq/pd/utils.ts diff --git a/lib/routes/qq/pd/guild.ts b/lib/routes/qq/pd/guild.ts new file mode 100644 index 000000000000000..91c21736aeab69d --- /dev/null +++ b/lib/routes/qq/pd/guild.ts @@ -0,0 +1,146 @@ +import { Data, DataItem, Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; +import type { Context } from 'hono'; + +import { Feed } from './types'; +import { parseFeed } from './utils'; +import cache from '@/utils/cache'; + +const baseUrl = 'https://pd.qq.com/g/'; +const baseApiUrl = 'https://pd.qq.com/qunng/guild/gotrpc/noauth/trpc.qchannel.commreader.ComReader/'; +const getGuildFeedsUrl = baseApiUrl + 'GetGuildFeeds'; +const getChannelTimelineFeedsUrl = baseApiUrl + 'GetChannelTimelineFeeds'; +const getFeedDetailUrl = baseApiUrl + 'GetFeedDetail'; + +const sortMap = { + hot: 0, + created: 1, + replied: 2, +}; + +export const route: Route = { + path: ['/pd/guild/:id/:sub?/:sort?'], + categories: ['bbs'], + example: '/qq/pd/guild/qrp4pkq01d/650967831/created', + parameters: { + id: '频道号', + sub: '子频道 ID,网页端 URL `subc` 参数的值,默认为 `hot`(全部)', + sort: '排序方式,`hot`(热门),`created`(最新发布),`replied`(最新回复),默认为 `created`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['pd.qq.com/'], + }, + ], + name: '腾讯频道', + maintainers: ['mobyw'], + handler, + url: 'pd.qq.com/', +}; + +async function handler(ctx: Context): Promise<Data> { + const { id, sub = 'hot', sort = 'created' } = ctx.req.param(); + + if (sort in sortMap === false) { + throw new InvalidParameterError('invalid sort parameter, should be `hot`, `created`, or `replied`'); + } + const sortType = sortMap[sort]; + + let url = ''; + let body = {}; + let headers = {}; + + if (sub === 'hot') { + url = getGuildFeedsUrl; + // notice: do not change the order of the keys in the body + body = { count: 20, from: 7, guild_number: id, get_type: 1, feedAttchInfo: '', sortOption: sortType, need_channel_list: false, need_top_info: false }; + headers = { + cookie: 'p_uin=o09000002', + 'x-oidb': '{"uint32_service_type":12}', + 'x-qq-client-appid': '537246381', + }; + } else { + url = getChannelTimelineFeedsUrl; + // notice: do not change the order of the keys in the body + body = { count: 20, from: 7, guild_number: id, channelSign: { channel_id: sub }, feedAttchInfo: '', sortOption: sortType, need_top_info: false }; + headers = { + cookie: 'p_uin=o09000002', + 'x-oidb': '{"uint32_service_type":11}', + 'x-qq-client-appid': '537246381', + }; + } + + const data = await ofetch(url, { method: 'POST', body, headers }); + const feeds = data.data?.vecFeed || []; + + const items = feeds.map(async (feed: Feed) => { + let subId = sub; + if (sub === 'hot') { + // get real subId for hot feeds + subId = feed.channelInfo?.sign?.channel_id || ''; + } + const feedLink = baseUrl + id + '/post/' + feed.id; + const feedDetail = await cache.tryGet(feedLink, async () => { + // notice: do not change the order of the keys in the body + body = { + feedId: feed.id, + userId: feed.poster?.id, + createTime: feed.createTime, + from: 2, + detail_type: 1, + channelSign: { guild_number: id, channel_id: subId }, + extInfo: { + mapInfo: [ + { key: 'qc-tabid', value: 'ark' }, + { key: 'qc-pageid', value: 'pc' }, + ], + }, + }; + headers = { + cookie: 'p_uin=o09000002', + referer: feedLink, + 'x-oidb': '{"uint32_service_type":5}', + 'x-qq-client-appid': '537246381', + }; + const feedResponse = await ofetch(getFeedDetailUrl, { method: 'POST', body, headers }); + const feedContent: Feed = feedResponse.data?.feed || {}; + return { + title: feed.title?.contents[0]?.text_content?.text || feed.channelInfo?.guild_name || '', + link: feedLink, + description: parseFeed(feedContent), + pubDate: new Date(Number(feed.createTime) * 1000), + author: feed.poster?.nick, + }; + }); + + return feedDetail; + }); + + const feedItems = await Promise.all(items); + + let guildName = ''; + + if (feeds.length > 0 && feeds[0].channelInfo?.guild_name) { + guildName = feeds[0].channelInfo?.guild_name; + if (sub !== 'hot' && feeds[0].channelInfo?.name) { + guildName += ' (' + feeds[0].channelInfo?.name + ')'; + } + guildName += ' - 腾讯频道'; + } + + return { + title: guildName, + link: baseUrl + id, + description: guildName, + item: feedItems as DataItem[], + }; +} diff --git a/lib/routes/qq/pd/types.ts b/lib/routes/qq/pd/types.ts new file mode 100644 index 000000000000000..7164c822d6cba0f --- /dev/null +++ b/lib/routes/qq/pd/types.ts @@ -0,0 +1,82 @@ +// Description: Types for QQ PD API. + +export type Feed = { + id: string; + feed_type: number; // 1-post, 2-article + patternInfo: string; // JSON string + channelInfo: ChannelInfo; + title: { + contents: FeedContent[]; + }; + contents: { + contents: FeedContent[]; + }; + images: FeedImage[]; + poster: { + id: string; + nick: string; + }; + createTime: string; +}; + +export type ChannelInfo = { + name: string; + guild_number: string; + guild_name: string; + sign: { + guild_id: string; + channel_id: string; + }; +}; + +export type FeedContent = { + type: number; + pattern_id: string; + text_content?: { + text: string; + }; + emoji_content?: { + id: string; + type: string; + }; + url_content?: { + url: string; + displayText: string; + type: number; + }; +}; + +export type FeedImage = { + picId: string; + picUrl: string; + width: number; + height: number; + pattern_id?: string; +}; + +export type FeedPattern = { + id: string; + props?: { + textAlignment: number; // 0-left, 1-center, 2-right + }; + data: FeedPatternData[]; +}; + +export type FeedPatternData = { + type: number; // 1-text, 2-emoji, 5-link, 6-image, 9-newline + text?: string; + props?: FeedFontProps; + fileId?: string; + taskId?: string; + url?: string; + width?: number; + height?: number; + desc?: string; + href?: string; +}; + +export type FeedFontProps = { + fontWeight: number; // 400-normal, 700-bold + italic: boolean; + underline: boolean; +}; diff --git a/lib/routes/qq/pd/utils.ts b/lib/routes/qq/pd/utils.ts new file mode 100644 index 000000000000000..7e469d552539d7b --- /dev/null +++ b/lib/routes/qq/pd/utils.ts @@ -0,0 +1,119 @@ +// Description: QQ PD utils + +import { Feed, FeedImage, FeedPattern, FeedFontProps, FeedPatternData } from './types'; + +const patternTypeMap = { + 1: 'text', + 2: 'emoji', + 5: 'link', + 6: 'image', + 9: 'newline', +}; + +const textAlignmentMap = { + 0: 'left', + 1: 'center', + 2: 'right', +}; + +function parseText(text: string, props: FeedFontProps | undefined): string { + if (props === undefined) { + return text; + } + let style = ''; + if (props.fontWeight === 700) { + style += 'font-weight: bold;'; + } + if (props.italic) { + style += 'font-style: italic;'; + } + if (props.underline) { + style += 'text-decoration: underline;'; + } + if (style === '') { + return text; + } + return `<span style="${style}">${text}</span>`; +} + +function parseDataItem(item: FeedPatternData, texts: string[], images: { [id: string]: FeedImage }): string { + let imageId = ''; + switch (patternTypeMap[item.type] || undefined) { + case 'text': + return parseText(texts.shift() ?? '', item.props); + case 'newline': + texts.shift(); + return '<br />'; + case 'link': + return `<a href="${item.href ?? '#'}" target="_blank">${item.desc ?? ''}</a>`; + case 'image': + imageId = item.fileId || item.taskId || ''; + return `<img src="${images[imageId].picUrl}" style="max-width: 100%; width: ${images[imageId].width}px;"><br />`; + default: + return ''; + } +} + +function parseArticle(feed: Feed, texts: string[], images: { [id: string]: FeedImage }): string { + let result = ''; + if (feed.patternInfo === undefined || feed.patternInfo === null || feed.patternInfo === '') { + feed.patternInfo = '[]'; + } + const patterns: FeedPattern[] = JSON.parse(feed.patternInfo); + for (const pattern of patterns) { + if (pattern.props === undefined) { + continue; + } + const textAlign = pattern.props.textAlignment || 0; + result += '<p style="text-align: ' + textAlignmentMap[textAlign] + ';">'; + for (const item of pattern.data) { + result += parseDataItem(item, texts, images); + } + result += '</p>'; + } + return result; +} + +function parsePost(feed: Feed, texts: string[], images: { [id: string]: FeedImage }): string { + for (const content of feed.contents.contents) { + if (content.text_content) { + texts.push(content.text_content.text); + } + } + let result = ''; + for (const text of texts) { + result += text; + } + for (const image of Object.values(images)) { + result += '<p style="text-align: center">'; + result += `<img src="${image.picUrl}" style="max-width: 100%; width: ${image.width}px;">`; + result += '</p>'; + } + return result; +} + +export function parseFeed(feed: Feed): string { + const texts: string[] = []; + const images: { [id: string]: FeedImage } = {}; + for (const content of feed.contents.contents) { + if (content.text_content) { + texts.push(content.text_content.text); + } + } + for (const image of feed.images) { + images[image.picId] = { + picId: image.picId, + picUrl: image.picUrl, + width: image.width, + height: image.height, + }; + } + if (feed.feed_type === 1) { + // post: text and attachments + return parsePost(feed, texts, images); + } else if (feed.feed_type === 2) { + // article: pattern info + return parseArticle(feed, texts, images); + } + return ''; +} From c3123cc330ac591558539256e9a6628a20c6aba8 Mon Sep 17 00:00:00 2001 From: Axojhf <20625305+axojhf@users.noreply.github.com> Date: Sun, 27 Oct 2024 01:18:35 +0800 Subject: [PATCH 289/740] fix(route): fix lovelive-anime topics and schedules route (#17313) * fix: lovelive-anime topics and schedules * fix: /lovelive-anime/topics js Check warning * fix , * fix renderDescription * fix: imglink * Update lib/routes/lovelive-anime/topics.ts * Update lib/routes/lovelive-anime/topics.ts --------- --- lib/routes/lovelive-anime/schedules.ts | 9 +- lib/routes/lovelive-anime/topics.ts | 118 ++++++++++++++++++------- 2 files changed, 88 insertions(+), 39 deletions(-) diff --git a/lib/routes/lovelive-anime/schedules.ts b/lib/routes/lovelive-anime/schedules.ts index 16dd15fa339a555..046111b9ab03df7 100644 --- a/lib/routes/lovelive-anime/schedules.ts +++ b/lib/routes/lovelive-anime/schedules.ts @@ -2,7 +2,7 @@ import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); -import got from '@/utils/got'; +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); @@ -33,8 +33,7 @@ export const route: Route = { }; async function handler(ctx) { - const serie = ctx.req.param('serie'); - const category = ctx.req.param('category'); + const { serie = 'all', category = 'all' } = ctx.req.param(); const rootUrl = 'https://www.lovelive-anime.jp/common/api/calendar_list.php'; const nowTime = dayjs(); const dataPara = { @@ -47,9 +46,9 @@ async function handler(ctx) { if (category && 'all' !== category) { dataPara.category = [category]; } - const response = await got(`${rootUrl}?site=jp&ip=lovelive&data=${JSON.stringify(dataPara)}`); + const response = await ofetch(`${rootUrl}?site=jp&ip=lovelive&data=${encodeURIComponent(JSON.stringify(dataPara))}`); - const items = response.data.data.schedule_list.map((item) => { + const items = response.data.schedule_list.map((item) => { const link = item.url.select_url; const title = item.title; const category = item.categories.name; diff --git a/lib/routes/lovelive-anime/topics.ts b/lib/routes/lovelive-anime/topics.ts index 8802c0fc745f209..b327081032fdec9 100644 --- a/lib/routes/lovelive-anime/topics.ts +++ b/lib/routes/lovelive-anime/topics.ts @@ -3,11 +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 path from 'node:path'; import { art } from '@/utils/render'; import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; const renderDescription = (desc) => art(path.join(__dirname, 'templates/description.art'), desc); export const route: Route = { @@ -40,10 +41,25 @@ export const route: Route = { }; async function handler(ctx) { - const abbr = ctx.req.param('abbr'); - const rootUrl = `https://www.lovelive-anime.jp/${abbr}`; - const topicsUrlPart = 'yuigaoka' === abbr ? 'topics/' : 'topics.php'; - const baseUrl = `${rootUrl}/${'yuigaoka' === abbr ? 'topics/' : ''}`; + const { abbr, category = '', option } = ctx.req.param(); + let rootUrl: string; + switch (abbr) { + case 'musical': + rootUrl = 'https://www.lovelive-anime.jp/special/musical'; + break; + default: + rootUrl = `https://www.lovelive-anime.jp/${abbr}`; + break; + } + const topicsTable = { + otonokizaka: 'topics.php', + uranohoshi: 'topics.php', + nijigasaki: 'topics.php', + yuigaoka: 'topics/', + hasunosora: 'news/', + musical: 'topics.php', + }; + const baseUrl = `${rootUrl}/${topicsTable[abbr]}`; const abbrDetail = { otonokizaka: 'ラブライブ!', uranohoshi: 'サンシャイン!!', @@ -51,50 +67,84 @@ async function handler(ctx) { yuigaoka: 'スーパースター!!', }; - const url = Object.hasOwn(ctx.params, 'category') && ctx.req.param('category') !== 'detail' ? `${rootUrl}/${topicsUrlPart}?cat=${ctx.req.param('category')}` : `${rootUrl}/${topicsUrlPart}`; + const url = category !== '' && category !== 'detail' ? `${baseUrl}?cat=${category}` : baseUrl; - const response = await got(url); + const response = await ofetch(url); - const $ = load(response.data); + const $ = load(response); const categoryName = 'uranohoshi' === abbr ? $('div.llbox > p').text() : $('div.category_title > h2').text(); - let items = $('ul.listbox > li') - .map((_, item) => { - item = $(item); + const newsList = 'hasunosora' === abbr ? $('.list__content > ul > li').toArray() : $('ul.listbox > li').toArray(); + let items; - const link = `${baseUrl}${item.find('div > a').attr('href')}`; - const pubDate = parseDate(item.find('a > p.date').text(), 'YYYY/MM/DD'); - const title = item.find('a > p.title').text(); - const category = item.find('a > p.category').text(); - const imglink = `${baseUrl}${ - item + switch (abbr) { + case 'hasunosora': + items = newsList.map((item) => { + item = $(item); + const link = `${rootUrl}/news/${item.find('a').attr('href')}`; + const pubDate = timezone(parseDate(item.find('.list--date').text(), 'YYYY.MM.DD'), +9); + const title = item.find('.list--text').text(); + const category = item.find('.list--category').text(); + + return { + link, + pubDate, + title, + category, + description: title, + }; + }); + break; + default: + items = newsList.map((item) => { + item = $(item); + let link: string; + switch (abbr) { + case 'yuigaoka': + link = `${baseUrl}${item.find('div > a').attr('href')}`; + break; + default: + link = `${rootUrl}/${item.find('div > a').attr('href')}`; + break; + } + const pubDate = timezone(parseDate(item.find('a > p.date').text(), 'YYYY/MM/DD'), +9); + const title = item.find('a > p.title').text(); + const category = item.find('a > p.category').text(); + const imglink = `${rootUrl}/${item .find('a > img') .attr('style') .match(/background-image:url\((.*)\)/)[1] - }`; + }`; - return { - link, - pubDate, - title, - category, - description: renderDescription({ + return { + link, + pubDate, title, - imglink, - }), - }; - }) - .get(); + category, + description: renderDescription({ + imglink, + }), + }; + }); + break; + } - if (ctx.req.param('option') === 'detail' || ctx.req.param('category') === 'detail') { + if (option === 'detail' || category === 'detail') { items = await Promise.all( items.map((item) => cache.tryGet(item.link, async () => { - const detailResp = await got(item.link); - const $ = load(detailResp.data); - - const content = $('div.p-page__detail.p-article'); + const detailResp = await ofetch(item.link); + const $ = load(detailResp); + let content; + switch (abbr) { + case 'hasunosora': + content = $('div.detail__content'); + break; + default: + content = $('div.p-page__detail.p-article'); + break; + } for (const v of content.find('img')) { v.attribs.src = `${baseUrl}${v.attribs.src}`; } From d79e6cdf56c4586c51ca42d9e4798cf342c95676 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 26 Oct 2024 17:20:34 +0000 Subject: [PATCH 290/740] style: auto format --- lib/routes/lovelive-anime/topics.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/routes/lovelive-anime/topics.ts b/lib/routes/lovelive-anime/topics.ts index b327081032fdec9..efc4132da7d59e3 100644 --- a/lib/routes/lovelive-anime/topics.ts +++ b/lib/routes/lovelive-anime/topics.ts @@ -111,11 +111,12 @@ async function handler(ctx) { const pubDate = timezone(parseDate(item.find('a > p.date').text(), 'YYYY/MM/DD'), +9); const title = item.find('a > p.title').text(); const category = item.find('a > p.category').text(); - const imglink = `${rootUrl}/${item - .find('a > img') - .attr('style') - .match(/background-image:url\((.*)\)/)[1] - }`; + const imglink = `${rootUrl}/${ + item + .find('a > img') + .attr('style') + .match(/background-image:url\((.*)\)/)[1] + }`; return { link, From 9916c348bb05873dcfe6d33108a40c7dc93bd79e Mon Sep 17 00:00:00 2001 From: XieSC <xiestcn@outlook.com> Date: Sun, 27 Oct 2024 01:38:35 +0800 Subject: [PATCH 291/740] fix(route): get correct item link (#17278) When the `href` link inside the element is a relative link, the original handling would obtain an incorrect full link --- lib/routes/rsshub/transform/html.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/rsshub/transform/html.ts b/lib/routes/rsshub/transform/html.ts index 1084bf240df254a..c4354c1688219e7 100644 --- a/lib/routes/rsshub/transform/html.ts +++ b/lib/routes/rsshub/transform/html.ts @@ -92,10 +92,10 @@ Specify options (in the format of query string) in parameter \`routeParams\` par } else { link = linkEle.is('a') ? linkEle.attr('href') : linkEle.find('a').attr('href'); } - // 补全绝对链接 + // 补全绝对链接或相对链接 link = link.trim(); if (link && !link.startsWith('http')) { - link = `${new URL(url).origin}${link}`; + link = (new URL(link, url)).href; } const descEle = routeParams.get('itemDesc') ? item.find(routeParams.get('itemDesc')) : item; From 91599978b42187074bca74276b6b771ed0938b07 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 26 Oct 2024 17:40:25 +0000 Subject: [PATCH 292/740] style: auto format --- lib/routes/rsshub/transform/html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/rsshub/transform/html.ts b/lib/routes/rsshub/transform/html.ts index c4354c1688219e7..e6288d3169cfbd2 100644 --- a/lib/routes/rsshub/transform/html.ts +++ b/lib/routes/rsshub/transform/html.ts @@ -95,7 +95,7 @@ Specify options (in the format of query string) in parameter \`routeParams\` par // 补全绝对链接或相对链接 link = link.trim(); if (link && !link.startsWith('http')) { - link = (new URL(link, url)).href; + link = new URL(link, url).href; } const descEle = routeParams.get('itemDesc') ? item.find(routeParams.get('itemDesc')) : item; From b4217bf89212c2cd9e188e18f5e71edcdeb8762b Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Sun, 27 Oct 2024 02:11:34 +0800 Subject: [PATCH 293/740] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD=E5=9B=BD?= =?UTF-8?q?=E6=9C=89=E8=89=B2=E9=87=91=E5=B1=9E=E5=B7=A5=E4=B8=9A=E7=BD=91?= =?UTF-8?q?=20(#17320)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/chinania/index.ts | 240 +++++++++++++++++++++++++++++++ lib/routes/chinania/namespace.ts | 8 ++ 2 files changed, 248 insertions(+) create mode 100644 lib/routes/chinania/index.ts create mode 100644 lib/routes/chinania/namespace.ts diff --git a/lib/routes/chinania/index.ts b/lib/routes/chinania/index.ts new file mode 100644 index 000000000000000..d3cea7ae41f4f8a --- /dev/null +++ b/lib/routes/chinania/index.ts @@ -0,0 +1,240 @@ +import { Route } from '@/types'; + +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +export const handler = async (ctx) => { + const { category = 'xiehuidongtai/xiehuitongzhi' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 25; + + const rootUrl = 'https://www.chinania.org.cn'; + const currentUrl = new URL(`html/${category.endsWith('/') ? category : `${category}/`}`, rootUrl).href; + + const { data: response } = await got(currentUrl); + + const $ = load(response); + + const language = $('html').prop('lang'); + + let items = $('ul.notice_list_ul li') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + return { + title: item.find('p').first().text(), + pubDate: parseDate(item.find('p').last().text()), + link: item.find('a').prop('href'), + language, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + const title = $$('div.article_title p').first().text(); + const description = $$('div.article_content').html(); + + item.title = title; + item.description = description; + item.pubDate = parseDate($$('div.article_title p').last().text().split(':')); + item.author = $$("meta[name='keywords']").prop('content'); + item.content = { + html: description, + text: $$('div.article_content').text(), + }; + item.language = language; + + return item; + }) + ) + ); + + const title = $('title').text(); + const image = new URL($('img.logo').prop('src'), rootUrl).href; + + return { + title, + description: title.split(/-/)[0]?.trim(), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: $("meta[name='keywords']").prop('content'), + language, + }; +}; + +export const route: Route = { + path: '/:category{.+}?', + name: '分类', + url: 'www.chinania.org.cn', + maintainers: ['nczitzk'], + handler, + example: '/chinania/xiehuidongtai/xiehuitongzhi', + parameters: { category: '分类,默认为 `xiehuidongtai/xiehuitongzhi`,即协会通知,可在对应分类页 URL 中找到' }, + description: `:::tip + 若订阅 [协会通知](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)。 + ::: + + <details> + <summary>更多分类</summary> + + #### [协会动态](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/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/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/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/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/) | + | ------------------------------------------------------------------ | + | [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/huizhanbaodao/) | + | ------------------------------------------------------------------ | -------------------------------------------------------------------- | + | [hyzl/huiyizhanlan](https://rsshub.app/chinania/hyzl/huiyizhanlan) | [hyzl/huizhanbaodao](https://rsshub.app/chinania/hyzl/huizhanbaodao) | + + </details> + `, + categories: ['new-media'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.chinania.org.cn/html/:category'], + target: (params) => { + const category = params.category; + + return category ? `/${category}` : ''; + }, + }, + { + title: '协会动态 - 协会动态', + source: ['www.chinania.org.cn/html/xiehuidongtai/xiehuidongtai/'], + target: '/xiehuidongtai/xiehuidongtai', + }, + { + title: '协会动态 - 协会通知', + source: ['www.chinania.org.cn/html/xiehuidongtai/xiehuitongzhi/'], + target: '/xiehuidongtai/xiehuitongzhi', + }, + { + title: '协会动态 - 有色企业50强', + source: ['www.chinania.org.cn/html/xiehuidongtai/youseqiye50qiang/'], + target: '/xiehuidongtai/youseqiye50qiang', + }, + { + title: '党建工作 - 协会党建', + source: ['www.chinania.org.cn/html/djgz/xiehuidangjian/'], + target: '/djgz/xiehuidangjian', + }, + { + title: '党建工作 - 行业党建', + source: ['www.chinania.org.cn/html/djgz/hangyedangjian/'], + target: '/djgz/hangyedangjian', + }, + { + title: '会议展览 - 会展通知', + source: ['www.chinania.org.cn/html/hyzl/huiyizhanlan/'], + target: '/hyzl/huiyizhanlan', + }, + { + title: '会议展览 - 会展报道', + source: ['www.chinania.org.cn/html/hyzl/huizhanbaodao/'], + target: '/hyzl/huizhanbaodao', + }, + { + title: '行业新闻 - 时政要闻', + source: ['www.chinania.org.cn/html/hangyexinwen/shizhengyaowen/'], + target: '/hangyexinwen/shizhengyaowen', + }, + { + title: '行业新闻 - 要闻', + source: ['www.chinania.org.cn/html/hangyexinwen/yaowen/'], + target: '/hangyexinwen/yaowen', + }, + { + title: '行业新闻 - 行业新闻', + source: ['www.chinania.org.cn/html/hangyexinwen/guoneixinwen/'], + target: '/hangyexinwen/guoneixinwen', + }, + { + title: '行业新闻 - 资讯', + source: ['www.chinania.org.cn/html/hangyexinwen/zixun/'], + target: '/hangyexinwen/zixun', + }, + { + title: '行业统计 - 行业分析', + source: ['www.chinania.org.cn/html/hangyetongji/tongji/'], + target: '/hangyetongji/tongji', + }, + { + title: '行业统计 - 数据统计', + source: ['www.chinania.org.cn/html/hangyetongji/chanyeshuju/'], + target: '/hangyetongji/chanyeshuju', + }, + { + title: '行业统计 - 景气指数', + source: ['www.chinania.org.cn/html/hangyetongji/jqzs/'], + target: '/hangyetongji/jqzs', + }, + { + title: '人力资源 - 相关通知', + source: ['www.chinania.org.cn/html/renliziyuan/xiangguantongzhi/'], + target: '/renliziyuan/xiangguantongzhi', + }, + { + title: '人力资源 - 人事招聘', + source: ['www.chinania.org.cn/html/renliziyuan/renshizhaopin/'], + target: '/renliziyuan/renshizhaopin', + }, + { + title: '政策法规 - 政策法规', + source: ['www.chinania.org.cn/html/zcfg/zhengcefagui/'], + target: '/zcfg/zhengcefagui', + }, + ], +}; diff --git a/lib/routes/chinania/namespace.ts b/lib/routes/chinania/namespace.ts new file mode 100644 index 000000000000000..09f465dd8914780 --- /dev/null +++ b/lib/routes/chinania/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国有色金属工业网', + url: 'chinania.org.cn', + categories: ['new-media'], + description: '', +}; From a71410fdd770c5a66a19207ebcef13e4b76859d8 Mon Sep 17 00:00:00 2001 From: Thomas <1688389+Rakambda@users.noreply.github.com> Date: Sat, 26 Oct 2024 20:56:48 +0200 Subject: [PATCH 294/740] feat(twitter): only display tweets that contains a media (#17310) * feat: only display tweets that contains a media * Use lambda to simplify filtering * wording: media is uncountable --------- --- lib/routes/twitter/home-latest.ts | 5 ++++- lib/routes/twitter/home.ts | 5 ++++- lib/routes/twitter/likes.ts | 5 ++++- lib/routes/twitter/list.ts | 5 ++++- lib/routes/twitter/namespace.ts | 1 + lib/routes/twitter/utils.ts | 12 +++++++++--- 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/lib/routes/twitter/home-latest.ts b/lib/routes/twitter/home-latest.ts index 40e44ef823c523a..6c1a7b51bac1c40 100644 --- a/lib/routes/twitter/home-latest.ts +++ b/lib/routes/twitter/home-latest.ts @@ -40,7 +40,7 @@ export const route: Route = { async function handler(ctx) { // For compatibility - const { count, include_rts } = utils.parseRouteParams(ctx.req.param('routeParams')); + const { count, include_rts, only_media } = utils.parseRouteParams(ctx.req.param('routeParams')); const params = count ? { count } : {}; await api.init(); @@ -48,6 +48,9 @@ async function handler(ctx) { if (!include_rts) { data = utils.excludeRetweet(data); } + if (only_media) { + data = utils.keepOnlyMedia(data); + } return { title: `Twitter following timeline`, diff --git a/lib/routes/twitter/home.ts b/lib/routes/twitter/home.ts index 072edab95db0e36..1516c6829f2c69d 100644 --- a/lib/routes/twitter/home.ts +++ b/lib/routes/twitter/home.ts @@ -40,7 +40,7 @@ export const route: Route = { async function handler(ctx) { // For compatibility - const { count, include_rts } = utils.parseRouteParams(ctx.req.param('routeParams')); + const { count, include_rts, only_media } = utils.parseRouteParams(ctx.req.param('routeParams')); const params = count ? { count } : {}; await api.init(); @@ -48,6 +48,9 @@ async function handler(ctx) { if (!include_rts) { data = utils.excludeRetweet(data); } + if (only_media) { + data = utils.keepOnlyMedia(data); + } return { title: `Twitter following timeline`, diff --git a/lib/routes/twitter/likes.ts b/lib/routes/twitter/likes.ts index 8a5d7890b73f948..76f3ebe98466c1d 100644 --- a/lib/routes/twitter/likes.ts +++ b/lib/routes/twitter/likes.ts @@ -27,7 +27,7 @@ export const route: Route = { async function handler(ctx) { const id = ctx.req.param('id'); - const { count, include_rts } = utils.parseRouteParams(ctx.req.param('routeParams')); + const { count, include_rts, only_media } = utils.parseRouteParams(ctx.req.param('routeParams')); const params = count ? { count } : {}; await api.init(); @@ -35,6 +35,9 @@ async function handler(ctx) { if (!include_rts) { data = utils.excludeRetweet(data); } + if (only_media) { + data = utils.keepOnlyMedia(data); + } return { title: `Twitter Likes - ${id}`, diff --git a/lib/routes/twitter/list.ts b/lib/routes/twitter/list.ts index 96f461458b7ce6d..c19e5feec3c6ff9 100644 --- a/lib/routes/twitter/list.ts +++ b/lib/routes/twitter/list.ts @@ -33,7 +33,7 @@ export const route: Route = { async function handler(ctx) { const id = ctx.req.param('id'); - const { count, include_rts } = utils.parseRouteParams(ctx.req.param('routeParams')); + const { count, include_rts, only_media } = utils.parseRouteParams(ctx.req.param('routeParams')); const params = count ? { count } : {}; await api.init(); @@ -41,6 +41,9 @@ async function handler(ctx) { if (!include_rts) { data = utils.excludeRetweet(data); } + if (only_media) { + data = utils.keepOnlyMedia(data); + } return { title: `Twitter List - ${id}`, diff --git a/lib/routes/twitter/namespace.ts b/lib/routes/twitter/namespace.ts index e30ec149a1a61c7..7bccc310a60793e 100644 --- a/lib/routes/twitter/namespace.ts +++ b/lib/routes/twitter/namespace.ts @@ -27,6 +27,7 @@ export const namespace: Namespace = { | \`includeRts\` | Include retweets, only available in \`/twitter/user\` | \`0\`/\`1\`/\`true\`/\`false\` | \`true\` | | \`forceWebApi\` | Force using Web API even if Developer API is configured, only available in \`/twitter/user\` and \`/twitter/keyword\` | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | | \`count\` | \`count\` parameter passed to Twitter API, only available in \`/twitter/user\` | Unspecified/Integer | Unspecified | +| \`onlyMedia\` | Only get tweets with a media | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | Specify different option values than default values to improve readability. The URL diff --git a/lib/routes/twitter/utils.ts b/lib/routes/twitter/utils.ts index 90d266b7396c165..387884ca2e73b21 100644 --- a/lib/routes/twitter/utils.ts +++ b/lib/routes/twitter/utils.ts @@ -451,7 +451,7 @@ if (config.twitter.consumer_key && config.twitter.consumer_secret) { } const parseRouteParams = (routeParams) => { - let count, exclude_replies, include_rts; + let count, exclude_replies, include_rts, only_media; let force_web_api = false; switch (routeParams) { case 'exclude_rts_replies': @@ -479,9 +479,10 @@ const parseRouteParams = (routeParams) => { exclude_replies = fallback(undefined, queryToBoolean(parsed.get('excludeReplies')), false); include_rts = fallback(undefined, queryToBoolean(parsed.get('includeRts')), true); force_web_api = fallback(undefined, queryToBoolean(parsed.get('forceWebApi')), false); + only_media = fallback(undefined, queryToBoolean(parsed.get('onlyMedia')), false); } } - return { count, exclude_replies, include_rts, force_web_api }; + return { count, exclude_replies, include_rts, force_web_api, only_media }; }; export const excludeRetweet = function (tweets) { @@ -495,4 +496,9 @@ export const excludeRetweet = function (tweets) { return excluded; }; -export default { ProcessFeed, getAppClient, parseRouteParams, excludeRetweet }; +export const keepOnlyMedia = function (tweets) { + const excluded = tweets.filter((t) => t.extended_entities && t.extended_entities.media); + return excluded; +}; + +export default { ProcessFeed, getAppClient, parseRouteParams, excludeRetweet, keepOnlyMedia }; From 5e7fc99a8a4fd4561adca7edbc97f664305109f0 Mon Sep 17 00:00:00 2001 From: Axojhf <20625305+axojhf@users.noreply.github.com> Date: Sun, 27 Oct 2024 19:05:42 +0800 Subject: [PATCH 295/740] fix(route): fix warthunder route pubDate parse (#17324) --- lib/routes/warthunder/news.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/routes/warthunder/news.ts b/lib/routes/warthunder/news.ts index cb7432d31774933..f86794648e3717d 100644 --- a/lib/routes/warthunder/news.ts +++ b/lib/routes/warthunder/news.ts @@ -2,7 +2,7 @@ import { Route } from '@/types'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import path from 'node:path'; import { art } from '@/utils/render'; @@ -33,20 +33,21 @@ export const route: Route = { handler, url: 'warthunder.com/en/news', description: `News data from [https://warthunder.com/en/news/](https://warthunder.com/en/news/) - The year, month and day provided under UTC time zone are the same as the official website, so please ignore the specific time!!!`, + The \`pubDate\` provided under UTC time zone, so please ignore the specific time!!!`, }; async function handler() { const rootUrl = 'https://warthunder.com/en/news/'; - const response = await got(rootUrl); + const response = await ofetch(rootUrl); - const $ = load(response.data); + const $ = load(response); const pageFace = $('div.showcase__item.widget') - .map((_, item) => { + .toArray() + .map((item) => { item = $(item); - let pubDate = parseDate(item.find('div.widget__content > ul > li.widget-meta__item.widget-meta__item--right').text(), 'D MMMM YYYY'); + let pubDate = parseDate(item.find('div.widget__content > ul > li.widget-meta__item.widget-meta__item--right').text(), 'D MMMM YYYY', 'en'); pubDate = timezone(pubDate, 0); const category = []; if (item.find('div.widget__pin').length !== 0) { @@ -68,8 +69,7 @@ async function handler() { }), category, }; - }) - .get(); + }); return { title: 'War Thunder News', From 26bc26a3b8053a256432469d3b809df26c60f399 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Sun, 27 Oct 2024 21:37:37 +0700 Subject: [PATCH 296/740] feat(route/telegram): add telegram session scripts and logics --- lib/config.ts | 1 + lib/routes/telegram/channel.ts | 17 ++++++-- .../telegram/scripts/get-telegram-session.mjs | 41 +++++++++++++++++++ lib/routes/telegram/tglib/channel.ts | 4 ++ 4 files changed, 59 insertions(+), 4 deletions(-) create mode 100644 lib/routes/telegram/scripts/get-telegram-session.mjs diff --git a/lib/config.ts b/lib/config.ts index e2e933e6eaf875a..782e831a1ac52ec 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -286,6 +286,7 @@ export type Config = { }; telegram: { token?: string; + session?: string; }; tophub: { cookie?: string; diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index 15ca3ced5c5c327..38abd90b9fae2e6 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -92,7 +92,13 @@ For backward compatibility reasons, invalid \`routeParams\` will be treated as \ `, }, features: { - requireConfig: false, + requireConfig: [ + { + name: 'TELEGRAM_SESSION', + optional: true, + description: '', + }, + ], requirePuppeteer: false, antiCrawler: false, supportBT: false, @@ -110,13 +116,12 @@ For backward compatibility reasons, invalid \`routeParams\` will be treated as \ handler, description: ` :::tip - Due to Telegram restrictions, some channels involving pornography, copyright, and politics cannot be subscribed. You can confirm by visiting \`https://t.me/s/:username\`. + Due to Telegram restrictions, some channels involving pornography, copyright, and politics cannot be subscribed. You can confirm by visiting \`https://t.me/s/:username\`, it's recommended to deploy your own instance with configs (create your telegram via \`https://core.telegram.org/api/obtaining_api_id\`, run this command \`node ./lib/routes/telegram/scripts/get-telegram-session.mjs\` to get \`TELEGRAM_SESSION\` and set it as Environment Variable). :::`, }; async function handler(ctx) { - const useWeb = ctx.req.param('routeParams') || !config.telegram.session; - if (!useWeb) { + if (ctx.req.param('routeParams') && config.telegram.session) { return tglibchannel(ctx); } @@ -191,6 +196,10 @@ async function handler(ctx) { : $('.tgme_widget_message_wrap:not(.tgme_widget_message_wrap:has(.service_message,.tme_no_messages_found))'); // also exclude service messages if (list.length === 0 && $('.tgme_channel_history').length === 0) { + if (config.telegram.session) { + return tglibchannel(ctx); + } + throw new Error(`Unable to fetch message feed from this channel. Please check this URL to see if you can view the message preview: ${resourceUrl}`); } diff --git a/lib/routes/telegram/scripts/get-telegram-session.mjs b/lib/routes/telegram/scripts/get-telegram-session.mjs new file mode 100644 index 000000000000000..a819073d66fe9d3 --- /dev/null +++ b/lib/routes/telegram/scripts/get-telegram-session.mjs @@ -0,0 +1,41 @@ +import { TelegramClient } from 'telegram'; +import { StringSession } from 'telegram/sessions/index.js'; +import readline from 'readline'; + +function userInput(question) { + const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout + }); + return new Promise((resolve) => { + rl.question(question, (answer) => { + rl.close(); + resolve(answer); + }); + }); +} + +async function getSessionString() { + const apiId = parseInt(await userInput('Please enter your API ID: ')); + const apiHash = await userInput('Please enter your API Hash: '); + const stringSession = new StringSession(''); + const client = new TelegramClient(stringSession, apiId, apiHash, { + connectionRetries: 5, + }); + await client.start({ + phoneNumber: async () => await userInput('Please enter your phone number: '), + password: async () => await userInput('Please enter your password: '), + phoneCode: async () => await userInput('Please enter the code you received: '), + onError: (err) => console.log(err), + }); + + console.log('You are now connected.'); + const sessionString = client.session.save(); + + console.log('Your session string is:', sessionString); + await client.disconnect(); + return sessionString; +} + +// Run the function +getSessionString().catch(console.error); diff --git a/lib/routes/telegram/tglib/channel.ts b/lib/routes/telegram/tglib/channel.ts index 73864bf364b6f08..d9b85e2f0be8bdd 100644 --- a/lib/routes/telegram/tglib/channel.ts +++ b/lib/routes/telegram/tglib/channel.ts @@ -117,6 +117,10 @@ export default async function handler(ctx) { const chat = await client.getInputEntity(ctx.req.param('username')); const channelInfo = await client.getEntity(chat); + if (channelInfo.className !== 'Channel') { + throw new Error(`${ctx.req.param('username')} is not a channel`); + } + let attachments = []; const messages = await client.getMessages(chat, { limit: 50 }); From 60f432766bb38450e52c777382e4d2634d7d0340 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Sun, 27 Oct 2024 21:44:47 +0700 Subject: [PATCH 297/740] docs(route/telegram): add docs for telegram session --- lib/routes/telegram/channel.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index 38abd90b9fae2e6..9ec1cc6adbdbe95 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -96,7 +96,7 @@ For backward compatibility reasons, invalid \`routeParams\` will be treated as \ { name: 'TELEGRAM_SESSION', optional: true, - description: '', + description: 'Telegram API Authentication', }, ], requirePuppeteer: false, @@ -116,7 +116,7 @@ For backward compatibility reasons, invalid \`routeParams\` will be treated as \ handler, description: ` :::tip - Due to Telegram restrictions, some channels involving pornography, copyright, and politics cannot be subscribed. You can confirm by visiting \`https://t.me/s/:username\`, it's recommended to deploy your own instance with configs (create your telegram via \`https://core.telegram.org/api/obtaining_api_id\`, run this command \`node ./lib/routes/telegram/scripts/get-telegram-session.mjs\` to get \`TELEGRAM_SESSION\` and set it as Environment Variable). + Due to Telegram restrictions, some channels involving pornography, copyright, and politics cannot be subscribed. You can confirm by visiting \`https://t.me/s/:username\`, it's recommended to deploy your own instance with telegram api configs (create your telegram application via \`https://core.telegram.org/api/obtaining_api_id\`, run this command \`node ./lib/routes/telegram/scripts/get-telegram-session.mjs\` to get \`TELEGRAM_SESSION\` and set it as Environment Variable). :::`, }; @@ -159,7 +159,7 @@ async function handler(ctx) { searchQuery = fallback(undefined, routeParams.searchQuery, null); } - // TODO: some channels are not available in t.me/s/, need extra handling logics + // some channels are not available in t.me/s/, fallback to use Telegram api const resourceUrl = searchQuery ? `https://t.me/s/${username}?q=${encodeURIComponent(searchQuery)}` : `https://t.me/s/${username}`; const data = await cache.tryGet( From abed9a058c6935ca6a723cfb535803024ccc9807 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Sun, 27 Oct 2024 23:06:44 +0800 Subject: [PATCH 298/740] fix(middleware): use URL pathname to maintain exact user access path for access control (#17327) --- lib/middleware/access-control.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/middleware/access-control.ts b/lib/middleware/access-control.ts index 2ba1b237c764fd4..dade5f26608cace 100644 --- a/lib/middleware/access-control.ts +++ b/lib/middleware/access-control.ts @@ -8,7 +8,7 @@ const reject = () => { }; const middleware: MiddlewareHandler = async (ctx, next) => { - const requestPath = ctx.req.path; + const requestPath = new URL(ctx.req.url).pathname; const accessKey = ctx.req.query('key'); const accessCode = ctx.req.query('code'); From 24e8c1e0c8fdfefd297e7486ec2780cb14012f6d Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Mon, 28 Oct 2024 17:45:03 +0700 Subject: [PATCH 299/740] fix(route/telegram): null username from telegram api --- lib/routes/telegram/tglib/channel.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/telegram/tglib/channel.ts b/lib/routes/telegram/tglib/channel.ts index d9b85e2f0be8bdd..7af7cc50c82b91c 100644 --- a/lib/routes/telegram/tglib/channel.ts +++ b/lib/routes/telegram/tglib/channel.ts @@ -144,8 +144,8 @@ export default async function handler(ctx) { title, description, pubDate: new Date(message.date * 1000).toUTCString(), - link: `https://t.me/s/${channelInfo.username}/${message.id}`, - author: `${channelInfo.title} (@${channelInfo.username})`, + link: `https://t.me/s/${ctx.req.param('username')}/${message.id}`, + author: `${channelInfo.title} (@${ctx.req.param('username')})`, }); } } @@ -153,10 +153,10 @@ export default async function handler(ctx) { return { title: channelInfo.title, language: null, - link: `https://t.me/${channelInfo.username}`, + link: `https://t.me/${ctx.req.param('username')}`, item, allowEmpty: ctx.req.param('id') === 'allow_empty', - description: `@${channelInfo.username} on Telegram`, + description: `@${ctx.req.param('username')} on Telegram`, }; } From 1765431ef4009c5d5bcd888a812d6d449d407bf6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 05:41:47 -0700 Subject: [PATCH 300/740] chore(deps-dev): bump @babel/preset-env from 7.25.9 to 7.26.0 (#17336) * chore(deps-dev): bump @babel/preset-env from 7.25.9 to 7.26.0 Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.25.9 to 7.26.0. - [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.0/packages/babel-preset-env) --- updated-dependencies: - dependency-name: "@babel/preset-env" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 894 +++++++++++++++++++++++++------------------------ 2 files changed, 464 insertions(+), 432 deletions(-) diff --git a/package.json b/package.json index 0c0fc5cbb250c0e..ac14d291d64d9fa 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@babel/preset-env": "7.25.9", + "@babel/preset-env": "7.26.0", "@babel/preset-typescript": "7.25.9", "@eslint/eslintrc": "3.1.0", "@eslint/js": "9.13.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8c520f6f2f89bb8..1cc2205dd521145 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -259,11 +259,11 @@ importers: version: 3.23.8 devDependencies: '@babel/preset-env': - specifier: 7.25.9 - version: 7.25.9(@babel/core@7.25.9) + specifier: 7.26.0 + version: 7.26.0(@babel/core@7.26.0) '@babel/preset-typescript': specifier: 7.25.9 - version: 7.25.9(@babel/core@7.25.9) + version: 7.25.9(@babel/core@7.26.0) '@eslint/eslintrc': specifier: 3.1.0 version: 3.1.0 @@ -441,20 +441,20 @@ packages: '@babel/code-frame@7.0.0': resolution: {integrity: sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==} - '@babel/code-frame@7.25.9': - resolution: {integrity: sha512-z88xeGxnzehn2sqZ8UdGQEvYErF1odv2CftxInpSYJt6uHuPe9YjahKZITGs3l5LeI9d2ROG+obuDAoSlqbNfQ==} + '@babel/code-frame@7.26.0': + resolution: {integrity: sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.25.9': - resolution: {integrity: sha512-yD+hEuJ/+wAJ4Ox2/rpNv5HIuPG82x3ZlQvYVn8iYCprdxzE7P1udpGF1jyjQVBU4dgznN+k2h103vxZ7NdPyw==} + '@babel/compat-data@7.26.0': + resolution: {integrity: sha512-qETICbZSLe7uXv9VE8T/RWOdIE5qqyTucOt4zLYMafj2MRO271VGgLd4RACJMeBO37UPWhXiKMBk7YlJ0fOzQA==} engines: {node: '>=6.9.0'} - '@babel/core@7.25.9': - resolution: {integrity: sha512-WYvQviPw+Qyib0v92AwNIrdLISTp7RfDkM7bPqBvpbnhY4wq8HvHBZREVdYDXk98C8BkOIVnHAY3yvj7AVISxQ==} + '@babel/core@7.26.0': + resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} engines: {node: '>=6.9.0'} - '@babel/generator@7.25.9': - resolution: {integrity: sha512-omlUGkr5EaoIJrhLf9CJ0TvjBRpd9+AXRG//0GEQ9THSo8wPiTlbpy1/Ow8ZTrbXpjd9FHXfbFQx32I04ht0FA==} + '@babel/generator@7.26.0': + resolution: {integrity: sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w==} engines: {node: '>=6.9.0'} '@babel/helper-annotate-as-pure@7.25.9': @@ -494,8 +494,8 @@ packages: resolution: {integrity: sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==} engines: {node: '>=6.9.0'} - '@babel/helper-module-transforms@7.25.9': - resolution: {integrity: sha512-TvLZY/F3+GvdRYFZFyxMvnsKi+4oJdgZzU3BoGN9Uc2d9C6zfNwJcKKhjqLAhK8i46mv93jsO74fDh3ih6rpHA==} + '@babel/helper-module-transforms@7.26.0': + resolution: {integrity: sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 @@ -544,16 +544,16 @@ packages: resolution: {integrity: sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==} engines: {node: '>=6.9.0'} - '@babel/helpers@7.25.9': - resolution: {integrity: sha512-oKWp3+usOJSzDZOucZUAMayhPz/xVjzymyDzUN8dk0Wd3RWMlGLXi07UCQ/CgQVb8LvXx3XBajJH4XGgkt7H7g==} + '@babel/helpers@7.26.0': + resolution: {integrity: sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==} engines: {node: '>=6.9.0'} '@babel/highlight@7.25.9': resolution: {integrity: sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.25.9': - resolution: {integrity: sha512-aI3jjAAO1fh7vY/pBGsn1i9LDbRP43+asrRlkPuTXW5yHXtd1NgTEMudbBoDDxrf1daEEfPJqR+JBMakzrR4Dg==} + '@babel/parser@7.26.1': + resolution: {integrity: sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==} engines: {node: '>=6.0.0'} hasBin: true @@ -593,14 +593,14 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-assertions@7.25.9': - resolution: {integrity: sha512-4GHX5uzr5QMOOuzV0an9MFju4hKlm0OyePl/lHhcsTVae5t/IKVHnb8W67Vr6FuLlk5lPqLB7n7O+K5R46emYg==} + '@babel/plugin-syntax-import-assertions@7.26.0': + resolution: {integrity: sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-syntax-import-attributes@7.25.9': - resolution: {integrity: sha512-u3EN9ub8LyYvgTnrgp8gboElouayiwPdnM7x5tcnW3iSt09/lQYPwMNK40I9IUxo7QOZhAsPHCmmuO7EPdruqg==} + '@babel/plugin-syntax-import-attributes@7.26.0': + resolution: {integrity: sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -659,8 +659,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/plugin-transform-class-static-block@7.25.9': - resolution: {integrity: sha512-UIf+72C7YJ+PJ685/PpATbCz00XqiFEzHX5iysRwfvNT0Ko+FaXSvRgLytFSp8xUItrG9pFM/KoBBZDrY/cYyg==} + '@babel/plugin-transform-class-static-block@7.26.0': + resolution: {integrity: sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.12.0 @@ -857,6 +857,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-regexp-modifiers@7.26.0': + resolution: {integrity: sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/plugin-transform-reserved-words@7.25.9': resolution: {integrity: sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==} engines: {node: '>=6.9.0'} @@ -923,8 +929,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0 - '@babel/preset-env@7.25.9': - resolution: {integrity: sha512-XqDEt+hfsQukahSX9JOBDHhpUHDhj2zGSxoqWQFCMajOSBnbhBdgON/bU/5PkBA1yX5tqW6tTzuIPVsZTQ7h5Q==} + '@babel/preset-env@7.26.0': + resolution: {integrity: sha512-H84Fxq0CQJNdPFT2DrfnylZ3cf5K43rGfWK4LJGPpjKHiZlk0/RzwEus3PDDZZg+/Er7lCA03MVacueUuXdzfw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -940,12 +946,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 - '@babel/runtime-corejs2@7.25.9': - resolution: {integrity: sha512-pNsdrY8b2mxWmnyERkYBI38JB+aGsMr4vNwrtcj0kuXvPwAnRTQD+Rbm6G7qAmPPu+t0nTjP9FlxVznLtDoLjA==} + '@babel/runtime-corejs2@7.26.0': + resolution: {integrity: sha512-AQKSxUdaM7uTEGFmLZj1LOgX3LaLdt4udjqywaVdN6R5P2KAgqtBkDW4TS2ySRYNqcKmEe8Xv96jegHJNNb7Gg==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.25.9': - resolution: {integrity: sha512-4zpTHZ9Cm6L9L+uIqghQX8ZXg8HKFcjYO3qHoO8zTmRm6HQUJ8SSJ+KRvbMBZn0EGVlT4DRYeQ/6hjlyXBh+Kg==} + '@babel/runtime@7.26.0': + resolution: {integrity: sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==} engines: {node: '>=6.9.0'} '@babel/template@7.25.9': @@ -956,8 +962,8 @@ packages: resolution: {integrity: sha512-ZCuvfwOwlz/bawvAuvcj8rrithP2/N55Tzz342AkTvq4qaWbGfmCk/tKhNaV2cthijKrPAA8SRJV5WWe7IBMJw==} engines: {node: '>=6.9.0'} - '@babel/types@7.25.9': - resolution: {integrity: sha512-OwS2CM5KocvQ/k7dFJa8i5bNGJP0hXWfVCfDkqRFP1IreH1JDC7wG6eCYCi0+McbfT8OR/kNqsI0UU0xP9H6PQ==} + '@babel/types@7.26.0': + resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} '@bcoe/v8-coverage@0.2.3': @@ -1264,14 +1270,14 @@ packages: cpu: [x64] os: [win32] - '@eslint-community/eslint-utils@4.4.0': - resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} + '@eslint-community/eslint-utils@4.4.1': + resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} 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.11.1': - resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} + '@eslint-community/regexpp@4.12.1': + resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} '@eslint/config-array@0.18.0': @@ -1601,83 +1607,93 @@ packages: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} engines: {node: '>= 8.0.0'} - '@rollup/rollup-android-arm-eabi@4.24.0': - resolution: {integrity: sha512-Q6HJd7Y6xdB48x8ZNVDOqsbh2uByBhgK8PiQgPhwkIw/HC/YX5Ghq2mQY5sRMZWHb3VsFkWooUVOZHKr7DmDIA==} + '@rollup/rollup-android-arm-eabi@4.24.2': + resolution: {integrity: sha512-ufoveNTKDg9t/b7nqI3lwbCG/9IJMhADBNjjz/Jn6LxIZxD7T5L8l2uO/wD99945F1Oo8FvgbbZJRguyk/BdzA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.24.0': - resolution: {integrity: sha512-ijLnS1qFId8xhKjT81uBHuuJp2lU4x2yxa4ctFPtG+MqEE6+C5f/+X/bStmxapgmwLwiL3ih122xv8kVARNAZA==} + '@rollup/rollup-android-arm64@4.24.2': + resolution: {integrity: sha512-iZoYCiJz3Uek4NI0J06/ZxUgwAfNzqltK0MptPDO4OR0a88R4h0DSELMsflS6ibMCJ4PnLvq8f7O1d7WexUvIA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.24.0': - resolution: {integrity: sha512-bIv+X9xeSs1XCk6DVvkO+S/z8/2AMt/2lMqdQbMrmVpgFvXlmde9mLcbQpztXm1tajC3raFDqegsH18HQPMYtA==} + '@rollup/rollup-darwin-arm64@4.24.2': + resolution: {integrity: sha512-/UhrIxobHYCBfhi5paTkUDQ0w+jckjRZDZ1kcBL132WeHZQ6+S5v9jQPVGLVrLbNUebdIRpIt00lQ+4Z7ys4Rg==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.24.0': - resolution: {integrity: sha512-X6/nOwoFN7RT2svEQWUsW/5C/fYMBe4fnLK9DQk4SX4mgVBiTA9h64kjUYPvGQ0F/9xwJ5U5UfTbl6BEjaQdBQ==} + '@rollup/rollup-darwin-x64@4.24.2': + resolution: {integrity: sha512-1F/jrfhxJtWILusgx63WeTvGTwE4vmsT9+e/z7cZLKU8sBMddwqw3UV5ERfOV+H1FuRK3YREZ46J4Gy0aP3qDA==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.24.0': - resolution: {integrity: sha512-0KXvIJQMOImLCVCz9uvvdPgfyWo93aHHp8ui3FrtOP57svqrF/roSSR5pjqL2hcMp0ljeGlU4q9o/rQaAQ3AYA==} + '@rollup/rollup-freebsd-arm64@4.24.2': + resolution: {integrity: sha512-1YWOpFcGuC6iGAS4EI+o3BV2/6S0H+m9kFOIlyFtp4xIX5rjSnL3AwbTBxROX0c8yWtiWM7ZI6mEPTI7VkSpZw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.24.2': + resolution: {integrity: sha512-3qAqTewYrCdnOD9Gl9yvPoAoFAVmPJsBvleabvx4bnu1Kt6DrB2OALeRVag7BdWGWLhP1yooeMLEi6r2nYSOjg==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.24.2': + resolution: {integrity: sha512-ArdGtPHjLqWkqQuoVQ6a5UC5ebdX8INPuJuJNWRe0RGa/YNhVvxeWmCTFQ7LdmNCSUzVZzxAvUznKaYx645Rig==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.24.0': - resolution: {integrity: sha512-it2BW6kKFVh8xk/BnHfakEeoLPv8STIISekpoF+nBgWM4d55CZKc7T4Dx1pEbTnYm/xEKMgy1MNtYuoA8RFIWw==} + '@rollup/rollup-linux-arm-musleabihf@4.24.2': + resolution: {integrity: sha512-B6UHHeNnnih8xH6wRKB0mOcJGvjZTww1FV59HqJoTJ5da9LCG6R4SEBt6uPqzlawv1LoEXSS0d4fBlHNWl6iYw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.24.0': - resolution: {integrity: sha512-i0xTLXjqap2eRfulFVlSnM5dEbTVque/3Pi4g2y7cxrs7+a9De42z4XxKLYJ7+OhE3IgxvfQM7vQc43bwTgPwA==} + '@rollup/rollup-linux-arm64-gnu@4.24.2': + resolution: {integrity: sha512-kr3gqzczJjSAncwOS6i7fpb4dlqcvLidqrX5hpGBIM1wtt0QEVtf4wFaAwVv8QygFU8iWUMYEoJZWuWxyua4GQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.24.0': - resolution: {integrity: sha512-9E6MKUJhDuDh604Qco5yP/3qn3y7SLXYuiC0Rpr89aMScS2UAmK1wHP2b7KAa1nSjWJc/f/Lc0Wl1L47qjiyQw==} + '@rollup/rollup-linux-arm64-musl@4.24.2': + resolution: {integrity: sha512-TDdHLKCWgPuq9vQcmyLrhg/bgbOvIQ8rtWQK7MRxJ9nvaxKx38NvY7/Lo6cYuEnNHqf6rMqnivOIPIQt6H2AoA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': - resolution: {integrity: sha512-2XFFPJ2XMEiF5Zi2EBf4h73oR1V/lycirxZxHZNc93SqDN/IWhYYSYj8I9381ikUFXZrz2v7r2tOVk2NBwxrWw==} + '@rollup/rollup-linux-powerpc64le-gnu@4.24.2': + resolution: {integrity: sha512-xv9vS648T3X4AxFFZGWeB5Dou8ilsv4VVqJ0+loOIgDO20zIhYfDLkk5xoQiej2RiSQkld9ijF/fhLeonrz2mw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.24.0': - resolution: {integrity: sha512-M3Dg4hlwuntUCdzU7KjYqbbd+BLq3JMAOhCKdBE3TcMGMZbKkDdJ5ivNdehOssMCIokNHFOsv7DO4rlEOfyKpg==} + '@rollup/rollup-linux-riscv64-gnu@4.24.2': + resolution: {integrity: sha512-tbtXwnofRoTt223WUZYiUnbxhGAOVul/3StZ947U4A5NNjnQJV5irKMm76G0LGItWs6y+SCjUn/Q0WaMLkEskg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.24.0': - resolution: {integrity: sha512-mjBaoo4ocxJppTorZVKWFpy1bfFj9FeCMJqzlMQGjpNPY9JwQi7OuS1axzNIk0nMX6jSgy6ZURDZ2w0QW6D56g==} + '@rollup/rollup-linux-s390x-gnu@4.24.2': + resolution: {integrity: sha512-gc97UebApwdsSNT3q79glOSPdfwgwj5ELuiyuiMY3pEWMxeVqLGKfpDFoum4ujivzxn6veUPzkGuSYoh5deQ2Q==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.24.0': - resolution: {integrity: sha512-ZXFk7M72R0YYFN5q13niV0B7G8/5dcQ9JDp8keJSfr3GoZeXEoMHP/HlvqROA3OMbMdfr19IjCeNAnPUG93b6A==} + '@rollup/rollup-linux-x64-gnu@4.24.2': + resolution: {integrity: sha512-jOG/0nXb3z+EM6SioY8RofqqmZ+9NKYvJ6QQaa9Mvd3RQxlH68/jcB/lpyVt4lCiqr04IyaC34NzhUqcXbB5FQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.24.0': - resolution: {integrity: sha512-w1i+L7kAXZNdYl+vFvzSZy8Y1arS7vMgIy8wusXJzRrPyof5LAb02KGr1PD2EkRcl73kHulIID0M501lN+vobQ==} + '@rollup/rollup-linux-x64-musl@4.24.2': + resolution: {integrity: sha512-XAo7cJec80NWx9LlZFEJQxqKOMz/lX3geWs2iNT5CHIERLFfd90f3RYLLjiCBm1IMaQ4VOX/lTC9lWfzzQm14Q==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.24.0': - resolution: {integrity: sha512-VXBrnPWgBpVDCVY6XF3LEW0pOU51KbaHhccHw6AS6vBWIC60eqsH19DAeeObl+g8nKAz04QFdl/Cefta0xQtUQ==} + '@rollup/rollup-win32-arm64-msvc@4.24.2': + resolution: {integrity: sha512-A+JAs4+EhsTjnPQvo9XY/DC0ztaws3vfqzrMNMKlwQXuniBKOIIvAAI8M0fBYiTCxQnElYu7mLk7JrhlQ+HeOw==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.24.0': - resolution: {integrity: sha512-xrNcGDU0OxVcPTH/8n/ShH4UevZxKIO6HJFK0e15XItZP2UcaiLFd5kiX7hJnqCbSztUF8Qot+JWBC/QXRPYWQ==} + '@rollup/rollup-win32-ia32-msvc@4.24.2': + resolution: {integrity: sha512-ZhcrakbqA1SCiJRMKSU64AZcYzlZ/9M5LaYil9QWxx9vLnkQ9Vnkve17Qn4SjlipqIIBFKjBES6Zxhnvh0EAEw==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.24.0': - resolution: {integrity: sha512-fbMkAF7fufku0N2dE5TBXcNlg0pt0cJue4xBRE2Qc5Vqikxr4VCgKj/ht6SMdFcOacVA9rqF70APJ8RN/4vMJw==} + '@rollup/rollup-win32-x64-msvc@4.24.2': + resolution: {integrity: sha512-2mLH46K1u3r6uwc95hU+OR9q/ggYMpnS7pSp83Ece1HUQgF9Nh/QwTK5rcgbFnV9j+08yBrU5sA/P0RK2MSBNA==} cpu: [x64] os: [win32] @@ -2026,8 +2042,8 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - acorn@8.13.0: - resolution: {integrity: sha512-8zSiw54Oxrdym50NlZ9sUusyO1Z1ZchgRLWRaK6c86XJFClyCgFKetdowBg5bKxyp/u+CDBJG4Mpp0m3HLZl9w==} + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} engines: {node: '>=0.4.0'} hasBin: true @@ -2301,8 +2317,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001669: - resolution: {integrity: sha512-DlWzFDJqstqtIVx1zeSpIMLjunf5SmwOw0N2Ck/QSQdS8PLS4+9HrLaYei4w8BIAL7IB/UEDu889d8vhCTPA0w==} + caniuse-lite@1.0.30001673: + resolution: {integrity: sha512-WTrjUCSMp3LYX0nE12ECkV0a+e6LC85E0Auz75555/qr78Oc8YWhEPNfDd6SHdtlCMSzqtuXY0uyEMNRcsKpKw==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -2756,8 +2772,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.45: - resolution: {integrity: sha512-vOzZS6uZwhhbkZbcRyiy99Wg+pYFV5hk+5YaECvx0+Z31NR3Tt5zS6dze2OepT6PCTzVzT0dIJItti+uAW5zmw==} + electron-to-chromium@1.5.47: + resolution: {integrity: sha512-zS5Yer0MOYw4rtK2iq43cJagHZ8sXN0jDHDKzB+86gSBSAI4v07S97mcq+Gs2vclAxSh1j7vOAHxSVgduiiuVQ==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -4009,8 +4025,8 @@ packages: markdown-table@2.0.0: resolution: {integrity: sha512-Ezda85ToJUBhM6WGaG6veasyym+Tbs3cMAw/ZhOPqXiYsr0jgocBV3j3nx+4lk47plLlIqjwuTm/ywVI+zjJ/A==} - mdast-util-from-markdown@2.0.1: - resolution: {integrity: sha512-aJEUyzZ6TzlsX2s5B4Of7lN7EQtAxvtradMMglCQDyaTFgse6CmtmdJ15ElnVRlCg1vpNyVtbem0PWzlNieZsA==} + mdast-util-from-markdown@2.0.2: + resolution: {integrity: sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==} mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} @@ -4778,8 +4794,8 @@ packages: resolution: {integrity: sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==} hasBin: true - regjsparser@0.11.1: - resolution: {integrity: sha512-1DHODs4B8p/mQHU9kr+jv8+wIC9mtG4eBHxWxIq5mhjE3D5oORhCc6deRKzTjs9DcfRFmj9BHSDguZklqCGFWQ==} + regjsparser@0.11.2: + resolution: {integrity: sha512-3OGZZ4HoLJkkAZx/48mTXJNlmqTGOzc0o9OWQPuWpkOlXXPbyN6OafCcoXUnBqE2D3f/T5L+pWc1kdEmnfnRsA==} hasBin: true relateurl@0.2.7: @@ -4863,8 +4879,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup@4.24.0: - resolution: {integrity: sha512-DOmrlGSXNk1DM0ljiQA+i+o0rSLhtii1je5wgk60j49d1jHT5YYttBv1iWOnYSTG+fZZESUOSNiAl89SIet+Cg==} + rollup@4.24.2: + resolution: {integrity: sha512-do/DFGq5g6rdDhdpPq5qb2ecoczeK6y+2UAjdJ5trjQJj5f1AiVdLRWRc9A9/fFukfvJRgM0UXzxBIYMovm5ww==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -5253,8 +5269,8 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.55: - resolution: {integrity: sha512-BL+BuKHHaOpntE5BGI6naXjULU6aRlgaYdfDHR3T/hdbNTWkWUZ9yuc11wGnwgpvRwlyUiIK+QohYK3olaVU6Q==} + tldts-core@6.1.56: + resolution: {integrity: sha512-Ihxv/Bwiyj73icTYVgBUkQ3wstlCglLoegSgl64oSrGUBX1hc7Qmf/CnrnJLaQdZrCnTaLqMYOwKMKlkfkFrxQ==} tldts@6.1.55: resolution: {integrity: sha512-HxQR/9roQ07Pwc8RyyrJMAxRz5/ssoF3qIPPUiIo3zUt6yMdmYZjM2OZIFMiZ3jHyz9jrGHEHuQZrUhoc1LkDw==} @@ -5808,25 +5824,26 @@ snapshots: dependencies: '@babel/highlight': 7.25.9 - '@babel/code-frame@7.25.9': + '@babel/code-frame@7.26.0': dependencies: - '@babel/highlight': 7.25.9 + '@babel/helper-validator-identifier': 7.25.9 + js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/compat-data@7.25.9': {} + '@babel/compat-data@7.26.0': {} - '@babel/core@7.25.9': + '@babel/core@7.26.0': dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.25.9 - '@babel/generator': 7.25.9 + '@babel/code-frame': 7.26.0 + '@babel/generator': 7.26.0 '@babel/helper-compilation-targets': 7.25.9 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) - '@babel/helpers': 7.25.9 - '@babel/parser': 7.25.9 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) + '@babel/helpers': 7.26.0 + '@babel/parser': 7.26.1 '@babel/template': 7.25.9 '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 convert-source-map: 2.0.0 debug: 4.3.7 gensync: 1.0.0-beta.2 @@ -5835,55 +5852,56 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.25.9': + '@babel/generator@7.26.0': dependencies: - '@babel/types': 7.25.9 + '@babel/parser': 7.26.1 + '@babel/types': 7.26.0 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 jsesc: 3.0.2 '@babel/helper-annotate-as-pure@7.25.9': dependencies: - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 '@babel/helper-builder-binary-assignment-operator-visitor@7.25.9': dependencies: '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color '@babel/helper-compilation-targets@7.25.9': dependencies: - '@babel/compat-data': 7.25.9 + '@babel/compat-data': 7.26.0 '@babel/helper-validator-option': 7.25.9 browserslist: 4.24.2 lru-cache: 5.1.1 semver: 6.3.1 - '@babel/helper-create-class-features-plugin@7.25.9(@babel/core@7.25.9)': + '@babel/helper-create-class-features-plugin@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@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.25.9(@babel/core@7.25.9) + '@babel/helper-replace-supers': 7.25.9(@babel/core@7.26.0) '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 '@babel/traverse': 7.25.9 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/helper-create-regexp-features-plugin@7.25.9(@babel/core@7.25.9)': + '@babel/helper-create-regexp-features-plugin@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-annotate-as-pure': 7.25.9 regexpu-core: 6.1.1 semver: 6.3.1 - '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.25.9)': + '@babel/helper-define-polyfill-provider@0.6.2(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-compilation-targets': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 debug: 4.3.7 @@ -5895,22 +5913,21 @@ snapshots: '@babel/helper-member-expression-to-functions@7.25.9': dependencies: '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color '@babel/helper-module-imports@7.25.9': dependencies: '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color - '@babel/helper-module-transforms@7.25.9(@babel/core@7.25.9)': + '@babel/helper-module-transforms@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-module-imports': 7.25.9 - '@babel/helper-simple-access': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 '@babel/traverse': 7.25.9 transitivePeerDependencies: @@ -5918,22 +5935,22 @@ snapshots: '@babel/helper-optimise-call-expression@7.25.9': dependencies: - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 '@babel/helper-plugin-utils@7.25.9': {} - '@babel/helper-remap-async-to-generator@7.25.9(@babel/core@7.25.9)': + '@babel/helper-remap-async-to-generator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@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 transitivePeerDependencies: - supports-color - '@babel/helper-replace-supers@7.25.9(@babel/core@7.25.9)': + '@babel/helper-replace-supers@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@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 @@ -5943,14 +5960,14 @@ snapshots: '@babel/helper-simple-access@7.25.9': dependencies: '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color '@babel/helper-skip-transparent-expression-wrappers@7.25.9': dependencies: '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color @@ -5964,14 +5981,14 @@ snapshots: dependencies: '@babel/template': 7.25.9 '@babel/traverse': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 transitivePeerDependencies: - supports-color - '@babel/helpers@7.25.9': + '@babel/helpers@7.26.0': dependencies: '@babel/template': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 '@babel/highlight@7.25.9': dependencies: @@ -5980,523 +5997,530 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/parser@7.25.9': + '@babel/parser@7.26.1': dependencies: - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 - '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.26.0) transitivePeerDependencies: - supports-color - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.9)': + '@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 - '@babel/plugin-syntax-import-assertions@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-syntax-import-assertions@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-import-attributes@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-syntax-import-attributes@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-syntax-jsx@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.25.9)': + '@babel/plugin-syntax-unicode-sets-regex@7.18.6(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@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/plugin-transform-arrow-functions@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-arrow-functions@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-async-generator-functions@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-async-generator-functions@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.25.9) + '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.26.0) '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-async-to-generator@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-async-to-generator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-module-imports': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-remap-async-to-generator': 7.25.9(@babel/core@7.25.9) + '@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.25.9)': + '@babel/plugin-transform-block-scoped-functions@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-block-scoping@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-block-scoping@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-class-properties@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-class-properties@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) + '@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 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-class-static-block@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-class-static-block@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) + '@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 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-classes@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-classes@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@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.25.9) + '@babel/helper-replace-supers': 7.25.9(@babel/core@7.26.0) '@babel/traverse': 7.25.9 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-computed-properties@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-computed-properties@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 '@babel/template': 7.25.9 - '@babel/plugin-transform-destructuring@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-destructuring@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-dotall-regex@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-dotall-regex@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@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/plugin-transform-duplicate-keys@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-duplicate-keys@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@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/plugin-transform-dynamic-import@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-dynamic-import@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-exponentiation-operator@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-exponentiation-operator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@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/plugin-transform-export-namespace-from@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-export-namespace-from@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-for-of@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-for-of@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-function-name@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-function-name@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-compilation-targets': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-json-strings@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-json-strings@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-literals@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-literals@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-logical-assignment-operators@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-logical-assignment-operators@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-member-expression-literals@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-member-expression-literals@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-modules-amd@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-modules-amd@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) + '@babel/core': 7.26.0 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-commonjs@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-modules-commonjs@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) + '@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-simple-access': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-systemjs@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-modules-systemjs@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) + '@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-validator-identifier': 7.25.9 '@babel/traverse': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-modules-umd@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-modules-umd@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-module-transforms': 7.25.9(@babel/core@7.25.9) + '@babel/core': 7.26.0 + '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-named-capturing-groups-regex@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-named-capturing-groups-regex@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@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/plugin-transform-new-target@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-new-target@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-nullish-coalescing-operator@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-nullish-coalescing-operator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-numeric-separator@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-numeric-separator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-object-rest-spread@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-object-rest-spread@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-compilation-targets': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.26.0) - '@babel/plugin-transform-object-super@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-object-super@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/helper-replace-supers': 7.25.9(@babel/core@7.25.9) + '@babel/helper-replace-supers': 7.25.9(@babel/core@7.26.0) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-optional-catch-binding@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-optional-catch-binding@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-optional-chaining@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-optional-chaining@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-parameters@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-parameters@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-private-methods@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-private-methods@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.25.9) + '@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 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-private-property-in-object@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-private-property-in-object@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@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.25.9) + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) '@babel/helper-plugin-utils': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-property-literals@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-property-literals@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-regenerator@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-regenerator@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 regenerator-transform: 0.15.2 - '@babel/plugin-transform-reserved-words@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-regexp-modifiers@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@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/plugin-transform-shorthand-properties@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-reserved-words@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-spread@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-shorthand-properties@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + + '@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-skip-transparent-expression-wrappers': 7.25.9 transitivePeerDependencies: - supports-color - '@babel/plugin-transform-sticky-regex@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-sticky-regex@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-template-literals@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-template-literals@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-typeof-symbol@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-typeof-symbol@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-typescript@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-typescript@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@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.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-skip-transparent-expression-wrappers': 7.25.9 - '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) transitivePeerDependencies: - supports-color - '@babel/plugin-transform-unicode-escapes@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-unicode-escapes@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/plugin-transform-unicode-property-regex@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-unicode-property-regex@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@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/plugin-transform-unicode-regex@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-unicode-regex@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@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/plugin-transform-unicode-sets-regex@7.25.9(@babel/core@7.25.9)': + '@babel/plugin-transform-unicode-sets-regex@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 - '@babel/helper-create-regexp-features-plugin': 7.25.9(@babel/core@7.25.9) + '@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/preset-env@7.25.9(@babel/core@7.25.9)': + '@babel/preset-env@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/compat-data': 7.25.9 - '@babel/core': 7.25.9 + '@babel/compat-data': 7.26.0 + '@babel/core': 7.26.0 '@babel/helper-compilation-targets': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 '@babel/helper-validator-option': 7.25.9 - '@babel/plugin-bugfix-firefox-class-in-computed-class-key': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-bugfix-safari-class-field-initializer-scope': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.25.9) - '@babel/plugin-syntax-import-assertions': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-syntax-import-attributes': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.25.9) - '@babel/plugin-transform-arrow-functions': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-async-generator-functions': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-async-to-generator': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-block-scoped-functions': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-block-scoping': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-class-properties': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-class-static-block': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-classes': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-computed-properties': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-destructuring': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-dotall-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-duplicate-keys': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-duplicate-named-capturing-groups-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-dynamic-import': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-exponentiation-operator': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-export-namespace-from': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-for-of': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-function-name': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-json-strings': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-literals': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-logical-assignment-operators': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-member-expression-literals': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-modules-amd': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-modules-commonjs': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-modules-systemjs': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-modules-umd': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-named-capturing-groups-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-new-target': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-nullish-coalescing-operator': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-numeric-separator': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-object-rest-spread': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-object-super': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-optional-catch-binding': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-private-methods': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-private-property-in-object': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-property-literals': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-regenerator': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-reserved-words': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-shorthand-properties': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-spread': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-sticky-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-template-literals': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-typeof-symbol': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-unicode-escapes': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-unicode-property-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-unicode-regex': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-unicode-sets-regex': 7.25.9(@babel/core@7.25.9) - '@babel/preset-modules': 0.1.6-no-external-plugins(@babel/core@7.25.9) - babel-plugin-polyfill-corejs2: 0.4.11(@babel/core@7.25.9) - babel-plugin-polyfill-corejs3: 0.10.6(@babel/core@7.25.9) - babel-plugin-polyfill-regenerator: 0.6.2(@babel/core@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) + '@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-proposal-private-property-in-object': 7.21.0-placeholder-for-preset-env.2(@babel/core@7.26.0) + '@babel/plugin-syntax-import-assertions': 7.26.0(@babel/core@7.26.0) + '@babel/plugin-syntax-import-attributes': 7.26.0(@babel/core@7.26.0) + '@babel/plugin-syntax-unicode-sets-regex': 7.18.6(@babel/core@7.26.0) + '@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-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) + '@babel/plugin-transform-classes': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-computed-properties': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-destructuring': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-dotall-regex': 7.25.9(@babel/core@7.26.0) + '@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-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) + '@babel/plugin-transform-json-strings': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-literals': 7.25.9(@babel/core@7.26.0) + '@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-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-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) + '@babel/plugin-transform-optional-catch-binding': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-optional-chaining': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-parameters': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-private-methods': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-private-property-in-object': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-property-literals': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-regenerator': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-regexp-modifiers': 7.26.0(@babel/core@7.26.0) + '@babel/plugin-transform-reserved-words': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-shorthand-properties': 7.25.9(@babel/core@7.26.0) + '@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-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-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.38.1 semver: 6.3.1 transitivePeerDependencies: - supports-color - '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.25.9)': + '@babel/preset-modules@0.1.6-no-external-plugins(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 esutils: 2.0.3 - '@babel/preset-typescript@7.25.9(@babel/core@7.25.9)': + '@babel/preset-typescript@7.25.9(@babel/core@7.26.0)': dependencies: - '@babel/core': 7.25.9 + '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 '@babel/helper-validator-option': 7.25.9 - '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-modules-commonjs': 7.25.9(@babel/core@7.25.9) - '@babel/plugin-transform-typescript': 7.25.9(@babel/core@7.25.9) + '@babel/plugin-syntax-jsx': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-modules-commonjs': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-typescript': 7.25.9(@babel/core@7.26.0) transitivePeerDependencies: - supports-color - '@babel/runtime-corejs2@7.25.9': + '@babel/runtime-corejs2@7.26.0': dependencies: core-js: 2.6.12 regenerator-runtime: 0.14.1 - '@babel/runtime@7.25.9': + '@babel/runtime@7.26.0': dependencies: regenerator-runtime: 0.14.1 '@babel/template@7.25.9': dependencies: - '@babel/code-frame': 7.25.9 - '@babel/parser': 7.25.9 - '@babel/types': 7.25.9 + '@babel/code-frame': 7.26.0 + '@babel/parser': 7.26.1 + '@babel/types': 7.26.0 '@babel/traverse@7.25.9': dependencies: - '@babel/code-frame': 7.25.9 - '@babel/generator': 7.25.9 - '@babel/parser': 7.25.9 + '@babel/code-frame': 7.26.0 + '@babel/generator': 7.26.0 + '@babel/parser': 7.26.1 '@babel/template': 7.25.9 - '@babel/types': 7.25.9 + '@babel/types': 7.26.0 debug: 4.3.7 globals: 11.12.0 transitivePeerDependencies: - supports-color - '@babel/types@7.25.9': + '@babel/types@7.26.0': dependencies: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 @@ -6667,17 +6691,17 @@ snapshots: '@esbuild/win32-x64@0.23.1': optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.4.1(eslint@8.57.1)': dependencies: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.0(eslint@9.13.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.13.0)': dependencies: eslint: 9.13.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.11.1': {} + '@eslint-community/regexpp@4.12.1': {} '@eslint/config-array@0.18.0': dependencies: @@ -7005,7 +7029,7 @@ snapshots: '@postlight/parser@2.2.3': dependencies: - '@babel/runtime-corejs2': 7.25.9 + '@babel/runtime-corejs2': 7.26.0 '@postlight/ci-failed-test-reporter': 1.0.26 cheerio: 0.22.0 difflib: https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed @@ -7080,52 +7104,58 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/rollup-android-arm-eabi@4.24.0': + '@rollup/rollup-android-arm-eabi@4.24.2': + optional: true + + '@rollup/rollup-android-arm64@4.24.2': + optional: true + + '@rollup/rollup-darwin-arm64@4.24.2': optional: true - '@rollup/rollup-android-arm64@4.24.0': + '@rollup/rollup-darwin-x64@4.24.2': optional: true - '@rollup/rollup-darwin-arm64@4.24.0': + '@rollup/rollup-freebsd-arm64@4.24.2': optional: true - '@rollup/rollup-darwin-x64@4.24.0': + '@rollup/rollup-freebsd-x64@4.24.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.24.0': + '@rollup/rollup-linux-arm-gnueabihf@4.24.2': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.24.0': + '@rollup/rollup-linux-arm-musleabihf@4.24.2': optional: true - '@rollup/rollup-linux-arm64-gnu@4.24.0': + '@rollup/rollup-linux-arm64-gnu@4.24.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.24.0': + '@rollup/rollup-linux-arm64-musl@4.24.2': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.24.0': + '@rollup/rollup-linux-powerpc64le-gnu@4.24.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.24.0': + '@rollup/rollup-linux-riscv64-gnu@4.24.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.24.0': + '@rollup/rollup-linux-s390x-gnu@4.24.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.24.0': + '@rollup/rollup-linux-x64-gnu@4.24.2': optional: true - '@rollup/rollup-linux-x64-musl@4.24.0': + '@rollup/rollup-linux-x64-musl@4.24.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.24.0': + '@rollup/rollup-win32-arm64-msvc@4.24.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.24.0': + '@rollup/rollup-win32-ia32-msvc@4.24.2': optional: true - '@rollup/rollup-win32-x64-msvc@4.24.0': + '@rollup/rollup-win32-x64-msvc@4.24.2': optional: true '@rss3/api-core@0.0.23': @@ -7372,7 +7402,7 @@ snapshots: '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@eslint-community/regexpp': 4.11.1 + '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.11.0(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.11.0 '@typescript-eslint/type-utils': 8.11.0(eslint@9.13.0)(typescript@5.6.3) @@ -7437,7 +7467,7 @@ snapshots: '@typescript-eslint/utils@8.11.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) '@typescript-eslint/scope-manager': 8.11.0 '@typescript-eslint/types': 8.11.0 '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) @@ -7462,8 +7492,8 @@ snapshots: dependencies: '@mapbox/node-pre-gyp': 1.0.11 '@rollup/pluginutils': 4.2.1 - acorn: 8.13.0 - acorn-import-attributes: 1.9.5(acorn@8.13.0) + acorn: 8.14.0 + acorn-import-attributes: 1.9.5(acorn@8.14.0) async-sema: 3.1.1 bindings: 1.5.0 estree-walker: 2.0.2 @@ -7539,17 +7569,17 @@ snapshots: dependencies: event-target-shim: 5.0.1 - acorn-import-attributes@1.9.5(acorn@8.13.0): + acorn-import-attributes@1.9.5(acorn@8.14.0): dependencies: - acorn: 8.13.0 + acorn: 8.14.0 - acorn-jsx@5.3.2(acorn@8.13.0): + acorn-jsx@5.3.2(acorn@8.14.0): dependencies: - acorn: 8.13.0 + acorn: 8.14.0 acorn@5.7.4: {} - acorn@8.13.0: {} + acorn@8.14.0: {} aes-js@3.1.2: {} @@ -7658,27 +7688,27 @@ snapshots: b4a@1.6.7: {} - babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.25.9): + babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.26.0): dependencies: - '@babel/compat-data': 7.25.9 - '@babel/core': 7.25.9 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.9) + '@babel/compat-data': 7.26.0 + '@babel/core': 7.26.0 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.26.0) semver: 6.3.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.25.9): + babel-plugin-polyfill-corejs3@0.10.6(@babel/core@7.26.0): dependencies: - '@babel/core': 7.25.9 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.9) + '@babel/core': 7.26.0 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.26.0) core-js-compat: 3.38.1 transitivePeerDependencies: - supports-color - babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.25.9): + babel-plugin-polyfill-regenerator@0.6.2(@babel/core@7.26.0): dependencies: - '@babel/core': 7.25.9 - '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.25.9) + '@babel/core': 7.26.0 + '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.26.0) transitivePeerDependencies: - supports-color @@ -7758,8 +7788,8 @@ snapshots: browserslist@4.24.2: dependencies: - caniuse-lite: 1.0.30001669 - electron-to-chromium: 1.5.45 + caniuse-lite: 1.0.30001673 + electron-to-chromium: 1.5.47 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -7833,7 +7863,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001669: {} + caniuse-lite@1.0.30001673: {} caseless@0.12.0: {} @@ -8300,7 +8330,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.45: {} + electron-to-chromium@1.5.47: {} ellipsize@0.1.0: {} @@ -8483,14 +8513,14 @@ snapshots: eslint-plugin-es-x@7.8.0(eslint@9.13.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) - '@eslint-community/regexpp': 4.11.1 + '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@eslint-community/regexpp': 4.12.1 eslint: 9.13.0 eslint-compat-utils: 0.5.1(eslint@9.13.0) eslint-plugin-n@17.11.1(eslint@9.13.0): dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) enhanced-resolve: 5.17.1 eslint: 9.13.0 eslint-plugin-es-x: 7.8.0(eslint@9.13.0) @@ -8513,7 +8543,7 @@ snapshots: eslint-plugin-unicorn@56.0.0(eslint@9.13.0): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.38.1 @@ -8562,8 +8592,8 @@ snapshots: eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.11.1 + '@eslint-community/eslint-utils': 4.4.1(eslint@8.57.1) + '@eslint-community/regexpp': 4.12.1 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.57.1 '@humanwhocodes/config-array': 0.13.0 @@ -8605,8 +8635,8 @@ snapshots: eslint@9.13.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@9.13.0) - '@eslint-community/regexpp': 4.11.1 + '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.18.0 '@eslint/core': 0.7.0 '@eslint/eslintrc': 3.1.0 @@ -8652,14 +8682,14 @@ snapshots: espree@10.2.0: dependencies: - acorn: 8.13.0 - acorn-jsx: 5.3.2(acorn@8.13.0) + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) eslint-visitor-keys: 4.1.0 espree@9.6.1: dependencies: - acorn: 8.13.0 - acorn-jsx: 5.3.2(acorn@8.13.0) + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} @@ -9755,8 +9785,8 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.25.9 - '@babel/types': 7.25.9 + '@babel/parser': 7.26.1 + '@babel/types': 7.26.0 source-map-js: 1.2.1 mailparser@3.7.1: @@ -9803,7 +9833,7 @@ snapshots: dependencies: repeat-string: 1.6.1 - mdast-util-from-markdown@2.0.1: + mdast-util-from-markdown@2.0.2: dependencies: '@types/mdast': 4.0.4 '@types/unist': 3.0.3 @@ -10297,7 +10327,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.25.9 + '@babel/code-frame': 7.26.0 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -10643,7 +10673,7 @@ snapshots: regenerator-transform@0.15.2: dependencies: - '@babel/runtime': 7.25.9 + '@babel/runtime': 7.26.0 regexp-tree@0.1.27: {} @@ -10652,7 +10682,7 @@ snapshots: regenerate: 1.4.2 regenerate-unicode-properties: 10.2.0 regjsgen: 0.8.0 - regjsparser: 0.11.1 + regjsparser: 0.11.2 unicode-match-property-ecmascript: 2.0.0 unicode-match-property-value-ecmascript: 2.2.0 @@ -10662,7 +10692,7 @@ snapshots: dependencies: jsesc: 0.5.0 - regjsparser@0.11.1: + regjsparser@0.11.2: dependencies: jsesc: 3.0.2 @@ -10671,7 +10701,7 @@ snapshots: remark-parse@11.0.0: dependencies: '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.1 + mdast-util-from-markdown: 2.0.2 micromark-util-types: 2.0.0 unified: 11.0.5 transitivePeerDependencies: @@ -10757,26 +10787,28 @@ snapshots: dependencies: glob: 7.2.3 - rollup@4.24.0: + rollup@4.24.2: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.24.0 - '@rollup/rollup-android-arm64': 4.24.0 - '@rollup/rollup-darwin-arm64': 4.24.0 - '@rollup/rollup-darwin-x64': 4.24.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.24.0 - '@rollup/rollup-linux-arm-musleabihf': 4.24.0 - '@rollup/rollup-linux-arm64-gnu': 4.24.0 - '@rollup/rollup-linux-arm64-musl': 4.24.0 - '@rollup/rollup-linux-powerpc64le-gnu': 4.24.0 - '@rollup/rollup-linux-riscv64-gnu': 4.24.0 - '@rollup/rollup-linux-s390x-gnu': 4.24.0 - '@rollup/rollup-linux-x64-gnu': 4.24.0 - '@rollup/rollup-linux-x64-musl': 4.24.0 - '@rollup/rollup-win32-arm64-msvc': 4.24.0 - '@rollup/rollup-win32-ia32-msvc': 4.24.0 - '@rollup/rollup-win32-x64-msvc': 4.24.0 + '@rollup/rollup-android-arm-eabi': 4.24.2 + '@rollup/rollup-android-arm64': 4.24.2 + '@rollup/rollup-darwin-arm64': 4.24.2 + '@rollup/rollup-darwin-x64': 4.24.2 + '@rollup/rollup-freebsd-arm64': 4.24.2 + '@rollup/rollup-freebsd-x64': 4.24.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.2 + '@rollup/rollup-linux-arm-musleabihf': 4.24.2 + '@rollup/rollup-linux-arm64-gnu': 4.24.2 + '@rollup/rollup-linux-arm64-musl': 4.24.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.2 + '@rollup/rollup-linux-riscv64-gnu': 4.24.2 + '@rollup/rollup-linux-s390x-gnu': 4.24.2 + '@rollup/rollup-linux-x64-gnu': 4.24.2 + '@rollup/rollup-linux-x64-musl': 4.24.2 + '@rollup/rollup-win32-arm64-msvc': 4.24.2 + '@rollup/rollup-win32-ia32-msvc': 4.24.2 + '@rollup/rollup-win32-x64-msvc': 4.24.2 fsevents: 2.3.3 rrweb-cssom@0.7.1: {} @@ -11178,11 +11210,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.55: {} + tldts-core@6.1.56: {} tldts@6.1.55: dependencies: - tldts-core: 6.1.55 + tldts-core: 6.1.56 tmp@0.0.33: dependencies: @@ -11444,7 +11476,7 @@ snapshots: dependencies: esbuild: 0.21.5 postcss: 8.4.47 - rollup: 4.24.0 + rollup: 4.24.2 optionalDependencies: '@types/node': 22.7.9 fsevents: 2.3.3 From ea3f9c8b7608b185ab2dc26bf3658f1b0021a6ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 06:06:48 -0700 Subject: [PATCH 301/740] chore(deps-dev): bump @types/node from 22.7.9 to 22.8.1 (#17338) * chore(deps-dev): bump @types/node from 22.7.9 to 22.8.1 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.7.9 to 22.8.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-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 90 +++++++++++++++++++++++++------------------------- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/package.json b/package.json index ac14d291d64d9fa..a9282fcdd1f342a 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.7.9", + "@types/node": "22.8.1", "@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 1cc2205dd521145..b80021f6d6c7c1c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -325,8 +325,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.7.9 - version: 22.7.9 + specifier: 22.8.1 + version: 22.8.1 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -353,7 +353,7 @@ importers: version: 0.27.5 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.7.9)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.8.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.103 version: 0.37.103 @@ -419,10 +419,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.7.9)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.1)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.7.9)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.8.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1874,8 +1874,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.7.9': - resolution: {integrity: sha512-jrTfRC7FM6nChvU7X2KqcrgquofrWLFDeYC1hKfwNWomVvrn7JIksqf344WN2X/y8xrgqBd2dJATZV4GbatBfg==} + '@types/node@22.8.1': + resolution: {integrity: sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -2001,8 +2001,8 @@ packages: '@vitest/pretty-format@2.0.5': resolution: {integrity: sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ==} - '@vitest/pretty-format@2.1.3': - resolution: {integrity: sha512-XH1XdtoLZCpqV59KRbPrIhFCOO0hErxrQCMcvnQete3Vibb9UeIOX02uFPfVn3Z9ZXsq78etlfyhnkmIZSzIwQ==} + '@vitest/pretty-format@2.1.4': + resolution: {integrity: sha512-L95zIAkEuTDbUX1IsjRl+vyBSLh3PwLLgKpghl37aCK9Jvw0iP+wKwIFhfjdUtA2myLgjrG6VU6JCFLv8q/3Ww==} '@vitest/runner@2.0.5': resolution: {integrity: sha512-TfRfZa6Bkk9ky4tW0z20WKXFEwwvWhRY+84CnSEtq4+3ZvDlJyY32oNTJtM7AW9ihW90tX/1Q78cb6FjoAs+ig==} @@ -4465,8 +4465,8 @@ packages: parse5-parser-stream@7.1.2: resolution: {integrity: sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==} - parse5@7.2.0: - resolution: {integrity: sha512-ZkDsAOcxsUMZ4Lz5fVciOehNcJ+Gb8gTzcA4yl3wnc273BAybYWrQ+Ks/OjCjSEpjvQkDSeZbybK9qj2VHHdGA==} + parse5@7.2.1: + resolution: {integrity: sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==} parseley@0.12.1: resolution: {integrity: sha512-e6qHKe3a9HWr0oMRVDTRhKce+bRO8VGQR3NyVwcjwrbhMmFCX9KszEV35+rn4AdilFAq9VPxP/Fe1wC9Qjd2lw==} @@ -6803,7 +6803,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.7.9 + '@types/node': 22.8.1 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7277,12 +7277,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.7.9 + '@types/node': 22.8.1 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.7.9 + '@types/node': 22.8.1 '@types/html-to-text@9.0.4': {} @@ -7290,15 +7290,15 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.7.9 + '@types/node': 22.8.1 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.7.9 + '@types/node': 22.8.1 '@types/tough-cookie': 4.0.5 - parse5: 7.2.0 + parse5: 7.2.1 '@types/json-bigint@1.0.4': {} @@ -7306,7 +7306,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.7.9 + '@types/node': 22.8.1 '@types/jsrsasign@10.5.13': {} @@ -7316,7 +7316,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.7.9 + '@types/node': 22.8.1 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7338,14 +7338,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.7.9 + '@types/node': 22.8.1 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.7.9 + '@types/node': 22.8.1 form-data: 4.0.1 - '@types/node@22.7.9': + '@types/node@22.8.1': dependencies: undici-types: 6.19.8 @@ -7359,7 +7359,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.7.9 + '@types/node': 22.8.1 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7373,7 +7373,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.7.9 + '@types/node': 22.8.1 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7397,7 +7397,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.7.9 + '@types/node': 22.8.1 optional: true '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': @@ -7506,7 +7506,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.7.9)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.8.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7520,7 +7520,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.7.9)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.8.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -7535,7 +7535,7 @@ snapshots: dependencies: tinyrainbow: 1.2.0 - '@vitest/pretty-format@2.1.3': + '@vitest/pretty-format@2.1.4': dependencies: tinyrainbow: 1.2.0 @@ -7946,7 +7946,7 @@ snapshots: domutils: 3.1.0 encoding-sniffer: 0.2.0 htmlparser2: 9.1.0 - parse5: 7.2.0 + parse5: 7.2.1 parse5-htmlparser2-tree-adapter: 7.1.0 parse5-parser-stream: 7.1.2 undici: 6.20.1 @@ -9524,7 +9524,7 @@ snapshots: https-proxy-agent: 7.0.5 is-potential-custom-element-name: 1.0.1 nwsapi: 2.2.13 - parse5: 7.2.0 + parse5: 7.2.1 rrweb-cssom: 0.7.1 saxes: 6.0.0 symbol-tree: 3.2.4 @@ -10337,13 +10337,13 @@ snapshots: parse5-htmlparser2-tree-adapter@7.1.0: dependencies: domhandler: 5.0.3 - parse5: 7.2.0 + parse5: 7.2.1 parse5-parser-stream@7.1.2: dependencies: - parse5: 7.2.0 + parse5: 7.2.1 - parse5@7.2.0: + parse5@7.2.1: dependencies: entities: 4.5.0 @@ -10475,7 +10475,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.7.9 + '@types/node': 22.8.1 long: 5.2.3 proxy-agent@6.4.0: @@ -11443,13 +11443,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.7.9): + vite-node@2.0.5(@types/node@22.8.1): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.7.9) + vite: 5.4.10(@types/node@22.8.1) transitivePeerDependencies: - '@types/node' - less @@ -11461,31 +11461,31 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.7.9)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.1)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.10(@types/node@22.7.9) + vite: 5.4.10(@types/node@22.8.1) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.7.9): + vite@5.4.10(@types/node@22.8.1): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.2 optionalDependencies: - '@types/node': 22.7.9 + '@types/node': 22.8.1 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.7.9)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.8.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 - '@vitest/pretty-format': 2.1.3 + '@vitest/pretty-format': 2.1.4 '@vitest/runner': 2.0.5 '@vitest/snapshot': 2.0.5 '@vitest/spy': 2.0.5 @@ -11499,11 +11499,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.7.9) - vite-node: 2.0.5(@types/node@22.7.9) + vite: 5.4.10(@types/node@22.8.1) + vite-node: 2.0.5(@types/node@22.8.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.7.9 + '@types/node': 22.8.1 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From bd88592fe6367b7981526dbb4430d65e0d7a9443 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 06:07:15 -0700 Subject: [PATCH 302/740] chore(deps-dev): bump @babel/preset-typescript from 7.25.9 to 7.26.0 (#17340) * chore(deps-dev): bump @babel/preset-typescript from 7.25.9 to 7.26.0 Bumps [@babel/preset-typescript](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-typescript) from 7.25.9 to 7.26.0. - [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.0/packages/babel-preset-typescript) --- updated-dependencies: - dependency-name: "@babel/preset-typescript" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 a9282fcdd1f342a..2854ae09e8e95a9 100644 --- a/package.json +++ b/package.json @@ -136,7 +136,7 @@ }, "devDependencies": { "@babel/preset-env": "7.26.0", - "@babel/preset-typescript": "7.25.9", + "@babel/preset-typescript": "7.26.0", "@eslint/eslintrc": "3.1.0", "@eslint/js": "9.13.0", "@microsoft/eslint-formatter-sarif": "3.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b80021f6d6c7c1c..216ea3dd42400d2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -262,8 +262,8 @@ importers: specifier: 7.26.0 version: 7.26.0(@babel/core@7.26.0) '@babel/preset-typescript': - specifier: 7.25.9 - version: 7.25.9(@babel/core@7.26.0) + specifier: 7.26.0 + version: 7.26.0(@babel/core@7.26.0) '@eslint/eslintrc': specifier: 3.1.0 version: 3.1.0 @@ -940,8 +940,8 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 || ^8.0.0-0 <8.0.0 - '@babel/preset-typescript@7.25.9': - resolution: {integrity: sha512-XWxw1AcKk36kgxf4C//fl0ikjLeqGUWn062/Fd8GtpTfDJOX6Ud95FK+4JlDA36BX4bNGndXi3a6Vr4Jo5/61A==} + '@babel/preset-typescript@7.26.0': + resolution: {integrity: sha512-NMk1IGZ5I/oHhoXEElcm+xUnL/szL6xflkFZmoEU9xj1qSJXpiS7rsspYo92B4DRCDvZn2erT5LdsCeXAKNCkg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 @@ -6482,7 +6482,7 @@ snapshots: '@babel/types': 7.26.0 esutils: 2.0.3 - '@babel/preset-typescript@7.25.9(@babel/core@7.26.0)': + '@babel/preset-typescript@7.26.0(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 From 8b1e96c4d0901f646a8b99b8dd0465df4a81f798 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 06:07:58 -0700 Subject: [PATCH 303/740] chore(deps): bump hono from 4.6.6 to 4.6.7 (#17334) * chore(deps): bump hono from 4.6.6 to 4.6.7 Bumps [hono](https://github.com/honojs/hono) from 4.6.6 to 4.6.7. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.6...v4.6.7) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 2854ae09e8e95a9..47d41cc2694d5c6 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "fanfou-sdk": "5.0.0", "form-data": "4.0.1", "googleapis": "144.0.0", - "hono": "4.6.6", + "hono": "4.6.7", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 216ea3dd42400d2..3bf88d745fff088 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,10 +10,10 @@ importers: dependencies: '@hono/node-server': specifier: 1.13.2 - version: 1.13.2(hono@4.6.6) + version: 1.13.2(hono@4.6.7) '@hono/zod-openapi': specifier: 0.16.4 - version: 0.16.4(hono@4.6.6)(zod@3.23.8) + version: 0.16.4(hono@4.6.7)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -46,7 +46,7 @@ importers: version: 0.0.23 '@scalar/hono-api-reference': specifier: 0.5.156 - version: 0.5.156(hono@4.6.6) + version: 0.5.156(hono@4.6.7) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -108,8 +108,8 @@ importers: specifier: 144.0.0 version: 144.0.0 hono: - specifier: 4.6.6 - version: 4.6.6 + specifier: 4.6.7 + version: 4.6.7 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3423,8 +3423,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.6: - resolution: {integrity: sha512-euUj5qwvtkG+p38GFs0LYacwaoS2hYRAGn9ysAggiwT2QBcPnT1XYUCW3hatW4C1KzAXTYuQ08BlVDJtAGuhlg==} + hono@4.6.7: + resolution: {integrity: sha512-wX4ZbOnzfNO61hUjuQbJ7OPGs1fWXXVVJ8VTPDb2Ls/x9HjCbVTm80Je6VTHMz5n5RGDtBgV9d9ZFZxBqx56ng==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6751,20 +6751,20 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.2(hono@4.6.6)': + '@hono/node-server@1.13.2(hono@4.6.7)': dependencies: - hono: 4.6.6 + hono: 4.6.7 - '@hono/zod-openapi@0.16.4(hono@4.6.6)(zod@3.23.8)': + '@hono/zod-openapi@0.16.4(hono@4.6.7)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.3.0(hono@4.6.6)(zod@3.23.8) - hono: 4.6.6 + '@hono/zod-validator': 0.3.0(hono@4.6.7)(zod@3.23.8) + hono: 4.6.7 zod: 3.23.8 - '@hono/zod-validator@0.3.0(hono@4.6.6)(zod@3.23.8)': + '@hono/zod-validator@0.3.0(hono@4.6.7)(zod@3.23.8)': dependencies: - hono: 4.6.6 + hono: 4.6.7 zod: 3.23.8 '@humanfs/core@0.19.0': {} @@ -7173,10 +7173,10 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.156(hono@4.6.6)': + '@scalar/hono-api-reference@0.5.156(hono@4.6.7)': dependencies: '@scalar/types': 0.0.17 - hono: 4.6.6 + hono: 4.6.7 '@scalar/openapi-types@0.1.4': {} @@ -9164,7 +9164,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.6: {} + hono@4.6.7: {} hookable@5.5.3: {} From bdb48941f52ac9da5ff35746c1d830c02c71c50a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 06:08:49 -0700 Subject: [PATCH 304/740] chore(deps): bump tldts from 6.1.55 to 6.1.56 (#17342) * chore(deps): bump tldts from 6.1.55 to 6.1.56 Bumps [tldts](https://github.com/remusao/tldts) from 6.1.55 to 6.1.56. - [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.55...v6.1.56) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 47d41cc2694d5c6..ca33db878b12292 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "telegram": "2.26.2", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.55", + "tldts": "6.1.56", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3bf88d745fff088..2f670fa93469aeb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,8 +228,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.55 - version: 6.1.55 + specifier: 6.1.56 + version: 6.1.56 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5272,8 +5272,8 @@ packages: tldts-core@6.1.56: resolution: {integrity: sha512-Ihxv/Bwiyj73icTYVgBUkQ3wstlCglLoegSgl64oSrGUBX1hc7Qmf/CnrnJLaQdZrCnTaLqMYOwKMKlkfkFrxQ==} - tldts@6.1.55: - resolution: {integrity: sha512-HxQR/9roQ07Pwc8RyyrJMAxRz5/ssoF3qIPPUiIo3zUt6yMdmYZjM2OZIFMiZ3jHyz9jrGHEHuQZrUhoc1LkDw==} + tldts@6.1.56: + resolution: {integrity: sha512-2PT1oRZCxtsbLi5R2SQjE/v4vvgRggAtVcYj+3Rrcnu2nPZvu7m64+gDa/EsVSWd3QzEc0U0xN+rbEKsJC47kA==} hasBin: true tmp@0.0.33: @@ -11212,7 +11212,7 @@ snapshots: tldts-core@6.1.56: {} - tldts@6.1.55: + tldts@6.1.56: dependencies: tldts-core: 6.1.56 @@ -11250,7 +11250,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.55 + tldts: 6.1.56 tr46@0.0.3: {} From 030381516088d1cdf63d14f9362ceed67896b1d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 06:19:04 -0700 Subject: [PATCH 305/740] chore(deps): bump tsx from 4.19.1 to 4.19.2 (#17337) * chore(deps): bump tsx from 4.19.1 to 4.19.2 Bumps [tsx](https://github.com/privatenumber/tsx) from 4.19.1 to 4.19.2. - [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.1...v4.19.2) --- updated-dependencies: - dependency-name: tsx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 ca33db878b12292..5a858b7a2a3732c 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "tldts": "6.1.56", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", - "tsx": "4.19.1", + "tsx": "4.19.2", "twitter-api-v2": "1.18.1", "undici": "6.20.1", "uuid": "10.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2f670fa93469aeb..f828e405fbe9a48 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -237,8 +237,8 @@ importers: specifier: 5.0.0 version: 5.0.0 tsx: - specifier: 4.19.1 - version: 4.19.1 + specifier: 4.19.2 + version: 4.19.2 twitter-api-v2: specifier: 1.18.1 version: 1.18.1 @@ -5360,8 +5360,8 @@ packages: tslib@2.8.0: resolution: {integrity: sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==} - tsx@4.19.1: - resolution: {integrity: sha512-0flMz1lh74BR4wOvBjuh9olbnwqCPc35OOlfyzHba0Dc+QNUeWX/Gq2YTbnwcWPO3BMd8fkzRVrHcsR+a7z7rA==} + tsx@4.19.2: + resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} engines: {node: '>=18.0.0'} hasBin: true @@ -11282,7 +11282,7 @@ snapshots: tslib@2.8.0: {} - tsx@4.19.1: + tsx@4.19.2: dependencies: esbuild: 0.23.1 get-tsconfig: 4.8.1 From 5c0ef0d54947b19dfae10a9ba8fa3e881a76ae13 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 06:19:55 -0700 Subject: [PATCH 306/740] chore(deps): bump @hono/node-server from 1.13.2 to 1.13.3 (#17339) * chore(deps): bump @hono/node-server from 1.13.2 to 1.13.3 Bumps [@hono/node-server](https://github.com/honojs/node-server) from 1.13.2 to 1.13.3. - [Release notes](https://github.com/honojs/node-server/releases) - [Commits](https://github.com/honojs/node-server/compare/v1.13.2...v1.13.3) --- updated-dependencies: - dependency-name: "@hono/node-server" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 5a858b7a2a3732c..7aca0285dd445f7 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "*.yml": "eslint --cache --fix" }, "dependencies": { - "@hono/node-server": "1.13.2", + "@hono/node-server": "1.13.3", "@hono/zod-openapi": "0.16.4", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f828e405fbe9a48..71783113cb065c1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ importers: .: dependencies: '@hono/node-server': - specifier: 1.13.2 - version: 1.13.2(hono@4.6.7) + specifier: 1.13.3 + version: 1.13.3(hono@4.6.7) '@hono/zod-openapi': specifier: 0.16.4 version: 0.16.4(hono@4.6.7)(zod@3.23.8) @@ -1312,8 +1312,8 @@ packages: resolution: {integrity: sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@hono/node-server@1.13.2': - resolution: {integrity: sha512-0w8nEmAyx0Ul0CQp8BL2VtAG4YVdpzXd/mvvM+l0G5Oq22pUyHS+KeFFPSY+czLOF5NAiV3MUNPD1n14Ol5svg==} + '@hono/node-server@1.13.3': + resolution: {integrity: sha512-tEo3hcyQ6chvSnJ3tKzfX4z2sd7Q+ZkBwwBdW1Ya8Mz29dukxC2xcWiB/lAMwGJrYMW8QTgknIsLu1AsnMBe7A==} engines: {node: '>=18.14.1'} peerDependencies: hono: ^4 @@ -6751,7 +6751,7 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.2(hono@4.6.7)': + '@hono/node-server@1.13.3(hono@4.6.7)': dependencies: hono: 4.6.7 From f2d0b7260d05973df530ad277cc324c0596a8a69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:52:23 +0800 Subject: [PATCH 307/740] chore(deps): bump uuid from 10.0.0 to 11.0.1 (#17341) * chore(deps): bump uuid from 10.0.0 to 11.0.1 Bumps [uuid](https://github.com/uuidjs/uuid) from 10.0.0 to 11.0.1. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v10.0.0...v11.0.1) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 7aca0285dd445f7..1502f112ab40ddc 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "tsx": "4.19.2", "twitter-api-v2": "1.18.1", "undici": "6.20.1", - "uuid": "10.0.0", + "uuid": "11.0.1", "winston": "3.15.0", "xxhash-wasm": "1.0.2", "zod": "3.23.8" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 71783113cb065c1..75b6a1238195775 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -246,8 +246,8 @@ importers: specifier: 6.20.1 version: 6.20.1 uuid: - specifier: 10.0.0 - version: 10.0.0 + specifier: 11.0.1 + version: 11.0.1 winston: specifier: 3.15.0 version: 3.15.0 @@ -5515,8 +5515,8 @@ packages: resolution: {integrity: sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==} engines: {node: '>= 4'} - uuid@10.0.0: - resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} + uuid@11.0.1: + resolution: {integrity: sha512-wt9UB5EcLhnboy1UvA1mvGPXkIIrHSu+3FmUksARfdVw9tuPf3CH/CohxO0Su1ApoKAeT6BVzAJIvjTuQVSmuQ==} hasBin: true uuid@3.4.0: @@ -11412,7 +11412,7 @@ snapshots: utility-types@3.11.0: {} - uuid@10.0.0: {} + uuid@11.0.1: {} uuid@3.4.0: {} From 8a12d896fc0c70d21c0b709441a16e387894a259 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Mon, 28 Oct 2024 10:01:04 -0700 Subject: [PATCH 308/740] fix(route/bsky): render video thumbnail (#17345) --- lib/routes/bsky/posts.ts | 4 ++-- lib/routes/bsky/templates/post.art | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index 3b8e67da719ef95..959fb3378964beb 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -62,8 +62,8 @@ async function handler(ctx) { description: art(path.join(__dirname, 'templates/post.art'), { text: post.record.text.replaceAll('\n', '<br>'), embed: post.embed, - // embed.$type "app.bsky.embed.record#view" and "app.bsky.embed.recordWithMedia#view" - // are not handled + // embed.$type "app.bsky.embed.record#view" and "app.bsky.embed.recordWithMedia#view" are not handled + // "app.bsky.embed.video#view" is rendered as image }), author: post.author.displayName, pubDate: parseDate(post.record.createdAt), diff --git a/lib/routes/bsky/templates/post.art b/lib/routes/bsky/templates/post.art index 06b42960a4de921..54edbfc88b000d4 100644 --- a/lib/routes/bsky/templates/post.art +++ b/lib/routes/bsky/templates/post.art @@ -3,11 +3,13 @@ {{ /if }} {{ if embed }} - {{ if embed.$type == 'app.bsky.embed.images#view'}} + {{ if embed.$type === 'app.bsky.embed.images#view' }} {{ each embed.images i }} <img src="{{ i.fullsize }}" alt="{{ i.alt }}"><br> {{ /each }} - {{ else if embed.$type == 'app.bsky.embed.external#view' }} + {{ else if embed.$type === 'app.bsky.embed.video#view' }} + <img src="{{ embed.thumbnail }}"><br> + {{ else if embed.$type === 'app.bsky.embed.external#view' }} <a href="{{ embed.external.uri }}"><b>{{ embed.external.title }}</b><br> {{ embed.external.description }} </a> From e0b40aaddf348888bedf8f0ed2b74098415626c6 Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:10:11 +0000 Subject: [PATCH 309/740] feat(route): add washingtonpost route (#17208) * feat(route): add washingtonpost route * rename route * fix --- lib/routes/washingtonpost/app.ts | 118 ++++++++++++++++++ lib/routes/washingtonpost/namespace.ts | 6 + .../washingtonpost/templates/description.art | 59 +++++++++ 3 files changed, 183 insertions(+) create mode 100644 lib/routes/washingtonpost/app.ts create mode 100644 lib/routes/washingtonpost/namespace.ts create mode 100644 lib/routes/washingtonpost/templates/description.art diff --git a/lib/routes/washingtonpost/app.ts b/lib/routes/washingtonpost/app.ts new file mode 100644 index 000000000000000..c69009c1e214113 --- /dev/null +++ b/lib/routes/washingtonpost/app.ts @@ -0,0 +1,118 @@ +import { Route } from '@/types'; +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'; + +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 __dirname = getCurrentPath(import.meta.url); + 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/namespace.ts b/lib/routes/washingtonpost/namespace.ts new file mode 100644 index 000000000000000..7383ab2bdeb7e38 --- /dev/null +++ b/lib/routes/washingtonpost/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Washington Post', + url: 'www.washingtonpost.com', +}; diff --git a/lib/routes/washingtonpost/templates/description.art b/lib/routes/washingtonpost/templates/description.art new file mode 100644 index 000000000000000..fc7382329a7edbd --- /dev/null +++ b/lib/routes/washingtonpost/templates/description.art @@ -0,0 +1,59 @@ +{{ 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 }} + </h{{ if $value.subhead_level }}{{ $value.subhead_level }}{{ else }}1{{ /if }}> + {{ /if }} + {{ if $value.type == 'sanitized_html' }} + {{ if $value.subtype == 'paragraph' }}<p>{{ else if $value.subtype == 'subhead' }}<h{{ if $value.subhead_level }}{{ $value.subhead_level }}{{ else }}4{{ /if }}>{{ /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' }}</p>{{ else if $value.subtype == 'subhead' }}</h{{ if $value.subhead_level }}{{ $value.subhead_level }}{{ else }}4{{ /if }}>{{ /if }} + {{ /if }} + {{ if $value.type == 'deck' }} + <blockquote><p> + {{ if $value.mime == 'text/html' }}{{@ $value.content }}{{ /if }} + {{ if $value.mime == 'text/plain' }}{{ $value.content }}{{ /if }} + </p></blockquote> + {{ /if }} + {{ if $value.type == 'image' }} + <figure><img src="{{ $value.imageURL }}" alt="{{ $value.blurb }}"><figcaption>{{ $value.fullcaption }}</figcaption></figure> + {{ /if }} + {{ if $value.type == 'video' }} + {{ if $value.content && $value.content.html }}{{@ $value.content.html }} + {{ else if $value.mediaURL }} + <figure> + <video controls + {{ if $value.imageURL }}poster="{{ $value.imageURL }}"{{ /if }} + > + <source src="{{ $value.mediaURL }}"> + </video> + {{ if $value.fullcaption }}<figcaption>{{ $value.fullcaption }}</figcaption>{{ /if }} + </figure> + {{ /if }} + {{ /if }} + {{ if $value.type == 'list' }} + {{ if $value.subtype == 'ordered' }}<ol>{{ else }}<ul>{{ /if }} + {{ if $value.mime == 'text/html' }}{{ each $value.content }}<li>{{@ $value }}</li>{{ /each }}{{ /if }} + {{ if $value.mime == 'text/plain' }}{{ each $value.content }}<li>{{ $value }}</li>{{ /each }}{{ /if }} + {{ if $value.subtype == 'ordered' }}</ol>{{ else }}</ul>{{ /if }} + {{ /if }} + {{ if $value.type == 'divider' }}<br><hr><br>{{ /if }} + {{ if $value.type == 'byline' }} + {{ if $value.subtype == 'live-update' || $value.subtype == 'live-reporter-insight' }} + <p><i> + {{ if $value.mime == 'text/html' }}{{@ $value.content }}{{ /if }} + {{ if $value.mime == 'text/plain' }}{{ $value.content }}{{ /if }} + </i></p> + {{ /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 From 37b4070bb8f0ae35eee5588b6eba87ee155a2a5d Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 29 Oct 2024 13:42:00 +0700 Subject: [PATCH 310/740] fix(route/threads): use instgram api to resolve rate limit issue --- lib/routes/threads/utils.ts | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/lib/routes/threads/utils.ts b/lib/routes/threads/utils.ts index 4dbad9f8f00a72e..c302c0a79a6637f 100644 --- a/lib/routes/threads/utils.ts +++ b/lib/routes/threads/utils.ts @@ -2,11 +2,11 @@ import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import dayjs from 'dayjs'; import cache from '@/utils/cache'; -import { destr } from 'destr'; import NotFoundError from '@/errors/types/not-found'; const profileUrl = (user: string) => `https://www.threads.net/@${user}`; const threadUrl = (code: string) => `https://www.threads.net/t/${code}`; +const instagramUrl = (user: string) => `https://i.instagram.com/api/v1/users/web_profile_info/?username=${user}`; const apiUrl = 'https://www.threads.net/api/graphql'; // const PROFILE_QUERY = 23_996_318_473_300_828; // no longer works @@ -14,7 +14,7 @@ const THREADS_QUERY = 6_232_751_443_445_612; const REPLIES_QUERY = 6_307_072_669_391_286; const USER_AGENT = 'Barcelona 289.0.0.77.109 Android'; const appId = '238260118697367'; -const asbdId = '129477'; +// const asbdId = '129477'; const extractTokens = async (user): Promise<{ lsd: string }> => { const response = await ofetch(profileUrl(user), { @@ -49,28 +49,14 @@ const makeHeader = (user: string, lsd: string) => ({ 'Sec-Fetch-Site': 'same-origin', }); +// the formal way always reachs the rate limit, so use instagram api to get user id instead const getUserId = (user: string, lsd: string): Promise<string> => cache.tryGet(`threads:userId:${user}`, async () => { - const pathName = `/@${user}`; - const payload: any = { - 'route_urls[0]': pathName, - __a: '1', - __comet_req: '29', - lsd, - }; - const response = await ofetch('https://www.threads.net/ajax/bulk-route-definitions/', { - method: 'POST', - headers: { - ...makeHeader(user, lsd), - 'content-type': 'application/x-www-form-urlencoded', - 'X-ASBD-ID': asbdId, - }, - body: new URLSearchParams(payload).toString(), - parseResponse: (txt) => destr(txt.slice(9)), // remove "for (;;);" + const response = await ofetch(instagramUrl(user), { + headers: makeHeader(user, lsd), }); - const userId = response.payload.payloads[pathName].result.exports.rootView.props.user_id; - return userId; + return response.data.user.id; }); const hasMedia = (post) => post.image_versions2 || post.carousel_media || post.video_versions; From fc6df4a0027437f33a9b6329386354d132c5d53f Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 29 Oct 2024 14:01:25 +0700 Subject: [PATCH 311/740] fix(route/threads): add err message --- lib/routes/threads/utils.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/routes/threads/utils.ts b/lib/routes/threads/utils.ts index c302c0a79a6637f..ee7fe07f8c3a0a1 100644 --- a/lib/routes/threads/utils.ts +++ b/lib/routes/threads/utils.ts @@ -56,7 +56,16 @@ const getUserId = (user: string, lsd: string): Promise<string> => headers: makeHeader(user, lsd), }); - return response.data.user.id; + if (!response?.data?.user) { + throw new NotFoundError('Instagram getUser API response is invalid'); + } + + const userId = response.data.user.id; + if (!userId) { + throw new NotFoundError('User ID not found in Instagram getUser API response'); + } + + return userId; }); const hasMedia = (post) => post.image_versions2 || post.carousel_media || post.video_versions; From b03498c8c5f5599c85e51cad0bf6151bfac89f71 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 29 Oct 2024 14:48:14 +0700 Subject: [PATCH 312/740] chore(route/threads): bring back formal get user api and add fallback --- lib/routes/threads/index.ts | 2 +- lib/routes/threads/utils.ts | 39 +++++++++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/lib/routes/threads/index.ts b/lib/routes/threads/index.ts index f9aafb7d440df07..9d3af631cbb8c4b 100644 --- a/lib/routes/threads/index.ts +++ b/lib/routes/threads/index.ts @@ -35,7 +35,7 @@ https://rsshub.app/threads/zuck/showAuthorInTitle=1&showAuthorInDesc=1&showQuote }, }, name: 'User timeline', - maintainers: ['ninboy'], + maintainers: ['ninboy', 'pseudoyu'], handler, }; diff --git a/lib/routes/threads/utils.ts b/lib/routes/threads/utils.ts index ee7fe07f8c3a0a1..dde71adaf609a54 100644 --- a/lib/routes/threads/utils.ts +++ b/lib/routes/threads/utils.ts @@ -2,6 +2,7 @@ import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import dayjs from 'dayjs'; import cache from '@/utils/cache'; +import { destr } from 'destr'; import NotFoundError from '@/errors/types/not-found'; const profileUrl = (user: string) => `https://www.threads.net/@${user}`; @@ -14,7 +15,7 @@ const THREADS_QUERY = 6_232_751_443_445_612; const REPLIES_QUERY = 6_307_072_669_391_286; const USER_AGENT = 'Barcelona 289.0.0.77.109 Android'; const appId = '238260118697367'; -// const asbdId = '129477'; +const asbdId = '129477'; const extractTokens = async (user): Promise<{ lsd: string }> => { const response = await ofetch(profileUrl(user), { @@ -52,17 +53,39 @@ const makeHeader = (user: string, lsd: string) => ({ // the formal way always reachs the rate limit, so use instagram api to get user id instead const getUserId = (user: string, lsd: string): Promise<string> => cache.tryGet(`threads:userId:${user}`, async () => { - const response = await ofetch(instagramUrl(user), { - headers: makeHeader(user, lsd), + const pathName = `/@${user}`; + const payload: any = { + 'route_urls[0]': pathName, + __a: '1', + __comet_req: '29', + lsd, + }; + const response = await ofetch('https://www.threads.net/ajax/bulk-route-definitions/', { + method: 'POST', + headers: { + ...makeHeader(user, lsd), + 'content-type': 'application/x-www-form-urlencoded', + 'X-ASBD-ID': asbdId, + }, + body: new URLSearchParams(payload).toString(), + parseResponse: (txt) => destr(txt.slice(9)), // remove "for (;;);" }); - if (!response?.data?.user) { - throw new NotFoundError('Instagram getUser API response is invalid'); - } + let userId = response.payload.payloads[pathName].result.exports.rootView.props.user_id; - const userId = response.data.user.id; if (!userId) { - throw new NotFoundError('User ID not found in Instagram getUser API response'); + const fallbackResponse = await ofetch(instagramUrl(user), { + headers: makeHeader(user, lsd), + }); + + if (!fallbackResponse?.data?.user) { + throw new NotFoundError('Instagram getUser API response is invalid'); + } + + userId = fallbackResponse.data.user.id; + if (!userId) { + throw new NotFoundError('User ID not found in Instagram getUser API response'); + } } return userId; From 022d806b781a36aeb06d792d72a6e04224897d8e Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 29 Oct 2024 16:42:15 +0700 Subject: [PATCH 313/740] feat(route/reuters): add wire source and modify doc --- lib/routes/reuters/common.ts | 319 ++++++++++++++++++----------------- 1 file changed, 160 insertions(+), 159 deletions(-) diff --git a/lib/routes/reuters/common.ts b/lib/routes/reuters/common.ts index 6521ae77b07d022..908ea65b2d63426 100644 --- a/lib/routes/reuters/common.ts +++ b/lib/routes/reuters/common.ts @@ -29,44 +29,7 @@ export const route: Route = { ], default: 'world', }, - topic: { - description: 'find it in the URL, or tables below, leave empty for `All`', - options: [ - // World topics - { value: 'africa', label: 'Africa' }, - { value: 'americas', label: 'Americas' }, - { value: 'asia-pacific', label: 'Asia Pacific' }, - { value: 'china', label: 'China' }, - { value: 'europe', label: 'Europe' }, - { value: 'india', label: 'India' }, - { value: 'middle-east', label: 'Middle East' }, - { value: 'uk', label: 'United Kingdom' }, - { value: 'us', label: 'United States' }, - { value: 'the-great-reboot', label: 'The Great Reboot' }, - { value: 'reuters-next', label: 'Reuters Next' }, - // Business topics - { value: 'aerospace-defense', label: 'Aerospace & Defense' }, - { value: 'autos-transportation', label: 'Autos & Transportation' }, - { value: 'energy', label: 'Energy' }, - { value: 'environment', label: 'Environment' }, - { value: 'finance', label: 'Finance' }, - { value: 'healthcare-pharmaceuticals', label: 'Healthcare & Pharmaceuticals' }, - { value: 'media-telecom', label: 'Media & Telecom' }, - { value: 'retail-consumer', label: 'Retail & Consumer' }, - { value: 'sustainable-business', label: 'Sustainable Business' }, - { value: 'charged', label: 'Charged' }, - { value: 'future-of-health', label: 'Future of Health' }, - { value: 'future-of-money', label: 'Future of Money' }, - { value: 'take-five', label: 'Take Five' }, - { value: 'reuters-impact', label: 'Reuters Impact' }, - // Legal topics - { value: 'government', label: 'Government' }, - { value: 'legalindustry', label: 'Legal Industry' }, - { value: 'litigation', label: 'Litigation' }, - { value: 'transactional', label: 'Transactional' }, - ], - default: 'us', - }, + topic: 'find it in the URL, or tables below, leave empty for `All`', }, features: { requireConfig: false, @@ -82,7 +45,7 @@ export const route: Route = { }, ], name: 'Category/Topic/Author', - maintainers: ['LyleLee', 'HenryQW', 'proletarius101', 'black-desk', 'nczitzk'], + maintainers: ['LyleLee', 'HenryQW', 'proletarius101', 'black-desk', 'nczitzk', 'pseudoyu'], handler, description: `- \`:category\`: @@ -127,128 +90,166 @@ async function handler(ctx) { const useSophi = ctx.req.query('sophi') === 'true' && topic !== '' && CAN_USE_SOPHI.includes(category); const section_id = `/${category}/${topic ? `${topic}/` : ''}`; - const { title, description, rootUrl, response } = await (async () => { - if (MUST_FETCH_BY_TOPICS.has(category)) { - const rootUrl = 'https://www.reuters.com/pf/api/v3/content/fetch/articles-by-topic-v1'; - const response = await ofetch(rootUrl, { - query: { - query: JSON.stringify({ - offset: 0, - size: limit, - topic_url: section_id, - website: 'reuters', - }), - }, - }); - return { - title: `${response.result.topics[0].name} | Reuters`, - description: response.result.topics[0].entity_id, - rootUrl, - response, - }; - } else { - const rootUrl = 'https://www.reuters.com/pf/api/v3/content/fetch/articles-by-section-alias-or-id-v1'; - const response = await ofetch(rootUrl, { - query: { - query: JSON.stringify({ - offset: 0, - size: limit, - section_id, - website: 'reuters', - ...(useSophi - ? { - fetch_type: 'sophi', - sophi_page: '*', - sophi_widget: 'topic', - } - : {}), - }), - }, - }); - return { - title: response.result.section.title, - description: response.result.section.section_about, - rootUrl, - response, - }; - } - })(); - - let items = response.result.articles.map((e) => ({ - title: e.title, - link: new URL(e.canonical_url, rootUrl).href, - guid: e.id, - pubDate: parseDate(e.published_time), - updated: parseDate(e.updated_time), - author: e.authors.map((e) => e.name).join(', '), - category: e.kicker.names, - description: e.description, - })); - - items = items.filter((e, i) => items.findIndex((f) => e.guid === f.guid) === i); - - const results = await Promise.allSettled( - items.map((item) => - ctx.req.query('fulltext') === 'true' - ? cache.tryGet(item.link, async () => { - const detailResponse = await ofetch(item.link); - const content = load(detailResponse.data); - - if (detailResponse.url.startsWith('https://www.reuters.com/investigates/')) { - const ldJson = JSON.parse(content('script[type="application/ld+json"]').text()); - content('.special-report-article-container .container, #slide-dek, #slide-end, .share-in-article-container').remove(); - - item.title = ldJson.headline; - item.pubDate = parseDate(ldJson.dateCreated); - item.author = ldJson.creator; - item.category = ldJson.keywords; - item.description = content('.special-report-article-container').html(); + try { + const { title, description, rootUrl, response } = await (async () => { + if (MUST_FETCH_BY_TOPICS.has(category)) { + const rootUrl = 'https://www.reuters.com/pf/api/v3/content/fetch/articles-by-topic-v1'; + const response = await ofetch(rootUrl, { + query: { + query: JSON.stringify({ + offset: 0, + size: limit, + topic_url: section_id, + website: 'reuters', + }), + }, + }); + + return { + title: `${response.result.topics[0].name} | Reuters`, + description: response.result.topics[0].entity_id, + rootUrl, + response, + }; + } else { + const rootUrl = 'https://www.reuters.com/pf/api/v3/content/fetch/articles-by-section-alias-or-id-v1'; + const response = await ofetch(rootUrl, { + query: { + query: JSON.stringify({ + offset: 0, + size: limit, + section_id, + website: 'reuters', + ...(useSophi + ? { + fetch_type: 'sophi', + sophi_page: '*', + sophi_widget: 'topic', + } + : {}), + }), + }, + }); + return { + title: response.result.section.title, + description: response.result.section.section_about, + rootUrl, + response, + }; + } + })(); + + let items = response.result.articles.map((e) => ({ + title: e.title, + link: new URL(e.canonical_url, rootUrl).href, + guid: e.id, + pubDate: parseDate(e.published_time), + updated: parseDate(e.updated_time), + author: e.authors.map((e) => e.name).join(', '), + category: e.kicker.names, + description: e.description, + })); + + items = items.filter((e, i) => items.findIndex((f) => e.guid === f.guid) === i); + + const results = await Promise.allSettled( + items.map((item) => + ctx.req.query('fulltext') === 'true' + ? cache.tryGet(item.link, async () => { + const detailResponse = await ofetch(item.link); + const content = load(detailResponse.data); + + if (detailResponse.url.startsWith('https://www.reuters.com/investigates/')) { + const ldJson = JSON.parse(content('script[type="application/ld+json"]').text()); + content('.special-report-article-container .container, #slide-dek, #slide-end, .share-in-article-container').remove(); + + item.title = ldJson.headline; + item.pubDate = parseDate(ldJson.dateCreated); + item.author = ldJson.creator; + item.category = ldJson.keywords; + item.description = content('.special-report-article-container').html(); + + return item; + } + + const matches = content('script#fusion-metadata') + .text() + .match(/Fusion.globalContent=({[\S\s]*?});/); + + if (matches) { + const data = JSON.parse(matches[1]); + + item.title = data.result.title || item.title; + item.description = art(path.join(__dirname, 'templates/description.art'), { + result: data.result, + }); + item.pubDate = parseDate(data.result.display_time); + item.author = data.result.authors.map((author) => author.name).join(', '); + item.category = data.result.taxonomy.keywords; + + return item; + } + + content('.title').remove(); + content('.article-metadata').remove(); + + item.title = content('meta[property="og:title"]').attr('content'); + item.pubDate = parseDate(detailResponse.data.match(/"datePublished":"(.*?)","dateModified/)[1]); + item.author = detailResponse.data + .match(/{"@type":"Person","name":"(.*?)"}/g) + .map((p) => p.match(/"name":"(.*?)"/)[1]) + .join(', '); + item.description = content('article').html(); return item; - } + }) + : item + ) + ); + items = results.filter((r) => r.status === 'fulfilled').map((r) => r.value); + + return { + title, + description, + image: 'https://www.reuters.com/pf/resources/images/reuters/logo-vertical-default-512x512.png?d=116', + link: `https://www.reuters.com${section_id}`, + item: items, + }; + } catch { + // 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); + if (arcResponse.wireitems?.length) { + const items = arcResponse.wireitems + .map((item) => { + const story = item.templates.find((t) => t.template === 'story_with_image')?.story; + if (!story) { + return null; + } + + return { + title: story.hed, + link: item.templates.find((t) => t.template === 'story_with_image')?.template_action?.url, + guid: story.usn, + pubDate: parseDate(story.updated_at), + updated: parseDate(story.updated_at), + description: story.lede, + author: story.authors?.map((author) => author.name).join(', '), + category: [arcResponse.analytics?.topic_channel, arcResponse.analytics?.topic_sub_channel].filter(Boolean), + }; + }) + .filter(Boolean); - const matches = content('script#fusion-metadata') - .text() - .match(/Fusion.globalContent=({[\S\s]*?});/); - - if (matches) { - const data = JSON.parse(matches[1]); - - item.title = data.result.title || item.title; - item.description = art(path.join(__dirname, 'templates/description.art'), { - result: data.result, - }); - item.pubDate = parseDate(data.result.display_time); - item.author = data.result.authors.map((author) => author.name).join(', '); - item.category = data.result.taxonomy.keywords; - - return item; - } - - content('.title').remove(); - content('.article-metadata').remove(); - - item.title = content('meta[property="og:title"]').attr('content'); - item.pubDate = parseDate(detailResponse.data.match(/"datePublished":"(.*?)","dateModified/)[1]); - item.author = detailResponse.data - .match(/{"@type":"Person","name":"(.*?)"}/g) - .map((p) => p.match(/"name":"(.*?)"/)[1]) - .join(', '); - item.description = content('article').html(); - - return item; - }) - : item - ) - ); - items = results.filter((r) => r.status === 'fulfilled').map((r) => r.value); - - return { - title, - description, - image: 'https://www.reuters.com/pf/resources/images/reuters/logo-vertical-default-512x512.png?d=116', - link: `https://www.reuters.com${section_id}`, - item: items, - }; + return { + title: arcResponse.analytics?.title || `${arcResponse.wire_name} | Reuters`, + description: arcResponse.analytics?.content_title, + image: 'https://www.reuters.com/pf/resources/images/reuters/logo-vertical-default-512x512.png?d=116', + link: arcResponse.canonical_action?.url || `https://www.reuters.com${section_id}`, + category: [arcResponse.analytics?.topic_channel, arcResponse.analytics?.topic_sub_channel].filter(Boolean), + item: items.slice(0, limit), + }; + } + } } From ef30bdddd7535780cbaafd76dc2fbb1e17e0d728 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 29 Oct 2024 16:47:25 +0700 Subject: [PATCH 314/740] feat(route/reuters): add investigates route to popular --- lib/routes/reuters/investigates.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/routes/reuters/investigates.ts b/lib/routes/reuters/investigates.ts index 8cc64eb8db0b982..16204e38197f379 100644 --- a/lib/routes/reuters/investigates.ts +++ b/lib/routes/reuters/investigates.ts @@ -1,4 +1,4 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,7 +6,8 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/investigates', - categories: ['traditional-media'], + categories: ['traditional-media', 'popular'], + view: ViewType.Articles, example: '/reuters/investigates', parameters: {}, features: { From 428acd2ea4995c1ba4354dfcbf66c983c9d1fa5c Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 29 Oct 2024 19:06:18 +0800 Subject: [PATCH 315/740] fix(bilibili/video): missing image (#17357) --- lib/routes/bilibili/video.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/routes/bilibili/video.ts b/lib/routes/bilibili/video.ts index 457b1fd55c92853..f5418e07986752c 100644 --- a/lib/routes/bilibili/video.ts +++ b/lib/routes/bilibili/video.ts @@ -59,6 +59,7 @@ async function handler(ctx) { title: `${name} 的 bilibili 空间`, link: `https://space.bilibili.com/${uid}`, description: `${name} 的 bilibili 空间`, + image: face, logo: face, icon: face, item: From abda8d9a83cee6b1ca2c14b3810a0d432ce0c1fd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 06:21:30 -0700 Subject: [PATCH 316/740] chore(deps): bump uuid from 11.0.1 to 11.0.2 (#17356) * chore(deps): bump uuid from 11.0.1 to 11.0.2 Bumps [uuid](https://github.com/uuidjs/uuid) from 11.0.1 to 11.0.2. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v11.0.1...v11.0.2) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 125 +++++++++++++++++++++++++++++++++++++------------ 2 files changed, 96 insertions(+), 31 deletions(-) diff --git a/package.json b/package.json index 1502f112ab40ddc..c2ab6fc8d3111bf 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "tsx": "4.19.2", "twitter-api-v2": "1.18.1", "undici": "6.20.1", - "uuid": "11.0.1", + "uuid": "11.0.2", "winston": "3.15.0", "xxhash-wasm": "1.0.2", "zod": "3.23.8" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 75b6a1238195775..8a0d42c95004685 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -246,8 +246,8 @@ importers: specifier: 6.20.1 version: 6.20.1 uuid: - specifier: 11.0.1 - version: 11.0.1 + specifier: 11.0.2 + version: 11.0.2 winston: specifier: 3.15.0 version: 3.15.0 @@ -1308,8 +1308,8 @@ packages: resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.2.1': - resolution: {integrity: sha512-HFZ4Mp26nbWk9d/BpvP0YNL6W4UoZF0VFcTw/aPPA8RpOxeFQgK+ClABGgAUXs9Y/RGX/l1vOmrqz1MQt9MNuw==} + '@eslint/plugin-kit@0.2.2': + resolution: {integrity: sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@hono/node-server@1.13.3': @@ -1331,12 +1331,12 @@ packages: hono: '>=3.9.0' zod: ^3.19.1 - '@humanfs/core@0.19.0': - resolution: {integrity: sha512-2cbWIHbZVEweE853g8jymffCA+NCMiuqeECeBBLm8dg2oFdjuGJhgN4UAbI+6v0CKbbhvtXA4qV8YR5Ji86nmw==} + '@humanfs/core@0.19.1': + resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} engines: {node: '>=18.18.0'} - '@humanfs/node@0.16.5': - resolution: {integrity: sha512-KSPA4umqSG4LHYRodq31VDwKAvaTF4xmVlzM8Aeh4PlU1JQ3IG0wiA8C25d3RQ9nJyM3mBHyI53K06VVL/oFFg==} + '@humanfs/node@0.16.6': + resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} engines: {node: '>=18.18.0'} '@humanwhocodes/config-array@0.13.0': @@ -1947,6 +1947,10 @@ packages: resolution: {integrity: sha512-Uholz7tWhXmA4r6epo+vaeV7yjdKy5QFCERMjs1kMVsLRKIrSdM6o21W2He9ftp5PP6aWOVpD5zvrvuHZC0bMQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.12.1': + resolution: {integrity: sha512-bma6sD1iViTt+y9MAwDlBdPTMCqoH/BNdcQk4rKhIZWv3eM0xHmzeSrPJA663PAqFqfpOmtdugycpr0E1mZDVA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.11.0': resolution: {integrity: sha512-ItiMfJS6pQU0NIKAaybBKkuVzo6IdnAhPFZA/2Mba/uBjuPQPet/8+zh5GtLHwmuFRShZx+8lhIs7/QeDHflOg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1960,6 +1964,10 @@ packages: resolution: {integrity: sha512-tn6sNMHf6EBAYMvmPUaKaVeYvhUsrE6x+bXQTxjQRp360h1giATU0WvgeEys1spbvb5R+VpNOZ+XJmjD8wOUHw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.12.1': + resolution: {integrity: sha512-anMS4es5lxBe4UVcDXOkcDb3csnm5BvaNIbOFfvy/pJEohorsggdVB8MFbl5EZiEuBnZZ0ei1z7W5b6FdFiV1Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.11.0': resolution: {integrity: sha512-yHC3s1z1RCHoCz5t06gf7jH24rr3vns08XXhfEqzYpd6Hll3z/3g23JRi0jM8A47UFKNc3u/y5KIMx8Ynbjohg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1969,16 +1977,35 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.12.1': + resolution: {integrity: sha512-k/o9khHOckPeDXilFTIPsP9iAYhhdMh3OsOL3i2072PNpFqhqzRHx472/0DeC8H/WZee3bZG0z2ddGRSPgeOKw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@8.11.0': resolution: {integrity: sha512-CYiX6WZcbXNJV7UNB4PLDIBtSdRmRI/nb0FMyqHPTQD1rMjA0foPLaPUV39C/MxkTd/QKSeX+Gb34PPsDVC35g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.12.1': + resolution: {integrity: sha512-sDv9yFHrhKe1WN8EYuzfhKCh/sFRupe9P+m/lZ5YgVvPoCUGHNN50IO4llSu7JAbftUM/QcCh+GeCortXPrBYQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@8.11.0': resolution: {integrity: sha512-EaewX6lxSjRJnc+99+dqzTeoDZUfyrA52d2/HRrkI830kgovWsmIiTfmr0NZorzqic7ga+1bS60lRBUgR3n/Bw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.12.1': + resolution: {integrity: sha512-2RwdwnNGuOQKdGjuhujQHUqBZhEuodg2sLVPvOfWktvA9sOXOVqARjOyHSyhN2LiJGKxV6c8oOcmOtRcAnEeFw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -2317,8 +2344,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001673: - resolution: {integrity: sha512-WTrjUCSMp3LYX0nE12ECkV0a+e6LC85E0Auz75555/qr78Oc8YWhEPNfDd6SHdtlCMSzqtuXY0uyEMNRcsKpKw==} + caniuse-lite@1.0.30001674: + resolution: {integrity: sha512-jOsKlZVRnzfhLojb+Ykb+gyUSp9Xb57So+fAiFlLzzTKpqg8xxSav0e40c8/4F/v9N8QSvrRRaLeVzQbLqomYw==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -2772,8 +2799,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.47: - resolution: {integrity: sha512-zS5Yer0MOYw4rtK2iq43cJagHZ8sXN0jDHDKzB+86gSBSAI4v07S97mcq+Gs2vclAxSh1j7vOAHxSVgduiiuVQ==} + electron-to-chromium@1.5.49: + resolution: {integrity: sha512-ZXfs1Of8fDb6z7WEYZjXpgIRF6MEu8JdeGA0A40aZq6OQbS+eJpnnV49epZRna2DU/YsEjSQuGtQPPtvt6J65A==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -5269,8 +5296,8 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.56: - resolution: {integrity: sha512-Ihxv/Bwiyj73icTYVgBUkQ3wstlCglLoegSgl64oSrGUBX1hc7Qmf/CnrnJLaQdZrCnTaLqMYOwKMKlkfkFrxQ==} + tldts-core@6.1.57: + resolution: {integrity: sha512-lXnRhuQpx3zU9EONF9F7HfcRLvN1uRYUBIiKL+C/gehC/77XTU+Jye6ui86GA3rU6FjlJ0triD1Tkjt2F/2lEg==} tldts@6.1.56: resolution: {integrity: sha512-2PT1oRZCxtsbLi5R2SQjE/v4vvgRggAtVcYj+3Rrcnu2nPZvu7m64+gDa/EsVSWd3QzEc0U0xN+rbEKsJC47kA==} @@ -5515,8 +5542,8 @@ packages: resolution: {integrity: sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==} engines: {node: '>= 4'} - uuid@11.0.1: - resolution: {integrity: sha512-wt9UB5EcLhnboy1UvA1mvGPXkIIrHSu+3FmUksARfdVw9tuPf3CH/CohxO0Su1ApoKAeT6BVzAJIvjTuQVSmuQ==} + uuid@11.0.2: + resolution: {integrity: sha512-14FfcOJmqdjbBPdDjFQyk/SdT4NySW4eM0zcG+HqbHP5jzuH56xO3J1DGhgs/cEMCfwYi3HQI1gnTO62iaG+tQ==} hasBin: true uuid@3.4.0: @@ -6747,7 +6774,7 @@ snapshots: '@eslint/object-schema@2.1.4': {} - '@eslint/plugin-kit@0.2.1': + '@eslint/plugin-kit@0.2.2': dependencies: levn: 0.4.1 @@ -6767,11 +6794,11 @@ snapshots: hono: 4.6.7 zod: 3.23.8 - '@humanfs/core@0.19.0': {} + '@humanfs/core@0.19.1': {} - '@humanfs/node@0.16.5': + '@humanfs/node@0.16.6': dependencies: - '@humanfs/core': 0.19.0 + '@humanfs/core': 0.19.1 '@humanwhocodes/retry': 0.3.1 '@humanwhocodes/config-array@0.13.0': @@ -7230,7 +7257,7 @@ snapshots: '@stylistic/eslint-plugin@2.9.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.11.0(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.1(eslint@9.13.0)(typescript@5.6.3) eslint: 9.13.0 eslint-visitor-keys: 4.1.0 espree: 10.2.0 @@ -7436,6 +7463,11 @@ snapshots: '@typescript-eslint/types': 8.11.0 '@typescript-eslint/visitor-keys': 8.11.0 + '@typescript-eslint/scope-manager@8.12.1': + dependencies: + '@typescript-eslint/types': 8.12.1 + '@typescript-eslint/visitor-keys': 8.12.1 + '@typescript-eslint/type-utils@8.11.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) @@ -7450,6 +7482,8 @@ snapshots: '@typescript-eslint/types@8.11.0': {} + '@typescript-eslint/types@8.12.1': {} + '@typescript-eslint/typescript-estree@8.11.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.11.0 @@ -7465,6 +7499,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.12.1(typescript@5.6.3)': + dependencies: + '@typescript-eslint/types': 8.12.1 + '@typescript-eslint/visitor-keys': 8.12.1 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.11.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) @@ -7476,11 +7525,27 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.12.1(eslint@9.13.0)(typescript@5.6.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@typescript-eslint/scope-manager': 8.12.1 + '@typescript-eslint/types': 8.12.1 + '@typescript-eslint/typescript-estree': 8.12.1(typescript@5.6.3) + eslint: 9.13.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@8.11.0': dependencies: '@typescript-eslint/types': 8.11.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.12.1': + dependencies: + '@typescript-eslint/types': 8.12.1 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.10': @@ -7788,8 +7853,8 @@ snapshots: browserslist@4.24.2: dependencies: - caniuse-lite: 1.0.30001673 - electron-to-chromium: 1.5.47 + caniuse-lite: 1.0.30001674 + electron-to-chromium: 1.5.49 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -7863,7 +7928,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001673: {} + caniuse-lite@1.0.30001674: {} caseless@0.12.0: {} @@ -8330,7 +8395,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.47: {} + electron-to-chromium@1.5.49: {} ellipsize@0.1.0: {} @@ -8641,8 +8706,8 @@ snapshots: '@eslint/core': 0.7.0 '@eslint/eslintrc': 3.1.0 '@eslint/js': 9.13.0 - '@eslint/plugin-kit': 0.2.1 - '@humanfs/node': 0.16.5 + '@eslint/plugin-kit': 0.2.2 + '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.3.1 '@types/estree': 1.0.6 @@ -11210,11 +11275,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.56: {} + tldts-core@6.1.57: {} tldts@6.1.56: dependencies: - tldts-core: 6.1.56 + tldts-core: 6.1.57 tmp@0.0.33: dependencies: @@ -11412,7 +11477,7 @@ snapshots: utility-types@3.11.0: {} - uuid@11.0.1: {} + uuid@11.0.2: {} uuid@3.4.0: {} From c16889aa29b69b5ae53d5033325650164f335ba7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 06:22:44 -0700 Subject: [PATCH 317/740] chore(deps-dev): bump @typescript-eslint/parser from 8.11.0 to 8.12.1 (#17351) * chore(deps-dev): bump @typescript-eslint/parser from 8.11.0 to 8.12.1 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.11.0 to 8.12.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.12.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index c2ab6fc8d3111bf..be45119af1571d0 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "@types/title": "3.4.3", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.11.0", - "@typescript-eslint/parser": "8.11.0", + "@typescript-eslint/parser": "8.12.1", "@vercel/nft": "0.27.5", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.103", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8a0d42c95004685..622553b9465e1bd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -344,10 +344,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.11.0 - version: 8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) + version: 8.11.0(@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/parser': - specifier: 8.11.0 - version: 8.11.0(eslint@9.13.0)(typescript@5.6.3) + specifier: 8.12.1 + version: 8.12.1(eslint@9.13.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.5 version: 0.27.5 @@ -1933,8 +1933,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.11.0': - resolution: {integrity: sha512-lmt73NeHdy1Q/2ul295Qy3uninSqi6wQI18XwSpm8w0ZbQXUpjCAWP1Vlv/obudoBiIjJVjlztjQ+d/Md98Yxg==} + '@typescript-eslint/parser@8.12.1': + resolution: {integrity: sha512-I/I9Bg7qFa8rOgBnUUHIWTgzbB5wVkSLX+04xGUzTcJUtdq/I2uHWR9mbW6qUYJG/UmkuDcTax5JHvoEWOAHOQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -7427,10 +7427,10 @@ snapshots: '@types/node': 22.8.1 optional: true - '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.11.0(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.12.1(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.11.0 '@typescript-eslint/type-utils': 8.11.0(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/utils': 8.11.0(eslint@9.13.0)(typescript@5.6.3) @@ -7445,12 +7445,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.11.0(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.11.0 - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.11.0 + '@typescript-eslint/scope-manager': 8.12.1 + '@typescript-eslint/types': 8.12.1 + '@typescript-eslint/typescript-estree': 8.12.1(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.12.1 debug: 4.3.7 eslint: 9.13.0 optionalDependencies: From a50a51286bfc84ee9bc99201efc47d364087d828 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 29 Oct 2024 20:44:36 +0700 Subject: [PATCH 318/740] fix(route/zhihu): get rid of outdated zhihu daily api and use web html --- lib/routes/zhihu/daily.ts | 94 +++++++++++++-------------------------- 1 file changed, 30 insertions(+), 64 deletions(-) diff --git a/lib/routes/zhihu/daily.ts b/lib/routes/zhihu/daily.ts index 342664357151527..5cd788ed78b3ed6 100644 --- a/lib/routes/zhihu/daily.ts +++ b/lib/routes/zhihu/daily.ts @@ -1,25 +1,7 @@ import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; import cache from '@/utils/cache'; -import got from '@/utils/got'; -import { header, processImage } from './utils'; -import { parseDate } from '@/utils/parse-date'; - -// 参考:https://github.com/izzyleung/ZhihuDailyPurify/wiki/%E7%9F%A5%E4%B9%8E%E6%97%A5%E6%8A%A5-API-%E5%88%86%E6%9E%90 -// 文章给出了v4版 api的信息,包含全文api - -async function dohResolve(name) { - const response = await got('https://223.5.5.5/resolve', { - searchParams: { - name, - type: 'A', - edns_client_subnet: '223.5.5.5', // 使用国内的ip地址 - }, - headers: { - accept: 'application/dns-json', - }, - }); - return response.data.Answer.map((item) => item.data); -} export const route: Route = { path: '/daily', @@ -40,60 +22,44 @@ export const route: Route = { }, ], name: '知乎日报', - maintainers: ['DHPO'], + maintainers: ['DHPO', 'pseudoyu'], handler, url: 'daily.zhihu.com/*', }; async function handler() { - const api = 'https://news-at.zhihu.com/api/4/news'; - const HOST = 'news-at.zhihu.com'; - let address = HOST; - try { - await got(`${api}/latest`); - } catch { - address = (await dohResolve(HOST)).pop(); // 国外ip证书配置有误,解析到国内地址 - } - const listRes = await got({ - method: 'get', - url: `${api}/latest`, - headers: { - ...header, - Referer: `${api}/latest`, - Host: address, - }, - // host: address, + const key = 'zhihu:daily'; + const response = await cache.tryGet(key, async () => { + const response = await ofetch('https://daily.zhihu.com/'); + return response; }); - // 根据api的说明,过滤掉极个别站外链接 - const storyList = listRes.data.stories.filter((el) => el.type === 0); - const date = listRes.data.date; - const articleList = storyList.map((item) => ({ - title: item.title, - pubDate: parseDate(date, 'YYYYMMDD'), - link: item.url, - guid: item.url, - storyId: item.id, - })); + const $ = load(response); const items = await Promise.all( - articleList.map(async (item) => { - const url = `${api}/${item.storyId}`; - const description = await cache.tryGet(item.link, async () => { - const storyDetail = await got({ - method: 'get', - url, - headers: { - Referer: url, - Host: address, - }, - // host: address, + $('.box') + .toArray() + .map(async (item) => { + item = $(item); + const linkElem = item.find('.link-button'); + const storyUrl = 'https://daily.zhihu.com' + linkElem.attr('href'); + + // Fetch full story content + const storyResponse = await cache.tryGet(storyUrl, async () => { + const response = await ofetch(storyUrl); + return response; }); - return processImage(storyDetail.data.body.replaceAll(/<div class="meta">([\S\s]*?)<\/div>/g, '<strong>$1</strong>').replaceAll(/<\/?h2.*?>/g, '')); - }); - item.description = description; - return item; - }) + + const $story = load(storyResponse); + const storyTitle = $story('.DailyHeader-title').text(); + const storyContent = $story('.DailyRichText').html(); + + return { + title: storyTitle, + description: storyContent, + link: storyUrl, + }; + }) ); return { From 7df50aa64d403323d27e0cf11cc4503e942f544b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 06:53:05 -0700 Subject: [PATCH 319/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.11.0 to 8.12.1 (#17355) * chore(deps-dev): bump @typescript-eslint/eslint-plugin Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.11.0 to 8.12.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.12.1/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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 93 ++++++++------------------------------------------ 2 files changed, 15 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index be45119af1571d0..be4763feffcaa53 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.11.0", + "@typescript-eslint/eslint-plugin": "8.12.1", "@typescript-eslint/parser": "8.12.1", "@vercel/nft": "0.27.5", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 622553b9465e1bd..02a31724b05c0a5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -343,8 +343,8 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.11.0 - version: 8.11.0(@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) + specifier: 8.12.1 + version: 8.12.1(@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.12.1 version: 8.12.1(eslint@9.13.0)(typescript@5.6.3) @@ -1922,8 +1922,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.11.0': - resolution: {integrity: sha512-KhGn2LjW1PJT2A/GfDpiyOfS4a8xHQv2myUagTM5+zsormOmBlYsnQ6pobJ8XxJmh6hnHwa2Mbe3fPrDJoDhbA==} + '@typescript-eslint/eslint-plugin@8.12.1': + resolution: {integrity: sha512-gNg/inLRcPoBsKKIe4Vv38SVSOhk4BKWNO0T56sVff33gRqtTpOsrhHtiOKD1lmIOmCtZMPaW2x/h2FlM+sCEg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1943,16 +1943,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.11.0': - resolution: {integrity: sha512-Uholz7tWhXmA4r6epo+vaeV7yjdKy5QFCERMjs1kMVsLRKIrSdM6o21W2He9ftp5PP6aWOVpD5zvrvuHZC0bMQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.12.1': resolution: {integrity: sha512-bma6sD1iViTt+y9MAwDlBdPTMCqoH/BNdcQk4rKhIZWv3eM0xHmzeSrPJA663PAqFqfpOmtdugycpr0E1mZDVA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.11.0': - resolution: {integrity: sha512-ItiMfJS6pQU0NIKAaybBKkuVzo6IdnAhPFZA/2Mba/uBjuPQPet/8+zh5GtLHwmuFRShZx+8lhIs7/QeDHflOg==} + '@typescript-eslint/type-utils@8.12.1': + resolution: {integrity: sha512-zJzrvbDVjIzVKV2TGHcjembEhws8RWXJhmqfO9hS2gRXBN0gDwGhRPEdJ6AZglzfJ+YA1q09EWpSLSXjBJpIMQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1960,23 +1956,10 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.11.0': - resolution: {integrity: sha512-tn6sNMHf6EBAYMvmPUaKaVeYvhUsrE6x+bXQTxjQRp360h1giATU0WvgeEys1spbvb5R+VpNOZ+XJmjD8wOUHw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.12.1': resolution: {integrity: sha512-anMS4es5lxBe4UVcDXOkcDb3csnm5BvaNIbOFfvy/pJEohorsggdVB8MFbl5EZiEuBnZZ0ei1z7W5b6FdFiV1Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.11.0': - resolution: {integrity: sha512-yHC3s1z1RCHoCz5t06gf7jH24rr3vns08XXhfEqzYpd6Hll3z/3g23JRi0jM8A47UFKNc3u/y5KIMx8Ynbjohg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.12.1': resolution: {integrity: sha512-k/o9khHOckPeDXilFTIPsP9iAYhhdMh3OsOL3i2072PNpFqhqzRHx472/0DeC8H/WZee3bZG0z2ddGRSPgeOKw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1986,22 +1969,12 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.11.0': - resolution: {integrity: sha512-CYiX6WZcbXNJV7UNB4PLDIBtSdRmRI/nb0FMyqHPTQD1rMjA0foPLaPUV39C/MxkTd/QKSeX+Gb34PPsDVC35g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.12.1': resolution: {integrity: sha512-sDv9yFHrhKe1WN8EYuzfhKCh/sFRupe9P+m/lZ5YgVvPoCUGHNN50IO4llSu7JAbftUM/QcCh+GeCortXPrBYQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.11.0': - resolution: {integrity: sha512-EaewX6lxSjRJnc+99+dqzTeoDZUfyrA52d2/HRrkI830kgovWsmIiTfmr0NZorzqic7ga+1bS60lRBUgR3n/Bw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.12.1': resolution: {integrity: sha512-2RwdwnNGuOQKdGjuhujQHUqBZhEuodg2sLVPvOfWktvA9sOXOVqARjOyHSyhN2LiJGKxV6c8oOcmOtRcAnEeFw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7427,14 +7400,14 @@ snapshots: '@types/node': 22.8.1 optional: true - '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.12.1(@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.12.1(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.11.0 - '@typescript-eslint/type-utils': 8.11.0(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.11.0(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.11.0 + '@typescript-eslint/scope-manager': 8.12.1 + '@typescript-eslint/type-utils': 8.12.1(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.1(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.12.1 eslint: 9.13.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7458,20 +7431,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.11.0': - dependencies: - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/visitor-keys': 8.11.0 - '@typescript-eslint/scope-manager@8.12.1': dependencies: '@typescript-eslint/types': 8.12.1 '@typescript-eslint/visitor-keys': 8.12.1 - '@typescript-eslint/type-utils@8.11.0(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.12.1(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.11.0(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.12.1(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.1(eslint@9.13.0)(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: @@ -7480,25 +7448,8 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@8.11.0': {} - '@typescript-eslint/types@8.12.1': {} - '@typescript-eslint/typescript-estree@8.11.0(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/visitor-keys': 8.11.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.12.1(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.12.1 @@ -7514,17 +7465,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.11.0(eslint@9.13.0)(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) - '@typescript-eslint/scope-manager': 8.11.0 - '@typescript-eslint/types': 8.11.0 - '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) - eslint: 9.13.0 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.12.1(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) @@ -7536,11 +7476,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.11.0': - dependencies: - '@typescript-eslint/types': 8.11.0 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.12.1': dependencies: '@typescript-eslint/types': 8.12.1 From 6e562d3c2a051c8666217b632cee91b42e320e32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 06:56:32 -0700 Subject: [PATCH 320/740] chore(deps): bump hono from 4.6.7 to 4.6.8 (#17349) * chore(deps): bump hono from 4.6.7 to 4.6.8 Bumps [hono](https://github.com/honojs/hono) from 4.6.7 to 4.6.8. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.7...v4.6.8) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 be4763feffcaa53..4e965dd7d30621e 100644 --- a/package.json +++ b/package.json @@ -83,7 +83,7 @@ "fanfou-sdk": "5.0.0", "form-data": "4.0.1", "googleapis": "144.0.0", - "hono": "4.6.7", + "hono": "4.6.8", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 02a31724b05c0a5..fbd6051dd3d4988 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,10 +10,10 @@ importers: dependencies: '@hono/node-server': specifier: 1.13.3 - version: 1.13.3(hono@4.6.7) + version: 1.13.3(hono@4.6.8) '@hono/zod-openapi': specifier: 0.16.4 - version: 0.16.4(hono@4.6.7)(zod@3.23.8) + version: 0.16.4(hono@4.6.8)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -46,7 +46,7 @@ importers: version: 0.0.23 '@scalar/hono-api-reference': specifier: 0.5.156 - version: 0.5.156(hono@4.6.7) + version: 0.5.156(hono@4.6.8) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -108,8 +108,8 @@ importers: specifier: 144.0.0 version: 144.0.0 hono: - specifier: 4.6.7 - version: 4.6.7 + specifier: 4.6.8 + version: 4.6.8 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3423,8 +3423,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.7: - resolution: {integrity: sha512-wX4ZbOnzfNO61hUjuQbJ7OPGs1fWXXVVJ8VTPDb2Ls/x9HjCbVTm80Je6VTHMz5n5RGDtBgV9d9ZFZxBqx56ng==} + hono@4.6.8: + resolution: {integrity: sha512-f+2Ec9JAzabT61pglDiLJcF/DjiSefZkjCn9bzm1cYLGkD5ExJ3Jnv93ax9h0bn7UPLHF81KktoyjdQfWI2n1Q==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6751,20 +6751,20 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.3(hono@4.6.7)': + '@hono/node-server@1.13.3(hono@4.6.8)': dependencies: - hono: 4.6.7 + hono: 4.6.8 - '@hono/zod-openapi@0.16.4(hono@4.6.7)(zod@3.23.8)': + '@hono/zod-openapi@0.16.4(hono@4.6.8)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.3.0(hono@4.6.7)(zod@3.23.8) - hono: 4.6.7 + '@hono/zod-validator': 0.3.0(hono@4.6.8)(zod@3.23.8) + hono: 4.6.8 zod: 3.23.8 - '@hono/zod-validator@0.3.0(hono@4.6.7)(zod@3.23.8)': + '@hono/zod-validator@0.3.0(hono@4.6.8)(zod@3.23.8)': dependencies: - hono: 4.6.7 + hono: 4.6.8 zod: 3.23.8 '@humanfs/core@0.19.1': {} @@ -7173,10 +7173,10 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.156(hono@4.6.7)': + '@scalar/hono-api-reference@0.5.156(hono@4.6.8)': dependencies: '@scalar/types': 0.0.17 - hono: 4.6.7 + hono: 4.6.8 '@scalar/openapi-types@0.1.4': {} @@ -9164,7 +9164,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.7: {} + hono@4.6.8: {} hookable@5.5.3: {} From 371781adc4f1b5b44655efde9f4cf39decf6e4f9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 06:56:56 -0700 Subject: [PATCH 321/740] chore(deps): bump tldts from 6.1.56 to 6.1.57 (#17350) * chore(deps): bump tldts from 6.1.56 to 6.1.57 Bumps [tldts](https://github.com/remusao/tldts) from 6.1.56 to 6.1.57. - [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.56...v6.1.57) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 4e965dd7d30621e..dcc0ac325660969 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "telegram": "2.26.2", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.56", + "tldts": "6.1.57", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fbd6051dd3d4988..193d19126cdafa6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -228,8 +228,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.56 - version: 6.1.56 + specifier: 6.1.57 + version: 6.1.57 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5272,8 +5272,8 @@ packages: tldts-core@6.1.57: resolution: {integrity: sha512-lXnRhuQpx3zU9EONF9F7HfcRLvN1uRYUBIiKL+C/gehC/77XTU+Jye6ui86GA3rU6FjlJ0triD1Tkjt2F/2lEg==} - tldts@6.1.56: - resolution: {integrity: sha512-2PT1oRZCxtsbLi5R2SQjE/v4vvgRggAtVcYj+3Rrcnu2nPZvu7m64+gDa/EsVSWd3QzEc0U0xN+rbEKsJC47kA==} + tldts@6.1.57: + resolution: {integrity: sha512-Oy7yDXK8meJl8vPMOldzA+MtueAJ5BrH4l4HXwZuj2AtfoQbLjmTJmjNWPUcAo+E/ibHn7QlqMS0BOcXJFJyHQ==} hasBin: true tmp@0.0.33: @@ -11212,7 +11212,7 @@ snapshots: tldts-core@6.1.57: {} - tldts@6.1.56: + tldts@6.1.57: dependencies: tldts-core: 6.1.57 @@ -11250,7 +11250,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.56 + tldts: 6.1.57 tr46@0.0.3: {} From 237a2a7d192d463291b4b6da2879d761e1ee78d0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:04:23 -0700 Subject: [PATCH 322/740] chore(deps-dev): bump @types/node from 22.8.1 to 22.8.2 (#17352) * chore(deps-dev): bump @types/node from 22.8.1 to 22.8.2 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.8.1 to 22.8.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-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 133 ++++++++++++++++++++++++++++++++++++------------- 2 files changed, 100 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index dcc0ac325660969..0e7beca04ef8224 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.8.1", + "@types/node": "22.8.2", "@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 193d19126cdafa6..941b99b2015c1f9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -325,8 +325,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.8.1 - version: 22.8.1 + specifier: 22.8.2 + version: 22.8.2 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -353,7 +353,7 @@ importers: version: 0.27.5 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.8.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.8.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.103 version: 0.37.103 @@ -419,10 +419,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.1)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.2)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.8.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.8.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1874,8 +1874,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.8.1': - resolution: {integrity: sha512-k6Gi8Yyo8EtrNtkHXutUu2corfDf9su95VYVP10aGYMMROM6SAItZi0w1XszA6RtWTHSVp5OeFof37w0IEqCQg==} + '@types/node@22.8.2': + resolution: {integrity: sha512-NzaRNFV+FZkvK/KLCsNdTvID0SThyrs5SHB6tsD/lajr22FGC73N2QeDPM2wHtVde8mgcXuSsHQkH5cX1pbPLw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -1947,6 +1947,10 @@ packages: resolution: {integrity: sha512-bma6sD1iViTt+y9MAwDlBdPTMCqoH/BNdcQk4rKhIZWv3eM0xHmzeSrPJA663PAqFqfpOmtdugycpr0E1mZDVA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.12.2': + resolution: {integrity: sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.12.1': resolution: {integrity: sha512-zJzrvbDVjIzVKV2TGHcjembEhws8RWXJhmqfO9hS2gRXBN0gDwGhRPEdJ6AZglzfJ+YA1q09EWpSLSXjBJpIMQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1960,6 +1964,10 @@ packages: resolution: {integrity: sha512-anMS4es5lxBe4UVcDXOkcDb3csnm5BvaNIbOFfvy/pJEohorsggdVB8MFbl5EZiEuBnZZ0ei1z7W5b6FdFiV1Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.12.2': + resolution: {integrity: sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.12.1': resolution: {integrity: sha512-k/o9khHOckPeDXilFTIPsP9iAYhhdMh3OsOL3i2072PNpFqhqzRHx472/0DeC8H/WZee3bZG0z2ddGRSPgeOKw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1969,16 +1977,35 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.12.2': + resolution: {integrity: sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@8.12.1': resolution: {integrity: sha512-sDv9yFHrhKe1WN8EYuzfhKCh/sFRupe9P+m/lZ5YgVvPoCUGHNN50IO4llSu7JAbftUM/QcCh+GeCortXPrBYQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.12.2': + resolution: {integrity: sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@8.12.1': resolution: {integrity: sha512-2RwdwnNGuOQKdGjuhujQHUqBZhEuodg2sLVPvOfWktvA9sOXOVqARjOyHSyhN2LiJGKxV6c8oOcmOtRcAnEeFw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.12.2': + resolution: {integrity: sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -6803,7 +6830,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.8.1 + '@types/node': 22.8.2 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7230,7 +7257,7 @@ snapshots: '@stylistic/eslint-plugin@2.9.0(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.12.1(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) eslint: 9.13.0 eslint-visitor-keys: 4.1.0 espree: 10.2.0 @@ -7277,12 +7304,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.2 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.8.1 + '@types/node': 22.8.2 '@types/html-to-text@9.0.4': {} @@ -7290,13 +7317,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.2 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.2 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7306,7 +7333,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.2 '@types/jsrsasign@10.5.13': {} @@ -7316,7 +7343,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.2 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7338,14 +7365,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.2 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.2 form-data: 4.0.1 - '@types/node@22.8.1': + '@types/node@22.8.2': dependencies: undici-types: 6.19.8 @@ -7359,7 +7386,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.8.1 + '@types/node': 22.8.2 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7373,7 +7400,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.8.1 + '@types/node': 22.8.2 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7397,7 +7424,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.2 optional: true '@typescript-eslint/eslint-plugin@8.12.1(@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': @@ -7436,6 +7463,11 @@ snapshots: '@typescript-eslint/types': 8.12.1 '@typescript-eslint/visitor-keys': 8.12.1 + '@typescript-eslint/scope-manager@8.12.2': + dependencies: + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/visitor-keys': 8.12.2 + '@typescript-eslint/type-utils@8.12.1(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.12.1(typescript@5.6.3) @@ -7450,6 +7482,8 @@ snapshots: '@typescript-eslint/types@8.12.1': {} + '@typescript-eslint/types@8.12.2': {} + '@typescript-eslint/typescript-estree@8.12.1(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.12.1 @@ -7465,6 +7499,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.12.2(typescript@5.6.3)': + dependencies: + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/visitor-keys': 8.12.2 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.12.1(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) @@ -7476,11 +7525,27 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.12.2(eslint@9.13.0)(typescript@5.6.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) + eslint: 9.13.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@8.12.1': dependencies: '@typescript-eslint/types': 8.12.1 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.12.2': + dependencies: + '@typescript-eslint/types': 8.12.2 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.10': @@ -7506,7 +7571,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.8.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.8.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7520,7 +7585,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.8.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.8.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10475,7 +10540,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.8.1 + '@types/node': 22.8.2 long: 5.2.3 proxy-agent@6.4.0: @@ -11443,13 +11508,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.8.1): + vite-node@2.0.5(@types/node@22.8.2): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.8.1) + vite: 5.4.10(@types/node@22.8.2) transitivePeerDependencies: - '@types/node' - less @@ -11461,27 +11526,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.1)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.2)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.10(@types/node@22.8.1) + vite: 5.4.10(@types/node@22.8.2) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.8.1): + vite@5.4.10(@types/node@22.8.2): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.2 optionalDependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.2 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.8.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.8.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11499,11 +11564,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.8.1) - vite-node: 2.0.5(@types/node@22.8.1) + vite: 5.4.10(@types/node@22.8.2) + vite-node: 2.0.5(@types/node@22.8.2) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.8.1 + '@types/node': 22.8.2 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From acb42449ffc0cc9321a17e2f12580296491230bb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 07:31:35 -0700 Subject: [PATCH 323/740] chore(deps): bump @scalar/hono-api-reference from 0.5.156 to 0.5.157 (#17354) * chore(deps): bump @scalar/hono-api-reference from 0.5.156 to 0.5.157 Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.156 to 0.5.157. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 0e7beca04ef8224..589ffec734b9d4f 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.23", - "@scalar/hono-api-reference": "0.5.156", + "@scalar/hono-api-reference": "0.5.157", "@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 941b99b2015c1f9..ed6d7aebe4e1507 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: 0.0.23 version: 0.0.23 '@scalar/hono-api-reference': - specifier: 0.5.156 - version: 0.5.156(hono@4.6.8) + specifier: 0.5.157 + version: 0.5.157(hono@4.6.8) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1706,8 +1706,8 @@ packages: '@rss3/sdk@0.0.23': resolution: {integrity: sha512-1cF1AqLU0k6dMwqQ5Fch3rOAbh4UXJ4UZLtOwzp/RWyGoCvu3lUOUIdJF41omunuH/JJSP2z6rJTPj4S6a60eg==} - '@scalar/hono-api-reference@0.5.156': - resolution: {integrity: sha512-/byPVH0rs40qxuOInnikDeq+19wQZ0NIq0K3WJMNBeZvr0lpGqsBf4frj0soon8UAVq/uZnOMcK6jwcC50a0bg==} + '@scalar/hono-api-reference@0.5.157': + resolution: {integrity: sha512-Y/w4YqNIq5+DscERF54MPF97rZSs19wkFfvgM6O/Aw8rJLFjWY0Jlom2kylRXrTVinkaql7KWjr720yvp0oMiw==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -7200,7 +7200,7 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.156(hono@4.6.8)': + '@scalar/hono-api-reference@0.5.157(hono@4.6.8)': dependencies: '@scalar/types': 0.0.17 hono: 4.6.8 From 8adffd26e8795077a9d8bb11c8fa89d455ff23e6 Mon Sep 17 00:00:00 2001 From: nuomi1 <nuomi1@qq.com> Date: Tue, 29 Oct 2024 22:58:05 +0800 Subject: [PATCH 324/740] feat(route/bilibili): refactor description with art-template (#16956) * feat(route/bilibili): refactor bangumi with ofetch and art-template * feat(route/bilibili): refactor bilibili-recommend with art-template * feat(route/bilibili): refactor coin with art-template * feat(route/bilibili): refactor fav with art-template * feat(route/bilibili): refactor like with art-template * feat(route/bilibili): refactor page with art-template * feat(route/bilibili): refactor partion-ranking with art-template * feat(route/bilibili): refactor partion with art-template * feat(route/bilibili): refactor popular with art-template * feat(route/bilibili): refactor ranking with art-template * feat(route/bilibili): refactor user-channel with art-template * feat(route/bilibili): refactor user-collection with art-template * feat(route/bilibili): refactor user-fav with art-template * feat(route/bilibili): refactor weekly-recommend with art-template * feat(route/bilibili): refactor dynamic with art-template * feat(route/bilibili): refactor followings-dynamic with art-template * feat(route/bilibili): refactor followings-video with art-template * feat(route/bilibili): refactor video-all with art-template * feat(route/bilibili): refactor video with art-template * feat(route/bilibili): refactor vsearch with art-template * feat(route/bilibili): refactor watchlater with art-template * feat(route/bilibili): remove iframe * fix(route/bilibili): __dirname * docs(route/bilibili): add documents. * feat(route/bilibili): use https cover * style(bilibili): camelCase * style(bilibili): keep ordering * fix(bilibili): use html5mobileplayer.html --------- --- lib/routes/bilibili/bangumi.ts | 88 ++++++------- lib/routes/bilibili/bilibili-recommend.ts | 8 +- lib/routes/bilibili/coin.ts | 8 +- lib/routes/bilibili/dynamic.ts | 28 ++--- lib/routes/bilibili/fav.ts | 8 +- lib/routes/bilibili/followings-dynamic.ts | 28 ++++- lib/routes/bilibili/followings-video.ts | 8 +- lib/routes/bilibili/like.ts | 8 +- lib/routes/bilibili/page.ts | 9 +- lib/routes/bilibili/partion-ranking.ts | 8 +- lib/routes/bilibili/partion.ts | 8 +- lib/routes/bilibili/popular.ts | 10 +- lib/routes/bilibili/ranking.ts | 10 +- lib/routes/bilibili/templates/description.art | 12 ++ lib/routes/bilibili/types.ts | 52 ++++++++ lib/routes/bilibili/user-channel.ts | 27 ++-- lib/routes/bilibili/user-collection.ts | 28 ++--- lib/routes/bilibili/user-fav.ts | 8 +- lib/routes/bilibili/utils.ts | 118 ++++++++++++++++-- lib/routes/bilibili/video-all.ts | 11 +- lib/routes/bilibili/video.ts | 8 +- lib/routes/bilibili/vsearch.ts | 26 +++- lib/routes/bilibili/watchlater.ts | 8 +- lib/routes/bilibili/weekly-recommend.ts | 13 +- 24 files changed, 367 insertions(+), 173 deletions(-) create mode 100644 lib/routes/bilibili/templates/description.art create mode 100644 lib/routes/bilibili/types.ts diff --git a/lib/routes/bilibili/bangumi.ts b/lib/routes/bilibili/bangumi.ts index 7ff2406902b1648..55deb2896354690 100644 --- a/lib/routes/bilibili/bangumi.ts +++ b/lib/routes/bilibili/bangumi.ts @@ -1,66 +1,68 @@ -import { Route, ViewType } from '@/types'; -import got from '@/utils/got'; +import { Data, DataItem, Route, ViewType } from '@/types'; +import cache from '@/utils/cache'; +import { EpisodeResult } from './types'; +import utils from './utils'; export const route: Route = { - path: '/bangumi/media/:mediaid', + path: '/bangumi/media/:mediaid/:embed?', name: '番剧', parameters: { mediaid: '番剧媒体 id, 番剧主页 URL 中获取', + embed: '默认为开启内嵌视频, 任意值为关闭', }, example: '/bilibili/bangumi/media/9192', categories: ['social-media', 'popular'], view: ViewType.Videos, - maintainers: ['DIYgod'], + maintainers: ['DIYgod', 'nuomi1'], handler, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportRadar: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, }; async function handler(ctx) { - let seasonid = ctx.req.param('seasonid'); - const mediaid = ctx.req.param('mediaid'); + const mediaId = ctx.req.param('mediaid'); + const embed = !ctx.req.param('embed'); - let mediaData; - if (mediaid) { - const response = await got({ - method: 'get', - url: `https://www.bilibili.com/bangumi/media/md${mediaid}`, - }); - mediaData = JSON.parse(response.data.match(/window\.__INITIAL_STATE__=([\S\s]+);\(function\(\)/)[1]) || {}; - seasonid = mediaData.mediaInfo.season_id; - } - const { data } = await got.get(`https://api.bilibili.com/pgc/web/season/section?season_id=${seasonid}`); + const mediaData = await utils.getBangumi(mediaId, cache); + const seasonId = String(mediaData.season_id); + const seasonData = await utils.getBangumiItems(seasonId, cache); + + const episodes: DataItem[] = []; + + const getEpisode = (item: EpisodeResult, title: string) => + ({ + title, + description: utils.renderOGVDescription(embed, item.cover, item.long_title, seasonId, String(item.id)), + link: item.share_url, + image: item.cover.replace('http://', 'https://'), + language: 'zh-cn', + }) as DataItem; - let episodes = []; - if (data.result.main_section && data.result.main_section.episodes) { - episodes = [ - ...episodes, - ...data.result.main_section.episodes.map((item) => ({ - title: `第${item.title}话 ${item.long_title}`, - description: `<img src="${item.cover}">`, - link: `https://www.bilibili.com/bangumi/play/ep${item.id}`, - })), - ]; + for (const item of seasonData.main_section.episodes) { + const episode = getEpisode(item, `第${item.title}话 ${item.long_title}`); + episodes.push(episode); } - if (data.result.section) { - for (const section of data.result.section) { - if (section.episodes) { - episodes = [ - ...episodes, - ...section.episodes.map((item) => ({ - title: `${item.title} ${item.long_title}`, - description: `<img src="${item.cover}">`, - link: `https://www.bilibili.com/bangumi/play/ep${item.id}`, - })), - ]; - } + for (const section of seasonData.section) { + for (const item of section.episodes) { + const episode = getEpisode(item, `${item.title} ${item.long_title}`); + episodes.push(episode); } } return { - title: mediaData?.mediaInfo.title, - link: `https://www.bilibili.com/bangumi/media/md${mediaData?.mediaInfo.media_id}/`, - image: mediaData?.mediaInfo.cover, - description: mediaData?.mediaInfo.evaluate, + title: mediaData.title, + description: mediaData.evaluate, + link: mediaData.share_url, item: episodes, - }; + image: mediaData.cover.replace('http://', 'https://'), + language: 'zh-cn', + } as Data; } diff --git a/lib/routes/bilibili/bilibili-recommend.ts b/lib/routes/bilibili/bilibili-recommend.ts index 0943741fc08a9ca..c6c93f0bfcd9406 100644 --- a/lib/routes/bilibili/bilibili-recommend.ts +++ b/lib/routes/bilibili/bilibili-recommend.ts @@ -3,10 +3,10 @@ import got from '@/utils/got'; import utils from './utils'; export const route: Route = { - path: '/precious/:disableEmbed?', + path: '/precious/:embed?', categories: ['social-media'], example: '/bilibili/precious', - parameters: { disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: false, requirePuppeteer: false, @@ -21,7 +21,7 @@ export const route: Route = { }; async function handler(ctx) { - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const response = await got({ method: 'get', url: 'https://api.bilibili.com/x/web-interface/popular/precious', @@ -35,7 +35,7 @@ async function handler(ctx) { link: 'https://www.bilibili.com/v/popular/history', item: data.map((item) => ({ title: item.title, - description: `${item.desc || item.title}${disableEmbed ? '' : `<br><br>${utils.iframe(item.aid, null, item.bvid)}`}<br><img src="${item.pic}">`, + description: utils.renderUGCDescription(embed, item.pic, item.desc || item.title, item.aid, undefined, item.bvid), link: item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, })), }; diff --git a/lib/routes/bilibili/coin.ts b/lib/routes/bilibili/coin.ts index 1c4c77a9b78190d..e2a19b82b092f4f 100644 --- a/lib/routes/bilibili/coin.ts +++ b/lib/routes/bilibili/coin.ts @@ -5,10 +5,10 @@ import utils from './utils'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/user/coin/:uid/:disableEmbed?', + path: '/user/coin/:uid/:embed?', categories: ['social-media'], example: '/bilibili/user/coin/208259', - parameters: { uid: '用户 id, 可在 UP 主主页中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { uid: '用户 id, 可在 UP 主主页中找到', embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: false, requirePuppeteer: false, @@ -30,7 +30,7 @@ export const route: Route = { async function handler(ctx) { const uid = ctx.req.param('uid'); - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const name = await cache.getUsernameFromUID(uid); @@ -51,7 +51,7 @@ async function handler(ctx) { description: `${name} 的 bilibili 投币视频`, item: data.map((item) => ({ title: item.title, - description: `${item.desc}${disableEmbed ? '' : `<br><br>${utils.iframe(item.aid)}`}<br><img src='${item.pic}'>`, + description: utils.renderUGCDescription(embed, item.pic, item.desc, item.aid, undefined, item.bvid), pubDate: parseDate(item.time * 1000), link: item.time > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: item.owner.name, diff --git a/lib/routes/bilibili/dynamic.ts b/lib/routes/bilibili/dynamic.ts index 407b8b4eef8b6b4..194d0857b980313 100644 --- a/lib/routes/bilibili/dynamic.ts +++ b/lib/routes/bilibili/dynamic.ts @@ -16,15 +16,15 @@ export const route: Route = { parameters: { uid: '用户 id, 可在 UP 主主页中找到', routeParams: ` -| 键 | 含义 | 接受的值 | 默认值 | -| ------------ | --------------------------------- | -------------- | ------ | -| showEmoji | 显示或隐藏表情图片 | 0/1/true/false | false | -| disableEmbed | 关闭内嵌视频 | 0/1/true/false | false | -| useAvid | 视频链接使用 AV 号 (默认为 BV 号) | 0/1/true/false | false | -| directLink | 使用内容直链 | 0/1/true/false | false | -| hideGoods | 隐藏带货动态 | 0/1/true/false | false | +| 键 | 含义 | 接受的值 | 默认值 | +| ---------- | --------------------------------- | -------------- | ------ | +| showEmoji | 显示或隐藏表情图片 | 0/1/true/false | false | +| embed | 默认开启内嵌视频 | 任意值 | | +| useAvid | 视频链接使用 AV 号 (默认为 BV 号) | 0/1/true/false | false | +| directLink | 使用内容直链 | 0/1/true/false | false | +| hideGoods | 隐藏带货动态 | 0/1/true/false | false | -用例:\`/bilibili/user/dynamic/2267573/showEmoji=1&disableEmbed=1&useAvid=1\``, +用例:\`/bilibili/user/dynamic/2267573/showEmoji=1&embed=0&useAvid=1\``, }, features: { requireConfig: [ @@ -108,16 +108,16 @@ const getDes = (data: Modules): string => { const getOriginTitle = (data?: Modules) => data && getTitle(data); const getOriginDes = (data?: Modules) => data && getDes(data); const getOriginName = (data?: Modules) => data?.module_author?.name; -const getIframe = (data?: Modules, disableEmbed: boolean = false) => { - if (disableEmbed) { +const getIframe = (data?: Modules, embed: boolean = true) => { + if (!embed) { return ''; } const aid = data?.module_dynamic?.major?.archive?.aid; const bvid = data?.module_dynamic?.major?.archive?.bvid; - if (!aid) { + if (aid === undefined && bvid === undefined) { return ''; } - return utils.iframe(aid, null, bvid); + return utils.renderUGCDescription(embed, '', '', aid, undefined, bvid); }; const getImgs = (data?: Modules) => { @@ -226,7 +226,7 @@ async function handler(ctx) { const uid = ctx.req.param('uid'); const routeParams = Object.fromEntries(new URLSearchParams(ctx.req.param('routeParams'))); const showEmoji = fallback(undefined, queryToBoolean(routeParams.showEmoji), false); - const disableEmbed = fallback(undefined, queryToBoolean(routeParams.disableEmbed), false); + const embed = !ctx.req.param('embed'); const displayArticle = ctx.req.query('mode') === 'fulltext'; const useAvid = fallback(undefined, queryToBoolean(routeParams.useAvid), false); const directLink = fallback(undefined, queryToBoolean(routeParams.directLink), false); @@ -356,7 +356,7 @@ async function handler(ctx) { description = description.replaceAll('\r\n', '<br>').replaceAll('\n', '<br>'); originDescription = originDescription.replaceAll('\r\n', '<br>').replaceAll('\n', '<br>'); - const descriptions = [description, originDescription, urlText, originUrlText, getIframe(data, disableEmbed), getIframe(origin, disableEmbed), getImgs(data), getImgs(origin)] + const descriptions = [description, originDescription, urlText, originUrlText, getIframe(data, embed), getIframe(origin, embed), getImgs(data), getImgs(origin)] .filter(Boolean) .map((e) => e?.trim()) .join('<br>'); diff --git a/lib/routes/bilibili/fav.ts b/lib/routes/bilibili/fav.ts index 0316ee172efaae6..81ed06aaf85ed14 100644 --- a/lib/routes/bilibili/fav.ts +++ b/lib/routes/bilibili/fav.ts @@ -5,10 +5,10 @@ import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; export const route: Route = { - path: '/fav/:uid/:fid/:disableEmbed?', + path: '/fav/:uid/:fid/:embed?', categories: ['social-media'], example: '/bilibili/fav/756508/50948568', - parameters: { uid: '用户 id, 可在 UP 主主页中找到', fid: '收藏夹 ID, 可在收藏夹的 URL 中找到, 默认收藏夹建议使用 UP 主默认收藏夹功能', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { uid: '用户 id, 可在 UP 主主页中找到', fid: '收藏夹 ID, 可在收藏夹的 URL 中找到, 默认收藏夹建议使用 UP 主默认收藏夹功能', embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: false, requirePuppeteer: false, @@ -25,7 +25,7 @@ export const route: Route = { async function handler(ctx) { const fid = ctx.req.param('fid'); const uid = ctx.req.param('uid'); - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const response = await got({ url: `https://api.bilibili.com/x/v3/fav/resource/list?media_id=${fid}&ps=20`, @@ -51,7 +51,7 @@ async function handler(ctx) { data.medias && data.medias.map((item) => ({ title: item.title, - description: `${item.intro}${disableEmbed ? '' : `<br><br>${utils.iframe(item.id)}`}<br><img src='${item.cover}'>`, + description: utils.renderUGCDescription(embed, item.cover, item.intro, item.id, undefined, item.bvid), pubDate: parseDate(item.fav_time * 1000), link: item.fav_time > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.id}`, author: item.upper.name, diff --git a/lib/routes/bilibili/followings-dynamic.ts b/lib/routes/bilibili/followings-dynamic.ts index 0fe07e970a793d4..f1a22c56b5a37c7 100644 --- a/lib/routes/bilibili/followings-dynamic.ts +++ b/lib/routes/bilibili/followings-dynamic.ts @@ -12,7 +12,19 @@ export const route: Route = { path: '/followings/dynamic/:uid/:routeParams?', categories: ['social-media'], example: '/bilibili/followings/dynamic/109937383', - parameters: { uid: '用户 id', routeParams: '额外参数;请参阅 [#UP 主动态](#bilibili-up-zhu-dong-tai) 的说明和表格' }, + parameters: { + uid: '用户 id, 可在 UP 主主页中找到', + routeParams: ` +| 键 | 含义 | 接受的值 | 默认值 | +| ---------- | --------------------------------- | -------------- | ------ | +| showEmoji | 显示或隐藏表情图片 | 0/1/true/false | false | +| embed | 默认开启内嵌视频 | 任意值 | | +| useAvid | 视频链接使用 AV 号 (默认为 BV 号) | 0/1/true/false | false | +| directLink | 使用内容直链 | 0/1/true/false | false | +| hideGoods | 隐藏带货动态 | 0/1/true/false | false | + +用例:\`/bilibili/followings/dynamic/2267573/showEmoji=1&embed=0&useAvid=1\``, + }, features: { requireConfig: [ { @@ -43,7 +55,7 @@ async function handler(ctx) { const routeParams = querystring.parse(ctx.req.param('routeParams')); const showEmoji = fallback(undefined, queryToBoolean(routeParams.showEmoji), false); - const disableEmbed = fallback(undefined, queryToBoolean(routeParams.disableEmbed), false); + const embed = !ctx.req.param('embed'); const displayArticle = fallback(undefined, queryToBoolean(routeParams.displayArticle), false); const name = await cache.getUsernameFromUID(uid); @@ -74,7 +86,17 @@ async function handler(ctx) { const getOriginDes = (data) => (data && (data.apiSeasonInfo && data.apiSeasonInfo.title && `//转发自: ${data.apiSeasonInfo.title}`) + (data.index_title && `<br>${data.index_title}`)) || ''; const getOriginName = (data) => data.uname || (data.author && data.author.name) || (data.upper && data.upper.name) || (data.user && (data.user.uname || data.user.name)) || (data.owner && data.owner.name) || ''; const getOriginTitle = (data) => (data.title ? `${data.title}<br>` : ''); - const getIframe = (data) => (!disableEmbed && data && data.aid ? `<br><br>${utils.iframe(data.aid)}<br>` : ''); + const getIframe = (data) => { + if (!embed) { + return ''; + } + const aid = data?.aid; + const bvid = data?.bvid; + if (aid === undefined && bvid === undefined) { + return ''; + } + return utils.renderUGCDescription(embed, '', '', aid, undefined, bvid); + }; const getImgs = (data) => { let imgs = ''; // 动态图片 diff --git a/lib/routes/bilibili/followings-video.ts b/lib/routes/bilibili/followings-video.ts index 0707a2402387233..e215af645812ae6 100644 --- a/lib/routes/bilibili/followings-video.ts +++ b/lib/routes/bilibili/followings-video.ts @@ -7,10 +7,10 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; import logger from '@/utils/logger'; export const route: Route = { - path: '/followings/video/:uid/:disableEmbed?', + path: '/followings/video/:uid/:embed?', categories: ['social-media'], example: '/bilibili/followings/video/2267573', - parameters: { uid: '用户 id', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { uid: '用户 id', embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: [ { @@ -38,7 +38,7 @@ export const route: Route = { async function handler(ctx) { const uid = String(ctx.req.param('uid')); - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const name = await cache.getUsernameFromUID(uid); const cookie = config.bilibili.cookies[uid]; @@ -69,7 +69,7 @@ async function handler(ctx) { return { title: card_data.title, - description: `${card_data.desc}${disableEmbed ? '' : `<br><br>${utils.iframe(card_data.aid)}`}<br><img src="${card_data.pic}">`, + description: utils.renderUGCDescription(embed, card_data.pic, card_data.desc, card_data.aid, undefined, card_data.bvid), pubDate: new Date(card_data.pubdate * 1000).toUTCString(), link: card_data.pubdate > utils.bvidTime && card_data.bvid ? `https://www.bilibili.com/video/${card_data.bvid}` : `https://www.bilibili.com/video/av${card_data.aid}`, author: card.desc.user_profile.info.uname, diff --git a/lib/routes/bilibili/like.ts b/lib/routes/bilibili/like.ts index 4ad27daaa3c1497..3c92b4b8459179e 100644 --- a/lib/routes/bilibili/like.ts +++ b/lib/routes/bilibili/like.ts @@ -5,10 +5,10 @@ import utils from './utils'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/user/like/:uid/:disableEmbed?', + path: '/user/like/:uid/:embed?', categories: ['social-media'], example: '/bilibili/user/like/208259', - parameters: { uid: '用户 id, 可在 UP 主主页中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { uid: '用户 id, 可在 UP 主主页中找到', embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: false, requirePuppeteer: false, @@ -30,7 +30,7 @@ export const route: Route = { async function handler(ctx) { const uid = ctx.req.param('uid'); - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const name = await cache.getUsernameFromUID(uid); @@ -51,7 +51,7 @@ async function handler(ctx) { description: `${name} 的 bilibili 点赞视频`, item: data.list.map((item) => ({ title: item.title, - description: `${item.desc}${disableEmbed ? '' : `<br><br>${utils.iframe(item.aid)}`}<br><img src='${item.pic}'>`, + description: utils.renderUGCDescription(embed, item.pic, item.desc, item.aid, undefined, item.bvid), pubDate: parseDate(item.pubdate * 1000), link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: item.owner.name, diff --git a/lib/routes/bilibili/page.ts b/lib/routes/bilibili/page.ts index 39b6061f905c37e..81b9354411d6a58 100644 --- a/lib/routes/bilibili/page.ts +++ b/lib/routes/bilibili/page.ts @@ -3,10 +3,10 @@ import got from '@/utils/got'; import utils from './utils'; export const route: Route = { - path: '/video/page/:bvid/:disableEmbed?', + path: '/video/page/:bvid/:embed?', categories: ['social-media'], example: '/bilibili/video/page/BV1i7411M7N9', - parameters: { bvid: '可在视频页 URL 中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { bvid: '可在视频页 URL 中找到', embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: false, requirePuppeteer: false, @@ -27,7 +27,7 @@ async function handler(ctx) { aid = bvid; bvid = null; } - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const link = `https://www.bilibili.com/video/${bvid || `av${aid}`}`; const response = await got({ method: 'get', @@ -37,6 +37,7 @@ async function handler(ctx) { }, }); + const respdata = response.data.data; const { title: name, pages: data } = response.data.data; return { @@ -48,7 +49,7 @@ async function handler(ctx) { .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 10) .map((item) => ({ title: item.part, - description: `${item.part} - ${name}${disableEmbed ? '' : `<br><br>${utils.iframe(aid, item.page, bvid)}`}`, + description: utils.renderUGCDescription(embed, respdata.pic, `${item.part} - ${name}`, respdata.aid, item.cid, respdata.bvid), link: `${link}?p=${item.page}`, })), }; diff --git a/lib/routes/bilibili/partion-ranking.ts b/lib/routes/bilibili/partion-ranking.ts index 8e422816081684b..2ae4f3fc7b2254e 100644 --- a/lib/routes/bilibili/partion-ranking.ts +++ b/lib/routes/bilibili/partion-ranking.ts @@ -16,10 +16,10 @@ function formatDate(now) { } export const route: Route = { - path: '/partion/ranking/:tid/:days?/:disableEmbed?', + path: '/partion/ranking/:tid/:days?/:embed?', categories: ['social-media'], example: '/bilibili/partion/ranking/171/3', - parameters: { tid: '分区 id, 见上方表格', days: '缺省为 7, 指最近多少天内的热度排序', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { tid: '分区 id, 见上方表格', days: '缺省为 7, 指最近多少天内的热度排序', embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: false, requirePuppeteer: false, @@ -36,7 +36,7 @@ export const route: Route = { async function handler(ctx) { const tid = ctx.req.param('tid'); const days = ctx.req.param('days') ?? 7; - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const responseApi = `https://api.bilibili.com/x/web-interface/newlist?ps=15&rid=${tid}&_=${Date.now()}`; @@ -59,7 +59,7 @@ async function handler(ctx) { for (let item of hotlist) { item = { title: item.title, - description: `${item.description}${disableEmbed ? '' : `<br><br>${utils.iframe(item.id)}`}<br><img src="https:${item.pic}"><br/>Tags:${item.tag}`, + description: utils.renderUGCDescription(embed, item.pic, `${item.description} - ${item.tag}`, item.id, undefined, item.bvid), pubDate: new Date(item.pubdate).toUTCString(), link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.id}`, author: item.author, diff --git a/lib/routes/bilibili/partion.ts b/lib/routes/bilibili/partion.ts index 246083928cefb32..ccb37d8310ffccf 100644 --- a/lib/routes/bilibili/partion.ts +++ b/lib/routes/bilibili/partion.ts @@ -3,10 +3,10 @@ import got from '@/utils/got'; import utils from './utils'; export const route: Route = { - path: '/partion/:tid/:disableEmbed?', + path: '/partion/:tid/:embed?', categories: ['social-media'], example: '/bilibili/partion/33', - parameters: { tid: '分区 id', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { tid: '分区 id', embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: false, requirePuppeteer: false, @@ -135,7 +135,7 @@ export const route: Route = { async function handler(ctx) { const tid = ctx.req.param('tid'); - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const response = await got({ method: 'get', @@ -159,7 +159,7 @@ async function handler(ctx) { list && list.map((item) => ({ title: item.title, - description: `${item.desc}${disableEmbed ? '' : `<br><br>${utils.iframe(item.aid)}`}<br><img src="${item.pic}">`, + description: utils.renderUGCDescription(embed, item.pic, item.desc, item.aid, undefined, item.bvid), pubDate: new Date(item.pubdate * 1000).toUTCString(), link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: item.owner.name, diff --git a/lib/routes/bilibili/popular.ts b/lib/routes/bilibili/popular.ts index 3206d6242b62818..cc8df1a43169758 100644 --- a/lib/routes/bilibili/popular.ts +++ b/lib/routes/bilibili/popular.ts @@ -3,10 +3,12 @@ import got from '@/utils/got'; import utils from './utils'; export const route: Route = { - path: '/popular/all', + path: '/popular/all/:embed?', categories: ['social-media'], example: '/bilibili/popular/all', - parameters: {}, + parameters: { + embed: '默认为开启内嵌视频, 任意值为关闭', + }, features: { requireConfig: false, requirePuppeteer: false, @@ -21,7 +23,7 @@ export const route: Route = { }; async function handler(ctx) { - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const response = await got({ method: 'get', url: `https://api.bilibili.com/x/web-interface/popular`, @@ -39,7 +41,7 @@ async function handler(ctx) { list && list.map((item) => ({ title: item.title, - description: `${item.desc}${disableEmbed ? '' : `<br><br>${utils.iframe(item.aid)}`}<br><img src="${item.pic}">`, + description: utils.renderUGCDescription(embed, item.pic, item.desc, item.aid, undefined, item.bvid), pubDate: new Date(item.pubdate * 1000).toUTCString(), link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: item.owner.name, diff --git a/lib/routes/bilibili/ranking.ts b/lib/routes/bilibili/ranking.ts index 59d316cb954bcce..89f4dd612a54c59 100644 --- a/lib/routes/bilibili/ranking.ts +++ b/lib/routes/bilibili/ranking.ts @@ -3,7 +3,7 @@ import got from '@/utils/got'; import utils from './utils'; export const route: Route = { - path: '/ranking/:rid?/:day?/:arc_type?/:disableEmbed?', + path: '/ranking/:rid?/:day?/:arc_type?/:embed?', name: '排行榜', maintainers: ['DIYgod'], categories: ['social-media', 'popular'], @@ -104,9 +104,7 @@ export const route: Route = { }, ], }, - disableEmbed: { - description: '默认为开启内嵌视频, 任意值为关闭', - }, + embed: '默认为开启内嵌视频, 任意值为关闭', }, handler, }; @@ -115,7 +113,7 @@ async function handler(ctx) { const rid = ctx.req.param('rid') || '0'; const day = ctx.req.param('day') || '3'; const arc_type = ctx.req.param('arc_type') || '1'; - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const arc_type1 = arc_type === '0' ? '全部投稿' : '近期投稿'; const rid_1 = ['0', '1', '168', '3', '129', '4', '36', '188', '160', '119', '155', '5', '181']; const rid_2 = ['全站', '动画', '国创相关', '音乐', '舞蹈', '游戏', '科技', '数码', '生活', '鬼畜', '时尚', '娱乐', '影视']; @@ -144,7 +142,7 @@ async function handler(ctx) { link: `https://www.bilibili.com/ranking/all/${rid}/0/${day}`, item: list.map((item) => ({ title: item.title, - description: `${item.description || item.title}${disableEmbed ? '' : `<br><br>${utils.iframe(item.aid, null, item.bvid)}`}<br><img src="${item.pic}">`, + description: utils.renderUGCDescription(embed, item.pic, item.description || item.title, item.aid, undefined, item.bvid), pubDate: item.create && new Date(item.create).toUTCString(), author: item.author, link: !item.create || (new Date(item.create) / 1000 > utils.bvidTime && item.bvid) ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, diff --git a/lib/routes/bilibili/templates/description.art b/lib/routes/bilibili/templates/description.art new file mode 100644 index 000000000000000..65e2261cfd8687f --- /dev/null +++ b/lib/routes/bilibili/templates/description.art @@ -0,0 +1,12 @@ +{{ if embed }} +{{ if ugc }} +<iframe width="640" height="360" src="https://www.bilibili.com/blackboard/html5mobileplayer.html?aid={{ aid }}&cid={{ cid }}&bvid={{ bvid }}" frameborder="0" allowfullscreen></iframe> +{{ /if }} +{{ if ogv }} +<iframe width="640" height="360" src="https://www.bilibili.com/blackboard/html5mobileplayer.html?seasonId={{ seasonId }}&episodeId={{ episodeId }}" frameborder="0" allowfullscreen></iframe> +{{ /if }} +<br> +{{ /if }} +<img src="{{ img }}"> +<br> +{{@ description }} diff --git a/lib/routes/bilibili/types.ts b/lib/routes/bilibili/types.ts new file mode 100644 index 000000000000000..bc53df24f2cf076 --- /dev/null +++ b/lib/routes/bilibili/types.ts @@ -0,0 +1,52 @@ +export interface ResultResponse<Result> { + result: Result; +} + +/** + * 番剧信息 + * + * @interface MediaResult + * + * @property {string} cover - 封面。 + * @property {string} evaluate - 摘要。 + * @property {number} media_id - 媒体 ID。 + * @property {number} season_id - 季度 ID。 + * @property {string} share_url - 分享 URL。此属性是注入的。 + * @property {string} title - 标题。 + */ +export interface MediaResult { + cover: string; + evaluate: string; + media_id: number; + season_id: number; + share_url: string; // injected + title: string; +} + +export interface SeasonResult { + main_section: SectionResult; + section: SectionResult[]; +} + +export interface SectionResult { + episodes: EpisodeResult[]; +} + +/** + * 番剧剧集信息 + * + * @interface EpisodeResult + * + * @property {string} cover - 封面。 + * @property {number} id - 剧集 ID。 + * @property {string} long_title - 完整标题。 + * @property {string} share_url - 分享 URL。 + * @property {string} title - 短标题。 + */ +export interface EpisodeResult { + cover: string; + id: number; + long_title: string; + share_url: string; + title: string; +} diff --git a/lib/routes/bilibili/user-channel.ts b/lib/routes/bilibili/user-channel.ts index db02b81b44e07bc..b0942b4358bf22b 100644 --- a/lib/routes/bilibili/user-channel.ts +++ b/lib/routes/bilibili/user-channel.ts @@ -10,10 +10,10 @@ const notFoundData = { }; export const route: Route = { - path: '/user/channel/:uid/:sid/:disableEmbed?', + path: '/user/channel/:uid/:sid/:embed?', categories: ['social-media'], example: '/bilibili/user/channel/2267573/396050', - parameters: { uid: '用户 id, 可在 UP 主主页中找到', sid: '频道 id, 可在频道的 URL 中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { uid: '用户 id, 可在 UP 主主页中找到', sid: '频道 id, 可在频道的 URL 中找到', embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: false, requirePuppeteer: false, @@ -30,7 +30,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 disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const limit = ctx.req.query('limit') ?? 25; const link = `https://space.bilibili.com/${uid}/channel/seriesdetail?sid=${sid}`; @@ -70,19 +70,12 @@ async function handler(ctx) { description: `${userName} 的 bilibili 频道`, logo: face, icon: face, - item: data.archives.map((item) => { - const descList = []; - if (!disableEmbed) { - descList.push(utils.iframe(item.aid)); - } - descList.push(`<img src="${item.pic}">`); - return { - title: item.title, - description: descList.join('<br>'), - pubDate: parseDate(item.pubdate, 'X'), - link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, - author: userName, - }; - }), + item: data.archives.map((item) => ({ + title: item.title, + description: utils.renderUGCDescription(embed, item.pic, '', item.aid, undefined, item.bvid), + pubDate: parseDate(item.pubdate, 'X'), + link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, + author: userName, + })), }; } diff --git a/lib/routes/bilibili/user-collection.ts b/lib/routes/bilibili/user-collection.ts index 0d46ade10fd6a1d..03a4976000dea58 100644 --- a/lib/routes/bilibili/user-collection.ts +++ b/lib/routes/bilibili/user-collection.ts @@ -3,20 +3,19 @@ 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 频道不存在', }; export const route: Route = { - path: '/user/collection/:uid/:sid/:disableEmbed?/:sortReverse?/:page?', + path: '/user/collection/:uid/:sid/:embed?/:sortReverse?/:page?', categories: ['social-media'], example: '/bilibili/user/collection/245645656/529166', parameters: { uid: '用户 id, 可在 UP 主主页中找到', sid: '合集 id, 可在合集页面的 URL 中找到', - disableEmbed: '空,0与false为开启内嵌视频, 其他任意值为关闭', + embed: '默认为开启内嵌视频, 任意值为关闭', sortReverse: '默认:默认排序 1:升序排序', page: '页码, 默认1', }, @@ -36,7 +35,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 disableEmbed = queryToBoolean(ctx.req.param('disableEmbed')); + const embed = !ctx.req.param('embed'); 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; @@ -62,19 +61,12 @@ async function handler(ctx) { description: `${userName} 的 bilibili 合集`, logo: face, icon: face, - item: data.archives.map((item) => { - const descList = []; - if (!disableEmbed) { - descList.push(utils.iframe(item.aid)); - } - descList.push(`<img src="${item.pic}">`); - return { - title: item.title, - description: descList.join('<br>'), - pubDate: parseDate(item.pubdate, 'X'), - link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, - author: userName, - }; - }), + item: data.archives.map((item) => ({ + title: item.title, + description: utils.renderUGCDescription(embed, item.pic, '', item.aid, undefined, item.bvid), + pubDate: parseDate(item.pubdate, 'X'), + link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, + author: userName, + })), }; } diff --git a/lib/routes/bilibili/user-fav.ts b/lib/routes/bilibili/user-fav.ts index 88db0bb10098970..04deeb6d0e3cfcd 100644 --- a/lib/routes/bilibili/user-fav.ts +++ b/lib/routes/bilibili/user-fav.ts @@ -5,10 +5,10 @@ import utils from './utils'; import { config } from '@/config'; export const route: Route = { - path: '/user/fav/:uid/:disableEmbed?', + path: '/user/fav/:uid/:embed?', categories: ['social-media'], example: '/bilibili/user/fav/2267573', - parameters: { uid: '用户 id, 可在 UP 主主页中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { uid: '用户 id, 可在 UP 主主页中找到', embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: false, requirePuppeteer: false, @@ -30,7 +30,7 @@ export const route: Route = { async function handler(ctx) { const uid = ctx.req.param('uid'); - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const name = await cache.getUsernameFromUID(uid); const response = await got({ @@ -53,7 +53,7 @@ async function handler(ctx) { data.data.archives && data.data.archives.map((item) => ({ title: item.title, - description: `${item.desc}${disableEmbed ? '' : `<br><br>${utils.iframe(item.aid)}`}<br><img src="${item.pic}">`, + description: utils.renderUGCDescription(embed, item.pic, item.desc, item.aid, undefined, item.bvid), pubDate: new Date(item.fav_at * 1000).toUTCString(), link: item.fav_at > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: item.owner.name, diff --git a/lib/routes/bilibili/utils.ts b/lib/routes/bilibili/utils.ts index 7a776e724ab1930..3189adccb4cab25 100644 --- a/lib/routes/bilibili/utils.ts +++ b/lib/routes/bilibili/utils.ts @@ -1,12 +1,13 @@ +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'; +import { art } from '@/utils/render'; import CryptoJS from 'crypto-js'; - -function iframe(aid: any, page?: any, bvid?: any) { - return `<iframe src="https://www.bilibili.com/blackboard/html5mobileplayer.html?${bvid ? `bvid=${bvid}` : `aid=${aid}`}${ - page ? `&page=${page}` : '' - }&high_quality=1&autoplay=0" width="650" height="477" scrolling="no" border="0" frameborder="no" framespacing="0" allowfullscreen="true"></iframe>`; -} +import path from 'node:path'; +import { MediaResult, ResultResponse, SeasonResult } from './types'; // a function randomHexStr(length) { @@ -197,8 +198,107 @@ function addDmVerifyInfoWithInter(params: string, dmImgList: string, dmImgInter: const bvidTime = 1_589_990_400; +/** + * 获取番剧信息并缓存 + * + * @param {string} id - 番剧 ID。 + * @param cache - 缓存 module。 + * @returns {Promise<MediaResult>} 番剧信息。 + */ +export const getBangumi = (id: string, cache): Promise<MediaResult> => + cache.tryGet( + `bilibili:getBangumi:${id}`, + async () => { + const res = await ofetch<ResultResponse<MediaResult>>('https://api.bilibili.com/pgc/view/web/media', { + query: { + media_id: id, + }, + }); + if (res.result.share_url === undefined) { + // reference: https://api.bilibili.com/pgc/review/user?media_id=${id} + res.result.share_url = `https://www.bilibili.com/bangumi/media/md${res.result.media_id}`; + } + return res.result; + }, + config.cache.routeExpire, + false + ) as Promise<MediaResult>; + +/** + * 获取番剧分集信息并缓存 + * + * @param {string} id - 番剧 ID。 + * @param cache - 缓存 module。 + * @returns {Promise<SeasonResult>} 番剧分集信息。 + */ +export const getBangumiItems = (id: string, cache): Promise<SeasonResult> => + cache.tryGet( + `bilibili:getBangumiItems:${id}`, + async () => { + const res = await ofetch<ResultResponse<SeasonResult>>('https://api.bilibili.com/pgc/web/season/section', { + query: { + season_id: id, + }, + }); + return res.result; + }, + config.cache.routeExpire, + false + ) as Promise<SeasonResult>; + +/** + * 使用模板渲染 UGC(用户生成内容)描述。 + * + * @param {boolean} embed - 是否嵌入视频。 + * @param {string} img - 要包含在描述中的图片 URL。 + * @param {string} description - UGC 的文本描述。 + * @param {string} [aid] - 可选。UGC 的 aid。 + * @param {string} [cid] - 可选。UGC 的 cid。 + * @param {string} [bvid] - 可选。UGC 的 bvid。 + * @returns {string} 渲染的 UGC 描述。 + * + * @see https://player.bilibili.com/ 获取更多信息。 + */ +export const renderUGCDescription = (embed: boolean, img: string, description: string, aid?: string, cid?: string, bvid?: string): string => { + // docs: https://player.bilibili.com/ + const rendered = art(path.join(__dirname, 'templates/description.art'), { + embed, + ugc: true, + aid, + cid, + bvid, + img: img.replace('http://', 'https://'), + description, + }); + return rendered; +}; + +/** + * 使用模板渲染 OGV(原创视频)描述。 + * + * @param {boolean} embed - 是否嵌入视频。 + * @param {string} img - 要包含在描述中的图片 URL。 + * @param {string} description - OGV 的文本描述。 + * @param {string} [seasonId] - 可选。OGV 的季 ID。 + * @param {string} [episodeId] - 可选。OGV 的集 ID。 + * @returns {string} 渲染的 OGV 描述。 + * + * @see https://player.bilibili.com/ 获取更多信息。 + */ +export const renderOGVDescription = (embed: boolean, img: string, description: string, seasonId?: string, episodeId?: string): string => { + // docs: https://player.bilibili.com/ + const rendered = art(path.join(__dirname, 'templates/description.art'), { + embed, + ogv: true, + seasonId, + episodeId, + img: img.replace('http://', 'https://'), + description, + }); + return rendered; +}; + export default { - iframe, lsid, _uuid, hexsign, @@ -209,4 +309,8 @@ export default { addDmVerifyInfoWithInter, bvidTime, addRenderData, + getBangumi, + getBangumiItems, + renderUGCDescription, + renderOGVDescription, }; diff --git a/lib/routes/bilibili/video-all.ts b/lib/routes/bilibili/video-all.ts index b0f154d3581ae5a..cb43f447eba619e 100644 --- a/lib/routes/bilibili/video-all.ts +++ b/lib/routes/bilibili/video-all.ts @@ -5,16 +5,21 @@ import utils from './utils'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/user/video-all/:uid/:disableEmbed?', + path: '/user/video-all/:uid/:embed?', name: '用户所有视频', maintainers: [], handler, + example: '/bilibili/user/video-all/2267573', + parameters: { + uid: '用户 id, 可在 UP 主主页中找到', + embed: '默认为开启内嵌视频, 任意值为关闭', + }, categories: ['social-media'], }; async function handler(ctx) { const uid = ctx.req.param('uid'); - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const cookie = await cache.getCookie(); const wbiVerifyString = await cache.getWbiVerifyString(); const dmImgList = utils.getDmImgList(); @@ -74,7 +79,7 @@ async function handler(ctx) { icon: face, item: vlist.map((item) => ({ title: item.title, - description: `${item.description}${disableEmbed ? '' : `<br><br>${utils.iframe(item.aid)}`}<br><img src="${item.pic}">`, + description: utils.renderUGCDescription(embed, item.pic, item.description, item.aid, undefined, item.bvid), pubDate: parseDate(item.created, 'X'), link: item.created > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: name, diff --git a/lib/routes/bilibili/video.ts b/lib/routes/bilibili/video.ts index f5418e07986752c..9693a0d1b9ee599 100644 --- a/lib/routes/bilibili/video.ts +++ b/lib/routes/bilibili/video.ts @@ -5,11 +5,11 @@ import utils from './utils'; import logger from '@/utils/logger'; export const route: Route = { - path: '/user/video/:uid/:disableEmbed?', + path: '/user/video/:uid/:embed?', categories: ['social-media', 'popular'], view: ViewType.Videos, example: '/bilibili/user/video/2267573', - parameters: { uid: '用户 id, 可在 UP 主主页中找到', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { uid: '用户 id, 可在 UP 主主页中找到', embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: false, requirePuppeteer: false, @@ -31,7 +31,7 @@ export const route: Route = { async function handler(ctx) { const uid = ctx.req.param('uid'); - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const cookie = await cache.getCookie(); const wbiVerifyString = await cache.getWbiVerifyString(); const dmImgList = utils.getDmImgList(); @@ -68,7 +68,7 @@ async function handler(ctx) { data.data.list.vlist && data.data.list.vlist.map((item) => ({ title: item.title, - description: `${item.description}${disableEmbed ? '' : `<br><br>${utils.iframe(item.aid)}`}<br><img src="${item.pic}">`, + description: utils.renderUGCDescription(embed, item.pic, item.description, item.aid, undefined, item.bvid), pubDate: new Date(item.created * 1000).toUTCString(), link: item.created > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: name, diff --git a/lib/routes/bilibili/vsearch.ts b/lib/routes/bilibili/vsearch.ts index 015c10c6a1b2c0d..955f45e2fda3a07 100644 --- a/lib/routes/bilibili/vsearch.ts +++ b/lib/routes/bilibili/vsearch.ts @@ -2,14 +2,18 @@ import { Route } from '@/types'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import utils from './utils'; -import { queryToBoolean } from '@/utils/readable-social'; import cacheIn from './cache'; export const route: Route = { - path: '/vsearch/:kw/:order?/:disableEmbed?/:tid?', + path: '/vsearch/:kw/:order?/:embed?/:tid?', categories: ['social-media'], example: '/bilibili/vsearch/RSSHub', - parameters: { kw: '检索关键字', order: '排序方式, 综合:totalrank 最多点击:click 最新发布:pubdate(缺省) 最多弹幕:dm 最多收藏:stow', disableEmbed: '默认为开启内嵌视频, 任意值为关闭', tid: '分区 id' }, + parameters: { + kw: '检索关键字', + order: '排序方式, 综合:totalrank 最多点击:click 最新发布:pubdate(缺省) 最多弹幕:dm 最多收藏:stow', + embed: '默认为开启内嵌视频, 任意值为关闭', + tid: '分区 id', + }, features: { requireConfig: [ { @@ -38,10 +42,22 @@ export const route: Route = { | 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) => { + if (!embed) { + return ''; + } + const aid = data?.aid; + const bvid = data?.bvid; + if (aid === undefined && bvid === undefined) { + return ''; + } + return utils.renderUGCDescription(embed, '', '', aid, undefined, bvid); +}; + async function handler(ctx) { const kw = ctx.req.param('kw'); const order = ctx.req.param('order') || 'pubdate'; - const disableEmbed = queryToBoolean(ctx.req.param('disableEmbed')); + const embed = !ctx.req.param('embed'); const kw_url = encodeURIComponent(kw); const tids = ctx.req.param('tid') ?? 0; const cookie = await cacheIn.getCookie(); @@ -84,7 +100,7 @@ async function handler(ctx) { `<br/>${des}<br/>` + `<img src="${img}"><br/>` + `Match By: ${item.hit_columns?.join(',') || ''}` + - (disableEmbed ? '' : `<br><br>${utils.iframe(item.aid)}`), + getIframe(item, embed), pubDate: parseDate(item.pubdate, 'X'), guid: item.arcurl, link: item.arcurl, diff --git a/lib/routes/bilibili/watchlater.ts b/lib/routes/bilibili/watchlater.ts index cb0cf9e31c7a597..b66fab49a7313da 100644 --- a/lib/routes/bilibili/watchlater.ts +++ b/lib/routes/bilibili/watchlater.ts @@ -7,10 +7,10 @@ import { parseDate } from '@/utils/parse-date'; import ConfigNotFoundError from '@/errors/types/config-not-found'; export const route: Route = { - path: '/watchlater/:uid/:disableEmbed?', + path: '/watchlater/:uid/:embed?', categories: ['social-media'], example: '/bilibili/watchlater/2267573', - parameters: { uid: '用户 id', disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { uid: '用户 id', embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: [ { @@ -38,7 +38,7 @@ export const route: Route = { async function handler(ctx) { const uid = ctx.req.param('uid'); - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const name = await cache.getUsernameFromUID(uid); const cookie = config.bilibili.cookies[uid]; @@ -62,7 +62,7 @@ async function handler(ctx) { const out = list.map((item) => ({ title: item.title, - description: `${item.desc}<br><br><a href="https://www.bilibili.com/list/watchlater?bvid=${item.bvid}">在稍后再看列表中查看</a>${disableEmbed ? '' : `<br><br>${utils.iframe(item.aid)}`}<br><img src="${item.pic}">`, + description: utils.renderUGCDescription(embed, item.pic, `${item.desc}<br><a href="https://www.bilibili.com/list/watchlater?bvid=${item.bvid}">在稍后再看列表中查看</a>`, item.aid, undefined, item.bvid), pubDate: parseDate(item.add_at * 1000), link: item.pubdate > utils.bvidTime && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.aid}`, author: item.owner.name, diff --git a/lib/routes/bilibili/weekly-recommend.ts b/lib/routes/bilibili/weekly-recommend.ts index 1ab47868422b63e..8e214ef0238b890 100644 --- a/lib/routes/bilibili/weekly-recommend.ts +++ b/lib/routes/bilibili/weekly-recommend.ts @@ -3,10 +3,10 @@ import got from '@/utils/got'; import utils from './utils'; export const route: Route = { - path: '/weekly/:disableEmbed?', + path: '/weekly/:embed?', categories: ['social-media'], example: '/bilibili/weekly', - parameters: { disableEmbed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { embed: '默认为开启内嵌视频, 任意值为关闭' }, features: { requireConfig: false, requirePuppeteer: false, @@ -21,7 +21,7 @@ export const route: Route = { }; async function handler(ctx) { - const disableEmbed = ctx.req.param('disableEmbed'); + const embed = !ctx.req.param('embed'); const status_response = await got({ method: 'get', @@ -48,12 +48,7 @@ async function handler(ctx) { description: 'B站每周必看', item: data.map((item) => ({ title: item.title, - // description: `${weekly_name} ${item.title}<br>${item.rcmd_reason}<br>${!disableEmbed ? `${utils.iframe(item.param)}` : ''}<img src="${item.cover}">`, - description: ` - ${weekly_name} ${item.title}<br> - ${item.rcmd_reason}<br> - ${disableEmbed ? '' : utils.iframe(item.param)}<img src="${item.cover}"> - `, + description: utils.renderUGCDescription(embed, item.cover, `${weekly_name} ${item.title} - ${item.rcmd_reason}`, item.param, undefined, item.bvid), link: weekly_number > 60 && item.bvid ? `https://www.bilibili.com/video/${item.bvid}` : `https://www.bilibili.com/video/av${item.param}`, })), }; From 0ebc981e8910c3ae2e56dacff5fdf980b9e063ab Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 29 Oct 2024 22:17:02 +0700 Subject: [PATCH 325/740] fix(route/nature): nature research route --- lib/routes/nature/research.ts | 2 +- lib/routes/nature/utils.ts | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/lib/routes/nature/research.ts b/lib/routes/nature/research.ts index d72b0fd73c5afa6..0461e5138c9bccf 100644 --- a/lib/routes/nature/research.ts +++ b/lib/routes/nature/research.ts @@ -38,7 +38,7 @@ export const route: Route = { }, ], name: 'Latest Research', - maintainers: ['y9c', 'TonyRL'], + maintainers: ['y9c', 'TonyRL', 'pseudoyu'], handler, description: `| \`:journal\` | Full Name of the Journal | Route | | :-----------: | :-------------------------: | ---------------------------------------------------------------------------------- | diff --git a/lib/routes/nature/utils.ts b/lib/routes/nature/utils.ts index b32d7844a793ae4..cf77094328723c5 100644 --- a/lib/routes/nature/utils.ts +++ b/lib/routes/nature/utils.ts @@ -1,5 +1,5 @@ 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 { CookieJar } from 'tough-cookie'; @@ -52,13 +52,11 @@ const getArticleList = (html) => const getArticle = (item) => cache.tryGet(item.link, async () => { - const response = await got(item.link, { - cookieJar, - }); - const $ = load(response.data); - const responseUrl = new URL(response.url); + const response = await ofetch(item.link); + + const $ = load(response); - if (responseUrl.pathname.startsWith('/immersive/')) { + if (new URL(item.link).pathname.startsWith('/immersive/')) { const meta = getDataLayer($); item.doi = meta.content.article?.doi; item.author = meta.content.contentInfo.authors.join(', '); From 9c61e7de9adfe472ae260f304c6bdd7018033227 Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:31:37 +0000 Subject: [PATCH 326/740] fix(route/theinitium): Fix item link for /app route (#17358) --- lib/routes/theinitium/app.ts | 76 ++++++++++++------- .../theinitium/templates/description.art | 4 +- 2 files changed, 51 insertions(+), 29 deletions(-) diff --git a/lib/routes/theinitium/app.ts b/lib/routes/theinitium/app.ts index fbf38a24dc1d4e8..114667ab641d5cc 100644 --- a/lib/routes/theinitium/app.ts +++ b/lib/routes/theinitium/app.ts @@ -1,7 +1,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { load } from 'cheerio'; +import { load, type CheerioAPI, type Element } from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; import { config } from '@/config'; @@ -52,38 +52,52 @@ Category 栏目: | 播客 | article_audio_sc | article_audio_tc |`, }; +const resolveRelativeLink = ($: CheerioAPI, elem: Element, attr: string, baseUrl?: string) => { + // code from @/middleware/paratmeter.ts + const $elem = $(elem); + + if (baseUrl) { + try { + const oldAttr = $elem.attr(attr); + if (oldAttr) { + // e.g. <video><source src="https://example.com"></video> should leave <video> unchanged + $elem.attr(attr, new URL(oldAttr, baseUrl).href); + } + } catch { + // no-empty + } + } +}; + async function handler(ctx) { const category = ctx.req.param('category') ?? 'latest_sc'; const __dirname = getCurrentPath(import.meta.url); + const baseUrl = 'https://app.theinitium.com/'; - const feedListLink = 'https://app.theinitium.com/timelines.json'; - - const feedList = await cache.tryGet( - feedListLink, + const feeds = await cache.tryGet( + new URL('timelines.json', baseUrl).href, async () => await got({ method: 'get', - url: feedListLink, + url: new URL('timelines.json', baseUrl).href, }), config.cache.routeExpire, false ); - const feedInfo = feedList.data.timelines.find((timeline) => timeline.id === category); + const metadata = feeds.data.timelines.find((timeline) => timeline.id === category); - const link = `https://app.theinitium.com${feedInfo.feed.slice(1)}`; - - const feedResponse = await got({ + const response = await got({ method: 'get', - url: link, + url: new URL(metadata.feed, baseUrl).href, }); - const feed = feedResponse.data.stories.filter((item) => item.type === 'article'); + const feed = response.data.stories.filter((item) => item.type === 'article'); const items = await Promise.all( feed.map((item) => - cache.tryGet('https://app.theinitium.com/' + item.url.replaceAll('../', ''), async () => { - item.link = 'https://app.theinitium.com/' + item.url.replaceAll('../', ''); + cache.tryGet(new URL(item.url, baseUrl).href, async () => { + item.link = item.shareurl ?? new URL(item.url, baseUrl).href; item.description = item.summary; item.pubDate = item.published; item.category = []; @@ -99,12 +113,26 @@ async function handler(ctx) { } } item.category = [...new Set(item.category)]; - const response = await got(item.link); + const response = await got(new URL(item.url, baseUrl).href); const $ = load(response.data); + // resolve relative links with app.theinitium.com + // code from @/middleware/paratmeter.ts + $('a, area').each((_, elem) => { + resolveRelativeLink($, elem, 'href', baseUrl); + // $(elem).attr('rel', 'noreferrer'); // currently no such a need + }); + // https://www.w3schools.com/tags/att_src.asp + $('img, video, audio, source, iframe, embed, track').each((_, elem) => { + resolveRelativeLink($, elem, 'src', baseUrl); + $(elem).removeAttr('srcset'); + }); + $('video[poster]').each((_, elem) => { + resolveRelativeLink($, elem, 'poster', baseUrl); + }); const article = $('.pp-article__body'); article.find('.block-related-articles').remove(); item.description = art(path.join(__dirname, 'templates/description.art'), { - header: $('.pp-header-group__standfirst').html(), + standfirst: $('.pp-header-group__standfirst').html(), coverImage: $('.pp-media__image').attr('src'), coverCaption: $('.pp-media__caption').html(), article: article.html(), @@ -115,21 +143,15 @@ async function handler(ctx) { ) ); - let lang; - let titleLoc; - if (feedInfo.timeline_sets[0] === 'chinese-simplified') { - lang = 'zh-hans'; - titleLoc = '端传媒'; - } else if (feedInfo.timeline_sets[0] === 'chinese-traditional') { + let lang = 'zh-hans'; + let name = '端传媒'; + if (metadata.timeline_sets[0] === 'chinese-traditional') { lang = 'zh-hant'; - titleLoc = '端傳媒'; - } else { - lang = 'zh-hans'; - titleLoc = '端传媒'; + name = '端傳媒'; } return { - title: `${titleLoc} - ${feedInfo.title}`, + title: `${name} - ${metadata.title}`, link: `https://app.theinitium.com/t/latest/${category}/`, language: lang, item: items, diff --git a/lib/routes/theinitium/templates/description.art b/lib/routes/theinitium/templates/description.art index c0e09d15d56bfc6..6a7a902eac38f59 100644 --- a/lib/routes/theinitium/templates/description.art +++ b/lib/routes/theinitium/templates/description.art @@ -1,5 +1,5 @@ -{{ if header }} - <h4> {{ header }} </h4> +{{ if standfirst }} + <blockquote><p><em>{{ standfirst }}</em></p></blockquote> {{ /if }} {{ if coverImage}} <figure> From 528569c567419f47f9213600088efff181b771f4 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 29 Oct 2024 22:42:05 +0700 Subject: [PATCH 327/740] fix(route/nature): nature cover page redirect url issue --- lib/routes/nature/cover.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/routes/nature/cover.ts b/lib/routes/nature/cover.ts index 5263dc21745df41..cb6458f49d6a57c 100644 --- a/lib/routes/nature/cover.ts +++ b/lib/routes/nature/cover.ts @@ -41,7 +41,7 @@ export const route: Route = { }, ], name: 'Cover Story', - maintainers: ['y9c'], + maintainers: ['y9c', 'pseudoyu'], handler, url: 'nature.com/', description: `Subscribe to the cover images of the Nature journals, and get the latest publication updates in time.`, @@ -65,13 +65,15 @@ async function handler() { const { id, name, link } = journal; const response = await got(link, { cookieJar }); + const $ = load(response.data); + const ogUrl = $('meta[property="og:url"]').attr('content'); const capturingRegex = /volumes\/(?<volume>\d+)\/issues\/(?<issue>\d+)/; - const { volume, issue } = response.url.match(capturingRegex).groups; + const { volume, issue } = ogUrl?.match(capturingRegex)?.groups ?? {}; + const imageUrl = `https://media.springernature.com/full/springer-static/cover-hires/journal/${id}/${volume}/${issue}?as=webp`; const contents = `<div align="center"><img src="${imageUrl}" alt="Volume ${volume} Issue ${issue}"></div>`; - const $ = load(response.data); const date = $('title').text().split(',')[1].trim(); const issueDescription = $('div[data-test=issue-description]').html() ?? ''; From 74f254df094d097e0e1d1d9ccc1b2d4732ca1944 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 29 Oct 2024 22:52:58 +0700 Subject: [PATCH 328/740] fix(route/nature): some links in nature siteindex cant access --- lib/routes/nature/siteindex.ts | 36 +++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/lib/routes/nature/siteindex.ts b/lib/routes/nature/siteindex.ts index 99ec1d80957bf57..d927800dd87d7e0 100644 --- a/lib/routes/nature/siteindex.ts +++ b/lib/routes/nature/siteindex.ts @@ -18,7 +18,7 @@ export const route: Route = { supportScihub: false, }, name: 'Journal List', - maintainers: ['TonyRL'], + maintainers: ['TonyRL', 'pseudoyu'], handler, }; @@ -40,19 +40,33 @@ async function handler(ctx) { items = await Promise.all( items.map((item) => cache.tryGet(`nature:siteindex:${item.title}`, async () => { - const response = await got(item.link, { cookieJar }); - const $ = load(response.data); - - delete item.link; try { - item.id = $('.app-latest-issue-row__image img') - .attr('src') - .match(/.*\/journal\/(\d{5})/)[1]; - item.description = item.id; + const response = await got(item.link, { cookieJar }); + const $ = load(response.data); + + const imgSrc = $('.app-latest-issue-row__image img').attr('src'); + if (imgSrc) { + const match = imgSrc.match(/.*\/journal\/(\d{5})/); + if (match) { + const id = match[1]; + return { + title: item.title, + name: item.name, + id, + description: id, + }; + } + } + return { + title: item.title, + name: item.name, + }; } catch { - // + return { + title: item.title, + name: item.name, + }; } - return item; }) ) ); From d04cc581223569c619725c31a7370f7e9b0d9e44 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 30 Oct 2024 00:18:51 +0800 Subject: [PATCH 329/740] =?UTF-8?q?feat(route):=20add=20=E4=B8=87=E7=BB=B4?= =?UTF-8?q?=E4=B9=A6=E5=88=8A=E7=BD=91=E5=AD=A6=E6=9C=AF=E8=B5=84=E8=AE=AF?= =?UTF-8?q?=20(#17344)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 万维书刊网学术资讯 * fix typo --- lib/routes/eshukan/academic.ts | 134 +++++++++++++++++++ lib/routes/eshukan/namespace.ts | 8 ++ lib/routes/eshukan/templates/description.art | 7 + 3 files changed, 149 insertions(+) create mode 100644 lib/routes/eshukan/academic.ts create mode 100644 lib/routes/eshukan/namespace.ts create mode 100644 lib/routes/eshukan/templates/description.art diff --git a/lib/routes/eshukan/academic.ts b/lib/routes/eshukan/academic.ts new file mode 100644 index 000000000000000..cafb6af5b47e357 --- /dev/null +++ b/lib/routes/eshukan/academic.ts @@ -0,0 +1,134 @@ +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 { load } from 'cheerio'; +import timezone from '@/utils/timezone'; +import { parseDate } from '@/utils/parse-date'; +import { art } from '@/utils/render'; +import path from 'node:path'; + +export const handler = async (ctx) => { + const { id = '1' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; + + const rootUrl = 'https://www.eshukan.com'; + const currentUrl = new URL(`academic/index.aspx?cid=${id}`, rootUrl).href; + + const { data: response } = await got(currentUrl); + + const $ = load(response); + + let items = $('ul.article li') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + const a = item.find('a'); + + const title = a.contents().last().text(); + const pubDate = item + .find('p span') + .text() + .match(/(\d{4}\/\d{2}\/\d{2}\s\d{2}:\d{2}:\d{2})/)?.[1]; + + item.find('p span').remove(); + + const description = art(path.join(__dirname, 'templates/description.art'), { + intro: item.find('p').text(), + }); + + return { + title, + description, + pubDate: pubDate ? timezone(parseDate(pubDate), +8) : undefined, + link: new URL(a.prop('href'), currentUrl).href, + content: { + html: description, + text: item.find('p').text(), + }, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + const title = $$('h1').text(); + const description = art(path.join(__dirname, 'templates/description.art'), { + intro: $$('div.summary').html(), + description: $$('div.detail').html(), + }); + const pubDate = $$('div.author') + .text() + .match(/(\d{4}\/\d{2}\/\d{2}\s\d{2}:\d{2}:\d{2})/)?.[1]; + + item.title = title; + item.description = description; + item.pubDate = pubDate ? timezone(parseDate(pubDate), +8) : item.pubDate; + item.author = $$('div.author a').text(); + item.content = { + html: description, + text: $$('div.detail').text(), + }; + + return item; + }) + ) + ); + + const title = $('title').text(); + const image = new URL($('div.logo img').prop('src'), rootUrl).href; + + return { + title, + description: $('meta[name="description"]').prop('content'), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: title.split(/_/).pop(), + }; +}; + +export const route: Route = { + path: '/academic/:id?', + name: '学术资讯', + url: 'www.eshukan.com', + maintainers: ['nczitzk'], + handler, + example: '/eshukan/academic/1', + parameters: { category: '栏目 id,默认为 `1`,即期刊动态,可在对应栏目页 URL 中找到' }, + description: `:::tip + 若订阅 [期刊动态](https://www.eshukan.com/academic/index.aspx?cid=1),网址为 \`https://www.eshukan.com/academic/index.aspx?cid=1\`。截取 \`https://www.eshukan.com/academic/index.aspx?cid=\` 到末尾的部分 \`1\` 作为参数填入,此时路由为 [\`/eshukan/academic/1\`](https://rsshub.app/eshukan/academic/1)。 + ::: + `, + categories: ['study'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.eshukan.com/academic/index.aspx'], + target: (_, url) => { + url = new URL(url); + const id = url.searchParams.get('id'); + + return `/academic${id ? `/${id}` : ''}`; + }, + }, + ], +}; diff --git a/lib/routes/eshukan/namespace.ts b/lib/routes/eshukan/namespace.ts new file mode 100644 index 000000000000000..851f5eefccd85f7 --- /dev/null +++ b/lib/routes/eshukan/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '万维书刊网', + url: 'eshukan.com', + categories: ['study'], + description: '', +}; diff --git a/lib/routes/eshukan/templates/description.art b/lib/routes/eshukan/templates/description.art new file mode 100644 index 000000000000000..e9f926d11f62a96 --- /dev/null +++ b/lib/routes/eshukan/templates/description.art @@ -0,0 +1,7 @@ +{{ if intro }} + <blockquote>{{@ intro }}</blockquote> +{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file From d6c106ea7cf37a35015780ac31cf4568c041f9d2 Mon Sep 17 00:00:00 2001 From: Jacky_Chen <qi12371@gmail.com> Date: Wed, 30 Oct 2024 00:40:42 +0800 Subject: [PATCH 330/740] feat(route/dedao): add new dedao route (#17252) * feat:add dedao new route * feat(route):add dedao new route * Update articles.ts * Update articles.ts solve any type * Update articles.ts * Update articles.ts Modified code to add caching and recursion as required * Update articles.ts Reduced coupling * Update articles.ts solve ESLint warning * Update articles.ts --- lib/routes/dedao/articles.ts | 149 +++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 lib/routes/dedao/articles.ts diff --git a/lib/routes/dedao/articles.ts b/lib/routes/dedao/articles.ts new file mode 100644 index 000000000000000..58e4a9b0f925750 --- /dev/null +++ b/lib/routes/dedao/articles.ts @@ -0,0 +1,149 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; + +export const route: Route = { + path: '/articles/:id?', + categories: ['new-media'], + example: '/articles/9', // 示例路径更新 + parameters: { id: '文章类型 ID,8 为得到头条,9 为得到精选,默认为 8' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['igetget.com'], + target: '/articles/:id', + }, + ], + name: '得到文章', + maintainers: ['Jacky-Chen-Pro'], + handler, + url: 'www.igetget.com', +}; + +function handleParagraph(data) { + let html = '<p>'; + if (data.contents && Array.isArray(data.contents)) { + html += data.contents.map((data) => extractArticleContent(data)).join(''); + } + html += '</p>'; + return html; +} + +function handleText(data) { + let content = data.text?.content || ''; + if (data.text?.bold || data.text?.highlight) { + content = `<strong>${content}</strong>`; + } + return content; +} + +function handleImage(data) { + return data.image?.src ? `<img src="${data.image.src}" alt="${data.image.alt || ''}" />` : ''; +} + +function handleHr() { + return '<hr />'; +} + +function extractArticleContent(data) { + if (!data || typeof data !== 'object') { + return ''; + } + + switch (data.type) { + case 'paragraph': + return handleParagraph(data); + case 'text': + return handleText(data); + case 'image': + return handleImage(data); + case 'hr': + return handleHr(); + default: + return ''; + } +} + +async function handler(ctx) { + const { id = '8' } = ctx.req.param(); + const rootUrl = 'https://www.igetget.com'; + const headers = { + Accept: 'application/json, text/plain, */*', + 'Content-Type': 'application/json;charset=UTF-8', + Referer: `https://m.igetget.com/share/course/free/detail?id=nb9L2q1e3OxKBPNsdoJrgN8P0Rwo6B`, + Origin: 'https://m.igetget.com', + }; + const max_id = 0; + + const response = await got.post('https://m.igetget.com/share/api/course/free/pageTurning', { + json: { + chapter_id: 0, + count: 5, + max_id, + max_order_num: 0, + pid: Number(id), + ptype: 24, + reverse: true, + since_id: 0, + since_order_num: 0, + }, + headers, + }); + + const data = JSON.parse(response.body); + if (!data || !data.article_list) { + throw new Error('文章列表不存在或为空'); + } + + const articles = data.article_list; + + const items = await Promise.all( + articles.map((article) => { + const postUrl = `https://m.igetget.com/share/course/article/article_id/${article.id}`; + const postTitle = article.title; + const postTime = new Date(article.publish_time * 1000).toUTCString(); + + return cache.tryGet(postUrl, async () => { + const detailResponse = await got.get(postUrl, { headers }); + const $ = load(detailResponse.body); + + const scriptTag = $('script') + .filter((_, el) => $(el).text()?.includes('window.__INITIAL_STATE__')) + .text(); + + if (scriptTag) { + const jsonStr = scriptTag.match(/window\.__INITIAL_STATE__\s*=\s*(\{.*\});/)?.[1]; + if (jsonStr) { + const articleData = JSON.parse(jsonStr); + + const description = JSON.parse(articleData.articleContent.content) + .map((data) => extractArticleContent(data)) + .join(''); + + return { + title: postTitle, + link: postUrl, + description, + pubDate: postTime, + }; + } + } + return null; + }); + }) + ); + + return { + title: `得到文章 - ${id === '8' ? '头条' : '精选'}`, + link: rootUrl, + item: items.filter(Boolean), + }; +} From 6d110e0dbc826742c9c04c09d630a32f45268971 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 29 Oct 2024 12:54:39 -0700 Subject: [PATCH 331/740] fix(route): mingpao mixed media (#17359) --- lib/routes/mingpao/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/routes/mingpao/index.ts b/lib/routes/mingpao/index.ts index 79131dd6d63566d..b8f187884f809db 100644 --- a/lib/routes/mingpao/index.ts +++ b/lib/routes/mingpao/index.ts @@ -112,6 +112,12 @@ async function handler(ctx) { }); const $ = cheerio.load(response); + const topVideo = $('#topvideo').length + ? $('#topvideo iframe') + .toArray() + .map((e) => $(e).attr('href', $(e).attr('src'))) + .map((e) => fixFancybox(e, $)) + : []; const fancyboxImg = $('a.fancybox').length ? $('a.fancybox') : $('a.fancybox-buttons'); // remove unwanted elements @@ -125,7 +131,7 @@ async function handler(ctx) { item.category = item.categories; // fix fancybox image - let fancybox = fancyboxImg.toArray().map((e) => fixFancybox(e, $)); + let fancybox = [...topVideo, ...fancyboxImg.toArray().map((e) => fixFancybox(e, $))]; const script = $('script') .toArray() .find((e) => $(e).text()?.includes("$('#lower').prepend('")); From b60ef4de323820972049c6e99bb18101909b66aa Mon Sep 17 00:00:00 2001 From: Eric Zhu <eric@zhu.email> Date: Wed, 30 Oct 2024 04:28:56 +0800 Subject: [PATCH 332/740] feat(twitter): support LoginEnterAlternateIdentifierSubtask task and better login flow controll (#17331) * feat(twitter): support LoginEnterAlternateIdentifierSubtask task and better login flow controll * chore: lint * chore: lint * refactor(twitter): login flow * fix: var name --- lib/config.ts | 2 + lib/routes/twitter/api/mobile-api/login.ts | 252 ++++++++++----------- lib/routes/twitter/api/mobile-api/token.ts | 2 + 3 files changed, 129 insertions(+), 127 deletions(-) diff --git a/lib/config.ts b/lib/config.ts index 782e831a1ac52ec..8833e95cc868470 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -298,6 +298,7 @@ export type Config = { username?: string[]; password?: string[]; authenticationSecret?: string[]; + phoneOrEmail?: string[]; authToken?: string[]; }; uestc: { @@ -701,6 +702,7 @@ const calculateValue = () => { username: envs.TWITTER_USERNAME?.split(','), password: envs.TWITTER_PASSWORD?.split(','), authenticationSecret: envs.TWITTER_AUTHENTICATION_SECRET?.split(','), + phoneOrEmail: envs.TWITTER_PHONE_OR_EMAIL?.split(','), authToken: envs.TWITTER_AUTH_TOKEN?.split(','), }, uestc: { diff --git a/lib/routes/twitter/api/mobile-api/login.ts b/lib/routes/twitter/api/mobile-api/login.ts index ed231e5ec951ef2..880ae0b7910a936 100644 --- a/lib/routes/twitter/api/mobile-api/login.ts +++ b/lib/routes/twitter/api/mobile-api/login.ts @@ -8,11 +8,11 @@ import { v5 as uuidv5 } from 'uuid'; import { authenticator } from 'otplib'; import logger from '@/utils/logger'; import cache from '@/utils/cache'; -import { RateLimiterMemory, RateLimiterRedis, RateLimiterQueue } from 'rate-limiter-flexible'; +import { RateLimiterMemory, RateLimiterQueue, RateLimiterRedis } from 'rate-limiter-flexible'; -const NAMESPACE = 'd41d092b-b007-48f7-9129-e9538d2d8fe9'; +const ENDPOINT = 'https://api.x.com/1.1/onboarding/task.json'; -let authentication = null; +const NAMESPACE = 'd41d092b-b007-48f7-9129-e9538d2d8fe9'; const headers = { 'User-Agent': 'TwitterAndroid/10.21.0-release.0 (310210000-r-0) ONEPLUS+A3010/9 (OnePlus;ONEPLUS+A3010;OnePlus;OnePlus3;0;;1;2016)', @@ -41,7 +41,65 @@ const loginLimiter = cache.clients.redisClient const loginLimiterQueue = new RateLimiterQueue(loginLimiter); -async function login({ username, password, authenticationSecret }) { +const postTask = async (flowToken: string, subtaskId: string, subtaskInput: Record<string, unknown>) => + await got.post(ENDPOINT, { + headers, + json: { + flow_token: flowToken, + subtask_inputs: [Object.assign({ subtask_id: subtaskId }, subtaskInput)], + }, + }); + +// In the Twitter login flow, each task successfully requested will respond with a 'subtask_id' to determine what the next task is, and the execution sequence of the tasks is non-fixed. +// So abstract these tasks out into a map so that they can be dynamically executed during the login flow. +// If there are missing tasks in the future, simply add the implementation of that task to it. +const flowTasks = { + async LoginEnterUserIdentifier({ flowToken, username }) { + return await postTask(flowToken, 'LoginEnterUserIdentifier', { + enter_text: { + suggestion_id: null, + text: username, + link: 'next_link', + }, + }); + }, + async LoginEnterPassword({ flowToken, password }) { + return await postTask(flowToken, 'LoginEnterPassword', { + enter_password: { + password, + link: 'next_link', + }, + }); + }, + async LoginEnterAlternateIdentifierSubtask({ flowToken, phoneOrEmail }) { + return await postTask(flowToken, 'LoginEnterAlternateIdentifierSubtask', { + enter_text: { + suggestion_id: null, + text: phoneOrEmail, + link: 'next_link', + }, + }); + }, + async AccountDuplicationCheck({ flowToken }) { + return await postTask(flowToken, 'AccountDuplicationCheck', { + check_logged_in_account: { + link: 'AccountDuplicationCheck_false', + }, + }); + }, + async LoginTwoFactorAuthChallenge({ flowToken, authenticationSecret }) { + const token = authenticator.generate(authenticationSecret); + return await postTask(flowToken, 'LoginTwoFactorAuthChallenge', { + enter_text: { + suggestion_id: null, + text: token, + link: 'next_link', + }, + }); + }, +}; + +async function login({ username, password, authenticationSecret, phoneOrEmail }) { return (await cache.tryGet( `twitter:authentication:${username}`, async () => { @@ -49,8 +107,8 @@ async function login({ username, password, authenticationSecret }) { await loginLimiterQueue.removeTokens(1); logger.debug('Twitter login start.'); - const android_id = uuidv5(username, NAMESPACE); - headers['X-Twitter-Client-DeviceID'] = android_id; + + headers['X-Twitter-Client-DeviceID'] = uuidv5(username, NAMESPACE); const ct0 = crypto.randomUUID().replaceAll('-', ''); const guestToken = await got(guestActivateUrl, { @@ -61,140 +119,80 @@ async function login({ username, password, authenticationSecret }) { }, method: 'POST', }); - logger.debug('Twitter login 1 finished: guest token.'); + logger.debug('Twitter login: guest token'); headers['x-guest-token'] = guestToken.data.guest_token; - const task1 = await ofetch.raw( - 'https://api.x.com/1.1/onboarding/task.json?' + - new URLSearchParams({ - flow_name: 'login', - api_version: '1', - known_device_token: '', - sim_country_code: 'us', - }).toString(), - { - method: 'POST', - headers, - body: { - flow_token: null, - input_flow_data: { - country_code: null, - flow_context: { - referrer_context: { - referral_details: 'utm_source=google-play&utm_medium=organic', - referrer_url: '', - }, - start_location: { - location: 'deeplink', + let task = await ofetch + .raw( + ENDPOINT + + '?' + + new URLSearchParams({ + flow_name: 'login', + api_version: '1', + known_device_token: '', + sim_country_code: 'us', + }).toString(), + { + method: 'POST', + headers, + body: { + flow_token: null, + input_flow_data: { + country_code: null, + flow_context: { + referrer_context: { + referral_details: 'utm_source=google-play&utm_medium=organic', + referrer_url: '', + }, + start_location: { + location: 'deeplink', + }, }, + requested_variant: null, + target_user_id: 0, }, - requested_variant: null, - target_user_id: 0, }, - }, + } + ) + .then(({ headers: _headers, _data }) => { + headers.att = _headers.get('att'); + return { data: _data }; + }); + + logger.debug('Twitter login flow start.'); + const runTask = async ({ data }) => { + const { subtask_id, open_account } = data.subtasks.shift(); + + // If `open_account` exists (and 'subtask_id' is `LoginSuccessSubtask`), it means the login was successful. + if (open_account) { + return open_account; } - ); - logger.debug('Twitter login 2 finished: login flow.'); - - headers.att = task1.headers.get('att'); - - const task2 = await got.post('https://api.x.com/1.1/onboarding/task.json', { - headers, - json: { - flow_token: task1._data.flow_token, - subtask_inputs: [ - { - enter_text: { - suggestion_id: null, - text: username, - link: 'next_link', - }, - subtask_id: 'LoginEnterUserIdentifier', - }, - ], - }, - }); - logger.debug('Twitter login 3 finished: LoginEnterUserIdentifier.'); - - const task3 = await got.post('https://api.x.com/1.1/onboarding/task.json', { - headers, - json: { - flow_token: task2.data.flow_token, - subtask_inputs: [ - { - enter_password: { - password, - link: 'next_link', - }, - subtask_id: 'LoginEnterPassword', - }, - ], - }, - }); - logger.debug('Twitter login 4 finished: LoginEnterPassword.'); - for (const subtask of task3.data?.subtasks || []) { - if (subtask.open_account) { - return subtask.open_account; + + // If task does not exist in `flowTasks`, we need to implement it. + if (!(subtask_id in flowTasks)) { + logger.error(`Twitter login flow task failed: unknown subtask: ${subtask_id}`); + return; } - } - const task4 = await got.post('https://api.x.com/1.1/onboarding/task.json', { - headers, - json: { - flow_token: task3.data.flow_token, - subtask_inputs: [ - { - check_logged_in_account: { - link: 'AccountDuplicationCheck_false', - }, - subtask_id: 'AccountDuplicationCheck', - }, - ], - }, - }); - logger.debug('Twitter login 5 finished: AccountDuplicationCheck.'); + task = await flowTasks[subtask_id]({ + flowToken: data.flow_token, + username, + password, + authenticationSecret, + phoneOrEmail, + }); + logger.debug(`Twitter login flow task finished: subtask: ${subtask_id}.`); - for await (const subtask of task4.data?.subtasks || []) { - if (subtask.open_account) { - authentication = subtask.open_account; - break; - } else if (authenticationSecret && subtask.subtask_id === 'LoginTwoFactorAuthChallenge') { - const token = authenticator.generate(authenticationSecret); + return await runTask(task); + }; + const authentication = await runTask(task); + logger.debug('Twitter login flow finished.'); - const task5 = await got.post('https://api.x.com/1.1/onboarding/task.json', { - headers, - json: { - flow_token: task4.data.flow_token, - subtask_inputs: [ - { - enter_text: { - suggestion_id: null, - text: token, - link: 'next_link', - }, - subtask_id: 'LoginTwoFactorAuthChallenge', - }, - ], - }, - }); - logger.debug('Twitter login 6 finished: LoginTwoFactorAuthChallenge.'); - - for (const subtask of task5.data?.subtasks || []) { - if (subtask.open_account) { - authentication = subtask.open_account; - break; - } - } - break; - } else { - logger.error(`Twitter login 6 failed: unknown subtask: ${subtask.subtask_id}`); - } - } if (authentication) { - logger.debug('Twitter login success.'); + logger.debug('Twitter login success.', authentication); } else { - logger.error(`Twitter login failed. ${JSON.stringify(task4.data?.subtasks, null, 2)}`); + logger.error(`Twitter login failed. ${JSON.stringify(task.data?.subtasks, null, 2)}`); } return authentication; diff --git a/lib/routes/twitter/api/mobile-api/token.ts b/lib/routes/twitter/api/mobile-api/token.ts index 8c8c727d69d9010..51d6eba44fc6443 100644 --- a/lib/routes/twitter/api/mobile-api/token.ts +++ b/lib/routes/twitter/api/mobile-api/token.ts @@ -11,11 +11,13 @@ async function getToken() { const username = config.twitter.username[index]; const password = config.twitter.password[index]; const authenticationSecret = config.twitter.authenticationSecret?.[index]; + const phoneOrEmail = config.twitter.phoneOrEmail?.[index]; if (username && password) { const authentication = await login({ username, password, authenticationSecret, + phoneOrEmail, }); if (!authentication) { throw new ConfigNotFoundError(`Invalid twitter configs: ${username}`); From b77ea8a8b4a366087b72a63ec5c8b9c5d90a1407 Mon Sep 17 00:00:00 2001 From: karasu <karasu.shing@gmail.com> Date: Wed, 30 Oct 2024 10:59:24 +0800 Subject: [PATCH 333/740] fix(route): follow (#17360) --- lib/routes/follow/profile.ts | 40 +++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/lib/routes/follow/profile.ts b/lib/routes/follow/profile.ts index c2d6108291e4ee2..5301a2a5436222d 100644 --- a/lib/routes/follow/profile.ts +++ b/lib/routes/follow/profile.ts @@ -31,10 +31,18 @@ const isList = (subscription: Subscription): subscription is ListSubscription => const isInbox = (subscription: Subscription): subscription is InboxSubscription => 'inboxId' in subscription; async function handler(ctx: Context): Promise<Data> { - const uid = ctx.req.param('uid'); + const handleOrId = ctx.req.param('uid'); const host = 'https://api.follow.is'; - const profile = await ofetch<FollowResponse<Profile>>(`${host}/profiles?id=${uid}`); + const handle = isBizId(handleOrId || '') ? handleOrId : handleOrId.startsWith('@') ? handleOrId.slice(1) : handleOrId; + + const searchParams = new URLSearchParams({ handle }); + + if (isBizId(handle || '')) { + searchParams.append('id', handle); + } + + const profile = await ofetch<FollowResponse<Profile>>(`${host}/profiles?${searchParams.toString()}`); const subscriptions = await ofetch<FollowResponse<Subscription[]>>(`${host}/subscriptions?userId=${profile.data.id}`); return { @@ -56,7 +64,7 @@ async function handler(ctx: Context): Promise<Data> { category: subscription.category ? [subscription.category] : undefined, }; }), - link: `https://app.follow.is/profile/${uid}`, + link: `https://app.follow.is/share/user/${handleOrId}`, image: profile.data.image, }; } @@ -81,3 +89,29 @@ const getUrlIcon = (url: string, fallback?: boolean | undefined) => { return ret; }; + +// referenced from https://github.com/RSSNext/Follow/blob/dev/packages/utils/src/utils.ts +const EPOCH = 1_712_546_615_000n; // follow repo created +const MAX_TIMESTAMP_BITS = 41n; // Maximum number of bits typically used for timestamp +export const isBizId = (id: string): boolean => { + if (!id || !/^\d{13,19}$/.test(id)) { + return false; + } + + const snowflake = BigInt(id); + + // Extract the timestamp assuming it's in the most significant bits after the sign bit + const timestamp = (snowflake >> (63n - MAX_TIMESTAMP_BITS)) + EPOCH; + const date = new Date(Number(timestamp)); + + // Check if the date is reasonable (between 2024 and 2050) + if (date.getFullYear() >= 2024 && date.getFullYear() <= 2050) { + // Additional validation: check if the ID is not larger than the maximum possible value + const maxPossibleId = (1n << 63n) - 1n; // Maximum possible 63-bit value + if (snowflake <= maxPossibleId) { + return true; + } + } + + return false; +}; From 755686c4b6c49b1560dd0ff4734d70fefc66e01b Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:19:04 +0800 Subject: [PATCH 334/740] fix(transform): cache key (#17361) * fix(transform): cache key * update --- lib/routes/rsshub/transform/html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/rsshub/transform/html.ts b/lib/routes/rsshub/transform/html.ts index e6288d3169cfbd2..96e463d65b256ca 100644 --- a/lib/routes/rsshub/transform/html.ts +++ b/lib/routes/rsshub/transform/html.ts @@ -124,7 +124,7 @@ Specify options (in the format of query string) in parameter \`routeParams\` par return item; } - return cache.tryGet(item.link, async () => { + return cache.tryGet(`transform:${item.link}:${itemContentSelector}`, async () => { const response = await got({ method: 'get', url: item.link, From 58cce2282dff30901ced35fa2d836b9eaf69c47c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AA=92=E6=81=AF=E5=BE=97=E9=B1=BC?= <39975240+zhixideyu@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:46:22 +0800 Subject: [PATCH 335/740] feat(route): add appstare (#17348) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 新增appstare * 完善 * fix: typo --------- Co-authored-by: 张凯龙 <zhangkailong@192.168.0.3> --- lib/routes/appstare/comments.ts | 57 ++++++++++++++++++++++++++++++++ lib/routes/appstare/namespace.ts | 6 ++++ 2 files changed, 63 insertions(+) create mode 100644 lib/routes/appstare/comments.ts create mode 100644 lib/routes/appstare/namespace.ts diff --git a/lib/routes/appstare/comments.ts b/lib/routes/appstare/comments.ts new file mode 100644 index 000000000000000..8db1faf2f7f4491 --- /dev/null +++ b/lib/routes/appstare/comments.ts @@ -0,0 +1,57 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const handler = async (ctx) => { + const country = ctx.req.param('country'); + const appid = ctx.req.param('appid'); + const url = `https://monitor.appstare.net/spider/appComments?country=${country}&appId=${appid}`; + const data = await ofetch(url); + + const items = data.map((item) => ({ + title: item.title, + description: ` + <div style="font-size: 1.2em; color: #FFD700;">${'⭐️'.repeat(Math.floor(item.rating))}</div> + <p>${item.review}</p> + `, + pubDate: new Date(item.date).toUTCString(), + })); + + const link = `https://appstare.net/data/app/comment/${appid}/${country}`; + + return { + title: 'App Comments', + appID: appid, + country, + item: items, + link, + allowEmpty: true, + }; +}; + +export const route: Route = { + path: '/comments/:country/:appid', + name: 'Comments', + url: 'appstare.net/', + example: '/appstare/comments/cn/989673964', + maintainers: ['zhixideyu'], + handler, + parameters: { + country: 'App Store country code, e.g., US, CN', + appid: 'Unique App Store application identifier (app id)', + }, + categories: ['program-update'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['appstare.net/'], + }, + ], + description: 'Retrieve only the comments of the app from the past 7 days.', +}; diff --git a/lib/routes/appstare/namespace.ts b/lib/routes/appstare/namespace.ts new file mode 100644 index 000000000000000..3efc0382b2a398b --- /dev/null +++ b/lib/routes/appstare/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'AppStare', + url: 'appstare.net', +}; From 374c8656034e086d25d8d2ca13f5cd2fd740b26f Mon Sep 17 00:00:00 2001 From: asong <xiaoshame@users.noreply.github.com> Date: Wed, 30 Oct 2024 12:02:55 +0800 Subject: [PATCH 336/740] feat(route): add bbs guozaoke route (#17170) * add routes guozaoke * add routes guozaoke * fix ESLint Check warning * fix ESLint Check warning * fix ESLint Check warning * fix ESLint Check warning * fix ESLint Check warning * fix routes guozaoke code review * fix routes guozaoke code review * fix route code review * fix code revice issue * fix code revice issue * fix code revice issue * fix code revice issue * fix code revice issue * fix code revice issue * fix code review issues * fix code review issues --- lib/config.ts | 6 ++ lib/routes/guozaoke/index.ts | 99 ++++++++++++++++++++++++++++++++ lib/routes/guozaoke/namespace.ts | 6 ++ 3 files changed, 111 insertions(+) create mode 100644 lib/routes/guozaoke/index.ts create mode 100644 lib/routes/guozaoke/namespace.ts diff --git a/lib/config.ts b/lib/config.ts index 8833e95cc868470..217bb65e2933288 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -151,6 +151,9 @@ export type Config = { google: { fontsApiKey?: string; }; + guozaoke: { + cookies?: string; + }; hefeng: { key?: string; }; @@ -551,6 +554,9 @@ const calculateValue = () => { google: { fontsApiKey: envs.GOOGLE_FONTS_API_KEY, }, + guozaoke: { + cookies: envs.GUOZAOKE_COOKIES, + }, hefeng: { // weather key: envs.HEFENG_KEY, diff --git a/lib/routes/guozaoke/index.ts b/lib/routes/guozaoke/index.ts new file mode 100644 index 000000000000000..d8fe2c35e0a8487 --- /dev/null +++ b/lib/routes/guozaoke/index.ts @@ -0,0 +1,99 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +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'; + +export const route: Route = { + path: '/default', + categories: ['bbs'], + example: '/guozaoke/default', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '过早客', + maintainers: ['xiaoshame'], + handler, + url: 'guozaoke.com/', +}; + +async function handler() { + const url = 'https://www.guozaoke.com/'; + const res = await got({ + method: 'get', + url, + headers: { + Cookie: config.guozaoke.cookies, + 'User-Agent': config.ua, + }, + }); + const $ = load(res.data); + + const list = $('div.topic-item').toArray(); + const maxItems = 20; // 最多取20个数据 + + const items = list + .slice(0, maxItems) + .map((item) => { + const $item = $(item); + const title = $item.find('h3.title a').text(); + const url = $item.find('h3.title a').attr('href'); + const author = $item.find('span.username a').text(); + const lastTouched = $item.find('span.last-touched').text(); + const pubDate = parseRelativeDate(lastTouched); + const link = url ? url.split('#')[0] : undefined; + return link ? { title, link, author, pubDate } : undefined; + }) + .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 $ = 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 += '<br>' + item.author + ': ' + item.comment; + } + } + item.description = content; + return item; + }) + )) { + out.push(result); + } + + return { + title: '过早客', + link: url, + item: out, + }; +} diff --git a/lib/routes/guozaoke/namespace.ts b/lib/routes/guozaoke/namespace.ts new file mode 100644 index 000000000000000..386ab893f881260 --- /dev/null +++ b/lib/routes/guozaoke/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'guozaoke', + url: 'guozaoke.com', +}; From c72446556ffc1ac2f7f48e17af4bf337246d346b Mon Sep 17 00:00:00 2001 From: liyaozhong <yun.zhongyue@163.com> Date: Wed, 30 Oct 2024 12:18:54 +0800 Subject: [PATCH 337/740] feat(route/cookbook): Add OpenAICookbook (#17196) * feat(route/cookbook): Add OpenAICookbook fix(route/cookbook): add missing example & follow the guidelines fix(route/cookbook): use ofetch fix(route/cookbook): delete duplicated namespace.ts fix(route/cookbook): lint issues * fix: use namespace `openai` --------- --- lib/routes/openai/blog.ts | 2 +- lib/routes/openai/chatgpt.ts | 2 +- lib/routes/openai/cookbook.ts | 77 +++++++++++++++++++++++++++++++++++ lib/routes/openai/research.ts | 2 +- 4 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 lib/routes/openai/cookbook.ts diff --git a/lib/routes/openai/blog.ts b/lib/routes/openai/blog.ts index b7814380c271630..5f77ffc8d920e8f 100644 --- a/lib/routes/openai/blog.ts +++ b/lib/routes/openai/blog.ts @@ -5,7 +5,7 @@ import { getApiUrl, parseArticle } from './common'; export const route: Route = { path: '/blog/:tag?', - categories: ['new-media'], + categories: ['programming'], example: '/openai/blog', parameters: { tag: 'Tag, see below, All by default' }, features: { diff --git a/lib/routes/openai/chatgpt.ts b/lib/routes/openai/chatgpt.ts index 507dc15a54facce..15aba9dde7dd8c0 100644 --- a/lib/routes/openai/chatgpt.ts +++ b/lib/routes/openai/chatgpt.ts @@ -10,7 +10,7 @@ dayjs.extend(isSameOrBefore); export const route: Route = { path: '/chatgpt/release-notes', - categories: ['new-media'], + categories: ['program-update'], example: '/openai/chatgpt/release-notes', parameters: {}, features: { diff --git a/lib/routes/openai/cookbook.ts b/lib/routes/openai/cookbook.ts new file mode 100644 index 000000000000000..e0f87f909428816 --- /dev/null +++ b/lib/routes/openai/cookbook.ts @@ -0,0 +1,77 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import { load } from 'cheerio'; +import logger from '@/utils/logger'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/cookbook', + categories: ['programming'], + description: + 'OpenAI Cookbook 提供了大量使用 OpenAI API 的实用指南和示例代码,涵盖了从基础到高级的各种主题,包括 GPT 模型、嵌入、函数调用、微调等。这里汇集了最新的 API 功能介绍和流行的应用案例,是开发者学习和应用 OpenAI 技术的宝贵资源。', + maintainers: ['liyaozhong'], + radar: [ + { + source: ['cookbook.openai.com/'], + }, + ], + url: 'cookbook.openai.com/', + handler, + example: '/openai/cookbook', + name: 'Cookbook', +}; + +async function handler() { + const rootUrl = 'https://cookbook.openai.com'; + const currentUrl = `${rootUrl}/`; + + try { + const response = await ofetch(currentUrl); + const $ = load(response); + + let items = $('[class="min-h-[90vh]"] .grid a') + .toArray() + .map((element) => { + const $element = $(element); + const $title = $element.find('div.font-semibold.text-sm.text-primary.line-clamp-1.overflow-ellipsis'); + const $date = $element.find(String.raw`span.text-xs.text-muted-foreground.md\:w-24.text-end`); + const $author = $element.find('p:contains("OpenAI")'); + const $tags = $element.find('span[style^="color:"]'); + + return { + title: $title.text().trim(), + link: `${rootUrl}/${$element.attr('href')}`, + pubDate: $date.text().trim(), + author: $author.text().replace('OpenAI', '').trim(), + category: $tags.toArray().map((tag) => $(tag).text().trim()), + }; + }); + + items = ( + await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + try { + const detailResponse = await ofetch(item.link); + const $ = load(detailResponse); + + item.description = $(String.raw`article.prose.prose-sm.sm\:prose-base.max-w-none.dark\:prose-invert`).html(); + return item; + } catch { + return { ...item, description: '' }; + } + }) + ) + ) + ).filter((item) => item?.description); + + return { + title: 'OpenAI Cookbook', + link: currentUrl, + item: items, + }; + } catch (error) { + logger.error(`处理 OpenAI Cookbook 请求时发生错误: ${error}`); + throw error; + } +} diff --git a/lib/routes/openai/research.ts b/lib/routes/openai/research.ts index 9a6dba2352596ab..b0a0b0e6f50532d 100644 --- a/lib/routes/openai/research.ts +++ b/lib/routes/openai/research.ts @@ -4,7 +4,7 @@ import { getApiUrl, parseArticle } from './common'; export const route: Route = { path: '/research', - categories: ['new-media'], + categories: ['programming'], example: '/openai/research', parameters: {}, features: { From 79d2c7f83dc8f517c5924796cf2654a87c818467 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Wed, 30 Oct 2024 20:33:41 +0800 Subject: [PATCH 338/740] fix(route/bilibili): fix followings video bvid path (#17377) --- lib/routes/bilibili/followings-video.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/bilibili/followings-video.ts b/lib/routes/bilibili/followings-video.ts index e215af645812ae6..7f34ab44341d9d5 100644 --- a/lib/routes/bilibili/followings-video.ts +++ b/lib/routes/bilibili/followings-video.ts @@ -10,7 +10,7 @@ export const route: Route = { path: '/followings/video/:uid/:embed?', categories: ['social-media'], example: '/bilibili/followings/video/2267573', - parameters: { uid: '用户 id', embed: '默认为开启内嵌视频, 任意值为关闭' }, + parameters: { uid: '用户 id', embed: '默认为开启内嵌视频,任意值为关闭' }, features: { requireConfig: [ { @@ -69,9 +69,9 @@ async function handler(ctx) { return { title: card_data.title, - description: utils.renderUGCDescription(embed, card_data.pic, card_data.desc, card_data.aid, undefined, card_data.bvid), + description: utils.renderUGCDescription(embed, card_data.pic, card_data.desc, card_data.aid, undefined, card.desc.bvid), pubDate: new Date(card_data.pubdate * 1000).toUTCString(), - link: card_data.pubdate > utils.bvidTime && card_data.bvid ? `https://www.bilibili.com/video/${card_data.bvid}` : `https://www.bilibili.com/video/av${card_data.aid}`, + link: card_data.pubdate > utils.bvidTime && card.desc.bvid ? `https://www.bilibili.com/video/${card.desc.bvid}` : `https://www.bilibili.com/video/av${card_data.aid}`, author: card.desc.user_profile.info.uname, }; }); From 3e23c6909dd9c735d41aadda50e1666a9fbbac78 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 05:34:29 -0700 Subject: [PATCH 339/740] chore(deps-dev): bump @typescript-eslint/parser from 8.12.1 to 8.12.2 (#17372) * chore(deps-dev): bump @typescript-eslint/parser from 8.12.1 to 8.12.2 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.12.1 to 8.12.2. - [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.12.2/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 216 ++++++++++++++++++++++++------------------------- 2 files changed, 109 insertions(+), 109 deletions(-) diff --git a/package.json b/package.json index 589ffec734b9d4f..81629a6d108c8bd 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "@types/title": "3.4.3", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.12.1", - "@typescript-eslint/parser": "8.12.1", + "@typescript-eslint/parser": "8.12.2", "@vercel/nft": "0.27.5", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.103", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ed6d7aebe4e1507..c715a5d875239ad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -344,10 +344,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.12.1 - version: 8.12.1(@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) + version: 8.12.1(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/parser': - specifier: 8.12.1 - version: 8.12.1(eslint@9.13.0)(typescript@5.6.3) + specifier: 8.12.2 + version: 8.12.2(eslint@9.13.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.5 version: 0.27.5 @@ -1607,93 +1607,93 @@ packages: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} engines: {node: '>= 8.0.0'} - '@rollup/rollup-android-arm-eabi@4.24.2': - resolution: {integrity: sha512-ufoveNTKDg9t/b7nqI3lwbCG/9IJMhADBNjjz/Jn6LxIZxD7T5L8l2uO/wD99945F1Oo8FvgbbZJRguyk/BdzA==} + '@rollup/rollup-android-arm-eabi@4.24.3': + resolution: {integrity: sha512-ufb2CH2KfBWPJok95frEZZ82LtDl0A6QKTa8MoM+cWwDZvVGl5/jNb79pIhRvAalUu+7LD91VYR0nwRD799HkQ==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.24.2': - resolution: {integrity: sha512-iZoYCiJz3Uek4NI0J06/ZxUgwAfNzqltK0MptPDO4OR0a88R4h0DSELMsflS6ibMCJ4PnLvq8f7O1d7WexUvIA==} + '@rollup/rollup-android-arm64@4.24.3': + resolution: {integrity: sha512-iAHpft/eQk9vkWIV5t22V77d90CRofgR2006UiCjHcHJFVI1E0oBkQIAbz+pLtthFw3hWEmVB4ilxGyBf48i2Q==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.24.2': - resolution: {integrity: sha512-/UhrIxobHYCBfhi5paTkUDQ0w+jckjRZDZ1kcBL132WeHZQ6+S5v9jQPVGLVrLbNUebdIRpIt00lQ+4Z7ys4Rg==} + '@rollup/rollup-darwin-arm64@4.24.3': + resolution: {integrity: sha512-QPW2YmkWLlvqmOa2OwrfqLJqkHm7kJCIMq9kOz40Zo9Ipi40kf9ONG5Sz76zszrmIZZ4hgRIkez69YnTHgEz1w==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.24.2': - resolution: {integrity: sha512-1F/jrfhxJtWILusgx63WeTvGTwE4vmsT9+e/z7cZLKU8sBMddwqw3UV5ERfOV+H1FuRK3YREZ46J4Gy0aP3qDA==} + '@rollup/rollup-darwin-x64@4.24.3': + resolution: {integrity: sha512-KO0pN5x3+uZm1ZXeIfDqwcvnQ9UEGN8JX5ufhmgH5Lz4ujjZMAnxQygZAVGemFWn+ZZC0FQopruV4lqmGMshow==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.24.2': - resolution: {integrity: sha512-1YWOpFcGuC6iGAS4EI+o3BV2/6S0H+m9kFOIlyFtp4xIX5rjSnL3AwbTBxROX0c8yWtiWM7ZI6mEPTI7VkSpZw==} + '@rollup/rollup-freebsd-arm64@4.24.3': + resolution: {integrity: sha512-CsC+ZdIiZCZbBI+aRlWpYJMSWvVssPuWqrDy/zi9YfnatKKSLFCe6fjna1grHuo/nVaHG+kiglpRhyBQYRTK4A==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.24.2': - resolution: {integrity: sha512-3qAqTewYrCdnOD9Gl9yvPoAoFAVmPJsBvleabvx4bnu1Kt6DrB2OALeRVag7BdWGWLhP1yooeMLEi6r2nYSOjg==} + '@rollup/rollup-freebsd-x64@4.24.3': + resolution: {integrity: sha512-F0nqiLThcfKvRQhZEzMIXOQG4EeX61im61VYL1jo4eBxv4aZRmpin6crnBJQ/nWnCsjH5F6J3W6Stdm0mBNqBg==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.24.2': - resolution: {integrity: sha512-ArdGtPHjLqWkqQuoVQ6a5UC5ebdX8INPuJuJNWRe0RGa/YNhVvxeWmCTFQ7LdmNCSUzVZzxAvUznKaYx645Rig==} + '@rollup/rollup-linux-arm-gnueabihf@4.24.3': + resolution: {integrity: sha512-KRSFHyE/RdxQ1CSeOIBVIAxStFC/hnBgVcaiCkQaVC+EYDtTe4X7z5tBkFyRoBgUGtB6Xg6t9t2kulnX6wJc6A==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.24.2': - resolution: {integrity: sha512-B6UHHeNnnih8xH6wRKB0mOcJGvjZTww1FV59HqJoTJ5da9LCG6R4SEBt6uPqzlawv1LoEXSS0d4fBlHNWl6iYw==} + '@rollup/rollup-linux-arm-musleabihf@4.24.3': + resolution: {integrity: sha512-h6Q8MT+e05zP5BxEKz0vi0DhthLdrNEnspdLzkoFqGwnmOzakEHSlXfVyA4HJ322QtFy7biUAVFPvIDEDQa6rw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.24.2': - resolution: {integrity: sha512-kr3gqzczJjSAncwOS6i7fpb4dlqcvLidqrX5hpGBIM1wtt0QEVtf4wFaAwVv8QygFU8iWUMYEoJZWuWxyua4GQ==} + '@rollup/rollup-linux-arm64-gnu@4.24.3': + resolution: {integrity: sha512-fKElSyXhXIJ9pqiYRqisfirIo2Z5pTTve5K438URf08fsypXrEkVmShkSfM8GJ1aUyvjakT+fn2W7Czlpd/0FQ==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.24.2': - resolution: {integrity: sha512-TDdHLKCWgPuq9vQcmyLrhg/bgbOvIQ8rtWQK7MRxJ9nvaxKx38NvY7/Lo6cYuEnNHqf6rMqnivOIPIQt6H2AoA==} + '@rollup/rollup-linux-arm64-musl@4.24.3': + resolution: {integrity: sha512-YlddZSUk8G0px9/+V9PVilVDC6ydMz7WquxozToozSnfFK6wa6ne1ATUjUvjin09jp34p84milxlY5ikueoenw==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.24.2': - resolution: {integrity: sha512-xv9vS648T3X4AxFFZGWeB5Dou8ilsv4VVqJ0+loOIgDO20zIhYfDLkk5xoQiej2RiSQkld9ijF/fhLeonrz2mw==} + '@rollup/rollup-linux-powerpc64le-gnu@4.24.3': + resolution: {integrity: sha512-yNaWw+GAO8JjVx3s3cMeG5Esz1cKVzz8PkTJSfYzE5u7A+NvGmbVFEHP+BikTIyYWuz0+DX9kaA3pH9Sqxp69g==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.24.2': - resolution: {integrity: sha512-tbtXwnofRoTt223WUZYiUnbxhGAOVul/3StZ947U4A5NNjnQJV5irKMm76G0LGItWs6y+SCjUn/Q0WaMLkEskg==} + '@rollup/rollup-linux-riscv64-gnu@4.24.3': + resolution: {integrity: sha512-lWKNQfsbpv14ZCtM/HkjCTm4oWTKTfxPmr7iPfp3AHSqyoTz5AgLemYkWLwOBWc+XxBbrU9SCokZP0WlBZM9lA==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.24.2': - resolution: {integrity: sha512-gc97UebApwdsSNT3q79glOSPdfwgwj5ELuiyuiMY3pEWMxeVqLGKfpDFoum4ujivzxn6veUPzkGuSYoh5deQ2Q==} + '@rollup/rollup-linux-s390x-gnu@4.24.3': + resolution: {integrity: sha512-HoojGXTC2CgCcq0Woc/dn12wQUlkNyfH0I1ABK4Ni9YXyFQa86Fkt2Q0nqgLfbhkyfQ6003i3qQk9pLh/SpAYw==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.24.2': - resolution: {integrity: sha512-jOG/0nXb3z+EM6SioY8RofqqmZ+9NKYvJ6QQaa9Mvd3RQxlH68/jcB/lpyVt4lCiqr04IyaC34NzhUqcXbB5FQ==} + '@rollup/rollup-linux-x64-gnu@4.24.3': + resolution: {integrity: sha512-mnEOh4iE4USSccBOtcrjF5nj+5/zm6NcNhbSEfR3Ot0pxBwvEn5QVUXcuOwwPkapDtGZ6pT02xLoPaNv06w7KQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.24.2': - resolution: {integrity: sha512-XAo7cJec80NWx9LlZFEJQxqKOMz/lX3geWs2iNT5CHIERLFfd90f3RYLLjiCBm1IMaQ4VOX/lTC9lWfzzQm14Q==} + '@rollup/rollup-linux-x64-musl@4.24.3': + resolution: {integrity: sha512-rMTzawBPimBQkG9NKpNHvquIUTQPzrnPxPbCY1Xt+mFkW7pshvyIS5kYgcf74goxXOQk0CP3EoOC1zcEezKXhw==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.24.2': - resolution: {integrity: sha512-A+JAs4+EhsTjnPQvo9XY/DC0ztaws3vfqzrMNMKlwQXuniBKOIIvAAI8M0fBYiTCxQnElYu7mLk7JrhlQ+HeOw==} + '@rollup/rollup-win32-arm64-msvc@4.24.3': + resolution: {integrity: sha512-2lg1CE305xNvnH3SyiKwPVsTVLCg4TmNCF1z7PSHX2uZY2VbUpdkgAllVoISD7JO7zu+YynpWNSKAtOrX3AiuA==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.24.2': - resolution: {integrity: sha512-ZhcrakbqA1SCiJRMKSU64AZcYzlZ/9M5LaYil9QWxx9vLnkQ9Vnkve17Qn4SjlipqIIBFKjBES6Zxhnvh0EAEw==} + '@rollup/rollup-win32-ia32-msvc@4.24.3': + resolution: {integrity: sha512-9SjYp1sPyxJsPWuhOCX6F4jUMXGbVVd5obVpoVEi8ClZqo52ViZewA6eFz85y8ezuOA+uJMP5A5zo6Oz4S5rVQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.24.2': - resolution: {integrity: sha512-2mLH46K1u3r6uwc95hU+OR9q/ggYMpnS7pSp83Ece1HUQgF9Nh/QwTK5rcgbFnV9j+08yBrU5sA/P0RK2MSBNA==} + '@rollup/rollup-win32-x64-msvc@4.24.3': + resolution: {integrity: sha512-HGZgRFFYrMrP3TJlq58nR1xy8zHKId25vhmm5S9jETEfDf6xybPxsavFTJaufe2zgOGYJBskGlj49CwtEuFhWQ==} cpu: [x64] os: [win32] @@ -1933,8 +1933,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.12.1': - resolution: {integrity: sha512-I/I9Bg7qFa8rOgBnUUHIWTgzbB5wVkSLX+04xGUzTcJUtdq/I2uHWR9mbW6qUYJG/UmkuDcTax5JHvoEWOAHOQ==} + '@typescript-eslint/parser@8.12.2': + resolution: {integrity: sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2344,8 +2344,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001674: - resolution: {integrity: sha512-jOsKlZVRnzfhLojb+Ykb+gyUSp9Xb57So+fAiFlLzzTKpqg8xxSav0e40c8/4F/v9N8QSvrRRaLeVzQbLqomYw==} + caniuse-lite@1.0.30001675: + resolution: {integrity: sha512-/wV1bQwPrkLiQMjaJF5yUMVM/VdRPOCU8QZ+PmG6uW6DvYSrNY1bpwHI/3mOcUosLaJCzYDi5o91IQB51ft6cg==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -2986,8 +2986,8 @@ packages: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-scope@8.1.0: - resolution: {integrity: sha512-14dSvlhaVhKKsa9Fx1l8A17s7ah7Ef7wCakJ10LYk6+GYmP9yDti2oq2SEwcyndt6knfcZyhyxwY3i9yL78EQw==} + eslint-scope@8.2.0: + resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint-summary@1.0.0: @@ -2998,8 +2998,8 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-visitor-keys@4.1.0: - resolution: {integrity: sha512-Q7lok0mqMUSf5a/AdAZkA5a/gHcO6snwQClVNNvFKCAVlxXucdU8pKydU5ZVZjBx5xr37vGbFFWtLQYreLzrZg==} + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} eslint@8.57.1: @@ -3022,8 +3022,8 @@ packages: resolution: {integrity: sha512-kTUIGKQ/mDPFoJ0oVfcmyJn4iBDRptjNVIzwIFR7tqWXdVI9xfA2RMwY/gbSpJG3lkdWNEjLap/NqVHZiJsdfg==} engines: {node: '>=0.10'} - espree@10.2.0: - resolution: {integrity: sha512-upbkBJbckcCNBDBDXEbuhjbP68n+scUd3k/U2EkyM9nw+I/jPiL4cLF/Al06CF96wRltFda16sxDFrxsI1v0/g==} + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} espree@9.6.1: @@ -4906,8 +4906,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup@4.24.2: - resolution: {integrity: sha512-do/DFGq5g6rdDhdpPq5qb2ecoczeK6y+2UAjdJ5trjQJj5f1AiVdLRWRc9A9/fFukfvJRgM0UXzxBIYMovm5ww==} + rollup@4.24.3: + resolution: {integrity: sha512-HBW896xR5HGmoksbi3JBDtmVzWiPAYqp7wip50hjQ67JbDz61nyoMPdqu1DvVW9asYb2M65Z20ZHsyJCMqMyDg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -6758,7 +6758,7 @@ snapshots: dependencies: ajv: 6.12.6 debug: 4.3.7 - espree: 10.2.0 + espree: 10.3.0 globals: 14.0.0 ignore: 5.3.2 import-fresh: 3.3.0 @@ -7131,58 +7131,58 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/rollup-android-arm-eabi@4.24.2': + '@rollup/rollup-android-arm-eabi@4.24.3': optional: true - '@rollup/rollup-android-arm64@4.24.2': + '@rollup/rollup-android-arm64@4.24.3': optional: true - '@rollup/rollup-darwin-arm64@4.24.2': + '@rollup/rollup-darwin-arm64@4.24.3': optional: true - '@rollup/rollup-darwin-x64@4.24.2': + '@rollup/rollup-darwin-x64@4.24.3': optional: true - '@rollup/rollup-freebsd-arm64@4.24.2': + '@rollup/rollup-freebsd-arm64@4.24.3': optional: true - '@rollup/rollup-freebsd-x64@4.24.2': + '@rollup/rollup-freebsd-x64@4.24.3': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.24.2': + '@rollup/rollup-linux-arm-gnueabihf@4.24.3': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.24.2': + '@rollup/rollup-linux-arm-musleabihf@4.24.3': optional: true - '@rollup/rollup-linux-arm64-gnu@4.24.2': + '@rollup/rollup-linux-arm64-gnu@4.24.3': optional: true - '@rollup/rollup-linux-arm64-musl@4.24.2': + '@rollup/rollup-linux-arm64-musl@4.24.3': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.24.2': + '@rollup/rollup-linux-powerpc64le-gnu@4.24.3': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.24.2': + '@rollup/rollup-linux-riscv64-gnu@4.24.3': optional: true - '@rollup/rollup-linux-s390x-gnu@4.24.2': + '@rollup/rollup-linux-s390x-gnu@4.24.3': optional: true - '@rollup/rollup-linux-x64-gnu@4.24.2': + '@rollup/rollup-linux-x64-gnu@4.24.3': optional: true - '@rollup/rollup-linux-x64-musl@4.24.2': + '@rollup/rollup-linux-x64-musl@4.24.3': optional: true - '@rollup/rollup-win32-arm64-msvc@4.24.2': + '@rollup/rollup-win32-arm64-msvc@4.24.3': optional: true - '@rollup/rollup-win32-ia32-msvc@4.24.2': + '@rollup/rollup-win32-ia32-msvc@4.24.3': optional: true - '@rollup/rollup-win32-x64-msvc@4.24.2': + '@rollup/rollup-win32-x64-msvc@4.24.3': optional: true '@rss3/api-core@0.0.23': @@ -7259,8 +7259,8 @@ snapshots: dependencies: '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) eslint: 9.13.0 - eslint-visitor-keys: 4.1.0 - espree: 10.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 estraverse: 5.3.0 picomatch: 4.0.2 transitivePeerDependencies: @@ -7427,10 +7427,10 @@ snapshots: '@types/node': 22.8.2 optional: true - '@typescript-eslint/eslint-plugin@8.12.1(@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.12.1(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.12.1(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.12.2(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.12.1 '@typescript-eslint/type-utils': 8.12.1(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/utils': 8.12.1(eslint@9.13.0)(typescript@5.6.3) @@ -7445,12 +7445,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.12.1(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.12.1 - '@typescript-eslint/types': 8.12.1 - '@typescript-eslint/typescript-estree': 8.12.1(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.12.1 + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/types': 8.12.2 + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.12.2 debug: 4.3.7 eslint: 9.13.0 optionalDependencies: @@ -7853,7 +7853,7 @@ snapshots: browserslist@4.24.2: dependencies: - caniuse-lite: 1.0.30001674 + caniuse-lite: 1.0.30001675 electron-to-chromium: 1.5.49 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -7928,7 +7928,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001674: {} + caniuse-lite@1.0.30001675: {} caseless@0.12.0: {} @@ -8641,7 +8641,7 @@ snapshots: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-scope@8.1.0: + eslint-scope@8.2.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -8653,7 +8653,7 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint-visitor-keys@4.1.0: {} + eslint-visitor-keys@4.2.0: {} eslint@8.57.1: dependencies: @@ -8717,9 +8717,9 @@ snapshots: cross-spawn: 7.0.3 debug: 4.3.7 escape-string-regexp: 4.0.0 - eslint-scope: 8.1.0 - eslint-visitor-keys: 4.1.0 - espree: 10.2.0 + eslint-scope: 8.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -8745,11 +8745,11 @@ snapshots: event-emitter: 0.3.5 type: 2.7.3 - espree@10.2.0: + espree@10.3.0: dependencies: acorn: 8.14.0 acorn-jsx: 5.3.2(acorn@8.14.0) - eslint-visitor-keys: 4.1.0 + eslint-visitor-keys: 4.2.0 espree@9.6.1: dependencies: @@ -10852,28 +10852,28 @@ snapshots: dependencies: glob: 7.2.3 - rollup@4.24.2: + rollup@4.24.3: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.24.2 - '@rollup/rollup-android-arm64': 4.24.2 - '@rollup/rollup-darwin-arm64': 4.24.2 - '@rollup/rollup-darwin-x64': 4.24.2 - '@rollup/rollup-freebsd-arm64': 4.24.2 - '@rollup/rollup-freebsd-x64': 4.24.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.24.2 - '@rollup/rollup-linux-arm-musleabihf': 4.24.2 - '@rollup/rollup-linux-arm64-gnu': 4.24.2 - '@rollup/rollup-linux-arm64-musl': 4.24.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.24.2 - '@rollup/rollup-linux-riscv64-gnu': 4.24.2 - '@rollup/rollup-linux-s390x-gnu': 4.24.2 - '@rollup/rollup-linux-x64-gnu': 4.24.2 - '@rollup/rollup-linux-x64-musl': 4.24.2 - '@rollup/rollup-win32-arm64-msvc': 4.24.2 - '@rollup/rollup-win32-ia32-msvc': 4.24.2 - '@rollup/rollup-win32-x64-msvc': 4.24.2 + '@rollup/rollup-android-arm-eabi': 4.24.3 + '@rollup/rollup-android-arm64': 4.24.3 + '@rollup/rollup-darwin-arm64': 4.24.3 + '@rollup/rollup-darwin-x64': 4.24.3 + '@rollup/rollup-freebsd-arm64': 4.24.3 + '@rollup/rollup-freebsd-x64': 4.24.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.3 + '@rollup/rollup-linux-arm-musleabihf': 4.24.3 + '@rollup/rollup-linux-arm64-gnu': 4.24.3 + '@rollup/rollup-linux-arm64-musl': 4.24.3 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.3 + '@rollup/rollup-linux-riscv64-gnu': 4.24.3 + '@rollup/rollup-linux-s390x-gnu': 4.24.3 + '@rollup/rollup-linux-x64-gnu': 4.24.3 + '@rollup/rollup-linux-x64-musl': 4.24.3 + '@rollup/rollup-win32-arm64-msvc': 4.24.3 + '@rollup/rollup-win32-ia32-msvc': 4.24.3 + '@rollup/rollup-win32-x64-msvc': 4.24.3 fsevents: 2.3.3 rrweb-cssom@0.7.1: {} @@ -11541,7 +11541,7 @@ snapshots: dependencies: esbuild: 0.21.5 postcss: 8.4.47 - rollup: 4.24.2 + rollup: 4.24.3 optionalDependencies: '@types/node': 22.8.2 fsevents: 2.3.3 From 9c2fbeca019aba47209794cc100617b345918cee Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 05:34:56 -0700 Subject: [PATCH 340/740] chore(deps-dev): bump @types/node from 22.8.2 to 22.8.4 (#17376) * chore(deps-dev): bump @types/node from 22.8.2 to 22.8.4 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.8.2 to 22.8.4. - [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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 81629a6d108c8bd..8c896959b4db5d7 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.8.2", + "@types/node": "22.8.4", "@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 c715a5d875239ad..4100720e1556aeb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -325,8 +325,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.8.2 - version: 22.8.2 + specifier: 22.8.4 + version: 22.8.4 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -353,7 +353,7 @@ importers: version: 0.27.5 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.8.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.103 version: 0.37.103 @@ -419,10 +419,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.2)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.4)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.8.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1874,8 +1874,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.8.2': - resolution: {integrity: sha512-NzaRNFV+FZkvK/KLCsNdTvID0SThyrs5SHB6tsD/lajr22FGC73N2QeDPM2wHtVde8mgcXuSsHQkH5cX1pbPLw==} + '@types/node@22.8.4': + resolution: {integrity: sha512-SpNNxkftTJOPk0oN+y2bIqurEXHTA2AOZ3EJDDKeJ5VzkvvORSvmQXGQarcOzWV1ac7DCaPBEdMDxBsM+d8jWw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6830,7 +6830,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.8.2 + '@types/node': 22.8.4 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7304,12 +7304,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.8.2 + '@types/node': 22.8.4 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.8.2 + '@types/node': 22.8.4 '@types/html-to-text@9.0.4': {} @@ -7317,13 +7317,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.8.2 + '@types/node': 22.8.4 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.8.2 + '@types/node': 22.8.4 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7333,7 +7333,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.8.2 + '@types/node': 22.8.4 '@types/jsrsasign@10.5.13': {} @@ -7343,7 +7343,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.8.2 + '@types/node': 22.8.4 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7365,14 +7365,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.8.2 + '@types/node': 22.8.4 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.8.2 + '@types/node': 22.8.4 form-data: 4.0.1 - '@types/node@22.8.2': + '@types/node@22.8.4': dependencies: undici-types: 6.19.8 @@ -7386,7 +7386,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.8.2 + '@types/node': 22.8.4 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7400,7 +7400,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.8.2 + '@types/node': 22.8.4 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7424,7 +7424,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.8.2 + '@types/node': 22.8.4 optional: true '@typescript-eslint/eslint-plugin@8.12.1(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': @@ -7571,7 +7571,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.8.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7585,7 +7585,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.8.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10540,7 +10540,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.8.2 + '@types/node': 22.8.4 long: 5.2.3 proxy-agent@6.4.0: @@ -11508,13 +11508,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.8.2): + vite-node@2.0.5(@types/node@22.8.4): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.8.2) + vite: 5.4.10(@types/node@22.8.4) transitivePeerDependencies: - '@types/node' - less @@ -11526,27 +11526,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.2)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.4)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.10(@types/node@22.8.2) + vite: 5.4.10(@types/node@22.8.4) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.8.2): + vite@5.4.10(@types/node@22.8.4): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.3 optionalDependencies: - '@types/node': 22.8.2 + '@types/node': 22.8.4 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.8.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11564,11 +11564,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.8.2) - vite-node: 2.0.5(@types/node@22.8.2) + vite: 5.4.10(@types/node@22.8.4) + vite-node: 2.0.5(@types/node@22.8.4) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.8.2 + '@types/node': 22.8.4 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 01dce1d459be43fa0332576920b4af03e644afaf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 06:24:38 -0700 Subject: [PATCH 341/740] chore(deps): bump @scalar/hono-api-reference from 0.5.157 to 0.5.158 (#17373) * chore(deps): bump @scalar/hono-api-reference from 0.5.157 to 0.5.158 Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.157 to 0.5.158. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 8c896959b4db5d7..f18720d2a5f54e3 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.23", - "@scalar/hono-api-reference": "0.5.157", + "@scalar/hono-api-reference": "0.5.158", "@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 4100720e1556aeb..33045533e543d23 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: 0.0.23 version: 0.0.23 '@scalar/hono-api-reference': - specifier: 0.5.157 - version: 0.5.157(hono@4.6.8) + specifier: 0.5.158 + version: 0.5.158(hono@4.6.8) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1706,8 +1706,8 @@ packages: '@rss3/sdk@0.0.23': resolution: {integrity: sha512-1cF1AqLU0k6dMwqQ5Fch3rOAbh4UXJ4UZLtOwzp/RWyGoCvu3lUOUIdJF41omunuH/JJSP2z6rJTPj4S6a60eg==} - '@scalar/hono-api-reference@0.5.157': - resolution: {integrity: sha512-Y/w4YqNIq5+DscERF54MPF97rZSs19wkFfvgM6O/Aw8rJLFjWY0Jlom2kylRXrTVinkaql7KWjr720yvp0oMiw==} + '@scalar/hono-api-reference@0.5.158': + resolution: {integrity: sha512-2P7l/ivuC/RWpAKddLtkqIZ89TA5/QlpfEBrdpH9/yjn4NpR5XkbtT+/8uZVELCyjfUMpGcaNXrxuJERFJ3sxA==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -1716,8 +1716,8 @@ packages: resolution: {integrity: sha512-+wRXgmqzgDnj8Dxqf4OOPMPo4or/LRd1Bsy4pnrIW0yBt8rKSdtBb+jH/aRnhgDDmKVjWxJ+KFk7WlSKvZwNTw==} engines: {node: '>=18'} - '@scalar/types@0.0.17': - resolution: {integrity: sha512-wUrvNnYFMULsHENX/9TP3oyECRTtZsP06mOZU+RlWg9sRtzWVTjlBCahkgUETL93J+Bz2RLFSKVgPyNN4fpIpA==} + '@scalar/types@0.0.18': + resolution: {integrity: sha512-gfJB/e9Rq/vjsiWlNwBkaIAZVb9v5guHQB5uVoVFcU0gdAuXni0KVxFxl3gGTu2zhBdB+DkixjyPcNzpqwksmA==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7200,14 +7200,14 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.157(hono@4.6.8)': + '@scalar/hono-api-reference@0.5.158(hono@4.6.8)': dependencies: - '@scalar/types': 0.0.17 + '@scalar/types': 0.0.18 hono: 4.6.8 '@scalar/openapi-types@0.1.4': {} - '@scalar/types@0.0.17': + '@scalar/types@0.0.18': dependencies: '@scalar/openapi-types': 0.1.4 '@unhead/schema': 1.11.10 From cc55dbf85bf7e969a4e3d957d517690b2d82ee67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 30 Oct 2024 06:44:41 -0700 Subject: [PATCH 342/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin from 8.12.1 to 8.12.2 (#17375) * chore(deps-dev): bump @typescript-eslint/eslint-plugin Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.12.1 to 8.12.2. - [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.12.2/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 93 ++++++++------------------------------------------ 2 files changed, 15 insertions(+), 80 deletions(-) diff --git a/package.json b/package.json index f18720d2a5f54e3..352dd106f12ea1c 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.12.1", + "@typescript-eslint/eslint-plugin": "8.12.2", "@typescript-eslint/parser": "8.12.2", "@vercel/nft": "0.27.5", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 33045533e543d23..cbdaf292e59f20a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -343,8 +343,8 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.12.1 - version: 8.12.1(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) + specifier: 8.12.2 + version: 8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.12.2 version: 8.12.2(eslint@9.13.0)(typescript@5.6.3) @@ -1922,8 +1922,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.12.1': - resolution: {integrity: sha512-gNg/inLRcPoBsKKIe4Vv38SVSOhk4BKWNO0T56sVff33gRqtTpOsrhHtiOKD1lmIOmCtZMPaW2x/h2FlM+sCEg==} + '@typescript-eslint/eslint-plugin@8.12.2': + resolution: {integrity: sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1943,16 +1943,12 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.12.1': - resolution: {integrity: sha512-bma6sD1iViTt+y9MAwDlBdPTMCqoH/BNdcQk4rKhIZWv3eM0xHmzeSrPJA663PAqFqfpOmtdugycpr0E1mZDVA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.12.2': resolution: {integrity: sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.12.1': - resolution: {integrity: sha512-zJzrvbDVjIzVKV2TGHcjembEhws8RWXJhmqfO9hS2gRXBN0gDwGhRPEdJ6AZglzfJ+YA1q09EWpSLSXjBJpIMQ==} + '@typescript-eslint/type-utils@8.12.2': + resolution: {integrity: sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -1960,23 +1956,10 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.12.1': - resolution: {integrity: sha512-anMS4es5lxBe4UVcDXOkcDb3csnm5BvaNIbOFfvy/pJEohorsggdVB8MFbl5EZiEuBnZZ0ei1z7W5b6FdFiV1Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.12.2': resolution: {integrity: sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.12.1': - resolution: {integrity: sha512-k/o9khHOckPeDXilFTIPsP9iAYhhdMh3OsOL3i2072PNpFqhqzRHx472/0DeC8H/WZee3bZG0z2ddGRSPgeOKw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.12.2': resolution: {integrity: sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1986,22 +1969,12 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.12.1': - resolution: {integrity: sha512-sDv9yFHrhKe1WN8EYuzfhKCh/sFRupe9P+m/lZ5YgVvPoCUGHNN50IO4llSu7JAbftUM/QcCh+GeCortXPrBYQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.12.2': resolution: {integrity: sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.12.1': - resolution: {integrity: sha512-2RwdwnNGuOQKdGjuhujQHUqBZhEuodg2sLVPvOfWktvA9sOXOVqARjOyHSyhN2LiJGKxV6c8oOcmOtRcAnEeFw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.12.2': resolution: {integrity: sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7427,14 +7400,14 @@ snapshots: '@types/node': 22.8.4 optional: true - '@typescript-eslint/eslint-plugin@8.12.1(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.12.2(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.12.1 - '@typescript-eslint/type-utils': 8.12.1(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.1(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.12.1 + '@typescript-eslint/scope-manager': 8.12.2 + '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.12.2 eslint: 9.13.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7458,20 +7431,15 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.12.1': - dependencies: - '@typescript-eslint/types': 8.12.1 - '@typescript-eslint/visitor-keys': 8.12.1 - '@typescript-eslint/scope-manager@8.12.2': dependencies: '@typescript-eslint/types': 8.12.2 '@typescript-eslint/visitor-keys': 8.12.2 - '@typescript-eslint/type-utils@8.12.1(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.12.2(eslint@9.13.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.12.1(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.1(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.3.0(typescript@5.6.3) optionalDependencies: @@ -7480,25 +7448,8 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@8.12.1': {} - '@typescript-eslint/types@8.12.2': {} - '@typescript-eslint/typescript-estree@8.12.1(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 8.12.1 - '@typescript-eslint/visitor-keys': 8.12.1 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.12.2(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.12.2 @@ -7514,17 +7465,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.12.1(eslint@9.13.0)(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) - '@typescript-eslint/scope-manager': 8.12.1 - '@typescript-eslint/types': 8.12.1 - '@typescript-eslint/typescript-estree': 8.12.1(typescript@5.6.3) - eslint: 9.13.0 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.12.2(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) @@ -7536,11 +7476,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.12.1': - dependencies: - '@typescript-eslint/types': 8.12.1 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.12.2': dependencies: '@typescript-eslint/types': 8.12.2 From 7ff06d22ebd77608ecb0b31c13a45a47d151f213 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Thu, 31 Oct 2024 12:59:21 +0800 Subject: [PATCH 343/740] fix(bsky): use avatar for image (#17381) --- lib/routes/bsky/posts.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index 959fb3378964beb..dda7eb999ec31ab 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -82,7 +82,7 @@ async function handler(ctx) { title: `${profile.displayName} (@${profile.handle}) — Bluesky`, description: profile.description?.replaceAll('\n', ' '), link: `https://bsky.app/profile/${profile.handle}`, - image: profile.banner, + image: profile.avatar, icon: profile.avatar, logo: profile.avatar, item: items, From a69ff2fa7bae1835ba0bfdbd6b6b7f2793bdfa69 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 31 Oct 2024 13:27:57 +0700 Subject: [PATCH 344/740] feat(route/dianping): add dianping user route --- lib/config.ts | 6 ++ lib/routes/dianping/namespace.ts | 6 ++ lib/routes/dianping/user.ts | 148 +++++++++++++++++++++++++++++++ 3 files changed, 160 insertions(+) create mode 100644 lib/routes/dianping/namespace.ts create mode 100644 lib/routes/dianping/user.ts diff --git a/lib/config.ts b/lib/config.ts index 217bb65e2933288..2d7437bdf16f751 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -97,6 +97,9 @@ export type Config = { civitai: { cookie?: string; }; + dianping: { + cookie?: string; + }; dida365: { username?: string; password?: string; @@ -500,6 +503,9 @@ const calculateValue = () => { civitai: { cookie: envs.CIVITAI_COOKIE, }, + dianping: { + cookie: envs.DIANPING_COOKIE, + }, dida365: { username: envs.DIDA365_USERNAME, password: envs.DIDA365_PASSWORD, diff --git a/lib/routes/dianping/namespace.ts b/lib/routes/dianping/namespace.ts new file mode 100644 index 000000000000000..e73a9f7d9360b70 --- /dev/null +++ b/lib/routes/dianping/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '大众点评', + url: 'dianping.com', +}; diff --git a/lib/routes/dianping/user.ts b/lib/routes/dianping/user.ts new file mode 100644 index 000000000000000..8a0de081ec796ef --- /dev/null +++ b/lib/routes/dianping/user.ts @@ -0,0 +1,148 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { config } from '@/config'; + +function addPictureAndVideo(item: any) { + let content = ''; + content += item.pictureList ? item.pictureList.map((ele: any) => `<img src="${ele.picUrl}" />`).join('<br>') : ''; + content += item.videoUrl ? `<img src="${item.videoUrl}" />` : ''; + return content; +} + +export const route: Route = { + path: '/user/:id', + categories: ['shopping'], + example: '/dianping/user/808259118', + parameters: { id: 'User id' }, + features: { + requireConfig: [ + { + name: 'DIANPING_COOKIE', + optional: false, + description: 'Cookie for Dianping', + }, + ], + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['dianping.com/member/:id'], + target: '/dianping/user/:id', + }, + ], + name: 'User', + maintainers: ['pseudoyu'], + handler, + description: 'Get user reviews, check-ins, guides.', +}; + +const starMap: Record<number, string> = { + 0: '无', + 10: '一星', + 20: '二星', + 30: '三星', + 35: '三星半', + 40: '四星', + 45: '四星半', + 50: '五星', +}; + +async function handler(ctx) { + const id = ctx.req.param('id'); + + const userAgent = '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 userPage = `https://m.dianping.com/userprofile/${id}`; + const cookie = config.dianping.cookie; + + const headers: Record<string, string> = { + 'User-Agent': userAgent, + Referer: userPage, + }; + + if (cookie) { + headers.Cookie = cookie; + } + + const pageResponse = await ofetch(userPage, { + headers, + }); + + const nickNameReg = /window\.nickName = "(.*?)"/g; + const nickName = nickNameReg.exec(pageResponse as string)?.[1]; + + const response = await ofetch(`https://m.dianping.com/member/ajax/NobleUserFeeds?userId=${id}`, { + headers, + }); + + const data = response.data; + + const items = data.map((item: any) => { + let link = ''; + let title = ''; + let content = ''; + + const poi = item.poi ? `地点:<a href="http://www.dianping.com/shop/${item.poi.shopId}">${item.poi.name} - ${item.poi.regionCategory}</a>` : ''; + const poiName = item.poi ? item.poi.name : ''; + + switch (item.feedType) { + case 1101: + // 签到成功 + link = `https://m.dianping.com/ugcdetail/${item.mainId}?sceneType=0&bizType=3`; + content = poi; + title = `签到成功: ${poiName} `; + + break; + + case 101: + // 对商户、地点发布点评 + link = `https://m.dianping.com/ugcdetail/${item.mainId}?sceneType=0&bizType=1`; + content = item.content.replaceAll(/\n+/g, '<br>') + '<br>'; + content += `评分:${starMap[item.star]}<br>`; + content += poi + '<br>'; + content += addPictureAndVideo(item); + title = `发布点评: ${poiName}`; + + break; + + case 131: + // 发布点评 + link = `https://m.dianping.com/ugcdetail/${item.mainId}?sceneType=0&bizType=29`; + content = item.content.replaceAll(/\n+/g, '<br>') + '<br>'; + content += addPictureAndVideo(item); + title = `发布点评: ${content}`; + + break; + + case 4208: + // 发布攻略 + link = `https://m.dianping.com/cityinsight/${item.mainId}`; + content = item.content.replaceAll(/\n+/g, '<br>') + '<br>'; + content += poi + '<br>'; + content += item.moreDesc ? `<a href='${link}'>${item.moreDesc}</a><br>` : ''; + content += addPictureAndVideo(item); + title = `发布攻略: ${poiName}`; + + break; + + default: + // Do nothing + } + + return { + description: content, + title, + link, + }; + }); + + return { + title: `大众点评 - ${nickName}`, + link: userPage, + description: `大众点评 - ${nickName}`, + item: items, + }; +} From 161aeed299101afaf0e44c2ad2a013cd60f831cf Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 31 Oct 2024 15:37:45 +0700 Subject: [PATCH 345/740] fix(route/bilibili): modify clear cookie logic --- lib/routes/bilibili/cache.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/routes/bilibili/cache.ts b/lib/routes/bilibili/cache.ts index 102b776f181213a..35201081e6b8aa1 100644 --- a/lib/routes/bilibili/cache.ts +++ b/lib/routes/bilibili/cache.ts @@ -7,7 +7,7 @@ import logger from '@/utils/logger'; import puppeteer from '@/utils/puppeteer'; import { JSDOM } from 'jsdom'; -let disableConfigCookie = false; +const disableConfigCookie = false; const getCookie = () => { if (!disableConfigCookie && Object.keys(config.bilibili.cookies).length > 0) { @@ -49,7 +49,6 @@ const getCookie = () => { const clearCookie = () => { cache.set('bili-cookie'); - disableConfigCookie = true; }; const getRenderData = (uid) => { From e900ae6e9146367d9612b7f05990a1ccc73907aa Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 31 Oct 2024 15:49:11 +0700 Subject: [PATCH 346/740] fix(route/bilibili): remove clear cache logics --- lib/routes/bilibili/cache.ts | 5 ----- lib/routes/bilibili/dynamic.ts | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/routes/bilibili/cache.ts b/lib/routes/bilibili/cache.ts index 35201081e6b8aa1..395f1b0f9a94546 100644 --- a/lib/routes/bilibili/cache.ts +++ b/lib/routes/bilibili/cache.ts @@ -47,10 +47,6 @@ const getCookie = () => { }); }; -const clearCookie = () => { - cache.set('bili-cookie'); -}; - const getRenderData = (uid) => { const key = 'bili-web-render-data'; return cache.tryGet(key, async () => { @@ -280,7 +276,6 @@ const getArticleDataFromCvid = async (cvid, uid) => { export default { getCookie, - clearCookie, getWbiVerifyString, getUsernameFromUID, getUsernameAndFaceFromUID, diff --git a/lib/routes/bilibili/dynamic.ts b/lib/routes/bilibili/dynamic.ts index 194d0857b980313..b5b21cf88f7e56a 100644 --- a/lib/routes/bilibili/dynamic.ts +++ b/lib/routes/bilibili/dynamic.ts @@ -243,8 +243,7 @@ async function handler(ctx) { }); const body = JSONbig.parse(response.body); if (body?.code === -352) { - cacheIn.clearCookie(); - throw new Error('The cookie has expired, please try again.'); + throw new Error('Request failed, please try again.'); } const items = (body as BilibiliWebDynamicResponse)?.data?.items; From d224d6782268f8aba09063e387d0ff251fb03988 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 31 Oct 2024 16:17:00 +0700 Subject: [PATCH 347/740] refactor(route/dianping): add param desc for dianping --- lib/routes/dianping/user.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/routes/dianping/user.ts b/lib/routes/dianping/user.ts index 8a0de081ec796ef..09cbf1b8fc700f3 100644 --- a/lib/routes/dianping/user.ts +++ b/lib/routes/dianping/user.ts @@ -2,24 +2,17 @@ import { Route } from '@/types'; import ofetch from '@/utils/ofetch'; import { config } from '@/config'; -function addPictureAndVideo(item: any) { - let content = ''; - content += item.pictureList ? item.pictureList.map((ele: any) => `<img src="${ele.picUrl}" />`).join('<br>') : ''; - content += item.videoUrl ? `<img src="${item.videoUrl}" />` : ''; - return content; -} - export const route: Route = { path: '/user/:id', categories: ['shopping'], example: '/dianping/user/808259118', - parameters: { id: 'User id' }, + parameters: { id: 'User id,打开网页端从 URL 中获取,在 `/member/:id` 中' }, features: { requireConfig: [ { name: 'DIANPING_COOKIE', optional: false, - description: 'Cookie for Dianping', + description: '大众点评的 Cookie', }, ], requirePuppeteer: false, @@ -30,16 +23,23 @@ export const route: Route = { }, radar: [ { - source: ['dianping.com/member/:id'], + source: ['dianping.com/member/:id', 'm.dianping.com/userprofile/:id'], target: '/dianping/user/:id', }, ], - name: 'User', + name: '用户动态', maintainers: ['pseudoyu'], handler, - description: 'Get user reviews, check-ins, guides.', + description: '获取用户点评、签到、攻略等动态。', }; +function addPictureAndVideo(item: any) { + let content = ''; + content += item.pictureList ? item.pictureList.map((ele: any) => `<img src="${ele.picUrl}" />`).join('<br>') : ''; + content += item.videoUrl ? `<img src="${item.videoUrl}" />` : ''; + return content; +} + const starMap: Record<number, string> = { 0: '无', 10: '一星', From 682c9439b7ad9f38c4f1ee20e3d26735ae36131c Mon Sep 17 00:00:00 2001 From: DIYgod <i@diygod.me> Date: Thu, 31 Oct 2024 22:42:48 +0800 Subject: [PATCH 348/740] fix(twitter): disable cookie updating --- lib/routes/twitter/api/web-api/utils.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index d01965943023d93..e1e9e322352c013 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -205,10 +205,10 @@ export const twitterGot = async ( }, }); - if (auth?.token) { - logger.debug(`twitter debug: update twitter cookie for token ${auth.token}`); - await cache.set(`twitter:cookie:${auth.token}`, JSON.stringify(dispatchers?.jar.serializeSync()), config.cache.contentExpire); - } + // if (auth?.token) { + // logger.debug(`twitter debug: update twitter cookie for token ${auth.token}`); + // await cache.set(`twitter:cookie:${auth.token}`, JSON.stringify(dispatchers?.jar.serializeSync()), config.cache.contentExpire); + // } return response._data; }; From a8b11c68e162e9f99a6fc85fc9ac0f3330a96fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=90=8C=E5=AD=A6?= <95062435+iQNRen@users.noreply.github.com> Date: Thu, 31 Oct 2024 22:58:23 +0800 Subject: [PATCH 349/740] =?UTF-8?q?feat(route):=20add=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=B3=89=E5=B7=9E=E5=B8=88=E8=8C=83=E5=AD=A6=E9=99=A2=20(#1739?= =?UTF-8?q?2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 添加泉州师范学院 * 修正home * 优化建议 --------- Co-authored-by: qnrs <2116377053@qq,com> --- lib/routes/qztc/home/index.ts | 100 ++++++++++++++++++++++++++++ lib/routes/qztc/jwc/index.ts | 120 ++++++++++++++++++++++++++++++++++ lib/routes/qztc/namespace.ts | 6 ++ lib/routes/qztc/sjxy/index.ts | 120 ++++++++++++++++++++++++++++++++++ 4 files changed, 346 insertions(+) create mode 100644 lib/routes/qztc/home/index.ts create mode 100644 lib/routes/qztc/jwc/index.ts create mode 100644 lib/routes/qztc/namespace.ts create mode 100644 lib/routes/qztc/sjxy/index.ts diff --git a/lib/routes/qztc/home/index.ts b/lib/routes/qztc/home/index.ts new file mode 100644 index 000000000000000..872255795c8f3aa --- /dev/null +++ b/lib/routes/qztc/home/index.ts @@ -0,0 +1,100 @@ +import { Data, Route } from '@/types'; +import cache from '@/utils/cache'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; +import timezone from '@/utils/timezone'; + +const rootUrl = 'https://www.qztc.edu.cn/'; + +export const route: Route = { + path: '/home/:type', + categories: ['university'], + example: '/qztc/home/2093', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '首页', + maintainers: ['iQNRen'], + url: 'www.qztc.edu.cn', + handler, + radar: [ + { + source: ['www.qztc.edu.cn/:type/list.htm'], + target: '/home/:type', + }, + ], + description: `| 板块 | 参数 | +| ------- | ------- | +| 泉师新闻 | 2093 | +| 通知公告 | 2094 | +| 采购公告 | 2095 | +| 学术资讯 | xszx | +| 招聘信息 | 2226 | +`, +}; + +async function handler(ctx) { + const type = ctx.req.param('type'); + // const type = Number.parseInt(ctx.req.param('type')); + const response = await ofetch(rootUrl + type + '/list.htm'); + const $ = load(response); + + const list = $('.news.clearfix') + .toArray() + .map((item) => { + const cheerioItem = $(item); + const a = cheerioItem.find('a'); + + try { + const title = a.attr('title') || ''; + let link = a.attr('href'); + if (!link) { + link = ''; + } else if (!link.startsWith('http')) { + link = rootUrl.slice(0, -1) + link; + } + const pubDate = timezone(parseDate(cheerioItem.find('.news_meta').text()), +8); + + return { + title, + link, + pubDate, + }; + } catch { + return { + title: '', + link: '', + pubDate: Date.now(), + }; + } + }) + .filter((item) => item.title && item.link); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const newItem = { + ...item, + description: '', + }; + const response = await ofetch(item.link); + const $ = load(response); + newItem.description = $('.wp_articlecontent').html() || ''; + return newItem; + }) + ) + ); + + return { + title: $('head > title').text() + ' - 泉州师范学院-首页', + link: rootUrl + type + '/list.htm', + item: items, + } as Data; +} diff --git a/lib/routes/qztc/jwc/index.ts b/lib/routes/qztc/jwc/index.ts new file mode 100644 index 000000000000000..e536f3053dd44b1 --- /dev/null +++ b/lib/routes/qztc/jwc/index.ts @@ -0,0 +1,120 @@ +import { Data, Route } from '@/types'; +import cache from '@/utils/cache'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; +import timezone from '@/utils/timezone'; + +const rootUrl = 'https://www.qztc.edu.cn/jwc/'; +const host = 'www.qztc.edu.cn'; + +export const route: Route = { + path: '/jwc/:type', + categories: ['university'], + example: '/qztc/jwc/jwdt', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '教务处', + maintainers: ['iQNRen'], + url: 'www.qztc.edu.cn', + handler, + radar: [ + { + source: ['www.qztc.edu.cn/jwc/:type/list.htm'], + target: '/jwc/:type', + }, + ], + description: `| 板块 | 参数 | +| ------- | ------- | +| 教务动态 | jwdt | +| 首 页 | 1020 | +| 岗位介绍 | 1021 | +| 管理文件 | 1022 | +| 教学教改 | 1023 | +| 办事指南 | 1024 | +| 通知公告 | 1025 | +| 下载中心 | 1026 | +| 对外交流 | 1027 | +| 政策文件 | 1028 | +| 会议纪要 | 1029 | +`, + // | 学院简介 | 1949 | + // | 学院领导 | 1950 | + // | 组织机构 | 1951 | +}; + +async function handler(ctx) { + const type = ctx.req.param('type'); + // const type = Number.parseInt(ctx.req.param('type')); + const response = await ofetch(rootUrl + type + '/list.htm'); + const $ = load(response); + + const list = $('.news.clearfix') + .toArray() + .map((item) => { + const cheerioItem = $(item); + const a = cheerioItem.find('a'); + + try { + const title = a.attr('title') || ''; + let link = a.attr('href'); + if (!link) { + link = ''; + } else if (!link.startsWith('http')) { + link = rootUrl.slice(0, -1) + link; + } + const pubDate = timezone(parseDate(cheerioItem.find('.news_meta').text()), +8); + + return { + title, + link, + pubDate, + }; + } catch { + return { + title: '', + link: '', + pubDate: Date.now(), + }; + } + }) + .filter((item) => item.title && item.link); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const newItem = { + ...item, + description: '', + }; + if (host === new URL(item.link).hostname) { + if (new URL(item.link).pathname.startsWith('/_upload')) { + // 链接为一个文件,直接返回链接 + newItem.description = item.link; + } else { + const response = await ofetch(item.link); + const $ = load(response); + newItem.description = $('.wp_articlecontent').html() || ''; + } + } else { + // 涉及到其他站点,不方便做统一的 html 解析,直接返回链接 + newItem.description = item.link; + } + return newItem; + }) + ) + ); + + return { + title: $('head > title').text() + ' - 泉州师范学院-教务处', + link: rootUrl + type + '/list.htm', + item: items, + } as Data; +} diff --git a/lib/routes/qztc/namespace.ts b/lib/routes/qztc/namespace.ts new file mode 100644 index 000000000000000..8fc4b20f2204ace --- /dev/null +++ b/lib/routes/qztc/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '泉州师范学院', + url: 'www.qztc.edu.cn', +}; diff --git a/lib/routes/qztc/sjxy/index.ts b/lib/routes/qztc/sjxy/index.ts new file mode 100644 index 000000000000000..0cea3be85b60246 --- /dev/null +++ b/lib/routes/qztc/sjxy/index.ts @@ -0,0 +1,120 @@ +import { Data, Route } from '@/types'; +import cache from '@/utils/cache'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; +import timezone from '@/utils/timezone'; + +const rootUrl = 'https://www.qztc.edu.cn/sjxy/'; +const host = 'www.qztc.edu.cn'; + +export const route: Route = { + path: '/sjxy/:type', + categories: ['university'], + example: '/qztc/sjxy/1939', + parameters: { type: '分类,见下表' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '数学与计算机科学学院 软件学院', + maintainers: ['iQNRen'], + url: 'www.qztc.edu.cn', + handler, + radar: [ + { + source: ['www.qztc.edu.cn/sjxy/:type/list.htm'], + target: '/sjxy/:type', + }, + ], + description: `| 板块 | 参数 | +| ------- | ------- | +| 学院概况 | 1938 | +| 学院动态 | 1939 | +| 学科建设 | 1940 | +| 教学教务 | 1941 | +| 人才培养 | 1942 | +| 科研工作 | 1943 | +| 党群工作 | 1944 | +| 团学工作 | 1945 | +| 资料下载 | 1947 | +| 采购信息 | 1948 | +| 信息公开 | xxgk | +`, + // | 学院简介 | 1949 | + // | 学院领导 | 1950 | + // | 组织机构 | 1951 | +}; + +async function handler(ctx) { + const type = ctx.req.param('type'); + // const type = Number.parseInt(ctx.req.param('type')); + const response = await ofetch(rootUrl + type + '/list.htm'); + const $ = load(response); + + const list = $('.news.clearfix') + .toArray() + .map((item) => { + const cheerioItem = $(item); + const a = cheerioItem.find('a'); + + try { + const title = a.attr('title') || ''; + let link = a.attr('href'); + if (!link) { + link = ''; + } else if (!link.startsWith('http')) { + link = rootUrl.slice(0, -1) + link; + } + const pubDate = timezone(parseDate(cheerioItem.find('.news_meta').text()), +8); + + return { + title, + link, + pubDate, + }; + } catch { + return { + title: '', + link: '', + pubDate: Date.now(), + }; + } + }) + .filter((item) => item.title && item.link); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const newItem = { + ...item, + description: '', + }; + if (host === new URL(item.link).hostname) { + if (new URL(item.link).pathname.startsWith('/_upload')) { + // 链接为一个文件,直接返回链接 + newItem.description = item.link; + } else { + const response = await ofetch(item.link); + const $ = load(response); + newItem.description = $('.wp_articlecontent').html() || ''; + } + } else { + // 涉及到其他站点,不方便做统一的 html 解析,直接返回链接 + newItem.description = item.link; + } + return newItem; + }) + ) + ); + + return { + title: $('head > title').text() + ' - 泉州师范学院-数学与计算机科学学院 软件学院', + link: rootUrl + type + '/list.htm', + item: items, + } as Data; +} From 2eef201d16c996805ec680db386dd55fe2017e84 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Thu, 31 Oct 2024 23:56:54 +0800 Subject: [PATCH 350/740] fix(route/twitter): Prevent storing empty cookie if obtaining such from `auth_token` failed. (#17232) --- lib/routes/twitter/api/web-api/utils.ts | 60 +++++++++++++------------ 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index e1e9e322352c013..21d865cfd042cbf 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -13,36 +13,40 @@ import login from './login'; let authTokenIndex = 0; -const token2Cookie = (token) => - cache.tryGet(`twitter:cookie:${token}`, async () => { - const jar = new CookieJar(); - jar.setCookieSync(`auth_token=${token}`, 'https://x.com'); - try { - const agent = proxy.proxyUri - ? new ProxyAgent({ - factory: (origin, opts) => new CookieClient(origin as string, { ...opts, cookies: { jar } }), - uri: proxy.proxyUri, - }) - : new CookieAgent({ cookies: { jar } }); - if (token) { - await ofetch('https://x.com', { - dispatcher: agent, - }); - } else { - const data = await ofetch('https://x.com/narendramodi?mx=2', { - dispatcher: agent, - }); - const gt = data.match(/document\.cookie="gt=(\d+)/)?.[1]; - if (gt) { - jar.setCookieSync(`gt=${gt}`, 'https://x.com'); - } +const token2Cookie = async (token) => { + if (cache.get(`twitter:cookie:${token}`)) { + return cache.get(`twitter:cookie:${token}`); + } + const jar = new CookieJar(); + jar.setCookieSync(`auth_token=${token}`, 'https://x.com'); + try { + const agent = proxy.proxyUri + ? new ProxyAgent({ + factory: (origin, opts) => new CookieClient(origin as string, { ...opts, cookies: { jar } }), + uri: proxy.proxyUri, + }) + : new CookieAgent({ cookies: { jar } }); + if (token) { + await ofetch('https://x.com', { + dispatcher: agent, + }); + } else { + const data = await ofetch('https://x.com/narendramodi?mx=2', { + dispatcher: agent, + }); + const gt = data.match(/document\.cookie="gt=(\d+)/)?.[1]; + if (gt) { + jar.setCookieSync(`gt=${gt}`, 'https://x.com'); } - return JSON.stringify(jar.serializeSync()); - } catch { - // ignore - return ''; } - }); + const cookie = JSON.stringify(jar.serializeSync()); + cache.set(`twitter:cookie:${token}`, cookie); + return cookie; + } catch { + // ignore + return ''; + } +}; const lockPrefix = 'twitter:lock-token1:'; From 4d518cc39866064cb4a4bc009d1a27369963e643 Mon Sep 17 00:00:00 2001 From: gogo100 <33028688+gogo-100@users.noreply.github.com> Date: Fri, 1 Nov 2024 00:23:15 +0800 Subject: [PATCH 351/740] =?UTF-8?q?feat(route/weread):=20add=20route=20?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E8=AF=BB=E4=B9=A6=20(#17367)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route/weread): add route 微信读书 * fix update types for better safety * fix --- lib/routes/qq/weread/category.ts | 120 +++++++++++++++++++++++++++++++ 1 file changed, 120 insertions(+) create mode 100644 lib/routes/qq/weread/category.ts diff --git a/lib/routes/qq/weread/category.ts b/lib/routes/qq/weread/category.ts new file mode 100644 index 000000000000000..410f728ca02bea2 --- /dev/null +++ b/lib/routes/qq/weread/category.ts @@ -0,0 +1,120 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/weread/:category', + categories: ['new-media'], + example: '/qq/weread/newbook', + parameters: { + category: '榜单名,见下表', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '微信读书榜单', + maintainers: ['gogo-100'], + handler, + description: `| 榜单 | 榜单名 | +| ---------------------- | ---------- | +| Top50飙升榜 | rising | +| Top50热搜榜 | hot_search | +| Top50新书榜 | newbook | +| Top50小说榜 | general_novel_rising | +| Top200总榜 | all | +| 神作榜 | newrating_publish | +| 神作潜力榜 | newrating_potential_publish | +| 精品小说 | 100000 | +| 历史 | 200000 | +| 文学 | 300000 | +| 艺术 | 400000 | +| 人物传记 | 500000 | +| 哲学宗教 | 600000 | +| 计算机 | 700000 | +| 心理 | 800000 | +| 社会文化 | 900000 | +| 个人成长 | 1000000 | +| 经济理财 | 1100000 | +| 政治军事 | 1200000 | +| 童书 | 1300000 | +| 教育学习 | 1400000 | +| 科学技术 | 1500000 | +| 生活百科 | 1600000 | +| 期刊杂志 | 1700000 | +| 原版书 | 1800000 | +| 男生小说 | 1900000 | +| 女生小说 | 2000000 | +| 医学健康 | 2100000 | + +还可以分得更细 见 https://weread.qq.com/web/category/100000 的小标题栏 +`, +}; + +async function handler(ctx) { + const category = ctx.req.param('category'); + + // 检查 category 是否是榜单,若否则全部为阿拉伯数字 + const isRank = /^\d+$/.test(category) ? 0 : 1; + + const LIMIT = category === 'all' ? 180 : 40; + const SIZE = 20; + + const urls = Array.from({ length: Math.ceil((LIMIT + 1) / SIZE) }, (_, index) => `https://weread.qq.com/web/bookListInCategory/${category}?maxIndex=${index * SIZE}&rank=${isRank}`); + + const responses = await Promise.all(urls.map((url) => ofetch(url))); + + const results = responses.flatMap((response) => + response.books.map((book) => { + const bookInfo = book.bookInfo; + return { + title: bookInfo.title, + description: `推荐值 ${bookInfo.newRating / 10}% ${bookInfo.newRatingDetail.title}|| ` + bookInfo.intro, + author: bookInfo.author, + guid: bookInfo.bookId, + itunes_item_image: bookInfo.cover, + }; + }) + ); + + const title = categoryTitles[category] || '书籍列表'; + return { + title: '微信读书 - ' + title, + link: `https://weread.qq.com/web/category/${category}`, + item: results, + }; +} + +const categoryTitles = { + rising: 'Top50飙升榜', + hot_search: 'Top50热搜榜', + newbook: 'Top50新书榜', + general_novel_rising: 'Top50小说榜', + all: 'Top200总榜', + newrating_publish: '神作榜', + newrating_potential_publish: '神作潜力榜', + '100000': '精品小说', + '200000': '历史', + '300000': '文学', + '400000': '艺术', + '500000': '人物传记', + '600000': '哲学宗教', + '700000': '计算机', + '800000': '心理', + '900000': '社会文化', + '1000000': '个人成长', + '1100000': '经济理财', + '1200000': '政治军事', + '1300000': '童书', + '1400000': '教育学习', + '1500000': '科学技术', + '1600000': '生活百科', + '1700000': '期刊杂志', + '1800000': '原版书', + '1900000': '男生小说', + '2000000': '女生小说', + '2100000': '医学健康', +}; From 7ef0be848f522861dbffd62dbf8b09708450dda4 Mon Sep 17 00:00:00 2001 From: liyaozhong <yun.zhongyue@163.com> Date: Fri, 1 Nov 2024 01:07:28 +0800 Subject: [PATCH 352/740] feat(route): add enterprisecraftsmanship (#17371) feat(route): fix issues --- lib/routes/enterprisecraftsmanship/index.ts | 74 +++++++++++++++++++ .../enterprisecraftsmanship/namespace.ts | 6 ++ 2 files changed, 80 insertions(+) create mode 100644 lib/routes/enterprisecraftsmanship/index.ts create mode 100644 lib/routes/enterprisecraftsmanship/namespace.ts diff --git a/lib/routes/enterprisecraftsmanship/index.ts b/lib/routes/enterprisecraftsmanship/index.ts new file mode 100644 index 000000000000000..044571c253b9949 --- /dev/null +++ b/lib/routes/enterprisecraftsmanship/index.ts @@ -0,0 +1,74 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import logger from '@/utils/logger'; +import { parseDate } from '@/utils/parse-date'; +import cache from '@/utils/cache'; + +export const route: Route = { + path: '/archives', + categories: ['blog'], + example: '/enterprisecraftsmanship/archives', + radar: [ + { + source: ['enterprisecraftsmanship.com/archives/'], + }, + ], + url: 'enterprisecraftsmanship.com/', + name: 'Archives', + maintainers: ['liyaozhong'], + handler, + description: 'Enterprise Craftsmanship blog archives', +}; + +async function handler() { + const rootUrl = 'https://enterprisecraftsmanship.com'; + const currentUrl = `${rootUrl}/archives`; + + const response = await got(currentUrl); + + const $ = load(response.data); + + let items = $('.postIndexItem') + .toArray() + .map((item) => { + const $item = $(item); + const title = $item.find('.title a').text().trim(); + const link = new URL($item.find('.title a').attr('href'), currentUrl).href; + const dateStr = $item.find('.date').text().trim(); + const pubDate = parseDate(dateStr); + + return { + title, + link, + pubDate, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + try { + const detailResponse = await got(item.link); + const $detail = load(detailResponse.data); + + // 获取 .post 内容,但排除 .post-info + const $post = $detail('.post'); + $post.find('.post-info').remove(); + item.description = $post.html(); + + return item; + } catch (error) { + logger.error(`处理文章 ${item.link} 时发生错误: ${error}`); + return item; + } + }) + ) + ); + + return { + title: 'Enterprise Craftsmanship - Archives', + link: currentUrl, + item: items, + }; +} diff --git a/lib/routes/enterprisecraftsmanship/namespace.ts b/lib/routes/enterprisecraftsmanship/namespace.ts new file mode 100644 index 000000000000000..3bf4dfa48f3eba2 --- /dev/null +++ b/lib/routes/enterprisecraftsmanship/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Enterprise Craftsmanship', + url: 'enterprisecraftsmanship.com', +}; From 0d3a6dc5895a66aa9be32e330848c088086acf0c Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 1 Nov 2024 02:18:35 +0700 Subject: [PATCH 353/740] fix(route/telegram): use tglib when no routeParams --- 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 9ec1cc6adbdbe95..c50e6b4bdfad05b 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -121,7 +121,7 @@ For backward compatibility reasons, invalid \`routeParams\` will be treated as \ }; async function handler(ctx) { - if (ctx.req.param('routeParams') && config.telegram.session) { + if (!ctx.req.param('routeParams') && config.telegram.session) { return tglibchannel(ctx); } From b0aba0f05a3b2563dddd3bdad8449d650c7e7112 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 1 Nov 2024 02:22:19 +0700 Subject: [PATCH 354/740] fix(route/telegram): only use tglib as fallback --- lib/routes/telegram/channel.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index c50e6b4bdfad05b..b3b19857d5e9942 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -121,10 +121,6 @@ For backward compatibility reasons, invalid \`routeParams\` will be treated as \ }; async function handler(ctx) { - if (!ctx.req.param('routeParams') && config.telegram.session) { - return tglibchannel(ctx); - } - const username = ctx.req.param('username'); let routeParams = ctx.req.param('routeParams'); let showLinkPreview = true; From b8c7278dc6512e677c634be22ba373f55ace88d0 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Fri, 1 Nov 2024 03:44:41 +0800 Subject: [PATCH 355/740] feat(route): add Counter Strike News (#17394) --- lib/routes/counter-strike/namespace.ts | 8 ++ lib/routes/counter-strike/news.ts | 144 +++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 lib/routes/counter-strike/namespace.ts create mode 100644 lib/routes/counter-strike/news.ts diff --git a/lib/routes/counter-strike/namespace.ts b/lib/routes/counter-strike/namespace.ts new file mode 100644 index 000000000000000..98157da3ccbe4a6 --- /dev/null +++ b/lib/routes/counter-strike/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Counter Strike', + url: 'counter-strike.net', + categories: ['game'], + description: '', +}; diff --git a/lib/routes/counter-strike/news.ts b/lib/routes/counter-strike/news.ts new file mode 100644 index 000000000000000..d7d5abc5c078956 --- /dev/null +++ b/lib/routes/counter-strike/news.ts @@ -0,0 +1,144 @@ +import { Route } from '@/types'; + +import got from '@/utils/got'; +import { load } from 'cheerio'; +import bbcode from 'bbcodejs'; +import { parseDate } from '@/utils/parse-date'; + +export const handler = async (ctx) => { + const { category = 'all', language = 'english' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 100; + + const rootUrl = 'https://www.counter-strike.net'; + const apiRootUrl = 'https://store.steampowered.com'; + const cdnRootUrl = 'https://media.st.dl.eccdnx.com'; + const currentUrl = new URL(`news${category && category !== 'all' ? `/${category}` : ''}${language ? `?l=${language}` : ''}`, rootUrl).href; + const apiUrl = new URL('events/ajaxgetpartnereventspageable/', apiRootUrl).href; + + const { data: response } = await got(apiUrl, { + searchParams: { + clan_accountid: 0, + appid: 730, + offset: 0, + count: limit, + l: language, + }, + }); + + const bbcodeParser = new bbcode.Parser(); + + const items = response.events + .filter((item) => (category === 'updates' ? item.event_type === 12 : item.event_type !== 12)) + .slice(0, limit) + .map((item) => { + const title = item.event_name; + const description = bbcodeParser.toHTML(item.announcement_body.body); + const guid = `counter-strike-news-${item.gid}`; + + return { + title, + description, + pubDate: parseDate(item.announcement_body.posttime, 'X'), + link: new URL(`newsentry/${item.gid}`, rootUrl).href, + category: item.announcement_body.tags, + guid, + id: guid, + content: { + html: description, + text: item.announcement_body.body, + }, + updated: parseDate(item.announcement_body.updatetime, 'X'), + }; + }); + + const { data: currentResponse } = await got(currentUrl); + + const $ = load(currentResponse); + + const author = 'Counter Strike'; + const image = new URL('apps/csgo/images/dota_react//blog/default_cover.jpg', cdnRootUrl).href; + + return { + title: `${author} - ${category === 'updates' ? 'Updates' : 'News'}`, + description: $('title').text(), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author, + language, + }; +}; + +export const route: Route = { + path: '/news/:category?/:language?', + name: 'News', + url: 'www.counter-strike.net', + maintainers: ['nczitzk'], + handler, + example: '/counter-strike/news', + parameters: { category: 'Category, `updates` or `all`, `all` by default', language: 'Language, english by default, see below for more languages' }, + description: `:::tip + 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). + ::: + + <details> + <summary>More languages</summary> + +| 语言代码 | 语言名称 | +| ------------------------------------------------- | ---------- | +| English | english | +| Español - España (Spanish - Spain) | spanish | +| Français (French) | french | +| Italiano (Italian) | italian | +| Deutsch (German) | german | +| Ελληνικά (Greek) | greek | +| 한국어 (Korean) | koreana | +| 简体中文 (Simplified Chinese) | schinese | +| 繁體中文 (Traditional Chinese) | tchinese | +| Русский (Russian) | russian | +| ไทย (Thai) | thai | +| 日本語 (Japanese) | japanese | +| Português (Portuguese) | portuguese | +| Português - Brasil (Portuguese - Brazil) | brazilian | +| Polski (Polish) | polish | +| Dansk (Danish) | danish | +| Nederlands (Dutch) | dutch | +| Suomi (Finnish) | finnish | +| Norsk (Norwegian) | norwegian | +| Svenska (Swedish) | swedish | +| Čeština (Czech) | czech | +| Magyar (Hungarian) | hungarian | +| Română (Romanian) | romanian | +| Български (Bulgarian) | bulgarian | +| Türkçe (Turkish) | turkish | +| Українська (Ukrainian) | ukrainian | +| Tiếng Việt (Vietnamese) | vietnamese | +| Español - Latinoamérica (Spanish - Latin America) | latam | + + </details> + `, + categories: ['game'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.counter-strike.net/news/:category'], + target: (params, url) => { + url = new URL(url); + const category = params.category; + const language = url.searchParams.get('l'); + + return `/news${category ? `/${category}${language ? `/${language}` : ''}` : ''}`; + }, + }, + ], +}; From c8496f370b0ddde572420620332511d0b848e726 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:01:21 -0700 Subject: [PATCH 356/740] fix(route): remove `title` from description (#17395) --- lib/routes/enterprisecraftsmanship/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/routes/enterprisecraftsmanship/index.ts b/lib/routes/enterprisecraftsmanship/index.ts index 044571c253b9949..135585483f6227d 100644 --- a/lib/routes/enterprisecraftsmanship/index.ts +++ b/lib/routes/enterprisecraftsmanship/index.ts @@ -53,9 +53,7 @@ async function handler() { const $detail = load(detailResponse.data); // 获取 .post 内容,但排除 .post-info - const $post = $detail('.post'); - $post.find('.post-info').remove(); - item.description = $post.html(); + item.description = ($detail('.post > .paragraph').html() ?? '') + ($detail('.post >.sect1').html() ?? ''); return item; } catch (error) { From bf1083de75568bca266f453d2cafb30406ffb7b6 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 31 Oct 2024 18:37:33 -0700 Subject: [PATCH 357/740] refactor: use bbob instead of bbcodejs (1point3acres) (#17396) * refactor: use bbob instead of bbcodejs (1point3acres) * refactor: use bbob instead of bbcodejs (counter-strike) * fix: minor fixes * fix(route/counter-strike/news): handle optional attributes in customPreset --- lib/routes/1point3acres/thread.ts | 4 +- lib/routes/1point3acres/utils.ts | 94 ++++++++++++++++++++++++++----- lib/routes/counter-strike/news.ts | 54 ++++++++++++++++-- package.json | 4 +- pnpm-lock.yaml | 72 ++++++++++++++++++++--- 5 files changed, 198 insertions(+), 30 deletions(-) diff --git a/lib/routes/1point3acres/thread.ts b/lib/routes/1point3acres/thread.ts index 6940d7536daa2bf..48987e0373d119f 100644 --- a/lib/routes/1point3acres/thread.ts +++ b/lib/routes/1point3acres/thread.ts @@ -3,7 +3,9 @@ import cache from '@/utils/cache'; import { rootUrl, apiRootUrl, types, ProcessThreads } from './utils'; export const route: Route = { - path: ['/post/:type?/:order?', '/thread/:type?/:order?'], + path: '/thread/:type?/:order?', + example: '/1point3acres/thread/hot', + parameters: { type: '帖子分类, 见下表,默认为 hot,即热门帖子', order: '排序方式,见下表,默认为空,即最新回复' }, name: '帖子', categories: ['bbs'], maintainers: ['EthanWng97', 'DIYgod', 'nczitzk'], diff --git a/lib/routes/1point3acres/utils.ts b/lib/routes/1point3acres/utils.ts index 01ecb09b0455699..c90830d36644cc1 100644 --- a/lib/routes/1point3acres/utils.ts +++ b/lib/routes/1point3acres/utils.ts @@ -5,7 +5,9 @@ import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -import bbcode from 'bbcodejs'; +import type { BBobCoreTagNodeTree } from '@bbob/types'; +import bbobHTML from '@bbob/html'; +import presetHTML5 from '@bbob/preset-html5'; const rootUrl = 'https://instant.1point3acres.com'; const apiRootUrl = 'https://api.1point3acres.com'; @@ -15,6 +17,17 @@ const types = { hot: '热门帖子', }; +const swapLinebreak = (tree: BBobCoreTagNodeTree) => + tree.walk((node) => { + if (typeof node === 'string' && node === '\n') { + return { + tag: 'br', + content: null, + }; + } + return node; + }); + const ProcessThreads = async (tryGet, apiUrl, order) => { const response = await got({ method: 'get', @@ -24,8 +37,6 @@ const ProcessThreads = async (tryGet, apiUrl, order) => { }, }); - const bbcodeParser = new bbcode.Parser(); - const items = await Promise.all( response.data.threads.map((item) => { const result = { @@ -48,20 +59,73 @@ const ProcessThreads = async (tryGet, apiUrl, order) => { }, }); - const data = detailResponse.data; + const thread = detailResponse.data.thread; + + const customPreset = presetHTML5.extend((tags) => ({ + ...tags, + attach: (node, { render }) => { + const id = render(node.content); + const attachment = thread.attachment_list.find((a) => a.aid === Number.parseInt(id)); + + if (attachment.isimage) { + return { + tag: 'img', + attrs: { + src: attachment.url, + }, + }; + } + + return { + tag: 'a', + attrs: { + href: `https://www.1point3acres.com/bbs/plugin.php?id=attachcenter:page&aid=${id}`, + rel: 'noopener', + target: '_blank', + }, + content: `https://www.1point3acres.com/bbs/plugin.php?id=attachcenter:page&aid=${id}`, + }; + }, + url: (node) => { + const link = Object.keys(node.attrs as Record<string, string>)[0]; + if (link.startsWith('https://link.1p3a.com/?url=')) { + const url = decodeURIComponent(link.replace('https://link.1p3a.com/?url=', '')); + return { + tag: 'a', + attrs: { + href: url, + rel: 'noopener', + target: '_blank', + }, + content: node.content, + }; + } + + return { + tag: 'a', + attrs: { + href: link, + rel: 'noopener', + target: '_blank', + }, + content: node.content, + }; + }, + })); - result.description = bbcodeParser.toHTML(data.thread.message_bbcode); + result.description = bbobHTML(thread.message_bbcode, [customPreset(), swapLinebreak]); - for (const a of data.thread.attachment_list) { - if (a.isimage === 1) { - result.description = result.description.replaceAll( - new RegExp(`\\[attach\\]${a.aid}\\[\\/attach\\]`, 'g'), - art(path.join(__dirname, 'templates/image.art'), { - url: a.url, - height: a.height, - width: a.width, - }) - ); + if (!thread.message_bbcode.includes('[attach]') && thread.attachment_list.length > 0) { + for (const a of thread.attachment_list) { + result.description += + a.isimage === 1 + ? '<br>' + + art(path.join(__dirname, 'templates/image.art'), { + url: a.url, + height: a.height, + width: a.width, + }) + : ''; } } } catch { diff --git a/lib/routes/counter-strike/news.ts b/lib/routes/counter-strike/news.ts index d7d5abc5c078956..7e4c2c6a1c74a54 100644 --- a/lib/routes/counter-strike/news.ts +++ b/lib/routes/counter-strike/news.ts @@ -1,10 +1,56 @@ import { Route } from '@/types'; +import type { BBobCoreTagNodeTree, PresetFactory } from '@bbob/types'; import got from '@/utils/got'; import { load } from 'cheerio'; -import bbcode from 'bbcodejs'; +import bbobHTML from '@bbob/html'; +import presetHTML5 from '@bbob/preset-html5'; import { parseDate } from '@/utils/parse-date'; +const swapLinebreak = (tree: BBobCoreTagNodeTree) => + tree.walk((node) => { + if (typeof node === 'string' && node === '\n') { + return { + tag: 'br', + content: null, + }; + } + return node; + }); + +const customPreset: PresetFactory = presetHTML5.extend((tags) => ({ + ...tags, + url: (node) => ({ + tag: 'a', + attrs: { + href: Object.keys(node.attrs as Record<string, string>)[0], + rel: 'noopener', + target: '_blank', + }, + content: node.content, + }), + video: (node, { render }) => ({ + tag: 'video', + attrs: { + controls: '', + preload: 'metadata', + poster: node.attrs?.poster, + }, + content: render( + Object.entries({ + webm: 'video/webm', + mp4: 'video/mp4', + }).map(([key, type]) => ({ + tag: 'source', + attrs: { + src: node.attrs?.[key], + type, + }, + })) + ), + }), +})); + export const handler = async (ctx) => { const { category = 'all', language = 'english' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 100; @@ -25,14 +71,12 @@ export const handler = async (ctx) => { }, }); - const bbcodeParser = new bbcode.Parser(); - const items = response.events - .filter((item) => (category === 'updates' ? item.event_type === 12 : item.event_type !== 12)) + .filter((item) => (category === 'updates' ? item.event_type === 12 : item.event_type)) .slice(0, limit) .map((item) => { const title = item.event_name; - const description = bbcodeParser.toHTML(item.announcement_body.body); + const description = bbobHTML(item.announcement_body.body, [customPreset(), swapLinebreak]); const guid = `counter-strike-news-${item.gid}`; return { diff --git a/package.json b/package.json index 352dd106f12ea1c..35a35b388df03c9 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,8 @@ "*.yml": "eslint --cache --fix" }, "dependencies": { + "@bbob/html": "4.1.1", + "@bbob/preset-html5": "4.1.1", "@hono/node-server": "1.13.3", "@hono/zod-openapi": "0.16.4", "@notionhq/client": "2.2.15", @@ -67,7 +69,6 @@ "@tonyrl/rand-user-agent": "2.0.81", "aes-js": "3.1.2", "art-template": "4.13.2", - "bbcodejs": "0.0.4", "cheerio": "1.0.0", "chrono-node": "2.7.7", "city-timezones": "1.3.0", @@ -137,6 +138,7 @@ "devDependencies": { "@babel/preset-env": "7.26.0", "@babel/preset-typescript": "7.26.0", + "@bbob/types": "4.1.1", "@eslint/eslintrc": "3.1.0", "@eslint/js": "9.13.0", "@microsoft/eslint-formatter-sarif": "3.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cbdaf292e59f20a..99fd097c303a070 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,12 @@ importers: .: dependencies: + '@bbob/html': + specifier: 4.1.1 + version: 4.1.1 + '@bbob/preset-html5': + specifier: 4.1.1 + version: 4.1.1 '@hono/node-server': specifier: 1.13.3 version: 1.13.3(hono@4.6.8) @@ -59,9 +65,6 @@ importers: art-template: specifier: 4.13.2 version: 4.13.2 - bbcodejs: - specifier: 0.0.4 - version: 0.0.4 cheerio: specifier: 1.0.0 version: 1.0.0 @@ -264,6 +267,9 @@ importers: '@babel/preset-typescript': specifier: 7.26.0 version: 7.26.0(@babel/core@7.26.0) + '@bbob/types': + specifier: 4.1.1 + version: 4.1.1 '@eslint/eslintrc': specifier: 3.1.0 version: 3.1.0 @@ -966,6 +972,27 @@ packages: resolution: {integrity: sha512-Z/yiTPj+lDVnF7lWeKCIJzaIkI0vYO87dMpZ4bg4TDrFe4XXLFWL1TbXU27gBP3QccxV9mZICCrnjnYlJjXHOA==} engines: {node: '>=6.9.0'} + '@bbob/core@4.1.1': + resolution: {integrity: sha512-cH2Fi+K1R0lKlEcUk+vQbOWP3Lny+A/jyYvrN1pRL71TEdamvbvlb5vTT8dwtOs5hWKFxMsDOcIVchjVaZmiFg==} + + '@bbob/html@4.1.1': + resolution: {integrity: sha512-u1PsKlsM9os+TI9zqB2jh3CdGuZrNcGCAII/ZocgoW/asu49OXWQrcGHheJqBbeZLRagXMHYTWJ+W/DvDEgZ3g==} + + '@bbob/parser@4.1.1': + resolution: {integrity: sha512-pNSx4WWp9qBpUf8pgfINEAxtN0E829IPNdDioP8JNf2N3enFFrDWdkVq3TnEy2QWyTBhEA+n5ARMM+lSId1w5A==} + + '@bbob/plugin-helper@4.1.1': + resolution: {integrity: sha512-Ew7V2Yym+Os6wtiR4Se1irudFY5wLSTZGRNy8CSPq3QqBMk1LDi7phQvj8SFfqFCElG/UDciQb07lE7KQpiqbA==} + + '@bbob/preset-html5@4.1.1': + resolution: {integrity: sha512-9dgO0Jui2qYshObGezso9AU30dtFYGg0AfvxDONATkL+1lBpIvwUrL3Xj+gDUotAdRw6QHCaU0x+rplxa0CLnA==} + + '@bbob/preset@4.1.1': + resolution: {integrity: sha512-Qas/hd1jOoZiux9LyPDStxxbSM/qVyts3ZJmFFHa3uzT0d7mKrnHjnI7qahHdo7Ry8CyrvGDDD8qL2A4bIfMqA==} + + '@bbob/types@4.1.1': + resolution: {integrity: sha512-QnA0S8YpnEUFBV8KbU5DnqydDJaIFyxp656sWGLtvHqkxNGOOSRWc1m1YqFqfrHM7tmphr4AQybFeHqE1a2/2w==} + '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} @@ -2212,9 +2239,6 @@ packages: resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==} engines: {node: '>=10.0.0'} - bbcodejs@0.0.4: - resolution: {integrity: sha512-y7dPUdqXMMUeR0bBv/9hcLTMwkBRuVCK+9aJgYGYvdkIdXBfrEiEiVw5Cg8iluRCG7YzLFWoX6VEmNe1HeP0wA==} - bcrypt-pbkdf@1.0.2: resolution: {integrity: sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==} @@ -6525,6 +6549,40 @@ snapshots: '@babel/helper-string-parser': 7.25.9 '@babel/helper-validator-identifier': 7.25.9 + '@bbob/core@4.1.1': + dependencies: + '@bbob/parser': 4.1.1 + '@bbob/plugin-helper': 4.1.1 + '@bbob/types': 4.1.1 + + '@bbob/html@4.1.1': + dependencies: + '@bbob/core': 4.1.1 + '@bbob/plugin-helper': 4.1.1 + '@bbob/types': 4.1.1 + + '@bbob/parser@4.1.1': + dependencies: + '@bbob/plugin-helper': 4.1.1 + '@bbob/types': 4.1.1 + + '@bbob/plugin-helper@4.1.1': + dependencies: + '@bbob/types': 4.1.1 + + '@bbob/preset-html5@4.1.1': + dependencies: + '@bbob/plugin-helper': 4.1.1 + '@bbob/preset': 4.1.1 + '@bbob/types': 4.1.1 + + '@bbob/preset@4.1.1': + dependencies: + '@bbob/plugin-helper': 4.1.1 + '@bbob/types': 4.1.1 + + '@bbob/types@4.1.1': {} + '@bcoe/v8-coverage@0.2.3': {} '@bundled-es-modules/cookie@2.0.0': @@ -7743,8 +7801,6 @@ snapshots: basic-ftp@5.0.5: {} - bbcodejs@0.0.4: {} - bcrypt-pbkdf@1.0.2: dependencies: tweetnacl: 0.14.5 From c93720bb34bbbfe329380c54da9195a148af14ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 22:32:49 +0800 Subject: [PATCH 358/740] chore(deps): bump lru-cache from 11.0.1 to 11.0.2 (#17400) * chore(deps): bump lru-cache from 11.0.1 to 11.0.2 Bumps [lru-cache](https://github.com/isaacs/node-lru-cache) from 11.0.1 to 11.0.2. - [Changelog](https://github.com/isaacs/node-lru-cache/blob/main/CHANGELOG.md) - [Commits](https://github.com/isaacs/node-lru-cache/compare/v11.0.1...v11.0.2) --- updated-dependencies: - dependency-name: lru-cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install * chore: bump to pnpm 9.12.3 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 +- pnpm-lock.yaml | 118 ++++++++++++++++++++++++------------------------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/package.json b/package.json index 35a35b388df03c9..e2816b90ee25a2c 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "jsdom": "25.0.1", "json-bigint": "1.0.0", "jsrsasign": "10.9.0", - "lru-cache": "11.0.1", + "lru-cache": "11.0.2", "lz-string": "1.5.0", "mailparser": "3.7.1", "markdown-it": "14.1.0", @@ -194,7 +194,7 @@ "vitest": "2.0.5", "yaml-eslint-parser": "1.2.3" }, - "packageManager": "pnpm@9.12.2", + "packageManager": "pnpm@9.12.3", "engines": { "node": ">=22" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 99fd097c303a070..edfdb08ee078537 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -147,8 +147,8 @@ importers: specifier: 10.9.0 version: 10.9.0 lru-cache: - specifier: 11.0.1 - version: 11.0.1 + specifier: 11.0.2 + version: 11.0.2 lz-string: specifier: 1.5.0 version: 1.5.0 @@ -447,20 +447,20 @@ packages: '@babel/code-frame@7.0.0': resolution: {integrity: sha512-OfC2uemaknXr87bdLUkWog7nYuliM9Ij5HUcajsVcMCpQrcLmtxRbVFTIqmcSkSeYRBFBRxs2FiUqFJDLdiebA==} - '@babel/code-frame@7.26.0': - resolution: {integrity: sha512-INCKxTtbXtcNbUZ3YXutwMpEleqttcswhAdee7dhuoVrD2cnuc3PqtERBtxkX5nziX9vnBL8WXmSGwv8CuPV6g==} + '@babel/code-frame@7.26.2': + resolution: {integrity: sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==} engines: {node: '>=6.9.0'} - '@babel/compat-data@7.26.0': - resolution: {integrity: sha512-qETICbZSLe7uXv9VE8T/RWOdIE5qqyTucOt4zLYMafj2MRO271VGgLd4RACJMeBO37UPWhXiKMBk7YlJ0fOzQA==} + '@babel/compat-data@7.26.2': + resolution: {integrity: sha512-Z0WgzSEa+aUcdiJuCIqgujCshpMWgUpgOxXotrYPSA53hA3qopNaqcJpyr0hVb1FeWdnqFA35/fUtXgBK8srQg==} engines: {node: '>=6.9.0'} '@babel/core@7.26.0': resolution: {integrity: sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==} engines: {node: '>=6.9.0'} - '@babel/generator@7.26.0': - resolution: {integrity: sha512-/AIkAmInnWwgEAJGQr9vY0c66Mj6kjkE2ZPB1PurTRaRAh3U+J45sAQMjQDJdh4WbR3l0x5xkimXBKyBXXAu2w==} + '@babel/generator@7.26.2': + resolution: {integrity: sha512-zevQbhbau95nkoxSq3f/DC/SC+EEOUZd3DYqfSkMhY2/wfSeaHV1Ew4vk8e+x8lja31IbyuUa2uQ3JONqKbysw==} engines: {node: '>=6.9.0'} '@babel/helper-annotate-as-pure@7.25.9': @@ -558,8 +558,8 @@ packages: resolution: {integrity: sha512-llL88JShoCsth8fF8R4SJnIn+WLvR6ccFxu1H3FlMhDontdcmZWf2HgIZ7AIqV3Xcck1idlohrN4EUBQz6klbw==} engines: {node: '>=6.9.0'} - '@babel/parser@7.26.1': - resolution: {integrity: sha512-reoQYNiAJreZNsJzyrDNzFQ+IQ5JFiIzAHJg9bn94S3l+4++J7RsIhNMoB+lgP/9tpmiAQqspv+xfdxTSzREOw==} + '@babel/parser@7.26.2': + resolution: {integrity: sha512-DWMCZH9WA4Maitz2q21SRKHo9QXZxkDsbNZoVD62gusNtNBBqDg9i7uOhASfTfIGNzW+O+r7+jAlM8dwphcJKQ==} engines: {node: '>=6.0.0'} hasBin: true @@ -2341,8 +2341,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001675: - resolution: {integrity: sha512-/wV1bQwPrkLiQMjaJF5yUMVM/VdRPOCU8QZ+PmG6uW6DvYSrNY1bpwHI/3mOcUosLaJCzYDi5o91IQB51ft6cg==} + caniuse-lite@1.0.30001676: + resolution: {integrity: sha512-Qz6zwGCiPghQXGJvgQAem79esjitvJ+CxSbSQkW9H/UX5hg8XM88d4lp2W+MEQ81j+Hip58Il+jGVdazk1z9cw==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -2539,8 +2539,8 @@ packages: cookiejar@2.1.4: resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} - core-js-compat@3.38.1: - resolution: {integrity: sha512-JRH6gfXxGmrzF3tZ57lFx97YARxCXPaMzPo6jELZhv88pBH5VXpQ+y0znKGlFnzuaihqhLbefxSJxWJMPtfDzw==} + core-js-compat@3.39.0: + resolution: {integrity: sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==} core-js@2.6.12: resolution: {integrity: sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==} @@ -2796,8 +2796,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.49: - resolution: {integrity: sha512-ZXfs1Of8fDb6z7WEYZjXpgIRF6MEu8JdeGA0A40aZq6OQbS+eJpnnV49epZRna2DU/YsEjSQuGtQPPtvt6J65A==} + electron-to-chromium@1.5.50: + resolution: {integrity: sha512-eMVObiUQ2LdgeO1F/ySTXsvqvxb6ZH2zPGaMYsWzRDdOddUa77tdmI0ltg+L16UpbWdhPmuF3wIQYyQq65WfZw==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -3989,8 +3989,8 @@ packages: lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - lru-cache@11.0.1: - resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} + lru-cache@11.0.2: + resolution: {integrity: sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==} engines: {node: 20 || >=22} lru-cache@4.1.5: @@ -5347,8 +5347,8 @@ packages: trough@2.2.0: resolution: {integrity: sha512-tmMpK00BjZiUyVyvrBK7knerNgmgvcV/KLVyuma/SC+TQN167GrMRciANTz09+k3zW8L8t60jWO1GpfkZdjTaw==} - ts-api-utils@1.3.0: - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + ts-api-utils@1.4.0: + resolution: {integrity: sha512-032cPxaEKwM+GT3vA5JXNzIaizx388rhsSW79vGRNGXfRRAdEAn2mvk36PvK5HnOchyWZ7afLEXqYCvPCrzuzQ==} engines: {node: '>=16'} peerDependencies: typescript: '>=4.2.0' @@ -5381,8 +5381,8 @@ packages: tslib@1.14.1: resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} - tslib@2.8.0: - resolution: {integrity: sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==} + tslib@2.8.1: + resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} tsx@4.19.2: resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} @@ -5848,23 +5848,23 @@ snapshots: dependencies: '@babel/highlight': 7.25.9 - '@babel/code-frame@7.26.0': + '@babel/code-frame@7.26.2': dependencies: '@babel/helper-validator-identifier': 7.25.9 js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/compat-data@7.26.0': {} + '@babel/compat-data@7.26.2': {} '@babel/core@7.26.0': dependencies: '@ampproject/remapping': 2.3.0 - '@babel/code-frame': 7.26.0 - '@babel/generator': 7.26.0 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 '@babel/helper-compilation-targets': 7.25.9 '@babel/helper-module-transforms': 7.26.0(@babel/core@7.26.0) '@babel/helpers': 7.26.0 - '@babel/parser': 7.26.1 + '@babel/parser': 7.26.2 '@babel/template': 7.25.9 '@babel/traverse': 7.25.9 '@babel/types': 7.26.0 @@ -5876,9 +5876,9 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/generator@7.26.0': + '@babel/generator@7.26.2': dependencies: - '@babel/parser': 7.26.1 + '@babel/parser': 7.26.2 '@babel/types': 7.26.0 '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 @@ -5897,7 +5897,7 @@ snapshots: '@babel/helper-compilation-targets@7.25.9': dependencies: - '@babel/compat-data': 7.26.0 + '@babel/compat-data': 7.26.2 '@babel/helper-validator-option': 7.25.9 browserslist: 4.24.2 lru-cache: 5.1.1 @@ -6021,7 +6021,7 @@ snapshots: js-tokens: 4.0.0 picocolors: 1.1.1 - '@babel/parser@7.26.1': + '@babel/parser@7.26.2': dependencies: '@babel/types': 7.26.0 @@ -6426,7 +6426,7 @@ snapshots: '@babel/preset-env@7.26.0(@babel/core@7.26.0)': dependencies: - '@babel/compat-data': 7.26.0 + '@babel/compat-data': 7.26.2 '@babel/core': 7.26.0 '@babel/helper-compilation-targets': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 @@ -6494,7 +6494,7 @@ snapshots: babel-plugin-polyfill-corejs2: 0.4.11(@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.38.1 + core-js-compat: 3.39.0 semver: 6.3.1 transitivePeerDependencies: - supports-color @@ -6528,15 +6528,15 @@ snapshots: '@babel/template@7.25.9': dependencies: - '@babel/code-frame': 7.26.0 - '@babel/parser': 7.26.1 + '@babel/code-frame': 7.26.2 + '@babel/parser': 7.26.2 '@babel/types': 7.26.0 '@babel/traverse@7.25.9': dependencies: - '@babel/code-frame': 7.26.0 - '@babel/generator': 7.26.0 - '@babel/parser': 7.26.1 + '@babel/code-frame': 7.26.2 + '@babel/generator': 7.26.2 + '@babel/parser': 7.26.2 '@babel/template': 7.25.9 '@babel/types': 7.26.0 debug: 4.3.7 @@ -7470,7 +7470,7 @@ snapshots: graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -7499,7 +7499,7 @@ snapshots: '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) debug: 4.3.7 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -7517,7 +7517,7 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -7726,11 +7726,11 @@ snapshots: ast-types@0.13.4: dependencies: - tslib: 2.8.0 + tslib: 2.8.1 async-mutex@0.3.2: dependencies: - tslib: 2.8.0 + tslib: 2.8.1 async-sema@3.1.1: {} @@ -7748,7 +7748,7 @@ snapshots: babel-plugin-polyfill-corejs2@0.4.11(@babel/core@7.26.0): dependencies: - '@babel/compat-data': 7.26.0 + '@babel/compat-data': 7.26.2 '@babel/core': 7.26.0 '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.26.0) semver: 6.3.1 @@ -7759,7 +7759,7 @@ snapshots: dependencies: '@babel/core': 7.26.0 '@babel/helper-define-polyfill-provider': 0.6.2(@babel/core@7.26.0) - core-js-compat: 3.38.1 + core-js-compat: 3.39.0 transitivePeerDependencies: - supports-color @@ -7844,8 +7844,8 @@ snapshots: browserslist@4.24.2: dependencies: - caniuse-lite: 1.0.30001675 - electron-to-chromium: 1.5.49 + caniuse-lite: 1.0.30001676 + electron-to-chromium: 1.5.50 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -7919,7 +7919,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001675: {} + caniuse-lite@1.0.30001676: {} caseless@0.12.0: {} @@ -8139,7 +8139,7 @@ snapshots: cookiejar@2.1.4: {} - core-js-compat@3.38.1: + core-js-compat@3.39.0: dependencies: browserslist: 4.24.2 @@ -8386,7 +8386,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.49: {} + electron-to-chromium@1.5.50: {} ellipsize@0.1.0: {} @@ -8602,7 +8602,7 @@ snapshots: '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) ci-info: 4.0.0 clean-regexp: 1.0.0 - core-js-compat: 3.38.1 + core-js-compat: 3.39.0 eslint: 9.13.0 esquery: 1.6.0 globals: 15.11.0 @@ -9814,7 +9814,7 @@ snapshots: lru-cache@10.4.3: {} - lru-cache@11.0.1: {} + lru-cache@11.0.2: {} lru-cache@4.1.5: dependencies: @@ -9841,7 +9841,7 @@ snapshots: magicast@0.3.5: dependencies: - '@babel/parser': 7.26.1 + '@babel/parser': 7.26.2 '@babel/types': 7.26.0 source-map-js: 1.2.1 @@ -10383,7 +10383,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.26.0 + '@babel/code-frame': 7.26.2 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -10551,7 +10551,7 @@ snapshots: dependencies: socks: 2.8.3 socks-proxy-agent: 8.0.4 - tslib: 2.8.0 + tslib: 2.8.1 transitivePeerDependencies: - supports-color @@ -10886,7 +10886,7 @@ snapshots: rxjs@7.8.1: dependencies: - tslib: 2.8.0 + tslib: 2.8.1 safe-buffer@5.2.1: {} @@ -11174,7 +11174,7 @@ snapshots: synckit@0.9.2: dependencies: '@pkgr/core': 0.1.1 - tslib: 2.8.0 + tslib: 2.8.1 tapable@2.2.1: {} @@ -11318,7 +11318,7 @@ snapshots: trough@2.2.0: {} - ts-api-utils@1.3.0(typescript@5.6.3): + ts-api-utils@1.4.0(typescript@5.6.3): dependencies: typescript: 5.6.3 @@ -11336,7 +11336,7 @@ snapshots: tslib@1.14.1: {} - tslib@2.8.0: {} + tslib@2.8.1: {} tsx@4.19.2: dependencies: From 729b32e45fc97bbc7b7702ebc8ae23c727d7131f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 22:50:07 +0800 Subject: [PATCH 359/740] chore(deps): bump telegram from 2.26.2 to 2.26.6 (#17401) * chore(deps): bump telegram from 2.26.2 to 2.26.6 Bumps [telegram](https://github.com/gram-js/gramjs) from 2.26.2 to 2.26.6. - [Release notes](https://github.com/gram-js/gramjs/releases) - [Commits](https://github.com/gram-js/gramjs/commits) --- updated-dependencies: - dependency-name: telegram dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install * test: trigger tests --------- Signed-off-by: dependabot[bot] <support@github.com> 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 e2816b90ee25a2c..77e5fe026342fb6 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "simplecc-wasm": "1.1.0", "socks-proxy-agent": "8.0.4", "source-map": "0.7.4", - "telegram": "2.26.2", + "telegram": "2.26.6", "tiny-async-pool": "2.1.0", "title": "3.5.3", "tldts": "6.1.57", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index edfdb08ee078537..95f9ebbd1155842 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -222,8 +222,8 @@ importers: specifier: 0.7.4 version: 0.7.4 telegram: - specifier: 2.26.2 - version: 2.26.2 + specifier: 2.26.6 + version: 2.26.6 tiny-async-pool: specifier: 2.1.0 version: 2.1.0 @@ -5233,8 +5233,8 @@ packages: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} - telegram@2.26.2: - resolution: {integrity: sha512-KKXt4pVanB6xusgsyCZXAhFOWiUVVfoXZsFzXDrcWoWNbN67d42XIN25JLJ51Tnbe3MzNVUNk6jUeE6X0AYasQ==} + telegram@2.26.6: + resolution: {integrity: sha512-2nZGL3ADRnEoWV0NMH4E+rhPFSD03HQ1ugTHJqpZR2l0iPz5m8TfD+fWoicfe8sltpCcj7nLmNsiEf5ExX/eGA==} test-exclude@7.0.1: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} @@ -11201,7 +11201,7 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 - telegram@2.26.2: + telegram@2.26.6: dependencies: '@cryptography/aes': 0.1.1 async-mutex: 0.3.2 From 848bf81e90962a484a313ac76792304bc34130ab Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 22:50:19 +0800 Subject: [PATCH 360/740] chore(deps-dev): bump eslint-plugin-n from 17.11.1 to 17.12.0 (#17402) * chore(deps-dev): bump eslint-plugin-n from 17.11.1 to 17.12.0 Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 17.11.1 to 17.12.0. - [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases) - [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/v17.11.1...v17.12.0) --- updated-dependencies: - dependency-name: eslint-plugin-n dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install * test: trigger tests --------- Signed-off-by: dependabot[bot] <support@github.com> 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 77e5fe026342fb6..d51a2518e37bb02 100644 --- a/package.json +++ b/package.json @@ -173,7 +173,7 @@ "eslint": "9.13.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", - "eslint-plugin-n": "17.11.1", + "eslint-plugin-n": "17.12.0", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-unicorn": "56.0.0", "eslint-plugin-yml": "1.14.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 95f9ebbd1155842..a36df51abcc86a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -373,8 +373,8 @@ importers: specifier: 8.1.0 version: 8.1.0(eslint@9.13.0) eslint-plugin-n: - specifier: 17.11.1 - version: 17.11.1(eslint@9.13.0) + specifier: 17.12.0 + version: 17.12.0(eslint@9.13.0) eslint-plugin-prettier: specifier: 5.2.1 version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0))(eslint@9.13.0)(prettier@3.3.3) @@ -2947,8 +2947,8 @@ packages: peerDependencies: eslint: '>=8' - eslint-plugin-n@17.11.1: - resolution: {integrity: sha512-93IUD82N6tIEgjztVI/l3ElHtC2wTa9boJHrD8iN+NyDxjxz/daZUZKfkedjBZNdg6EqDk4irybUsiPwDqXAEA==} + eslint-plugin-n@17.12.0: + resolution: {integrity: sha512-zNAtz/erDn0v78bIY3MASSQlyaarV4IOTvP5ldHsqblRFrXriikB6ghkDTkHjUad+nMRrIbOy9euod2azjRfBg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' @@ -8574,7 +8574,7 @@ snapshots: eslint: 9.13.0 eslint-compat-utils: 0.5.1(eslint@9.13.0) - eslint-plugin-n@17.11.1(eslint@9.13.0): + eslint-plugin-n@17.12.0(eslint@9.13.0): dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) enhanced-resolve: 5.17.1 From 0a42f88de7426f42ec9149aafc71e54581fc57cd Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 1 Nov 2024 19:55:50 +0700 Subject: [PATCH 361/740] feat(route): add lang field in route namespace --- lib/routes/005/namespace.ts | 1 + lib/routes/0818tuan/namespace.ts | 1 + lib/routes/0x80/namespace.ts | 1 + lib/routes/10jqka/namespace.ts | 1 + lib/routes/12306/namespace.ts | 1 + lib/routes/12371/namespace.ts | 1 + lib/routes/141jav/namespace.ts | 1 + lib/routes/141ppv/namespace.ts | 1 + lib/routes/163/namespace.ts | 1 + lib/routes/18comic/namespace.ts | 1 + lib/routes/19lou/namespace.ts | 1 + lib/routes/1lou/namespace.ts | 1 + lib/routes/1point3acres/namespace.ts | 1 + lib/routes/1x/namespace.ts | 1 + lib/routes/2023game/namespace.ts | 1 + lib/routes/2048/namespace.ts | 1 + lib/routes/2cycd/namespace.ts | 1 + lib/routes/36kr/namespace.ts | 1 + lib/routes/3dmgame/namespace.ts | 1 + lib/routes/3kns/namespace.ts | 1 + lib/routes/423down/namespace.ts | 1 + lib/routes/4gamers/namespace.ts | 1 + lib/routes/4ksj/namespace.ts | 1 + lib/routes/500px/namespace.ts | 1 + lib/routes/50forum/namespace.ts | 1 + lib/routes/51cto/namespace.ts | 1 + lib/routes/51read/namespace.ts | 1 + lib/routes/52hrtt/namespace.ts | 1 + lib/routes/56kog/namespace.ts | 1 + lib/routes/591/namespace.ts | 1 + lib/routes/5eplay/namespace.ts | 1 + lib/routes/69shu/namespace.ts | 1 + lib/routes/6park/namespace.ts | 1 + lib/routes/6v123/namespace.ts | 1 + lib/routes/78dm/namespace.ts | 1 + lib/routes/7mmtv/namespace.ts | 1 + lib/routes/81/namespace.ts | 1 + lib/routes/8264/namespace.ts | 1 + lib/routes/8kcos/namespace.ts | 1 + lib/routes/8world/namespace.ts | 1 + lib/routes/91porn/namespace.ts | 1 + lib/routes/95mm/namespace.ts | 1 + lib/routes/9to5/namespace.ts | 1 + lib/routes/a9vg/namespace.ts | 1 + lib/routes/aamacau/namespace.ts | 1 + lib/routes/abc/namespace.ts | 1 + lib/routes/abmedia/namespace.ts | 1 + lib/routes/abskoop/namespace.ts | 1 + lib/routes/academia/namespace.ts | 1 + lib/routes/accessbriefing/namespace.ts | 1 + lib/routes/acfun/namespace.ts | 1 + lib/routes/acg17/namespace.ts | 1 + lib/routes/acpaa/namespace.ts | 1 + lib/routes/acs/namespace.ts | 3 ++- lib/routes/aeaweb/namespace.ts | 1 + lib/routes/aeon/namespace.ts | 1 + lib/routes/afdian/namespace.ts | 1 + lib/routes/agefans/namespace.ts | 1 + lib/routes/agirls/namespace.ts | 1 + lib/routes/agora0/namespace.ts | 1 + lib/routes/agri/namespace.ts | 1 + lib/routes/ahjzu/namespace.ts | 1 + lib/routes/aibase/namespace.ts | 1 + lib/routes/aicaijing/namespace.ts | 1 + lib/routes/aiea/namespace.ts | 1 + lib/routes/aijishu/namespace.ts | 1 + lib/routes/ainvest/namespace.ts | 1 + lib/routes/aip/namespace.ts | 1 + lib/routes/airchina/namespace.ts | 1 + lib/routes/aisixiang/namespace.ts | 1 + lib/routes/ajmide/namespace.ts | 1 + lib/routes/alicesoft/namespace.ts | 1 + lib/routes/alipan/namespace.ts | 1 + lib/routes/aliresearch/namespace.ts | 1 + lib/routes/alistapart/namespace.ts | 1 + lib/routes/aliyun/namespace.ts | 1 + lib/routes/aljazeera/namespace.ts | 3 ++- lib/routes/ally/namespace.ts | 1 + lib/routes/alpinelinux/namespace.ts | 1 + lib/routes/alternativeto/namespace.ts | 1 + lib/routes/amazon/namespace.ts | 1 + lib/routes/android/namespace.ts | 1 + lib/routes/anime1/namespace.ts | 1 + lib/routes/annualreviews/namespace.ts | 1 + lib/routes/anquanke/namespace.ts | 1 + lib/routes/apache/namespace.ts | 1 + lib/routes/apiseven/namespace.ts | 1 + lib/routes/apkpure/namespace.ts | 1 + lib/routes/apnews/namespace.ts | 1 + lib/routes/app-center/namespace.ts | 1 + lib/routes/apple/namespace.ts | 1 + lib/routes/appleinsider/namespace.ts | 1 + lib/routes/appstare/namespace.ts | 1 + lib/routes/appstore/namespace.ts | 1 + lib/routes/appstorrent/namespace.ts | 1 + lib/routes/aqara/namespace.ts | 1 + lib/routes/aqicn/namespace.ts | 1 + lib/routes/arcteryx/namespace.ts | 1 + lib/routes/artstation/namespace.ts | 1 + lib/routes/asiantolick/namespace.ts | 1 + lib/routes/asmr-200/namespace.ts | 1 + lib/routes/asus/namespace.ts | 1 + lib/routes/atcoder/namespace.ts | 1 + lib/routes/atptour/namespace.ts | 1 + lib/routes/auto-stats/namespace.ts | 1 + lib/routes/autocentre/namespace.ts | 1 + lib/routes/baai/namespace.ts | 1 + lib/routes/backlinko/namespace.ts | 1 + lib/routes/bad/namespace.ts | 1 + lib/routes/baidu/namespace.ts | 1 + lib/routes/bandcamp/namespace.ts | 1 + lib/routes/bangumi.moe/namespace.ts | 1 + lib/routes/bangumi.online/namespace.ts | 1 + lib/routes/bangumi.tv/namespace.ts | 1 + lib/routes/baozimh/namespace.ts | 1 + lib/routes/barronschina/namespace.ts | 1 + lib/routes/bast/namespace.ts | 1 + lib/routes/bbc/namespace.ts | 1 + lib/routes/bbcnewslabs/namespace.ts | 1 + lib/routes/bc3ts/namespace.ts | 1 + lib/routes/bdys/namespace.ts | 1 + lib/routes/behance/namespace.ts | 1 + lib/routes/beijingprice/namespace.ts | 1 + lib/routes/bellroy/namespace.ts | 1 + lib/routes/bendibao/namespace.ts | 1 + lib/routes/bestblogs/namespace.ts | 1 + lib/routes/bgmlist/namespace.ts | 1 + lib/routes/bigquant/namespace.ts | 1 + lib/routes/bilibili/namespace.ts | 1 + lib/routes/binance/namespace.ts | 1 + lib/routes/bing/namespace.ts | 1 + lib/routes/biodiscover/namespace.ts | 1 + lib/routes/bioone/namespace.ts | 1 + lib/routes/biquge/namespace.ts | 1 + lib/routes/bit/namespace.ts | 1 + lib/routes/bitbucket/namespace.ts | 1 + lib/routes/bitget/namespace.ts | 1 + lib/routes/bitmovin/namespace.ts | 1 + lib/routes/bjfu/namespace.ts | 1 + lib/routes/bjnews/namespace.ts | 1 + lib/routes/bjp/namespace.ts | 1 + lib/routes/bjsk/namespace.ts | 1 + lib/routes/bjtu/namespace.ts | 1 + lib/routes/bjwxdxh/namespace.ts | 1 + lib/routes/bjx/namespace.ts | 1 + lib/routes/blizzard/namespace.ts | 1 + lib/routes/blogread/namespace.ts | 1 + lib/routes/bloomberg/namespace.ts | 1 + lib/routes/bluearchive/namespace.ts | 1 + lib/routes/bluestacks/namespace.ts | 1 + lib/routes/bmkg/namespace.ts | 1 + lib/routes/bnu/namespace.ts | 1 + lib/routes/boc/namespace.ts | 1 + lib/routes/bookfere/namespace.ts | 1 + lib/routes/booru/namespace.ts | 1 + lib/routes/bossdesign/namespace.ts | 1 + lib/routes/brave/namespace.ts | 1 + lib/routes/brooklynmuseum/namespace.ts | 3 ++- lib/routes/bse/namespace.ts | 1 + lib/routes/bsky/namespace.ts | 1 + lib/routes/bt0/namespace.ts | 1 + lib/routes/btzj/namespace.ts | 1 + lib/routes/buaa/namespace.ts | 1 + lib/routes/bugzilla/namespace.ts | 1 + lib/routes/bulianglin/namespace.ts | 1 + lib/routes/bupt/namespace.ts | 1 + lib/routes/byau/namespace.ts | 1 + lib/routes/byteclicks/namespace.ts | 1 + lib/routes/bytes/namespace.ts | 1 + lib/routes/c114/namespace.ts | 1 + lib/routes/caai/namespace.ts | 1 + lib/routes/caam/namespace.ts | 1 + lib/routes/caareviews/namespace.ts | 1 + lib/routes/cahkms/namespace.ts | 1 + lib/routes/caijing/namespace.ts | 1 + lib/routes/caixin/namespace.ts | 1 + lib/routes/caixinglobal/namespace.ts | 1 + lib/routes/camchina/namespace.ts | 1 + lib/routes/cankaoxiaoxi/namespace.ts | 1 + lib/routes/cara/namespace.ts | 1 + lib/routes/cartoonmad/namespace.ts | 1 + lib/routes/cas/namespace.ts | 1 + lib/routes/casssp/namespace.ts | 1 + lib/routes/cast/namespace.ts | 1 + lib/routes/cau/namespace.ts | 1 + lib/routes/caus/namespace.ts | 1 + lib/routes/cbaigui/namespace.ts | 1 + lib/routes/cbc/namespace.ts | 1 + lib/routes/cbirc/namespace.ts | 1 + lib/routes/cbnweek/namespace.ts | 1 + lib/routes/cbpanet/namespace.ts | 1 + lib/routes/ccac/namespace.ts | 1 + lib/routes/cccfna/namespace.ts | 1 + lib/routes/ccf/namespace.ts | 1 + lib/routes/ccfa/namespace.ts | 1 + lib/routes/ccnu/namespace.ts | 1 + lib/routes/ccreports/namespace.ts | 1 + lib/routes/cctv/namespace.ts | 1 + lib/routes/cde/namespace.ts | 1 + lib/routes/cdi/namespace.ts | 1 + lib/routes/cdu/namespace.ts | 1 + lib/routes/cdzjryb/namespace.ts | 1 + lib/routes/cebbank/namespace.ts | 1 + lib/routes/ceph/namespace.ts | 1 + lib/routes/cfachina/namespace.ts | 1 + lib/routes/cffex/namespace.ts | 1 + lib/routes/cfmmc/namespace.ts | 1 + lib/routes/cfr/namespace.ts | 1 + lib/routes/cgtn/namespace.ts | 1 + lib/routes/chaincatcher/namespace.ts | 1 + lib/routes/changba/namespace.ts | 1 + lib/routes/chaoxing/namespace.ts | 1 + lib/routes/chaping/namespace.ts | 1 + lib/routes/chiculture/namespace.ts | 1 + lib/routes/chikubi/namespace.ts | 1 + lib/routes/china/namespace.ts | 1 + lib/routes/chinadegrees/namespace.ts | 1 + lib/routes/chinafactcheck/namespace.ts | 1 + lib/routes/chinaisa/namespace.ts | 1 + lib/routes/chinamoney/namespace.ts | 1 + lib/routes/chinanews/namespace.ts | 1 + lib/routes/chinania/namespace.ts | 1 + lib/routes/chinathinktanks/namespace.ts | 1 + lib/routes/chinaventure/namespace.ts | 1 + lib/routes/chinawriter/namespace.ts | 1 + lib/routes/chlinlearn/namespcae.ts | 3 ++- lib/routes/chsi/namespace.ts | 1 + lib/routes/chuanliu/namespace.ts | 1 + lib/routes/chub/namespace.ts | 1 + lib/routes/cib/namespace.ts | 1 + lib/routes/ciidbnu/namespace.ts | 1 + lib/routes/cisia/namespace.ts | 1 + lib/routes/civitai/namespace.ts | 1 + lib/routes/ciweimao/namespace.ts | 1 + lib/routes/cjlu/namespace.ts | 2 +- lib/routes/clickme/namespace.ts | 1 + lib/routes/cloudnative/namespace.ts | 1 + lib/routes/cls/namespace.ts | 1 + lib/routes/cma/namespace.ts | 1 + lib/routes/cmde/namespace.ts | 1 + lib/routes/cmpxchg8b/namespace.ts | 1 + lib/routes/cn-healthcare/namespace.ts | 1 + lib/routes/cna/namespace.ts | 1 + lib/routes/cnbc/namespace.ts | 1 + lib/routes/cnbeta/namespace.ts | 1 + lib/routes/cnblogs/namespace.ts | 1 + lib/routes/cncf/namespace.ts | 1 + lib/routes/cneb/namespace.ts | 1 + lib/routes/cngal/namespace.ts | 1 + lib/routes/cnjxol/namespace.ts | 1 + lib/routes/cnki/namespace.ts | 1 + lib/routes/cnljxh/namespace.ts | 1 + lib/routes/cntheory/namespace.ts | 1 + lib/routes/cntv/namespace.ts | 1 + lib/routes/codeforces/namespace.ts | 1 + lib/routes/cohere/namespace.ts | 1 + lib/routes/coindesk/namespace.ts | 1 + lib/routes/colamanga/namespace.ts | 1 + lib/routes/comicat/namespace.ts | 1 + lib/routes/comicskingdom/namespace.ts | 1 + lib/routes/consumer/namespace.ts | 1 + lib/routes/cool18/namespace.ts | 1 + lib/routes/coolapk/namespace.ts | 7 ++++--- lib/routes/coomer/namespace.ts | 1 + lib/routes/copernicium/namespace.ts | 1 + lib/routes/copymanga/namespace.ts | 1 + lib/routes/cpcaauto/namespace.ts | 1 + lib/routes/cpcey/namespace.ts | 1 + lib/routes/cpuid/namespace.ts | 1 + lib/routes/cqgas/namespace.ts | 1 + lib/routes/cqwu/namespace.ts | 1 + lib/routes/crac/namespace.ts | 1 + lib/routes/creative-comic/namespace.ts | 1 + lib/routes/crossbell/namespace.ts | 1 + lib/routes/cs/namespace.ts | 1 + lib/routes/csdn/namespace.ts | 1 + lib/routes/cssn/namespace.ts | 1 + lib/routes/cste/namespace.ts | 1 + lib/routes/csu/namespace.ts | 1 + lib/routes/cts/namespace.ts | 1 + lib/routes/cuc/namespace.ts | 1 + lib/routes/cuilingmag/namespace.ts | 1 + lib/routes/curiouscat/namespace.ts | 1 + lib/routes/curius/namespace.ts | 1 + lib/routes/cw/namespace.ts | 1 + lib/routes/cyzone/namespace.ts | 1 + lib/routes/cztv/namespace.ts | 1 + lib/routes/dahecube/namespace.ts | 1 + lib/routes/daily/namespace.ts | 1 + lib/routes/damai/namespace.ts | 1 + lib/routes/dangdang/namespace.ts | 1 + lib/routes/dapenti/namespace.ts | 1 + lib/routes/darwinawards/namespace.ts | 1 + lib/routes/dataguidance/namespace.ts | 1 + lib/routes/dayanzai/namespace.ts | 1 + lib/routes/dbaplus/namespace.ts | 1 + lib/routes/dblp/namespace.ts | 1 + lib/routes/dcard/namespace.ts | 1 + lib/routes/dcfever/namespace.ts | 1 + lib/routes/ddosi/namespace.ts | 1 + lib/routes/deadbydaylight/namespace.ts | 1 + lib/routes/deadline/namespace.ts | 1 + lib/routes/dealstreetasia/namespace.ts | 1 + lib/routes/dedao/namespace.ts | 1 + lib/routes/deepin/namespace.ts | 1 + lib/routes/deeplearning/namespace.ts | 1 + lib/routes/deepmind/namespace.ts | 1 + lib/routes/dehenglaw/namespace.ts | 1 + lib/routes/deltaio/namespace.ts | 1 + lib/routes/devolverdigital/namespace.ts | 1 + lib/routes/devtrium/namespace.ts | 1 + lib/routes/dewu/namespace.ts | 1 + lib/routes/dgjyw/namespace.ts | 1 + lib/routes/dhu/namespace.ts | 1 + lib/routes/diandong/namespace.ts | 1 + lib/routes/dianping/namespace.ts | 1 + lib/routes/diershoubing/namespace.ts | 1 + lib/routes/digitalcameraworld/namespace.ts | 1 + lib/routes/discord/namespace.ts | 1 + lib/routes/discourse/namespace.ts | 1 + lib/routes/discuz/namespace.ts | 2 ++ lib/routes/disinfo/namespace.ts | 1 + lib/routes/diskanalyzer/namespace.ts | 1 + lib/routes/distill/namespace.ts | 1 + lib/routes/dlnews/namespace.ts | 1 + lib/routes/dlsite/namespace.ts | 1 + lib/routes/dmzj/namespace.ts | 1 + lib/routes/dn/namespace.ts | 1 + lib/routes/dnaindia/namespace.ts | 1 + lib/routes/dockerhub/namespace.ts | 1 + lib/routes/docschina/namespace.ts | 1 + lib/routes/dol/namespace.ts | 1 + lib/routes/domp4/namespace.ts | 1 + lib/routes/dongqiudi/namespace.ts | 1 + lib/routes/dora-world/namespace.ts | 1 + lib/routes/dorohedoro/namespace.ts | 1 + lib/routes/douban/namespace.ts | 1 + lib/routes/douyin/namespace.ts | 1 + lib/routes/douyu/namespace.ts | 1 + lib/routes/dribbble/namespace.ts | 1 + lib/routes/dtcj/namespace.ts | 1 + lib/routes/duckdb/namespace.ts | 1 + lib/routes/duozhuayu/namespace.ts | 1 + lib/routes/dushu/namespace.ts | 1 + lib/routes/dut/namespace.ts | 1 + lib/routes/dx2025/namespace.ts | 1 + lib/routes/dxy/namespace.ts | 1 + lib/routes/dykszx/namespace.ts | 1 + lib/routes/e-hentai/namespace.ts | 1 + lib/routes/eagle/namespace.ts | 1 + lib/routes/earthquake/namespace.ts | 1 + lib/routes/eastday/namespace.ts | 1 + lib/routes/eastmoney/namespace.ts | 1 + lib/routes/easynomad/namespace.ts | 1 + lib/routes/ecnu/namespace.ts | 1 + lib/routes/economist/namespace.ts | 1 + lib/routes/ecust/namespace.ts | 1 + lib/routes/egsea/namespace.ts | 1 + lib/routes/ehentai/namespace.ts | 1 + lib/routes/ekantipur/namespace.ts | 1 + lib/routes/elasticsearch-cn/namespace.ts | 1 + lib/routes/eleduck/namespace.ts | 1 + lib/routes/elsevier/namespace.ts | 1 + lib/routes/embassy/namespace.ts | 1 + lib/routes/enterprisecraftsmanship/namespace.ts | 1 + lib/routes/epicgames/namespace.ts | 1 + lib/routes/eprice/namespace.ts | 1 + lib/routes/eshukan/namespace.ts | 1 + lib/routes/espn/namespace.ts | 1 + lib/routes/esquirehk/namespace.ts | 1 + lib/routes/europechinese/namespace.ts | 1 + lib/routes/eventernote/namespace.ts | 1 + lib/routes/f-droid/namespace.ts | 1 + lib/routes/famitsu/namespace.ts | 1 + lib/routes/fanbox/namespace.ts | 1 + lib/routes/fanqienovel/namespace.ts | 1 + lib/routes/fansly/namespace.ts | 1 + lib/routes/fantia/namespace.ts | 1 + lib/routes/fanxinzhui/namespace.ts | 1 + lib/routes/farmatters/namespace.ts | 1 + lib/routes/fashionnetwork/namespace.ts | 1 + lib/routes/fastbull/namespace.ts | 1 + lib/routes/fda/namespace.ts | 1 + lib/routes/fediverse/namespace.ts | 1 + lib/routes/feng/namespace.ts | 1 + lib/routes/ff14/namespace.ts | 3 ++- lib/routes/fffdm/namespace.ts | 1 + lib/routes/finology/namespace.ts | 1 + lib/routes/finviz/namespace.ts | 1 + lib/routes/firecore/namespace.ts | 1 + lib/routes/firefox/namespace.ts | 1 + lib/routes/fisher-spb/namespace.ts | 1 + lib/routes/fishshell/namespace.ts | 1 + lib/routes/fjksbm/namespace.ts | 1 + lib/routes/flashcat/namespace.ts | 1 + lib/routes/flyert/namespace.ts | 1 + lib/routes/focustaiwan/namespace.ts | 1 + lib/routes/follow/namespace.ts | 1 + lib/routes/followin/namespace.ts | 1 + lib/routes/foresightnews/namespace.ts | 1 + lib/routes/foreverblog/namespace.ts | 1 + lib/routes/fortnite/namespace.ts | 1 + lib/routes/fortunechina/namespace.ts | 1 + lib/routes/fosshub/namespace.ts | 1 + lib/routes/free/namespace.ts | 1 + lib/routes/freebuf/namespace.ts | 1 + lib/routes/freecomputerbooks/namespace.ts | 1 + lib/routes/freewechat/namespace.ts | 1 + lib/routes/freexcomic/namespace.ts | 1 + lib/routes/ft/namespace.ts | 1 + lib/routes/ftchinese/namespace.ts | 1 + lib/routes/ftm/namespace.ts | 1 + lib/routes/fuliba/namespace.ts | 1 + lib/routes/furstar/namespace.ts | 1 + lib/routes/futunn/namespace.ts | 1 + lib/routes/fx-markets/namespace.ts | 1 + lib/routes/fx678/namespace.ts | 1 + lib/routes/fxiaoke/namespace.ts | 1 + lib/routes/fzmtr/namespace.ts | 1 + lib/routes/galxe/namespace.ts | 1 + lib/routes/gameapps/namespace.ts | 1 + lib/routes/gamebase/namespace.ts | 1 + lib/routes/gamegene/namespace.ts | 1 + lib/routes/gamer/namespace.ts | 1 + lib/routes/gamer520/namespace.ts | 1 + lib/routes/gamersecret/namespace.ts | 1 + lib/routes/gamersky/namespace.ts | 1 + lib/routes/gamme/namespace.ts | 1 + lib/routes/gcores/namespace.ts | 1 + lib/routes/gdsrx/namespace.ts | 1 + lib/routes/gdut/namespace.ts | 1 + lib/routes/geekpark/namespace.ts | 1 + lib/routes/gelonghui/namespace.ts | 1 + lib/routes/geocaching/namespace.ts | 1 + lib/routes/getdr/namespace.ts | 1 + lib/routes/getitfree/namespace.ts | 1 + lib/routes/gettr/namespace.ts | 1 + lib/routes/gf-cn/namespace.ts | 1 + lib/routes/gihyo/namespace.ts | 1 + lib/routes/gisreportsonline/namespace.ts | 1 + lib/routes/gitee/namespace.ts | 1 + lib/routes/github/namespace.ts | 1 + lib/routes/gitpod/namespace.ts | 1 + lib/routes/globallawreview/namespace.ts | 1 + lib/routes/gmcmonline/namespace.ts | 1 + lib/routes/go/namespace.ts | 1 + lib/routes/gocn/namespace.ts | 1 + lib/routes/gofans/namespace.ts | 1 + lib/routes/gogoanimehd/namespace.ts | 1 + lib/routes/google/namespace.ts | 1 + lib/routes/gov/ah/namespace.ts | 1 + lib/routes/gq/namespace.ts | 1 + lib/routes/greasyfork/namespace.ts | 1 + lib/routes/grist/namespace.ts | 1 + lib/routes/grubstreet/namespace.ts | 1 + lib/routes/gs/namespace.ts | 1 + lib/routes/guancha/namespace.ts | 1 + lib/routes/guangdiu/namespace.ts | 1 + lib/routes/guangzhoumetro/namespace.ts | 1 + lib/routes/guanhai/namespace.ts | 1 + lib/routes/guduodata/namespace.ts | 1 + lib/routes/gumroad/namespace.ts | 1 + lib/routes/guokr/namespace.ts | 1 + lib/routes/guozaoke/namespace.ts | 1 + lib/routes/gxmzu/namespace.ts | 1 + lib/routes/gzdaily/namespace.ts | 1 + lib/routes/gzhu/namespace.ts | 1 + lib/routes/hackernews/namespace.ts | 1 + lib/routes/hackertalk/namespace.ts | 1 + lib/routes/hacking8/namespace.ts | 1 + lib/routes/hackmd/namespace.ts | 1 + lib/routes/hackyournews/namespace.ts | 1 + lib/routes/hafu/namespace.ts | 1 + lib/routes/hakkatv/namespace.ts | 1 + lib/routes/hameln/namespace.ts | 1 + lib/routes/harvard/namespace.ts | 1 + lib/routes/hashnode/namespace.ts | 1 + lib/routes/hbooker/namespace.ts | 1 + lib/routes/hbr/namespace.ts | 1 + lib/routes/hdu/namespace.ts | 1 + lib/routes/hebtv/namespace.ts | 1 + lib/routes/hellobtc/namespace.ts | 1 + lib/routes/hellogithub/namespace.ts | 1 + lib/routes/hex-rays/namespace.ts | 1 + lib/routes/hfut/namespace.ts | 1 + lib/routes/hicairo/namespace.ts | 1 + lib/routes/hinatazaka46/namespace.ts | 1 + lib/routes/hit/namespace.ts | 1 + lib/routes/hitcon/namespace.ts | 1 + lib/routes/hitsz/namespace.ts | 1 + lib/routes/hitwh/namespace.ts | 1 + lib/routes/hizu/namespace.ts | 1 + lib/routes/hk01/namespace.ts | 1 + lib/routes/hkej/namespace.ts | 1 + lib/routes/hkepc/namespace.ts | 1 + lib/routes/hket/namespace.ts | 1 + lib/routes/hkjunkcall/namespace.ts | 1 + lib/routes/hko/namespace.ts | 1 + lib/routes/hljucm/namespace.ts | 1 + lib/routes/hnrb/namespace.ts | 1 + lib/routes/hnu/namespace.ts | 1 + lib/routes/hongkong/namespace.ts | 1 + lib/routes/hostmonit/namespace.ts | 1 + lib/routes/hottoys/namespace.ts | 1 + lib/routes/hotukdeals/namespace.ts | 1 + lib/routes/houxu/namespace.ts | 1 + lib/routes/howtoforge/namespace.ts | 1 + lib/routes/hoyolab/namespace.ts | 1 + lib/routes/hpoi/namespace.ts | 1 + lib/routes/hrbeu/namespace.ts | 1 + lib/routes/hrbust/namespace.ts | 1 + lib/routes/huanqiu/namespace.ts | 1 + lib/routes/hubu/namespace.ts | 1 + lib/routes/huggingface/namespace.ts | 1 + lib/routes/hunanpea/namespace.ts | 1 + lib/routes/hunau/namespace.ts | 1 + lib/routes/huoxian/namespace.ts | 1 + lib/routes/hupu/namespace.ts | 1 + lib/routes/hust/namespace.ts | 1 + lib/routes/huxiu/namespace.ts | 1 + lib/routes/hypergryph/namespace.ts | 1 + lib/routes/i-cable/namespace.ts | 1 + lib/routes/ianspriggs/namespace.ts | 1 + lib/routes/icac/namespace.ts | 1 + lib/routes/icbc/namespace.ts | 1 + lib/routes/idaily/namespace.ts | 1 + lib/routes/idolypride/namespace.ts | 1 + lib/routes/ieee-security/namespace.ts | 1 + lib/routes/ieee/namespace.ts | 1 + lib/routes/iehou/namespace.ts | 1 + lib/routes/ielts/namespace.ts | 1 + lib/routes/ifeng/namespace.ts | 1 + lib/routes/ifi-audio/namespace.ts | 1 + lib/routes/iguoguo/namespace.ts | 1 + lib/routes/iiilab/namespace.ts | 1 + lib/routes/ikea/namespace.ts | 1 + lib/routes/imagemagick/namespace.ts | 1 + lib/routes/imdb/namespace.ts | 1 + lib/routes/imhcg/namespace.ts | 1 + lib/routes/imiker/namespace.ts | 1 + lib/routes/imop/namespace.ts | 1 + lib/routes/indiansinkuwait/namespace.ts | 1 + lib/routes/indienova/namespace.ts | 1 + lib/routes/inewsweek/namespace.ts | 1 + lib/routes/infoq/namespace.ts | 1 + lib/routes/informedainews/namespace.ts | 1 + lib/routes/informs/namespace.ts | 1 + lib/routes/infzm/namespace.ts | 7 +++++++ lib/routes/inoreader/namespace.ts | 1 + lib/routes/inspirehep/namespace.ts | 1 + lib/routes/instagram/namespace.ts | 1 + lib/routes/instructables/namespace.ts | 1 + lib/routes/investor/namespace.ts | 1 + lib/routes/iplaysoft/namespace.ts | 1 + lib/routes/ippa/namespace.ts | 1 + lib/routes/ipsw.dev/namespace.ts | 1 + lib/routes/ipsw/namespace.ts | 1 + lib/routes/iqilu/namespace.ts | 1 + lib/routes/iqiyi/namespace.ts | 1 + lib/routes/iqnew/namespace.ts | 1 + lib/routes/iresearch/namespace.ts | 1 + lib/routes/issuehunt/namespace.ts | 1 + lib/routes/itc/namespace.ts | 1 + lib/routes/itch/namespace.ts | 1 + lib/routes/ithome/namespace.ts | 1 + lib/routes/iwara/namespace.ts | 1 + lib/routes/ixigua/namespace.ts | 1 + lib/routes/j-test/namespace.ts | 1 + lib/routes/jandan/namespace.ts | 1 + lib/routes/japanpost/namespace.ts | 1 + lib/routes/javbus/namespace.ts | 1 + lib/routes/javdb/namespace.ts | 1 + lib/routes/javlibrary/namespace.ts | 1 + lib/routes/javtiful/namespace.ts | 1 + lib/routes/jd/namespace.ts | 1 + lib/routes/jewishmuseum/namespace.ts | 3 ++- lib/routes/jianshu/namespace.ts | 1 + lib/routes/jiaoliudao/namespace.ts | 1 + lib/routes/jiemian/namespace.ts | 1 + lib/routes/jike/namespace.ts | 1 + lib/routes/jin10/namespace.ts | 1 + lib/routes/jingzhengu/namespace.ts | 1 + lib/routes/jinritemai/namespace.ts | 1 + lib/routes/jinse/namespace.ts | 1 + lib/routes/jisilu/namespace.ts | 1 + lib/routes/jiuyangongshe/namespace.ts | 1 + lib/routes/jjwxc/namespace.ts | 1 + lib/routes/jlu/namespace.ts | 1 + lib/routes/joins/namespace.ts | 1 + lib/routes/jornada/namespace.ts | 1 + lib/routes/jou/namespace.ts | 1 + lib/routes/jpxgmn/namespace.ts | 1 + lib/routes/jseea/namespace.ts | 1 + lib/routes/jsu/namespace.ts | 1 + lib/routes/juejin/namespace.ts | 1 + lib/routes/jump/namespace.ts | 1 + lib/routes/junhe/namespace.ts | 1 + lib/routes/kadokawa/namespace.ts | 1 + lib/routes/kakuyomu/namespace.ts | 1 + lib/routes/kamen-rider-official/namespace.ts | 1 + lib/routes/kantarworldpanel/namespace.ts | 1 + lib/routes/kanxue/namespace.ts | 1 + lib/routes/kaopu/namespace.ts | 1 + lib/routes/kbs/namespace.ts | 1 + lib/routes/kcna/namespace.ts | 1 + lib/routes/ke/namespace.ts | 1 + lib/routes/keep/namespace.ts | 1 + lib/routes/keepass/namespace.ts | 1 + lib/routes/kelownacapnews/namespace.ts | 1 + lib/routes/kemono/namespace.ts | 1 + lib/routes/kepu/namespace.ts | 1 + lib/routes/keylol/namespace.ts | 1 + lib/routes/kimlaw/namespace.ts | 1 + lib/routes/kisskiss/namespace.ts | 1 + lib/routes/konachan/namespace.ts | 1 + lib/routes/konghq/namespace.ts | 1 + lib/routes/kpmg/namespace.ts | 1 + lib/routes/ktown4u/namespace.ts | 1 + lib/routes/kuaidi100/namespace.ts | 1 + lib/routes/kunchengblog/namespace.ts | 1 + lib/routes/kurogames/namespace.ts | 1 + lib/routes/kuwaitlocal/namespace.ts | 1 + lib/routes/kyodonews/namespace.ts | 1 + lib/routes/laimanhua/namespace.ts | 1 + lib/routes/lala/namespace.ts | 1 + lib/routes/lang/namespace.ts | 1 + lib/routes/lanqiao/namespace.ts | 1 + lib/routes/laohu8/namespace.ts | 1 + lib/routes/latepost/namespace.ts | 1 + lib/routes/layoffs/namespace.ts | 1 + lib/routes/learnblockchain/namespace.ts | 1 + lib/routes/learnku/namespace.ts | 1 + lib/routes/leetcode/namespace.ts | 1 + lib/routes/leiphone/namespace.ts | 1 + lib/routes/lemmy/namespace.ts | 1 + lib/routes/lfsyd/namespace.ts | 1 + lib/routes/lianxh/namespace.ts | 1 + lib/routes/lifeweek/namespace.ts | 1 + lib/routes/lightnovel/namespace.ts | 1 + lib/routes/line/namespace.ts | 1 + lib/routes/link3/namespace.ts | 1 + lib/routes/linkedin/namespace.ts | 3 ++- lib/routes/linkresearcher/namespace.ts | 1 + lib/routes/linovelib/namespace.ts | 1 + lib/routes/liquipedia/namespace.ts | 1 + lib/routes/literotica/namespace.ts | 1 + lib/routes/liulinblog/namespace.ts | 1 + lib/routes/liveuamap/namespace.ts | 1 + lib/routes/lkong/namespace.ts | 1 + lib/routes/lmu/namespace.ts | 1 + lib/routes/lofter/namespace.ts | 1 + lib/routes/logclub/namespace.ts | 1 + lib/routes/logonews/namespace.ts | 1 + lib/routes/loltw/namespace.ts | 1 + lib/routes/loongarch/namespace.ts | 1 + lib/routes/lorientlejour/namespace.ts | 1 + lib/routes/lovelive-anime/namespace.ts | 1 + lib/routes/lrepacks/namespace.ts | 1 + lib/routes/lsnu/namespace.ts | 1 + lib/routes/luma/namespace.ts | 1 + lib/routes/luogu/namespace.ts | 1 + lib/routes/luolei/namespace.ts | 1 + lib/routes/luxiangdong/namespace.ts | 1 + lib/routes/lvv2/namespace.ts | 1 + lib/routes/lxixsxa/namespace.ts | 1 + lib/routes/m4/namespace.ts | 1 + lib/routes/maccms/namespace.ts | 1 + lib/routes/macfilos/namespace.ts | 1 + lib/routes/macmenubar/namespace.ts | 1 + lib/routes/macupdate/namespace.ts | 1 + lib/routes/magazinelib/namespace.ts | 1 + lib/routes/magnumphotos/namespace.ts | 1 + lib/routes/mail/namespace.ts | 1 + lib/routes/malaysiakini/namespace.ts | 5 +++-- lib/routes/mangadex/namespace.ts | 1 + lib/routes/manhuagui/namespace.ts | 1 + lib/routes/manyvids/namespace.ts | 1 + lib/routes/mastodon/namespace.ts | 1 + lib/routes/matters/namespace.ts | 1 + lib/routes/mckinsey/namespace.ts | 1 + lib/routes/mcmod/namespace.ts | 1 + lib/routes/mdpi/namespace.ts | 1 + lib/routes/medieval-china/namespace.ts | 1 + lib/routes/medium/namespace.ts | 1 + lib/routes/medsci/namespace.ts | 1 + lib/routes/meishichina/namespace.ts | 1 + lib/routes/meituan/namespace.ts | 1 + lib/routes/metacritic/namespace.ts | 1 + lib/routes/meteor/namespace.ts | 1 + lib/routes/metmuseum/namespace.ts | 3 ++- lib/routes/mi/namespace.ts | 1 + lib/routes/microsoft/namespace.ts | 1 + lib/routes/mihoyo/namespace.ts | 1 + lib/routes/mindmeister/namespace.ts | 1 + lib/routes/minecraft/namespace.ts | 1 + lib/routes/mingpao/namespace.ts | 1 + lib/routes/miniflux/namespace.ts | 1 + lib/routes/mirror/namespace.ts | 1 + lib/routes/mirrormedia/namespace.ts | 1 + lib/routes/missav/namespace.ts | 1 + lib/routes/misskey/namespace.ts | 1 + lib/routes/misskon/namespace.ts | 1 + lib/routes/mittrchina/namespace.ts | 1 + lib/routes/miui/namespace.ts | 1 + lib/routes/mixcloud/namespace.ts | 1 + lib/routes/modb/namespace.ts | 1 + lib/routes/modelscope/namespace.ts | 1 + lib/routes/modian/namespace.ts | 1 + lib/routes/modrinth/namespace.ts | 1 + lib/routes/mohw/namespace.ts | 1 + lib/routes/mox/namespace.ts | 1 + lib/routes/mpaypass/namespace.ts | 1 + lib/routes/mrdx/namespace.ts | 1 + lib/routes/mrm/namespace.ts | 1 + lib/routes/mvm/namespace.ts | 1 + lib/routes/my-formosa/namespace.ts | 1 + lib/routes/mydrivers/namespace.ts | 1 + lib/routes/myfans/namespace.ts | 1 + lib/routes/myfigurecollection/namespace.ts | 1 + lib/routes/mygopen/namespace.ts | 1 + lib/routes/mymusicsheet/namespace.ts | 1 + lib/routes/mysql/namespace.ts | 1 + lib/routes/nasa/namespace.ts | 1 + lib/routes/natgeo/namespace.ts | 3 ++- lib/routes/nationalgeographic/namespace.ts | 1 + lib/routes/nature/namespace.ts | 1 + lib/routes/nautil/namespace.ts | 1 + lib/routes/nbd/namespace.ts | 1 + lib/routes/nber/namespace.ts | 1 + lib/routes/ncc-cma/namespace.ts | 1 + lib/routes/ncepu/namespace.ts | 1 + lib/routes/ncku/namespace.ts | 1 + lib/routes/ncpssd/namespace.ts | 1 + lib/routes/ncu/namespace.ts | 1 + lib/routes/ncwu/namespace.ts | 1 + lib/routes/ndss-symposium/namespace.ts | 1 + lib/routes/neatdownloadmanager/namespace.ts | 1 + lib/routes/neea/namespace.ts | 1 + lib/routes/nenu/namespace.ts | 1 + lib/routes/netflav/namespace.ts | 1 + lib/routes/neu/namespace.ts | 1 + lib/routes/newmuseum/namespace.ts | 3 ++- lib/routes/newrank/namespace.ts | 1 + lib/routes/news/namespace.ts | 1 + lib/routes/newsmarket/namespace.ts | 1 + lib/routes/newyorker/namespace.ts | 1 + lib/routes/newzmz/namespace.ts | 1 + lib/routes/nextapple/namespace.ts | 1 + lib/routes/nextjs/namespace.ts | 1 + lib/routes/nga/namespace.ts | 1 + lib/routes/ngocn2/namespace.ts | 1 + lib/routes/nhentai/namespace.ts | 1 + lib/routes/nhk/namespace.ts | 1 + lib/routes/niaogebiji/namespace.ts | 1 + lib/routes/nicovideo/namespace.ts | 1 + lib/routes/nifd/namespace.ts | 1 + lib/routes/nikkei/namespace.ts | 1 + lib/routes/nintendo/namespace.ts | 1 + lib/routes/nippon/namespace.ts | 1 + lib/routes/njglyy/namespace.ts | 1 + lib/routes/njit/namespace.ts | 1 + lib/routes/njnu/namespace.ts | 1 + lib/routes/nju/namespace.ts | 1 + lib/routes/njucm/namespace.ts | 1 + lib/routes/njuferret/namespace.ts | 1 + lib/routes/njupt/namespace.ts | 1 + lib/routes/njust/namespace.ts | 1 + lib/routes/njxzc/namespace.ts | 1 + lib/routes/nlc/namespace.ts | 1 + lib/routes/nltimes/namespace.ts | 1 + lib/routes/nmc/namespace.ts | 1 + lib/routes/nmtv/namespace.ts | 1 + lib/routes/nodejs/namespace.ts | 1 + lib/routes/nogizaka46/namespace.ts | 1 + lib/routes/nosec/namespace.ts | 1 + lib/routes/notateslaapp/namespace.ts | 1 + lib/routes/notefolio/namespace.ts | 1 + lib/routes/notion/namespace.ts | 1 + lib/routes/now/namespace.ts | 1 + lib/routes/nowcoder/namespace.ts | 1 + lib/routes/npm/namespace.ts | 1 + lib/routes/npr/namespace.ts | 1 + lib/routes/ntdm/namespace.ts | 1 + lib/routes/ntdtv/namespace.ts | 1 + lib/routes/nua/namespace.ts | 1 + lib/routes/nuaa/namespace.ts | 1 + lib/routes/nudt/namespace.ts | 1 + lib/routes/nuist/namespace.ts | 1 + lib/routes/nwafu/namespace.ts | 1 + lib/routes/nyaa/namespace.ts | 1 + lib/routes/nymity/namespace.ts | 1 + lib/routes/nytimes/namespace.ts | 1 + lib/routes/obsidian/namespace.ts | 1 + lib/routes/oceanengine/namespace.ts | 1 + lib/routes/oct0pu5/namespace.ts | 1 + lib/routes/odaily/namespace.ts | 1 + lib/routes/oeeee/namespace.ts | 1 + lib/routes/oilchem/namespace.ts | 1 + lib/routes/olevod/namespace.ts | 1 + lib/routes/ollama/namespace.ts | 1 + lib/routes/oncc/namespace.ts | 1 + lib/routes/onehu/namespace.ts | 1 + lib/routes/onet/namespace.ts | 1 + lib/routes/oo-software/namespace.ts | 1 + lib/routes/openai/namespace.ts | 1 + lib/routes/openrice/namespace.ts | 1 + lib/routes/openwrt/namespace.ts | 3 ++- lib/routes/orcid/namespace.ts | 1 + lib/routes/oreno3d/namespace.ts | 1 + lib/routes/oschina/namespace.ts | 1 + lib/routes/oshwhub/namespace.ts | 1 + lib/routes/osu/namespace.ts | 1 + lib/routes/otobanana/namespace.ts | 1 + lib/routes/ouc/namespace.ts | 1 + lib/routes/oup/namespace.ts | 1 + lib/routes/outagereport/namespace.ts | 1 + lib/routes/p-articles/namespace.ts | 1 + lib/routes/panewslab/namespace.ts | 1 + lib/routes/papers/namespace.ts | 1 + lib/routes/paradigm/namespace.ts | 1 + lib/routes/parliament.uk/namespace.ts | 1 + lib/routes/parliament/namespace.ts | 1 + lib/routes/patagonia/namespace.ts | 1 + lib/routes/paulgraham/namespace.ts | 1 + lib/routes/pconline/namespace.ts | 1 + lib/routes/penguin-random-house/namespace.ts | 1 + lib/routes/people/namespace.ts | 1 + lib/routes/peopo/namespace.ts | 1 + lib/routes/phoronix/namespace.ts | 1 + lib/routes/pianyivps/namespace.ts | 1 + lib/routes/pianyuan/namespace.ts | 1 + lib/routes/picnob/namespace.ts | 1 + lib/routes/picuki/namespace.ts | 1 + lib/routes/pikabu/namespace.ts | 1 + lib/routes/pincong/namespace.ts | 1 + lib/routes/pingwest/namespace.ts | 1 + lib/routes/pixabay/namespace.ts | 1 + lib/routes/pixiv/namespace.ts | 1 + lib/routes/pixivision/namespace.ts | 1 + lib/routes/piyao/namespace.ts | 1 + lib/routes/pkmer/namespace.ts | 1 + lib/routes/pku/namespace.ts | 1 + lib/routes/playno1/namespace.ts | 1 + lib/routes/playpcesor/namespace.ts | 1 + lib/routes/plurk/namespace.ts | 1 + lib/routes/pnas/namespace.ts | 1 + lib/routes/podwise/namespace.ts | 1 + lib/routes/pornhub/namespace.ts | 1 + lib/routes/postman/namespace.ts | 1 + lib/routes/priconne-redive/namespace.ts | 1 + lib/routes/producthunt/namespace.ts | 1 + lib/routes/ps/namespace.ts | 1 + lib/routes/psyche/namespace.ts | 1 + lib/routes/pts/namespace.ts | 1 + lib/routes/pubmed/namespace.ts | 1 + lib/routes/pubscholar/namespace.ts | 1 + lib/routes/pumc/namespace.ts | 1 + lib/routes/putty/namespace.ts | 1 + lib/routes/pwc/namespace.ts | 1 + lib/routes/qbitai/namespace.ts | 1 + lib/routes/qbittorrent/namespace.ts | 1 + lib/routes/qdu/namespace.ts | 1 + lib/routes/qianp/namespace.ts | 1 + lib/routes/qianzhan/namespace.ts | 1 + lib/routes/qiche365/namespace.ts | 1 + lib/routes/qidian/namespace.ts | 1 + lib/routes/qingting/namespace.ts | 1 + lib/routes/qipamaijia/namespace.ts | 1 + lib/routes/qiyoujiage/namespace.ts | 1 + lib/routes/qlu/namespace.ts | 1 + lib/routes/qm120/namespace.ts | 1 + lib/routes/qoo-app/namespace.ts | 1 + lib/routes/qq/namespace.ts | 1 + lib/routes/qq88/namespace.ts | 1 + lib/routes/qqorw/namespace.ts | 1 + lib/routes/questmobile/namespace.ts | 1 + lib/routes/questn/namespace.ts | 1 + lib/routes/quicker/namespace.ts | 1 + lib/routes/qust/namespace.ts | 1 + lib/routes/qweather/namespace.ts | 1 + lib/routes/qztc/namespace.ts | 1 + lib/routes/radio-canada/namespace.ts | 1 + lib/routes/radio/namespace.ts | 1 + lib/routes/rarehistoricalphotos/namespace.ts | 1 + lib/routes/rattibha/namespace.ts | 1 + lib/routes/rawkuma/namespace.ts | 1 + lib/routes/raycast/namespace.ts | 1 + lib/routes/react/namespace.ts | 1 + lib/routes/reactiflux/namespace.ts | 1 + lib/routes/reactnewsletter/namespace.ts | 1 + lib/routes/readhub/namespace.ts | 1 + lib/routes/readwise/namespace.ts | 1 + lib/routes/rebase/namespace.ts | 1 + lib/routes/remnote/namespace.ts | 1 + lib/routes/researchgate/namespace.ts | 1 + lib/routes/resonac/namespace.ts | 1 + lib/routes/reuters/namespace.ts | 1 + lib/routes/rfa/namespace.ts | 1 + lib/routes/rfi/namespace.ts | 1 + lib/routes/right/namespace.ts | 1 + lib/routes/rodong/namespace.ts | 1 + lib/routes/routledge/namespace.ts | 1 + lib/routes/rsc/namespace.ts | 1 + lib/routes/rss3/namespace.ts | 1 + lib/routes/rsshub/namespace.ts | 1 + lib/routes/ruancan/namespace.ts | 1 + lib/routes/ruc/namespace.ts | 1 + lib/routes/runtrail/namespace.ts | 1 + lib/routes/rustcc/namespace.ts | 1 + lib/routes/sakurazaka46/namespace.ts | 1 + lib/routes/samd/namespace.ts | 1 + lib/routes/samsung/namespace.ts | 1 + lib/routes/sara/namespace.ts | 1 + lib/routes/saraba1st/namespace.ts | 1 + lib/routes/sass/namespace.ts | 1 + lib/routes/scau/namespace.ts | 1 + lib/routes/science/namespace.ts | 1 + lib/routes/sciencedirect/namespace.ts | 1 + lib/routes/sciencenet/namespace.ts | 1 + lib/routes/scmp/namespace.ts | 1 + lib/routes/scnu/namespace.ts | 1 + lib/routes/sctv/namespace.ts | 1 + lib/routes/scut/namespace.ts | 1 + lib/routes/scvtc/namespace.ts | 1 + lib/routes/sdu/namespace.ts | 1 + lib/routes/sdust/namespace.ts | 1 + lib/routes/sdzk/namespace.ts | 1 + lib/routes/sec-in/namespace.ts | 1 + lib/routes/sec-wiki/namespace.ts | 1 + lib/routes/secrss/namespace.ts | 1 + lib/routes/seekingalpha/namespace.ts | 1 + lib/routes/sega/namespace.ts | 1 + lib/routes/segmentfault/namespace.ts | 1 + lib/routes/sehuatang/namespace.ts | 1 + lib/routes/sensortower/namespace.ts | 1 + lib/routes/setn/namespace.ts | 1 + lib/routes/seu/namespace.ts | 1 + lib/routes/sfacg/namespace.ts | 1 + lib/routes/shcstheatre/namespace.ts | 1 + lib/routes/shiep/namespace.ts | 1 + lib/routes/shisu/namespace.ts | 1 + lib/routes/shmeea/namespace.ts | 1 + lib/routes/shmtu/namespace.ts | 1 + lib/routes/shoac/namespace.ts | 1 + lib/routes/shopback/namespace.ts | 1 + lib/routes/shopify/namespace.ts | 1 + lib/routes/shoppingdesign/namespace.ts | 1 + lib/routes/showstart/namespace.ts | 1 + lib/routes/shu/namespace.ts | 1 + lib/routes/shuiguopai/namespace.ts | 1 + lib/routes/sicau/namespace.ts | 1 + lib/routes/sigsac/namespace.ts | 1 + lib/routes/simpleinfo/namespace.ts | 1 + lib/routes/sina/namespace.ts | 1 + lib/routes/sinchew/namespace.ts | 1 + lib/routes/sis001/namespace.ts | 1 + lib/routes/sjtu/namespace.ts | 1 + lib/routes/skeb/namespace.ts | 1 + lib/routes/skebetter/namespace.ts | 1 + lib/routes/sketis/namespace.ts | 1 + lib/routes/skysports/namespace.ts | 1 + lib/routes/slowmist/namespace.ts | 1 + lib/routes/smashingmagazine/namespace.ts | 1 + lib/routes/smzdm/namespace.ts | 1 + lib/routes/snowpeak/namespace.ts | 1 + lib/routes/sobooks/namespace.ts | 1 + lib/routes/sogou/namespace.ts | 1 + lib/routes/sohu/namespace.ts | 1 + lib/routes/solidot/namespace.ts | 1 + lib/routes/sony/namespace.ts | 1 + lib/routes/sorrycc/namespace.ts | 1 + lib/routes/soundofhope/namespace.ts | 1 + lib/routes/soundon/namespace.ts | 1 + lib/routes/sourceforge/namespace.ts | 1 + lib/routes/southcn/namespace.ts | 1 + lib/routes/spankbang/namespace.ts | 1 + lib/routes/spotify/namespace.ts | 1 + lib/routes/springer/namespace.ts | 1 + lib/routes/sputniknews/namespace.ts | 1 + lib/routes/sqmc/namespace.ts | 1 + lib/routes/sse/namespace.ts | 1 + lib/routes/ssm/namespace.ts | 1 + lib/routes/sspai/namespace.ts | 1 + lib/routes/sspu/namespace.ts | 1 + lib/routes/startuplatte/namespace.ts | 1 + lib/routes/stbu/namespace.ts | 1 + lib/routes/stcn/namespace.ts | 1 + lib/routes/stdaily/namespace.ts | 1 + lib/routes/steam/namespace.ts | 1 + lib/routes/stheadline/namespace.ts | 1 + lib/routes/stockedge/namespace.ts | 1 + lib/routes/storm/namespace.ts | 1 + lib/routes/storyfm/namespace.ts | 1 + lib/routes/straitstimes/namespace.ts | 1 + lib/routes/stratechery/namespace.ts | 1 + lib/routes/stream-capital/namespace.ts | 1 + lib/routes/studygolang/namespace.ts | 1 + lib/routes/subhd/namespace.ts | 1 + lib/routes/supchina/namespace.ts | 1 + lib/routes/surfshark/namespace.ts | 1 + lib/routes/sustainabilitymag/namespace.ts | 1 + lib/routes/sustech/namespace.ts | 1 + lib/routes/swissinfo/namespace.ts | 1 + lib/routes/swjtu/namespace.ts | 1 + lib/routes/swpu/namespace.ts | 1 + lib/routes/sycl/namespace.ts | 1 + lib/routes/syosetu/namespace.ts | 1 + lib/routes/sysu/namespace.ts | 1 + lib/routes/szftedu/namespace.ts | 1 + lib/routes/szse/namespace.ts | 1 + lib/routes/szu/namespace.ts | 1 + lib/routes/t66y/namespace.ts | 1 + lib/routes/tableau/namespace.ts | 1 + lib/routes/taiwannews/namespace.ts | 3 ++- lib/routes/tangshufang/namespace.ts | 1 + lib/routes/taobao/namespace.ts | 1 + lib/routes/taoguba/namespace.ts | 1 + lib/routes/taptap/namespace.ts | 1 + lib/routes/tass/namespace.ts | 1 + lib/routes/techcrunch/namespace.ts | 1 + lib/routes/techflowpost/namespace.ts | 1 + lib/routes/techpowerup/namespace.ts | 1 + lib/routes/telecompaper/namespace.ts | 1 + lib/routes/telegram/namespace.ts | 1 + lib/routes/tencent/namespace.ts | 1 + lib/routes/tesla/namespace.ts | 1 + lib/routes/test/namespace.ts | 1 + lib/routes/tfc-taiwan/namespace.ts | 1 + lib/routes/tgbus/namespace.ts | 1 + lib/routes/the/namespace.ts | 1 + lib/routes/theatlantic/namespace.ts | 1 + lib/routes/theblockbeats/namespace.ts | 1 + lib/routes/thecover/namespace.ts | 1 + lib/routes/thehindu/namespace.ts | 1 + lib/routes/theinitium/namespace.ts | 1 + lib/routes/themoviedb/namespace.ts | 1 + lib/routes/thenewslens/namespace.ts | 1 + lib/routes/thepaper/namespace.ts | 1 + lib/routes/thepetcity/namespace.ts | 1 + lib/routes/theverge/namespace.ts | 1 + lib/routes/thoughtco/namespace.ts | 1 + lib/routes/thoughtworks/namespace.ts | 1 + lib/routes/threads/namespace.ts | 1 + lib/routes/thwiki/namespace.ts | 1 + lib/routes/tiktok/namespace.ts | 1 + lib/routes/timednews/namespace.ts | 1 + lib/routes/tingshuitz/namespace.ts | 3 ++- lib/routes/tingtingfm/namespace.ts | 1 + lib/routes/tisi/namespace.ts | 1 + lib/routes/tju/namespace.ts | 1 + lib/routes/tkww/namespace.ts | 1 + lib/routes/tokeninsight/namespace.ts | 1 + lib/routes/tongji/namespace.ts | 1 + lib/routes/tongli/namespace.ts | 1 + lib/routes/toodaylab/namespace.ts | 1 + lib/routes/tophub/namespace.ts | 1 + lib/routes/topys/namespace.ts | 1 + lib/routes/towardsdatascience/namespace.ts | 1 + lib/routes/tradingview/namespace.ts | 1 + lib/routes/transcriptforest/namespace.ts | 1 + lib/routes/trending/namespace.ts | 1 + lib/routes/trendingpapers/namespace.ts | 1 + lib/routes/tribalfootball/namespace.ts | 1 + lib/routes/trow/namespace.ts | 1 + lib/routes/tsdm39/namespace.ts | 1 + lib/routes/tsinghua/namespace.ts | 1 + lib/routes/ttv/namespace.ts | 1 + lib/routes/tvb/namespace.ts | 1 + lib/routes/tvtropes/namespace.ts | 1 + lib/routes/twitch/namespace.ts | 1 + lib/routes/twitter/namespace.ts | 1 + lib/routes/twreporter/namespace.ts | 1 + lib/routes/txrjy/namespace.ts | 1 + lib/routes/tynu/namespace.ts | 1 + lib/routes/typora/namespace.ts | 1 + lib/routes/typst/namespace.ts | 1 + lib/routes/u3c3/namespace.ts | 1 + lib/routes/u9a9/namespace.ts | 1 + lib/routes/uber/namespace.ts | 3 ++- lib/routes/ucas/namespace.ts | 1 + lib/routes/uchicago/namespace.ts | 1 + lib/routes/udn/namespace.ts | 1 + lib/routes/uestc/namespace.ts | 1 + lib/routes/uibe/namespace.ts | 1 + lib/routes/ulapia/namespace.ts | 1 + lib/routes/uniqlo/namespace.ts | 1 + lib/routes/unraid/namespace.ts | 1 + lib/routes/unusualwhales/namespace.ts | 1 + lib/routes/upc/namespace.ts | 1 + lib/routes/uptimerobot/namespace.ts | 1 + lib/routes/uraaka-joshi/namespace.ts | 1 + lib/routes/urbandictionary/namespace.ts | 1 + lib/routes/usenix/namespace.ts | 1 + lib/routes/usepanda/namespace.ts | 1 + lib/routes/ustb/namespace.ts | 1 + lib/routes/ustc/namespace.ts | 1 + lib/routes/usts/namespace.ts | 1 + lib/routes/utgd/namespace.ts | 1 + lib/routes/uw/namespace.ts | 1 + lib/routes/v1tx/namespace.ts | 1 + lib/routes/v2ex/namespace.ts | 1 + lib/routes/v2rayshare/namespace.ts | 1 + lib/routes/vcb-s/namespace.ts | 1 + lib/routes/verfghbw/namespace.ts | 1 + lib/routes/vice/namespace.ts | 1 + lib/routes/vimeo/namespace.ts | 1 + lib/routes/vocus/namespace.ts | 1 + lib/routes/vom/namespace.ts | 3 ++- lib/routes/voronoiapp/namespace.ts | 1 + lib/routes/wallhaven/namespace.ts | 1 + lib/routes/wallpaperhub/namespace.ts | 1 + lib/routes/wallstreetcn/namespace.ts | 1 + lib/routes/wanqu/namespace.ts | 1 + lib/routes/warthunder/namespace.ts | 1 + lib/routes/washingtonpost/namespace.ts | 1 + lib/routes/watasuke/namespace.ts | 1 + lib/routes/wchscu/namespace.ts | 1 + lib/routes/wdc/namespace.ts | 1 + lib/routes/web/namespace.ts | 1 + lib/routes/web3caff/namespace.ts | 1 + lib/routes/wechat/namespace.ts | 1 + lib/routes/weekendhk/namespace.ts | 1 + lib/routes/weibo/namespace.ts | 1 + lib/routes/wellcee/namespace.ts | 1 + lib/routes/wenku8/namespace.ts | 1 + lib/routes/wfdf/namespace.ts | 1 + lib/routes/wfu/namespace.ts | 1 + lib/routes/whitehouse/namespace.ts | 1 + lib/routes/who/namespace.ts | 1 + lib/routes/whu/namespace.ts | 1 + lib/routes/wikinews/namespace.ts | 1 + lib/routes/winstall/namespace.ts | 1 + lib/routes/wired/namespace.ts | 1 + lib/routes/wise/namespace.ts | 1 + lib/routes/withgoogle/namespace.ts | 1 + lib/routes/wizfile/namespace.ts | 1 + lib/routes/wmc-bj/namespace.ts | 1 + lib/routes/wmpvp/namespace.ts | 1 + lib/routes/wnacg/namespace.ts | 1 + lib/routes/wordpress/namespace.ts | 1 + lib/routes/worldjournal/namespace.ts | 1 + lib/routes/worldofwarships/namespace.ts | 1 + lib/routes/woshipm/namespace.ts | 1 + lib/routes/wsj/namespace.ts | 1 + lib/routes/wsyu/namespace.ts | 1 + lib/routes/wtu/namespace.ts | 1 + lib/routes/wyzxwk/namespace.ts | 1 + lib/routes/wzu/namespace.ts | 1 + lib/routes/x-mol/namespace.ts | 1 + lib/routes/x6d/namespace.ts | 1 + lib/routes/xaufe/namespace.ts | 1 + lib/routes/xaut/namespace.ts | 1 + lib/routes/xbookcn/namespace.ts | 1 + lib/routes/xboxfan/namespace.ts | 1 + lib/routes/xianbao/namespace.ts | 1 + lib/routes/xiaoheihe/namespace.ts | 1 + lib/routes/xiaohongshu/namespace.ts | 1 + lib/routes/xiaomiyoupin/namespace.ts | 1 + lib/routes/xiaote/namespace.ts | 1 + lib/routes/xiaoyuzhou/namespace.ts | 1 + lib/routes/xiaozhuanlan/namespace.ts | 1 + lib/routes/xidian/namespace.ts | 1 + lib/routes/ximalaya/namespace.ts | 1 + lib/routes/xinhuanet/namespace.ts | 1 + lib/routes/xinpianchang/namespace.ts | 1 + lib/routes/xjtu/namespace.ts | 1 + lib/routes/xkb/namespace.ts | 1 + lib/routes/xmanhua/namespace.ts | 1 + lib/routes/xmnn/namespace.ts | 1 + lib/routes/xmut/namespace.ts | 1 + lib/routes/xsijishe/namespace.ts | 1 + lib/routes/xueqiu/namespace.ts | 1 + lib/routes/xunhupay/namespace.ts | 1 + lib/routes/xys/namespace.ts | 1 + lib/routes/xyzrank/namespace.ts | 1 + lib/routes/yahoo/namespace.ts | 1 + lib/routes/yamap/namespace.ts | 1 + lib/routes/yamibo/namespace.ts | 1 + lib/routes/yande/namespace.ts | 1 + lib/routes/yangtzeu/namespace.ts | 1 + lib/routes/ycwb/namespace.ts | 1 + lib/routes/yenpress/namespace.ts | 1 + lib/routes/ygkkk/namespace.ts | 1 + lib/routes/yicai/namespace.ts | 1 + lib/routes/yilinzazhi/namespace.ts | 1 + lib/routes/ymgal/namespace.ts | 1 + lib/routes/yoasobi-music/namespace.ts | 1 + lib/routes/yomiuri/namespace.ts | 1 + lib/routes/yomujp/namespace.ts | 1 + lib/routes/youku/namespace.ts | 1 + lib/routes/youtube/namespace.ts | 1 + lib/routes/youzhiyouxing/namespace.ts | 1 + lib/routes/yuque/namespace.ts | 1 + lib/routes/yxdown/namespace.ts | 1 + lib/routes/yxdzqb/namespace.ts | 1 + lib/routes/yxrb/namespace.ts | 1 + lib/routes/yyets/namespace.ts | 1 + lib/routes/yystv/namespace.ts | 1 + lib/routes/zagg/namespace.ts | 1 + lib/routes/zaker/namespace.ts | 1 + lib/routes/zaobao/namespace.ts | 1 + lib/routes/zaozao/namespace.ts | 1 + lib/routes/zcmu/namespace.ts | 1 + lib/routes/zcool/namespace.ts | 1 + lib/routes/zhibo8/namespace.ts | 1 + lib/routes/zhihu/namespace.ts | 1 + lib/routes/zhitongcaijing/namespace.ts | 1 + lib/routes/zhiy/namespace.ts | 1 + lib/routes/zhonglun/namespace.ts | 1 + lib/routes/zhubai/namespace.ts | 1 + lib/routes/zhujiceping/namespace.ts | 1 + lib/routes/zhuwang/namespace.ts | 1 + lib/routes/zimuxia/namespace.ts | 1 + lib/routes/zjgtjy/namespace.ts | 1 + lib/routes/zjol/namespace.ts | 1 + lib/routes/zju/namespace.ts | 1 + lib/routes/zjut/namespace.ts | 1 + lib/routes/zjuvag/namespace.ts | 1 + lib/routes/zodgame/namespace.ts | 1 + lib/routes/zotero/namespace.ts | 1 + lib/routes/zrblog/namespace.ts | 1 + lib/routes/zsxq/namespace.ts | 1 + lib/routes/zuel/namespace.ts | 1 + lib/routes/zuvio/namespace.ts | 1 + lib/routes/zyshow/namespace.ts | 1 + lib/routes/zyw/namespace.ts | 1 + lib/types.ts | 7 +++++++ 1227 files changed, 1260 insertions(+), 21 deletions(-) create mode 100644 lib/routes/infzm/namespace.ts diff --git a/lib/routes/005/namespace.ts b/lib/routes/005/namespace.ts index fcf20a8fb0f1bdf..d1d87624113ef9f 100644 --- a/lib/routes/005/namespace.ts +++ b/lib/routes/005/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: '005.tv', categories: ['anime'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/0818tuan/namespace.ts b/lib/routes/0818tuan/namespace.ts index 0823033afc387eb..8625a0692fbfd7a 100644 --- a/lib/routes/0818tuan/namespace.ts +++ b/lib/routes/0818tuan/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '0818 团', url: '0818tuan.com', + lang: 'zh-CN', }; diff --git a/lib/routes/0x80/namespace.ts b/lib/routes/0x80/namespace.ts index 8866d08e7919a9d..a84007277e7ee44 100644 --- a/lib/routes/0x80/namespace.ts +++ b/lib/routes/0x80/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Wojciech Muła', url: '0x80.pl', description: '', + lang: 'en', }; diff --git a/lib/routes/10jqka/namespace.ts b/lib/routes/10jqka/namespace.ts index 2b85dd79a2ec0a3..89c8f220524e736 100644 --- a/lib/routes/10jqka/namespace.ts +++ b/lib/routes/10jqka/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: '10jqka.com.cn', categories: ['finance'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/12306/namespace.ts b/lib/routes/12306/namespace.ts index e7b13a5dfe36ad1..7f402d08444a275 100644 --- a/lib/routes/12306/namespace.ts +++ b/lib/routes/12306/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '12306', url: 'kyfw.12306.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/12371/namespace.ts b/lib/routes/12371/namespace.ts index 1d2b130936da624..c6ad54d95c212f8 100644 --- a/lib/routes/12371/namespace.ts +++ b/lib/routes/12371/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '共产党员网', url: 'www.12371.cn', categories: ['government'], + lang: 'zh-CN', }; diff --git a/lib/routes/141jav/namespace.ts b/lib/routes/141jav/namespace.ts index 0c6a56916bcb335..f1c700f8abca7d4 100644 --- a/lib/routes/141jav/namespace.ts +++ b/lib/routes/141jav/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip 官方提供的订阅源不支持 BT 下载订阅,地址为 [https://141jav.com/feeds/](https://141jav.com/feeds/) :::`, + lang: 'en', }; diff --git a/lib/routes/141ppv/namespace.ts b/lib/routes/141ppv/namespace.ts index 73c2292c5b89747..bda31ee5e6aee7b 100644 --- a/lib/routes/141ppv/namespace.ts +++ b/lib/routes/141ppv/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip 官方提供的订阅源不支持 BT 下载订阅,地址为 [https://141ppv.com/feeds/](https://141ppv.com/feeds/) :::`, + lang: 'en', }; diff --git a/lib/routes/163/namespace.ts b/lib/routes/163/namespace.ts index 4005a73ca1d6f1a..4c150cbb705becd 100644 --- a/lib/routes/163/namespace.ts +++ b/lib/routes/163/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip 部分歌单及听歌排行信息为登陆后可见,自建时将环境变量\`NCM_COOKIES\`设为登陆后的 Cookie 值,即可正常获取。 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/18comic/namespace.ts b/lib/routes/18comic/namespace.ts index e910cb8fb0a7c84..5773dfaf262f56b 100644 --- a/lib/routes/18comic/namespace.ts +++ b/lib/routes/18comic/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip 禁漫天堂有多个备用域名,本路由默认使用域名 \`https://jmcomic.me\`,若该域名无法访问,可以通过在路由最后加上 \`?domain=<域名>\` 指定路由访问的域名。如指定备用域名为 \`https://jmcomic1.me\`,则在所有禁漫天堂路由最后加上 \`?domain=jmcomic1.me\` 即可,此时路由为 [\`/18comic?domain=jmcomic1.me\`](https://rsshub.app/18comic?domain=jmcomic1.me) :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/19lou/namespace.ts b/lib/routes/19lou/namespace.ts index fdb482029831cd8..727582559cd4841 100644 --- a/lib/routes/19lou/namespace.ts +++ b/lib/routes/19lou/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '19 楼', url: '19lou.com', + lang: 'zh-CN', }; diff --git a/lib/routes/1lou/namespace.ts b/lib/routes/1lou/namespace.ts index 03f3b6c0adb5be3..f4a5cbf8b08ed06 100644 --- a/lib/routes/1lou/namespace.ts +++ b/lib/routes/1lou/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: '1lou.me', categories: ['multimedia'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/1point3acres/namespace.ts b/lib/routes/1point3acres/namespace.ts index f1af63dc713e442..86131f5ca7ba7b7 100644 --- a/lib/routes/1point3acres/namespace.ts +++ b/lib/routes/1point3acres/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '一亩三分地', url: 'blog.1point3acres.com', + lang: 'zh-CN', }; diff --git a/lib/routes/1x/namespace.ts b/lib/routes/1x/namespace.ts index 4e8cc283eb42627..0a8fb7a22477aa6 100644 --- a/lib/routes/1x/namespace.ts +++ b/lib/routes/1x/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: '1x.com', categories: ['design', 'picture'], description: '1x.com • In Pursuit of the Sublime. Browse 200,000 curated photos from photographers all over the world.', + lang: 'en', }; diff --git a/lib/routes/2023game/namespace.ts b/lib/routes/2023game/namespace.ts index 0405df7cc98a7b5..0a703ee28612308 100644 --- a/lib/routes/2023game/namespace.ts +++ b/lib/routes/2023game/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '游戏星辰', url: 'www.2023game.com', + lang: 'zh-CN', }; diff --git a/lib/routes/2048/namespace.ts b/lib/routes/2048/namespace.ts index 59ad6958dbf16eb..46387693987259b 100644 --- a/lib/routes/2048/namespace.ts +++ b/lib/routes/2048/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '2048 核基地', url: 'hjd2048.com', + lang: 'zh-CN', }; diff --git a/lib/routes/2cycd/namespace.ts b/lib/routes/2cycd/namespace.ts index 4b264b1b8118582..c05898788fb9e87 100644 --- a/lib/routes/2cycd/namespace.ts +++ b/lib/routes/2cycd/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '二次元虫洞', url: '2cycd.com', + lang: 'zh-CN', }; diff --git a/lib/routes/36kr/namespace.ts b/lib/routes/36kr/namespace.ts index 5501ecc1c045368..be656f3a50224e2 100644 --- a/lib/routes/36kr/namespace.ts +++ b/lib/routes/36kr/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '36kr', url: '36kr.com', + lang: 'zh-CN', }; diff --git a/lib/routes/3dmgame/namespace.ts b/lib/routes/3dmgame/namespace.ts index 471319744d401fe..50b1d57c9cbbbf1 100644 --- a/lib/routes/3dmgame/namespace.ts +++ b/lib/routes/3dmgame/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '3DMGame', url: '3dmgame.com', + lang: 'zh-CN', }; diff --git a/lib/routes/3kns/namespace.ts b/lib/routes/3kns/namespace.ts index de8ffd266f685be..08c1992d05a61bf 100644 --- a/lib/routes/3kns/namespace.ts +++ b/lib/routes/3kns/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '3k-Switch游戏库', url: 'www.3kns.com', + lang: 'zh-CN', }; diff --git a/lib/routes/423down/namespace.ts b/lib/routes/423down/namespace.ts index e04849800f77f6d..580ea8bbfa328d0 100644 --- a/lib/routes/423down/namespace.ts +++ b/lib/routes/423down/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: '423down.com', categories: ['program-update'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/4gamers/namespace.ts b/lib/routes/4gamers/namespace.ts index f133378e3021173..ceb8f3e11c1ca37 100644 --- a/lib/routes/4gamers/namespace.ts +++ b/lib/routes/4gamers/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '4Gamers', url: 'www.4gamers.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/4ksj/namespace.ts b/lib/routes/4ksj/namespace.ts index 1965e275fc34c49..4b2b90dc42066a4 100644 --- a/lib/routes/4ksj/namespace.ts +++ b/lib/routes/4ksj/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '4k 世界', url: '4ksj.com', + lang: 'zh-CN', }; diff --git a/lib/routes/500px/namespace.ts b/lib/routes/500px/namespace.ts index e4783d9aa476b7f..0ef51cf33e4b08f 100644 --- a/lib/routes/500px/namespace.ts +++ b/lib/routes/500px/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '500px 摄影社区', url: '500px.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/50forum/namespace.ts b/lib/routes/50forum/namespace.ts index 7774e24e56c7fb5..267b3941753636c 100644 --- a/lib/routes/50forum/namespace.ts +++ b/lib/routes/50forum/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '经济 50 人论坛', url: '50forum.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/51cto/namespace.ts b/lib/routes/51cto/namespace.ts index 96d3ff4ed31a858..279fbdf40ec40f0 100644 --- a/lib/routes/51cto/namespace.ts +++ b/lib/routes/51cto/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '51CTO', url: '51cto.com', + lang: 'zh-CN', }; diff --git a/lib/routes/51read/namespace.ts b/lib/routes/51read/namespace.ts index 1c50a9ed2843337..26b64b3c717e782 100644 --- a/lib/routes/51read/namespace.ts +++ b/lib/routes/51read/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '51Read', url: 'm.51read.org', + lang: 'zh-CN', }; diff --git a/lib/routes/52hrtt/namespace.ts b/lib/routes/52hrtt/namespace.ts index bbd7776ca3f3045..f7c5f126cde083b 100644 --- a/lib/routes/52hrtt/namespace.ts +++ b/lib/routes/52hrtt/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '52hrtt 华人头条', url: '52hrtt.com', + lang: 'zh-CN', }; diff --git a/lib/routes/56kog/namespace.ts b/lib/routes/56kog/namespace.ts index 52f077338e58cdc..a3e00cb9d6e4dc3 100644 --- a/lib/routes/56kog/namespace.ts +++ b/lib/routes/56kog/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '明月中文网', url: '56kog.com', + lang: 'zh-CN', }; diff --git a/lib/routes/591/namespace.ts b/lib/routes/591/namespace.ts index a27fcf5d575c803..7e5055c3a519855 100644 --- a/lib/routes/591/namespace.ts +++ b/lib/routes/591/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '591 Rental house', url: 'rent.591.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/5eplay/namespace.ts b/lib/routes/5eplay/namespace.ts index b48fc2733462070..dca7393b9a2bfa2 100644 --- a/lib/routes/5eplay/namespace.ts +++ b/lib/routes/5eplay/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '5EPLAY', url: 'csgo.5eplay.com', + lang: 'zh-CN', }; diff --git a/lib/routes/69shu/namespace.ts b/lib/routes/69shu/namespace.ts index df36fa4cd454d53..6c19ebe51938bda 100644 --- a/lib/routes/69shu/namespace.ts +++ b/lib/routes/69shu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '69书吧', url: '69shuba.cx', + lang: 'zh-CN', }; diff --git a/lib/routes/6park/namespace.ts b/lib/routes/6park/namespace.ts index f549c08fd6002e6..5664e409c7aead7 100644 --- a/lib/routes/6park/namespace.ts +++ b/lib/routes/6park/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '留园网', url: 'club.6parkbbs.com', + lang: 'zh-CN', }; diff --git a/lib/routes/6v123/namespace.ts b/lib/routes/6v123/namespace.ts index 6a83d25a41b67c5..915540500262b39 100644 --- a/lib/routes/6v123/namespace.ts +++ b/lib/routes/6v123/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '6v 电影', url: 'hao6v.cc', + lang: 'zh-CN', }; diff --git a/lib/routes/78dm/namespace.ts b/lib/routes/78dm/namespace.ts index b73666bb457b612..44344119024834f 100644 --- a/lib/routes/78dm/namespace.ts +++ b/lib/routes/78dm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '78 动漫', url: '78dm.net', + lang: 'zh-CN', }; diff --git a/lib/routes/7mmtv/namespace.ts b/lib/routes/7mmtv/namespace.ts index b3896a64ea330cc..30daaeef3d2835b 100644 --- a/lib/routes/7mmtv/namespace.ts +++ b/lib/routes/7mmtv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '7mmtv', url: '7mmtv.tv', + lang: 'zh-CN', }; diff --git a/lib/routes/81/namespace.ts b/lib/routes/81/namespace.ts index 9a60c8f378391a6..3019d5fbba3f6fa 100644 --- a/lib/routes/81/namespace.ts +++ b/lib/routes/81/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: '81.cn', categories: ['government'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/8264/namespace.ts b/lib/routes/8264/namespace.ts index 3d2cf0432fcd8bd..48522cf12fe0a4c 100644 --- a/lib/routes/8264/namespace.ts +++ b/lib/routes/8264/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '8264', url: '8264.com', + lang: 'zh-CN', }; diff --git a/lib/routes/8kcos/namespace.ts b/lib/routes/8kcos/namespace.ts index 15e6c6a13355c7a..0fcb25f00a58c06 100644 --- a/lib/routes/8kcos/namespace.ts +++ b/lib/routes/8kcos/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '8KCosplay', url: '8kcosplay.com', + lang: 'zh-CN', }; diff --git a/lib/routes/8world/namespace.ts b/lib/routes/8world/namespace.ts index d65a6da2d746e0a..5cd25e46eb8e3fd 100644 --- a/lib/routes/8world/namespace.ts +++ b/lib/routes/8world/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '8 视界', url: '8world.com', + lang: 'zh-CN', }; diff --git a/lib/routes/91porn/namespace.ts b/lib/routes/91porn/namespace.ts index d9c38b15c6965d9..a4340ed42aaff44 100644 --- a/lib/routes/91porn/namespace.ts +++ b/lib/routes/91porn/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip 91porn has multiple backup domains, routes use the permanent domain \`https://91porn.com\` by default. If the domain is not accessible, you can add \`?domain=<domain>\` to specify the domain to be used. If you want to specify the backup domain to \`https://0122.91p30.com\`, you can add \`?domain=0122.91p30.com\` to the end of all 91porn routes, then the route will become [\`/91porn?domain=0122.91p30.com\`](https://rsshub.app/91porn?domain=0122.91p30.com) :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/95mm/namespace.ts b/lib/routes/95mm/namespace.ts index 1b4f81d33efb926..ff0cd85269cfd9d 100644 --- a/lib/routes/95mm/namespace.ts +++ b/lib/routes/95mm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MM 范', url: '95mm.org', + lang: 'zh-CN', }; diff --git a/lib/routes/9to5/namespace.ts b/lib/routes/9to5/namespace.ts index 2e757a1c162a687..ec50d03f614ac81 100644 --- a/lib/routes/9to5/namespace.ts +++ b/lib/routes/9to5/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '9To5', url: '9to5toys.com', + lang: 'en', }; diff --git a/lib/routes/a9vg/namespace.ts b/lib/routes/a9vg/namespace.ts index 545b90905e7ea25..dc0110181863d44 100644 --- a/lib/routes/a9vg/namespace.ts +++ b/lib/routes/a9vg/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'A9VG 电玩部落', url: 'a9vg.com', description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/aamacau/namespace.ts b/lib/routes/aamacau/namespace.ts index afc407e648e7b86..d0eb36ae27115cd 100644 --- a/lib/routes/aamacau/namespace.ts +++ b/lib/routes/aamacau/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '論盡媒體 AllAboutMacau Media', url: 'aamacau.com', + lang: 'zh-HK', }; diff --git a/lib/routes/abc/namespace.ts b/lib/routes/abc/namespace.ts index 19568cd0ee7fbf3..4cfd6d4e033c2ee 100644 --- a/lib/routes/abc/namespace.ts +++ b/lib/routes/abc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ABC News', url: 'abc.net.au', + lang: 'en', }; diff --git a/lib/routes/abmedia/namespace.ts b/lib/routes/abmedia/namespace.ts index b1b909fdd08f88b..e20c52b77a9dc56 100644 --- a/lib/routes/abmedia/namespace.ts +++ b/lib/routes/abmedia/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '链新闻 ABMedia', url: 'www.abmedia.io', + lang: 'zh-TW', }; diff --git a/lib/routes/abskoop/namespace.ts b/lib/routes/abskoop/namespace.ts index ab54b3e351e7456..ee0227a29655da4 100644 --- a/lib/routes/abskoop/namespace.ts +++ b/lib/routes/abskoop/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'A 姐分享', url: 'nsfw.abskoop.com', + lang: 'zh-TW', }; diff --git a/lib/routes/academia/namespace.ts b/lib/routes/academia/namespace.ts index 01dd83edbfd9112..c1610b575efaa35 100644 --- a/lib/routes/academia/namespace.ts +++ b/lib/routes/academia/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Academia', url: 'www.academia.edu', + lang: 'en', }; diff --git a/lib/routes/accessbriefing/namespace.ts b/lib/routes/accessbriefing/namespace.ts index 6c647cc4ff9223c..a2a058d3df2fdc9 100644 --- a/lib/routes/accessbriefing/namespace.ts +++ b/lib/routes/accessbriefing/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'accessbriefing.com', categories: ['new-media'], description: '', + lang: 'en', }; diff --git a/lib/routes/acfun/namespace.ts b/lib/routes/acfun/namespace.ts index 5e4be56b6672913..c69cd5feb257c8d 100644 --- a/lib/routes/acfun/namespace.ts +++ b/lib/routes/acfun/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AcFun', url: 'www.acfun.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/acg17/namespace.ts b/lib/routes/acg17/namespace.ts index 161fe01ca04556c..57c7ec67535401f 100644 --- a/lib/routes/acg17/namespace.ts +++ b/lib/routes/acg17/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ACG17', url: 'acg17.com', + lang: 'zh-CN', }; diff --git a/lib/routes/acpaa/namespace.ts b/lib/routes/acpaa/namespace.ts index 5a7db88fa01e971..a72a98eeaf1df0a 100644 --- a/lib/routes/acpaa/namespace.ts +++ b/lib/routes/acpaa/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中华全国专利代理师协会', url: 'acpaa.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/acs/namespace.ts b/lib/routes/acs/namespace.ts index 5ae767685865443..91fafa4667cb26f 100644 --- a/lib/routes/acs/namespace.ts +++ b/lib/routes/acs/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'Unknown', + name: 'ACS Publications', url: 'pubs.acs.org', + lang: 'en', }; diff --git a/lib/routes/aeaweb/namespace.ts b/lib/routes/aeaweb/namespace.ts index be041366e32b7eb..b727a055f2b4763 100644 --- a/lib/routes/aeaweb/namespace.ts +++ b/lib/routes/aeaweb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'American Economic Association', url: 'aeaweb.org', + lang: 'en', }; diff --git a/lib/routes/aeon/namespace.ts b/lib/routes/aeon/namespace.ts index 7f20c03a894f551..df6c32c061221bf 100644 --- a/lib/routes/aeon/namespace.ts +++ b/lib/routes/aeon/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AEON', url: 'aeon.aeon.co', + lang: 'en', }; diff --git a/lib/routes/afdian/namespace.ts b/lib/routes/afdian/namespace.ts index 3c4d181d72f71c5..43af5fb4c42cd49 100644 --- a/lib/routes/afdian/namespace.ts +++ b/lib/routes/afdian/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '爱发电', url: 'afdian.net', + lang: 'zh-CN', }; diff --git a/lib/routes/agefans/namespace.ts b/lib/routes/agefans/namespace.ts index faf0ed19215eaf4..1cbb5dbc53fb0b7 100644 --- a/lib/routes/agefans/namespace.ts +++ b/lib/routes/agefans/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AGE 动漫', url: 'agemys.cc', + lang: 'zh-CN', }; diff --git a/lib/routes/agirls/namespace.ts b/lib/routes/agirls/namespace.ts index 339faebbd5984ca..6a660dc1e741b8b 100644 --- a/lib/routes/agirls/namespace.ts +++ b/lib/routes/agirls/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '电獭少女', url: 'agirls.aotter.net', + lang: 'zh-TW', }; diff --git a/lib/routes/agora0/namespace.ts b/lib/routes/agora0/namespace.ts index 51fe8e88b7bafdd..e970eba75d9a3e3 100644 --- a/lib/routes/agora0/namespace.ts +++ b/lib/routes/agora0/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AG⓪RA', url: 'agorahub.github.io', + lang: 'en', }; diff --git a/lib/routes/agri/namespace.ts b/lib/routes/agri/namespace.ts index 5f8696f507c4389..f059dffc2eb84ad 100644 --- a/lib/routes/agri/namespace.ts +++ b/lib/routes/agri/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'agri.cn', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/ahjzu/namespace.ts b/lib/routes/ahjzu/namespace.ts index 2efc11070943a05..98bf403952ec206 100644 --- a/lib/routes/ahjzu/namespace.ts +++ b/lib/routes/ahjzu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '安徽建筑大学', url: 'news.ahjzu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/aibase/namespace.ts b/lib/routes/aibase/namespace.ts index 6c160a097a288a0..8969f5915e037ef 100644 --- a/lib/routes/aibase/namespace.ts +++ b/lib/routes/aibase/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'aibase.com', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/aicaijing/namespace.ts b/lib/routes/aicaijing/namespace.ts index f338f73bd71684a..d50e13febc390ed 100644 --- a/lib/routes/aicaijing/namespace.ts +++ b/lib/routes/aicaijing/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AI 财经社', url: 'www.aicaijing.com', + lang: 'zh-CN', }; diff --git a/lib/routes/aiea/namespace.ts b/lib/routes/aiea/namespace.ts index affb227c1423397..9b1dbcfd416ca67 100644 --- a/lib/routes/aiea/namespace.ts +++ b/lib/routes/aiea/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Asian Innovation and Entrepreneurship Association', url: 'www.aiea.org', + lang: 'en', }; diff --git a/lib/routes/aijishu/namespace.ts b/lib/routes/aijishu/namespace.ts index 971883a85ec3344..02ed7d23ce725e9 100644 --- a/lib/routes/aijishu/namespace.ts +++ b/lib/routes/aijishu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '极术社区', url: 'www.aijishu', + lang: 'zh-CN', }; diff --git a/lib/routes/ainvest/namespace.ts b/lib/routes/ainvest/namespace.ts index e220878f4e23514..e6985b1cfbabce1 100644 --- a/lib/routes/ainvest/namespace.ts +++ b/lib/routes/ainvest/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AInvest', url: 'ainvest.com', + lang: 'en', }; diff --git a/lib/routes/aip/namespace.ts b/lib/routes/aip/namespace.ts index df63b426968fc4a..cd7f9ca97013a17 100644 --- a/lib/routes/aip/namespace.ts +++ b/lib/routes/aip/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'American Institute of Physics', url: 'pubs.aip.org', + lang: 'en', }; diff --git a/lib/routes/airchina/namespace.ts b/lib/routes/airchina/namespace.ts index 37331fbb26b846e..1941def61fce23f 100644 --- a/lib/routes/airchina/namespace.ts +++ b/lib/routes/airchina/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国国际航空公司', url: 'www.airchina.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/aisixiang/namespace.ts b/lib/routes/aisixiang/namespace.ts index c74ac9965511628..aa1811ab78ec581 100644 --- a/lib/routes/aisixiang/namespace.ts +++ b/lib/routes/aisixiang/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '爱思想', url: 'aisixiang.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ajmide/namespace.ts b/lib/routes/ajmide/namespace.ts index 1ec1cd92126bb2e..bfb258b9ce7ed92 100644 --- a/lib/routes/ajmide/namespace.ts +++ b/lib/routes/ajmide/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '阿基米德 FM', url: 'm.ajmide.com', + lang: 'zh-CN', }; diff --git a/lib/routes/alicesoft/namespace.ts b/lib/routes/alicesoft/namespace.ts index 343ccfe366fa34c..ca9904aa76a3ad9 100644 --- a/lib/routes/alicesoft/namespace.ts +++ b/lib/routes/alicesoft/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ALICESOFT', url: 'www.alicesoft.com', + lang: 'ja', }; diff --git a/lib/routes/alipan/namespace.ts b/lib/routes/alipan/namespace.ts index e123290f95bc881..91c32c55173649c 100644 --- a/lib/routes/alipan/namespace.ts +++ b/lib/routes/alipan/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '阿里云盘', url: 'www.alipan.com', categories: ['multimedia'], + lang: 'zh-CN', }; diff --git a/lib/routes/aliresearch/namespace.ts b/lib/routes/aliresearch/namespace.ts index 94b92cc69233bea..249c83f7dda055d 100644 --- a/lib/routes/aliresearch/namespace.ts +++ b/lib/routes/aliresearch/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '阿里研究院', url: 'aliresearch.com', + lang: 'zh-CN', }; diff --git a/lib/routes/alistapart/namespace.ts b/lib/routes/alistapart/namespace.ts index 99712be45420790..6d8f2730e318c4d 100644 --- a/lib/routes/alistapart/namespace.ts +++ b/lib/routes/alistapart/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'A List Apart', url: 'alistapart.com', + lang: 'en', }; diff --git a/lib/routes/aliyun/namespace.ts b/lib/routes/aliyun/namespace.ts index 07680173282b2ce..64771ea7a95dca8 100644 --- a/lib/routes/aliyun/namespace.ts +++ b/lib/routes/aliyun/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '阿里云', url: 'developer.aliyun.com', + lang: 'zh-CN', }; diff --git a/lib/routes/aljazeera/namespace.ts b/lib/routes/aljazeera/namespace.ts index 22d73564b0a49aa..097358395a4cae5 100644 --- a/lib/routes/aljazeera/namespace.ts +++ b/lib/routes/aljazeera/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'Aljazeera 半岛电视台', + name: 'Aljazeera', url: 'aljazeera.com', + lang: 'en', }; diff --git a/lib/routes/ally/namespace.ts b/lib/routes/ally/namespace.ts index f69681f84a78cf7..888ca1c2611130f 100644 --- a/lib/routes/ally/namespace.ts +++ b/lib/routes/ally/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '艾莱资讯', url: 'rail.ally.net.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/alpinelinux/namespace.ts b/lib/routes/alpinelinux/namespace.ts index e7dfedfe99ef241..be620e436b75867 100644 --- a/lib/routes/alpinelinux/namespace.ts +++ b/lib/routes/alpinelinux/namespace.ts @@ -8,4 +8,5 @@ export const namespace: Namespace = { name: 'Alpine Linux', description: 'Alpine Linux 是一个基于 musl libc 和 busybox 的面向安全的轻量级 Linux 发行版。', }, + lang: 'en', }; diff --git a/lib/routes/alternativeto/namespace.ts b/lib/routes/alternativeto/namespace.ts index 973d11869cac358..6f24e15533beac7 100644 --- a/lib/routes/alternativeto/namespace.ts +++ b/lib/routes/alternativeto/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AlternativeTo', url: 'www.alternativeto.net', + lang: 'en', }; diff --git a/lib/routes/amazon/namespace.ts b/lib/routes/amazon/namespace.ts index 5e5086e0caa6d78..7815db99cfa5bf5 100644 --- a/lib/routes/amazon/namespace.ts +++ b/lib/routes/amazon/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Amazon', url: 'amazon.com', + lang: 'en', }; diff --git a/lib/routes/android/namespace.ts b/lib/routes/android/namespace.ts index 6e719bce7e4b284..ddcd05dcda25496 100644 --- a/lib/routes/android/namespace.ts +++ b/lib/routes/android/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Android', url: 'developer.android.com', + lang: 'en', }; diff --git a/lib/routes/anime1/namespace.ts b/lib/routes/anime1/namespace.ts index ddb3b91f0c7219f..7d5644fadc9230a 100644 --- a/lib/routes/anime1/namespace.ts +++ b/lib/routes/anime1/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Anime1', url: 'anime1.me', + lang: 'zh-TW', }; diff --git a/lib/routes/annualreviews/namespace.ts b/lib/routes/annualreviews/namespace.ts index bcbac1318363453..9ce5576f8ea4598 100644 --- a/lib/routes/annualreviews/namespace.ts +++ b/lib/routes/annualreviews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Annual Reviews', url: 'annualreviews.org', + lang: 'en', }; diff --git a/lib/routes/anquanke/namespace.ts b/lib/routes/anquanke/namespace.ts index 8373e6e9d3b73ad..fe64481676dec10 100644 --- a/lib/routes/anquanke/namespace.ts +++ b/lib/routes/anquanke/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip 官方提供了混合的主页资讯 RSS: [https://api.anquanke.com/data/v1/rss](https://api.anquanke.com/data/v1/rss) :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/apache/namespace.ts b/lib/routes/apache/namespace.ts index a551844046dd241..d6b71e27ca2aca9 100644 --- a/lib/routes/apache/namespace.ts +++ b/lib/routes/apache/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Apache', url: 'apisix.apache.org', + lang: 'en', }; diff --git a/lib/routes/apiseven/namespace.ts b/lib/routes/apiseven/namespace.ts index fb3d425ce3f1086..d1482c49afda0c4 100644 --- a/lib/routes/apiseven/namespace.ts +++ b/lib/routes/apiseven/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '支流科技', url: 'apiseven.com', + lang: 'zh-CN', }; diff --git a/lib/routes/apkpure/namespace.ts b/lib/routes/apkpure/namespace.ts index b26ba635b1d2398..6bacb019896ec14 100644 --- a/lib/routes/apkpure/namespace.ts +++ b/lib/routes/apkpure/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'APKPure', url: 'apkpure.com', + lang: 'en', }; diff --git a/lib/routes/apnews/namespace.ts b/lib/routes/apnews/namespace.ts index cdaed3fb58e25bf..48e7aa1caf6e8cb 100644 --- a/lib/routes/apnews/namespace.ts +++ b/lib/routes/apnews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AP News', url: 'apnews.com', + lang: 'en', }; diff --git a/lib/routes/app-center/namespace.ts b/lib/routes/app-center/namespace.ts index e5efc03525fb9d6..c3dfb838b4352e3 100644 --- a/lib/routes/app-center/namespace.ts +++ b/lib/routes/app-center/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'App Center', url: 'install.appcenter.ms', + lang: 'en', }; diff --git a/lib/routes/apple/namespace.ts b/lib/routes/apple/namespace.ts index c9a524f201cf246..4f9fd18169a3fef 100644 --- a/lib/routes/apple/namespace.ts +++ b/lib/routes/apple/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Apple', url: 'apps.apple.com', + lang: 'en', }; diff --git a/lib/routes/appleinsider/namespace.ts b/lib/routes/appleinsider/namespace.ts index b4ac79aa69b1856..b2712ee6b3a6aaf 100644 --- a/lib/routes/appleinsider/namespace.ts +++ b/lib/routes/appleinsider/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AppleInsider', url: 'appleinsider.com', + lang: 'en', }; diff --git a/lib/routes/appstare/namespace.ts b/lib/routes/appstare/namespace.ts index 3efc0382b2a398b..3d2809e68a9fe9a 100644 --- a/lib/routes/appstare/namespace.ts +++ b/lib/routes/appstare/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AppStare', url: 'appstare.net', + lang: 'zh-CN', }; diff --git a/lib/routes/appstore/namespace.ts b/lib/routes/appstore/namespace.ts index 4561b783496be95..cc4f08444621c08 100644 --- a/lib/routes/appstore/namespace.ts +++ b/lib/routes/appstore/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'App Store/Mac App Store', url: 'apps.apple.com', + lang: 'en', }; diff --git a/lib/routes/appstorrent/namespace.ts b/lib/routes/appstorrent/namespace.ts index 3b5b12a004499b2..f95fc97cb516bc7 100644 --- a/lib/routes/appstorrent/namespace.ts +++ b/lib/routes/appstorrent/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AppsTorrent', url: 'appstorrent.ru', + lang: 'ru', }; diff --git a/lib/routes/aqara/namespace.ts b/lib/routes/aqara/namespace.ts index e14ff72843e4592..d343eaea253e9fc 100644 --- a/lib/routes/aqara/namespace.ts +++ b/lib/routes/aqara/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Aqara', url: 'aqara.com', + lang: 'zh-CN', }; diff --git a/lib/routes/aqicn/namespace.ts b/lib/routes/aqicn/namespace.ts index e370267b48c4ee2..a0c29c99d6d4007 100644 --- a/lib/routes/aqicn/namespace.ts +++ b/lib/routes/aqicn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '空气质量', url: 'aqicn.org', + lang: 'zh-CN', }; diff --git a/lib/routes/arcteryx/namespace.ts b/lib/routes/arcteryx/namespace.ts index 0ada8bdaa86502c..cc97c54bf818897 100644 --- a/lib/routes/arcteryx/namespace.ts +++ b/lib/routes/arcteryx/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Arcteryx', url: 'arcteryx.com', + lang: 'zh-CN', }; diff --git a/lib/routes/artstation/namespace.ts b/lib/routes/artstation/namespace.ts index 48d714be2142b2e..6967b625032b3bf 100644 --- a/lib/routes/artstation/namespace.ts +++ b/lib/routes/artstation/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ArtStation', url: 'www.artstation.com', + lang: 'en', }; diff --git a/lib/routes/asiantolick/namespace.ts b/lib/routes/asiantolick/namespace.ts index 277a3e0829dd548..21d7619ddb8cc91 100644 --- a/lib/routes/asiantolick/namespace.ts +++ b/lib/routes/asiantolick/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Asian to lick', url: 'asiantolick.com', + lang: 'zh-CN', }; diff --git a/lib/routes/asmr-200/namespace.ts b/lib/routes/asmr-200/namespace.ts index 97a605def520131..b447efa8abc1d43 100644 --- a/lib/routes/asmr-200/namespace.ts +++ b/lib/routes/asmr-200/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ASMR Online', url: 'asmr-200.com', + lang: 'zh-CN', }; diff --git a/lib/routes/asus/namespace.ts b/lib/routes/asus/namespace.ts index a8df4f68690cb21..5bfdf756afa789b 100644 --- a/lib/routes/asus/namespace.ts +++ b/lib/routes/asus/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ASUS', url: 'asus.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/atcoder/namespace.ts b/lib/routes/atcoder/namespace.ts index 0f4fa427f724df7..cb177cc58be66fc 100644 --- a/lib/routes/atcoder/namespace.ts +++ b/lib/routes/atcoder/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AtCoder', url: 'atcoder.jp', + lang: 'en', }; diff --git a/lib/routes/atptour/namespace.ts b/lib/routes/atptour/namespace.ts index 5a0805bd67a7d54..0916b893b623c50 100644 --- a/lib/routes/atptour/namespace.ts +++ b/lib/routes/atptour/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'ATP Tour', url: 'www.atptour.com', description: "News from the official site of men's professional tennis.", + lang: 'en', }; diff --git a/lib/routes/auto-stats/namespace.ts b/lib/routes/auto-stats/namespace.ts index 54adee1c7e09a9b..247b60e68d57c00 100644 --- a/lib/routes/auto-stats/namespace.ts +++ b/lib/routes/auto-stats/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国汽车工业协会统计信息网', url: 'auto-stats.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/autocentre/namespace.ts b/lib/routes/autocentre/namespace.ts index 3f6a6e183397ddd..b9db3ac3a9c2c32 100644 --- a/lib/routes/autocentre/namespace.ts +++ b/lib/routes/autocentre/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Автоцентр.ua', url: 'autocentre.ua', description: 'Автоцентр.ua: автоновини - Автомобільний сайт N1 в Україні', + lang: 'ru', }; diff --git a/lib/routes/baai/namespace.ts b/lib/routes/baai/namespace.ts index 409fd300b0aabab..3b7c640abe59ba7 100644 --- a/lib/routes/baai/namespace.ts +++ b/lib/routes/baai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京智源人工智能研究院', url: 'hub.baai.ac.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/backlinko/namespace.ts b/lib/routes/backlinko/namespace.ts index 8ad09707cafa599..ec3016624fae29a 100644 --- a/lib/routes/backlinko/namespace.ts +++ b/lib/routes/backlinko/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Backlinko', url: 'backlinko.com', + lang: 'en', }; diff --git a/lib/routes/bad/namespace.ts b/lib/routes/bad/namespace.ts index 56c2be9f9434306..9338a21f4194309 100644 --- a/lib/routes/bad/namespace.ts +++ b/lib/routes/bad/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Bad.news', url: 'bad.news', + lang: 'zh-CN', }; diff --git a/lib/routes/baidu/namespace.ts b/lib/routes/baidu/namespace.ts index 262deb052ecc022..d7447282ed7e8f3 100644 --- a/lib/routes/baidu/namespace.ts +++ b/lib/routes/baidu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '百度', url: 'www.baidu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/bandcamp/namespace.ts b/lib/routes/bandcamp/namespace.ts index 70a481f475a0fb8..dc244d34eb89662 100644 --- a/lib/routes/bandcamp/namespace.ts +++ b/lib/routes/bandcamp/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Bandcamp', url: 'bandcamp.com', + lang: 'en', }; diff --git a/lib/routes/bangumi.moe/namespace.ts b/lib/routes/bangumi.moe/namespace.ts index 39f74acda7aff1f..697c3a2b4f4b4b2 100644 --- a/lib/routes/bangumi.moe/namespace.ts +++ b/lib/routes/bangumi.moe/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '萌番组', url: 'bangumi.online', + lang: 'zh-CN', }; diff --git a/lib/routes/bangumi.online/namespace.ts b/lib/routes/bangumi.online/namespace.ts index 48b8e5f4bb055bd..fd31a2bab5074fe 100644 --- a/lib/routes/bangumi.online/namespace.ts +++ b/lib/routes/bangumi.online/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'アニメ新番組', url: 'bangumi.online', + lang: 'ja', }; diff --git a/lib/routes/bangumi.tv/namespace.ts b/lib/routes/bangumi.tv/namespace.ts index 718427a25db9a8b..b978132087e1e7e 100644 --- a/lib/routes/bangumi.tv/namespace.ts +++ b/lib/routes/bangumi.tv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Bangumi 番组计划', url: 'bangumi.tv', + lang: 'zh-CN', }; diff --git a/lib/routes/baozimh/namespace.ts b/lib/routes/baozimh/namespace.ts index bc361ba5decbdad..e02b690b284249e 100644 --- a/lib/routes/baozimh/namespace.ts +++ b/lib/routes/baozimh/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '包子漫画', url: 'www.baozimh.com', + lang: 'zh-CN', }; diff --git a/lib/routes/barronschina/namespace.ts b/lib/routes/barronschina/namespace.ts index 9b5e286a6f5715f..479ae25e61c868f 100644 --- a/lib/routes/barronschina/namespace.ts +++ b/lib/routes/barronschina/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '巴伦周刊中文版', url: 'barronschina.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bast/namespace.ts b/lib/routes/bast/namespace.ts index 4bc5c4878ab6160..06cb4bbaa8df962 100644 --- a/lib/routes/bast/namespace.ts +++ b/lib/routes/bast/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京市科学技术协会', url: 'bast.net.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bbc/namespace.ts b/lib/routes/bbc/namespace.ts index 59f6de83e38b746..4feae697921ae8d 100644 --- a/lib/routes/bbc/namespace.ts +++ b/lib/routes/bbc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'BBC', url: 'bbc.com', + lang: 'en', }; diff --git a/lib/routes/bbcnewslabs/namespace.ts b/lib/routes/bbcnewslabs/namespace.ts index 5bb42bfa8686bb7..97d970ec8f00e91 100644 --- a/lib/routes/bbcnewslabs/namespace.ts +++ b/lib/routes/bbcnewslabs/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'BBC News Labs', url: 'bbcnewslabs.co.uk', + lang: 'en', }; diff --git a/lib/routes/bc3ts/namespace.ts b/lib/routes/bc3ts/namespace.ts index 519754e6b77680d..bbae0f8afa272f0 100644 --- a/lib/routes/bc3ts/namespace.ts +++ b/lib/routes/bc3ts/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '爆料公社', url: 'web.bc3ts.net', categories: ['new-media'], + lang: 'zh-CN', }; diff --git a/lib/routes/bdys/namespace.ts b/lib/routes/bdys/namespace.ts index d810d855cac1e54..9af7a356025e8db 100644 --- a/lib/routes/bdys/namespace.ts +++ b/lib/routes/bdys/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip 哔嘀影视有多个备用域名,路由默认使用域名 \`https://bdys01.com\`。若该域名无法访问,可以通过在路由最后加上 \`?domain=<域名>\` 指定路由访问的域名。如指定备用域名为 \`https://bde4.icu\`,则在所有哔嘀影视路由最后加上 \`?domain=bde4.icu\` 即可,此时路由为 [\`/bdys?domain=bde4.icu\`](https://rsshub.app/bdys?domain=bde4.icu) :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/behance/namespace.ts b/lib/routes/behance/namespace.ts index 07fcc852a744274..f17e9309c663320 100644 --- a/lib/routes/behance/namespace.ts +++ b/lib/routes/behance/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Behance', url: 'www.behance.net', + lang: 'en', }; diff --git a/lib/routes/beijingprice/namespace.ts b/lib/routes/beijingprice/namespace.ts index ca746736cf82994..60a18476ab85412 100644 --- a/lib/routes/beijingprice/namespace.ts +++ b/lib/routes/beijingprice/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'beijingprice.cn', categories: ['government'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/bellroy/namespace.ts b/lib/routes/bellroy/namespace.ts index de98f41da2a80d1..3833468b3e8b0ab 100644 --- a/lib/routes/bellroy/namespace.ts +++ b/lib/routes/bellroy/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Bellroy', url: 'bellroy.com', + lang: 'zh-CN', }; diff --git a/lib/routes/bendibao/namespace.ts b/lib/routes/bendibao/namespace.ts index 62a7d9153c93b81..808d8f7abb72226 100644 --- a/lib/routes/bendibao/namespace.ts +++ b/lib/routes/bendibao/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '本地宝', url: 'bendibao.com', + lang: 'zh-CN', }; diff --git a/lib/routes/bestblogs/namespace.ts b/lib/routes/bestblogs/namespace.ts index f10e8b6048d66e0..0b54f592a5533af 100644 --- a/lib/routes/bestblogs/namespace.ts +++ b/lib/routes/bestblogs/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'bestblogs.dev', url: 'www.bestblogs.dev', + lang: 'zh-CN', }; diff --git a/lib/routes/bgmlist/namespace.ts b/lib/routes/bgmlist/namespace.ts index 306f9a9c6f3896a..ebbdd5c6af34096 100644 --- a/lib/routes/bgmlist/namespace.ts +++ b/lib/routes/bgmlist/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '番组放送', url: 'bgmlist.com', + lang: 'zh-CN', }; diff --git a/lib/routes/bigquant/namespace.ts b/lib/routes/bigquant/namespace.ts index ededdee2d71c67a..7176b5aa86d7113 100644 --- a/lib/routes/bigquant/namespace.ts +++ b/lib/routes/bigquant/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'BigQuant', url: 'bigquant.com', + lang: 'zh-CN', }; diff --git a/lib/routes/bilibili/namespace.ts b/lib/routes/bilibili/namespace.ts index fba152698419bf0..bfcaeb80a07c105 100644 --- a/lib/routes/bilibili/namespace.ts +++ b/lib/routes/bilibili/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '哔哩哔哩 bilibili', url: 'www.bilibili.com', + lang: 'zh-CN', }; diff --git a/lib/routes/binance/namespace.ts b/lib/routes/binance/namespace.ts index 1e520389802c3f6..361bdeb4cf72920 100644 --- a/lib/routes/binance/namespace.ts +++ b/lib/routes/binance/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Binance', url: 'binance.com', + lang: 'en', }; diff --git a/lib/routes/bing/namespace.ts b/lib/routes/bing/namespace.ts index 173fa4a65cca816..abaf432718e02f3 100644 --- a/lib/routes/bing/namespace.ts +++ b/lib/routes/bing/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Bing', url: 'cn.bing.com', + lang: 'zh-CN', }; diff --git a/lib/routes/biodiscover/namespace.ts b/lib/routes/biodiscover/namespace.ts index c40450888e58401..e81481e842ebebd 100644 --- a/lib/routes/biodiscover/namespace.ts +++ b/lib/routes/biodiscover/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'biodiscover.com 生物探索', url: 'www.biodiscover.com', + lang: 'zh-CN', }; diff --git a/lib/routes/bioone/namespace.ts b/lib/routes/bioone/namespace.ts index 2b4d0a772a3f475..f2a193208ed7b8c 100644 --- a/lib/routes/bioone/namespace.ts +++ b/lib/routes/bioone/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'BioOne', url: 'bioone.org', + lang: 'en', }; diff --git a/lib/routes/biquge/namespace.ts b/lib/routes/biquge/namespace.ts index 215a860e0d3906d..f98c1b3feb32a78 100644 --- a/lib/routes/biquge/namespace.ts +++ b/lib/routes/biquge/namespace.ts @@ -24,4 +24,5 @@ export const namespace: Namespace = { | [https://www.ibiquge.info](https://www.ibiquge.info) | 爱笔楼 | | [https://www.ishuquge.com](https://www.ishuquge.com) | 书趣阁 | | [https://www.mayiwxw.com](https://www.mayiwxw.com) | 蚂蚁文学 |`, + lang: 'zh-CN', }; diff --git a/lib/routes/bit/namespace.ts b/lib/routes/bit/namespace.ts index 3879be0523e216a..0566caa96cb222b 100644 --- a/lib/routes/bit/namespace.ts +++ b/lib/routes/bit/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京理工大学', url: 'cs.bit.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bitbucket/namespace.ts b/lib/routes/bitbucket/namespace.ts index f414ea13c0ca275..a5607f530fa05af 100644 --- a/lib/routes/bitbucket/namespace.ts +++ b/lib/routes/bitbucket/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Bitbucket', url: 'bitbucket.com', + lang: 'en', }; diff --git a/lib/routes/bitget/namespace.ts b/lib/routes/bitget/namespace.ts index 2d2ac232fea15b2..808a994ef2fe243 100644 --- a/lib/routes/bitget/namespace.ts +++ b/lib/routes/bitget/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Bitget', url: 'bitget.com', + lang: 'zh-CN', }; diff --git a/lib/routes/bitmovin/namespace.ts b/lib/routes/bitmovin/namespace.ts index da0195123596916..85fa757746ab20a 100644 --- a/lib/routes/bitmovin/namespace.ts +++ b/lib/routes/bitmovin/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Bitmovin', url: 'bitmovin.com', + lang: 'en', }; diff --git a/lib/routes/bjfu/namespace.ts b/lib/routes/bjfu/namespace.ts index a23862f818f0b18..91be22f07922da2 100644 --- a/lib/routes/bjfu/namespace.ts +++ b/lib/routes/bjfu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京林业大学', url: 'graduate.bjfu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bjnews/namespace.ts b/lib/routes/bjnews/namespace.ts index d663f40168924b0..9a69d93d2f7a2d7 100644 --- a/lib/routes/bjnews/namespace.ts +++ b/lib/routes/bjnews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '新京报', url: 'www.bjnews.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bjp/namespace.ts b/lib/routes/bjp/namespace.ts index 718f28575df5ea8..ad115fadbacad14 100644 --- a/lib/routes/bjp/namespace.ts +++ b/lib/routes/bjp/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京天文馆', url: 'bjp.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bjsk/namespace.ts b/lib/routes/bjsk/namespace.ts index 8a782b2f088e687..98b823b5d52114e 100644 --- a/lib/routes/bjsk/namespace.ts +++ b/lib/routes/bjsk/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京社科网', url: 'bjsk.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bjtu/namespace.ts b/lib/routes/bjtu/namespace.ts index 74f3a9a242c099c..4fd3ddb7a0c2582 100644 --- a/lib/routes/bjtu/namespace.ts +++ b/lib/routes/bjtu/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { zh: { name: '北京交通大学', }, + lang: 'zh-CN', }; diff --git a/lib/routes/bjwxdxh/namespace.ts b/lib/routes/bjwxdxh/namespace.ts index 8e077db91e69cb9..912e1b7b3685fdc 100644 --- a/lib/routes/bjwxdxh/namespace.ts +++ b/lib/routes/bjwxdxh/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京无线电协会', url: 'www.bjwxdxh.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bjx/namespace.ts b/lib/routes/bjx/namespace.ts index e08eee4500c5a43..3904d7fa61a7b2f 100644 --- a/lib/routes/bjx/namespace.ts +++ b/lib/routes/bjx/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北极星电力网', url: 'www.bjx.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/blizzard/namespace.ts b/lib/routes/blizzard/namespace.ts index f9bf3c5ca8def9e..4f1141a3fe3e99a 100644 --- a/lib/routes/blizzard/namespace.ts +++ b/lib/routes/blizzard/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Blizzard', url: 'news.blizzard.com', + lang: 'en', }; diff --git a/lib/routes/blogread/namespace.ts b/lib/routes/blogread/namespace.ts index 7f56723d3350ae9..228e4b958885f13 100644 --- a/lib/routes/blogread/namespace.ts +++ b/lib/routes/blogread/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '技术头条', url: 'blogread.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bloomberg/namespace.ts b/lib/routes/bloomberg/namespace.ts index ed652da2c0398dd..b0c4f21f3206d8d 100644 --- a/lib/routes/bloomberg/namespace.ts +++ b/lib/routes/bloomberg/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Bloomberg', url: 'www.bloomberg.com', + lang: 'en', }; diff --git a/lib/routes/bluearchive/namespace.ts b/lib/routes/bluearchive/namespace.ts index 67595cd5bc7165c..8964009f943edac 100644 --- a/lib/routes/bluearchive/namespace.ts +++ b/lib/routes/bluearchive/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Blue Archive', url: 'bluearchive.jp', categories: ['game'], + lang: 'ja', }; diff --git a/lib/routes/bluestacks/namespace.ts b/lib/routes/bluestacks/namespace.ts index 230a8323aa08cd4..b4f0b17c3cb6e81 100644 --- a/lib/routes/bluestacks/namespace.ts +++ b/lib/routes/bluestacks/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'BlueStacks', url: 'bluestacks.com', + lang: 'en', }; diff --git a/lib/routes/bmkg/namespace.ts b/lib/routes/bmkg/namespace.ts index e43f29d3a0fea25..f65228885c5bc57 100644 --- a/lib/routes/bmkg/namespace.ts +++ b/lib/routes/bmkg/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'BADAN METEOROLOGI, KLIMATOLOGI, DAN GEOFISIKA(Indonesian)', url: 'bmkg.go.id', + lang: 'en', }; diff --git a/lib/routes/bnu/namespace.ts b/lib/routes/bnu/namespace.ts index 7d0c7a69e10fdde..1a2f6fea8ba4aaa 100644 --- a/lib/routes/bnu/namespace.ts +++ b/lib/routes/bnu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京师范大学', url: 'bs.bnu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/boc/namespace.ts b/lib/routes/boc/namespace.ts index 442459678922b6e..cbcdaae031b05e1 100644 --- a/lib/routes/boc/namespace.ts +++ b/lib/routes/boc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国银行', url: 'boc.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bookfere/namespace.ts b/lib/routes/bookfere/namespace.ts index 4e8c59e3ae01c45..aa4ad8dcdc061af 100644 --- a/lib/routes/bookfere/namespace.ts +++ b/lib/routes/bookfere/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '书伴', url: 'bookfere.com', + lang: 'zh-CN', }; diff --git a/lib/routes/booru/namespace.ts b/lib/routes/booru/namespace.ts index 8b019132c6f25ae..e4d8c2dc5158641 100644 --- a/lib/routes/booru/namespace.ts +++ b/lib/routes/booru/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Booru', url: 'mmda.booru.org', + lang: 'en', }; diff --git a/lib/routes/bossdesign/namespace.ts b/lib/routes/bossdesign/namespace.ts index 955feda26704f98..61cd691dcfb8740 100644 --- a/lib/routes/bossdesign/namespace.ts +++ b/lib/routes/bossdesign/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Boss 设计', url: 'bossdesign.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/brave/namespace.ts b/lib/routes/brave/namespace.ts index cd8ef3a519877be..b38a081e38d1a3c 100644 --- a/lib/routes/brave/namespace.ts +++ b/lib/routes/brave/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Brave', url: 'brave.com', + lang: 'en', }; diff --git a/lib/routes/brooklynmuseum/namespace.ts b/lib/routes/brooklynmuseum/namespace.ts index 08320443d004544..34e7807709c4dce 100644 --- a/lib/routes/brooklynmuseum/namespace.ts +++ b/lib/routes/brooklynmuseum/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'Brooklyn Museum 纽约布鲁克林博物馆', + name: 'Brooklyn Museum', url: 'www.brooklynmuseum.org', + lang: 'en', }; diff --git a/lib/routes/bse/namespace.ts b/lib/routes/bse/namespace.ts index 234ff3efb8fb102..042bb07cff0d172 100644 --- a/lib/routes/bse/namespace.ts +++ b/lib/routes/bse/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京证券交易所', url: 'bse.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bsky/namespace.ts b/lib/routes/bsky/namespace.ts index a9241da5158bae5..634fd3ab4bae084 100644 --- a/lib/routes/bsky/namespace.ts +++ b/lib/routes/bsky/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Bluesky (bsky)', url: 'bsky.app', + lang: 'en', }; diff --git a/lib/routes/bt0/namespace.ts b/lib/routes/bt0/namespace.ts index 586766e83052f83..b1d66d4447f9feb 100644 --- a/lib/routes/bt0/namespace.ts +++ b/lib/routes/bt0/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip (1-9)bt0.com 都指向同一个 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/btzj/namespace.ts b/lib/routes/btzj/namespace.ts index f5847215f8b37d1..f6fea9869ef79c5 100644 --- a/lib/routes/btzj/namespace.ts +++ b/lib/routes/btzj/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'BT 之家', url: 'btbtt20.com', + lang: 'zh-CN', }; diff --git a/lib/routes/buaa/namespace.ts b/lib/routes/buaa/namespace.ts index 58c5ca080657d05..9ed95faf65b4d0a 100644 --- a/lib/routes/buaa/namespace.ts +++ b/lib/routes/buaa/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京航空航天大学', url: 'news.buaa.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/bugzilla/namespace.ts b/lib/routes/bugzilla/namespace.ts index 70ac839cb0f7d8c..012d6382f7e9be0 100644 --- a/lib/routes/bugzilla/namespace.ts +++ b/lib/routes/bugzilla/namespace.ts @@ -8,4 +8,5 @@ export const namespace: Namespace = { name: 'Bugzilla', description: '各组织自建的Bugzilla实例。', }, + lang: 'en', }; diff --git a/lib/routes/bulianglin/namespace.ts b/lib/routes/bulianglin/namespace.ts index 9efb89ca8970c13..f269e43ca22a99a 100644 --- a/lib/routes/bulianglin/namespace.ts +++ b/lib/routes/bulianglin/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '不良林', url: 'bulianglin.com', + lang: 'zh-CN', }; diff --git a/lib/routes/bupt/namespace.ts b/lib/routes/bupt/namespace.ts index 8d7475341a2aa69..6a0dca8e8498db9 100644 --- a/lib/routes/bupt/namespace.ts +++ b/lib/routes/bupt/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京邮电大学', url: 'bupt.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/byau/namespace.ts b/lib/routes/byau/namespace.ts index 9b05692137cca1d..e256a5556e3beec 100644 --- a/lib/routes/byau/namespace.ts +++ b/lib/routes/byau/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '黑龙江八一农垦大学', url: 'byau.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/byteclicks/namespace.ts b/lib/routes/byteclicks/namespace.ts index f6932376ef668c9..159f94cf99d87a9 100644 --- a/lib/routes/byteclicks/namespace.ts +++ b/lib/routes/byteclicks/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '字节点击', url: 'byteclicks.com', + lang: 'zh-CN', }; diff --git a/lib/routes/bytes/namespace.ts b/lib/routes/bytes/namespace.ts index 99b9f6beb30dfb6..7b040e171a07ebf 100644 --- a/lib/routes/bytes/namespace.ts +++ b/lib/routes/bytes/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ui.dev', url: 'bytes.dev', + lang: 'en', }; diff --git a/lib/routes/c114/namespace.ts b/lib/routes/c114/namespace.ts index 3c44a5c483146f0..ef7f192c55f8b70 100644 --- a/lib/routes/c114/namespace.ts +++ b/lib/routes/c114/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'C114 通信网', url: 'c114.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/caai/namespace.ts b/lib/routes/caai/namespace.ts index aa50eac2ef5becd..bf586f31ff981f4 100644 --- a/lib/routes/caai/namespace.ts +++ b/lib/routes/caai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国人工智能学会', url: 'caai.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/caam/namespace.ts b/lib/routes/caam/namespace.ts index 237b6afc0eb3b31..fe756ac0a468812 100644 --- a/lib/routes/caam/namespace.ts +++ b/lib/routes/caam/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国汽车工业协会', url: 'caam.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/caareviews/namespace.ts b/lib/routes/caareviews/namespace.ts index 8aa1f4c722e75a7..5ebfc5382e2d820 100644 --- a/lib/routes/caareviews/namespace.ts +++ b/lib/routes/caareviews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'caa.reviews', url: 'caareviews.org', + lang: 'en', }; diff --git a/lib/routes/cahkms/namespace.ts b/lib/routes/cahkms/namespace.ts index 8d51e2b858146e9..941ab11a9aca190 100644 --- a/lib/routes/cahkms/namespace.ts +++ b/lib/routes/cahkms/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '全国港澳研究会', url: 'cahkms.org', + lang: 'zh-CN', }; diff --git a/lib/routes/caijing/namespace.ts b/lib/routes/caijing/namespace.ts index 6f2acf580b363ce..4483b85f997c7cd 100644 --- a/lib/routes/caijing/namespace.ts +++ b/lib/routes/caijing/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '财经网', url: 'roll.caijing.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/caixin/namespace.ts b/lib/routes/caixin/namespace.ts index 8099f11d8d4ef5a..7a363a9004eb3b7 100644 --- a/lib/routes/caixin/namespace.ts +++ b/lib/routes/caixin/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '财新博客', url: 'caixin.com', description: `> 网站部分内容需要付费订阅,RSS 仅做更新提醒,不含付费内容。`, + lang: 'zh-CN', }; diff --git a/lib/routes/caixinglobal/namespace.ts b/lib/routes/caixinglobal/namespace.ts index bf1e6f1aed92b64..8d4880dd8533cc6 100644 --- a/lib/routes/caixinglobal/namespace.ts +++ b/lib/routes/caixinglobal/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Caixin Global', url: 'caixinglobal.com', + lang: 'en', }; diff --git a/lib/routes/camchina/namespace.ts b/lib/routes/camchina/namespace.ts index d2b1d471d887203..468a798bd240ff6 100644 --- a/lib/routes/camchina/namespace.ts +++ b/lib/routes/camchina/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国管理现代化研究会', url: 'cste.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cankaoxiaoxi/namespace.ts b/lib/routes/cankaoxiaoxi/namespace.ts index 13e98f6d4ecffc4..8520e948b2e095e 100644 --- a/lib/routes/cankaoxiaoxi/namespace.ts +++ b/lib/routes/cankaoxiaoxi/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '参考消息', url: 'cankaoxiaoxi.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cara/namespace.ts b/lib/routes/cara/namespace.ts index a0135afc6b1d12f..aaeac1780bee955 100644 --- a/lib/routes/cara/namespace.ts +++ b/lib/routes/cara/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Cara', url: 'cara.app', + lang: 'en', }; diff --git a/lib/routes/cartoonmad/namespace.ts b/lib/routes/cartoonmad/namespace.ts index 3768ff781d78ac9..d267db9e5f53a48 100644 --- a/lib/routes/cartoonmad/namespace.ts +++ b/lib/routes/cartoonmad/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '動漫狂', url: 'cartoonmad.com', + lang: 'zh-TW', }; diff --git a/lib/routes/cas/namespace.ts b/lib/routes/cas/namespace.ts index 68c7a05f8bd51b7..5cd8916c10051b3 100644 --- a/lib/routes/cas/namespace.ts +++ b/lib/routes/cas/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国科学院', url: 'www.cas.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/casssp/namespace.ts b/lib/routes/casssp/namespace.ts index c20708fdc076f77..1ba8855ad0f1816 100644 --- a/lib/routes/casssp/namespace.ts +++ b/lib/routes/casssp/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国科学学与科技政策研究会', url: 'casssp.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cast/namespace.ts b/lib/routes/cast/namespace.ts index 38c0e21b5aa509b..8c1d0f7eb9a53e4 100644 --- a/lib/routes/cast/namespace.ts +++ b/lib/routes/cast/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国科学技术协会', url: 'cast.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cau/namespace.ts b/lib/routes/cau/namespace.ts index eb1d7960a4e4183..6d069cf3c41888e 100644 --- a/lib/routes/cau/namespace.ts +++ b/lib/routes/cau/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国农业大学', url: 'ciee.cau.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/caus/namespace.ts b/lib/routes/caus/namespace.ts index 0f48c051073d3ad..52f68de483d495e 100644 --- a/lib/routes/caus/namespace.ts +++ b/lib/routes/caus/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '加美财经', url: 'caus.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cbaigui/namespace.ts b/lib/routes/cbaigui/namespace.ts index 47cb2b970082be5..5095c30cb37728b 100644 --- a/lib/routes/cbaigui/namespace.ts +++ b/lib/routes/cbaigui/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '纪妖', url: 'cbaigui.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cbc/namespace.ts b/lib/routes/cbc/namespace.ts index 7d44268c5054faa..198963f7c307d5e 100644 --- a/lib/routes/cbc/namespace.ts +++ b/lib/routes/cbc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Canadian Broadcasting Corporation', url: 'cbc.ca', + lang: 'en', }; diff --git a/lib/routes/cbirc/namespace.ts b/lib/routes/cbirc/namespace.ts index 3ccd490487bff44..c21982ff11e9d28 100644 --- a/lib/routes/cbirc/namespace.ts +++ b/lib/routes/cbirc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国银行保险监督管理委员会', url: 'cbirc.gov.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cbnweek/namespace.ts b/lib/routes/cbnweek/namespace.ts index d122276f65f6f50..8f78fc29e263afb 100644 --- a/lib/routes/cbnweek/namespace.ts +++ b/lib/routes/cbnweek/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '第一财经杂志', url: 'cbnweek.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cbpanet/namespace.ts b/lib/routes/cbpanet/namespace.ts index 741185941f4f56e..3469c0451c4f45f 100644 --- a/lib/routes/cbpanet/namespace.ts +++ b/lib/routes/cbpanet/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'cbpanet.com', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/ccac/namespace.ts b/lib/routes/ccac/namespace.ts index c66abae1f61d28b..f999c12262859b6 100644 --- a/lib/routes/ccac/namespace.ts +++ b/lib/routes/ccac/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Macau Independent Commission Against Corruption 澳门廉政公署', url: 'ccac.org.mo', + lang: 'zh-HK', }; diff --git a/lib/routes/cccfna/namespace.ts b/lib/routes/cccfna/namespace.ts index 62dfb3f36ea6075..2e11a76f2606eb5 100644 --- a/lib/routes/cccfna/namespace.ts +++ b/lib/routes/cccfna/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国食品土畜进出口商会', url: 'www.cccfna.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ccf/namespace.ts b/lib/routes/ccf/namespace.ts index 7bc6344228534bb..edfb6a17b85d755 100644 --- a/lib/routes/ccf/namespace.ts +++ b/lib/routes/ccf/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国计算机学会', url: 'ccf.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ccfa/namespace.ts b/lib/routes/ccfa/namespace.ts index 454a5bbe4d4170b..8c92d2d6b68afda 100644 --- a/lib/routes/ccfa/namespace.ts +++ b/lib/routes/ccfa/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'ccfa.org.cn', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/ccnu/namespace.ts b/lib/routes/ccnu/namespace.ts index dd46468ac4b5e60..e13e8112acadd80 100644 --- a/lib/routes/ccnu/namespace.ts +++ b/lib/routes/ccnu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '华中师范大学', url: 'ccnu.91wllm.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ccreports/namespace.ts b/lib/routes/ccreports/namespace.ts index 309fd8cbe28d2f5..19ebbfbf5fc26da 100644 --- a/lib/routes/ccreports/namespace.ts +++ b/lib/routes/ccreports/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '消费者报道', url: 'www.ccreports.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cctv/namespace.ts b/lib/routes/cctv/namespace.ts index 766fb0b88da296f..1c85ef01b5780b0 100644 --- a/lib/routes/cctv/namespace.ts +++ b/lib/routes/cctv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '央视新闻', url: 'news.cctv.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cde/namespace.ts b/lib/routes/cde/namespace.ts index 24497b5e7034dfc..074888104d2e829 100644 --- a/lib/routes/cde/namespace.ts +++ b/lib/routes/cde/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '国家药品审评网站', url: 'www.cde.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cdi/namespace.ts b/lib/routes/cdi/namespace.ts index f976a667f7e9501..93130b4bdcafc88 100644 --- a/lib/routes/cdi/namespace.ts +++ b/lib/routes/cdi/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '国家高端智库 / 综合开发研究院', url: 'cdi.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cdu/namespace.ts b/lib/routes/cdu/namespace.ts index ae19f4d163c53fb..cefdf80b32d6529 100644 --- a/lib/routes/cdu/namespace.ts +++ b/lib/routes/cdu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '成都大学', url: 'www.cdu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cdzjryb/namespace.ts b/lib/routes/cdzjryb/namespace.ts index 26c405bc0113b5c..7245dd0ffb35268 100644 --- a/lib/routes/cdzjryb/namespace.ts +++ b/lib/routes/cdzjryb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '成都住建蓉 e 办', url: 'zw.cdzjryb.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cebbank/namespace.ts b/lib/routes/cebbank/namespace.ts index 2bafdede77b80c5..360b3424ee677c8 100644 --- a/lib/routes/cebbank/namespace.ts +++ b/lib/routes/cebbank/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国光大银行', url: 'cebbank.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ceph/namespace.ts b/lib/routes/ceph/namespace.ts index 0585fb5b5589286..0313877bf90be76 100644 --- a/lib/routes/ceph/namespace.ts +++ b/lib/routes/ceph/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Ceph', url: 'ceph.io', description: 'Ceph is an open source distributed storage system designed to evolve with data.', + lang: 'en', }; diff --git a/lib/routes/cfachina/namespace.ts b/lib/routes/cfachina/namespace.ts index 28aa653fc42a022..74b9dc447656403 100644 --- a/lib/routes/cfachina/namespace.ts +++ b/lib/routes/cfachina/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国期货业协会', url: 'cfachina.org', + lang: 'zh-CN', }; diff --git a/lib/routes/cffex/namespace.ts b/lib/routes/cffex/namespace.ts index 0c0e9698e13a3fc..1c51fc9df2659f1 100644 --- a/lib/routes/cffex/namespace.ts +++ b/lib/routes/cffex/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国金融期货交易所', url: 'cffex.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cfmmc/namespace.ts b/lib/routes/cfmmc/namespace.ts index b99decd30df5a15..8091132c2806da9 100644 --- a/lib/routes/cfmmc/namespace.ts +++ b/lib/routes/cfmmc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国期货市场监控中心', url: 'cfmmc.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cfr/namespace.ts b/lib/routes/cfr/namespace.ts index 46065157deaf08d..939154e0cb5a5f9 100644 --- a/lib/routes/cfr/namespace.ts +++ b/lib/routes/cfr/namespace.ts @@ -3,4 +3,5 @@ import { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Council on Foreign Relations', url: 'www.cfr.org', + lang: 'en', }; diff --git a/lib/routes/cgtn/namespace.ts b/lib/routes/cgtn/namespace.ts index 61c80e9b34a63f2..3d5cfe086ee5b52 100644 --- a/lib/routes/cgtn/namespace.ts +++ b/lib/routes/cgtn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国环球电视网', url: 'cgtn.com', + lang: 'zh-CN', }; diff --git a/lib/routes/chaincatcher/namespace.ts b/lib/routes/chaincatcher/namespace.ts index e3c714a0f6f93b5..babd6f0982137ff 100644 --- a/lib/routes/chaincatcher/namespace.ts +++ b/lib/routes/chaincatcher/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '链捕手 ChainCatcher', url: 'chaincatcher.com', + lang: 'zh-CN', }; diff --git a/lib/routes/changba/namespace.ts b/lib/routes/changba/namespace.ts index 44b2ca3e138db8b..cbaf6b7c995a553 100644 --- a/lib/routes/changba/namespace.ts +++ b/lib/routes/changba/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '唱吧', url: 'changba.com', + lang: 'zh-CN', }; diff --git a/lib/routes/chaoxing/namespace.ts b/lib/routes/chaoxing/namespace.ts index e054c9f6680c9af..53af60795d994b5 100644 --- a/lib/routes/chaoxing/namespace.ts +++ b/lib/routes/chaoxing/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '超星', url: 'chaoxing.com', + lang: 'zh-CN', }; diff --git a/lib/routes/chaping/namespace.ts b/lib/routes/chaping/namespace.ts index c01167a7fbbbe9b..696bef8a0083f3d 100644 --- a/lib/routes/chaping/namespace.ts +++ b/lib/routes/chaping/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '差评', url: 'chaping.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/chiculture/namespace.ts b/lib/routes/chiculture/namespace.ts index 521bad6fcee6a5f..40c02be395bd624 100644 --- a/lib/routes/chiculture/namespace.ts +++ b/lib/routes/chiculture/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '通識・現代中國', url: 'chiculture.org.hk', + lang: 'zh-HK', }; diff --git a/lib/routes/chikubi/namespace.ts b/lib/routes/chikubi/namespace.ts index 08cf95753d2b37c..f723c05ee7090b9 100644 --- a/lib/routes/chikubi/namespace.ts +++ b/lib/routes/chikubi/namespace.ts @@ -12,4 +12,5 @@ Posts: Contains the website author's thoughts and additional information. Sometimes a product may exist in both posts and works. Sometimes there might be only a single post without any reposted work, and vice versa. :::`, + lang: 'ja', }; diff --git a/lib/routes/china/namespace.ts b/lib/routes/china/namespace.ts index 16b89b5751feaef..b2c9da42f8568d8 100644 --- a/lib/routes/china/namespace.ts +++ b/lib/routes/china/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'China.com 中华网', url: 'finance.china.com', + lang: 'zh-CN', }; diff --git a/lib/routes/chinadegrees/namespace.ts b/lib/routes/chinadegrees/namespace.ts index 7773eec5214541e..e6f755a7b731030 100644 --- a/lib/routes/chinadegrees/namespace.ts +++ b/lib/routes/chinadegrees/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中华人民共和国学位证书查询', url: 'chinadegrees.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/chinafactcheck/namespace.ts b/lib/routes/chinafactcheck/namespace.ts index ccd631dad68f33d..94165553f969086 100644 --- a/lib/routes/chinafactcheck/namespace.ts +++ b/lib/routes/chinafactcheck/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '有据', url: 'chinafactcheck.com', + lang: 'zh-CN', }; diff --git a/lib/routes/chinaisa/namespace.ts b/lib/routes/chinaisa/namespace.ts index 2db657594928e69..88e6053481e53f8 100644 --- a/lib/routes/chinaisa/namespace.ts +++ b/lib/routes/chinaisa/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国钢铁工业协会', url: 'chinaisa.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/chinamoney/namespace.ts b/lib/routes/chinamoney/namespace.ts index 5b81c2db6c88c25..be76b9182a3dfdf 100644 --- a/lib/routes/chinamoney/namespace.ts +++ b/lib/routes/chinamoney/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国货币网', url: 'chinamoney.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/chinanews/namespace.ts b/lib/routes/chinanews/namespace.ts index bb524d2573b035d..0bf769dc34e3998 100644 --- a/lib/routes/chinanews/namespace.ts +++ b/lib/routes/chinanews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国新闻网', url: 'chinanews.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/chinania/namespace.ts b/lib/routes/chinania/namespace.ts index 09f465dd8914780..cb413dfefe9f8b5 100644 --- a/lib/routes/chinania/namespace.ts +++ b/lib/routes/chinania/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'chinania.org.cn', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/chinathinktanks/namespace.ts b/lib/routes/chinathinktanks/namespace.ts index cae24032c2d3223..7d2d62e0597a2be 100644 --- a/lib/routes/chinathinktanks/namespace.ts +++ b/lib/routes/chinathinktanks/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国智库网', url: 'www.chinathinktanks.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/chinaventure/namespace.ts b/lib/routes/chinaventure/namespace.ts index f133780a9adaa28..7ff31daa6dd80ae 100644 --- a/lib/routes/chinaventure/namespace.ts +++ b/lib/routes/chinaventure/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '投中网', url: 'chinaventure.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/chinawriter/namespace.ts b/lib/routes/chinawriter/namespace.ts index 0f473e04db8e9df..d5d4237567a4ac8 100644 --- a/lib/routes/chinawriter/namespace.ts +++ b/lib/routes/chinawriter/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国作家网', url: 'chinawriter.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/chlinlearn/namespcae.ts b/lib/routes/chlinlearn/namespcae.ts index bfca8e01eee26cd..ad9bf5e74179f85 100644 --- a/lib/routes/chlinlearn/namespcae.ts +++ b/lib/routes/chlinlearn/namespcae.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'chlinlearn的技术博客', + name: 'chlinlearn 的技术博客', url: 'daily-blog.chlinlearn.top', + lang: 'zh-CN', }; diff --git a/lib/routes/chsi/namespace.ts b/lib/routes/chsi/namespace.ts index ce6dd8cc888855f..4b8aa5f9388644d 100644 --- a/lib/routes/chsi/namespace.ts +++ b/lib/routes/chsi/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国研究生招生信息网', url: 'yz.chsi.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/chuanliu/namespace.ts b/lib/routes/chuanliu/namespace.ts index 0d7d7f0c522de2d..9403b9140639186 100644 --- a/lib/routes/chuanliu/namespace.ts +++ b/lib/routes/chuanliu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '川流', url: 'chuanliu.org', + lang: 'zh-CN', }; diff --git a/lib/routes/chub/namespace.ts b/lib/routes/chub/namespace.ts index c9d38725fd3095c..a86b6ea903835f6 100644 --- a/lib/routes/chub/namespace.ts +++ b/lib/routes/chub/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Chub', url: 'chub.ai', + lang: 'en', }; diff --git a/lib/routes/cib/namespace.ts b/lib/routes/cib/namespace.ts index 61f44354475073d..58b30f521486fa1 100644 --- a/lib/routes/cib/namespace.ts +++ b/lib/routes/cib/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国兴业银行', url: 'cib.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ciidbnu/namespace.ts b/lib/routes/ciidbnu/namespace.ts index ec7fad9cfc7b43c..a9d8d6b95e859e4 100644 --- a/lib/routes/ciidbnu/namespace.ts +++ b/lib/routes/ciidbnu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国收入分配研究院', url: 'ciidbnu.org', + lang: 'zh-CN', }; diff --git a/lib/routes/cisia/namespace.ts b/lib/routes/cisia/namespace.ts index 2f4ebba0e3d220f..530fbdbb2e2cad7 100644 --- a/lib/routes/cisia/namespace.ts +++ b/lib/routes/cisia/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'www.cisia.org', categories: ['government'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/civitai/namespace.ts b/lib/routes/civitai/namespace.ts index 7c989889b501635..1f08e212946ef7a 100644 --- a/lib/routes/civitai/namespace.ts +++ b/lib/routes/civitai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Civitai', url: 'civitai.com', + lang: 'en', }; diff --git a/lib/routes/ciweimao/namespace.ts b/lib/routes/ciweimao/namespace.ts index 09b28e073b7f86f..4fb85ea9a099c88 100644 --- a/lib/routes/ciweimao/namespace.ts +++ b/lib/routes/ciweimao/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '刺猬猫', url: 'wap.ciweimao.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cjlu/namespace.ts b/lib/routes/cjlu/namespace.ts index f1763025c3ba620..3a5d1362df88b36 100644 --- a/lib/routes/cjlu/namespace.ts +++ b/lib/routes/cjlu/namespace.ts @@ -3,8 +3,8 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'China Jiliang University', url: 'www.cjlu.edu.cn', - zh: { name: '中国计量大学', }, + lang: 'zh-CN', }; diff --git a/lib/routes/clickme/namespace.ts b/lib/routes/clickme/namespace.ts index 2db57538e94147e..089498bec5e8082 100644 --- a/lib/routes/clickme/namespace.ts +++ b/lib/routes/clickme/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ClickMe', url: 'clickme.net', + lang: 'en', }; diff --git a/lib/routes/cloudnative/namespace.ts b/lib/routes/cloudnative/namespace.ts index a5e84bcd4f286e2..73fa96fdb8df369 100644 --- a/lib/routes/cloudnative/namespace.ts +++ b/lib/routes/cloudnative/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '云原生社区', url: 'cloudnative.to', + lang: 'zh-CN', }; diff --git a/lib/routes/cls/namespace.ts b/lib/routes/cls/namespace.ts index 25ebea7ffbb88f3..399323e79488c6c 100644 --- a/lib/routes/cls/namespace.ts +++ b/lib/routes/cls/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '财联社', url: 'cls.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cma/namespace.ts b/lib/routes/cma/namespace.ts index e66f2e669d8dfce..876cd450ff2ebac 100644 --- a/lib/routes/cma/namespace.ts +++ b/lib/routes/cma/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国气象局', url: 'weather.cma.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cmde/namespace.ts b/lib/routes/cmde/namespace.ts index 7e5f807cba8c5ed..da9ba07bd72fc7e 100644 --- a/lib/routes/cmde/namespace.ts +++ b/lib/routes/cmde/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '国家药品监督管理局医疗器械技术审评中心', url: 'www.cmde.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cmpxchg8b/namespace.ts b/lib/routes/cmpxchg8b/namespace.ts index 08d1eb8396822ba..0d26f1ad75bc4f0 100644 --- a/lib/routes/cmpxchg8b/namespace.ts +++ b/lib/routes/cmpxchg8b/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'cmpxchg8b', url: 'lock.cmpxchg8b.com', + lang: 'en', }; diff --git a/lib/routes/cn-healthcare/namespace.ts b/lib/routes/cn-healthcare/namespace.ts index ca76d162687225c..aaaef82c3d5180e 100644 --- a/lib/routes/cn-healthcare/namespace.ts +++ b/lib/routes/cn-healthcare/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '健康界', url: 'cn-healthcare.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cna/namespace.ts b/lib/routes/cna/namespace.ts index 73b8155d68d77bb..b34e748a72b7638 100644 --- a/lib/routes/cna/namespace.ts +++ b/lib/routes/cna/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中央通讯社', url: 'cna.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/cnbc/namespace.ts b/lib/routes/cnbc/namespace.ts index 6243dcb5137059d..b259fa6783dc8f9 100644 --- a/lib/routes/cnbc/namespace.ts +++ b/lib/routes/cnbc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'CNBC', url: 'search.cnbc.com', + lang: 'en', }; diff --git a/lib/routes/cnbeta/namespace.ts b/lib/routes/cnbeta/namespace.ts index 16da5989dec3ef4..3d69cd68d94729a 100644 --- a/lib/routes/cnbeta/namespace.ts +++ b/lib/routes/cnbeta/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'cnBeta.COM', url: 'cnbeta.com.tw', categories: ['new-media'], + lang: 'zh-TW', }; diff --git a/lib/routes/cnblogs/namespace.ts b/lib/routes/cnblogs/namespace.ts index c7434c16ae9cbac..055c2a06967560d 100644 --- a/lib/routes/cnblogs/namespace.ts +++ b/lib/routes/cnblogs/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '博客园', url: 'www.cnblogs.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cncf/namespace.ts b/lib/routes/cncf/namespace.ts index 87bbbe178329964..a479718a158368a 100644 --- a/lib/routes/cncf/namespace.ts +++ b/lib/routes/cncf/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'CNCF', url: 'cncf.io', + lang: 'en', }; diff --git a/lib/routes/cneb/namespace.ts b/lib/routes/cneb/namespace.ts index 7a03e739e19b995..06ffe10bf6fa374 100644 --- a/lib/routes/cneb/namespace.ts +++ b/lib/routes/cneb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国国家应急广播', url: 'cneb.gov.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cngal/namespace.ts b/lib/routes/cngal/namespace.ts index a562b96ab2dd2e8..f5f6dbd51b00e9b 100644 --- a/lib/routes/cngal/namespace.ts +++ b/lib/routes/cngal/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'CnGal', url: 'www.cngal.org', + lang: 'zh-CN', }; diff --git a/lib/routes/cnjxol/namespace.ts b/lib/routes/cnjxol/namespace.ts index 54419866214158f..89cf3dc1c36cf4e 100644 --- a/lib/routes/cnjxol/namespace.ts +++ b/lib/routes/cnjxol/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南湖清风', url: 'cnjxol.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cnki/namespace.ts b/lib/routes/cnki/namespace.ts index 290ad000ed0d1d1..09d2d9db76e1f1f 100644 --- a/lib/routes/cnki/namespace.ts +++ b/lib/routes/cnki/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国知网', url: 'navi.cnki.net', + lang: 'zh-CN', }; diff --git a/lib/routes/cnljxh/namespace.ts b/lib/routes/cnljxh/namespace.ts index 74ef7189f0afef8..e95d6cf25747f8b 100644 --- a/lib/routes/cnljxh/namespace.ts +++ b/lib/routes/cnljxh/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国炼焦行业协会', url: 'cnljxh.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cntheory/namespace.ts b/lib/routes/cntheory/namespace.ts index 45fb3aff48a3260..8c0f5aee607326e 100644 --- a/lib/routes/cntheory/namespace.ts +++ b/lib/routes/cntheory/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '理论网', url: 'paper.cntheory.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cntv/namespace.ts b/lib/routes/cntv/namespace.ts index 90d6b24fb4eff25..7551ee1493e4ee8 100644 --- a/lib/routes/cntv/namespace.ts +++ b/lib/routes/cntv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'CNTV', url: 'navi.cctv.com', + lang: 'zh-CN', }; diff --git a/lib/routes/codeforces/namespace.ts b/lib/routes/codeforces/namespace.ts index eb07b18e31155ad..5cd8b7e721a30f3 100644 --- a/lib/routes/codeforces/namespace.ts +++ b/lib/routes/codeforces/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Codeforces', url: 'codeforces.com', + lang: 'en', }; diff --git a/lib/routes/cohere/namespace.ts b/lib/routes/cohere/namespace.ts index 95c9e37ab18451d..72d0868fdb0c80d 100644 --- a/lib/routes/cohere/namespace.ts +++ b/lib/routes/cohere/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Cohere', url: 'cohere.com', + lang: 'en', }; diff --git a/lib/routes/coindesk/namespace.ts b/lib/routes/coindesk/namespace.ts index 9aa1ef1d7c703d0..e8eb42ec10e36f8 100644 --- a/lib/routes/coindesk/namespace.ts +++ b/lib/routes/coindesk/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'CoinDesk Consensus Magazine', url: 'coindesk.com', + lang: 'en', }; diff --git a/lib/routes/colamanga/namespace.ts b/lib/routes/colamanga/namespace.ts index fbb20562d32be35..c135c4585205b73 100644 --- a/lib/routes/colamanga/namespace.ts +++ b/lib/routes/colamanga/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { zh: { name: '可乐漫画', }, + lang: 'zh-CN', }; diff --git a/lib/routes/comicat/namespace.ts b/lib/routes/comicat/namespace.ts index 8082c946090a15a..99df68b06a16e90 100644 --- a/lib/routes/comicat/namespace.ts +++ b/lib/routes/comicat/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Comicat', url: 'comicat.org', + lang: 'zh-CN', }; diff --git a/lib/routes/comicskingdom/namespace.ts b/lib/routes/comicskingdom/namespace.ts index ed4fd59b4757da0..713239031fc5000 100644 --- a/lib/routes/comicskingdom/namespace.ts +++ b/lib/routes/comicskingdom/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Comics Kingdom', url: 'comicskingdom.com', + lang: 'en', }; diff --git a/lib/routes/consumer/namespace.ts b/lib/routes/consumer/namespace.ts index 524ebe75a2082ee..765ba45eaec1982 100644 --- a/lib/routes/consumer/namespace.ts +++ b/lib/routes/consumer/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '消费者委员会', url: 'consumer.org.hk', + lang: 'zh-CN', }; diff --git a/lib/routes/cool18/namespace.ts b/lib/routes/cool18/namespace.ts index 2e72b3362222536..7a41d2ea4643d46 100644 --- a/lib/routes/cool18/namespace.ts +++ b/lib/routes/cool18/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '禁忌书屋', url: 'cool18.com', + lang: 'zh-CN', }; diff --git a/lib/routes/coolapk/namespace.ts b/lib/routes/coolapk/namespace.ts index bc71d210bc9f7b2..cc3de8a3aef8716 100644 --- a/lib/routes/coolapk/namespace.ts +++ b/lib/routes/coolapk/namespace.ts @@ -5,8 +5,9 @@ export const namespace: Namespace = { url: 'coolapk.com', description: ` :::tip -即日起,多数路由图片防盗链。 -需要将 \`ALLOW_USER_HOTLINK_TEMPLATE\` 环境变量设置为 \`true\` ,然后配置\`image_hotlink_template\` 。 -详见 [#16715](https://github.com/DIYgod/RSSHub/issues/16715) +即日起,多数路由图片防盗链。 +需要将 \`ALLOW_USER_HOTLINK_TEMPLATE\` 环境变量设置为 \`true\` ,然后配置\`image_hotlink_template\` 。 +详见 [#16715](https://github.com/DIYgod/RSSHub/issues/16715) :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/coomer/namespace.ts b/lib/routes/coomer/namespace.ts index df39e0d95503138..fcf726947984ade 100644 --- a/lib/routes/coomer/namespace.ts +++ b/lib/routes/coomer/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Coomer', url: 'coomer.party', + lang: 'en', }; diff --git a/lib/routes/copernicium/namespace.ts b/lib/routes/copernicium/namespace.ts index 66ba8040fa32e77..fe1ccb9acbd52c3 100644 --- a/lib/routes/copernicium/namespace.ts +++ b/lib/routes/copernicium/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '日新说', url: 'www.copernicium.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/copymanga/namespace.ts b/lib/routes/copymanga/namespace.ts index 972ed6507b31ef8..b09d2ad39091102 100644 --- a/lib/routes/copymanga/namespace.ts +++ b/lib/routes/copymanga/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '拷贝漫画', url: 'copymanga.com', + lang: 'zh-CN', }; diff --git a/lib/routes/cpcaauto/namespace.ts b/lib/routes/cpcaauto/namespace.ts index f6367802314c69f..d91dd318a2da39f 100644 --- a/lib/routes/cpcaauto/namespace.ts +++ b/lib/routes/cpcaauto/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: '中国汽车流通协会汽车市场研究分会', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/cpcey/namespace.ts b/lib/routes/cpcey/namespace.ts index 97a8ed0bafaa488..09597fd6ba5eea0 100644 --- a/lib/routes/cpcey/namespace.ts +++ b/lib/routes/cpcey/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '台湾行政院消费者保护会', url: 'cpc.ey.gov.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/cpuid/namespace.ts b/lib/routes/cpuid/namespace.ts index 34cb36eb27dc61a..edec8166320d5b8 100644 --- a/lib/routes/cpuid/namespace.ts +++ b/lib/routes/cpuid/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'CPUID', url: 'cpuid.com', + lang: 'en', }; diff --git a/lib/routes/cqgas/namespace.ts b/lib/routes/cqgas/namespace.ts index 4a38128d4dfd262..65f74fae4b20a32 100644 --- a/lib/routes/cqgas/namespace.ts +++ b/lib/routes/cqgas/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '重庆燃气', url: 'cqgas.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cqwu/namespace.ts b/lib/routes/cqwu/namespace.ts index 52f7bfdf57bf086..5bfa1a98a756f25 100644 --- a/lib/routes/cqwu/namespace.ts +++ b/lib/routes/cqwu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '重庆文理学院', url: 'www.cqwu.net', + lang: 'zh-CN', }; diff --git a/lib/routes/crac/namespace.ts b/lib/routes/crac/namespace.ts index fd9bb283b50e915..6150c24204ce561 100644 --- a/lib/routes/crac/namespace.ts +++ b/lib/routes/crac/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国无线电协会业余无线电分会', url: 'www.crac.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/creative-comic/namespace.ts b/lib/routes/creative-comic/namespace.ts index e50247a26e739c2..e7a32068df11077 100644 --- a/lib/routes/creative-comic/namespace.ts +++ b/lib/routes/creative-comic/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'CCC 創作集', url: 'creative-comic.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/crossbell/namespace.ts b/lib/routes/crossbell/namespace.ts index aad3ef39ab0ac1e..3b6da44f1f88291 100644 --- a/lib/routes/crossbell/namespace.ts +++ b/lib/routes/crossbell/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Crossbell', url: 'crossbell.io', + lang: 'en', }; diff --git a/lib/routes/cs/namespace.ts b/lib/routes/cs/namespace.ts index 3a5d2464c68351c..67c12aadd2cf31c 100644 --- a/lib/routes/cs/namespace.ts +++ b/lib/routes/cs/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '中证网', url: 'cs.com.cn', categories: ['finance'], + lang: 'zh-CN', }; diff --git a/lib/routes/csdn/namespace.ts b/lib/routes/csdn/namespace.ts index 00752316d6e8b59..e1c9c0436055aef 100644 --- a/lib/routes/csdn/namespace.ts +++ b/lib/routes/csdn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'CSDN', url: 'blog.csdn.net', + lang: 'zh-CN', }; diff --git a/lib/routes/cssn/namespace.ts b/lib/routes/cssn/namespace.ts index 62e345b2895a345..dd902e8114f45aa 100644 --- a/lib/routes/cssn/namespace.ts +++ b/lib/routes/cssn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Chinese Social Science Net', url: 'iolaw.cssn.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cste/namespace.ts b/lib/routes/cste/namespace.ts index 48521384c5e87ce..841fe827dc3a34f 100644 --- a/lib/routes/cste/namespace.ts +++ b/lib/routes/cste/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国技术经济学会', url: 'cste.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/csu/namespace.ts b/lib/routes/csu/namespace.ts index 7e5fee5d31eddbd..f50da37e280210a 100644 --- a/lib/routes/csu/namespace.ts +++ b/lib/routes/csu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中南大学', url: 'career.csu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cts/namespace.ts b/lib/routes/cts/namespace.ts index a71fd7cd376304d..6b390eb4793053e 100644 --- a/lib/routes/cts/namespace.ts +++ b/lib/routes/cts/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '華視', url: 'news.cts.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/cuc/namespace.ts b/lib/routes/cuc/namespace.ts index 114659b0e3d34cb..e552a97aee86854 100644 --- a/lib/routes/cuc/namespace.ts +++ b/lib/routes/cuc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国传媒大学', url: 'yz.cuc.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cuilingmag/namespace.ts b/lib/routes/cuilingmag/namespace.ts index ea8fd6e42f35a9c..30740a1b5108e37 100644 --- a/lib/routes/cuilingmag/namespace.ts +++ b/lib/routes/cuilingmag/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'cuilingmag.com', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/curiouscat/namespace.ts b/lib/routes/curiouscat/namespace.ts index a5c187bff84cfd2..7eba48fa7fdc539 100644 --- a/lib/routes/curiouscat/namespace.ts +++ b/lib/routes/curiouscat/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'CuriousCat', url: 'curiouscat.live', + lang: 'en', }; diff --git a/lib/routes/curius/namespace.ts b/lib/routes/curius/namespace.ts index 3c782f89394967b..c5bb7fb3115445e 100644 --- a/lib/routes/curius/namespace.ts +++ b/lib/routes/curius/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Curius', url: 'curius.app', + lang: 'en', }; diff --git a/lib/routes/cw/namespace.ts b/lib/routes/cw/namespace.ts index 5ebefe35d267b1e..3ddd127118ea26f 100644 --- a/lib/routes/cw/namespace.ts +++ b/lib/routes/cw/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '天下雜誌', url: 'cw.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/cyzone/namespace.ts b/lib/routes/cyzone/namespace.ts index e9a9f2c62c76576..5a92c11f3f0d051 100644 --- a/lib/routes/cyzone/namespace.ts +++ b/lib/routes/cyzone/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '创业邦', url: 'cyzone.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/cztv/namespace.ts b/lib/routes/cztv/namespace.ts index 2c7a7f915fa8257..04f6f4434f1bbc7 100644 --- a/lib/routes/cztv/namespace.ts +++ b/lib/routes/cztv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '新蓝网(浙江广播电视集团)', url: 'cztv.com', + lang: 'zh-CN', }; diff --git a/lib/routes/dahecube/namespace.ts b/lib/routes/dahecube/namespace.ts index 44cf03e514201c3..f99b69a0b7deb9f 100644 --- a/lib/routes/dahecube/namespace.ts +++ b/lib/routes/dahecube/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '大河财立方', url: 'dahecube.com', + lang: 'zh-CN', }; diff --git a/lib/routes/daily/namespace.ts b/lib/routes/daily/namespace.ts index 2dbd9bf58eba9ce..f40a96813b7aecd 100644 --- a/lib/routes/daily/namespace.ts +++ b/lib/routes/daily/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Daily.dev', url: 'daily.dev', categories: ['social-media'], + lang: 'en', }; diff --git a/lib/routes/damai/namespace.ts b/lib/routes/damai/namespace.ts index 72327dc8ae10d8c..6ef673c9026deb4 100644 --- a/lib/routes/damai/namespace.ts +++ b/lib/routes/damai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '大麦网', url: 'search.damai.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/dangdang/namespace.ts b/lib/routes/dangdang/namespace.ts index e4a1c0447b083f8..13a9b5270676f90 100644 --- a/lib/routes/dangdang/namespace.ts +++ b/lib/routes/dangdang/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '当当开放平台', url: 'open.dangdang.com', + lang: 'zh-CN', }; diff --git a/lib/routes/dapenti/namespace.ts b/lib/routes/dapenti/namespace.ts index e3fe6f0a783bb27..6c3b0eba14c33c4 100644 --- a/lib/routes/dapenti/namespace.ts +++ b/lib/routes/dapenti/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '喷嚏', url: 'dapenti.com', + lang: 'zh-CN', }; diff --git a/lib/routes/darwinawards/namespace.ts b/lib/routes/darwinawards/namespace.ts index 20c3aa81fb7b16e..e1895ace98e0405 100644 --- a/lib/routes/darwinawards/namespace.ts +++ b/lib/routes/darwinawards/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Darwin Awards', url: 'darwinawards.com', categories: ['other'], + lang: 'en', }; diff --git a/lib/routes/dataguidance/namespace.ts b/lib/routes/dataguidance/namespace.ts index e063fb973c09c77..14494e43fcb171a 100644 --- a/lib/routes/dataguidance/namespace.ts +++ b/lib/routes/dataguidance/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'DataGuidance', url: 'dataguidance.com', categories: ['other'], + lang: 'en', }; diff --git a/lib/routes/dayanzai/namespace.ts b/lib/routes/dayanzai/namespace.ts index 3a62c54e3b18361..d9c15d2d0da0c69 100644 --- a/lib/routes/dayanzai/namespace.ts +++ b/lib/routes/dayanzai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '大眼仔旭', url: 'dayanzai.me', + lang: 'zh-CN', }; diff --git a/lib/routes/dbaplus/namespace.ts b/lib/routes/dbaplus/namespace.ts index 5de237b67c7e957..0d48834010b8a08 100644 --- a/lib/routes/dbaplus/namespace.ts +++ b/lib/routes/dbaplus/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'dbaplus社群', url: 'dbaplus.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/dblp/namespace.ts b/lib/routes/dblp/namespace.ts index 9cd978d440fa054..4a07bf01a914944 100644 --- a/lib/routes/dblp/namespace.ts +++ b/lib/routes/dblp/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'DBLP', url: 'dblp.org', + lang: 'en', }; diff --git a/lib/routes/dcard/namespace.ts b/lib/routes/dcard/namespace.ts index 8e7fbc8a1eefdd1..6cda36822b7d7cc 100644 --- a/lib/routes/dcard/namespace.ts +++ b/lib/routes/dcard/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::warning 僅能透過台灣 IP 抓取。 :::`, + lang: 'zh-TW', }; diff --git a/lib/routes/dcfever/namespace.ts b/lib/routes/dcfever/namespace.ts index f14a921ffd9c432..b97d35d0b6c2908 100644 --- a/lib/routes/dcfever/namespace.ts +++ b/lib/routes/dcfever/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'DCFever', url: 'dcfever.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ddosi/namespace.ts b/lib/routes/ddosi/namespace.ts index b7215ed8e661db4..3eb85fb5ddbe749 100644 --- a/lib/routes/ddosi/namespace.ts +++ b/lib/routes/ddosi/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '雨苁博客', url: 'ddosi.org', + lang: 'zh-CN', }; diff --git a/lib/routes/deadbydaylight/namespace.ts b/lib/routes/deadbydaylight/namespace.ts index 93fa74b347b2c84..7333371e3183d31 100644 --- a/lib/routes/deadbydaylight/namespace.ts +++ b/lib/routes/deadbydaylight/namespace.ts @@ -9,4 +9,5 @@ export const namespace: Namespace = { zh: { name: '黎明杀机', }, + lang: 'en', }; diff --git a/lib/routes/deadline/namespace.ts b/lib/routes/deadline/namespace.ts index 59c3c11569ed9bc..1162e861451a8a2 100644 --- a/lib/routes/deadline/namespace.ts +++ b/lib/routes/deadline/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Deadline', url: 'deadline.com', + lang: 'en', }; diff --git a/lib/routes/dealstreetasia/namespace.ts b/lib/routes/dealstreetasia/namespace.ts index 62f500273335d94..8395378e8187c22 100644 --- a/lib/routes/dealstreetasia/namespace.ts +++ b/lib/routes/dealstreetasia/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'DealStreetAsia', url: 'dealstreetasia.com', + lang: 'en', }; diff --git a/lib/routes/dedao/namespace.ts b/lib/routes/dedao/namespace.ts index c77830eb8651cca..9a61a637f8007e4 100644 --- a/lib/routes/dedao/namespace.ts +++ b/lib/routes/dedao/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '得到', url: 'dedao.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/deepin/namespace.ts b/lib/routes/deepin/namespace.ts index eae1d434b24f665..9222bac2855b79b 100644 --- a/lib/routes/deepin/namespace.ts +++ b/lib/routes/deepin/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { zh: { name: '深度Linux', }, + lang: 'zh-CN', }; diff --git a/lib/routes/deeplearning/namespace.ts b/lib/routes/deeplearning/namespace.ts index 6359a83cb9ca6c8..82bbae5596d1f63 100644 --- a/lib/routes/deeplearning/namespace.ts +++ b/lib/routes/deeplearning/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'deeplearning.ai', url: 'www.deeplearning.ai', + lang: 'en', }; diff --git a/lib/routes/deepmind/namespace.ts b/lib/routes/deepmind/namespace.ts index 5ce8cafc81f0b52..194148682d8a18c 100644 --- a/lib/routes/deepmind/namespace.ts +++ b/lib/routes/deepmind/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'DeepMind', url: 'deepmind.com', + lang: 'en', }; diff --git a/lib/routes/dehenglaw/namespace.ts b/lib/routes/dehenglaw/namespace.ts index 038d08e6cb41f35..118fa000ae74137 100644 --- a/lib/routes/dehenglaw/namespace.ts +++ b/lib/routes/dehenglaw/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'dehenglaw.com', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/deltaio/namespace.ts b/lib/routes/deltaio/namespace.ts index b6f89ae11600ebf..63681cd71d5ebeb 100644 --- a/lib/routes/deltaio/namespace.ts +++ b/lib/routes/deltaio/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Delta Lake', url: 'delta.io', + lang: 'en', }; diff --git a/lib/routes/devolverdigital/namespace.ts b/lib/routes/devolverdigital/namespace.ts index e068cf35e01dd54..41ac172b2af4277 100644 --- a/lib/routes/devolverdigital/namespace.ts +++ b/lib/routes/devolverdigital/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'DevolverDigital', url: 'devolverdigital.com', + lang: 'en', }; diff --git a/lib/routes/devtrium/namespace.ts b/lib/routes/devtrium/namespace.ts index 5a2ff90d0e706b7..dad594c53aedc6e 100644 --- a/lib/routes/devtrium/namespace.ts +++ b/lib/routes/devtrium/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Devtrium', url: 'devtrium.com', + lang: 'en', }; diff --git a/lib/routes/dewu/namespace.ts b/lib/routes/dewu/namespace.ts index c3f99aa3213133f..b9e37f1248edfcc 100644 --- a/lib/routes/dewu/namespace.ts +++ b/lib/routes/dewu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '得物', url: 'dewu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/dgjyw/namespace.ts b/lib/routes/dgjyw/namespace.ts index 4a672b86a8ac1dc..e6b88d38ed61154 100644 --- a/lib/routes/dgjyw/namespace.ts +++ b/lib/routes/dgjyw/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '东莞教研网', url: 'dgjyw.com', + lang: 'zh-CN', }; diff --git a/lib/routes/dhu/namespace.ts b/lib/routes/dhu/namespace.ts index af17525bc5dddee..a100c5b59501569 100644 --- a/lib/routes/dhu/namespace.ts +++ b/lib/routes/dhu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '东华大学', url: 'www.dhu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/diandong/namespace.ts b/lib/routes/diandong/namespace.ts index 460f7b0492837c1..b20a9e7184a52a3 100644 --- a/lib/routes/diandong/namespace.ts +++ b/lib/routes/diandong/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '电动邦', url: 'diandong.com', + lang: 'zh-CN', }; diff --git a/lib/routes/dianping/namespace.ts b/lib/routes/dianping/namespace.ts index e73a9f7d9360b70..72832f07b294c48 100644 --- a/lib/routes/dianping/namespace.ts +++ b/lib/routes/dianping/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '大众点评', url: 'dianping.com', + lang: 'zh-CN', }; diff --git a/lib/routes/diershoubing/namespace.ts b/lib/routes/diershoubing/namespace.ts index 4f260369be3f09f..88e188e33f4d209 100644 --- a/lib/routes/diershoubing/namespace.ts +++ b/lib/routes/diershoubing/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '二柄 APP', url: 'diershoubing.com', + lang: 'zh-CN', }; diff --git a/lib/routes/digitalcameraworld/namespace.ts b/lib/routes/digitalcameraworld/namespace.ts index 287b9be9b729f9c..72fdd6070d6aa9f 100644 --- a/lib/routes/digitalcameraworld/namespace.ts +++ b/lib/routes/digitalcameraworld/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Digital Camera World', url: 'digitalcameraworld.com', + lang: 'en', }; diff --git a/lib/routes/discord/namespace.ts b/lib/routes/discord/namespace.ts index 7d75b76030af8fc..80a47ff5221f9d1 100644 --- a/lib/routes/discord/namespace.ts +++ b/lib/routes/discord/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Discord', url: 'discord.com', + lang: 'en', }; diff --git a/lib/routes/discourse/namespace.ts b/lib/routes/discourse/namespace.ts index 3cf89c061bf86f0..6d80960635d4f3d 100644 --- a/lib/routes/discourse/namespace.ts +++ b/lib/routes/discourse/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { description: `:::warning You need to set the environment variable \`DISCOURSE_CONFIG_{id}\` before using it. Please refer to Configuration section in the Deploy page of the documentation. :::`, + lang: 'en', }; diff --git a/lib/routes/discuz/namespace.ts b/lib/routes/discuz/namespace.ts index 632d0ac457674e7..5744ea253be6d25 100644 --- a/lib/routes/discuz/namespace.ts +++ b/lib/routes/discuz/namespace.ts @@ -2,4 +2,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Discuz', + url: 'https://www.discuz.vip/', + lang: 'zh-CN', }; diff --git a/lib/routes/disinfo/namespace.ts b/lib/routes/disinfo/namespace.ts index 4fd0c269acc7308..44130ff28d74e28 100644 --- a/lib/routes/disinfo/namespace.ts +++ b/lib/routes/disinfo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'EU Disinfo Lab', url: 'disinfo.eu', + lang: 'en', }; diff --git a/lib/routes/diskanalyzer/namespace.ts b/lib/routes/diskanalyzer/namespace.ts index aa77555bb2fff68..aebb0031ee00b38 100644 --- a/lib/routes/diskanalyzer/namespace.ts +++ b/lib/routes/diskanalyzer/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'WizTree', url: 'diskanalyzer.com', + lang: 'en', }; diff --git a/lib/routes/distill/namespace.ts b/lib/routes/distill/namespace.ts index 1485f6b5964ef1a..51dcc5bf3676c35 100644 --- a/lib/routes/distill/namespace.ts +++ b/lib/routes/distill/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Distill', url: 'distill.pub', + lang: 'en', }; diff --git a/lib/routes/dlnews/namespace.ts b/lib/routes/dlnews/namespace.ts index 37d1a01f707e139..babcfb48bdcf196 100644 --- a/lib/routes/dlnews/namespace.ts +++ b/lib/routes/dlnews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'DL NEWS', url: 'dlnews.com', + lang: 'en', }; diff --git a/lib/routes/dlsite/namespace.ts b/lib/routes/dlsite/namespace.ts index 9b383a0e6f9c0c8..35a42f97f4ffa1a 100644 --- a/lib/routes/dlsite/namespace.ts +++ b/lib/routes/dlsite/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'DLsite', url: 'dlsite.com', + lang: 'ja', }; diff --git a/lib/routes/dmzj/namespace.ts b/lib/routes/dmzj/namespace.ts index f29fccea7198124..47012c9e9916000 100644 --- a/lib/routes/dmzj/namespace.ts +++ b/lib/routes/dmzj/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '动漫之家', url: 'news.dmzj.com', + lang: 'zh-CN', }; diff --git a/lib/routes/dn/namespace.ts b/lib/routes/dn/namespace.ts index 41fc2ed52add470..8dd1edd6aff1d8c 100644 --- a/lib/routes/dn/namespace.ts +++ b/lib/routes/dn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'DN.com', url: 'dn.com', + lang: 'en', }; diff --git a/lib/routes/dnaindia/namespace.ts b/lib/routes/dnaindia/namespace.ts index 055403ca475ec35..b9a2af52e687d63 100644 --- a/lib/routes/dnaindia/namespace.ts +++ b/lib/routes/dnaindia/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'DNA India', url: 'dnaindia.com', categories: ['traditional-media'], + lang: 'en', }; diff --git a/lib/routes/dockerhub/namespace.ts b/lib/routes/dockerhub/namespace.ts index b8476121fa06eb7..01c728990a45cfd 100644 --- a/lib/routes/dockerhub/namespace.ts +++ b/lib/routes/dockerhub/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Docker Hub', url: 'hub.docker.com', + lang: 'en', }; diff --git a/lib/routes/docschina/namespace.ts b/lib/routes/docschina/namespace.ts index e4728cad62b57db..974d095bbc8914e 100644 --- a/lib/routes/docschina/namespace.ts +++ b/lib/routes/docschina/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '印记中文', url: 'docschina.org', + lang: 'zh-CN', }; diff --git a/lib/routes/dol/namespace.ts b/lib/routes/dol/namespace.ts index 57b9e475261b220..c82d2274311f8e2 100644 --- a/lib/routes/dol/namespace.ts +++ b/lib/routes/dol/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Thailand Department of Lands', url: 'announce.dol.go.th', + lang: 'en', }; diff --git a/lib/routes/domp4/namespace.ts b/lib/routes/domp4/namespace.ts index b9e5ef736dbf623..f27cdf8482ce3a2 100644 --- a/lib/routes/domp4/namespace.ts +++ b/lib/routes/domp4/namespace.ts @@ -12,4 +12,5 @@ export const namespace: Namespace = { ['domp4.cc', 'mp4kan.com', 'mp4us.com', 'wemp4.com', 'dbmp4.com'] \`\`\` :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/dongqiudi/namespace.ts b/lib/routes/dongqiudi/namespace.ts index b640bd4433ae89f..032cdb83fe35cc0 100644 --- a/lib/routes/dongqiudi/namespace.ts +++ b/lib/routes/dongqiudi/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip - 可以通过头条新闻 + 参数过滤的形式获得早报、专题等内容。 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/dora-world/namespace.ts b/lib/routes/dora-world/namespace.ts index 452569b26a293af..96de436f210ecf2 100644 --- a/lib/routes/dora-world/namespace.ts +++ b/lib/routes/dora-world/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Doraemon Channel', url: 'www.dora-world.com', + lang: 'en', }; diff --git a/lib/routes/dorohedoro/namespace.ts b/lib/routes/dorohedoro/namespace.ts index 80047808b1e66f8..2ad794d7c14cf21 100644 --- a/lib/routes/dorohedoro/namespace.ts +++ b/lib/routes/dorohedoro/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Dorohedoro', url: 'dorohedoro.net', + lang: 'ja', }; diff --git a/lib/routes/douban/namespace.ts b/lib/routes/douban/namespace.ts index 0427a49abe5cad7..8887ee54077327a 100644 --- a/lib/routes/douban/namespace.ts +++ b/lib/routes/douban/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '豆瓣', url: 'www.douban.com', + lang: 'zh-CN', }; diff --git a/lib/routes/douyin/namespace.ts b/lib/routes/douyin/namespace.ts index 003d34243e4b09d..df5d338fb2f6a0a 100644 --- a/lib/routes/douyin/namespace.ts +++ b/lib/routes/douyin/namespace.ts @@ -17,4 +17,5 @@ export const namespace: Namespace = { | 键 | 含义 | 值 | 默认值 | | ------- | ---------------- | ---------------------- | ------- | | \`embed\` | 是否启用内嵌视频 | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` |`, + lang: 'zh-CN', }; diff --git a/lib/routes/douyu/namespace.ts b/lib/routes/douyu/namespace.ts index 21e2a65f69819e9..5ae251ecb7ec375 100644 --- a/lib/routes/douyu/namespace.ts +++ b/lib/routes/douyu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '斗鱼直播', url: 'www.douyu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/dribbble/namespace.ts b/lib/routes/dribbble/namespace.ts index 42397e064b8c1d5..34cd4e9bb2a416b 100644 --- a/lib/routes/dribbble/namespace.ts +++ b/lib/routes/dribbble/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Dribbble', url: 'dribbble.com', + lang: 'en', }; diff --git a/lib/routes/dtcj/namespace.ts b/lib/routes/dtcj/namespace.ts index a5a4f14671a2762..bea0796837e998f 100644 --- a/lib/routes/dtcj/namespace.ts +++ b/lib/routes/dtcj/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'DT 财经', url: 'dtcj.com', + lang: 'zh-CN', }; diff --git a/lib/routes/duckdb/namespace.ts b/lib/routes/duckdb/namespace.ts index f3341352e4ced7b..7126843f616ae45 100644 --- a/lib/routes/duckdb/namespace.ts +++ b/lib/routes/duckdb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'DuckDB Foundation', url: 'duckdb.org', + lang: 'en', }; diff --git a/lib/routes/duozhuayu/namespace.ts b/lib/routes/duozhuayu/namespace.ts index 64d85c12a36c85f..47f8057499707ad 100644 --- a/lib/routes/duozhuayu/namespace.ts +++ b/lib/routes/duozhuayu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '多抓鱼', url: 'duozhuayu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/dushu/namespace.ts b/lib/routes/dushu/namespace.ts index a0b00276db49a10..1547673787f0dae 100644 --- a/lib/routes/dushu/namespace.ts +++ b/lib/routes/dushu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '樊登读书', url: 'card.dushu.io', + lang: 'zh-CN', }; diff --git a/lib/routes/dut/namespace.ts b/lib/routes/dut/namespace.ts index a607caab1db274c..9732a00f2a9a422 100644 --- a/lib/routes/dut/namespace.ts +++ b/lib/routes/dut/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '大连理工大学', url: 'dutdice.dlut.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/dx2025/namespace.ts b/lib/routes/dx2025/namespace.ts index 148763fc3d70745..123d7d7bcf7b74e 100644 --- a/lib/routes/dx2025/namespace.ts +++ b/lib/routes/dx2025/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '东西智库', url: 'dx2025.com', + lang: 'zh-CN', }; diff --git a/lib/routes/dxy/namespace.ts b/lib/routes/dxy/namespace.ts index 576b869d6161f04..3335e331a96bcca 100644 --- a/lib/routes/dxy/namespace.ts +++ b/lib/routes/dxy/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '丁香园', url: 'dxy.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/dykszx/namespace.ts b/lib/routes/dykszx/namespace.ts index 77afdf1e2121ebf..4d81675ca94cef5 100644 --- a/lib/routes/dykszx/namespace.ts +++ b/lib/routes/dykszx/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'www.dykszx.com', categories: ['government'], description: '德阳人事考试网', + lang: 'zh-CN', }; diff --git a/lib/routes/e-hentai/namespace.ts b/lib/routes/e-hentai/namespace.ts index 12bc8669675d276..997f4fb68e9f58d 100644 --- a/lib/routes/e-hentai/namespace.ts +++ b/lib/routes/e-hentai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'E-Hentai', url: 'e-hentai.org', + lang: 'en', }; diff --git a/lib/routes/eagle/namespace.ts b/lib/routes/eagle/namespace.ts index d091a1e83b18d0b..7f9949d4e25ee3e 100644 --- a/lib/routes/eagle/namespace.ts +++ b/lib/routes/eagle/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Eagle', url: 'cn.eagle.cool', + lang: 'zh-CN', }; diff --git a/lib/routes/earthquake/namespace.ts b/lib/routes/earthquake/namespace.ts index 3e963bf5f3db143..c5dfc0ad87e31b1 100644 --- a/lib/routes/earthquake/namespace.ts +++ b/lib/routes/earthquake/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '地震速报', url: 'www.ceic.ac.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/eastday/namespace.ts b/lib/routes/eastday/namespace.ts index 3891eef0a27efa4..d5e9c2c044f749a 100644 --- a/lib/routes/eastday/namespace.ts +++ b/lib/routes/eastday/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '东方网', url: 'mini.eastday.com', + lang: 'zh-CN', }; diff --git a/lib/routes/eastmoney/namespace.ts b/lib/routes/eastmoney/namespace.ts index 8612c237a9707c1..4980049415d9e8e 100644 --- a/lib/routes/eastmoney/namespace.ts +++ b/lib/routes/eastmoney/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '东方财富', url: 'data.eastmoney.com', + lang: 'zh-CN', }; diff --git a/lib/routes/easynomad/namespace.ts b/lib/routes/easynomad/namespace.ts index 7da26880686d5d5..28b6d047e03c5dd 100644 --- a/lib/routes/easynomad/namespace.ts +++ b/lib/routes/easynomad/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '轻松游牧-远程工作聚集地', url: 'easynomad.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ecnu/namespace.ts b/lib/routes/ecnu/namespace.ts index 321c979ac67856d..19c34ac77f10036 100644 --- a/lib/routes/ecnu/namespace.ts +++ b/lib/routes/ecnu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'East China Normal University 华东师范大学', url: 'ecnu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/economist/namespace.ts b/lib/routes/economist/namespace.ts index 8fa276be3dd0883..f95428e40ea7582 100644 --- a/lib/routes/economist/namespace.ts +++ b/lib/routes/economist/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The Economist', url: 'economist.com', + lang: 'en', }; diff --git a/lib/routes/ecust/namespace.ts b/lib/routes/ecust/namespace.ts index 8f212866b7da0e7..2c5ca808648bfdb 100644 --- a/lib/routes/ecust/namespace.ts +++ b/lib/routes/ecust/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '华东理工大学', url: 'e.ecust.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/egsea/namespace.ts b/lib/routes/egsea/namespace.ts index 2a55a2725d67306..69a6461b8edd2ce 100644 --- a/lib/routes/egsea/namespace.ts +++ b/lib/routes/egsea/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'e 公司', url: 'egsea.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ehentai/namespace.ts b/lib/routes/ehentai/namespace.ts index 008a2b9550b25c9..65b118d97b57565 100644 --- a/lib/routes/ehentai/namespace.ts +++ b/lib/routes/ehentai/namespace.ts @@ -8,4 +8,5 @@ export const namespace: Namespace = { | ------------ | ------------------------------------------------------------------------------- | -------------- | ------------- | | bittorrent | Whether include a link to the latest torrent | 0/1/true/false | false | | embed\_thumb | Whether the cover image is embedded in the RSS feed rather than given as a link | 0/1/true/false | false |`, + lang: 'en', }; diff --git a/lib/routes/ekantipur/namespace.ts b/lib/routes/ekantipur/namespace.ts index 7a432fb90b22f1f..ac80d204b8aa294 100644 --- a/lib/routes/ekantipur/namespace.ts +++ b/lib/routes/ekantipur/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Ekantipur / कान्तिपुर (Nepal)', url: 'ekantipur.com', + lang: 'ne', }; diff --git a/lib/routes/elasticsearch-cn/namespace.ts b/lib/routes/elasticsearch-cn/namespace.ts index 6092336acdc3dcb..766a1fed2431489 100644 --- a/lib/routes/elasticsearch-cn/namespace.ts +++ b/lib/routes/elasticsearch-cn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Elastic 中文社区', url: 'elasticsearch.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/eleduck/namespace.ts b/lib/routes/eleduck/namespace.ts index 1b1311633db99c9..ce525e7f0579e99 100644 --- a/lib/routes/eleduck/namespace.ts +++ b/lib/routes/eleduck/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '电鸭社区', url: 'eleduck.com', + lang: 'zh-CN', }; diff --git a/lib/routes/elsevier/namespace.ts b/lib/routes/elsevier/namespace.ts index d43da218f49e167..ca7cf076385431e 100644 --- a/lib/routes/elsevier/namespace.ts +++ b/lib/routes/elsevier/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ELSEVIER', url: 'www.sciencedirect.com', + lang: 'en', }; diff --git a/lib/routes/embassy/namespace.ts b/lib/routes/embassy/namespace.ts index 8c757f9e725fa01..13c5e8f236a5eb6 100644 --- a/lib/routes/embassy/namespace.ts +++ b/lib/routes/embassy/namespace.ts @@ -111,4 +111,5 @@ export const namespace: Namespace = { | 爱丁堡 | \`/embassy/uk/edinburgh\` | | 贝尔法斯特 | \`/embassy/uk/belfast\` | | 曼彻斯特 | \`/embassy/uk/manchester\` |`, + lang: 'zh-CN', }; diff --git a/lib/routes/enterprisecraftsmanship/namespace.ts b/lib/routes/enterprisecraftsmanship/namespace.ts index 3bf4dfa48f3eba2..5efbbd667557fe0 100644 --- a/lib/routes/enterprisecraftsmanship/namespace.ts +++ b/lib/routes/enterprisecraftsmanship/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Enterprise Craftsmanship', url: 'enterprisecraftsmanship.com', + lang: 'en', }; diff --git a/lib/routes/epicgames/namespace.ts b/lib/routes/epicgames/namespace.ts index b44829d265cd70b..8ddfc6e8e8e64d6 100644 --- a/lib/routes/epicgames/namespace.ts +++ b/lib/routes/epicgames/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Epic Games Store', url: 'store.epicgames.com', + lang: 'en', }; diff --git a/lib/routes/eprice/namespace.ts b/lib/routes/eprice/namespace.ts index e5d4c622445949c..af7aa5a413212c5 100644 --- a/lib/routes/eprice/namespace.ts +++ b/lib/routes/eprice/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ePrice', url: 'eprice.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/eshukan/namespace.ts b/lib/routes/eshukan/namespace.ts index 851f5eefccd85f7..e3341fee48cd3c6 100644 --- a/lib/routes/eshukan/namespace.ts +++ b/lib/routes/eshukan/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'eshukan.com', categories: ['study'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/espn/namespace.ts b/lib/routes/espn/namespace.ts index c148e7dbd47ad62..45f1bb90d622416 100644 --- a/lib/routes/espn/namespace.ts +++ b/lib/routes/espn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ESPN', url: 'espn.com', + lang: 'en', }; diff --git a/lib/routes/esquirehk/namespace.ts b/lib/routes/esquirehk/namespace.ts index 9ed0b62e03e0679..662a391aacbb477 100644 --- a/lib/routes/esquirehk/namespace.ts +++ b/lib/routes/esquirehk/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Esquire Hong Kong', url: 'www.esquirehk.com', + lang: 'zh-HK', }; diff --git a/lib/routes/europechinese/namespace.ts b/lib/routes/europechinese/namespace.ts index 9c639fb2dd2c7a7..8490cc4525c1ffe 100644 --- a/lib/routes/europechinese/namespace.ts +++ b/lib/routes/europechinese/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '歐洲動態(國際)', url: 'europechinese.blogspot.com', + lang: 'zh-TW', }; diff --git a/lib/routes/eventernote/namespace.ts b/lib/routes/eventernote/namespace.ts index 0b8c3c03acb50ed..9a945d504132318 100644 --- a/lib/routes/eventernote/namespace.ts +++ b/lib/routes/eventernote/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Eventernote', url: 'www.eventernote.com', + lang: 'ja', }; diff --git a/lib/routes/f-droid/namespace.ts b/lib/routes/f-droid/namespace.ts index 58471ad71ffdfed..de7c5141ca196d5 100644 --- a/lib/routes/f-droid/namespace.ts +++ b/lib/routes/f-droid/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'F-Droid', url: 'f-droid.org', + lang: 'zh-CN', }; diff --git a/lib/routes/famitsu/namespace.ts b/lib/routes/famitsu/namespace.ts index 4537d95c7fe02bf..fd90a15a2a410c5 100644 --- a/lib/routes/famitsu/namespace.ts +++ b/lib/routes/famitsu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ファミ通', url: 'famitsu.com', + lang: 'ja', }; diff --git a/lib/routes/fanbox/namespace.ts b/lib/routes/fanbox/namespace.ts index 1ea8d1ee31902a8..64c6b112f2b5b7f 100644 --- a/lib/routes/fanbox/namespace.ts +++ b/lib/routes/fanbox/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'fanbox', url: 'www.fanbox.cc', + lang: 'zh-CN', }; diff --git a/lib/routes/fanqienovel/namespace.ts b/lib/routes/fanqienovel/namespace.ts index 45456cca871fc5a..87016d7cc645a67 100644 --- a/lib/routes/fanqienovel/namespace.ts +++ b/lib/routes/fanqienovel/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '番茄小说', url: 'fanqienovel.com', categories: ['reading'], + lang: 'zh-CN', }; diff --git a/lib/routes/fansly/namespace.ts b/lib/routes/fansly/namespace.ts index 5383f0ca00759c7..044e76beba00c84 100644 --- a/lib/routes/fansly/namespace.ts +++ b/lib/routes/fansly/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Fansly', url: 'fansly.com', + lang: 'en', }; diff --git a/lib/routes/fantia/namespace.ts b/lib/routes/fantia/namespace.ts index 35f2f85217d9d14..b419494dee49f79 100644 --- a/lib/routes/fantia/namespace.ts +++ b/lib/routes/fantia/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Fantia', url: 'fantia.jp', + lang: 'ja', }; diff --git a/lib/routes/fanxinzhui/namespace.ts b/lib/routes/fanxinzhui/namespace.ts index 21e195134e39b17..cf4a57a3af8b3e2 100644 --- a/lib/routes/fanxinzhui/namespace.ts +++ b/lib/routes/fanxinzhui/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '追新番', url: 'fanxinzhui.com', + lang: 'zh-CN', }; diff --git a/lib/routes/farmatters/namespace.ts b/lib/routes/farmatters/namespace.ts index 147fcc5a77796b1..1cdba790e989f42 100644 --- a/lib/routes/farmatters/namespace.ts +++ b/lib/routes/farmatters/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Farmatters', url: 'farmatters.com', categories: ['new-media'], + lang: 'en', }; diff --git a/lib/routes/fashionnetwork/namespace.ts b/lib/routes/fashionnetwork/namespace.ts index ed72be5aebb48cf..d5d9caae9359b68 100644 --- a/lib/routes/fashionnetwork/namespace.ts +++ b/lib/routes/fashionnetwork/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'fashionnetwork.cn', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/fastbull/namespace.ts b/lib/routes/fastbull/namespace.ts index 429d6ac84f347d8..a925e44f92c8faa 100644 --- a/lib/routes/fastbull/namespace.ts +++ b/lib/routes/fastbull/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '法布财经', url: 'fastbull.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/fda/namespace.ts b/lib/routes/fda/namespace.ts index 33fc997673a1b2f..67d34bbfd36e304 100644 --- a/lib/routes/fda/namespace.ts +++ b/lib/routes/fda/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'U.S. Food and Drug Administration', url: 'fda.gov', + lang: 'en', }; diff --git a/lib/routes/fediverse/namespace.ts b/lib/routes/fediverse/namespace.ts index e13a372f4e3172a..dd888f29f7827f6 100644 --- a/lib/routes/fediverse/namespace.ts +++ b/lib/routes/fediverse/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Fediverse', url: 'fediverse.observer', + lang: 'en', }; diff --git a/lib/routes/feng/namespace.ts b/lib/routes/feng/namespace.ts index fed9274793086ed..8fcdb3039124729 100644 --- a/lib/routes/feng/namespace.ts +++ b/lib/routes/feng/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '威锋', url: 'feng.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ff14/namespace.ts b/lib/routes/ff14/namespace.ts index 32c7d0c4f5be38e..e78d1e3e20db5da 100644 --- a/lib/routes/ff14/namespace.ts +++ b/lib/routes/ff14/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'FINAL FANTASY XIV 最终幻想 14', + name: 'FINAL FANTASY XIV', url: 'eu.finalfantasyxiv.com', + lang: 'en', }; diff --git a/lib/routes/fffdm/namespace.ts b/lib/routes/fffdm/namespace.ts index e6bcccf5f18ea0e..5c087539b7bf8eb 100644 --- a/lib/routes/fffdm/namespace.ts +++ b/lib/routes/fffdm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '风之动漫', url: 'manhua.fffdm.com', + lang: 'zh-CN', }; diff --git a/lib/routes/finology/namespace.ts b/lib/routes/finology/namespace.ts index c7e8ecee01dab16..e5c807b3bd3e37d 100644 --- a/lib/routes/finology/namespace.ts +++ b/lib/routes/finology/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Finology Insider', url: 'insider.finology.in', + lang: 'en', }; diff --git a/lib/routes/finviz/namespace.ts b/lib/routes/finviz/namespace.ts index 9cbf12343f365ff..f732342125c9831 100644 --- a/lib/routes/finviz/namespace.ts +++ b/lib/routes/finviz/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'finviz', url: 'finviz.com', + lang: 'en', }; diff --git a/lib/routes/firecore/namespace.ts b/lib/routes/firecore/namespace.ts index 4fbb0865e548b07..466ad5cb823be87 100644 --- a/lib/routes/firecore/namespace.ts +++ b/lib/routes/firecore/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Infuse', url: 'firecore.com', + lang: 'en', }; diff --git a/lib/routes/firefox/namespace.ts b/lib/routes/firefox/namespace.ts index 4c932fd736a42a8..683ad1b7561865c 100644 --- a/lib/routes/firefox/namespace.ts +++ b/lib/routes/firefox/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Mozilla', url: 'monitor.firefox.com', + lang: 'en', }; diff --git a/lib/routes/fisher-spb/namespace.ts b/lib/routes/fisher-spb/namespace.ts index 9217b6ed8197ae1..be303631d6d68ac 100644 --- a/lib/routes/fisher-spb/namespace.ts +++ b/lib/routes/fisher-spb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Fisher Spb', url: 'fisher.spb.ru', + lang: 'ru', }; diff --git a/lib/routes/fishshell/namespace.ts b/lib/routes/fishshell/namespace.ts index 5681e656a5c7198..91e4ee576d8466d 100644 --- a/lib/routes/fishshell/namespace.ts +++ b/lib/routes/fishshell/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'fish shell', url: 'fishshell.com', + lang: 'en', }; diff --git a/lib/routes/fjksbm/namespace.ts b/lib/routes/fjksbm/namespace.ts index 8bf9fdf45223f68..6a447a6444ed031 100644 --- a/lib/routes/fjksbm/namespace.ts +++ b/lib/routes/fjksbm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '福建考试报名网', url: 'fjksbm.com', + lang: 'zh-CN', }; diff --git a/lib/routes/flashcat/namespace.ts b/lib/routes/flashcat/namespace.ts index 0df346b6d95ba0c..f28d31c77327cd6 100644 --- a/lib/routes/flashcat/namespace.ts +++ b/lib/routes/flashcat/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Flashcat', url: 'flashcat.cloud', + lang: 'zh-CN', }; diff --git a/lib/routes/flyert/namespace.ts b/lib/routes/flyert/namespace.ts index b120441951f83f2..0643b1388456b84 100644 --- a/lib/routes/flyert/namespace.ts +++ b/lib/routes/flyert/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '飞客茶馆', url: 'flyert.com', + lang: 'zh-CN', }; diff --git a/lib/routes/focustaiwan/namespace.ts b/lib/routes/focustaiwan/namespace.ts index d09d3d9eb1be256..35b7e40e179310d 100644 --- a/lib/routes/focustaiwan/namespace.ts +++ b/lib/routes/focustaiwan/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Focus Taiwan', url: 'focustaiwan.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/follow/namespace.ts b/lib/routes/follow/namespace.ts index 02fd4ac9fd401ce..cdc759465159ff2 100644 --- a/lib/routes/follow/namespace.ts +++ b/lib/routes/follow/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Follow', url: 'app.follow.is', + lang: 'en', }; diff --git a/lib/routes/followin/namespace.ts b/lib/routes/followin/namespace.ts index f3f71c7a72ce7d5..776ab0f3f3bf21e 100644 --- a/lib/routes/followin/namespace.ts +++ b/lib/routes/followin/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Followin', url: 'followin.io', + lang: 'zh-CN', }; diff --git a/lib/routes/foresightnews/namespace.ts b/lib/routes/foresightnews/namespace.ts index 2d1b022eb17716e..4ff0f37076a8fb8 100644 --- a/lib/routes/foresightnews/namespace.ts +++ b/lib/routes/foresightnews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Foresight News', url: 'foresightnews.pro', + lang: 'en', }; diff --git a/lib/routes/foreverblog/namespace.ts b/lib/routes/foreverblog/namespace.ts index 80f055dc0eadf9a..56e307f41c50ce9 100644 --- a/lib/routes/foreverblog/namespace.ts +++ b/lib/routes/foreverblog/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '十年之约', url: 'www.foreverblog.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/fortnite/namespace.ts b/lib/routes/fortnite/namespace.ts index 4ddfa1b7aaa528b..2a4a735ffa85472 100644 --- a/lib/routes/fortnite/namespace.ts +++ b/lib/routes/fortnite/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Fortnite', url: 'fortnite.com', + lang: 'en', }; diff --git a/lib/routes/fortunechina/namespace.ts b/lib/routes/fortunechina/namespace.ts index aee50b1ba88ba0d..93e60efd774c8d2 100644 --- a/lib/routes/fortunechina/namespace.ts +++ b/lib/routes/fortunechina/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '财富中文网', url: 'fortunechina.com', + lang: 'zh-CN', }; diff --git a/lib/routes/fosshub/namespace.ts b/lib/routes/fosshub/namespace.ts index 073737179a72d76..675fda91afcef43 100644 --- a/lib/routes/fosshub/namespace.ts +++ b/lib/routes/fosshub/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'FossHub', url: 'fosshub.com', + lang: 'en', }; diff --git a/lib/routes/free/namespace.ts b/lib/routes/free/namespace.ts index 7f65d7c802f50dc..791c2582ee7fc27 100644 --- a/lib/routes/free/namespace.ts +++ b/lib/routes/free/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '免費資源網路社群', url: 'free.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/freebuf/namespace.ts b/lib/routes/freebuf/namespace.ts index ee90859eb3e9e46..510c3219702e910 100644 --- a/lib/routes/freebuf/namespace.ts +++ b/lib/routes/freebuf/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'FreeBuf', url: 'freebuf.com', + lang: 'zh-CN', }; diff --git a/lib/routes/freecomputerbooks/namespace.ts b/lib/routes/freecomputerbooks/namespace.ts index c9f3803930e40c4..7ad5e07a8ee7987 100644 --- a/lib/routes/freecomputerbooks/namespace.ts +++ b/lib/routes/freecomputerbooks/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Free Computer Books', url: 'freecomputerbooks.com', + lang: 'en', }; diff --git a/lib/routes/freewechat/namespace.ts b/lib/routes/freewechat/namespace.ts index f0c507840c57d53..5a212f8c6647f86 100644 --- a/lib/routes/freewechat/namespace.ts +++ b/lib/routes/freewechat/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '自由微信', url: 'freewechat.com', + lang: 'zh-CN', }; diff --git a/lib/routes/freexcomic/namespace.ts b/lib/routes/freexcomic/namespace.ts index 28d27e425d31bee..c4a3b12f8adad60 100644 --- a/lib/routes/freexcomic/namespace.ts +++ b/lib/routes/freexcomic/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '漫小肆韓漫', url: 'freexcomic.com', categories: ['anime'], + lang: 'zh-CN', }; diff --git a/lib/routes/ft/namespace.ts b/lib/routes/ft/namespace.ts index aa55ed143d9b6ca..6ff6dcc2061669f 100644 --- a/lib/routes/ft/namespace.ts +++ b/lib/routes/ft/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Financial Times', url: 'ft.com', + lang: 'en', }; diff --git a/lib/routes/ftchinese/namespace.ts b/lib/routes/ftchinese/namespace.ts index dd0ac1d5203017e..d34685b71111c76 100644 --- a/lib/routes/ftchinese/namespace.ts +++ b/lib/routes/ftchinese/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'FT 中文网', url: 'ftchinese.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ftm/namespace.ts b/lib/routes/ftm/namespace.ts index df6951f568b4d98..681a18f315353c0 100644 --- a/lib/routes/ftm/namespace.ts +++ b/lib/routes/ftm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Follow The Money', url: 'www.ftm.eu', + lang: 'en', }; diff --git a/lib/routes/fuliba/namespace.ts b/lib/routes/fuliba/namespace.ts index e0df1470cccf989..6140eac42946536 100644 --- a/lib/routes/fuliba/namespace.ts +++ b/lib/routes/fuliba/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '福利吧', url: 'fuliba2023.net', + lang: 'zh-CN', }; diff --git a/lib/routes/furstar/namespace.ts b/lib/routes/furstar/namespace.ts index 0f14c3396514a03..8af12f9858deda9 100644 --- a/lib/routes/furstar/namespace.ts +++ b/lib/routes/furstar/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Furstar', url: 'furstar.jp', + lang: 'ja', }; diff --git a/lib/routes/futunn/namespace.ts b/lib/routes/futunn/namespace.ts index 8c8fdd9eceaf936..7c51bd5252ecbba 100644 --- a/lib/routes/futunn/namespace.ts +++ b/lib/routes/futunn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Futubull 富途牛牛', url: 'news.futunn.com', + lang: 'zh-CN', }; diff --git a/lib/routes/fx-markets/namespace.ts b/lib/routes/fx-markets/namespace.ts index a43998130b90f8b..c93cbe9a54b33eb 100644 --- a/lib/routes/fx-markets/namespace.ts +++ b/lib/routes/fx-markets/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'FX Markets', url: 'fx-markets.com', + lang: 'en', }; diff --git a/lib/routes/fx678/namespace.ts b/lib/routes/fx678/namespace.ts index 320293a83470535..6a8bc947ca402dc 100644 --- a/lib/routes/fx678/namespace.ts +++ b/lib/routes/fx678/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '汇通网', url: 'fx678.com', + lang: 'zh-CN', }; diff --git a/lib/routes/fxiaoke/namespace.ts b/lib/routes/fxiaoke/namespace.ts index f44b12b13e97afb..6edb45aba884087 100644 --- a/lib/routes/fxiaoke/namespace.ts +++ b/lib/routes/fxiaoke/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '纷享销客 CRM', url: 'fxiaoke.com', + lang: 'zh-CN', }; diff --git a/lib/routes/fzmtr/namespace.ts b/lib/routes/fzmtr/namespace.ts index e8520de30975b0f..340de25b97edff9 100644 --- a/lib/routes/fzmtr/namespace.ts +++ b/lib/routes/fzmtr/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '福州地铁', url: 'www.fzmtr.com', + lang: 'zh-CN', }; diff --git a/lib/routes/galxe/namespace.ts b/lib/routes/galxe/namespace.ts index cd5f20588ee5dd4..e84b418b62b7de6 100644 --- a/lib/routes/galxe/namespace.ts +++ b/lib/routes/galxe/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { zh: { name: '銀河', }, + lang: 'zh-CN', }; diff --git a/lib/routes/gameapps/namespace.ts b/lib/routes/gameapps/namespace.ts index e24442a2cc9c094..56e7e3ab4cb84a1 100644 --- a/lib/routes/gameapps/namespace.ts +++ b/lib/routes/gameapps/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'GameApps.hk 香港手机游戏网', url: 'gameapps.hk', + lang: 'zh-HK', }; diff --git a/lib/routes/gamebase/namespace.ts b/lib/routes/gamebase/namespace.ts index 1abc84616be0eaa..13aa6462cc69ad4 100644 --- a/lib/routes/gamebase/namespace.ts +++ b/lib/routes/gamebase/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '遊戲基地 Gamebase', url: 'news.gamebase.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/gamegene/namespace.ts b/lib/routes/gamegene/namespace.ts index 810956a07385f7e..57a1535b9358c33 100644 --- a/lib/routes/gamegene/namespace.ts +++ b/lib/routes/gamegene/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '游戏基因', url: 'news.gamegene.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/gamer/namespace.ts b/lib/routes/gamer/namespace.ts index 83d22151beb0eb2..17e532005c2ff28 100644 --- a/lib/routes/gamer/namespace.ts +++ b/lib/routes/gamer/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '巴哈姆特電玩資訊站', url: 'acg.gamer.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/gamer520/namespace.ts b/lib/routes/gamer520/namespace.ts index 0f236a4cff21ac0..6b63a7b0898efe0 100644 --- a/lib/routes/gamer520/namespace.ts +++ b/lib/routes/gamer520/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '全球游戏交流中心', url: 'www.gamer520.com', + lang: 'zh-CN', }; diff --git a/lib/routes/gamersecret/namespace.ts b/lib/routes/gamersecret/namespace.ts index 4cba75ecf383bc3..cbb306db4117230 100644 --- a/lib/routes/gamersecret/namespace.ts +++ b/lib/routes/gamersecret/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Gamer Secret', url: 'gamersecret.com', + lang: 'en', }; diff --git a/lib/routes/gamersky/namespace.ts b/lib/routes/gamersky/namespace.ts index ac8034d74cf649e..8680998d7f34412 100644 --- a/lib/routes/gamersky/namespace.ts +++ b/lib/routes/gamersky/namespace.ts @@ -7,4 +7,5 @@ export const namespace: Namespace = { zh: { name: '游民星空', }, + lang: 'zh-CN', }; diff --git a/lib/routes/gamme/namespace.ts b/lib/routes/gamme/namespace.ts index 2682506930d601c..3ada6fbfc28e3c6 100644 --- a/lib/routes/gamme/namespace.ts +++ b/lib/routes/gamme/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '卡卡洛普', url: 'news.gamme.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/gcores/namespace.ts b/lib/routes/gcores/namespace.ts index d66cdcd05bd9c9d..490cf738270ed33 100644 --- a/lib/routes/gcores/namespace.ts +++ b/lib/routes/gcores/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '机核网', url: 'gcores.com', + lang: 'zh-CN', }; diff --git a/lib/routes/gdsrx/namespace.ts b/lib/routes/gdsrx/namespace.ts index 23190d2257ed5f2..c28889e2295606f 100644 --- a/lib/routes/gdsrx/namespace.ts +++ b/lib/routes/gdsrx/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '广东省食品药品审评认证技术协会', url: 'gdsrx.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/gdut/namespace.ts b/lib/routes/gdut/namespace.ts index c3b9a2ceffec435..4b31d59331eab64 100644 --- a/lib/routes/gdut/namespace.ts +++ b/lib/routes/gdut/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '广东工业大学', url: 'oas.gdut.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/geekpark/namespace.ts b/lib/routes/geekpark/namespace.ts index 8b5c57b22afc511..76092af3dfc0bbe 100644 --- a/lib/routes/geekpark/namespace.ts +++ b/lib/routes/geekpark/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'geekpark.net', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/gelonghui/namespace.ts b/lib/routes/gelonghui/namespace.ts index a13ccfd039c093f..915cfe096c2879c 100644 --- a/lib/routes/gelonghui/namespace.ts +++ b/lib/routes/gelonghui/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '格隆汇', url: 'gelonghui.com', + lang: 'zh-CN', }; diff --git a/lib/routes/geocaching/namespace.ts b/lib/routes/geocaching/namespace.ts index fac3b4e912aae7d..5cdd5412dd015f0 100644 --- a/lib/routes/geocaching/namespace.ts +++ b/lib/routes/geocaching/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Geocaching', url: 'geocaching.com', + lang: 'en', }; diff --git a/lib/routes/getdr/namespace.ts b/lib/routes/getdr/namespace.ts index 1d4f2ea1f3be27d..b5452a764ec47b3 100644 --- a/lib/routes/getdr/namespace.ts +++ b/lib/routes/getdr/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '趨勢科技防詐達人', url: 'getdr.com', + lang: 'zh-TW', }; diff --git a/lib/routes/getitfree/namespace.ts b/lib/routes/getitfree/namespace.ts index c616b2b7ec88d26..97c81055025ab2c 100644 --- a/lib/routes/getitfree/namespace.ts +++ b/lib/routes/getitfree/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '正版中国', url: 'getitfree.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/gettr/namespace.ts b/lib/routes/gettr/namespace.ts index 77433092ffee090..6215f5bbe409232 100644 --- a/lib/routes/gettr/namespace.ts +++ b/lib/routes/gettr/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'GETTR', url: 'gettr.com', + lang: 'zh-CN', }; diff --git a/lib/routes/gf-cn/namespace.ts b/lib/routes/gf-cn/namespace.ts index 965ca99db035788..dc6f37846b9e7a6 100644 --- a/lib/routes/gf-cn/namespace.ts +++ b/lib/routes/gf-cn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '少女前线', url: 'sunborngame.com', + lang: 'zh-CN', }; diff --git a/lib/routes/gihyo/namespace.ts b/lib/routes/gihyo/namespace.ts index 1a28e9f3c0a4b80..49781df94f48d80 100644 --- a/lib/routes/gihyo/namespace.ts +++ b/lib/routes/gihyo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'gihyo.jp', url: 'gihyo.jp', + lang: 'ja', }; diff --git a/lib/routes/gisreportsonline/namespace.ts b/lib/routes/gisreportsonline/namespace.ts index 80c606cbf384b5b..8ad5ecc7ffdd10b 100644 --- a/lib/routes/gisreportsonline/namespace.ts +++ b/lib/routes/gisreportsonline/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'GIS Reports', url: 'www.gisreportsonline.com', + lang: 'en', }; diff --git a/lib/routes/gitee/namespace.ts b/lib/routes/gitee/namespace.ts index 26882853154fd58..bff61795c5add05 100644 --- a/lib/routes/gitee/namespace.ts +++ b/lib/routes/gitee/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Gitee', url: 'gitee.com', + lang: 'zh-CN', }; diff --git a/lib/routes/github/namespace.ts b/lib/routes/github/namespace.ts index 51009fc81499484..0f2421c5a88cc68 100644 --- a/lib/routes/github/namespace.ts +++ b/lib/routes/github/namespace.ts @@ -12,4 +12,5 @@ GitHub provides some official RSS feeds: - Private feed: \`https://github.com/:user.private.atom?token=:secret\` (You can find **Subscribe to your news feed** in [dashboard](https://github.com) page after login) - Wiki history: \`https://github.com/:owner/:repo/wiki.atom\` :::`, + lang: 'en', }; diff --git a/lib/routes/gitpod/namespace.ts b/lib/routes/gitpod/namespace.ts index 95979f2276af95b..bf21b9c6f17e0af 100644 --- a/lib/routes/gitpod/namespace.ts +++ b/lib/routes/gitpod/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Gitpod', url: 'gitpod.io', + lang: 'en', }; diff --git a/lib/routes/globallawreview/namespace.ts b/lib/routes/globallawreview/namespace.ts index 4c37e69824dfb39..c786cfad1846299 100644 --- a/lib/routes/globallawreview/namespace.ts +++ b/lib/routes/globallawreview/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '环球法律评论', url: 'globallawreview.org', + lang: 'zh-CN', }; diff --git a/lib/routes/gmcmonline/namespace.ts b/lib/routes/gmcmonline/namespace.ts index 973f04bf92bb4cd..96e29770ff6b985 100644 --- a/lib/routes/gmcmonline/namespace.ts +++ b/lib/routes/gmcmonline/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'gmcmonline.com', categories: ['journal'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/go/namespace.ts b/lib/routes/go/namespace.ts index 4b47841cce1c7b7..4423215b6d08513 100644 --- a/lib/routes/go/namespace.ts +++ b/lib/routes/go/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'go.jp', categories: ['government'], description: 'The Government of Japan', + lang: 'ja', }; diff --git a/lib/routes/gocn/namespace.ts b/lib/routes/gocn/namespace.ts index 3cb50ca6f0da67f..c576106a186f73b 100644 --- a/lib/routes/gocn/namespace.ts +++ b/lib/routes/gocn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'GoCN', url: 'gocn.vip', + lang: 'zh-CN', }; diff --git a/lib/routes/gofans/namespace.ts b/lib/routes/gofans/namespace.ts index 941d37600330d30..7863fa1ffe8d6e4 100644 --- a/lib/routes/gofans/namespace.ts +++ b/lib/routes/gofans/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'GoFans', url: 'gofans.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/gogoanimehd/namespace.ts b/lib/routes/gogoanimehd/namespace.ts index e75b69ab9798ea1..d61d5cf235b1589 100644 --- a/lib/routes/gogoanimehd/namespace.ts +++ b/lib/routes/gogoanimehd/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Gogoanimehd', url: 'developer.anitaku.to', + lang: 'en', }; diff --git a/lib/routes/google/namespace.ts b/lib/routes/google/namespace.ts index 9fbd20b08714c52..63660a1c5fe5e6b 100644 --- a/lib/routes/google/namespace.ts +++ b/lib/routes/google/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Google', url: 'www.google.com', + lang: 'en', }; diff --git a/lib/routes/gov/ah/namespace.ts b/lib/routes/gov/ah/namespace.ts index 6994f2f4d646624..85ba52ede59659d 100644 --- a/lib/routes/gov/ah/namespace.ts +++ b/lib/routes/gov/ah/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'ah.gov.cn', categories: ['government'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/gq/namespace.ts b/lib/routes/gq/namespace.ts index 9814d3c32554bd6..2836487cb42380c 100644 --- a/lib/routes/gq/namespace.ts +++ b/lib/routes/gq/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'GQ', url: 'gq.com', + lang: 'en', }; diff --git a/lib/routes/greasyfork/namespace.ts b/lib/routes/greasyfork/namespace.ts index 10f49bdfb117c66..8ed9c58a09b8996 100644 --- a/lib/routes/greasyfork/namespace.ts +++ b/lib/routes/greasyfork/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Greasy Fork', url: 'greasyfork.org', + lang: 'en', }; diff --git a/lib/routes/grist/namespace.ts b/lib/routes/grist/namespace.ts index e5c022502519358..9f5213d84df285e 100644 --- a/lib/routes/grist/namespace.ts +++ b/lib/routes/grist/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Grist', url: 'grist.org', + lang: 'en', }; diff --git a/lib/routes/grubstreet/namespace.ts b/lib/routes/grubstreet/namespace.ts index c48bd6b8101f25a..b6e76d76eaccbf9 100644 --- a/lib/routes/grubstreet/namespace.ts +++ b/lib/routes/grubstreet/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Grub Street', url: 'grubstreet.com', + lang: 'en', }; diff --git a/lib/routes/gs/namespace.ts b/lib/routes/gs/namespace.ts index 81c93ec4dd66104..9874fd86cd341bb 100644 --- a/lib/routes/gs/namespace.ts +++ b/lib/routes/gs/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { zh: { name: '高盛', }, + lang: 'en', }; diff --git a/lib/routes/guancha/namespace.ts b/lib/routes/guancha/namespace.ts index 5261bf8da1f3e1f..dc7967a68620b51 100644 --- a/lib/routes/guancha/namespace.ts +++ b/lib/routes/guancha/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '观察者网', url: 'guancha.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/guangdiu/namespace.ts b/lib/routes/guangdiu/namespace.ts index 58969c86d7fa91f..791f0df07c73768 100644 --- a/lib/routes/guangdiu/namespace.ts +++ b/lib/routes/guangdiu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '逛丢', url: 'guangdiu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/guangzhoumetro/namespace.ts b/lib/routes/guangzhoumetro/namespace.ts index 5531e4b17782db3..afdc30c4bfea1a1 100644 --- a/lib/routes/guangzhoumetro/namespace.ts +++ b/lib/routes/guangzhoumetro/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '广州地铁', url: 'www.gzmtr.com', + lang: 'zh-CN', }; diff --git a/lib/routes/guanhai/namespace.ts b/lib/routes/guanhai/namespace.ts index db355e9b828cbc4..7947de6c9326d6f 100644 --- a/lib/routes/guanhai/namespace.ts +++ b/lib/routes/guanhai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '观海新闻', url: 'guanhai.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/guduodata/namespace.ts b/lib/routes/guduodata/namespace.ts index e9e4d4dc0248ad5..82d46310eec2c9b 100644 --- a/lib/routes/guduodata/namespace.ts +++ b/lib/routes/guduodata/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '骨朵数据', url: 'data.guduodata.com', + lang: 'zh-CN', }; diff --git a/lib/routes/gumroad/namespace.ts b/lib/routes/gumroad/namespace.ts index 2caaa70849482df..8266353e3d93f17 100644 --- a/lib/routes/gumroad/namespace.ts +++ b/lib/routes/gumroad/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Gumroad', url: 'gumroad.com', + lang: 'en', }; diff --git a/lib/routes/guokr/namespace.ts b/lib/routes/guokr/namespace.ts index afd61d4463b77a1..33bfe7c89a3f998 100644 --- a/lib/routes/guokr/namespace.ts +++ b/lib/routes/guokr/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '果壳网', url: 'guokr.com', + lang: 'zh-CN', }; diff --git a/lib/routes/guozaoke/namespace.ts b/lib/routes/guozaoke/namespace.ts index 386ab893f881260..bf2275811f5a60c 100644 --- a/lib/routes/guozaoke/namespace.ts +++ b/lib/routes/guozaoke/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'guozaoke', url: 'guozaoke.com', + lang: 'zh-CN', }; diff --git a/lib/routes/gxmzu/namespace.ts b/lib/routes/gxmzu/namespace.ts index 378bbaa0ace0060..63abd273436b0a5 100644 --- a/lib/routes/gxmzu/namespace.ts +++ b/lib/routes/gxmzu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '广西民族大学', url: 'ai.gxmzu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/gzdaily/namespace.ts b/lib/routes/gzdaily/namespace.ts index 967219dc8f78c95..ad480832a63b5a6 100644 --- a/lib/routes/gzdaily/namespace.ts +++ b/lib/routes/gzdaily/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '广州日报', url: 'gzdaily.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/gzhu/namespace.ts b/lib/routes/gzhu/namespace.ts index e9a2989cfc64cae..7993b047e5c68cd 100644 --- a/lib/routes/gzhu/namespace.ts +++ b/lib/routes/gzhu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '广州大学', url: 'yjsy.gzhu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/hackernews/namespace.ts b/lib/routes/hackernews/namespace.ts index fc27645c113ae51..89d38a3bd906698 100644 --- a/lib/routes/hackernews/namespace.ts +++ b/lib/routes/hackernews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Hacker News', url: 'ycombinator.com', + lang: 'en', }; diff --git a/lib/routes/hackertalk/namespace.ts b/lib/routes/hackertalk/namespace.ts index 1e9f836931c1a17..23c607cc98202f6 100644 --- a/lib/routes/hackertalk/namespace.ts +++ b/lib/routes/hackertalk/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'HACKER TALK 黑客说', url: 'hackertalk.net', + lang: 'zh-CN', }; diff --git a/lib/routes/hacking8/namespace.ts b/lib/routes/hacking8/namespace.ts index fed1fe3b40436bb..0052f7446f96ef1 100644 --- a/lib/routes/hacking8/namespace.ts +++ b/lib/routes/hacking8/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Hacking8', url: 'hacking8.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hackmd/namespace.ts b/lib/routes/hackmd/namespace.ts index f463a6b7d77e5c4..8b4a852d4eb6120 100644 --- a/lib/routes/hackmd/namespace.ts +++ b/lib/routes/hackmd/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'HackMD', url: 'hackmd.io', + lang: 'en', }; diff --git a/lib/routes/hackyournews/namespace.ts b/lib/routes/hackyournews/namespace.ts index ea4ca5b058d2bc9..96eb90cfad846af 100644 --- a/lib/routes/hackyournews/namespace.ts +++ b/lib/routes/hackyournews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'HackYourNews', url: 'hackyournews.com', + lang: 'en', }; diff --git a/lib/routes/hafu/namespace.ts b/lib/routes/hafu/namespace.ts index a6e45e1a9be986b..aeb93e55fc0a76c 100644 --- a/lib/routes/hafu/namespace.ts +++ b/lib/routes/hafu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '河南财政金融学院', url: 'www.hafu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/hakkatv/namespace.ts b/lib/routes/hakkatv/namespace.ts index d6e22574776bf80..62db2b024992657 100644 --- a/lib/routes/hakkatv/namespace.ts +++ b/lib/routes/hakkatv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '客家電視台', url: 'hakkatv.org.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/hameln/namespace.ts b/lib/routes/hameln/namespace.ts index b9c3ad1ea1ef8dd..8cce21f5b6da910 100644 --- a/lib/routes/hameln/namespace.ts +++ b/lib/routes/hameln/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'hameln', url: 'syosetu.org', + lang: 'ja', }; diff --git a/lib/routes/harvard/namespace.ts b/lib/routes/harvard/namespace.ts index 7442e99dd60d909..1b114c256701851 100644 --- a/lib/routes/harvard/namespace.ts +++ b/lib/routes/harvard/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Harvard Health Publishing', url: 'www.health.harvard.edu', + lang: 'en', }; diff --git a/lib/routes/hashnode/namespace.ts b/lib/routes/hashnode/namespace.ts index eebedd1f91e170e..160784653f82bb9 100644 --- a/lib/routes/hashnode/namespace.ts +++ b/lib/routes/hashnode/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'hashnode', url: 'hashnode.dev', + lang: 'en', }; diff --git a/lib/routes/hbooker/namespace.ts b/lib/routes/hbooker/namespace.ts index 340a244c6640d8d..eabbe851b4c0b33 100644 --- a/lib/routes/hbooker/namespace.ts +++ b/lib/routes/hbooker/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '欢乐书客', url: 'hbooker.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hbr/namespace.ts b/lib/routes/hbr/namespace.ts index d35faf28954146a..1468821b0e818e9 100644 --- a/lib/routes/hbr/namespace.ts +++ b/lib/routes/hbr/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Harvard Business Review', url: 'hbr.org', + lang: 'en', }; diff --git a/lib/routes/hdu/namespace.ts b/lib/routes/hdu/namespace.ts index 6d7a81aec3f6030..34d03d0b33b219d 100644 --- a/lib/routes/hdu/namespace.ts +++ b/lib/routes/hdu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '杭州电子科技大学', url: 'computer.hdu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/hebtv/namespace.ts b/lib/routes/hebtv/namespace.ts index 28188ddc0e5641e..8423f6d51ef3484 100644 --- a/lib/routes/hebtv/namespace.ts +++ b/lib/routes/hebtv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '河北网络广播电视台', url: 'web.cmc.hebtv.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hellobtc/namespace.ts b/lib/routes/hellobtc/namespace.ts index c6413f393b4f9ad..7c72c511f537cb8 100644 --- a/lib/routes/hellobtc/namespace.ts +++ b/lib/routes/hellobtc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '白话区块链', url: 'hellobtc.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hellogithub/namespace.ts b/lib/routes/hellogithub/namespace.ts index e10d95fd94f1843..398b2d3e63f966d 100644 --- a/lib/routes/hellogithub/namespace.ts +++ b/lib/routes/hellogithub/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'HelloGitHub', url: 'hellogithub.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hex-rays/namespace.ts b/lib/routes/hex-rays/namespace.ts index 7c8e572e5ab6636..575096f73d7052d 100644 --- a/lib/routes/hex-rays/namespace.ts +++ b/lib/routes/hex-rays/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Hex-Rays', url: 'hex-rays.com', + lang: 'en', }; diff --git a/lib/routes/hfut/namespace.ts b/lib/routes/hfut/namespace.ts index 723f877f1de21d1..854e7c4280c9595 100644 --- a/lib/routes/hfut/namespace.ts +++ b/lib/routes/hfut/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '合肥工业大学', url: 'hfut.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/hicairo/namespace.ts b/lib/routes/hicairo/namespace.ts index 412eb637b8f512b..4fb98e14ebaf4cd 100644 --- a/lib/routes/hicairo/namespace.ts +++ b/lib/routes/hicairo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: "HiFeng'Blog", url: 'hicairo.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hinatazaka46/namespace.ts b/lib/routes/hinatazaka46/namespace.ts index 6cb3f555363365d..dfe7f28061efb47 100644 --- a/lib/routes/hinatazaka46/namespace.ts +++ b/lib/routes/hinatazaka46/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Sakamichi Series 坂道系列官网资讯', url: 'hinatazaka46.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hit/namespace.ts b/lib/routes/hit/namespace.ts index e4eae82546d766d..a18971b4870693c 100644 --- a/lib/routes/hit/namespace.ts +++ b/lib/routes/hit/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::warning 哈工大网站疑似禁止了\`rsshub.app\`的访问,使用路由需要自行 [部署](https://docs.rsshub.app/deploy/)。 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/hitcon/namespace.ts b/lib/routes/hitcon/namespace.ts index 3cda88d4c2b9a12..e068a86071ce50b 100644 --- a/lib/routes/hitcon/namespace.ts +++ b/lib/routes/hitcon/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'HITCON', url: 'hitcon.org', + lang: 'zh-CN', }; diff --git a/lib/routes/hitsz/namespace.ts b/lib/routes/hitsz/namespace.ts index 18d76593e1198c8..7dac025c6ccad0e 100644 --- a/lib/routes/hitsz/namespace.ts +++ b/lib/routes/hitsz/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '哈尔滨工业大学(深圳)', url: 'hitsz.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/hitwh/namespace.ts b/lib/routes/hitwh/namespace.ts index bbf082121473ba6..1a9049c3b8b634a 100644 --- a/lib/routes/hitwh/namespace.ts +++ b/lib/routes/hitwh/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '哈尔滨工业大学(威海)', url: 'hitwh.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/hizu/namespace.ts b/lib/routes/hizu/namespace.ts index fd72e76e887b4fa..27dcffa1e41c711 100644 --- a/lib/routes/hizu/namespace.ts +++ b/lib/routes/hizu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '珠海网', url: 'hizh.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/hk01/namespace.ts b/lib/routes/hk01/namespace.ts index 22fa57ef1ebe0cb..63e2ef205f1d31d 100644 --- a/lib/routes/hk01/namespace.ts +++ b/lib/routes/hk01/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '香港 01', url: 'hk01.com', + lang: 'zh-HK', }; diff --git a/lib/routes/hkej/namespace.ts b/lib/routes/hkej/namespace.ts index 2d773b44fc9e8b3..bde05ea0306f3ef 100644 --- a/lib/routes/hkej/namespace.ts +++ b/lib/routes/hkej/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '信报财经新闻', url: 'hkej.com', + lang: 'zh-HK', }; diff --git a/lib/routes/hkepc/namespace.ts b/lib/routes/hkepc/namespace.ts index 9bbd2de097feeba..213680966aed649 100644 --- a/lib/routes/hkepc/namespace.ts +++ b/lib/routes/hkepc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'HKEPC', url: 'hkepc.com', + lang: 'zh-HK', }; diff --git a/lib/routes/hket/namespace.ts b/lib/routes/hket/namespace.ts index a388d521bb3f818..31113b5650b0b7d 100644 --- a/lib/routes/hket/namespace.ts +++ b/lib/routes/hket/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '香港经济日报', url: 'china.hket.com', + lang: 'zh-HK', }; diff --git a/lib/routes/hkjunkcall/namespace.ts b/lib/routes/hkjunkcall/namespace.ts index bd8bad804015f4d..850af22113c18b0 100644 --- a/lib/routes/hkjunkcall/namespace.ts +++ b/lib/routes/hkjunkcall/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'HKJunkCall 資訊中心', url: 'hkjunkcall.com', + lang: 'zh-HK', }; diff --git a/lib/routes/hko/namespace.ts b/lib/routes/hko/namespace.ts index ede87d46949525c..7605322bb30fd05 100644 --- a/lib/routes/hko/namespace.ts +++ b/lib/routes/hko/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'www.hko.gov.hk', categories: ['forecast'], description: '来自香港天文台的全球地震记录', + lang: 'zh-HK', }; diff --git a/lib/routes/hljucm/namespace.ts b/lib/routes/hljucm/namespace.ts index 5c36e5a893a90c3..565a3cafcd02a49 100644 --- a/lib/routes/hljucm/namespace.ts +++ b/lib/routes/hljucm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '黑龙江中医药大学', url: 'yjsy.hljucm.net', + lang: 'zh-CN', }; diff --git a/lib/routes/hnrb/namespace.ts b/lib/routes/hnrb/namespace.ts index 8d0254c6d3dd72d..2cf4e0b2687302d 100644 --- a/lib/routes/hnrb/namespace.ts +++ b/lib/routes/hnrb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '湖南日报', url: 'voc.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/hnu/namespace.ts b/lib/routes/hnu/namespace.ts index 58f399dcab01cca..5220e812ec0a23b 100644 --- a/lib/routes/hnu/namespace.ts +++ b/lib/routes/hnu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '湖南大学', url: 'scc.hnu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/hongkong/namespace.ts b/lib/routes/hongkong/namespace.ts index a7b5a93505c8a7b..ffeacd420ac073f 100644 --- a/lib/routes/hongkong/namespace.ts +++ b/lib/routes/hongkong/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Hong Kong Department of Health 香港卫生署', url: 'dh.gov.hk', + lang: 'zh-HK', }; diff --git a/lib/routes/hostmonit/namespace.ts b/lib/routes/hostmonit/namespace.ts index 091f4f8548513b2..251a42275a81602 100644 --- a/lib/routes/hostmonit/namespace.ts +++ b/lib/routes/hostmonit/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '全球主机监控', url: 'stock.hostmonit.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hottoys/namespace.ts b/lib/routes/hottoys/namespace.ts index 4610b01faf19152..a314fddbce4568d 100644 --- a/lib/routes/hottoys/namespace.ts +++ b/lib/routes/hottoys/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Hot Toys', url: 'www.hottoys.com.hk', + lang: 'zh-HK', }; diff --git a/lib/routes/hotukdeals/namespace.ts b/lib/routes/hotukdeals/namespace.ts index 0503c22e7e57b9e..020ccf02e06f4ee 100644 --- a/lib/routes/hotukdeals/namespace.ts +++ b/lib/routes/hotukdeals/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'hotukdeals', url: 'www.hotukdeals.com', + lang: 'en', }; diff --git a/lib/routes/houxu/namespace.ts b/lib/routes/houxu/namespace.ts index 81921ab0c4512f3..072fc504156af60 100644 --- a/lib/routes/houxu/namespace.ts +++ b/lib/routes/houxu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '后续', url: 'houxu.app', + lang: 'zh-CN', }; diff --git a/lib/routes/howtoforge/namespace.ts b/lib/routes/howtoforge/namespace.ts index b421fe1f4aab3cd..e45d782f9daee96 100644 --- a/lib/routes/howtoforge/namespace.ts +++ b/lib/routes/howtoforge/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Howtoforge Linux Tutorials', url: 'howtoforge.com', + lang: 'en', }; diff --git a/lib/routes/hoyolab/namespace.ts b/lib/routes/hoyolab/namespace.ts index 70d118562f9b9ba..396c0a85ed6dcf1 100644 --- a/lib/routes/hoyolab/namespace.ts +++ b/lib/routes/hoyolab/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'HoYoLAB', url: 'hoyolab.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hpoi/namespace.ts b/lib/routes/hpoi/namespace.ts index def496d5857dc73..029aa6ebc39f2da 100644 --- a/lib/routes/hpoi/namespace.ts +++ b/lib/routes/hpoi/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Hpoi 手办维基', url: 'www.hpoi.net', + lang: 'zh-CN', }; diff --git a/lib/routes/hrbeu/namespace.ts b/lib/routes/hrbeu/namespace.ts index c6ca2928b3d3ff3..d920202e33b0bdb 100644 --- a/lib/routes/hrbeu/namespace.ts +++ b/lib/routes/hrbeu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '哈尔滨工程大学', url: 'yjsy.hrbeu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/hrbust/namespace.ts b/lib/routes/hrbust/namespace.ts index f3c31621f4cfa16..57e11cb5728da08 100644 --- a/lib/routes/hrbust/namespace.ts +++ b/lib/routes/hrbust/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '哈尔滨理工大学', url: 'jwzx.hrbust.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/huanqiu/namespace.ts b/lib/routes/huanqiu/namespace.ts index 22d2e16b7d38db8..6e5465fabeed260 100644 --- a/lib/routes/huanqiu/namespace.ts +++ b/lib/routes/huanqiu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '环球网', url: 'huanqiu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hubu/namespace.ts b/lib/routes/hubu/namespace.ts index 185d6e7298229d4..a900820eef22788 100644 --- a/lib/routes/hubu/namespace.ts +++ b/lib/routes/hubu/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'hubu.edu.cn', categories: ['university'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/huggingface/namespace.ts b/lib/routes/huggingface/namespace.ts index 10db48d63852afc..902e04d0309f11a 100644 --- a/lib/routes/huggingface/namespace.ts +++ b/lib/routes/huggingface/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Huggingface', url: 'huggingface.co', + lang: 'en', }; diff --git a/lib/routes/hunanpea/namespace.ts b/lib/routes/hunanpea/namespace.ts index cb5beeecb4879b4..2be52b905e71723 100644 --- a/lib/routes/hunanpea/namespace.ts +++ b/lib/routes/hunanpea/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '湖南人事考试网', url: 'rsks.hunanpea.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hunau/namespace.ts b/lib/routes/hunau/namespace.ts index 1dae9f578308a18..adf88a400b27526 100644 --- a/lib/routes/hunau/namespace.ts +++ b/lib/routes/hunau/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '湖南农业大学', url: 'gfxy.hunau.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/huoxian/namespace.ts b/lib/routes/huoxian/namespace.ts index 351daf6dcd290bb..103b6fb1e5d7731 100644 --- a/lib/routes/huoxian/namespace.ts +++ b/lib/routes/huoxian/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '火线', url: 'zone.huoxian.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/hupu/namespace.ts b/lib/routes/hupu/namespace.ts index 766d4e2ff0b300b..8455500a9e0b589 100644 --- a/lib/routes/hupu/namespace.ts +++ b/lib/routes/hupu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '虎扑', url: '.hupu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hust/namespace.ts b/lib/routes/hust/namespace.ts index e0a189682703ebc..2d9ffbbaffffc3a 100644 --- a/lib/routes/hust/namespace.ts +++ b/lib/routes/hust/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '华中科技大学', url: 'hust.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/huxiu/namespace.ts b/lib/routes/huxiu/namespace.ts index c9c55006bf8b81a..27bdf507aa7c079 100644 --- a/lib/routes/huxiu/namespace.ts +++ b/lib/routes/huxiu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '虎嗅', url: 'huxiu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/hypergryph/namespace.ts b/lib/routes/hypergryph/namespace.ts index 3f65c6cd4601d7a..dd1c75c26605fad 100644 --- a/lib/routes/hypergryph/namespace.ts +++ b/lib/routes/hypergryph/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '鹰角网络', url: 'www.hypergryph.com', categories: ['game'], + lang: 'zh-CN', }; diff --git a/lib/routes/i-cable/namespace.ts b/lib/routes/i-cable/namespace.ts index 9a0945cbdde5cb4..5971a6092a1a649 100644 --- a/lib/routes/i-cable/namespace.ts +++ b/lib/routes/i-cable/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '有線新聞', url: 'i-cable.com', + lang: 'zh-HK', }; diff --git a/lib/routes/ianspriggs/namespace.ts b/lib/routes/ianspriggs/namespace.ts index 7be23c643f1977d..53f3f0d2443d9d6 100644 --- a/lib/routes/ianspriggs/namespace.ts +++ b/lib/routes/ianspriggs/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Ian Spriggss', url: 'ianspriggs.com', + lang: 'en', }; diff --git a/lib/routes/icac/namespace.ts b/lib/routes/icac/namespace.ts index 7111af69e70a962..4b7fe23eef4cdf4 100644 --- a/lib/routes/icac/namespace.ts +++ b/lib/routes/icac/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Hong Kong Independent Commission Against Corruption 香港廉政公署', url: 'icac.org.hk', + lang: 'zh-HK', }; diff --git a/lib/routes/icbc/namespace.ts b/lib/routes/icbc/namespace.ts index e77c46120c31cdf..60a731f53bf85ff 100644 --- a/lib/routes/icbc/namespace.ts +++ b/lib/routes/icbc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国工商银行', url: 'icbc.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/idaily/namespace.ts b/lib/routes/idaily/namespace.ts index 98d52e35604eb0e..12b76308cbdf160 100644 --- a/lib/routes/idaily/namespace.ts +++ b/lib/routes/idaily/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'iDaily', url: 'idai.ly', + lang: 'zh-CN', }; diff --git a/lib/routes/idolypride/namespace.ts b/lib/routes/idolypride/namespace.ts index fccb01ceb045dd9..42a5d7318f5dc6d 100644 --- a/lib/routes/idolypride/namespace.ts +++ b/lib/routes/idolypride/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'IDOLY PRIDE 偶像荣耀', url: 'idolypride.jp', + lang: 'ja', }; diff --git a/lib/routes/ieee-security/namespace.ts b/lib/routes/ieee-security/namespace.ts index 4c0a0af48a68aa6..751de609c138fdd 100644 --- a/lib/routes/ieee-security/namespace.ts +++ b/lib/routes/ieee-security/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'IEEE Computer Society', url: 'ieee-security.org', + lang: 'en', }; diff --git a/lib/routes/ieee/namespace.ts b/lib/routes/ieee/namespace.ts index 67a0f94020fa0d5..a56a5a87dd3d121 100644 --- a/lib/routes/ieee/namespace.ts +++ b/lib/routes/ieee/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'IEEE Xplore', url: 'www.ieee.org', + lang: 'en', }; diff --git a/lib/routes/iehou/namespace.ts b/lib/routes/iehou/namespace.ts index 75cb601d83e56bb..99cf90351de9975 100644 --- a/lib/routes/iehou/namespace.ts +++ b/lib/routes/iehou/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'iehou.com', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/ielts/namespace.ts b/lib/routes/ielts/namespace.ts index 0036a906915c883..e310c40d6421925 100644 --- a/lib/routes/ielts/namespace.ts +++ b/lib/routes/ielts/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'IELTS 雅思', url: 'ielts.neea.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ifeng/namespace.ts b/lib/routes/ifeng/namespace.ts index eb086ad00c24665..fc92d29eefc725e 100644 --- a/lib/routes/ifeng/namespace.ts +++ b/lib/routes/ifeng/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '凤凰网', url: 'feng.ifeng.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ifi-audio/namespace.ts b/lib/routes/ifi-audio/namespace.ts index 2caf35ab4c79ca4..1287bea5b36e859 100644 --- a/lib/routes/ifi-audio/namespace.ts +++ b/lib/routes/ifi-audio/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'iFi audio', url: 'ifi-audio.com', + lang: 'en', }; diff --git a/lib/routes/iguoguo/namespace.ts b/lib/routes/iguoguo/namespace.ts index b05cd766cc0cba8..7ce4315b001a040 100644 --- a/lib/routes/iguoguo/namespace.ts +++ b/lib/routes/iguoguo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '爱果果', url: 'iguoguo.net', + lang: 'zh-CN', }; diff --git a/lib/routes/iiilab/namespace.ts b/lib/routes/iiilab/namespace.ts index bb0a144557f7270..9b0ce9cbcb84b93 100644 --- a/lib/routes/iiilab/namespace.ts +++ b/lib/routes/iiilab/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '人人都是自媒体', url: 'www.iiilab.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ikea/namespace.ts b/lib/routes/ikea/namespace.ts index 892618439f2582e..c74cff7000c7703 100644 --- a/lib/routes/ikea/namespace.ts +++ b/lib/routes/ikea/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'IKEA', url: 'ikea.com', + lang: 'en', }; diff --git a/lib/routes/imagemagick/namespace.ts b/lib/routes/imagemagick/namespace.ts index 8bbf90ef92bcd28..b1d12133feed808 100644 --- a/lib/routes/imagemagick/namespace.ts +++ b/lib/routes/imagemagick/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ImageMagick', url: 'imagemagick.org', + lang: 'en', }; diff --git a/lib/routes/imdb/namespace.ts b/lib/routes/imdb/namespace.ts index d4912d3469e349e..2e6bc557c7c51fd 100644 --- a/lib/routes/imdb/namespace.ts +++ b/lib/routes/imdb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'IMDb', url: 'www.imdb.com', + lang: 'en', }; diff --git a/lib/routes/imhcg/namespace.ts b/lib/routes/imhcg/namespace.ts index 33726f6760cb5f3..d014fc2877126bd 100644 --- a/lib/routes/imhcg/namespace.ts +++ b/lib/routes/imhcg/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'imhcg的信息站', url: 'infos.imhcg.cn', description: '包含多种技术和新闻信息的网站', + lang: 'zh-CN', }; diff --git a/lib/routes/imiker/namespace.ts b/lib/routes/imiker/namespace.ts index 9a06cdda57de1cb..eeef5eb60edfcb9 100644 --- a/lib/routes/imiker/namespace.ts +++ b/lib/routes/imiker/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '米课', url: 'imiker.com', + lang: 'zh-CN', }; diff --git a/lib/routes/imop/namespace.ts b/lib/routes/imop/namespace.ts index 08d138b4e7a68df..6d47e41d8c9fb71 100644 --- a/lib/routes/imop/namespace.ts +++ b/lib/routes/imop/namespace.ts @@ -7,4 +7,5 @@ export const namespace: Namespace = { zh: { name: '千橡游戏', }, + lang: 'zh-CN', }; diff --git a/lib/routes/indiansinkuwait/namespace.ts b/lib/routes/indiansinkuwait/namespace.ts index 3a6ff536edd5e41..d8a69da61a9450b 100644 --- a/lib/routes/indiansinkuwait/namespace.ts +++ b/lib/routes/indiansinkuwait/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Indians in Kuwait', url: 'indiansinkuwait.com', + lang: 'en', }; diff --git a/lib/routes/indienova/namespace.ts b/lib/routes/indienova/namespace.ts index 583d78486581636..793aa617ed174a3 100644 --- a/lib/routes/indienova/namespace.ts +++ b/lib/routes/indienova/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'indienova 独立游戏', url: 'indienova.com', + lang: 'zh-CN', }; diff --git a/lib/routes/inewsweek/namespace.ts b/lib/routes/inewsweek/namespace.ts index 0ba287079277688..f9d6c76154a6db1 100644 --- a/lib/routes/inewsweek/namespace.ts +++ b/lib/routes/inewsweek/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国新闻周刊', url: 'inewsweek.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/infoq/namespace.ts b/lib/routes/infoq/namespace.ts index 0f48f6db3676e25..b8f4cdca848472a 100644 --- a/lib/routes/infoq/namespace.ts +++ b/lib/routes/infoq/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'InfoQ 中文', url: 'infoq.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/informedainews/namespace.ts b/lib/routes/informedainews/namespace.ts index 0fff54e67ba28ed..a1c8db8600ee009 100644 --- a/lib/routes/informedainews/namespace.ts +++ b/lib/routes/informedainews/namespace.ts @@ -15,4 +15,5 @@ informed AI RSS feeds: zh: { name: '知闻AI', }, + lang: 'en', }; diff --git a/lib/routes/informs/namespace.ts b/lib/routes/informs/namespace.ts index 36ee623edb0feca..ed1d87345471ca7 100644 --- a/lib/routes/informs/namespace.ts +++ b/lib/routes/informs/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'INFORMS', url: 'pubsonline.informs.org', + lang: 'en', }; diff --git a/lib/routes/infzm/namespace.ts b/lib/routes/infzm/namespace.ts new file mode 100644 index 000000000000000..fa93312d53de0dd --- /dev/null +++ b/lib/routes/infzm/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '南方周末', + url: 'www.infzm.com', + lang: 'zh-CN', +}; diff --git a/lib/routes/inoreader/namespace.ts b/lib/routes/inoreader/namespace.ts index 1474f49c4f3ba0c..c14e8fd051488eb 100644 --- a/lib/routes/inoreader/namespace.ts +++ b/lib/routes/inoreader/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Inoreader', url: 'inoreader.com', + lang: 'en', }; diff --git a/lib/routes/inspirehep/namespace.ts b/lib/routes/inspirehep/namespace.ts index 514cf79ce969332..790901c6803a828 100644 --- a/lib/routes/inspirehep/namespace.ts +++ b/lib/routes/inspirehep/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'INSPIRE', url: 'inspirehep.net', categories: ['journal'], + lang: 'en', }; diff --git a/lib/routes/instagram/namespace.ts b/lib/routes/instagram/namespace.ts index fc574ff8e113b20..6391babd6c256ea 100644 --- a/lib/routes/instagram/namespace.ts +++ b/lib/routes/instagram/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip It's highly recommended to deploy with Redis cache enabled. :::`, + lang: 'en', }; diff --git a/lib/routes/instructables/namespace.ts b/lib/routes/instructables/namespace.ts index 09df9711488ccd9..5985eef80988be5 100644 --- a/lib/routes/instructables/namespace.ts +++ b/lib/routes/instructables/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Instructables', url: 'instructables.com', + lang: 'en', }; diff --git a/lib/routes/investor/namespace.ts b/lib/routes/investor/namespace.ts index 288cd7efca34f32..9e7a5a6f8539665 100644 --- a/lib/routes/investor/namespace.ts +++ b/lib/routes/investor/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'investor.org.cn', categories: ['finance'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/iplaysoft/namespace.ts b/lib/routes/iplaysoft/namespace.ts index 5ef84363beab775..fff3ce7e3f613e5 100644 --- a/lib/routes/iplaysoft/namespace.ts +++ b/lib/routes/iplaysoft/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '异次元软件世界', url: 'www.iplaysoft.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ippa/namespace.ts b/lib/routes/ippa/namespace.ts index 7c7ed93f74a2947..2637efe0d494abc 100644 --- a/lib/routes/ippa/namespace.ts +++ b/lib/routes/ippa/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '子方有料', url: 'ippa.top', + lang: 'zh-CN', }; diff --git a/lib/routes/ipsw.dev/namespace.ts b/lib/routes/ipsw.dev/namespace.ts index e6c6cb1ff9b8052..3beb11a3b167476 100644 --- a/lib/routes/ipsw.dev/namespace.ts +++ b/lib/routes/ipsw.dev/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'IPSW.dev', url: 'ipsw.dev', description: 'Download the latest beta firmware for iPhone, iPad, Mac, Apple Vision Pro, and Apple TV. Check the signing status of the beta firmware.', + lang: 'en', }; diff --git a/lib/routes/ipsw/namespace.ts b/lib/routes/ipsw/namespace.ts index 359bd2215b0d323..a8b1b8e3aa11d8a 100644 --- a/lib/routes/ipsw/namespace.ts +++ b/lib/routes/ipsw/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'IPSW.me', url: 'ipsw.me', + lang: 'zh-CN', }; diff --git a/lib/routes/iqilu/namespace.ts b/lib/routes/iqilu/namespace.ts index babfc096531a4fa..dee12f5adcedb33 100644 --- a/lib/routes/iqilu/namespace.ts +++ b/lib/routes/iqilu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '齐鲁网', url: 'v.iqilu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/iqiyi/namespace.ts b/lib/routes/iqiyi/namespace.ts index fa26a56253bef24..760b205de2e9c6a 100644 --- a/lib/routes/iqiyi/namespace.ts +++ b/lib/routes/iqiyi/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '爱奇艺', url: 'iq.com', + lang: 'zh-CN', }; diff --git a/lib/routes/iqnew/namespace.ts b/lib/routes/iqnew/namespace.ts index ebd31ff0e76a86c..14cc5f29232684c 100644 --- a/lib/routes/iqnew/namespace.ts +++ b/lib/routes/iqnew/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '爱 Q 生活网', url: 'iqnew.com', + lang: 'zh-CN', }; diff --git a/lib/routes/iresearch/namespace.ts b/lib/routes/iresearch/namespace.ts index ed04f30c5b2034a..a0fff31f3b333a4 100644 --- a/lib/routes/iresearch/namespace.ts +++ b/lib/routes/iresearch/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '艾瑞', url: 'www.iresearch.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/issuehunt/namespace.ts b/lib/routes/issuehunt/namespace.ts index f4b08b973914bae..192821f693e23fd 100644 --- a/lib/routes/issuehunt/namespace.ts +++ b/lib/routes/issuehunt/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Issue Hunt', url: 'issuehunt.io', + lang: 'en', }; diff --git a/lib/routes/itc/namespace.ts b/lib/routes/itc/namespace.ts index 436bb50fc3dea07..8d5bca57e4939eb 100644 --- a/lib/routes/itc/namespace.ts +++ b/lib/routes/itc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Open Github社区', url: 'open.itc.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/itch/namespace.ts b/lib/routes/itch/namespace.ts index 873b70f78b4963c..919e2564e294905 100644 --- a/lib/routes/itch/namespace.ts +++ b/lib/routes/itch/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'itch.io', url: 'itch.io', + lang: 'en', }; diff --git a/lib/routes/ithome/namespace.ts b/lib/routes/ithome/namespace.ts index eb210c384b358bb..19fbf1ec8fa4f04 100644 --- a/lib/routes/ithome/namespace.ts +++ b/lib/routes/ithome/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'iThome 台灣', url: 'ithome.com', + lang: 'zh-TW', }; diff --git a/lib/routes/iwara/namespace.ts b/lib/routes/iwara/namespace.ts index 5339b9d95e8715f..01aa2f0c3fd2db4 100644 --- a/lib/routes/iwara/namespace.ts +++ b/lib/routes/iwara/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'iwara', url: 'ecchi.iwara.tv', + lang: 'en', }; diff --git a/lib/routes/ixigua/namespace.ts b/lib/routes/ixigua/namespace.ts index 62800120e666204..5a48e1f726cb1e7 100644 --- a/lib/routes/ixigua/namespace.ts +++ b/lib/routes/ixigua/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '西瓜视频', url: 'ixigua.com', + lang: 'zh-CN', }; diff --git a/lib/routes/j-test/namespace.ts b/lib/routes/j-test/namespace.ts index d3cbb3c899543ec..3c36d198c9bb78c 100644 --- a/lib/routes/j-test/namespace.ts +++ b/lib/routes/j-test/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '实用日本语鉴定考试(J.TEST)', url: 'www.j-test.com', + lang: 'ja', }; diff --git a/lib/routes/jandan/namespace.ts b/lib/routes/jandan/namespace.ts index 6767717903de777..6266018917e2c73 100644 --- a/lib/routes/jandan/namespace.ts +++ b/lib/routes/jandan/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '煎蛋', url: 'jandan.net', + lang: 'zh-CN', }; diff --git a/lib/routes/japanpost/namespace.ts b/lib/routes/japanpost/namespace.ts index ae9717afd825427..9b654047f5d9565 100644 --- a/lib/routes/japanpost/namespace.ts +++ b/lib/routes/japanpost/namespace.ts @@ -9,4 +9,5 @@ export const namespace: Namespace = { ja: { name: '日本郵便', }, + lang: 'ja', }; diff --git a/lib/routes/javbus/namespace.ts b/lib/routes/javbus/namespace.ts index 1badfdc7fd67769..468556257e29630 100644 --- a/lib/routes/javbus/namespace.ts +++ b/lib/routes/javbus/namespace.ts @@ -20,4 +20,5 @@ JavBus has multiple backup domains, these routes use default domain \`https://ja **Note**: **Western** has different domain than the main site, the backup domains are also different. The default domain is \`https://javbus.org\` and you can add \`?western_domain=<domain>\` to the end of the route to specify the domain to visit. Let say you want to use the backup domain \`https://javsee.one\`, you can add \`?western_domain=javsee.one\` to the end of the route, then the route will be [\`/javbus/western/en?western_domain=javsee.one\`](https://rsshub.app/javbus/western?western_domain=javsee.one) :::`, + lang: 'en', }; diff --git a/lib/routes/javdb/namespace.ts b/lib/routes/javdb/namespace.ts index 8f3d2325a3c8a97..3c25379b0e551ec 100644 --- a/lib/routes/javdb/namespace.ts +++ b/lib/routes/javdb/namespace.ts @@ -16,4 +16,5 @@ JavDB 有多个备用域名,本路由默认使用永久域名 \`https://javdb. 因为该站有反爬检测,所以不应将此值调整过高 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/javlibrary/namespace.ts b/lib/routes/javlibrary/namespace.ts index a9ec2ee2e2cbe85..02abfb62dae6484 100644 --- a/lib/routes/javlibrary/namespace.ts +++ b/lib/routes/javlibrary/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'JAVLibrary', url: 'javlibrary.com', + lang: 'en', }; diff --git a/lib/routes/javtiful/namespace.ts b/lib/routes/javtiful/namespace.ts index 1bf3f8239062ad4..1d4e4d25fba00a8 100644 --- a/lib/routes/javtiful/namespace.ts +++ b/lib/routes/javtiful/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Javtiful', url: 'javtiful.com', + lang: 'en', }; diff --git a/lib/routes/jd/namespace.ts b/lib/routes/jd/namespace.ts index 9bd813e67704c28..c1a6be51238fba8 100644 --- a/lib/routes/jd/namespace.ts +++ b/lib/routes/jd/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '京东', url: 'item.jd.com', + lang: 'zh-CN', }; diff --git a/lib/routes/jewishmuseum/namespace.ts b/lib/routes/jewishmuseum/namespace.ts index 219e8e016e9d593..0efe1aefb03c1f0 100644 --- a/lib/routes/jewishmuseum/namespace.ts +++ b/lib/routes/jewishmuseum/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: '纽约犹太人博物馆', + name: 'The Jewish Museum', url: 'thejewishmuseum.org', + lang: 'en', }; diff --git a/lib/routes/jianshu/namespace.ts b/lib/routes/jianshu/namespace.ts index 227f6fe83740483..adffa15ffe7d481 100644 --- a/lib/routes/jianshu/namespace.ts +++ b/lib/routes/jianshu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '简书', url: 'www.jianshu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/jiaoliudao/namespace.ts b/lib/routes/jiaoliudao/namespace.ts index 74266cda6aa26c7..a4e28c03ce7c125 100644 --- a/lib/routes/jiaoliudao/namespace.ts +++ b/lib/routes/jiaoliudao/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '交流岛资源网', url: 'jiaoliudao.com', + lang: 'zh-CN', }; diff --git a/lib/routes/jiemian/namespace.ts b/lib/routes/jiemian/namespace.ts index 8e8c3afbb0765ba..0db74534281fa1f 100644 --- a/lib/routes/jiemian/namespace.ts +++ b/lib/routes/jiemian/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '界面新闻', url: 'jiemian.com', + lang: 'zh-CN', }; diff --git a/lib/routes/jike/namespace.ts b/lib/routes/jike/namespace.ts index 2b5542a2cc04258..ee82203acc8120e 100644 --- a/lib/routes/jike/namespace.ts +++ b/lib/routes/jike/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '即刻', url: 'm.okjike.com', + lang: 'zh-CN', }; diff --git a/lib/routes/jin10/namespace.ts b/lib/routes/jin10/namespace.ts index 79e353aa4bb2a37..12a8315c424995c 100644 --- a/lib/routes/jin10/namespace.ts +++ b/lib/routes/jin10/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '金十数据', url: 'jin10.com', + lang: 'zh-CN', }; diff --git a/lib/routes/jingzhengu/namespace.ts b/lib/routes/jingzhengu/namespace.ts index f44e2f59fd4756b..6831d5f9a93e9cf 100644 --- a/lib/routes/jingzhengu/namespace.ts +++ b/lib/routes/jingzhengu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '精真估', url: 'www.jingzhengu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/jinritemai/namespace.ts b/lib/routes/jinritemai/namespace.ts index c1d54011675c1d8..91426b58bb4cb9f 100644 --- a/lib/routes/jinritemai/namespace.ts +++ b/lib/routes/jinritemai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '抖店开放平台', url: 'op.jinritemai.com', + lang: 'zh-CN', }; diff --git a/lib/routes/jinse/namespace.ts b/lib/routes/jinse/namespace.ts index 549bba2c8b2ed7f..ae1b0686377d2a6 100644 --- a/lib/routes/jinse/namespace.ts +++ b/lib/routes/jinse/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '金色财经', url: 'jinse.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/jisilu/namespace.ts b/lib/routes/jisilu/namespace.ts index 4f5c9450bfe42ef..e9fcafcb26404cc 100644 --- a/lib/routes/jisilu/namespace.ts +++ b/lib/routes/jisilu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '集思录', url: 'jisilu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/jiuyangongshe/namespace.ts b/lib/routes/jiuyangongshe/namespace.ts index 22020671a3ae78b..690d4829e4e4b82 100644 --- a/lib/routes/jiuyangongshe/namespace.ts +++ b/lib/routes/jiuyangongshe/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '韭研公社', url: 'www.jiuyangongshe.com', categories: ['finance'], + lang: 'zh-CN', }; diff --git a/lib/routes/jjwxc/namespace.ts b/lib/routes/jjwxc/namespace.ts index 46868a4cb8534d3..dca8c5578fc9eea 100644 --- a/lib/routes/jjwxc/namespace.ts +++ b/lib/routes/jjwxc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '晋江文学城', url: 'jjwxc.net', + lang: 'zh-CN', }; diff --git a/lib/routes/jlu/namespace.ts b/lib/routes/jlu/namespace.ts index 3c8c00fa5a6bb42..5cb5bfdc5e288fa 100644 --- a/lib/routes/jlu/namespace.ts +++ b/lib/routes/jlu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '吉林大学', url: 'jlu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/joins/namespace.ts b/lib/routes/joins/namespace.ts index e47606b1437642f..1e2aeec80d7fc76 100644 --- a/lib/routes/joins/namespace.ts +++ b/lib/routes/joins/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'joins.com', categories: ['traditional-media'], description: '', + lang: 'ko', }; diff --git a/lib/routes/jornada/namespace.ts b/lib/routes/jornada/namespace.ts index b26b021d54c4c2b..faba71ee0d5ab5b 100644 --- a/lib/routes/jornada/namespace.ts +++ b/lib/routes/jornada/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'La Jornada', url: 'jornada.com.mx', + lang: 'es', }; diff --git a/lib/routes/jou/namespace.ts b/lib/routes/jou/namespace.ts index f08df3e23915c0c..d65f8530805af42 100644 --- a/lib/routes/jou/namespace.ts +++ b/lib/routes/jou/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '江苏海洋大学', url: 'www.jou.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/jpxgmn/namespace.ts b/lib/routes/jpxgmn/namespace.ts index a0b9011ec702c4e..ef4d3942b4b5bff 100644 --- a/lib/routes/jpxgmn/namespace.ts +++ b/lib/routes/jpxgmn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '极品性感美女', url: 'www.jpxgmn.com', + lang: 'zh-CN', }; diff --git a/lib/routes/jseea/namespace.ts b/lib/routes/jseea/namespace.ts index 0226a3eb4783bba..93129b017a48c60 100644 --- a/lib/routes/jseea/namespace.ts +++ b/lib/routes/jseea/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Unknown', url: 'jseea.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/jsu/namespace.ts b/lib/routes/jsu/namespace.ts index 4a8c8ebc967f800..b707e5ff1e5ad67 100644 --- a/lib/routes/jsu/namespace.ts +++ b/lib/routes/jsu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '吉首大学', url: 'jsu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/juejin/namespace.ts b/lib/routes/juejin/namespace.ts index 35eac45d8f9715a..a24e9c68ae74ea7 100644 --- a/lib/routes/juejin/namespace.ts +++ b/lib/routes/juejin/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '掘金', url: 'juejin.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/jump/namespace.ts b/lib/routes/jump/namespace.ts index a7ca8ff68eb1828..6c148f2c4bb59dd 100644 --- a/lib/routes/jump/namespace.ts +++ b/lib/routes/jump/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'JUMP', url: 'switch.jumpvg.com', + lang: 'zh-CN', }; diff --git a/lib/routes/junhe/namespace.ts b/lib/routes/junhe/namespace.ts index d4f55988191e91f..56a6e2eba0faa59 100644 --- a/lib/routes/junhe/namespace.ts +++ b/lib/routes/junhe/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'junhe.com', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/kadokawa/namespace.ts b/lib/routes/kadokawa/namespace.ts index 228413266e93f1e..801c821dfa36df4 100644 --- a/lib/routes/kadokawa/namespace.ts +++ b/lib/routes/kadokawa/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'kadokawa.com.tw', categories: ['shopping'], description: 'TAIWAN KADOKAWA', + lang: 'zh-TW', }; diff --git a/lib/routes/kakuyomu/namespace.ts b/lib/routes/kakuyomu/namespace.ts index ec24f74506b5d5c..a9556a7f51f9175 100644 --- a/lib/routes/kakuyomu/namespace.ts +++ b/lib/routes/kakuyomu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'カクヨム', url: 'kakuyomu.jp', + lang: 'ja', }; diff --git a/lib/routes/kamen-rider-official/namespace.ts b/lib/routes/kamen-rider-official/namespace.ts index 0056a34f5a513a1..c8ef8defb04298c 100644 --- a/lib/routes/kamen-rider-official/namespace.ts +++ b/lib/routes/kamen-rider-official/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '仮面ライダ', url: 'kamen-rider-official.com', + lang: 'ja', }; diff --git a/lib/routes/kantarworldpanel/namespace.ts b/lib/routes/kantarworldpanel/namespace.ts index 04926f660f992e7..febed85ce342563 100644 --- a/lib/routes/kantarworldpanel/namespace.ts +++ b/lib/routes/kantarworldpanel/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Kantar Worldpanel', url: 'kantarworldpanel.com', + lang: 'en', }; diff --git a/lib/routes/kanxue/namespace.ts b/lib/routes/kanxue/namespace.ts index a0e4fde11ebdb84..2b27999c446f83f 100644 --- a/lib/routes/kanxue/namespace.ts +++ b/lib/routes/kanxue/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '看雪', url: 'kanxue.com', + lang: 'zh-CN', }; diff --git a/lib/routes/kaopu/namespace.ts b/lib/routes/kaopu/namespace.ts index cfc43a76a335293..ff82086cf56e86c 100644 --- a/lib/routes/kaopu/namespace.ts +++ b/lib/routes/kaopu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '靠谱新闻', url: 'kaopu.news', + lang: 'zh-CN', }; diff --git a/lib/routes/kbs/namespace.ts b/lib/routes/kbs/namespace.ts index 272b89de2e0cd5b..af50551dc9d1c7c 100644 --- a/lib/routes/kbs/namespace.ts +++ b/lib/routes/kbs/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'KBS', url: 'world.kbs.co.kr', + lang: 'ko', }; diff --git a/lib/routes/kcna/namespace.ts b/lib/routes/kcna/namespace.ts index 0483df08256b957..4f12743a3bc6a10 100644 --- a/lib/routes/kcna/namespace.ts +++ b/lib/routes/kcna/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Korean Central News Agency (KCNA) 朝鲜中央通讯社', url: 'www.kcna.kp', + lang: 'ko', }; diff --git a/lib/routes/ke/namespace.ts b/lib/routes/ke/namespace.ts index 263b40f8c599386..5336403639058c1 100644 --- a/lib/routes/ke/namespace.ts +++ b/lib/routes/ke/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '贝壳研究院', url: 'www.research.ke.com', + lang: 'zh-CN', }; diff --git a/lib/routes/keep/namespace.ts b/lib/routes/keep/namespace.ts index cdde3a1c62e593b..e8c82891801ec34 100644 --- a/lib/routes/keep/namespace.ts +++ b/lib/routes/keep/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Keep', url: 'gotokeep.com', + lang: 'zh-CN', }; diff --git a/lib/routes/keepass/namespace.ts b/lib/routes/keepass/namespace.ts index 9b00957e0051480..6bce1502b38aea9 100644 --- a/lib/routes/keepass/namespace.ts +++ b/lib/routes/keepass/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'KeePass', url: 'keepass.info', + lang: 'en', }; diff --git a/lib/routes/kelownacapnews/namespace.ts b/lib/routes/kelownacapnews/namespace.ts index ef2039a96581a9d..d3f3c17c07a1f34 100644 --- a/lib/routes/kelownacapnews/namespace.ts +++ b/lib/routes/kelownacapnews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Kelowna Capital News', url: 'www.kelownacapnews.com', + lang: 'en', }; diff --git a/lib/routes/kemono/namespace.ts b/lib/routes/kemono/namespace.ts index f0b7f6fe85eea93..fd4dd081e1e406a 100644 --- a/lib/routes/kemono/namespace.ts +++ b/lib/routes/kemono/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Kemono', url: 'kemono.su', + lang: 'en', }; diff --git a/lib/routes/kepu/namespace.ts b/lib/routes/kepu/namespace.ts index 7b9c11f1bacd213..99ffb99b3c1383b 100644 --- a/lib/routes/kepu/namespace.ts +++ b/lib/routes/kepu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国科普博览', url: 'live.kepu.net.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/keylol/namespace.ts b/lib/routes/keylol/namespace.ts index 05d8e559f97048c..fb2e33f7ca9c05f 100644 --- a/lib/routes/keylol/namespace.ts +++ b/lib/routes/keylol/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '其乐', url: 'keylol.com', + lang: 'zh-CN', }; diff --git a/lib/routes/kimlaw/namespace.ts b/lib/routes/kimlaw/namespace.ts index e05a6a2631efbd1..0d645f530358808 100644 --- a/lib/routes/kimlaw/namespace.ts +++ b/lib/routes/kimlaw/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The Korea Institute of Marine Law', url: 'kimlaw.or.kr', + lang: 'ko', }; diff --git a/lib/routes/kisskiss/namespace.ts b/lib/routes/kisskiss/namespace.ts index 3da33dccd06f0e4..c745836996df92a 100644 --- a/lib/routes/kisskiss/namespace.ts +++ b/lib/routes/kisskiss/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'KISS', url: 'www.kisskiss.tv', + lang: 'ja', }; diff --git a/lib/routes/konachan/namespace.ts b/lib/routes/konachan/namespace.ts index 8c3dd707699b7dd..772118e013e3f09 100644 --- a/lib/routes/konachan/namespace.ts +++ b/lib/routes/konachan/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Konachan.com Anime Wallpapers', url: 'konachan.com', description: `konachan post`, + lang: 'en', }; diff --git a/lib/routes/konghq/namespace.ts b/lib/routes/konghq/namespace.ts index eaa71c0a55124a6..227dfd37e970764 100644 --- a/lib/routes/konghq/namespace.ts +++ b/lib/routes/konghq/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Kong API 网关平台', url: 'konghq.com', description: `[Kong](https://konghq.com/) 是一家开源的 API 网关服务商,此处收集其官网的最新博客文章。`, + lang: 'zh-CN', }; diff --git a/lib/routes/kpmg/namespace.ts b/lib/routes/kpmg/namespace.ts index 04ff3866e0a9d3f..0846a2f4292ffba 100644 --- a/lib/routes/kpmg/namespace.ts +++ b/lib/routes/kpmg/namespace.ts @@ -7,4 +7,5 @@ export const namespace: Namespace = { zh: { name: '毕马威', }, + lang: 'en', }; diff --git a/lib/routes/ktown4u/namespace.ts b/lib/routes/ktown4u/namespace.ts index 3029dc12bd0b9cb..0fc652bf3ac6ae9 100644 --- a/lib/routes/ktown4u/namespace.ts +++ b/lib/routes/ktown4u/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Ktown4u', url: 'ktown4u.com', + lang: 'en', }; diff --git a/lib/routes/kuaidi100/namespace.ts b/lib/routes/kuaidi100/namespace.ts index 42423fd51ad8253..8a6dd64b0027602 100644 --- a/lib/routes/kuaidi100/namespace.ts +++ b/lib/routes/kuaidi100/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '快递 100', url: 'kuaidi100.com', + lang: 'zh-CN', }; diff --git a/lib/routes/kunchengblog/namespace.ts b/lib/routes/kunchengblog/namespace.ts index 00bebd3cbf93882..c45be5951e13592 100644 --- a/lib/routes/kunchengblog/namespace.ts +++ b/lib/routes/kunchengblog/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Kun Cheng', url: 'kunchengblog.com', + lang: 'zh-CN', }; diff --git a/lib/routes/kurogames/namespace.ts b/lib/routes/kurogames/namespace.ts index 91dfa3b6eab2d6e..e51551a1d27844a 100644 --- a/lib/routes/kurogames/namespace.ts +++ b/lib/routes/kurogames/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '库洛游戏', url: 'www.kurogames.com', categories: ['game'], + lang: 'zh-CN', }; diff --git a/lib/routes/kuwaitlocal/namespace.ts b/lib/routes/kuwaitlocal/namespace.ts index 69dde9d83833976..2a0aa18f5cee89b 100644 --- a/lib/routes/kuwaitlocal/namespace.ts +++ b/lib/routes/kuwaitlocal/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Kuwait Local', url: 'kuwaitlocal.com', + lang: 'en', }; diff --git a/lib/routes/kyodonews/namespace.ts b/lib/routes/kyodonews/namespace.ts index 9bec39d239a76b0..f21ac864c16f152 100644 --- a/lib/routes/kyodonews/namespace.ts +++ b/lib/routes/kyodonews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '共同网', url: 'china.kyodonews.net', + lang: 'zh-CN', }; diff --git a/lib/routes/laimanhua/namespace.ts b/lib/routes/laimanhua/namespace.ts index eb3d9bb86fd99e7..091f7b0f09e0fea 100644 --- a/lib/routes/laimanhua/namespace.ts +++ b/lib/routes/laimanhua/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '来漫画', url: 'www.laimanhua8.com', + lang: 'zh-CN', }; diff --git a/lib/routes/lala/namespace.ts b/lib/routes/lala/namespace.ts index c0e76e0fc6417cb..11ee20d38c514ce 100644 --- a/lib/routes/lala/namespace.ts +++ b/lib/routes/lala/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '荒岛', url: 'lala.im', + lang: 'zh-CN', }; diff --git a/lib/routes/lang/namespace.ts b/lib/routes/lang/namespace.ts index 65f7dc284ac400d..3baa64d930875dc 100644 --- a/lib/routes/lang/namespace.ts +++ b/lib/routes/lang/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '浪 Play 直播', url: 'lang.live', + lang: 'zh-CN', }; diff --git a/lib/routes/lanqiao/namespace.ts b/lib/routes/lanqiao/namespace.ts index 694b2e7a54237c7..5c47818c77079ca 100644 --- a/lib/routes/lanqiao/namespace.ts +++ b/lib/routes/lanqiao/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '蓝桥云课', url: 'lanqiao.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/laohu8/namespace.ts b/lib/routes/laohu8/namespace.ts index 59b4b57070b2290..f8db35ddfec4c6b 100644 --- a/lib/routes/laohu8/namespace.ts +++ b/lib/routes/laohu8/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '老虎社区', url: 'laohu8.com', + lang: 'zh-CN', }; diff --git a/lib/routes/latepost/namespace.ts b/lib/routes/latepost/namespace.ts index ee070520a5b3de9..7c65989cabfa45a 100644 --- a/lib/routes/latepost/namespace.ts +++ b/lib/routes/latepost/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '晚点 LatePost', url: 'latepost.com', + lang: 'zh-CN', }; diff --git a/lib/routes/layoffs/namespace.ts b/lib/routes/layoffs/namespace.ts index 0c9b14b6f29994f..cead1767c0a16c2 100644 --- a/lib/routes/layoffs/namespace.ts +++ b/lib/routes/layoffs/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Layoffs.fyi', url: 'layoffs.fyi', + lang: 'en', }; diff --git a/lib/routes/learnblockchain/namespace.ts b/lib/routes/learnblockchain/namespace.ts index c16857fd9110b8a..8973702ef6cf720 100644 --- a/lib/routes/learnblockchain/namespace.ts +++ b/lib/routes/learnblockchain/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '登链社区', url: 'learnblockchain.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/learnku/namespace.ts b/lib/routes/learnku/namespace.ts index 4540616f9227a50..63776e84a1da459 100644 --- a/lib/routes/learnku/namespace.ts +++ b/lib/routes/learnku/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'LearnKu', url: 'learnku.com', + lang: 'zh-CN', }; diff --git a/lib/routes/leetcode/namespace.ts b/lib/routes/leetcode/namespace.ts index 9e142f8e02e500c..62e58d7addeb39f 100644 --- a/lib/routes/leetcode/namespace.ts +++ b/lib/routes/leetcode/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'LeetCode', url: 'leetcode.com', + lang: 'en', }; diff --git a/lib/routes/leiphone/namespace.ts b/lib/routes/leiphone/namespace.ts index 08f51e0ba38c864..6c29e6325a5076e 100644 --- a/lib/routes/leiphone/namespace.ts +++ b/lib/routes/leiphone/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '雷峰网', url: 'leiphone.com', + lang: 'zh-CN', }; diff --git a/lib/routes/lemmy/namespace.ts b/lib/routes/lemmy/namespace.ts index 828af2c9d77f1ca..8aa1d050a11a0f2 100644 --- a/lib/routes/lemmy/namespace.ts +++ b/lib/routes/lemmy/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Lemmy', url: 'join-lemmy.org', + lang: 'en', }; diff --git a/lib/routes/lfsyd/namespace.ts b/lib/routes/lfsyd/namespace.ts index 4a8080d49119ca1..18c8482cb9e9077 100644 --- a/lib/routes/lfsyd/namespace.ts +++ b/lib/routes/lfsyd/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '旅法师营地', url: 'www.iyingdi.com', + lang: 'zh-CN', }; diff --git a/lib/routes/lianxh/namespace.ts b/lib/routes/lianxh/namespace.ts index d46ddbde43e4c1c..af812ac58b96344 100644 --- a/lib/routes/lianxh/namespace.ts +++ b/lib/routes/lianxh/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '连享会', url: 'www.lianxh.cn', categories: ['programming'], + lang: 'zh-CN', }; diff --git a/lib/routes/lifeweek/namespace.ts b/lib/routes/lifeweek/namespace.ts index f8d4e6ffc911266..9734b4fd9b87756 100644 --- a/lib/routes/lifeweek/namespace.ts +++ b/lib/routes/lifeweek/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '三联生活周刊', url: 'lifeweek.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/lightnovel/namespace.ts b/lib/routes/lightnovel/namespace.ts index 2f924cdd502c63e..2df1b1bd30d854f 100644 --- a/lib/routes/lightnovel/namespace.ts +++ b/lib/routes/lightnovel/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '轻之国度', url: 'lightNovel.us', + lang: 'zh-CN', }; diff --git a/lib/routes/line/namespace.ts b/lib/routes/line/namespace.ts index e19adfea26fdea3..4404dde93f821a8 100644 --- a/lib/routes/line/namespace.ts +++ b/lib/routes/line/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'LINE', url: 'today.line.me', + lang: 'en', }; diff --git a/lib/routes/link3/namespace.ts b/lib/routes/link3/namespace.ts index a76ca89d86323f9..f8f7a39de30d36b 100644 --- a/lib/routes/link3/namespace.ts +++ b/lib/routes/link3/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Link3', url: 'link3.to', + lang: 'en', }; diff --git a/lib/routes/linkedin/namespace.ts b/lib/routes/linkedin/namespace.ts index 4069ccd7cd50a94..ebf43001afd0b79 100644 --- a/lib/routes/linkedin/namespace.ts +++ b/lib/routes/linkedin/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'LinkedIn 领英', + name: 'LinkedIn', url: 'linkedin.com', + lang: 'en', }; diff --git a/lib/routes/linkresearcher/namespace.ts b/lib/routes/linkresearcher/namespace.ts index d779329b599bccb..2fde7fa0853d7a4 100644 --- a/lib/routes/linkresearcher/namespace.ts +++ b/lib/routes/linkresearcher/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Link Research', url: 'linkresearcher', + lang: 'en', }; diff --git a/lib/routes/linovelib/namespace.ts b/lib/routes/linovelib/namespace.ts index 5edd5c38021d51a..c8cd3d11e23b09e 100644 --- a/lib/routes/linovelib/namespace.ts +++ b/lib/routes/linovelib/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '哔哩轻小说', url: 'linovelib.com', + lang: 'zh-CN', }; diff --git a/lib/routes/liquipedia/namespace.ts b/lib/routes/liquipedia/namespace.ts index efb2f3fada3b15a..b5635c0e381767c 100644 --- a/lib/routes/liquipedia/namespace.ts +++ b/lib/routes/liquipedia/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Liquipedia', url: 'liquipedia.net', + lang: 'en', }; diff --git a/lib/routes/literotica/namespace.ts b/lib/routes/literotica/namespace.ts index 4d2f30bfc548fe2..beb3f74b07cd2c2 100644 --- a/lib/routes/literotica/namespace.ts +++ b/lib/routes/literotica/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Literotica', url: 'literotica.com', + lang: 'en', }; diff --git a/lib/routes/liulinblog/namespace.ts b/lib/routes/liulinblog/namespace.ts index 7a707e8d45b119e..0361ef89e34375f 100644 --- a/lib/routes/liulinblog/namespace.ts +++ b/lib/routes/liulinblog/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '木木博客', url: 'liulinblog.com', + lang: 'zh-CN', }; diff --git a/lib/routes/liveuamap/namespace.ts b/lib/routes/liveuamap/namespace.ts index 7a8c467d89a65c3..a145b538acd0cbf 100644 --- a/lib/routes/liveuamap/namespace.ts +++ b/lib/routes/liveuamap/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Live Universal Awareness Map', url: 'liveuamap.com', + lang: 'en', }; diff --git a/lib/routes/lkong/namespace.ts b/lib/routes/lkong/namespace.ts index bbcfaa9dd68f49c..abbee84992fb759 100644 --- a/lib/routes/lkong/namespace.ts +++ b/lib/routes/lkong/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '龙空', url: 'lkong.com', + lang: 'zh-CN', }; diff --git a/lib/routes/lmu/namespace.ts b/lib/routes/lmu/namespace.ts index 08003b0f4b9c082..1e0223d540d44dd 100644 --- a/lib/routes/lmu/namespace.ts +++ b/lib/routes/lmu/namespace.ts @@ -14,4 +14,5 @@ For more information about LMU and their job offerings, visit their official web zh: { name: '慕尼黑大学', }, + lang: 'de', }; diff --git a/lib/routes/lofter/namespace.ts b/lib/routes/lofter/namespace.ts index a3d67187fad42cf..34f3adaab1b4f01 100644 --- a/lib/routes/lofter/namespace.ts +++ b/lib/routes/lofter/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Lofter', url: 'www.lofter.com', + lang: 'zh-CN', }; diff --git a/lib/routes/logclub/namespace.ts b/lib/routes/logclub/namespace.ts index 04bc1e9682e739f..62fb89f539929a7 100644 --- a/lib/routes/logclub/namespace.ts +++ b/lib/routes/logclub/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '罗戈网', url: 'logclub.com', + lang: 'zh-CN', }; diff --git a/lib/routes/logonews/namespace.ts b/lib/routes/logonews/namespace.ts index c526370d146fa05..afbc3ea66c32584 100644 --- a/lib/routes/logonews/namespace.ts +++ b/lib/routes/logonews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'LogoNews 标志情报局', url: 'logonews.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/loltw/namespace.ts b/lib/routes/loltw/namespace.ts index f4e202a5676eabc..6a9b4af92b28c68 100644 --- a/lib/routes/loltw/namespace.ts +++ b/lib/routes/loltw/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '英雄联盟', url: 'lol.garena.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/loongarch/namespace.ts b/lib/routes/loongarch/namespace.ts index 016800db50f5668..88dd9f18382a2c7 100644 --- a/lib/routes/loongarch/namespace.ts +++ b/lib/routes/loongarch/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'LA UOSC社区', url: 'loongarch.org', + lang: 'zh-CN', }; diff --git a/lib/routes/lorientlejour/namespace.ts b/lib/routes/lorientlejour/namespace.ts index f8daeff3999fcb9..64bef17d0072030 100644 --- a/lib/routes/lorientlejour/namespace.ts +++ b/lib/routes/lorientlejour/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: `L'Orient-Le Jour/L'Orient Today`, url: 'lorientlejour.com', description: `RSS feed for the Lebanon-based French-language newspaper L'Orient-Le Jour and its English edition L'Orient Today`, + lang: 'fr', }; diff --git a/lib/routes/lovelive-anime/namespace.ts b/lib/routes/lovelive-anime/namespace.ts index d59afe9c09bcefa..43036eb507b27d2 100644 --- a/lib/routes/lovelive-anime/namespace.ts +++ b/lib/routes/lovelive-anime/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Love Live! Official Website', url: 'www.lovelive-anime.jp', + lang: 'ja', }; diff --git a/lib/routes/lrepacks/namespace.ts b/lib/routes/lrepacks/namespace.ts index 760214504b0474a..c2776640629df1f 100644 --- a/lib/routes/lrepacks/namespace.ts +++ b/lib/routes/lrepacks/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'lrepacks.net', categories: ['program-update'], description: '', + lang: 'ru', }; diff --git a/lib/routes/lsnu/namespace.ts b/lib/routes/lsnu/namespace.ts index b5615d228f70bb8..9ec8ff41b4db90f 100644 --- a/lib/routes/lsnu/namespace.ts +++ b/lib/routes/lsnu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '乐山师范学院', url: 'lsnu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/luma/namespace.ts b/lib/routes/luma/namespace.ts index c861fab33baf8c0..36ce30b89960d36 100644 --- a/lib/routes/luma/namespace.ts +++ b/lib/routes/luma/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'LuMa', url: 'lu.ma', + lang: 'zh-CN', }; diff --git a/lib/routes/luogu/namespace.ts b/lib/routes/luogu/namespace.ts index b5232799bfec886..2c7fbc6e3ae664e 100644 --- a/lib/routes/luogu/namespace.ts +++ b/lib/routes/luogu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '洛谷', url: 'luogu.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/luolei/namespace.ts b/lib/routes/luolei/namespace.ts index 2707ad284169738..376a772d295b084 100644 --- a/lib/routes/luolei/namespace.ts +++ b/lib/routes/luolei/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'luolei.org', categories: ['blog'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/luxiangdong/namespace.ts b/lib/routes/luxiangdong/namespace.ts index 3fe40c9415657a9..dfd397406be3cde 100644 --- a/lib/routes/luxiangdong/namespace.ts +++ b/lib/routes/luxiangdong/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '土猛的员外', url: 'luxiangdong.com', + lang: 'zh-CN', }; diff --git a/lib/routes/lvv2/namespace.ts b/lib/routes/lvv2/namespace.ts index 03a960193f76054..3f79969384f1710 100644 --- a/lib/routes/lvv2/namespace.ts +++ b/lib/routes/lvv2/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'LVV2', url: 'lvv2.com', + lang: 'zh-CN', }; diff --git a/lib/routes/lxixsxa/namespace.ts b/lib/routes/lxixsxa/namespace.ts index 2739f1854232bb2..e02ed8d39c4daf4 100644 --- a/lib/routes/lxixsxa/namespace.ts +++ b/lib/routes/lxixsxa/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'LiSA', url: 'www.sonymusic.co.jp', + lang: 'ja', }; diff --git a/lib/routes/m4/namespace.ts b/lib/routes/m4/namespace.ts index b3de9bdf3dfd0a9..e5810f3a64ac4e6 100644 --- a/lib/routes/m4/namespace.ts +++ b/lib/routes/m4/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '四月网', url: 'news.m4.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/maccms/namespace.ts b/lib/routes/maccms/namespace.ts index ade7d584ed50268..7560e61d6b083f3 100644 --- a/lib/routes/maccms/namespace.ts +++ b/lib/routes/maccms/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { :::tip 该路由适用于各大影视采集站对外提供的统一CMS视频采集接口,API 类似于 \`https://网站域名/api.php/provide/vod\` :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/macfilos/namespace.ts b/lib/routes/macfilos/namespace.ts index 1cecc1c53fde272..763180298d471ce 100644 --- a/lib/routes/macfilos/namespace.ts +++ b/lib/routes/macfilos/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Macfilos', url: 'macfilos.com', + lang: 'en', }; diff --git a/lib/routes/macmenubar/namespace.ts b/lib/routes/macmenubar/namespace.ts index 4c6a16e0aa643a4..ddc5c673e293f02 100644 --- a/lib/routes/macmenubar/namespace.ts +++ b/lib/routes/macmenubar/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MacMenuBar', url: 'macmenubar.com', + lang: 'en', }; diff --git a/lib/routes/macupdate/namespace.ts b/lib/routes/macupdate/namespace.ts index fcaf54d1a87f47d..65a18319dcf2c22 100644 --- a/lib/routes/macupdate/namespace.ts +++ b/lib/routes/macupdate/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MacUpdate', url: 'macupdate.com', + lang: 'en', }; diff --git a/lib/routes/magazinelib/namespace.ts b/lib/routes/magazinelib/namespace.ts index 67c7dab01834368..1c0f77115bf4e17 100644 --- a/lib/routes/magazinelib/namespace.ts +++ b/lib/routes/magazinelib/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MagazineLib', url: 'magazinelib.com', + lang: 'en', }; diff --git a/lib/routes/magnumphotos/namespace.ts b/lib/routes/magnumphotos/namespace.ts index 36e2f12075e8f9d..feb8889e105b057 100644 --- a/lib/routes/magnumphotos/namespace.ts +++ b/lib/routes/magnumphotos/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Magnum Photos', url: 'magnumphotos.com', + lang: 'en', }; diff --git a/lib/routes/mail/namespace.ts b/lib/routes/mail/namespace.ts index ca70bee64dd89b1..26ef26c1f9f1640 100644 --- a/lib/routes/mail/namespace.ts +++ b/lib/routes/mail/namespace.ts @@ -2,4 +2,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Email', + lang: 'en', }; diff --git a/lib/routes/malaysiakini/namespace.ts b/lib/routes/malaysiakini/namespace.ts index 6888106871aff19..bb34d3cae030747 100644 --- a/lib/routes/malaysiakini/namespace.ts +++ b/lib/routes/malaysiakini/namespace.ts @@ -1,11 +1,12 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'Malaysiakini 当今大马', + name: 'Malaysiakini', url: 'malaysiakini.com', description: `Provides an easy-to-use RSS feed for Malaysiakini.com with teaser/full-text fetching. :::warning -A subscription is required for fetching full articles. +A subscription is required for fetching full articles. Please refer to the deployment config for more information. :::`, + lang: 'en', }; diff --git a/lib/routes/mangadex/namespace.ts b/lib/routes/mangadex/namespace.ts index f7d015eb138b3fe..319b70cc815ae4c 100644 --- a/lib/routes/mangadex/namespace.ts +++ b/lib/routes/mangadex/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MangaDex', url: 'mangadex.org', + lang: 'en', }; diff --git a/lib/routes/manhuagui/namespace.ts b/lib/routes/manhuagui/namespace.ts index 07438b7349032c4..39f25af6ba095de 100644 --- a/lib/routes/manhuagui/namespace.ts +++ b/lib/routes/manhuagui/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '看漫画', url: 'www.manhuagui.com', + lang: 'zh-CN', }; diff --git a/lib/routes/manyvids/namespace.ts b/lib/routes/manyvids/namespace.ts index aec6fa113195e62..840485abe77795f 100644 --- a/lib/routes/manyvids/namespace.ts +++ b/lib/routes/manyvids/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'ManyVids', url: 'www.manyvids.com', categories: ['multimedia'], + lang: 'en', }; diff --git a/lib/routes/mastodon/namespace.ts b/lib/routes/mastodon/namespace.ts index 0d8b2473cc18220..e668d5c1774c389 100644 --- a/lib/routes/mastodon/namespace.ts +++ b/lib/routes/mastodon/namespace.ts @@ -11,4 +11,5 @@ Official user RSS: These feed do not include boosts (a.k.a. reblogs). RSSHub provides a feed for user timeline based on the Mastodon API, but to use that, you may need to create application on a Mastodon instance, and configure your RSSHub instance. Check the [Deploy Guide](https://docs.rsshub.app/deploy/config#route-specific-configurations) for route-specific configurations. :::`, + lang: 'en', }; diff --git a/lib/routes/matters/namespace.ts b/lib/routes/matters/namespace.ts index dcc9c9d8dc2e948..dd1b255a940ba36 100644 --- a/lib/routes/matters/namespace.ts +++ b/lib/routes/matters/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Matters', url: 'matters.town', categories: ['new-media'], + lang: 'en', }; diff --git a/lib/routes/mckinsey/namespace.ts b/lib/routes/mckinsey/namespace.ts index 9cf96d5b87e9677..473a92371ba246a 100644 --- a/lib/routes/mckinsey/namespace.ts +++ b/lib/routes/mckinsey/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '麦肯锡', url: 'mckinsey.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/mcmod/namespace.ts b/lib/routes/mcmod/namespace.ts index 28fe6fc259970c3..8f04ea9a95d5879 100644 --- a/lib/routes/mcmod/namespace.ts +++ b/lib/routes/mcmod/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MC百科', url: 'www.mcmod.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/mdpi/namespace.ts b/lib/routes/mdpi/namespace.ts index b4613d20e296cb2..6bcda6c9c067bc2 100644 --- a/lib/routes/mdpi/namespace.ts +++ b/lib/routes/mdpi/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MDPI', url: 'www.mdpi.com', + lang: 'en', }; diff --git a/lib/routes/medieval-china/namespace.ts b/lib/routes/medieval-china/namespace.ts index 4ce5979f7bc83b7..be94d080a0eef77 100644 --- a/lib/routes/medieval-china/namespace.ts +++ b/lib/routes/medieval-china/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国的中古', url: 'medieval-china.club', + lang: 'zh-CN', }; diff --git a/lib/routes/medium/namespace.ts b/lib/routes/medium/namespace.ts index 605e31be98c4f58..68396902c517d95 100644 --- a/lib/routes/medium/namespace.ts +++ b/lib/routes/medium/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Medium', url: 'medium.com', + lang: 'en', }; diff --git a/lib/routes/medsci/namespace.ts b/lib/routes/medsci/namespace.ts index 9340378253970fa..0ec510c7d232945 100644 --- a/lib/routes/medsci/namespace.ts +++ b/lib/routes/medsci/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '梅斯医学 MedSci', url: 'medsci.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/meishichina/namespace.ts b/lib/routes/meishichina/namespace.ts index 27bef1ed5eabea4..d3646cc1df04cd4 100644 --- a/lib/routes/meishichina/namespace.ts +++ b/lib/routes/meishichina/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'meishichina.com', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/meituan/namespace.ts b/lib/routes/meituan/namespace.ts index 26d271cc61936e9..af0fd0b1fb53f5e 100644 --- a/lib/routes/meituan/namespace.ts +++ b/lib/routes/meituan/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '美团', url: 'meituan.com', + lang: 'zh-CN', }; diff --git a/lib/routes/metacritic/namespace.ts b/lib/routes/metacritic/namespace.ts index 839c7172ed3739a..8a5a65c2e8e5365 100644 --- a/lib/routes/metacritic/namespace.ts +++ b/lib/routes/metacritic/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Metacritic', url: 'metacritic.com', + lang: 'en', }; diff --git a/lib/routes/meteor/namespace.ts b/lib/routes/meteor/namespace.ts index b064b1926d524b3..5f6139a7dade5f6 100644 --- a/lib/routes/meteor/namespace.ts +++ b/lib/routes/meteor/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Meteor', url: 'meteor.today', + lang: 'en', }; diff --git a/lib/routes/metmuseum/namespace.ts b/lib/routes/metmuseum/namespace.ts index e2f6675de586e03..d1640165e60de89 100644 --- a/lib/routes/metmuseum/namespace.ts +++ b/lib/routes/metmuseum/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'Unknown', + name: 'The Metropolitan Museum of Art', url: 'www.metmuseum.org', + lang: 'en', }; diff --git a/lib/routes/mi/namespace.ts b/lib/routes/mi/namespace.ts index 237d93440458374..9e55f522b830447 100644 --- a/lib/routes/mi/namespace.ts +++ b/lib/routes/mi/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '小米', url: 'mi.com', + lang: 'zh-CN', }; diff --git a/lib/routes/microsoft/namespace.ts b/lib/routes/microsoft/namespace.ts index 44f7a31b63f5d62..df3f2cedd9f1e04 100644 --- a/lib/routes/microsoft/namespace.ts +++ b/lib/routes/microsoft/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Microsoft', url: 'microsoft.com', + lang: 'en', }; diff --git a/lib/routes/mihoyo/namespace.ts b/lib/routes/mihoyo/namespace.ts index ba70ba4174d5ff8..85d8c58d43f0ebb 100644 --- a/lib/routes/mihoyo/namespace.ts +++ b/lib/routes/mihoyo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '米哈游', url: 'genshin.hoyoverse.com', + lang: 'zh-CN', }; diff --git a/lib/routes/mindmeister/namespace.ts b/lib/routes/mindmeister/namespace.ts index 079a1a78f2da681..032d1dfa9747595 100644 --- a/lib/routes/mindmeister/namespace.ts +++ b/lib/routes/mindmeister/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MindMeister', url: 'mindmeister.com', + lang: 'en', }; diff --git a/lib/routes/minecraft/namespace.ts b/lib/routes/minecraft/namespace.ts index f02a2ec8183c898..b8ff972ba6441fe 100644 --- a/lib/routes/minecraft/namespace.ts +++ b/lib/routes/minecraft/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Minecraft', url: 'minecraft.net', + lang: 'en', }; diff --git a/lib/routes/mingpao/namespace.ts b/lib/routes/mingpao/namespace.ts index ef9de56b0ee5d2b..e76449b73ec7127 100644 --- a/lib/routes/mingpao/namespace.ts +++ b/lib/routes/mingpao/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '明報', url: 'mingpao.com', + lang: 'zh-TW', }; diff --git a/lib/routes/miniflux/namespace.ts b/lib/routes/miniflux/namespace.ts index e3ed1d00b180795..6cddc83dc572e04 100644 --- a/lib/routes/miniflux/namespace.ts +++ b/lib/routes/miniflux/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MiniFlux', url: 'miniflux.app', + lang: 'en', }; diff --git a/lib/routes/mirror/namespace.ts b/lib/routes/mirror/namespace.ts index 017ce9fb876ff06..ac0cdaa0f7ff977 100644 --- a/lib/routes/mirror/namespace.ts +++ b/lib/routes/mirror/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Mirror', url: 'mirror.xyz', + lang: 'en', }; diff --git a/lib/routes/mirrormedia/namespace.ts b/lib/routes/mirrormedia/namespace.ts index b9aa422bbfe7ebd..2fe0e84180c84b7 100644 --- a/lib/routes/mirrormedia/namespace.ts +++ b/lib/routes/mirrormedia/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '鏡週刊 Mirror Media', url: 'mirrormedia.mg', + lang: 'zh-TW', }; diff --git a/lib/routes/missav/namespace.ts b/lib/routes/missav/namespace.ts index a0216d37673d146..0b4c91d950908d0 100644 --- a/lib/routes/missav/namespace.ts +++ b/lib/routes/missav/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MissAV.com', url: 'missav.com', + lang: 'en', }; diff --git a/lib/routes/misskey/namespace.ts b/lib/routes/misskey/namespace.ts index 2851e1f58dbc430..54adaaf18673b40 100644 --- a/lib/routes/misskey/namespace.ts +++ b/lib/routes/misskey/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Misskey', url: 'misskey.io', + lang: 'en', }; diff --git a/lib/routes/misskon/namespace.ts b/lib/routes/misskon/namespace.ts index de6dff0c8f80752..ec718df3ca1aa7e 100644 --- a/lib/routes/misskon/namespace.ts +++ b/lib/routes/misskon/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MissKON', url: 'misskon.com', + lang: 'en', }; diff --git a/lib/routes/mittrchina/namespace.ts b/lib/routes/mittrchina/namespace.ts index de5d9694d96dc10..e3dd40df5e64f0a 100644 --- a/lib/routes/mittrchina/namespace.ts +++ b/lib/routes/mittrchina/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '麻省理工科技评论', url: 'mittrchina.com', + lang: 'zh-CN', }; diff --git a/lib/routes/miui/namespace.ts b/lib/routes/miui/namespace.ts index aafb64e596808d0..2ec1b628f7027e1 100644 --- a/lib/routes/miui/namespace.ts +++ b/lib/routes/miui/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MIUI', url: 'miui.com', + lang: 'zh-CN', }; diff --git a/lib/routes/mixcloud/namespace.ts b/lib/routes/mixcloud/namespace.ts index fc6d82260a20814..025ee5a1edc2de3 100644 --- a/lib/routes/mixcloud/namespace.ts +++ b/lib/routes/mixcloud/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Mixcloud', url: 'www.mixcloud.com', + lang: 'en', }; diff --git a/lib/routes/modb/namespace.ts b/lib/routes/modb/namespace.ts index 1cbe88ce5eb38ec..701e45eeeba59c7 100644 --- a/lib/routes/modb/namespace.ts +++ b/lib/routes/modb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '墨天轮', url: 'modb.pro', + lang: 'zh-CN', }; diff --git a/lib/routes/modelscope/namespace.ts b/lib/routes/modelscope/namespace.ts index 1bd398f851c4c40..0eef487c19a84f5 100644 --- a/lib/routes/modelscope/namespace.ts +++ b/lib/routes/modelscope/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ModelScope 魔搭社区', url: 'modelscope.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/modian/namespace.ts b/lib/routes/modian/namespace.ts index 16e1daa8d319d81..5444049c1409f79 100644 --- a/lib/routes/modian/namespace.ts +++ b/lib/routes/modian/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '摩点', url: 'modian.com', + lang: 'zh-CN', }; diff --git a/lib/routes/modrinth/namespace.ts b/lib/routes/modrinth/namespace.ts index c85ca0d9f961df6..f0c08a5aec8fbab 100644 --- a/lib/routes/modrinth/namespace.ts +++ b/lib/routes/modrinth/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Modrinth', url: 'modrinth.com', + lang: 'en', }; diff --git a/lib/routes/mohw/namespace.ts b/lib/routes/mohw/namespace.ts index 9e456195cfae180..3cc9224b2e2371c 100644 --- a/lib/routes/mohw/namespace.ts +++ b/lib/routes/mohw/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '台灣衛生福利部', url: 'mohw.gov.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/mox/namespace.ts b/lib/routes/mox/namespace.ts index 4d329b35251bf81..b31a8d5d63cb8f0 100644 --- a/lib/routes/mox/namespace.ts +++ b/lib/routes/mox/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Mox.moe', url: 'mox.moe', + lang: 'zh-TW', }; diff --git a/lib/routes/mpaypass/namespace.ts b/lib/routes/mpaypass/namespace.ts index e7112a1bcfb2ed1..947971182d1e458 100644 --- a/lib/routes/mpaypass/namespace.ts +++ b/lib/routes/mpaypass/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '移动支付网', url: 'mpaypass.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/mrdx/namespace.ts b/lib/routes/mrdx/namespace.ts index 7a7e83bf431d376..fd44489e3837371 100644 --- a/lib/routes/mrdx/namespace.ts +++ b/lib/routes/mrdx/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '新华每日电讯', url: 'mrdx.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/mrm/namespace.ts b/lib/routes/mrm/namespace.ts index e3827f11913a49a..d6ac0e021563bb0 100644 --- a/lib/routes/mrm/namespace.ts +++ b/lib/routes/mrm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '华储网', url: 'mrm.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/mvm/namespace.ts b/lib/routes/mvm/namespace.ts index fcbb22cdcab6c09..b1b89c1babaeb8d 100644 --- a/lib/routes/mvm/namespace.ts +++ b/lib/routes/mvm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '管理世界', url: 'mwm.net.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/my-formosa/namespace.ts b/lib/routes/my-formosa/namespace.ts index d1db40b2d0ce661..8cd9c24c6c35968 100644 --- a/lib/routes/my-formosa/namespace.ts +++ b/lib/routes/my-formosa/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '美麗島電子報', url: 'my-formosa.com', + lang: 'zh-TW', }; diff --git a/lib/routes/mydrivers/namespace.ts b/lib/routes/mydrivers/namespace.ts index 1bd863aea584dba..47c4ade4b0ab3a0 100644 --- a/lib/routes/mydrivers/namespace.ts +++ b/lib/routes/mydrivers/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '快科技', url: 'm.mydrivers.com', + lang: 'zh-CN', }; diff --git a/lib/routes/myfans/namespace.ts b/lib/routes/myfans/namespace.ts index 16abda56b53dd72..3e3b5ce62f7d9b3 100644 --- a/lib/routes/myfans/namespace.ts +++ b/lib/routes/myfans/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'myfans', url: 'myfans.jp', + lang: 'ja', }; diff --git a/lib/routes/myfigurecollection/namespace.ts b/lib/routes/myfigurecollection/namespace.ts index 9122016b8b98fb3..6a16a739740cfd2 100644 --- a/lib/routes/myfigurecollection/namespace.ts +++ b/lib/routes/myfigurecollection/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MyFigureCollection', url: 'myfigurecollection.net', + lang: 'en', }; diff --git a/lib/routes/mygopen/namespace.ts b/lib/routes/mygopen/namespace.ts index a88837a4022ecba..9340f203edca921 100644 --- a/lib/routes/mygopen/namespace.ts +++ b/lib/routes/mygopen/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MyGoPen', url: 'mygopen.com', + lang: 'zh-TW', }; diff --git a/lib/routes/mymusicsheet/namespace.ts b/lib/routes/mymusicsheet/namespace.ts index a08efb2df81335a..199f03204ae04cd 100644 --- a/lib/routes/mymusicsheet/namespace.ts +++ b/lib/routes/mymusicsheet/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MyMusicSheet', url: 'mymusicsheet.com', + lang: 'en', }; diff --git a/lib/routes/mysql/namespace.ts b/lib/routes/mysql/namespace.ts index 42e8810c4072aaf..3af572b3bddb37e 100644 --- a/lib/routes/mysql/namespace.ts +++ b/lib/routes/mysql/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'MySQL', url: 'dev.mysql.com', + lang: 'en', }; diff --git a/lib/routes/nasa/namespace.ts b/lib/routes/nasa/namespace.ts index 177418d2fc82aaa..c1f062a2cabd65c 100644 --- a/lib/routes/nasa/namespace.ts +++ b/lib/routes/nasa/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'NASA', url: 'apod.nasa.gov', + lang: 'en', }; diff --git a/lib/routes/natgeo/namespace.ts b/lib/routes/natgeo/namespace.ts index f7ab784082b324b..613b82e745b1aae 100644 --- a/lib/routes/natgeo/namespace.ts +++ b/lib/routes/natgeo/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: '国家地理', + name: 'National Geographic', url: 'nationalgeographic.com', + lang: 'en', }; diff --git a/lib/routes/nationalgeographic/namespace.ts b/lib/routes/nationalgeographic/namespace.ts index 6b8cb85a79b607b..942b46eea30e4ec 100644 --- a/lib/routes/nationalgeographic/namespace.ts +++ b/lib/routes/nationalgeographic/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'National Geographic', url: 'www.nationalgeographic.com', + lang: 'en', }; diff --git a/lib/routes/nature/namespace.ts b/lib/routes/nature/namespace.ts index 1ac08accd3242aa..d392657a82ba0ee 100644 --- a/lib/routes/nature/namespace.ts +++ b/lib/routes/nature/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip You can get all short name of a journal from [https://www.nature.com/siteindex](https://www.nature.com/siteindex) or [Journal List](#nature-journal-journal-list). :::`, + lang: 'en', }; diff --git a/lib/routes/nautil/namespace.ts b/lib/routes/nautil/namespace.ts index 877f9173ca67954..4ef076544118130 100644 --- a/lib/routes/nautil/namespace.ts +++ b/lib/routes/nautil/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Nautilus', url: 'nautil.us', + lang: 'en', }; diff --git a/lib/routes/nbd/namespace.ts b/lib/routes/nbd/namespace.ts index 3856375eca18f84..8032771edd93b1c 100644 --- a/lib/routes/nbd/namespace.ts +++ b/lib/routes/nbd/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '每经网', url: 'nbd.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nber/namespace.ts b/lib/routes/nber/namespace.ts index 92fee974b2fba09..f0d1350fc57e369 100644 --- a/lib/routes/nber/namespace.ts +++ b/lib/routes/nber/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'National Bureau of Economic Research', url: 'nber.org', categories: ['journal'], + lang: 'en', }; diff --git a/lib/routes/ncc-cma/namespace.ts b/lib/routes/ncc-cma/namespace.ts index 66c2eeb4bf8cfba..e7640c6483f3d61 100644 --- a/lib/routes/ncc-cma/namespace.ts +++ b/lib/routes/ncc-cma/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'cmdp.ncc-cma.net', categories: ['forecast'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/ncepu/namespace.ts b/lib/routes/ncepu/namespace.ts index 19f34a79229accb..dab7ccab4698286 100644 --- a/lib/routes/ncepu/namespace.ts +++ b/lib/routes/ncepu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '华北电力大学', url: 'yjsy.ncepu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ncku/namespace.ts b/lib/routes/ncku/namespace.ts index d1112e85b026d63..f1ab851f81bc59a 100644 --- a/lib/routes/ncku/namespace.ts +++ b/lib/routes/ncku/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'National Cheng Kung University', url: 'www.ncku.edu.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/ncpssd/namespace.ts b/lib/routes/ncpssd/namespace.ts index 317113c1830f375..19bf511f9c5cbee 100644 --- a/lib/routes/ncpssd/namespace.ts +++ b/lib/routes/ncpssd/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '国家哲学社会科学文献中心', url: 'ncpssd.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ncu/namespace.ts b/lib/routes/ncu/namespace.ts index b50b43a80e941cc..0d1dc484f9ba729 100644 --- a/lib/routes/ncu/namespace.ts +++ b/lib/routes/ncu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南昌大学', url: 'jwc.ncu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ncwu/namespace.ts b/lib/routes/ncwu/namespace.ts index 97bce4e5d0f62f1..bf1bf0c53010abf 100644 --- a/lib/routes/ncwu/namespace.ts +++ b/lib/routes/ncwu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '华北水利水电大学', url: 'ncwu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ndss-symposium/namespace.ts b/lib/routes/ndss-symposium/namespace.ts index ab01400d65459c7..83f0c197879cc8d 100644 --- a/lib/routes/ndss-symposium/namespace.ts +++ b/lib/routes/ndss-symposium/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Network and Distributed System Security (NDSS) Symposium', url: 'ndss-symposium.org', + lang: 'en', }; diff --git a/lib/routes/neatdownloadmanager/namespace.ts b/lib/routes/neatdownloadmanager/namespace.ts index 0614af9ac05991d..578771d013cc2dc 100644 --- a/lib/routes/neatdownloadmanager/namespace.ts +++ b/lib/routes/neatdownloadmanager/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Neat Download Manager', url: 'neatdownloadmanager.com', + lang: 'en', }; diff --git a/lib/routes/neea/namespace.ts b/lib/routes/neea/namespace.ts index add291ac33b542d..e208712425d73ac 100644 --- a/lib/routes/neea/namespace.ts +++ b/lib/routes/neea/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国教育考试网', url: 'www.neea.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nenu/namespace.ts b/lib/routes/nenu/namespace.ts index ec8774201a1ddad..090c3e05a3d115d 100644 --- a/lib/routes/nenu/namespace.ts +++ b/lib/routes/nenu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '东北师范大学', url: 'sohac.nenu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/netflav/namespace.ts b/lib/routes/netflav/namespace.ts index 6438e6fcf5578ab..7e4073381c282b9 100644 --- a/lib/routes/netflav/namespace.ts +++ b/lib/routes/netflav/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Netflav', url: 'netflav.com', + lang: 'en', }; diff --git a/lib/routes/neu/namespace.ts b/lib/routes/neu/namespace.ts index 20251e59881a8a3..9806092f24465d1 100644 --- a/lib/routes/neu/namespace.ts +++ b/lib/routes/neu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '东北大学', url: 'neunews.neu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/newmuseum/namespace.ts b/lib/routes/newmuseum/namespace.ts index e135dfc83b5b6d9..7d18c04808d87f3 100644 --- a/lib/routes/newmuseum/namespace.ts +++ b/lib/routes/newmuseum/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'New Museum 纽约新美术馆', + name: 'New Museum', url: 'www.newmuseum.org', + lang: 'en', }; diff --git a/lib/routes/newrank/namespace.ts b/lib/routes/newrank/namespace.ts index 5dc50c11d36f9ed..148a7f2764bcdb3 100644 --- a/lib/routes/newrank/namespace.ts +++ b/lib/routes/newrank/namespace.ts @@ -7,4 +7,5 @@ export const namespace: Namespace = { 部署时需要配置 NEWRANK\_COOKIE,具体见部署文档 请勿过高频抓取,新榜疑似对每天调用 token 总次数进行了限制,超限会报错 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/news/namespace.ts b/lib/routes/news/namespace.ts index 95f6fd2bb95335f..35aacd368130898 100644 --- a/lib/routes/news/namespace.ts +++ b/lib/routes/news/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '新华社', url: 'news.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/newsmarket/namespace.ts b/lib/routes/newsmarket/namespace.ts index 62811b182da4bc6..e1b1f673d78220c 100644 --- a/lib/routes/newsmarket/namespace.ts +++ b/lib/routes/newsmarket/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上下游 News&Market', url: 'newsmarket.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/newyorker/namespace.ts b/lib/routes/newyorker/namespace.ts index 2046e8fb5a3f5da..cfb89952048a45a 100644 --- a/lib/routes/newyorker/namespace.ts +++ b/lib/routes/newyorker/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'New Yorker', url: 'newyorker.com', + lang: 'en', }; diff --git a/lib/routes/newzmz/namespace.ts b/lib/routes/newzmz/namespace.ts index 30d940e83986882..dd11466dda72dec 100644 --- a/lib/routes/newzmz/namespace.ts +++ b/lib/routes/newzmz/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'NEW 字幕组', url: 'newzmz.com', + lang: 'zh-CN', }; diff --git a/lib/routes/nextapple/namespace.ts b/lib/routes/nextapple/namespace.ts index e2630f4c91f5351..405ad6b0607e9f5 100644 --- a/lib/routes/nextapple/namespace.ts +++ b/lib/routes/nextapple/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '壹蘋新聞網', url: 'tw.nextapple.com', + lang: 'zh-TW', }; diff --git a/lib/routes/nextjs/namespace.ts b/lib/routes/nextjs/namespace.ts index 8ef9d634b34e90c..24f8453659f4586 100644 --- a/lib/routes/nextjs/namespace.ts +++ b/lib/routes/nextjs/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Next.js', url: 'nextjs.org', + lang: 'en', }; diff --git a/lib/routes/nga/namespace.ts b/lib/routes/nga/namespace.ts index 3f47ca99fa4d865..4aa77cc3595d7c6 100644 --- a/lib/routes/nga/namespace.ts +++ b/lib/routes/nga/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'NGA', url: 'bbs.nga.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ngocn2/namespace.ts b/lib/routes/ngocn2/namespace.ts index 879cb18a94bd5b8..642d3272f1e606b 100644 --- a/lib/routes/ngocn2/namespace.ts +++ b/lib/routes/ngocn2/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'NGOCN', url: 'ngocn2.org', + lang: 'zh-TW', }; diff --git a/lib/routes/nhentai/namespace.ts b/lib/routes/nhentai/namespace.ts index a1cdae14cf06495..8307086ab5f46f2 100644 --- a/lib/routes/nhentai/namespace.ts +++ b/lib/routes/nhentai/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'nhentai', url: 'nhentai.net', categories: ['anime'], + lang: 'en', }; diff --git a/lib/routes/nhk/namespace.ts b/lib/routes/nhk/namespace.ts index d1c485f1a8a9366..f6fac0f194fd4d4 100644 --- a/lib/routes/nhk/namespace.ts +++ b/lib/routes/nhk/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'NHK', url: 'www3.nhk.or.jp', + lang: 'ja', }; diff --git a/lib/routes/niaogebiji/namespace.ts b/lib/routes/niaogebiji/namespace.ts index 3a259c592c6a2f5..c2fddda2b185d92 100644 --- a/lib/routes/niaogebiji/namespace.ts +++ b/lib/routes/niaogebiji/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '鸟哥笔记', url: 'niaogebiji.com', + lang: 'zh-CN', }; diff --git a/lib/routes/nicovideo/namespace.ts b/lib/routes/nicovideo/namespace.ts index 98326adcf680eff..34f247fcc31b06a 100644 --- a/lib/routes/nicovideo/namespace.ts +++ b/lib/routes/nicovideo/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Niconico', url: 'www.nicovideo.jp', categories: ['multimedia'], + lang: 'ja', }; diff --git a/lib/routes/nifd/namespace.ts b/lib/routes/nifd/namespace.ts index ed6a0e8893397a1..df90764e93a5c62 100644 --- a/lib/routes/nifd/namespace.ts +++ b/lib/routes/nifd/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '国家金融与发展实验室', url: 'www.nifd.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nikkei/namespace.ts b/lib/routes/nikkei/namespace.ts index a67b3cba9f170b8..3ff282901d0626f 100644 --- a/lib/routes/nikkei/namespace.ts +++ b/lib/routes/nikkei/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The Nikkei 日本経済新聞', url: 'nikkei.com', + lang: 'ja', }; diff --git a/lib/routes/nintendo/namespace.ts b/lib/routes/nintendo/namespace.ts index 99783728bf0ad4f..592294664592b26 100644 --- a/lib/routes/nintendo/namespace.ts +++ b/lib/routes/nintendo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Nintendo', url: 'nintendo.com', + lang: 'en', }; diff --git a/lib/routes/nippon/namespace.ts b/lib/routes/nippon/namespace.ts index 43e0269f972c26c..fbfdb56682aaa8c 100644 --- a/lib/routes/nippon/namespace.ts +++ b/lib/routes/nippon/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '走进日本', url: 'www.nippon.com', + lang: 'zh-CN', }; diff --git a/lib/routes/njglyy/namespace.ts b/lib/routes/njglyy/namespace.ts index 242cb9f1c1d3d14..5ea5a3cf68ae9e0 100644 --- a/lib/routes/njglyy/namespace.ts +++ b/lib/routes/njglyy/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南京鼓楼医院', url: 'njglyy.com', + lang: 'zh-CN', }; diff --git a/lib/routes/njit/namespace.ts b/lib/routes/njit/namespace.ts index 08f0e64bb7f0043..d1cdfe0ebe9099e 100644 --- a/lib/routes/njit/namespace.ts +++ b/lib/routes/njit/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南京工程学院', url: 'jwc.njit.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/njnu/namespace.ts b/lib/routes/njnu/namespace.ts index 2f4434beacbb75d..a42fcf4f911e076 100644 --- a/lib/routes/njnu/namespace.ts +++ b/lib/routes/njnu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南京师范大学', url: 'ceai.njnu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nju/namespace.ts b/lib/routes/nju/namespace.ts index 187fdd60c797bb0..be6d6ef49d304a3 100644 --- a/lib/routes/nju/namespace.ts +++ b/lib/routes/nju/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南京大学', url: 'admission.nju.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/njucm/namespace.ts b/lib/routes/njucm/namespace.ts index c777e9830d084ff..f6bcaa334546478 100644 --- a/lib/routes/njucm/namespace.ts +++ b/lib/routes/njucm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南京中医药大学', url: 'lib.njucm.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/njuferret/namespace.ts b/lib/routes/njuferret/namespace.ts index b566c2703182671..91e940de52330d2 100644 --- a/lib/routes/njuferret/namespace.ts +++ b/lib/routes/njuferret/namespace.ts @@ -7,4 +7,5 @@ export const namespace: Namespace = { zh: { name: '有点博客', }, + lang: 'zh-CN', }; diff --git a/lib/routes/njupt/namespace.ts b/lib/routes/njupt/namespace.ts index 2316f3939d6195f..02175fda0479dcf 100644 --- a/lib/routes/njupt/namespace.ts +++ b/lib/routes/njupt/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南京邮电大学', url: 'jwc.njupt.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/njust/namespace.ts b/lib/routes/njust/namespace.ts index 39ef6dab434d25c..c0ec205488426eb 100644 --- a/lib/routes/njust/namespace.ts +++ b/lib/routes/njust/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南京理工大学', url: 'jwc.njust.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/njxzc/namespace.ts b/lib/routes/njxzc/namespace.ts index 7d8b373051838da..98e099e9e9b07c3 100644 --- a/lib/routes/njxzc/namespace.ts +++ b/lib/routes/njxzc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南京晓庄学院', url: 'lib.njxzc.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nlc/namespace.ts b/lib/routes/nlc/namespace.ts index 7165ef0e7b0c158..cb3e2e662bc5f4a 100644 --- a/lib/routes/nlc/namespace.ts +++ b/lib/routes/nlc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国国家图书馆', url: 'read.nlc.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nltimes/namespace.ts b/lib/routes/nltimes/namespace.ts index 39a69ecc1170f7c..1fb782e8d9fe6a4 100644 --- a/lib/routes/nltimes/namespace.ts +++ b/lib/routes/nltimes/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'NL Times', url: 'nltimes.nl', + lang: 'en', }; diff --git a/lib/routes/nmc/namespace.ts b/lib/routes/nmc/namespace.ts index 492740c8b067c1f..0b96a0384ef3c85 100644 --- a/lib/routes/nmc/namespace.ts +++ b/lib/routes/nmc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中央气象台', url: 'nmc.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nmtv/namespace.ts b/lib/routes/nmtv/namespace.ts index 097d9fc4cb0038b..be61a9222d9bb40 100644 --- a/lib/routes/nmtv/namespace.ts +++ b/lib/routes/nmtv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '内蒙古广播电视台', url: 'nmtv.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nodejs/namespace.ts b/lib/routes/nodejs/namespace.ts index 8a845ce4708304b..4a5df9be0159e12 100644 --- a/lib/routes/nodejs/namespace.ts +++ b/lib/routes/nodejs/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Node.js', url: 'nodejs.org', + lang: 'en', }; diff --git a/lib/routes/nogizaka46/namespace.ts b/lib/routes/nogizaka46/namespace.ts index c22f9f1c020057c..6ed98591cfe57ff 100644 --- a/lib/routes/nogizaka46/namespace.ts +++ b/lib/routes/nogizaka46/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Sakamichi Series 坂道系列官网资讯', url: 'news.nogizaka46.com', + lang: 'zh-CN', }; diff --git a/lib/routes/nosec/namespace.ts b/lib/routes/nosec/namespace.ts index d00b7bf400a40cb..a057fcb2a5bca6e 100644 --- a/lib/routes/nosec/namespace.ts +++ b/lib/routes/nosec/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'NOSEC 安全讯息平台', url: 'nosec.org', + lang: 'zh-CN', }; diff --git a/lib/routes/notateslaapp/namespace.ts b/lib/routes/notateslaapp/namespace.ts index 383dc416ba48b7c..a45cfe8d7148f00 100644 --- a/lib/routes/notateslaapp/namespace.ts +++ b/lib/routes/notateslaapp/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Not a Tesla App', url: 'notateslaapp.com', + lang: 'en', }; diff --git a/lib/routes/notefolio/namespace.ts b/lib/routes/notefolio/namespace.ts index 4c6d914709f66a8..3568fce38434dae 100644 --- a/lib/routes/notefolio/namespace.ts +++ b/lib/routes/notefolio/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Notefolio', url: 'notefolio.net', + lang: 'en', }; diff --git a/lib/routes/notion/namespace.ts b/lib/routes/notion/namespace.ts index 2910f91ad7956ac..9b7ab25f0594dac 100644 --- a/lib/routes/notion/namespace.ts +++ b/lib/routes/notion/namespace.ts @@ -10,4 +10,5 @@ Need to set up Notion integration, please refer to [Route-specific Configuration :::tip Recommendation It is recommended to use with clipping tools such as Notion Web Clipper. :::`, + lang: 'en', }; diff --git a/lib/routes/now/namespace.ts b/lib/routes/now/namespace.ts index f38a66d6b34615a..001d3fddb1b5e5a 100644 --- a/lib/routes/now/namespace.ts +++ b/lib/routes/now/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Now 新聞', url: 'news.now.com', + lang: 'zh-TW', }; diff --git a/lib/routes/nowcoder/namespace.ts b/lib/routes/nowcoder/namespace.ts index bf41b34e76cc1fd..5c4c15f4c0b2a7b 100644 --- a/lib/routes/nowcoder/namespace.ts +++ b/lib/routes/nowcoder/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '牛客网', url: 'nowcoder.com', + lang: 'zh-CN', }; diff --git a/lib/routes/npm/namespace.ts b/lib/routes/npm/namespace.ts index f4b4fc058890b87..527022cfca70733 100644 --- a/lib/routes/npm/namespace.ts +++ b/lib/routes/npm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'NPM', url: 'npmjs.com', + lang: 'en', }; diff --git a/lib/routes/npr/namespace.ts b/lib/routes/npr/namespace.ts index c996fcb0acd63e0..b4c93afd9d7e760 100644 --- a/lib/routes/npr/namespace.ts +++ b/lib/routes/npr/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'National Public Radio', url: 'npr.org', + lang: 'en', }; diff --git a/lib/routes/ntdm/namespace.ts b/lib/routes/ntdm/namespace.ts index a831c0504055744..3eed8cc96594317 100644 --- a/lib/routes/ntdm/namespace.ts +++ b/lib/routes/ntdm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'NT动漫', url: 'www.ntdm9.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ntdtv/namespace.ts b/lib/routes/ntdtv/namespace.ts index deff9f98c5692cc..01de33319cce143 100644 --- a/lib/routes/ntdtv/namespace.ts +++ b/lib/routes/ntdtv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '新唐人电视台', url: 'www.ntdtv.com', + lang: 'zh-CN', }; diff --git a/lib/routes/nua/namespace.ts b/lib/routes/nua/namespace.ts index cab64c21198e52f..5583cb8cf963049 100644 --- a/lib/routes/nua/namespace.ts +++ b/lib/routes/nua/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Nanjing University of the Arts 南京艺术学院', url: 'index.nua.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nuaa/namespace.ts b/lib/routes/nuaa/namespace.ts index cbdc87595480b25..0026e6d843df798 100644 --- a/lib/routes/nuaa/namespace.ts +++ b/lib/routes/nuaa/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南京航空航天大学', url: 'aao.nuaa.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nudt/namespace.ts b/lib/routes/nudt/namespace.ts index d2743c4bf61df42..2ee0b20153037d6 100644 --- a/lib/routes/nudt/namespace.ts +++ b/lib/routes/nudt/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国人民解放军国防科技大学', url: 'www.nudt.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nuist/namespace.ts b/lib/routes/nuist/namespace.ts index 0b77a2e992d9524..2b697a2c0923a08 100644 --- a/lib/routes/nuist/namespace.ts +++ b/lib/routes/nuist/namespace.ts @@ -16,4 +16,5 @@ export const namespace: Namespace = { [https://rsshub.app/**nuist**/\`bulletin\`](https://rsshub.app/nuist/bulletin) 或 [https://rsshub.app/**nuist**/\`bulletin\`/\`791\`](https://rsshub.app/nuist/bulletin) :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/nwafu/namespace.ts b/lib/routes/nwafu/namespace.ts index 11372b74492cc15..a6d6aa92eb4ca84 100644 --- a/lib/routes/nwafu/namespace.ts +++ b/lib/routes/nwafu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '西北农林科技大学', url: 'nwafu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/nyaa/namespace.ts b/lib/routes/nyaa/namespace.ts index 182aaaeb8b23abe..63308fb51e818a8 100644 --- a/lib/routes/nyaa/namespace.ts +++ b/lib/routes/nyaa/namespace.ts @@ -13,4 +13,5 @@ The 'Nyaa' includes several routes to access different parts of the site: 5. \`/nyaa/sukebei/user/:username?\` - Access an adult content user's profile, e.g., \`/nyaa/sukebei/user/milannews\`. 6. \`/nyaa/sukebei/user/:username/search/:query?\` - Search within a specific user's adult content submissions, e.g., \`/nyaa/sukebei/user/milannews/search/hentai\`. :::`, + lang: 'en', }; diff --git a/lib/routes/nymity/namespace.ts b/lib/routes/nymity/namespace.ts index 801ea0533b23511..050d8ca75580bc6 100644 --- a/lib/routes/nymity/namespace.ts +++ b/lib/routes/nymity/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'nymity', url: 'censorbib.nymity.ch', + lang: 'en', }; diff --git a/lib/routes/nytimes/namespace.ts b/lib/routes/nytimes/namespace.ts index e32a41de18d9edd..78946001e48f74f 100644 --- a/lib/routes/nytimes/namespace.ts +++ b/lib/routes/nytimes/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The New York Times', url: 'nytimes.com', + lang: 'en', }; diff --git a/lib/routes/obsidian/namespace.ts b/lib/routes/obsidian/namespace.ts index 26067fb1e02292b..b9d700b55b6ddb9 100644 --- a/lib/routes/obsidian/namespace.ts +++ b/lib/routes/obsidian/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Obsidian', url: 'obsidian.md', + lang: 'en', }; diff --git a/lib/routes/oceanengine/namespace.ts b/lib/routes/oceanengine/namespace.ts index b19df4d41067c9d..e5c4544a34d8a38 100644 --- a/lib/routes/oceanengine/namespace.ts +++ b/lib/routes/oceanengine/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '巨量算数 - 算数指数', url: 'trendinsight.oceanengine.com', + lang: 'zh-CN', }; diff --git a/lib/routes/oct0pu5/namespace.ts b/lib/routes/oct0pu5/namespace.ts index 88315b59a4759c2..1de3296b7b5df1c 100644 --- a/lib/routes/oct0pu5/namespace.ts +++ b/lib/routes/oct0pu5/namespace.ts @@ -7,4 +7,5 @@ export const namespace: Namespace = { zh: { name: 'Oct0pu5的小破站', }, + lang: 'zh-CN', }; diff --git a/lib/routes/odaily/namespace.ts b/lib/routes/odaily/namespace.ts index e36c8e61fc1b140..8edfd82a23487b0 100644 --- a/lib/routes/odaily/namespace.ts +++ b/lib/routes/odaily/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Odaily 星球日报', url: 'odaily.news', + lang: 'zh-CN', }; diff --git a/lib/routes/oeeee/namespace.ts b/lib/routes/oeeee/namespace.ts index 83351b500ccb8ee..6f906aa119a7247 100644 --- a/lib/routes/oeeee/namespace.ts +++ b/lib/routes/oeeee/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南方都市报', url: 'oeeee.com', + lang: 'zh-CN', }; diff --git a/lib/routes/oilchem/namespace.ts b/lib/routes/oilchem/namespace.ts index 99edb194b6e179f..7dc2a8304f79192 100644 --- a/lib/routes/oilchem/namespace.ts +++ b/lib/routes/oilchem/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '隆众资讯', url: 'oilchem.net', + lang: 'zh-CN', }; diff --git a/lib/routes/olevod/namespace.ts b/lib/routes/olevod/namespace.ts index c0bcbcee5895c08..c159bdeb3760260 100644 --- a/lib/routes/olevod/namespace.ts +++ b/lib/routes/olevod/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '欧乐影院', url: 'olevod.one', + lang: 'zh-CN', }; diff --git a/lib/routes/ollama/namespace.ts b/lib/routes/ollama/namespace.ts index 1e60b826e134739..c6ad0901c805040 100644 --- a/lib/routes/ollama/namespace.ts +++ b/lib/routes/ollama/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Ollama', url: 'ollama.com', + lang: 'en', }; diff --git a/lib/routes/oncc/namespace.ts b/lib/routes/oncc/namespace.ts index 601f972b0c6566a..c25eb35ff71126f 100644 --- a/lib/routes/oncc/namespace.ts +++ b/lib/routes/oncc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '东网', url: 'hk.on.cc', + lang: 'zh-HK', }; diff --git a/lib/routes/onehu/namespace.ts b/lib/routes/onehu/namespace.ts index 04d3cab6681a6c9..6223c46e56fdaa1 100644 --- a/lib/routes/onehu/namespace.ts +++ b/lib/routes/onehu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '我不是盐神', url: 'onehu.xyz', + lang: 'zh-CN', }; diff --git a/lib/routes/onet/namespace.ts b/lib/routes/onet/namespace.ts index 79d7362fa452d93..6cf0a02d5e6887f 100644 --- a/lib/routes/onet/namespace.ts +++ b/lib/routes/onet/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Onet', url: 'wiadomosci.onet.pl', + lang: 'en', }; diff --git a/lib/routes/oo-software/namespace.ts b/lib/routes/oo-software/namespace.ts index 0b5d4bfb83d707a..f6868538482d423 100644 --- a/lib/routes/oo-software/namespace.ts +++ b/lib/routes/oo-software/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'O&O Software', url: 'oo-software.com', + lang: 'en', }; diff --git a/lib/routes/openai/namespace.ts b/lib/routes/openai/namespace.ts index 768232c884ed6f4..633684e88faac77 100644 --- a/lib/routes/openai/namespace.ts +++ b/lib/routes/openai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'OpenAI', url: 'openai.com', + lang: 'en', }; diff --git a/lib/routes/openrice/namespace.ts b/lib/routes/openrice/namespace.ts index f84c62ca7f0f756..b8c3c9a5dd79ba5 100644 --- a/lib/routes/openrice/namespace.ts +++ b/lib/routes/openrice/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'www.openrice.com', categories: ['shopping'], description: '美食網站Openrice相关資訊', + lang: 'zh-HK', }; diff --git a/lib/routes/openwrt/namespace.ts b/lib/routes/openwrt/namespace.ts index d3fb396c4830470..ffef97a87409147 100644 --- a/lib/routes/openwrt/namespace.ts +++ b/lib/routes/openwrt/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'Unknown', + name: 'OpenWrt', url: 'openwrt.org', + lang: 'en', }; diff --git a/lib/routes/orcid/namespace.ts b/lib/routes/orcid/namespace.ts index b425eea7e83dc3d..086e92e50ab206c 100644 --- a/lib/routes/orcid/namespace.ts +++ b/lib/routes/orcid/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ORCID', url: 'orcid.org', + lang: 'en', }; diff --git a/lib/routes/oreno3d/namespace.ts b/lib/routes/oreno3d/namespace.ts index afedd31953c277f..1e4c88417602794 100644 --- a/lib/routes/oreno3d/namespace.ts +++ b/lib/routes/oreno3d/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip You can use some RSS parsing libraries (like \`feedpraser\` in \`Python\`) to receive the video update messages and download them automatically :::`, + lang: 'ja', }; diff --git a/lib/routes/oschina/namespace.ts b/lib/routes/oschina/namespace.ts index c14d84446e2012c..02bc9e6b149d3f3 100644 --- a/lib/routes/oschina/namespace.ts +++ b/lib/routes/oschina/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '开源中国', url: 'oschina.net', + lang: 'zh-CN', }; diff --git a/lib/routes/oshwhub/namespace.ts b/lib/routes/oshwhub/namespace.ts index b03916bfa6a751c..6dfdaeaa2a049c7 100644 --- a/lib/routes/oshwhub/namespace.ts +++ b/lib/routes/oshwhub/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'oshwhub 立创开源硬件平台', url: 'oshwhub.com', + lang: 'zh-CN', }; diff --git a/lib/routes/osu/namespace.ts b/lib/routes/osu/namespace.ts index 0ae63e530dbc050..51b580a3200fc2f 100644 --- a/lib/routes/osu/namespace.ts +++ b/lib/routes/osu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'osu!', url: 'osu.ppy.sh', + lang: 'en', }; diff --git a/lib/routes/otobanana/namespace.ts b/lib/routes/otobanana/namespace.ts index d7fc4fe8d6b2359..ecfa30fc89b3562 100644 --- a/lib/routes/otobanana/namespace.ts +++ b/lib/routes/otobanana/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'OTOBANANA', url: 'otobanana.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ouc/namespace.ts b/lib/routes/ouc/namespace.ts index 4ece75f72239beb..9a77bbbe12664c2 100644 --- a/lib/routes/ouc/namespace.ts +++ b/lib/routes/ouc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国海洋大学', url: 'it.ouc.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/oup/namespace.ts b/lib/routes/oup/namespace.ts index 0be762567e7a425..178e1879261d617 100644 --- a/lib/routes/oup/namespace.ts +++ b/lib/routes/oup/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Oxford University Press', url: 'academic.oup.com', + lang: 'en', }; diff --git a/lib/routes/outagereport/namespace.ts b/lib/routes/outagereport/namespace.ts index 2f29f3a0ce7f280..3303e6a13b1a3d6 100644 --- a/lib/routes/outagereport/namespace.ts +++ b/lib/routes/outagereport/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Outage.Report', url: 'outage.report', + lang: 'en', }; diff --git a/lib/routes/p-articles/namespace.ts b/lib/routes/p-articles/namespace.ts index 6488ca78db358a2..d38ffc66371d540 100644 --- a/lib/routes/p-articles/namespace.ts +++ b/lib/routes/p-articles/namespace.ts @@ -10,4 +10,5 @@ p-articles provides some official RSS feeds: - section: \`https://p-articles.com/section/:section\` - contributors: \`https://p-articles.com/contributors/:author\` :::`, + lang: 'en', }; diff --git a/lib/routes/panewslab/namespace.ts b/lib/routes/panewslab/namespace.ts index c814b552d842849..f9ac02afec6a2c6 100644 --- a/lib/routes/panewslab/namespace.ts +++ b/lib/routes/panewslab/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PANews', url: 'panewslab.com', + lang: 'zh-CN', }; diff --git a/lib/routes/papers/namespace.ts b/lib/routes/papers/namespace.ts index 6a831b4405fb1b2..26ed68e0312fb7d 100644 --- a/lib/routes/papers/namespace.ts +++ b/lib/routes/papers/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'papers.cool', categories: ['journal'], description: '', + lang: 'en', }; diff --git a/lib/routes/paradigm/namespace.ts b/lib/routes/paradigm/namespace.ts index 524d79b45b8e26d..b95b8f171b4cfdb 100644 --- a/lib/routes/paradigm/namespace.ts +++ b/lib/routes/paradigm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Paradigm', url: 'paradigm.xyz', + lang: 'en', }; diff --git a/lib/routes/parliament.uk/namespace.ts b/lib/routes/parliament.uk/namespace.ts index 0480446f06aa4a1..18d9ae467c3459a 100644 --- a/lib/routes/parliament.uk/namespace.ts +++ b/lib/routes/parliament.uk/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'UK Parliament', url: 'parliament.uk', + lang: 'en', }; diff --git a/lib/routes/parliament/namespace.ts b/lib/routes/parliament/namespace.ts index c9835b111b8fc05..a95cddd59619ff9 100644 --- a/lib/routes/parliament/namespace.ts +++ b/lib/routes/parliament/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Thailand Parliament', url: 'parliament.go.th', + lang: 'en', }; diff --git a/lib/routes/patagonia/namespace.ts b/lib/routes/patagonia/namespace.ts index dc1334c7a468529..664d3e0a65d7d25 100644 --- a/lib/routes/patagonia/namespace.ts +++ b/lib/routes/patagonia/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Patagonia', url: 'patagonia.com', + lang: 'en', }; diff --git a/lib/routes/paulgraham/namespace.ts b/lib/routes/paulgraham/namespace.ts index c25c4be92720c2b..714a4a6ebaccb09 100644 --- a/lib/routes/paulgraham/namespace.ts +++ b/lib/routes/paulgraham/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Paul Graham', url: 'paulgraham.com', + lang: 'en', }; diff --git a/lib/routes/pconline/namespace.ts b/lib/routes/pconline/namespace.ts index 3cf27f97673c547..1b9204a66fe299a 100644 --- a/lib/routes/pconline/namespace.ts +++ b/lib/routes/pconline/namespace.ts @@ -7,4 +7,5 @@ export const namespace: Namespace = { :::tip 太平洋科技是专业IT门户网站,为用户和经销商提供IT资讯和行情报价,涉及电脑,手机,数码产品,软件等. :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/penguin-random-house/namespace.ts b/lib/routes/penguin-random-house/namespace.ts index e8f75805d1484d9..361ccacbc2acbb7 100644 --- a/lib/routes/penguin-random-house/namespace.ts +++ b/lib/routes/penguin-random-house/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Penguin Random House', url: 'penguinrandomhouse.com', + lang: 'en', }; diff --git a/lib/routes/people/namespace.ts b/lib/routes/people/namespace.ts index 75641eaf988c246..85ced65fa95c1e8 100644 --- a/lib/routes/people/namespace.ts +++ b/lib/routes/people/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '人民网', url: 'people.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/peopo/namespace.ts b/lib/routes/peopo/namespace.ts index 5bc1f24bfabf821..808425121a52176 100644 --- a/lib/routes/peopo/namespace.ts +++ b/lib/routes/peopo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PeoPo 公民新聞', url: 'peopo.org', + lang: 'zh-TW', }; diff --git a/lib/routes/phoronix/namespace.ts b/lib/routes/phoronix/namespace.ts index 43ea439ab59dc62..374537850971c6d 100644 --- a/lib/routes/phoronix/namespace.ts +++ b/lib/routes/phoronix/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Phoronix', url: 'phoronix.com', + lang: 'en', }; diff --git a/lib/routes/pianyivps/namespace.ts b/lib/routes/pianyivps/namespace.ts index 5145b28a2b8490d..94181323a4060c8 100644 --- a/lib/routes/pianyivps/namespace.ts +++ b/lib/routes/pianyivps/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '便宜VPS网', url: 'pianyivps.com', + lang: 'zh-CN', }; diff --git a/lib/routes/pianyuan/namespace.ts b/lib/routes/pianyuan/namespace.ts index 6bb98737bb2bac6..c893cd15832667b 100644 --- a/lib/routes/pianyuan/namespace.ts +++ b/lib/routes/pianyuan/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '片源网', url: 'pianyuan.org', + lang: 'zh-CN', }; diff --git a/lib/routes/picnob/namespace.ts b/lib/routes/picnob/namespace.ts index d11cbc15f9283e5..4ada4ccd5f940b3 100644 --- a/lib/routes/picnob/namespace.ts +++ b/lib/routes/picnob/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Instagram', url: 'www.instagram.com', + lang: 'en', }; diff --git a/lib/routes/picuki/namespace.ts b/lib/routes/picuki/namespace.ts index d11cbc15f9283e5..4ada4ccd5f940b3 100644 --- a/lib/routes/picuki/namespace.ts +++ b/lib/routes/picuki/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Instagram', url: 'www.instagram.com', + lang: 'en', }; diff --git a/lib/routes/pikabu/namespace.ts b/lib/routes/pikabu/namespace.ts index 6cdfe65fd4f0f96..f34815303000212 100644 --- a/lib/routes/pikabu/namespace.ts +++ b/lib/routes/pikabu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Pikabu', url: 'pikabu.ru', + lang: 'ru', }; diff --git a/lib/routes/pincong/namespace.ts b/lib/routes/pincong/namespace.ts index d87c741de2f68a2..46dcc44e3b8e2a3 100644 --- a/lib/routes/pincong/namespace.ts +++ b/lib/routes/pincong/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '品葱', url: 'pincong.rocks', + lang: 'zh-CN', }; diff --git a/lib/routes/pingwest/namespace.ts b/lib/routes/pingwest/namespace.ts index 9fbdae4e91ef6d4..33834877c6dbc82 100644 --- a/lib/routes/pingwest/namespace.ts +++ b/lib/routes/pingwest/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '品玩', url: 'pingwest.com', + lang: 'zh-CN', }; diff --git a/lib/routes/pixabay/namespace.ts b/lib/routes/pixabay/namespace.ts index cfbd60f5fa8c2f6..8b3d4638e89eade 100644 --- a/lib/routes/pixabay/namespace.ts +++ b/lib/routes/pixabay/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Pixabay', url: 'pixabay.com', + lang: 'en', }; diff --git a/lib/routes/pixiv/namespace.ts b/lib/routes/pixiv/namespace.ts index 130b407d9833032..2d3d0153d2c7b8f 100644 --- a/lib/routes/pixiv/namespace.ts +++ b/lib/routes/pixiv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'pixiv', url: 'www.pixiv.net', + lang: 'ja', }; diff --git a/lib/routes/pixivision/namespace.ts b/lib/routes/pixivision/namespace.ts index 3461490ae96d9b5..208a8b960991032 100644 --- a/lib/routes/pixivision/namespace.ts +++ b/lib/routes/pixivision/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'pixivision', url: 'www.pixivision.net', + lang: 'ja', }; diff --git a/lib/routes/piyao/namespace.ts b/lib/routes/piyao/namespace.ts index 1a308490f16bd5e..3fe2955b4cae06c 100644 --- a/lib/routes/piyao/namespace.ts +++ b/lib/routes/piyao/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国互联网联合辟谣平台', url: 'piyao.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/pkmer/namespace.ts b/lib/routes/pkmer/namespace.ts index 5c46a75fa75d69c..a6c5a53851cc189 100644 --- a/lib/routes/pkmer/namespace.ts +++ b/lib/routes/pkmer/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PKMer', url: 'pkmer.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/pku/namespace.ts b/lib/routes/pku/namespace.ts index f312715891f0fce..2dd941a01f565eb 100644 --- a/lib/routes/pku/namespace.ts +++ b/lib/routes/pku/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京大学', url: 'admission.pku.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/playno1/namespace.ts b/lib/routes/playno1/namespace.ts index f7d64bf8ddde4c8..881561b909fdd12 100644 --- a/lib/routes/playno1/namespace.ts +++ b/lib/routes/playno1/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PLAYNO.1 玩樂達人', url: 'stno1.playno1.com', + lang: 'zh-TW', }; diff --git a/lib/routes/playpcesor/namespace.ts b/lib/routes/playpcesor/namespace.ts index ec98208b9ac318e..b2ee6fa2d7d4e8a 100644 --- a/lib/routes/playpcesor/namespace.ts +++ b/lib/routes/playpcesor/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '电脑玩物', url: 'playpcesor.com', + lang: 'zh-CN', }; diff --git a/lib/routes/plurk/namespace.ts b/lib/routes/plurk/namespace.ts index 85196dbde410c72..b322ad34bf2e824 100644 --- a/lib/routes/plurk/namespace.ts +++ b/lib/routes/plurk/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Plurk', url: 'plurk.com', + lang: 'en', }; diff --git a/lib/routes/pnas/namespace.ts b/lib/routes/pnas/namespace.ts index 350e1d68aa573a5..2478bc863d094dd 100644 --- a/lib/routes/pnas/namespace.ts +++ b/lib/routes/pnas/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Proceedings of The National Academy of Sciences', url: 'pnas.org', + lang: 'en', }; diff --git a/lib/routes/podwise/namespace.ts b/lib/routes/podwise/namespace.ts index 3f93faed6ae6303..50d1eccf829ae0f 100644 --- a/lib/routes/podwise/namespace.ts +++ b/lib/routes/podwise/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { zh: { name: 'Podwise', }, + lang: 'en', }; diff --git a/lib/routes/pornhub/namespace.ts b/lib/routes/pornhub/namespace.ts index a44ea7fb143e6e3..bad0b8dc128dc36 100644 --- a/lib/routes/pornhub/namespace.ts +++ b/lib/routes/pornhub/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PornHub', url: 'pornhub.com', + lang: 'en', }; diff --git a/lib/routes/postman/namespace.ts b/lib/routes/postman/namespace.ts index c35f2c0cb6b57a7..7ac98f75fd21cd6 100644 --- a/lib/routes/postman/namespace.ts +++ b/lib/routes/postman/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Postman', url: 'postman.com', + lang: 'en', }; diff --git a/lib/routes/priconne-redive/namespace.ts b/lib/routes/priconne-redive/namespace.ts index 06e85aafe95a3fe..c4c39ee6383d447 100644 --- a/lib/routes/priconne-redive/namespace.ts +++ b/lib/routes/priconne-redive/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PRINCESS CONNECT! Re Dive プリンセスコネクト!Re Dive', url: 'priconne-redive.jp', + lang: 'ja', }; diff --git a/lib/routes/producthunt/namespace.ts b/lib/routes/producthunt/namespace.ts index 2132b871f11f835..29f5c1bfc979945 100644 --- a/lib/routes/producthunt/namespace.ts +++ b/lib/routes/producthunt/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Product Hunt', url: 'www.producthunt.com', description: `> 官方 Feed 地址为: [https://www.producthunt.com/feed](https://www.producthunt.com/feed)`, + lang: 'en', }; diff --git a/lib/routes/ps/namespace.ts b/lib/routes/ps/namespace.ts index 420fe0c37b57ddb..91fa76573bef714 100644 --- a/lib/routes/ps/namespace.ts +++ b/lib/routes/ps/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PlayStation Store', url: 'www.playstation.com', + lang: 'en', }; diff --git a/lib/routes/psyche/namespace.ts b/lib/routes/psyche/namespace.ts index ece31fee12976c3..18dcc85cdff01da 100644 --- a/lib/routes/psyche/namespace.ts +++ b/lib/routes/psyche/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Psyche', url: 'psyche.co', + lang: 'en', }; diff --git a/lib/routes/pts/namespace.ts b/lib/routes/pts/namespace.ts index df77e836ccf2964..12bc3701f48763f 100644 --- a/lib/routes/pts/namespace.ts +++ b/lib/routes/pts/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '公視新聞網', url: 'news.pts.org.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/pubmed/namespace.ts b/lib/routes/pubmed/namespace.ts index b5d0d6801470993..6475c2b65b89372 100644 --- a/lib/routes/pubmed/namespace.ts +++ b/lib/routes/pubmed/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PubMed', url: 'pubmed.ncbi.nlm.nih.gov', + lang: 'en', }; diff --git a/lib/routes/pubscholar/namespace.ts b/lib/routes/pubscholar/namespace.ts index 3df2e9ef0e6d231..be38778befbcdb9 100644 --- a/lib/routes/pubscholar/namespace.ts +++ b/lib/routes/pubscholar/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'PubScholar 公益学术平台', url: 'pubscholar.cn', categories: ['journal'], + lang: 'zh-CN', }; diff --git a/lib/routes/pumc/namespace.ts b/lib/routes/pumc/namespace.ts index 64ec7ab6d8169a6..53079ed1c22af63 100644 --- a/lib/routes/pumc/namespace.ts +++ b/lib/routes/pumc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京协和医学院', url: 'mdadmission.pumc.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/putty/namespace.ts b/lib/routes/putty/namespace.ts index 6ef5b65a2a01a39..2b9b2cd105d5f76 100644 --- a/lib/routes/putty/namespace.ts +++ b/lib/routes/putty/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PuTTY', url: 'www.chiark.greenend.org.uk', + lang: 'en', }; diff --git a/lib/routes/pwc/namespace.ts b/lib/routes/pwc/namespace.ts index 0d4baf77a5d6430..6f1df12dcc98e80 100644 --- a/lib/routes/pwc/namespace.ts +++ b/lib/routes/pwc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PwC Strategy&', url: 'strategyand.pwc.com', + lang: 'en', }; diff --git a/lib/routes/qbitai/namespace.ts b/lib/routes/qbitai/namespace.ts index b5d49ad0ff5e8a6..fa86a4adba7cdb3 100644 --- a/lib/routes/qbitai/namespace.ts +++ b/lib/routes/qbitai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '量子位', url: 'qbitai.com', + lang: 'zh-CN', }; diff --git a/lib/routes/qbittorrent/namespace.ts b/lib/routes/qbittorrent/namespace.ts index 6d3679e47fbc31d..c80161c763e6358 100644 --- a/lib/routes/qbittorrent/namespace.ts +++ b/lib/routes/qbittorrent/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'qBittorrent', url: 'qbittorrent.org', + lang: 'en', }; diff --git a/lib/routes/qdu/namespace.ts b/lib/routes/qdu/namespace.ts index 23a52f5c24c22f8..b9a2dcf0afb13b7 100644 --- a/lib/routes/qdu/namespace.ts +++ b/lib/routes/qdu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '青岛大学', url: 'jwc.qdu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/qianp/namespace.ts b/lib/routes/qianp/namespace.ts index 74e99f15138738c..3c989ed47c09697 100644 --- a/lib/routes/qianp/namespace.ts +++ b/lib/routes/qianp/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '千篇网', url: 'qianp.com', + lang: 'zh-CN', }; diff --git a/lib/routes/qianzhan/namespace.ts b/lib/routes/qianzhan/namespace.ts index 0002eecbbb5c960..f45a81e778808d8 100644 --- a/lib/routes/qianzhan/namespace.ts +++ b/lib/routes/qianzhan/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '前瞻网', url: 'qianzhan.com', + lang: 'zh-CN', }; diff --git a/lib/routes/qiche365/namespace.ts b/lib/routes/qiche365/namespace.ts index 5809b196c7132d0..33eee78e3ca11a9 100644 --- a/lib/routes/qiche365/namespace.ts +++ b/lib/routes/qiche365/namespace.ts @@ -2,4 +2,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '汽车召回网', url: 'qiche365.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/qidian/namespace.ts b/lib/routes/qidian/namespace.ts index ac775134efaac5e..05bf1b1b56c26e7 100644 --- a/lib/routes/qidian/namespace.ts +++ b/lib/routes/qidian/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '起点', url: 'qidian.com', + lang: 'zh-CN', }; diff --git a/lib/routes/qingting/namespace.ts b/lib/routes/qingting/namespace.ts index c675b79340fdfc1..c5a7da59265cc11 100644 --- a/lib/routes/qingting/namespace.ts +++ b/lib/routes/qingting/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '蜻蜓 FM', url: 'qingting.fm', + lang: 'zh-CN', }; diff --git a/lib/routes/qipamaijia/namespace.ts b/lib/routes/qipamaijia/namespace.ts index 1eee452ef21e7ca..7fd1c4ba7ba0db3 100644 --- a/lib/routes/qipamaijia/namespace.ts +++ b/lib/routes/qipamaijia/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '奇葩买家秀', url: 'qipamaijia.com', + lang: 'zh-CN', }; diff --git a/lib/routes/qiyoujiage/namespace.ts b/lib/routes/qiyoujiage/namespace.ts index bd4ecec1cecdad9..44ea14de6fb9f5b 100644 --- a/lib/routes/qiyoujiage/namespace.ts +++ b/lib/routes/qiyoujiage/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '汽油价格网', url: 'qiyoujiage.com', + lang: 'zh-CN', }; diff --git a/lib/routes/qlu/namespace.ts b/lib/routes/qlu/namespace.ts index cbfc02bba501da1..56e5029bff4a5aa 100644 --- a/lib/routes/qlu/namespace.ts +++ b/lib/routes/qlu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '齐鲁工业大学', url: 'qlu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/qm120/namespace.ts b/lib/routes/qm120/namespace.ts index 0687ba180ca1bad..4edb1a1ecacaad1 100644 --- a/lib/routes/qm120/namespace.ts +++ b/lib/routes/qm120/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '全民健康网', url: 'qm120.com', + lang: 'zh-CN', }; diff --git a/lib/routes/qoo-app/namespace.ts b/lib/routes/qoo-app/namespace.ts index 8cdc14f96716d84..46307c0ab467c3a 100644 --- a/lib/routes/qoo-app/namespace.ts +++ b/lib/routes/qoo-app/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'QooApp', url: 'apps.qoo-app.com', + lang: 'zh-CN', }; diff --git a/lib/routes/qq/namespace.ts b/lib/routes/qq/namespace.ts index 625c9bbbd37ae69..9f4be830407cc73 100644 --- a/lib/routes/qq/namespace.ts +++ b/lib/routes/qq/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'qq.com', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/qq88/namespace.ts b/lib/routes/qq88/namespace.ts index 1f9fc0f1c5920fc..b1eb47302d20f22 100644 --- a/lib/routes/qq88/namespace.ts +++ b/lib/routes/qq88/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '秋爸日字', url: 'qq88.info', + lang: 'zh-CN', }; diff --git a/lib/routes/qqorw/namespace.ts b/lib/routes/qqorw/namespace.ts index c1c35d266713d74..df6e11bbcced1c5 100644 --- a/lib/routes/qqorw/namespace.ts +++ b/lib/routes/qqorw/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '早报网', url: 'qqorw.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/questmobile/namespace.ts b/lib/routes/questmobile/namespace.ts index 5a9cac1bba8bb99..54b3536a138b0f0 100644 --- a/lib/routes/questmobile/namespace.ts +++ b/lib/routes/questmobile/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'QuestMobile', url: 'questmobile.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/questn/namespace.ts b/lib/routes/questn/namespace.ts index db5a05d8241d696..b25383efcf4ce2b 100644 --- a/lib/routes/questn/namespace.ts +++ b/lib/routes/questn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'QuestN', url: 'app.questn.com', + lang: 'zh-CN', }; diff --git a/lib/routes/quicker/namespace.ts b/lib/routes/quicker/namespace.ts index f507523cf9e14cc..8bada9687e0693e 100644 --- a/lib/routes/quicker/namespace.ts +++ b/lib/routes/quicker/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Quicker', url: 'getquicker.net', + lang: 'zh-CN', }; diff --git a/lib/routes/qust/namespace.ts b/lib/routes/qust/namespace.ts index 41d66ab155b20d4..c4228b95b966a91 100644 --- a/lib/routes/qust/namespace.ts +++ b/lib/routes/qust/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '青岛科技大学', url: 'jw.qust.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/qweather/namespace.ts b/lib/routes/qweather/namespace.ts index f2504a208972b3d..4f803c1cbee5550 100644 --- a/lib/routes/qweather/namespace.ts +++ b/lib/routes/qweather/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '和风天气', url: 'qweather.com', + lang: 'zh-CN', }; diff --git a/lib/routes/qztc/namespace.ts b/lib/routes/qztc/namespace.ts index 8fc4b20f2204ace..199c5401dc1e173 100644 --- a/lib/routes/qztc/namespace.ts +++ b/lib/routes/qztc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '泉州师范学院', url: 'www.qztc.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/radio-canada/namespace.ts b/lib/routes/radio-canada/namespace.ts index ac78210e8fe2915..54591d44fc6e77b 100644 --- a/lib/routes/radio-canada/namespace.ts +++ b/lib/routes/radio-canada/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Radio-Canada.ca', url: 'ici.radio-canada.ca', + lang: 'en', }; diff --git a/lib/routes/radio/namespace.ts b/lib/routes/radio/namespace.ts index b8c597698d49cef..f354b8bdbdc64a1 100644 --- a/lib/routes/radio/namespace.ts +++ b/lib/routes/radio/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '云听', url: 'radio.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/rarehistoricalphotos/namespace.ts b/lib/routes/rarehistoricalphotos/namespace.ts index df543e16ace575d..72181bd0ff312eb 100644 --- a/lib/routes/rarehistoricalphotos/namespace.ts +++ b/lib/routes/rarehistoricalphotos/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Rare Historical Photos', url: 'rarehistoricalphotos.com', + lang: 'en', }; diff --git a/lib/routes/rattibha/namespace.ts b/lib/routes/rattibha/namespace.ts index b4537f1f7696d4b..9f0df22a225a490 100644 --- a/lib/routes/rattibha/namespace.ts +++ b/lib/routes/rattibha/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Rattibha', url: 'rattibha.com', + lang: 'en', }; diff --git a/lib/routes/rawkuma/namespace.ts b/lib/routes/rawkuma/namespace.ts index 96518104969bf49..3ef3e8182ac7cf5 100644 --- a/lib/routes/rawkuma/namespace.ts +++ b/lib/routes/rawkuma/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Rawkuma', url: 'rawkuma.com', + lang: 'en', }; diff --git a/lib/routes/raycast/namespace.ts b/lib/routes/raycast/namespace.ts index fdd9fd0a862fc6e..8919e5ff2aebda6 100644 --- a/lib/routes/raycast/namespace.ts +++ b/lib/routes/raycast/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Raycast', url: 'raycast.com', categories: ['program-update'], + lang: 'en', }; diff --git a/lib/routes/react/namespace.ts b/lib/routes/react/namespace.ts index 83a673fa4c7de63..5164acbc3ef3334 100644 --- a/lib/routes/react/namespace.ts +++ b/lib/routes/react/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'React', url: 'react.dev', + lang: 'en', }; diff --git a/lib/routes/reactiflux/namespace.ts b/lib/routes/reactiflux/namespace.ts index 408b8829ca215dd..52eed789380ae27 100644 --- a/lib/routes/reactiflux/namespace.ts +++ b/lib/routes/reactiflux/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Reactiflux', url: 'reactiflux.com', categories: ['programming'], + lang: 'en', }; diff --git a/lib/routes/reactnewsletter/namespace.ts b/lib/routes/reactnewsletter/namespace.ts index 99b9f6beb30dfb6..7b040e171a07ebf 100644 --- a/lib/routes/reactnewsletter/namespace.ts +++ b/lib/routes/reactnewsletter/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ui.dev', url: 'bytes.dev', + lang: 'en', }; diff --git a/lib/routes/readhub/namespace.ts b/lib/routes/readhub/namespace.ts index cfbf4916e450503..3dc60a8959fcb99 100644 --- a/lib/routes/readhub/namespace.ts +++ b/lib/routes/readhub/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Readhub', url: 'readhub.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/readwise/namespace.ts b/lib/routes/readwise/namespace.ts index 09cd41d1446eca4..a41092eb12edffb 100644 --- a/lib/routes/readwise/namespace.ts +++ b/lib/routes/readwise/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Readwise', url: 'readwise.io', + lang: 'en', }; diff --git a/lib/routes/rebase/namespace.ts b/lib/routes/rebase/namespace.ts index bb0991336737330..3798b73d76fde82 100644 --- a/lib/routes/rebase/namespace.ts +++ b/lib/routes/rebase/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Rebase Network', url: 'rebase.network', + lang: 'en', }; diff --git a/lib/routes/remnote/namespace.ts b/lib/routes/remnote/namespace.ts index ee1ff24f470d3bd..1cdbff59d0d9bf4 100644 --- a/lib/routes/remnote/namespace.ts +++ b/lib/routes/remnote/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'RemNote', url: 'remnote.com', + lang: 'en', }; diff --git a/lib/routes/researchgate/namespace.ts b/lib/routes/researchgate/namespace.ts index ed2d0f9274ff274..bde4205243d96ee 100644 --- a/lib/routes/researchgate/namespace.ts +++ b/lib/routes/researchgate/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ResearchGate', url: 'researchgate.net', + lang: 'en', }; diff --git a/lib/routes/resonac/namespace.ts b/lib/routes/resonac/namespace.ts index 8be80f945f49d93..4f8f2582a0c8f76 100644 --- a/lib/routes/resonac/namespace.ts +++ b/lib/routes/resonac/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Resonac', url: 'www.resonac.com', + lang: 'en', }; diff --git a/lib/routes/reuters/namespace.ts b/lib/routes/reuters/namespace.ts index f965159e10e8da3..5cb04e1b46115a5 100644 --- a/lib/routes/reuters/namespace.ts +++ b/lib/routes/reuters/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip You can use \`sophi=true\` query parameter to invoke the **experimental** method, which can, if possible, fetch more articles(between 20 and 100) with \`limit\` given. But some articles from the old method might not be available. :::`, + lang: 'en', }; diff --git a/lib/routes/rfa/namespace.ts b/lib/routes/rfa/namespace.ts index f028b2d738c0a6a..8bc31679a27ad48 100644 --- a/lib/routes/rfa/namespace.ts +++ b/lib/routes/rfa/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Radio Free Asia (RFA) 自由亚洲电台', url: 'rfa.org', + lang: 'en', }; diff --git a/lib/routes/rfi/namespace.ts b/lib/routes/rfi/namespace.ts index b98bdd5b19c646c..26aac54e8056e4f 100644 --- a/lib/routes/rfi/namespace.ts +++ b/lib/routes/rfi/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Radio France Internationale 法国国际广播电台', url: 'rfi.fr', + lang: 'fr', }; diff --git a/lib/routes/right/namespace.ts b/lib/routes/right/namespace.ts index b2f769d5f401f85..2347e5751e38f7c 100644 --- a/lib/routes/right/namespace.ts +++ b/lib/routes/right/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '恩山无线论坛', url: 'right.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/rodong/namespace.ts b/lib/routes/rodong/namespace.ts index 24887a695a4d239..60e50a426203ef2 100644 --- a/lib/routes/rodong/namespace.ts +++ b/lib/routes/rodong/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Rodong Sinmun 劳动新闻', url: 'rodong.rep.kp', + lang: 'ko', }; diff --git a/lib/routes/routledge/namespace.ts b/lib/routes/routledge/namespace.ts index 1a546087197cdc3..6b6a47e9a6cfbe2 100644 --- a/lib/routes/routledge/namespace.ts +++ b/lib/routes/routledge/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Routledge', url: 'routledge.com', + lang: 'en', }; diff --git a/lib/routes/rsc/namespace.ts b/lib/routes/rsc/namespace.ts index e113dcacd738a73..73d35b9e2286242 100644 --- a/lib/routes/rsc/namespace.ts +++ b/lib/routes/rsc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Royal Society of Chemistry', url: 'pubs.rsc.org', + lang: 'en', }; diff --git a/lib/routes/rss3/namespace.ts b/lib/routes/rss3/namespace.ts index 8d8e740eec131d3..382368dddf05d4f 100644 --- a/lib/routes/rss3/namespace.ts +++ b/lib/routes/rss3/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'RSS3', url: 'rss3.io', description: 'The RSS3 Network is the a decentralized network designed to promote the free flow of information on the Open Web .', + lang: 'en', }; diff --git a/lib/routes/rsshub/namespace.ts b/lib/routes/rsshub/namespace.ts index bdd708414a2958a..2cef3ac15d98621 100644 --- a/lib/routes/rsshub/namespace.ts +++ b/lib/routes/rsshub/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'RSSHub', url: 'docs.rsshub.app', + lang: 'en', }; diff --git a/lib/routes/ruancan/namespace.ts b/lib/routes/ruancan/namespace.ts index baf1c61d2b388a7..4f411daa5aada7d 100644 --- a/lib/routes/ruancan/namespace.ts +++ b/lib/routes/ruancan/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '软餐', url: 'ruancan.com', + lang: 'zh-CN', }; diff --git a/lib/routes/ruc/namespace.ts b/lib/routes/ruc/namespace.ts index 71b367d13ac4dca..c7b15e9ca4d84fd 100644 --- a/lib/routes/ruc/namespace.ts +++ b/lib/routes/ruc/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { zh: { name: '中国人民大学', }, + lang: 'zh-CN', }; diff --git a/lib/routes/runtrail/namespace.ts b/lib/routes/runtrail/namespace.ts index 015a9d010303822..e66907fda597925 100644 --- a/lib/routes/runtrail/namespace.ts +++ b/lib/routes/runtrail/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '跑野大爆炸', url: 'runtrail.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/rustcc/namespace.ts b/lib/routes/rustcc/namespace.ts index 61a89cbbc4c8964..a3e789a06ffaf5e 100644 --- a/lib/routes/rustcc/namespace.ts +++ b/lib/routes/rustcc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Rust 语言中文社区', url: 'rustcc.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sakurazaka46/namespace.ts b/lib/routes/sakurazaka46/namespace.ts index aa773a04c31254e..a67805a29291564 100644 --- a/lib/routes/sakurazaka46/namespace.ts +++ b/lib/routes/sakurazaka46/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Sakamichi Series 坂道系列官网资讯', url: 'sakurazaka46.com', + lang: 'zh-CN', }; diff --git a/lib/routes/samd/namespace.ts b/lib/routes/samd/namespace.ts index 5c65df16ae0bc71..f1812c2d669086a 100644 --- a/lib/routes/samd/namespace.ts +++ b/lib/routes/samd/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '深圳市医疗器械行业协会', url: 'www.samd.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/samsung/namespace.ts b/lib/routes/samsung/namespace.ts index e6da53bb293fa50..3fd0bb68b40e13f 100644 --- a/lib/routes/samsung/namespace.ts +++ b/lib/routes/samsung/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Samsung', url: 'research.samsung.com', + lang: 'en', }; diff --git a/lib/routes/sara/namespace.ts b/lib/routes/sara/namespace.ts index 71ef8ba5f0bb25a..bdf15001debb4e9 100644 --- a/lib/routes/sara/namespace.ts +++ b/lib/routes/sara/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海业余无线电协会', url: 'www.sara.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/saraba1st/namespace.ts b/lib/routes/saraba1st/namespace.ts index a975ccee988a745..106c418ed9f6886 100644 --- a/lib/routes/saraba1st/namespace.ts +++ b/lib/routes/saraba1st/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Saraba1st', url: 'bbs.saraba1st.com', + lang: 'zh-CN', }; diff --git a/lib/routes/sass/namespace.ts b/lib/routes/sass/namespace.ts index 9e100f2c5e46c78..3aff89aedbc3840 100644 --- a/lib/routes/sass/namespace.ts +++ b/lib/routes/sass/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海社会科学院', url: 'gs.sass.org.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/scau/namespace.ts b/lib/routes/scau/namespace.ts index 568a6280536dd96..b1e632d8fb3b820 100644 --- a/lib/routes/scau/namespace.ts +++ b/lib/routes/scau/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '华南农业大学', url: 'yzb.scau.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/science/namespace.ts b/lib/routes/science/namespace.ts index f648fcebf179ce3..52a2ff2a01c3056 100644 --- a/lib/routes/science/namespace.ts +++ b/lib/routes/science/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Science Magazine', url: 'science.org', + lang: 'en', }; diff --git a/lib/routes/sciencedirect/namespace.ts b/lib/routes/sciencedirect/namespace.ts index 9bc71f8052a4e9e..6208eff8123831c 100644 --- a/lib/routes/sciencedirect/namespace.ts +++ b/lib/routes/sciencedirect/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ScienceDirect', url: 'sciencedirect.com', + lang: 'en', }; diff --git a/lib/routes/sciencenet/namespace.ts b/lib/routes/sciencenet/namespace.ts index 2c785b6be153613..85286ea12f52754 100644 --- a/lib/routes/sciencenet/namespace.ts +++ b/lib/routes/sciencenet/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '科学网', url: 'blog.sciencenet.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/scmp/namespace.ts b/lib/routes/scmp/namespace.ts index be4d0f4add9c334..b3d7c1d98522fc1 100644 --- a/lib/routes/scmp/namespace.ts +++ b/lib/routes/scmp/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Corona Virus Disease 2019', url: 'scmp.com', + lang: 'en', }; diff --git a/lib/routes/scnu/namespace.ts b/lib/routes/scnu/namespace.ts index d6cbfa5fbe587f6..80b218b0bf3b186 100644 --- a/lib/routes/scnu/namespace.ts +++ b/lib/routes/scnu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '华南师范大学', url: 'cs.scnu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sctv/namespace.ts b/lib/routes/sctv/namespace.ts index 52e9a6ec556ceae..75121d6ec557443 100644 --- a/lib/routes/sctv/namespace.ts +++ b/lib/routes/sctv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '四川广播电视台', url: 'sctv.com', + lang: 'zh-CN', }; diff --git a/lib/routes/scut/namespace.ts b/lib/routes/scut/namespace.ts index 1c22a98583119dc..487b751df12f2cf 100644 --- a/lib/routes/scut/namespace.ts +++ b/lib/routes/scut/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '华南理工大学', url: 'jw.scut.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/scvtc/namespace.ts b/lib/routes/scvtc/namespace.ts index b9deea444372769..7643fee8dfc84cf 100644 --- a/lib/routes/scvtc/namespace.ts +++ b/lib/routes/scvtc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '四川职业技术学院', url: 'scvtc.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sdu/namespace.ts b/lib/routes/sdu/namespace.ts index a4a3ee33d81f7ea..46f6e326350553a 100644 --- a/lib/routes/sdu/namespace.ts +++ b/lib/routes/sdu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '山东大学', url: 'www.sdu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sdust/namespace.ts b/lib/routes/sdust/namespace.ts index 69786c300d7e7ac..1d33a6faf28ef49 100644 --- a/lib/routes/sdust/namespace.ts +++ b/lib/routes/sdust/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '山东科技大学', url: 'sdust.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sdzk/namespace.ts b/lib/routes/sdzk/namespace.ts index 4711c53fc00788c..d05cfee80e7ec6c 100644 --- a/lib/routes/sdzk/namespace.ts +++ b/lib/routes/sdzk/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '山东省教育招生考试院', url: 'sdzk.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sec-in/namespace.ts b/lib/routes/sec-in/namespace.ts index 20ed716787406e6..baf2cb5a8070b8e 100644 --- a/lib/routes/sec-in/namespace.ts +++ b/lib/routes/sec-in/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'SecIN 信息安全技术社区', url: 'sec-in.com', + lang: 'zh-CN', }; diff --git a/lib/routes/sec-wiki/namespace.ts b/lib/routes/sec-wiki/namespace.ts index cc30205e358eab8..13485217273ca5f 100644 --- a/lib/routes/sec-wiki/namespace.ts +++ b/lib/routes/sec-wiki/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'SecWiki - 安全维基', url: 'www.sec-wiki.com', + lang: 'zh-CN', }; diff --git a/lib/routes/secrss/namespace.ts b/lib/routes/secrss/namespace.ts index 11123c82b0b1c9c..2b709c18d3320f2 100644 --- a/lib/routes/secrss/namespace.ts +++ b/lib/routes/secrss/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '安全内参', url: 'secrss.com', + lang: 'zh-CN', }; diff --git a/lib/routes/seekingalpha/namespace.ts b/lib/routes/seekingalpha/namespace.ts index 4eb4528e66abbc3..e81abe1ba652f83 100644 --- a/lib/routes/seekingalpha/namespace.ts +++ b/lib/routes/seekingalpha/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Seeking Alpha', url: 'seekingalpha.com', + lang: 'en', }; diff --git a/lib/routes/sega/namespace.ts b/lib/routes/sega/namespace.ts index 794d05bdb7b298e..890b67ee02e3e46 100644 --- a/lib/routes/sega/namespace.ts +++ b/lib/routes/sega/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'SEGA', url: 'pjsekai.sega.jp', + lang: 'ja', }; diff --git a/lib/routes/segmentfault/namespace.ts b/lib/routes/segmentfault/namespace.ts index a022f72428cc188..192e5099c63051d 100644 --- a/lib/routes/segmentfault/namespace.ts +++ b/lib/routes/segmentfault/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'SegmentFault', url: 'segmentfault.com', + lang: 'zh-CN', }; diff --git a/lib/routes/sehuatang/namespace.ts b/lib/routes/sehuatang/namespace.ts index 6327b48f437ffb9..eb61ac0a576a63a 100644 --- a/lib/routes/sehuatang/namespace.ts +++ b/lib/routes/sehuatang/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '色花堂', url: 'sehuatang.net', + lang: 'zh-CN', }; diff --git a/lib/routes/sensortower/namespace.ts b/lib/routes/sensortower/namespace.ts index 2b7507c438ac03d..f0b2a7a82fec534 100644 --- a/lib/routes/sensortower/namespace.ts +++ b/lib/routes/sensortower/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Sensor Tower', url: 'sensortower.com', + lang: 'en', }; diff --git a/lib/routes/setn/namespace.ts b/lib/routes/setn/namespace.ts index 711efdae2fa78e0..a4f6a1857de3fda 100644 --- a/lib/routes/setn/namespace.ts +++ b/lib/routes/setn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '三立新聞網', url: 'setn.com', + lang: 'zh-TW', }; diff --git a/lib/routes/seu/namespace.ts b/lib/routes/seu/namespace.ts index 5b7d535da2eee75..34a77ae8b2b22ca 100644 --- a/lib/routes/seu/namespace.ts +++ b/lib/routes/seu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '东南大学', url: 'cse.seu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sfacg/namespace.ts b/lib/routes/sfacg/namespace.ts index 348f9d63edd53f0..7e6cad11a0831fe 100644 --- a/lib/routes/sfacg/namespace.ts +++ b/lib/routes/sfacg/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'SF 轻小说', url: 'book.sfacg.com', + lang: 'zh-CN', }; diff --git a/lib/routes/shcstheatre/namespace.ts b/lib/routes/shcstheatre/namespace.ts index f5fd55e8cb273fa..e2289847f5327e3 100644 --- a/lib/routes/shcstheatre/namespace.ts +++ b/lib/routes/shcstheatre/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海文化广场', url: 'www.shcstheatre.com', + lang: 'zh-CN', }; diff --git a/lib/routes/shiep/namespace.ts b/lib/routes/shiep/namespace.ts index d7acb5335477527..aedd29146505dcf 100644 --- a/lib/routes/shiep/namespace.ts +++ b/lib/routes/shiep/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海电力大学', url: 'bwc.shiep.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/shisu/namespace.ts b/lib/routes/shisu/namespace.ts index 5301f9b5cd15826..67b47080e240e50 100644 --- a/lib/routes/shisu/namespace.ts +++ b/lib/routes/shisu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海外国语大学', url: 'shisu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/shmeea/namespace.ts b/lib/routes/shmeea/namespace.ts index c3bc5507072377b..7c68c30501ceb08 100644 --- a/lib/routes/shmeea/namespace.ts +++ b/lib/routes/shmeea/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '上海市教育考试院', url: 'www.shmeea.edu.cn', description: `官方网址:[https://www.shmeea.edu.cn](https://www.shmeea.edu.cn)`, + lang: 'zh-CN', }; diff --git a/lib/routes/shmtu/namespace.ts b/lib/routes/shmtu/namespace.ts index 664e2b931d6d6a7..8474099c0d9cf3e 100644 --- a/lib/routes/shmtu/namespace.ts +++ b/lib/routes/shmtu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海海事大学', url: 'jwc.shmtu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/shoac/namespace.ts b/lib/routes/shoac/namespace.ts index a0b4cc8c06f4ef3..311311758027f89 100644 --- a/lib/routes/shoac/namespace.ts +++ b/lib/routes/shoac/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海东方艺术中心', url: 'shoac.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/shopback/namespace.ts b/lib/routes/shopback/namespace.ts index ab77fd201121363..fade71929cf95f4 100644 --- a/lib/routes/shopback/namespace.ts +++ b/lib/routes/shopback/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ShopBack', url: 'shopback.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/shopify/namespace.ts b/lib/routes/shopify/namespace.ts index 6d971caef4a9b33..d73886b69382409 100644 --- a/lib/routes/shopify/namespace.ts +++ b/lib/routes/shopify/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Shopify', url: 'shopify.com', + lang: 'en', }; diff --git a/lib/routes/shoppingdesign/namespace.ts b/lib/routes/shoppingdesign/namespace.ts index 02e790135486f5f..dd620146a22b8e3 100644 --- a/lib/routes/shoppingdesign/namespace.ts +++ b/lib/routes/shoppingdesign/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Shopping Design', url: 'www.shoppingdesign.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/showstart/namespace.ts b/lib/routes/showstart/namespace.ts index d267d925b4683b3..f91e20372c376d4 100644 --- a/lib/routes/showstart/namespace.ts +++ b/lib/routes/showstart/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '秀动网', url: 'www.showstart.com', + lang: 'zh-CN', }; diff --git a/lib/routes/shu/namespace.ts b/lib/routes/shu/namespace.ts index 46b8e5f50a49b71..2422221655cd7e9 100644 --- a/lib/routes/shu/namespace.ts +++ b/lib/routes/shu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海大学', url: 'jwb.shu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/shuiguopai/namespace.ts b/lib/routes/shuiguopai/namespace.ts index c6bedb1456192e6..04c343f0601070c 100644 --- a/lib/routes/shuiguopai/namespace.ts +++ b/lib/routes/shuiguopai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '水果派', url: 'shuiguopai.com', + lang: 'zh-CN', }; diff --git a/lib/routes/sicau/namespace.ts b/lib/routes/sicau/namespace.ts index 6a4a1790046c8d9..df3561850f824da 100644 --- a/lib/routes/sicau/namespace.ts +++ b/lib/routes/sicau/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '四川农业大学', url: 'www.sicau.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sigsac/namespace.ts b/lib/routes/sigsac/namespace.ts index 3adbea9e4d8f9ac..679607883b20d8a 100644 --- a/lib/routes/sigsac/namespace.ts +++ b/lib/routes/sigsac/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ACM Special Interest Group on Security Audit and Control', url: 'sigsac.org', + lang: 'en', }; diff --git a/lib/routes/simpleinfo/namespace.ts b/lib/routes/simpleinfo/namespace.ts index aebbcb29a9919a5..3a4ebae54134ee7 100644 --- a/lib/routes/simpleinfo/namespace.ts +++ b/lib/routes/simpleinfo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '簡訊設計', url: 'blog.simpleinfo.cc', + lang: 'zh-TW', }; diff --git a/lib/routes/sina/namespace.ts b/lib/routes/sina/namespace.ts index 963869786e1c062..7871d29039ce404 100644 --- a/lib/routes/sina/namespace.ts +++ b/lib/routes/sina/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '新浪', url: 'finance.sina.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sinchew/namespace.ts b/lib/routes/sinchew/namespace.ts index f68110e7e5413ab..c95824834a25d9d 100644 --- a/lib/routes/sinchew/namespace.ts +++ b/lib/routes/sinchew/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '星洲网', url: 'sinchew.com.my', + lang: 'zh-CN', }; diff --git a/lib/routes/sis001/namespace.ts b/lib/routes/sis001/namespace.ts index 2d305b27d10dcc1..fccfaef5776b54b 100644 --- a/lib/routes/sis001/namespace.ts +++ b/lib/routes/sis001/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `::: tip 第一会所有多个备用网址,本路由默认使用\`https://sis001.com\`,若该网址无法访问,可以在部署实例的时候通过\`SIS001_BASE_URL\`环境变量配置要使用的地址,如\`https://www.sis001.com\`等 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/sjtu/namespace.ts b/lib/routes/sjtu/namespace.ts index 94cf57c5a8325ba..31b6974f8f556cf 100644 --- a/lib/routes/sjtu/namespace.ts +++ b/lib/routes/sjtu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海交通大学', url: 'www.sjtu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/skeb/namespace.ts b/lib/routes/skeb/namespace.ts index 90499f96e4ab5fb..5a4962169a1da22 100644 --- a/lib/routes/skeb/namespace.ts +++ b/lib/routes/skeb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Skeb', url: 'skeb.jp', + lang: 'ja', }; diff --git a/lib/routes/skebetter/namespace.ts b/lib/routes/skebetter/namespace.ts index 45678549413629f..fdc4859f678523d 100644 --- a/lib/routes/skebetter/namespace.ts +++ b/lib/routes/skebetter/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Skebetter', url: 'skebetter.com', + lang: 'en', }; diff --git a/lib/routes/sketis/namespace.ts b/lib/routes/sketis/namespace.ts index 9fe9ebd0e9a899c..aeb569174cc2865 100644 --- a/lib/routes/sketis/namespace.ts +++ b/lib/routes/sketis/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Sketis | Website of Dr. Makarius Wenzel', url: 'sketis.net', + lang: 'en', }; diff --git a/lib/routes/skysports/namespace.ts b/lib/routes/skysports/namespace.ts index df4e6542f487bf7..f8a8a21667c6492 100644 --- a/lib/routes/skysports/namespace.ts +++ b/lib/routes/skysports/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Sky Sports', url: 'skysports.com', + lang: 'en', }; diff --git a/lib/routes/slowmist/namespace.ts b/lib/routes/slowmist/namespace.ts index e955bf77ee23c97..e547fa8fb1c1cf1 100644 --- a/lib/routes/slowmist/namespace.ts +++ b/lib/routes/slowmist/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '慢雾科技', url: 'slowmist.com', + lang: 'zh-CN', }; diff --git a/lib/routes/smashingmagazine/namespace.ts b/lib/routes/smashingmagazine/namespace.ts index 60a7f1d150a91de..ad0adea53f2c056 100644 --- a/lib/routes/smashingmagazine/namespace.ts +++ b/lib/routes/smashingmagazine/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Smashing Magazine', url: 'smashingmagazine.com', + lang: 'en', }; diff --git a/lib/routes/smzdm/namespace.ts b/lib/routes/smzdm/namespace.ts index 85fc6c216f537e5..714a02ae4f63747 100644 --- a/lib/routes/smzdm/namespace.ts +++ b/lib/routes/smzdm/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip 网站也提供了部分 RSS: [https://www.smzdm.com/dingyue](https://www.smzdm.com/dingyue) :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/snowpeak/namespace.ts b/lib/routes/snowpeak/namespace.ts index 883689e7f11e0f2..b8bb0efef1c85af 100644 --- a/lib/routes/snowpeak/namespace.ts +++ b/lib/routes/snowpeak/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Snow Peak', url: 'snowpeak.com', + lang: 'en', }; diff --git a/lib/routes/sobooks/namespace.ts b/lib/routes/sobooks/namespace.ts index 1e9c392dc9cec7d..a182127167d55f6 100644 --- a/lib/routes/sobooks/namespace.ts +++ b/lib/routes/sobooks/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'SoBooks', url: 'sobooks.net', + lang: 'en', }; diff --git a/lib/routes/sogou/namespace.ts b/lib/routes/sogou/namespace.ts index dab4d6b925b6cd4..8c2707210f69702 100644 --- a/lib/routes/sogou/namespace.ts +++ b/lib/routes/sogou/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '搜狗', url: 'www.sogou.com', + lang: 'zh-CN', }; diff --git a/lib/routes/sohu/namespace.ts b/lib/routes/sohu/namespace.ts index b857e377dc30693..10eb070274906f2 100644 --- a/lib/routes/sohu/namespace.ts +++ b/lib/routes/sohu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '搜狐号', url: 'sohu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/solidot/namespace.ts b/lib/routes/solidot/namespace.ts index da8e7dc28d9bd8c..4f91f330f7bd993 100644 --- a/lib/routes/solidot/namespace.ts +++ b/lib/routes/solidot/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Solidot', url: 'www.solidot.org', + lang: 'en', }; diff --git a/lib/routes/sony/namespace.ts b/lib/routes/sony/namespace.ts index 7a09fd386875683..d21b73709fe6593 100644 --- a/lib/routes/sony/namespace.ts +++ b/lib/routes/sony/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Sony', url: 'sony.com', + lang: 'en', }; diff --git a/lib/routes/sorrycc/namespace.ts b/lib/routes/sorrycc/namespace.ts index 6c1c27d4ef32346..5bd8a46dacb79ca 100644 --- a/lib/routes/sorrycc/namespace.ts +++ b/lib/routes/sorrycc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '云谦的博客', url: 'sorrycc.com', + lang: 'zh-CN', }; diff --git a/lib/routes/soundofhope/namespace.ts b/lib/routes/soundofhope/namespace.ts index 9eaf84054fab307..df15f89bd376f72 100644 --- a/lib/routes/soundofhope/namespace.ts +++ b/lib/routes/soundofhope/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '希望之声', url: 'soundofhope.org', + lang: 'en', }; diff --git a/lib/routes/soundon/namespace.ts b/lib/routes/soundon/namespace.ts index e65a0431a68375d..037feabba13a6fd 100644 --- a/lib/routes/soundon/namespace.ts +++ b/lib/routes/soundon/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'SoundOn', url: 'player.soundon.fm', + lang: 'en', }; diff --git a/lib/routes/sourceforge/namespace.ts b/lib/routes/sourceforge/namespace.ts index 1ca5a9ac55bec6e..fc2ba18622a6c8a 100644 --- a/lib/routes/sourceforge/namespace.ts +++ b/lib/routes/sourceforge/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'SourceForge', url: 'www.sourceforge.net', + lang: 'en', }; diff --git a/lib/routes/southcn/namespace.ts b/lib/routes/southcn/namespace.ts index 962c514bc0cebd6..2fa6f804b834c19 100644 --- a/lib/routes/southcn/namespace.ts +++ b/lib/routes/southcn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南方网', url: 'nfapp.southcn.com', + lang: 'zh-CN', }; diff --git a/lib/routes/spankbang/namespace.ts b/lib/routes/spankbang/namespace.ts index bc37481f9dcd3e9..ddcf2d246d01434 100644 --- a/lib/routes/spankbang/namespace.ts +++ b/lib/routes/spankbang/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'SpankBang', url: 'spankbang.com', + lang: 'en', }; diff --git a/lib/routes/spotify/namespace.ts b/lib/routes/spotify/namespace.ts index 20b9e3dca70c002..a1f911214f8a742 100644 --- a/lib/routes/spotify/namespace.ts +++ b/lib/routes/spotify/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Spotify', url: 'open.spotify.com', + lang: 'en', }; diff --git a/lib/routes/springer/namespace.ts b/lib/routes/springer/namespace.ts index 311d8908d3599c1..8595db42d8813be 100644 --- a/lib/routes/springer/namespace.ts +++ b/lib/routes/springer/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Springer', url: 'www.springer.com', + lang: 'en', }; diff --git a/lib/routes/sputniknews/namespace.ts b/lib/routes/sputniknews/namespace.ts index 762bce7a97f3438..b2d149812ab3c03 100644 --- a/lib/routes/sputniknews/namespace.ts +++ b/lib/routes/sputniknews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Sputnik News 俄罗斯卫星通讯社', url: 'sputniknews.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sqmc/namespace.ts b/lib/routes/sqmc/namespace.ts index a68bc4c612cd991..6af5b8a56f620a2 100644 --- a/lib/routes/sqmc/namespace.ts +++ b/lib/routes/sqmc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '新乡医学院三全学院', url: 'sqmc.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sse/namespace.ts b/lib/routes/sse/namespace.ts index 3bff470ebbca557..2067936b1895dac 100644 --- a/lib/routes/sse/namespace.ts +++ b/lib/routes/sse/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海证券交易所', url: 'bond.sse.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ssm/namespace.ts b/lib/routes/ssm/namespace.ts index 58c020462537956..28ec877bd8c5e50 100644 --- a/lib/routes/ssm/namespace.ts +++ b/lib/routes/ssm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '澳门卫生局', url: 'www.ssm.gov.mo', + lang: 'zh-CN', }; diff --git a/lib/routes/sspai/namespace.ts b/lib/routes/sspai/namespace.ts index f06919315b2e2ce..eb2d046a0d97db2 100644 --- a/lib/routes/sspai/namespace.ts +++ b/lib/routes/sspai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '少数派 sspai', url: 'sspai.com', + lang: 'zh-CN', }; diff --git a/lib/routes/sspu/namespace.ts b/lib/routes/sspu/namespace.ts index f9e1516ea9f49b7..dda02542acea0ea 100644 --- a/lib/routes/sspu/namespace.ts +++ b/lib/routes/sspu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海第二工业大学', url: 'jwc.sspu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/startuplatte/namespace.ts b/lib/routes/startuplatte/namespace.ts index 4d961bf5c05bb79..85dabe0c4a6c5ad 100644 --- a/lib/routes/startuplatte/namespace.ts +++ b/lib/routes/startuplatte/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '創新拿鐵', url: 'startuplatte.com', + lang: 'zh-TW', }; diff --git a/lib/routes/stbu/namespace.ts b/lib/routes/stbu/namespace.ts index 5fca5944e89ceab..4ba9c5ee6d905aa 100644 --- a/lib/routes/stbu/namespace.ts +++ b/lib/routes/stbu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '四川工商学院', url: 'stbu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/stcn/namespace.ts b/lib/routes/stcn/namespace.ts index 92ff6dfbe3665e1..11b830a5377c424 100644 --- a/lib/routes/stcn/namespace.ts +++ b/lib/routes/stcn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '证券时报网', url: 'stcn.com', + lang: 'zh-CN', }; diff --git a/lib/routes/stdaily/namespace.ts b/lib/routes/stdaily/namespace.ts index 6d15d93cac0a3c8..1975fcd4c26f4fa 100644 --- a/lib/routes/stdaily/namespace.ts +++ b/lib/routes/stdaily/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国科技网', url: 'digitalpaper.stdaily.com', + lang: 'zh-CN', }; diff --git a/lib/routes/steam/namespace.ts b/lib/routes/steam/namespace.ts index 0ecb6b79f3d7410..ac2d91ab614e322 100644 --- a/lib/routes/steam/namespace.ts +++ b/lib/routes/steam/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Steam', url: 'store.steampowered.com', + lang: 'en', }; diff --git a/lib/routes/stheadline/namespace.ts b/lib/routes/stheadline/namespace.ts index 3aae5c26d49487c..1f3a8db1c31cc2d 100644 --- a/lib/routes/stheadline/namespace.ts +++ b/lib/routes/stheadline/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '星島日報', url: 'std.stheadline.com', + lang: 'zh-TW', }; diff --git a/lib/routes/stockedge/namespace.ts b/lib/routes/stockedge/namespace.ts index 1550910c8218f25..d70291c7ba26f1a 100644 --- a/lib/routes/stockedge/namespace.ts +++ b/lib/routes/stockedge/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Stock Edge', url: 'web.stockedge.com', + lang: 'en', }; diff --git a/lib/routes/storm/namespace.ts b/lib/routes/storm/namespace.ts index fe2bb53c7c949c1..d1462be813b181c 100644 --- a/lib/routes/storm/namespace.ts +++ b/lib/routes/storm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '風傳媒', url: 'storm.mg', + lang: 'zh-TW', }; diff --git a/lib/routes/storyfm/namespace.ts b/lib/routes/storyfm/namespace.ts index 7b9d85b6228c5bd..4545df38bc63aab 100644 --- a/lib/routes/storyfm/namespace.ts +++ b/lib/routes/storyfm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '故事 FM', url: 'storyfm.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/straitstimes/namespace.ts b/lib/routes/straitstimes/namespace.ts index c23481dd38552e3..5a054da79127c0b 100644 --- a/lib/routes/straitstimes/namespace.ts +++ b/lib/routes/straitstimes/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'The Strait Times', url: 'straitstimes.com', description: '', + lang: 'en', }; diff --git a/lib/routes/stratechery/namespace.ts b/lib/routes/stratechery/namespace.ts index 40d0ef324571591..04069ec0664dc0a 100644 --- a/lib/routes/stratechery/namespace.ts +++ b/lib/routes/stratechery/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Stratechery by Ben Thompson', url: 'blog.stratechery.com', + lang: 'en', }; diff --git a/lib/routes/stream-capital/namespace.ts b/lib/routes/stream-capital/namespace.ts index 9310c86cc866ce1..a0e9d859efea8a6 100644 --- a/lib/routes/stream-capital/namespace.ts +++ b/lib/routes/stream-capital/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '远川研究所', url: 'www.stream-capital.com', + lang: 'zh-CN', }; diff --git a/lib/routes/studygolang/namespace.ts b/lib/routes/studygolang/namespace.ts index d0cd84f686b0df0..7abf20effc86d39 100644 --- a/lib/routes/studygolang/namespace.ts +++ b/lib/routes/studygolang/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Go 语言中文网', url: 'studygolang.com', + lang: 'zh-CN', }; diff --git a/lib/routes/subhd/namespace.ts b/lib/routes/subhd/namespace.ts index bb684a7f87e7b2e..bb53e92fbe6c4b9 100644 --- a/lib/routes/subhd/namespace.ts +++ b/lib/routes/subhd/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Sub HD', url: 'subhd.tv', + lang: 'zh-CN', }; diff --git a/lib/routes/supchina/namespace.ts b/lib/routes/supchina/namespace.ts index 571807c6c9472ef..4dea8ad0b6eca63 100644 --- a/lib/routes/supchina/namespace.ts +++ b/lib/routes/supchina/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'SupChina', url: 'supchina.com', + lang: 'zh-CN', }; diff --git a/lib/routes/surfshark/namespace.ts b/lib/routes/surfshark/namespace.ts index 18a86726a1be1c3..f7e46bd1a72cfd9 100644 --- a/lib/routes/surfshark/namespace.ts +++ b/lib/routes/surfshark/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Surfshark', url: 'surfshark.com', + lang: 'en', }; diff --git a/lib/routes/sustainabilitymag/namespace.ts b/lib/routes/sustainabilitymag/namespace.ts index 500281e36bc4d4b..89161b6621f43e4 100644 --- a/lib/routes/sustainabilitymag/namespace.ts +++ b/lib/routes/sustainabilitymag/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Sustainability Magazine', url: 'sustainabilitymag.com', + lang: 'en', }; diff --git a/lib/routes/sustech/namespace.ts b/lib/routes/sustech/namespace.ts index 257dec6ee2d4dd1..be104126fa708ea 100644 --- a/lib/routes/sustech/namespace.ts +++ b/lib/routes/sustech/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '南方科技大学', url: 'biddingoffice.sustech.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/swissinfo/namespace.ts b/lib/routes/swissinfo/namespace.ts index 17aa0c2ec206ce0..f5ea2e629a78083 100644 --- a/lib/routes/swissinfo/namespace.ts +++ b/lib/routes/swissinfo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'swissinfo', url: 'swissinfo.ch', + lang: 'en', }; diff --git a/lib/routes/swjtu/namespace.ts b/lib/routes/swjtu/namespace.ts index be986e9ec5f80dd..0b500265ba346a1 100644 --- a/lib/routes/swjtu/namespace.ts +++ b/lib/routes/swjtu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '西南交通大学', url: 'ctt.swjtu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/swpu/namespace.ts b/lib/routes/swpu/namespace.ts index 3c1b5370329b29a..1b609d0475fda51 100644 --- a/lib/routes/swpu/namespace.ts +++ b/lib/routes/swpu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '西南石油大学', url: 'swpu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/sycl/namespace.ts b/lib/routes/sycl/namespace.ts index cefbb7fba34337a..38dfbc30135b99f 100644 --- a/lib/routes/sycl/namespace.ts +++ b/lib/routes/sycl/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'SYCL', url: 'sycl.tech', + lang: 'en', }; diff --git a/lib/routes/syosetu/namespace.ts b/lib/routes/syosetu/namespace.ts index 4bec78aa0b6cf6e..1e44403f3b5987a 100644 --- a/lib/routes/syosetu/namespace.ts +++ b/lib/routes/syosetu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'syosetu', url: 'ncode.syosetu.com', + lang: 'ja', }; diff --git a/lib/routes/sysu/namespace.ts b/lib/routes/sysu/namespace.ts index 20a7ed3c4fe891e..3535a82fad369a7 100644 --- a/lib/routes/sysu/namespace.ts +++ b/lib/routes/sysu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中山大学', url: 'cse.sysu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/szftedu/namespace.ts b/lib/routes/szftedu/namespace.ts index 26f718b052ae0c2..09ea986617eae5e 100644 --- a/lib/routes/szftedu/namespace.ts +++ b/lib/routes/szftedu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '园岭小学', url: 'ylxx.szftedu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/szse/namespace.ts b/lib/routes/szse/namespace.ts index 1a7dc951654c646..b857b5dd4e63d7a 100644 --- a/lib/routes/szse/namespace.ts +++ b/lib/routes/szse/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '深圳证券交易所', url: 'szse.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/szu/namespace.ts b/lib/routes/szu/namespace.ts index fc4521e37d9bd4b..922fa25771c510a 100644 --- a/lib/routes/szu/namespace.ts +++ b/lib/routes/szu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '深圳大学', url: 'yz.szu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/t66y/namespace.ts b/lib/routes/t66y/namespace.ts index e51ba523e0a289e..6afde2f911f5712 100644 --- a/lib/routes/t66y/namespace.ts +++ b/lib/routes/t66y/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '草榴社区', url: 't66y.com', + lang: 'zh-CN', }; diff --git a/lib/routes/tableau/namespace.ts b/lib/routes/tableau/namespace.ts index 5eb48b7fca587a6..7b2c8088e486036 100644 --- a/lib/routes/tableau/namespace.ts +++ b/lib/routes/tableau/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Tableau', url: 'public.tableau.com', + lang: 'en', }; diff --git a/lib/routes/taiwannews/namespace.ts b/lib/routes/taiwannews/namespace.ts index 88f6a1432ff8c45..78e581db5bae726 100644 --- a/lib/routes/taiwannews/namespace.ts +++ b/lib/routes/taiwannews/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'Taiwan News 台灣英文新聞', + name: 'Taiwan News', url: 'taiwannews.com.tw', + lang: 'en', }; diff --git a/lib/routes/tangshufang/namespace.ts b/lib/routes/tangshufang/namespace.ts index 596eef187596d22..eedb1027c2f885c 100644 --- a/lib/routes/tangshufang/namespace.ts +++ b/lib/routes/tangshufang/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '唐书房', url: 'tangshufang.com', + lang: 'zh-CN', }; diff --git a/lib/routes/taobao/namespace.ts b/lib/routes/taobao/namespace.ts index 7247f08d3f200df..6c6a2f335e27778 100644 --- a/lib/routes/taobao/namespace.ts +++ b/lib/routes/taobao/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '淘宝众筹', url: 'izhongchou.taobao.com', + lang: 'zh-CN', }; diff --git a/lib/routes/taoguba/namespace.ts b/lib/routes/taoguba/namespace.ts index 869a807a69a09b5..c92d34a567875c3 100644 --- a/lib/routes/taoguba/namespace.ts +++ b/lib/routes/taoguba/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '淘股吧', url: 'taoguba.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/taptap/namespace.ts b/lib/routes/taptap/namespace.ts index a09009cacbc7614..c13466ece33949d 100644 --- a/lib/routes/taptap/namespace.ts +++ b/lib/routes/taptap/namespace.ts @@ -7,4 +7,5 @@ export const namespace: Namespace = { 由于区域限制,需要在有国内 IP 的机器上自建才能正常获取 RSS。\ 而对于《TapTap 国际版》则需要部署在具有海外出口的 IP 上才可正常获取 RSS。 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/tass/namespace.ts b/lib/routes/tass/namespace.ts index 0acbce62448a6f7..2cdfbc5a5ec39d3 100644 --- a/lib/routes/tass/namespace.ts +++ b/lib/routes/tass/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Russian News Agency TASS', url: 'tass.com', + lang: 'en', }; diff --git a/lib/routes/techcrunch/namespace.ts b/lib/routes/techcrunch/namespace.ts index 0558c9f0ddff65f..0c7f66beff35e70 100644 --- a/lib/routes/techcrunch/namespace.ts +++ b/lib/routes/techcrunch/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'TechCrunch', url: 'techcrunch.com', + lang: 'en', }; diff --git a/lib/routes/techflowpost/namespace.ts b/lib/routes/techflowpost/namespace.ts index 35a074606e19368..39a5ecb89757a62 100644 --- a/lib/routes/techflowpost/namespace.ts +++ b/lib/routes/techflowpost/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '深潮 TechFlow', url: 'techflowpost.com', + lang: 'zh-CN', }; diff --git a/lib/routes/techpowerup/namespace.ts b/lib/routes/techpowerup/namespace.ts index d520cf3ae5c7fc7..3e0aaffad712c62 100644 --- a/lib/routes/techpowerup/namespace.ts +++ b/lib/routes/techpowerup/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'TechPowerUp', url: 'techpowerup.com', + lang: 'en', }; diff --git a/lib/routes/telecompaper/namespace.ts b/lib/routes/telecompaper/namespace.ts index 8712b73ad7c8030..8bc0b379344ec58 100644 --- a/lib/routes/telecompaper/namespace.ts +++ b/lib/routes/telecompaper/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Telecompaper', url: 'telecompaper.com', + lang: 'en', }; diff --git a/lib/routes/telegram/namespace.ts b/lib/routes/telegram/namespace.ts index 34414965af6287c..191361e63e56a88 100644 --- a/lib/routes/telegram/namespace.ts +++ b/lib/routes/telegram/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Telegram', url: 't.me', + lang: 'en', }; diff --git a/lib/routes/tencent/namespace.ts b/lib/routes/tencent/namespace.ts index df6db8d72feb5aa..17b78150841b3aa 100644 --- a/lib/routes/tencent/namespace.ts +++ b/lib/routes/tencent/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '腾讯', url: 'tencent.com', + lang: 'zh-CN', }; diff --git a/lib/routes/tesla/namespace.ts b/lib/routes/tesla/namespace.ts index 166ec1bcb03b128..8daaaa8242dddb7 100644 --- a/lib/routes/tesla/namespace.ts +++ b/lib/routes/tesla/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '特斯拉中国', url: 'tesla.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/test/namespace.ts b/lib/routes/test/namespace.ts index 27224d001e0109a..a6db48305f9debc 100644 --- a/lib/routes/test/namespace.ts +++ b/lib/routes/test/namespace.ts @@ -2,4 +2,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'RSSHub Test', + lang: 'en', }; diff --git a/lib/routes/tfc-taiwan/namespace.ts b/lib/routes/tfc-taiwan/namespace.ts index 7704954e3a5589c..962c3e3aed7e493 100644 --- a/lib/routes/tfc-taiwan/namespace.ts +++ b/lib/routes/tfc-taiwan/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '台灣事實查核中心', url: 'tfc-taiwan.org.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/tgbus/namespace.ts b/lib/routes/tgbus/namespace.ts index f8b1f1cef145e66..8359b833c3d5142 100644 --- a/lib/routes/tgbus/namespace.ts +++ b/lib/routes/tgbus/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '电玩巴士 TGBUS', url: 'tgbus.com', + lang: 'zh-CN', }; diff --git a/lib/routes/the/namespace.ts b/lib/routes/the/namespace.ts index fea038bf6fa2ecd..7e1491bc10353cf 100644 --- a/lib/routes/the/namespace.ts +++ b/lib/routes/the/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'the.bi', categories: ['new-media'], description: '', + lang: 'en', }; diff --git a/lib/routes/theatlantic/namespace.ts b/lib/routes/theatlantic/namespace.ts index 02a59a6066dab81..3323d1a1aa1f62e 100644 --- a/lib/routes/theatlantic/namespace.ts +++ b/lib/routes/theatlantic/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The Atlantic', url: 'www.theatlantic.com', + lang: 'en', }; diff --git a/lib/routes/theblockbeats/namespace.ts b/lib/routes/theblockbeats/namespace.ts index 4590a32ea8580a0..04a460220ed3b15 100644 --- a/lib/routes/theblockbeats/namespace.ts +++ b/lib/routes/theblockbeats/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '律动 BlockBeats', url: 'www.theblockbeats.info', + lang: 'zh-CN', }; diff --git a/lib/routes/thecover/namespace.ts b/lib/routes/thecover/namespace.ts index 536da3af111b1e7..db73c480c127bf7 100644 --- a/lib/routes/thecover/namespace.ts +++ b/lib/routes/thecover/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '封面新闻', url: 'thecover.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/thehindu/namespace.ts b/lib/routes/thehindu/namespace.ts index bc44ae8634a0a05..d40e034df84487b 100644 --- a/lib/routes/thehindu/namespace.ts +++ b/lib/routes/thehindu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The Hindu', url: 'thehindu.com', + lang: 'en', }; diff --git a/lib/routes/theinitium/namespace.ts b/lib/routes/theinitium/namespace.ts index ee7f8b25b51398a..5bc2a61f293f20c 100644 --- a/lib/routes/theinitium/namespace.ts +++ b/lib/routes/theinitium/namespace.ts @@ -8,4 +8,5 @@ export const namespace: Namespace = { :::warning 付费内容全文可能需要登陆获取,详情见部署页面的配置模块。 :::`, + lang: 'zh-HK', }; diff --git a/lib/routes/themoviedb/namespace.ts b/lib/routes/themoviedb/namespace.ts index 1b74e3691c53113..d0d332e198aaf36 100644 --- a/lib/routes/themoviedb/namespace.ts +++ b/lib/routes/themoviedb/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip Refer to [https://developers.themoviedb.org/3/getting-started/languages](https://developers.themoviedb.org/3/getting-started/languages) for the language parameter in the route. :::`, + lang: 'en', }; diff --git a/lib/routes/thenewslens/namespace.ts b/lib/routes/thenewslens/namespace.ts index 5d9f3c0bd1cad54..d39bf23674ef8e7 100644 --- a/lib/routes/thenewslens/namespace.ts +++ b/lib/routes/thenewslens/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The News Lens 關鍵評論', url: 'thenewslens.com', + lang: 'zh-TW', }; diff --git a/lib/routes/thepaper/namespace.ts b/lib/routes/thepaper/namespace.ts index 504d2f77e45f91e..a0cda4243511f89 100644 --- a/lib/routes/thepaper/namespace.ts +++ b/lib/routes/thepaper/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '澎湃新闻', url: 'thepaper.cn', description: `以下所有路由可使用参数\`old\`以采取旧全文获取方法。该方法会另外获取网页中的图片与视频资源。在原始 url 追加\`?old=yes\`以启用.`, + lang: 'zh-CN', }; diff --git a/lib/routes/thepetcity/namespace.ts b/lib/routes/thepetcity/namespace.ts index 83114d6e092cf6b..7c7a989cfea5e54 100644 --- a/lib/routes/thepetcity/namespace.ts +++ b/lib/routes/thepetcity/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PetCity 毛孩日常', url: 'thepetcity.com', + lang: 'en', }; diff --git a/lib/routes/theverge/namespace.ts b/lib/routes/theverge/namespace.ts index 6bc9fe21aa2a85a..86f56a30d9d70c0 100644 --- a/lib/routes/theverge/namespace.ts +++ b/lib/routes/theverge/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The Verge', url: 'theverge.com', + lang: 'en', }; diff --git a/lib/routes/thoughtco/namespace.ts b/lib/routes/thoughtco/namespace.ts index 8cb061f83277256..f9daab2fa5779b7 100644 --- a/lib/routes/thoughtco/namespace.ts +++ b/lib/routes/thoughtco/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ThoughtCo', url: 'thoughtco.com', + lang: 'en', }; diff --git a/lib/routes/thoughtworks/namespace.ts b/lib/routes/thoughtworks/namespace.ts index 70155f1fc403b53..77e17cc6009ed94 100644 --- a/lib/routes/thoughtworks/namespace.ts +++ b/lib/routes/thoughtworks/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ThoughtWorks', url: 'www.thoughtworks.com/zh-cn/insights/blog', + lang: 'zh-CN', }; diff --git a/lib/routes/threads/namespace.ts b/lib/routes/threads/namespace.ts index 63d33a4787d3686..f3f83b8e4599b74 100644 --- a/lib/routes/threads/namespace.ts +++ b/lib/routes/threads/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Threads', url: 'threads.net', + lang: 'en', }; diff --git a/lib/routes/thwiki/namespace.ts b/lib/routes/thwiki/namespace.ts index 3a7ad2a04d153cf..c79ea69b2e3736f 100644 --- a/lib/routes/thwiki/namespace.ts +++ b/lib/routes/thwiki/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'THBWiki', url: 'thwiki.cc', + lang: 'zh-CN', }; diff --git a/lib/routes/tiktok/namespace.ts b/lib/routes/tiktok/namespace.ts index b754c6bd6749331..1476995cb4f1a91 100644 --- a/lib/routes/tiktok/namespace.ts +++ b/lib/routes/tiktok/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'TikTok', url: 'tiktok.com', + lang: 'en', }; diff --git a/lib/routes/timednews/namespace.ts b/lib/routes/timednews/namespace.ts index 9bd4901999001e5..1728fcf62ee667d 100644 --- a/lib/routes/timednews/namespace.ts +++ b/lib/routes/timednews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '时刻新闻', url: 'timednews.com', + lang: 'zh-CN', }; diff --git a/lib/routes/tingshuitz/namespace.ts b/lib/routes/tingshuitz/namespace.ts index bce8ce8dab8d1c0..016538b517c0052 100644 --- a/lib/routes/tingshuitz/namespace.ts +++ b/lib/routes/tingshuitz/namespace.ts @@ -3,5 +3,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '停水通知', url: 'swj.dl.gov.cn', - description: `配合 [IFTTT](https://ifttt.com/) Applets [邮件通知](https://ifttt.com/applets/SEvmDVKY-) 使用实现自动通知效果.`, + description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/tingtingfm/namespace.ts b/lib/routes/tingtingfm/namespace.ts index 2fb66670e9d8284..18bf41f046190f5 100644 --- a/lib/routes/tingtingfm/namespace.ts +++ b/lib/routes/tingtingfm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '听听 FM', url: 'mobile.tingtingfm.com', + lang: 'zh-CN', }; diff --git a/lib/routes/tisi/namespace.ts b/lib/routes/tisi/namespace.ts index 6ea4ab10ca0e463..1789c8b3841dd4f 100644 --- a/lib/routes/tisi/namespace.ts +++ b/lib/routes/tisi/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '腾讯研究院', url: 'tisi.org', + lang: 'zh-CN', }; diff --git a/lib/routes/tju/namespace.ts b/lib/routes/tju/namespace.ts index 797cb1abaa514b8..c9653c9bb7a10d8 100644 --- a/lib/routes/tju/namespace.ts +++ b/lib/routes/tju/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Tianjin University 天津大学', url: 'cic.tju.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/tkww/namespace.ts b/lib/routes/tkww/namespace.ts index a57b54156a2f2ab..aaa33226334c8d3 100644 --- a/lib/routes/tkww/namespace.ts +++ b/lib/routes/tkww/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '大公文匯網', url: 'www.tkww.hk', + lang: 'zh-HK', }; diff --git a/lib/routes/tokeninsight/namespace.ts b/lib/routes/tokeninsight/namespace.ts index b8a9eec04624fb4..0cf552ace9f837f 100644 --- a/lib/routes/tokeninsight/namespace.ts +++ b/lib/routes/tokeninsight/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip TokenInsight also provides official RSS, you can take a look at [https://api.tokeninsight.com/reference/rss](https://api.tokeninsight.com/reference/rss). :::`, + lang: 'en', }; diff --git a/lib/routes/tongji/namespace.ts b/lib/routes/tongji/namespace.ts index b96d5051b913059..07b2d4a73644233 100644 --- a/lib/routes/tongji/namespace.ts +++ b/lib/routes/tongji/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '同济大学', url: 'bksy.tongji.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/tongli/namespace.ts b/lib/routes/tongli/namespace.ts index 659eef189260604..ced81f990ef5972 100644 --- a/lib/routes/tongli/namespace.ts +++ b/lib/routes/tongli/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '東立出版社', url: 'tongli.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/toodaylab/namespace.ts b/lib/routes/toodaylab/namespace.ts index be0d4305fd9039a..7bbf73e3c18abb8 100644 --- a/lib/routes/toodaylab/namespace.ts +++ b/lib/routes/toodaylab/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '理想生活实验室', url: 'toodaylab.com', + lang: 'zh-CN', }; diff --git a/lib/routes/tophub/namespace.ts b/lib/routes/tophub/namespace.ts index 02f7a70864a889d..c40a34a03c199e3 100644 --- a/lib/routes/tophub/namespace.ts +++ b/lib/routes/tophub/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::warning 由于需要登录后的 Cookie 值才能获取原始链接,所以需要自建,需要在环境变量中配置 \`TOPHUB_COOKIE\`,详情见部署页面的配置模块。 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/topys/namespace.ts b/lib/routes/topys/namespace.ts index 64869c7be9f2d41..9be0bee330ed2aa 100644 --- a/lib/routes/topys/namespace.ts +++ b/lib/routes/topys/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'TOPYS', url: 'topys.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/towardsdatascience/namespace.ts b/lib/routes/towardsdatascience/namespace.ts index 61e8803209fa385..8707f62995e0ab7 100644 --- a/lib/routes/towardsdatascience/namespace.ts +++ b/lib/routes/towardsdatascience/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Towards Data Science', url: 'towardsdatascience.com', + lang: 'en', }; diff --git a/lib/routes/tradingview/namespace.ts b/lib/routes/tradingview/namespace.ts index 11db94dd47ba054..48718f1e96e2e5e 100644 --- a/lib/routes/tradingview/namespace.ts +++ b/lib/routes/tradingview/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'TradingView', url: 'tradingview.com', + lang: 'en', }; diff --git a/lib/routes/transcriptforest/namespace.ts b/lib/routes/transcriptforest/namespace.ts index 9032fba5601ff6c..b66736c7abc97bc 100644 --- a/lib/routes/transcriptforest/namespace.ts +++ b/lib/routes/transcriptforest/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Transcript Forest', url: 'www.transcriptforest.com', + lang: 'en', }; diff --git a/lib/routes/trending/namespace.ts b/lib/routes/trending/namespace.ts index f2bd9447d26a428..937478e118e1daa 100644 --- a/lib/routes/trending/namespace.ts +++ b/lib/routes/trending/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '热搜聚合', url: 'so.toutiao.com', + lang: 'zh-CN', }; diff --git a/lib/routes/trendingpapers/namespace.ts b/lib/routes/trendingpapers/namespace.ts index 4ad41558cf81625..067a8442c06d334 100644 --- a/lib/routes/trendingpapers/namespace.ts +++ b/lib/routes/trendingpapers/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Trending Papers', url: 'trendingpapers.com', + lang: 'en', }; diff --git a/lib/routes/tribalfootball/namespace.ts b/lib/routes/tribalfootball/namespace.ts index 286245e7d25c6a0..586c6b26e0c6e46 100644 --- a/lib/routes/tribalfootball/namespace.ts +++ b/lib/routes/tribalfootball/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Tribal Football', url: 'tribalfootball.com', + lang: 'en', }; diff --git a/lib/routes/trow/namespace.ts b/lib/routes/trow/namespace.ts index 6440b68917ba0a0..bd71984531efd16 100644 --- a/lib/routes/trow/namespace.ts +++ b/lib/routes/trow/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The Ring of Wonder', url: 'trow.cc', + lang: 'en', }; diff --git a/lib/routes/tsdm39/namespace.ts b/lib/routes/tsdm39/namespace.ts index 83084d4c81fb8c1..f6cad5797440939 100644 --- a/lib/routes/tsdm39/namespace.ts +++ b/lib/routes/tsdm39/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: '天使动漫论坛', url: 'www.tsdm39.com', categories: ['anime'], + lang: 'zh-CN', }; diff --git a/lib/routes/tsinghua/namespace.ts b/lib/routes/tsinghua/namespace.ts index 854394d4167287f..89db20e31b06181 100644 --- a/lib/routes/tsinghua/namespace.ts +++ b/lib/routes/tsinghua/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'tsinghua.edu.cn', categories: ['university'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/ttv/namespace.ts b/lib/routes/ttv/namespace.ts index 95ba16c62df0261..6b547ee1b772f92 100644 --- a/lib/routes/ttv/namespace.ts +++ b/lib/routes/ttv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '台視新聞網', url: 'news.ttv.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/tvb/namespace.ts b/lib/routes/tvb/namespace.ts index f7cbc339f42900d..60a3623ca9ca067 100644 --- a/lib/routes/tvb/namespace.ts +++ b/lib/routes/tvb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '无线新闻', url: 'tvb.com', + lang: 'zh-HK', }; diff --git a/lib/routes/tvtropes/namespace.ts b/lib/routes/tvtropes/namespace.ts index a10ee1e5ed22b11..9aba076818b8fbd 100644 --- a/lib/routes/tvtropes/namespace.ts +++ b/lib/routes/tvtropes/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'TV Tropes', url: 'tvtropes.org', + lang: 'en', }; diff --git a/lib/routes/twitch/namespace.ts b/lib/routes/twitch/namespace.ts index 06d66837e2fd747..c689b6ae6ee3b3d 100644 --- a/lib/routes/twitch/namespace.ts +++ b/lib/routes/twitch/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Twitch', url: 'www.twitch.tv', + lang: 'en', }; diff --git a/lib/routes/twitter/namespace.ts b/lib/routes/twitter/namespace.ts index 7bccc310a60793e..9c1cf533e702fc7 100644 --- a/lib/routes/twitter/namespace.ts +++ b/lib/routes/twitter/namespace.ts @@ -45,4 +45,5 @@ Currently supports two authentication methods: - Using \`TWITTER_USERNAME\` \`TWITTER_PASSWORD\` and \`TWITTER_AUTHENTICATION_SECRET\`: Configure a comma-separated list of Twitter username and password. RSSHub will use this information to log in to Twitter and obtain data using the mobile API. Please note that if you have not logged in with the current IP address before, it is easy to trigger Twitter's risk control mechanism. `, + lang: 'en', }; diff --git a/lib/routes/twreporter/namespace.ts b/lib/routes/twreporter/namespace.ts index 0ba0ed845a0f59f..90737c4ec6823d7 100644 --- a/lib/routes/twreporter/namespace.ts +++ b/lib/routes/twreporter/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '報導者', url: 'twreporter.org', + lang: 'zh-TW', }; diff --git a/lib/routes/txrjy/namespace.ts b/lib/routes/txrjy/namespace.ts index e623d125a2b4c73..8344778afd1af5b 100644 --- a/lib/routes/txrjy/namespace.ts +++ b/lib/routes/txrjy/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '通信人家园', url: 'txrjy.com', + lang: 'zh-CN', }; diff --git a/lib/routes/tynu/namespace.ts b/lib/routes/tynu/namespace.ts index 9066fc6d502915b..644ee14062c6e93 100644 --- a/lib/routes/tynu/namespace.ts +++ b/lib/routes/tynu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '太原师范学院', url: 'tynu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/typora/namespace.ts b/lib/routes/typora/namespace.ts index 70c459a4911c8fd..23d279674f465cd 100644 --- a/lib/routes/typora/namespace.ts +++ b/lib/routes/typora/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Typora', url: 'typora.io', + lang: 'en', }; diff --git a/lib/routes/typst/namespace.ts b/lib/routes/typst/namespace.ts index c641ced74b4e013..a24e78df132930f 100644 --- a/lib/routes/typst/namespace.ts +++ b/lib/routes/typst/namespace.ts @@ -10,4 +10,5 @@ Compose papers faster: Focus on your text and let Typst take care of layout and zh: { name: 'Typst', }, + lang: 'en', }; diff --git a/lib/routes/u3c3/namespace.ts b/lib/routes/u3c3/namespace.ts index 1147a73bc18e17f..690e7a898f38fbd 100644 --- a/lib/routes/u3c3/namespace.ts +++ b/lib/routes/u3c3/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'U3C3', url: 'u3c3.com', + lang: 'zh-CN', }; diff --git a/lib/routes/u9a9/namespace.ts b/lib/routes/u9a9/namespace.ts index e0786c3a8de6dd7..197fb6c9b3d3187 100644 --- a/lib/routes/u9a9/namespace.ts +++ b/lib/routes/u9a9/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'U9A9', url: 'u9a9.com', + lang: 'zh-CN', }; diff --git a/lib/routes/uber/namespace.ts b/lib/routes/uber/namespace.ts index bdba13c06ba199c..6c58181d7a3a108 100644 --- a/lib/routes/uber/namespace.ts +++ b/lib/routes/uber/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'Uber 优步', + name: 'Uber', url: 'www.uber.com', + lang: 'en', }; diff --git a/lib/routes/ucas/namespace.ts b/lib/routes/ucas/namespace.ts index 2df1600d7ab5f7b..74a4c7646678dbc 100644 --- a/lib/routes/ucas/namespace.ts +++ b/lib/routes/ucas/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国科学院大学', url: 'ai.ucas.ac.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/uchicago/namespace.ts b/lib/routes/uchicago/namespace.ts index 1a4ed461be579c0..65cfad67a143d42 100644 --- a/lib/routes/uchicago/namespace.ts +++ b/lib/routes/uchicago/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The University of Chicago Press: Journals', url: 'journals.uchicago.edu', + lang: 'en', }; diff --git a/lib/routes/udn/namespace.ts b/lib/routes/udn/namespace.ts index ca9b4cd9f022e69..0bc19494a1561b1 100644 --- a/lib/routes/udn/namespace.ts +++ b/lib/routes/udn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '聯合新聞網', url: 'udn.com', + lang: 'zh-TW', }; diff --git a/lib/routes/uestc/namespace.ts b/lib/routes/uestc/namespace.ts index ed069af026e7902..41e2c0266266972 100644 --- a/lib/routes/uestc/namespace.ts +++ b/lib/routes/uestc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '电子科技大学', url: 'www.uestc.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/uibe/namespace.ts b/lib/routes/uibe/namespace.ts index 38ecd569ab07ab3..663e210c34b7e2e 100644 --- a/lib/routes/uibe/namespace.ts +++ b/lib/routes/uibe/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '对外经济贸易大学', url: 'hr.uibe.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ulapia/namespace.ts b/lib/routes/ulapia/namespace.ts index 4054ab81ab20c1c..02371700e2d2964 100644 --- a/lib/routes/ulapia/namespace.ts +++ b/lib/routes/ulapia/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '乌拉邦', url: 'www.ulapia.com', + lang: 'zh-CN', }; diff --git a/lib/routes/uniqlo/namespace.ts b/lib/routes/uniqlo/namespace.ts index 12ff69ce152e5a9..b2b3a1519cb61a8 100644 --- a/lib/routes/uniqlo/namespace.ts +++ b/lib/routes/uniqlo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Uniqlo', url: 'www.uniqlo.com', + lang: 'en', }; diff --git a/lib/routes/unraid/namespace.ts b/lib/routes/unraid/namespace.ts index 4170cac12105d2d..a8a1bf156946736 100644 --- a/lib/routes/unraid/namespace.ts +++ b/lib/routes/unraid/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Unraid', url: 'unraid.net', + lang: 'en', }; diff --git a/lib/routes/unusualwhales/namespace.ts b/lib/routes/unusualwhales/namespace.ts index e18a57355bd6dba..779f315bc8574bf 100644 --- a/lib/routes/unusualwhales/namespace.ts +++ b/lib/routes/unusualwhales/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Unusual Whales', url: 'unusualwhales.com', + lang: 'en', }; diff --git a/lib/routes/upc/namespace.ts b/lib/routes/upc/namespace.ts index 674da491174975a..b4664f5f1c562eb 100644 --- a/lib/routes/upc/namespace.ts +++ b/lib/routes/upc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国石油大学(华东)', url: 'computer.upc.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/uptimerobot/namespace.ts b/lib/routes/uptimerobot/namespace.ts index 5aa2a76983ba5f1..f5ff2c75c162a1e 100644 --- a/lib/routes/uptimerobot/namespace.ts +++ b/lib/routes/uptimerobot/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Uptime Robot', url: 'rss.uptimerobot.com', + lang: 'en', }; diff --git a/lib/routes/uraaka-joshi/namespace.ts b/lib/routes/uraaka-joshi/namespace.ts index 64cd2fc39b4daf7..22e565603c769c1 100644 --- a/lib/routes/uraaka-joshi/namespace.ts +++ b/lib/routes/uraaka-joshi/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '裏垢女子まとめ', url: 'uraaka-joshi.com', + lang: 'ja', }; diff --git a/lib/routes/urbandictionary/namespace.ts b/lib/routes/urbandictionary/namespace.ts index abd6cae4aa38fa1..11dfffcfceea1a2 100644 --- a/lib/routes/urbandictionary/namespace.ts +++ b/lib/routes/urbandictionary/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Urban Dictionary', url: 'urbandictionary.com', + lang: 'en', }; diff --git a/lib/routes/usenix/namespace.ts b/lib/routes/usenix/namespace.ts index ab4fcb47e5a8a44..61f2d16203f03d5 100644 --- a/lib/routes/usenix/namespace.ts +++ b/lib/routes/usenix/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'USENIX', url: 'usenix.org', + lang: 'en', }; diff --git a/lib/routes/usepanda/namespace.ts b/lib/routes/usepanda/namespace.ts index 842d79ba559669c..493cdc4fda43507 100644 --- a/lib/routes/usepanda/namespace.ts +++ b/lib/routes/usepanda/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Panda', url: 'usepanda.com', + lang: 'en', }; diff --git a/lib/routes/ustb/namespace.ts b/lib/routes/ustb/namespace.ts index 1bd487063b12002..33ebcba154b9642 100644 --- a/lib/routes/ustb/namespace.ts +++ b/lib/routes/ustb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京科技大学', url: 'gs.ustb.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ustc/namespace.ts b/lib/routes/ustc/namespace.ts index 24a29b4bbcd8fa2..c45d8e828af03f4 100644 --- a/lib/routes/ustc/namespace.ts +++ b/lib/routes/ustc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国科学技术大学', url: 'ustc.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/usts/namespace.ts b/lib/routes/usts/namespace.ts index 46ea0e79c34db1c..2254b6d4cc2f5ff 100644 --- a/lib/routes/usts/namespace.ts +++ b/lib/routes/usts/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '苏州科技大学', url: 'jwch.usts.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/utgd/namespace.ts b/lib/routes/utgd/namespace.ts index e60baf5b204dbc2..f6cd008c22c1582 100644 --- a/lib/routes/utgd/namespace.ts +++ b/lib/routes/utgd/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'UNTAG', url: 'utgd.net', + lang: 'zh-CN', }; diff --git a/lib/routes/uw/namespace.ts b/lib/routes/uw/namespace.ts index fc54dfa7c2b28c4..2f9169b767e7bf3 100644 --- a/lib/routes/uw/namespace.ts +++ b/lib/routes/uw/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'University of Washington', url: 'gixnetwork.org', + lang: 'en', }; diff --git a/lib/routes/v1tx/namespace.ts b/lib/routes/v1tx/namespace.ts index 760820d3a133a4e..7767031af77dfd2 100644 --- a/lib/routes/v1tx/namespace.ts +++ b/lib/routes/v1tx/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'v1tx', url: 'v1tx.com', + lang: 'zh-CN', }; diff --git a/lib/routes/v2ex/namespace.ts b/lib/routes/v2ex/namespace.ts index dcfbbd0408f3196..1db432c6259e596 100644 --- a/lib/routes/v2ex/namespace.ts +++ b/lib/routes/v2ex/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'V2EX', url: 'v2ex.com', + lang: 'zh-CN', }; diff --git a/lib/routes/v2rayshare/namespace.ts b/lib/routes/v2rayshare/namespace.ts index dd6eb50b294eddb..16d3faa41aac1f2 100644 --- a/lib/routes/v2rayshare/namespace.ts +++ b/lib/routes/v2rayshare/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'V2rayShare', url: 'v2rayshare.com', + lang: 'zh-CN', }; diff --git a/lib/routes/vcb-s/namespace.ts b/lib/routes/vcb-s/namespace.ts index f4e3908192fc286..9e32769fec3d960 100644 --- a/lib/routes/vcb-s/namespace.ts +++ b/lib/routes/vcb-s/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'VCB-Studio', url: 'vcb-s.com', + lang: 'zh-CN', }; diff --git a/lib/routes/verfghbw/namespace.ts b/lib/routes/verfghbw/namespace.ts index d60b596ac7a25b6..27bafa833d2ecba 100644 --- a/lib/routes/verfghbw/namespace.ts +++ b/lib/routes/verfghbw/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Constitutional Court of Baden-Württemberg (Germany)', url: 'verfgh.baden-wuerttemberg.de', + lang: 'de', }; diff --git a/lib/routes/vice/namespace.ts b/lib/routes/vice/namespace.ts index 451a9df13a99247..549e358b3cbf049 100644 --- a/lib/routes/vice/namespace.ts +++ b/lib/routes/vice/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'VICE', url: 'vice.com', + lang: 'en', }; diff --git a/lib/routes/vimeo/namespace.ts b/lib/routes/vimeo/namespace.ts index 03ea2189b2011bd..51b59df60b6872a 100644 --- a/lib/routes/vimeo/namespace.ts +++ b/lib/routes/vimeo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Vimeo', url: 'vimeo.com', + lang: 'en', }; diff --git a/lib/routes/vocus/namespace.ts b/lib/routes/vocus/namespace.ts index 0220cbf4953dfc0..38296d9cff8e93c 100644 --- a/lib/routes/vocus/namespace.ts +++ b/lib/routes/vocus/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '方格子', url: 'vocus.cc', + lang: 'zh-TW', }; diff --git a/lib/routes/vom/namespace.ts b/lib/routes/vom/namespace.ts index b8c5bd4f47f3d32..febf2023a429e8c 100644 --- a/lib/routes/vom/namespace.ts +++ b/lib/routes/vom/namespace.ts @@ -1,6 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'Voice of Mongolia 蒙古之声', + name: 'Voice of Mongolia', url: 'vom.mn', + lang: 'en', }; diff --git a/lib/routes/voronoiapp/namespace.ts b/lib/routes/voronoiapp/namespace.ts index eff11a4c3d690df..1f2edd1ef2064de 100644 --- a/lib/routes/voronoiapp/namespace.ts +++ b/lib/routes/voronoiapp/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Voronoi', url: 'voronoiapp.com', + lang: 'en', }; diff --git a/lib/routes/wallhaven/namespace.ts b/lib/routes/wallhaven/namespace.ts index 82fc1032f6887ab..5df7c9d3cb760c7 100644 --- a/lib/routes/wallhaven/namespace.ts +++ b/lib/routes/wallhaven/namespace.ts @@ -10,4 +10,5 @@ However, the number of requests to the site increases a lot when it is turned on For example [Latest Wallpapers](https://wallhaven.cc/latest), the route turning on **Need Details** is [/wallhaven/latest/true](https://rsshub.app/wallhaven/latest/true), and then specify a smaller \`limit\`. We can get [/wallhaven/latest/true?limit=5](https://rsshub.app/wallhaven/latest/true?limit=5). :::`, + lang: 'en', }; diff --git a/lib/routes/wallpaperhub/namespace.ts b/lib/routes/wallpaperhub/namespace.ts index fcdcf824943e385..1e11c19fe03ad02 100644 --- a/lib/routes/wallpaperhub/namespace.ts +++ b/lib/routes/wallpaperhub/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'WallpaperHub', url: 'wallpaperhub.app', + lang: 'en', }; diff --git a/lib/routes/wallstreetcn/namespace.ts b/lib/routes/wallstreetcn/namespace.ts index 8e8622e80f5f794..7c9e900ae3924c9 100644 --- a/lib/routes/wallstreetcn/namespace.ts +++ b/lib/routes/wallstreetcn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '华尔街见闻', url: 'wallstreetcn.com', + lang: 'zh-CN', }; diff --git a/lib/routes/wanqu/namespace.ts b/lib/routes/wanqu/namespace.ts index 8799f8b7ed073cf..438b9b2fba06008 100644 --- a/lib/routes/wanqu/namespace.ts +++ b/lib/routes/wanqu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '湾区日报', url: 'wanqu.co', + lang: 'zh-CN', }; diff --git a/lib/routes/warthunder/namespace.ts b/lib/routes/warthunder/namespace.ts index 65641f3d2b5e84e..8608dd188d68ab7 100644 --- a/lib/routes/warthunder/namespace.ts +++ b/lib/routes/warthunder/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'War Thunder', url: 'warthunder.com', + lang: 'en', }; diff --git a/lib/routes/washingtonpost/namespace.ts b/lib/routes/washingtonpost/namespace.ts index 7383ab2bdeb7e38..0ffdf8d3ae072cd 100644 --- a/lib/routes/washingtonpost/namespace.ts +++ b/lib/routes/washingtonpost/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The Washington Post', url: 'www.washingtonpost.com', + lang: 'en', }; diff --git a/lib/routes/watasuke/namespace.ts b/lib/routes/watasuke/namespace.ts index 611159d8ecb99d8..ae1257070b23da8 100644 --- a/lib/routes/watasuke/namespace.ts +++ b/lib/routes/watasuke/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Watasuke', url: 'watasuke.net', categories: ['blog'], + lang: 'ja', }; diff --git a/lib/routes/wchscu/namespace.ts b/lib/routes/wchscu/namespace.ts index 0cb46f3ad89ec94..5672aa3c0394321 100644 --- a/lib/routes/wchscu/namespace.ts +++ b/lib/routes/wchscu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '华西医院', url: 'www.wchscu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/wdc/namespace.ts b/lib/routes/wdc/namespace.ts index bc0a53465f63f1b..558f1ea6a55a271 100644 --- a/lib/routes/wdc/namespace.ts +++ b/lib/routes/wdc/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Western Digital', url: 'support.wdc.com', + lang: 'en', }; diff --git a/lib/routes/web/namespace.ts b/lib/routes/web/namespace.ts index 97a7dd7cbbebd5b..34180b9eb25b082 100644 --- a/lib/routes/web/namespace.ts +++ b/lib/routes/web/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'web.dev', url: 'web.dev', + lang: 'en', }; diff --git a/lib/routes/web3caff/namespace.ts b/lib/routes/web3caff/namespace.ts index e64d1f16383752d..8e1e538741a28b9 100644 --- a/lib/routes/web3caff/namespace.ts +++ b/lib/routes/web3caff/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Web3Caff', url: 'web3caff.com', + lang: 'en', }; diff --git a/lib/routes/wechat/namespace.ts b/lib/routes/wechat/namespace.ts index 8562552c75718f7..6987fff57101d49 100644 --- a/lib/routes/wechat/namespace.ts +++ b/lib/routes/wechat/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip 公众号直接抓取困难,故目前提供几种间接抓取方案,请自行选择 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/weekendhk/namespace.ts b/lib/routes/weekendhk/namespace.ts index 2ef177506ad7a92..29d0d9f495fb23f 100644 --- a/lib/routes/weekendhk/namespace.ts +++ b/lib/routes/weekendhk/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '新假期周刊', url: 'weekendhk.com', + lang: 'zh-HK', }; diff --git a/lib/routes/weibo/namespace.ts b/lib/routes/weibo/namespace.ts index c32bb6e907007b3..63cc25ac81416ea 100644 --- a/lib/routes/weibo/namespace.ts +++ b/lib/routes/weibo/namespace.ts @@ -39,4 +39,5 @@ export const namespace: Namespace = { 的效果为 <img loading="lazy" src="/img/readable-weibo.png" alt="微博小秘书的可读微博 RSS" />`, + lang: 'zh-CN', }; diff --git a/lib/routes/wellcee/namespace.ts b/lib/routes/wellcee/namespace.ts index 8641c71079161b2..0d26e4e4e51a463 100644 --- a/lib/routes/wellcee/namespace.ts +++ b/lib/routes/wellcee/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Wellcee 唯心所寓', url: 'wellcee.com', categories: ['other'], + lang: 'zh-CN', }; diff --git a/lib/routes/wenku8/namespace.ts b/lib/routes/wenku8/namespace.ts index f038d2e87cace0b..bbe8a00ccc75949 100644 --- a/lib/routes/wenku8/namespace.ts +++ b/lib/routes/wenku8/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '轻小说文库', url: 'www.wenku8.net', + lang: 'zh-CN', }; diff --git a/lib/routes/wfdf/namespace.ts b/lib/routes/wfdf/namespace.ts index 12b293edbef65af..9c320595c0f021f 100644 --- a/lib/routes/wfdf/namespace.ts +++ b/lib/routes/wfdf/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'WFDF', url: 'wfdf.sport', + lang: 'en', }; diff --git a/lib/routes/wfu/namespace.ts b/lib/routes/wfu/namespace.ts index 7564b8be46e1018..f6eb66f51cf9368 100644 --- a/lib/routes/wfu/namespace.ts +++ b/lib/routes/wfu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '潍坊学院', url: 'jwc.wfu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/whitehouse/namespace.ts b/lib/routes/whitehouse/namespace.ts index f474dfac6f1c727..ee32b09b0800f00 100644 --- a/lib/routes/whitehouse/namespace.ts +++ b/lib/routes/whitehouse/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The White House', url: 'whitehouse.gov', + lang: 'en', }; diff --git a/lib/routes/who/namespace.ts b/lib/routes/who/namespace.ts index 0fa4d238e3cdb89..6eac9c31c3cfa67 100644 --- a/lib/routes/who/namespace.ts +++ b/lib/routes/who/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'World Health Organization | WHO', url: 'who.int', + lang: 'en', }; diff --git a/lib/routes/whu/namespace.ts b/lib/routes/whu/namespace.ts index 5975ea2cbe441b8..8c4002fbf301cde 100644 --- a/lib/routes/whu/namespace.ts +++ b/lib/routes/whu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '武汉大学', url: 'cs.whu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/wikinews/namespace.ts b/lib/routes/wikinews/namespace.ts index d78d93212e0696a..699533c204a70fc 100644 --- a/lib/routes/wikinews/namespace.ts +++ b/lib/routes/wikinews/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '维基新闻', url: 'zh.wikinews.org', + lang: 'zh-CN', }; diff --git a/lib/routes/winstall/namespace.ts b/lib/routes/winstall/namespace.ts index 6a6f5ac8667863e..41a80d9cadfba45 100644 --- a/lib/routes/winstall/namespace.ts +++ b/lib/routes/winstall/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'winstall', url: 'winstall.app', + lang: 'en', }; diff --git a/lib/routes/wired/namespace.ts b/lib/routes/wired/namespace.ts index 95e58c7f5dff1d3..d7ba3e6fffd233f 100644 --- a/lib/routes/wired/namespace.ts +++ b/lib/routes/wired/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'WIRED', url: 'www.wired.com', categories: ['traditional-media'], + lang: 'en', }; diff --git a/lib/routes/wise/namespace.ts b/lib/routes/wise/namespace.ts index 698a62f2db80c1c..2defa382161eb04 100644 --- a/lib/routes/wise/namespace.ts +++ b/lib/routes/wise/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Wise', url: 'wise.com', + lang: 'en', }; diff --git a/lib/routes/withgoogle/namespace.ts b/lib/routes/withgoogle/namespace.ts index 1e53c171ba06057..cd844c6501e1e1a 100644 --- a/lib/routes/withgoogle/namespace.ts +++ b/lib/routes/withgoogle/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'People + AI Research (PAIR)', url: 'pair.withgoogle.com', + lang: 'en', }; diff --git a/lib/routes/wizfile/namespace.ts b/lib/routes/wizfile/namespace.ts index 35e60772b01ad6f..ac7f6958088eec5 100644 --- a/lib/routes/wizfile/namespace.ts +++ b/lib/routes/wizfile/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'WziFile', url: 'antibody-software.com', + lang: 'en', }; diff --git a/lib/routes/wmc-bj/namespace.ts b/lib/routes/wmc-bj/namespace.ts index 388d297b8b003fa..f53ae8fa368bd9b 100644 --- a/lib/routes/wmc-bj/namespace.ts +++ b/lib/routes/wmc-bj/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'World Meteorological Centre Beijing', url: 'wmc-bj.net', + lang: 'en', }; diff --git a/lib/routes/wmpvp/namespace.ts b/lib/routes/wmpvp/namespace.ts index 827076dda659d9d..e580189f6fc9730 100644 --- a/lib/routes/wmpvp/namespace.ts +++ b/lib/routes/wmpvp/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '完美世界电竞', url: 'wmpvp.com', + lang: 'zh-CN', }; diff --git a/lib/routes/wnacg/namespace.ts b/lib/routes/wnacg/namespace.ts index 5b1dbac6c14d289..e16e02fd82dd1f8 100644 --- a/lib/routes/wnacg/namespace.ts +++ b/lib/routes/wnacg/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '紳士漫畫', url: 'wnacg.org', + lang: 'zh-TW', }; diff --git a/lib/routes/wordpress/namespace.ts b/lib/routes/wordpress/namespace.ts index 9711e33afb8141f..76ed7dd4f8c4c74 100644 --- a/lib/routes/wordpress/namespace.ts +++ b/lib/routes/wordpress/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'wordpress.org', categories: ['blog'], description: '', + lang: 'en', }; diff --git a/lib/routes/worldjournal/namespace.ts b/lib/routes/worldjournal/namespace.ts index fec6b357aa05f0c..b9ed306edc50e0e 100644 --- a/lib/routes/worldjournal/namespace.ts +++ b/lib/routes/worldjournal/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '世界新聞網', url: 'worldjournal.com', + lang: 'zh-TW', }; diff --git a/lib/routes/worldofwarships/namespace.ts b/lib/routes/worldofwarships/namespace.ts index 61c05a260d7d27c..09df36739d966fc 100644 --- a/lib/routes/worldofwarships/namespace.ts +++ b/lib/routes/worldofwarships/namespace.ts @@ -10,4 +10,5 @@ export const namespace: Namespace = { name: '戰艦世界', }, description: 'Tip: use proxy if necessary.', + lang: 'en', }; diff --git a/lib/routes/woshipm/namespace.ts b/lib/routes/woshipm/namespace.ts index 00062097f997fae..e56f0f38ce28711 100644 --- a/lib/routes/woshipm/namespace.ts +++ b/lib/routes/woshipm/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '人人都是产品经理', url: 'woshipm.com', + lang: 'zh-CN', }; diff --git a/lib/routes/wsj/namespace.ts b/lib/routes/wsj/namespace.ts index 24ddb9913fb7046..55f4784553497ed 100644 --- a/lib/routes/wsj/namespace.ts +++ b/lib/routes/wsj/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'The Wall Street Journal (WSJ) 华尔街日报', url: 'cn.wsj.com', + lang: 'zh-CN', }; diff --git a/lib/routes/wsyu/namespace.ts b/lib/routes/wsyu/namespace.ts index b35752d22871ff1..59b80eab0192005 100644 --- a/lib/routes/wsyu/namespace.ts +++ b/lib/routes/wsyu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '武昌首义学院', url: 'www.wsyu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/wtu/namespace.ts b/lib/routes/wtu/namespace.ts index c4c1d1e8f45d0dd..8a76be10fe39b66 100644 --- a/lib/routes/wtu/namespace.ts +++ b/lib/routes/wtu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '武汉纺织大学', url: 'wtu.91wllm.com', + lang: 'zh-CN', }; diff --git a/lib/routes/wyzxwk/namespace.ts b/lib/routes/wyzxwk/namespace.ts index 17510ac901008c1..0a0de5edb4226a7 100644 --- a/lib/routes/wyzxwk/namespace.ts +++ b/lib/routes/wyzxwk/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '乌有之乡', url: 'wyzxwk.com', + lang: 'zh-CN', }; diff --git a/lib/routes/wzu/namespace.ts b/lib/routes/wzu/namespace.ts index c53638a63efe837..a9ff5f16236c832 100644 --- a/lib/routes/wzu/namespace.ts +++ b/lib/routes/wzu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '温州大学', url: 'wzu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/x-mol/namespace.ts b/lib/routes/x-mol/namespace.ts index 76ad6cbd2dd5632..b8969e850c75a01 100644 --- a/lib/routes/x-mol/namespace.ts +++ b/lib/routes/x-mol/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'X-MOL', url: 'x-mol.com', + lang: 'zh-CN', }; diff --git a/lib/routes/x6d/namespace.ts b/lib/routes/x6d/namespace.ts index 7a428f278a1d09b..45ce70377a9fdf9 100644 --- a/lib/routes/x6d/namespace.ts +++ b/lib/routes/x6d/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '小刀娱乐网', url: 'xd.x6d.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xaufe/namespace.ts b/lib/routes/xaufe/namespace.ts index e313c3286d91a93..a87102c0cd9dcf6 100644 --- a/lib/routes/xaufe/namespace.ts +++ b/lib/routes/xaufe/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '西安财经大学', url: 'jiaowu.xaufe.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/xaut/namespace.ts b/lib/routes/xaut/namespace.ts index fddaf8e73e5bde9..f12c27718ab17db 100644 --- a/lib/routes/xaut/namespace.ts +++ b/lib/routes/xaut/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '西安理工大学', url: 'www.xaut.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/xbookcn/namespace.ts b/lib/routes/xbookcn/namespace.ts index 0df530de5c3ed5e..b64c899641970a4 100644 --- a/lib/routes/xbookcn/namespace.ts +++ b/lib/routes/xbookcn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中文成人文學網', url: 'www.xbookcn.net', + lang: 'zh-TW', }; diff --git a/lib/routes/xboxfan/namespace.ts b/lib/routes/xboxfan/namespace.ts index d6a2831f83f7a15..5fd937cbc59906d 100644 --- a/lib/routes/xboxfan/namespace.ts +++ b/lib/routes/xboxfan/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '盒心光环', url: 'xboxfan.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xianbao/namespace.ts b/lib/routes/xianbao/namespace.ts index 2491698de29dc6d..2d61760205b6782 100644 --- a/lib/routes/xianbao/namespace.ts +++ b/lib/routes/xianbao/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '线报酷', url: 'new.xianbao.fun', + lang: 'zh-CN', }; diff --git a/lib/routes/xiaoheihe/namespace.ts b/lib/routes/xiaoheihe/namespace.ts index d38e39b49a9a2f1..c9d88d34fd1eb58 100644 --- a/lib/routes/xiaoheihe/namespace.ts +++ b/lib/routes/xiaoheihe/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '小黑盒', url: 'xiaoheihe.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/xiaohongshu/namespace.ts b/lib/routes/xiaohongshu/namespace.ts index 6dc6c7cc7122463..07cea7d73cd1cd4 100644 --- a/lib/routes/xiaohongshu/namespace.ts +++ b/lib/routes/xiaohongshu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '小红书', url: 'xiaohongshu.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xiaomiyoupin/namespace.ts b/lib/routes/xiaomiyoupin/namespace.ts index affd534069e0013..d454bb657750a6a 100644 --- a/lib/routes/xiaomiyoupin/namespace.ts +++ b/lib/routes/xiaomiyoupin/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '小米有品', url: 'xiaomiyoupin.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xiaote/namespace.ts b/lib/routes/xiaote/namespace.ts index 014ac0445e85242..e8c71544662d24f 100644 --- a/lib/routes/xiaote/namespace.ts +++ b/lib/routes/xiaote/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '小特社区', url: 'xiaote.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xiaoyuzhou/namespace.ts b/lib/routes/xiaoyuzhou/namespace.ts index 9e852ff18d1e86f..4432d735111b521 100644 --- a/lib/routes/xiaoyuzhou/namespace.ts +++ b/lib/routes/xiaoyuzhou/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '小宇宙', url: 'xiaoyuzhoufm.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xiaozhuanlan/namespace.ts b/lib/routes/xiaozhuanlan/namespace.ts index e493b1c8507bbb1..20d8b2ed4dd9ced 100644 --- a/lib/routes/xiaozhuanlan/namespace.ts +++ b/lib/routes/xiaozhuanlan/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '小专栏', url: 'xiaozhuanlan.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xidian/namespace.ts b/lib/routes/xidian/namespace.ts index fe2b9f323219b46..3151cd849e35a7a 100644 --- a/lib/routes/xidian/namespace.ts +++ b/lib/routes/xidian/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '西安电子科技大学', url: 'www.xidian.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ximalaya/namespace.ts b/lib/routes/ximalaya/namespace.ts index 46367a459dd1bd4..e5e0c20550728a8 100644 --- a/lib/routes/ximalaya/namespace.ts +++ b/lib/routes/ximalaya/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '喜马拉雅', url: 'ximalaya.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xinhuanet/namespace.ts b/lib/routes/xinhuanet/namespace.ts index f877f1f974781ab..ca6bda0947add9a 100644 --- a/lib/routes/xinhuanet/namespace.ts +++ b/lib/routes/xinhuanet/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'xinhuanet.com', categories: ['traditional-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/xinpianchang/namespace.ts b/lib/routes/xinpianchang/namespace.ts index d88eb922521a39a..1bd6eafc61f7a7a 100644 --- a/lib/routes/xinpianchang/namespace.ts +++ b/lib/routes/xinpianchang/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '新片场', url: 'xinpianchang.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xjtu/namespace.ts b/lib/routes/xjtu/namespace.ts index 680fda43ba3716c..42a32dd95499203 100644 --- a/lib/routes/xjtu/namespace.ts +++ b/lib/routes/xjtu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '西安交通大学', url: '2yuan.xjtu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/xkb/namespace.ts b/lib/routes/xkb/namespace.ts index 185044dfcebec77..25fe66a02598235 100644 --- a/lib/routes/xkb/namespace.ts +++ b/lib/routes/xkb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '新快报', url: 'xkb.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/xmanhua/namespace.ts b/lib/routes/xmanhua/namespace.ts index 476dfd8936c3361..60b6bdf30106f6f 100644 --- a/lib/routes/xmanhua/namespace.ts +++ b/lib/routes/xmanhua/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'X 漫画', url: 'xmanhua.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xmnn/namespace.ts b/lib/routes/xmnn/namespace.ts index 83bed84171d9fc0..6b7a08ba35c5bf7 100644 --- a/lib/routes/xmnn/namespace.ts +++ b/lib/routes/xmnn/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '厦门网', url: 'epaper.xmnn.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/xmut/namespace.ts b/lib/routes/xmut/namespace.ts index 53ad878f1aa93cc..70b636f10b00328 100644 --- a/lib/routes/xmut/namespace.ts +++ b/lib/routes/xmut/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '厦门理工大学', url: 'jwc.xmut.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/xsijishe/namespace.ts b/lib/routes/xsijishe/namespace.ts index 96d4232a74a2399..222007b13ab2c7e 100644 --- a/lib/routes/xsijishe/namespace.ts +++ b/lib/routes/xsijishe/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '司机社', url: 'xsijishe.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xueqiu/namespace.ts b/lib/routes/xueqiu/namespace.ts index ede7826599ebea0..dfba531b76ee3dc 100644 --- a/lib/routes/xueqiu/namespace.ts +++ b/lib/routes/xueqiu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '雪球', url: 'danjuanapp.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xunhupay/namespace.ts b/lib/routes/xunhupay/namespace.ts index ff61ed9707e2786..5e7bd53be7227af 100644 --- a/lib/routes/xunhupay/namespace.ts +++ b/lib/routes/xunhupay/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '虎皮椒', url: 'www.xunhupay.com', + lang: 'zh-CN', }; diff --git a/lib/routes/xys/namespace.ts b/lib/routes/xys/namespace.ts index a4ea4ec30df0e0f..842c2edc9310cd1 100644 --- a/lib/routes/xys/namespace.ts +++ b/lib/routes/xys/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '新语丝', url: 'xys.org', + lang: 'zh-CN', }; diff --git a/lib/routes/xyzrank/namespace.ts b/lib/routes/xyzrank/namespace.ts index 33524af70b47e75..fad4fd9fe0668c8 100644 --- a/lib/routes/xyzrank/namespace.ts +++ b/lib/routes/xyzrank/namespace.ts @@ -10,4 +10,5 @@ export const namespace: Namespace = { 即,以 [热门节目](https://xyzrank.com/#/) 为例,路由为[\`/xyzrank?limit=50\`](https://rsshub.app/xyzrank?limit=50)。 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/yahoo/namespace.ts b/lib/routes/yahoo/namespace.ts index 80a75c2c77a944b..fc2da8e81d75123 100644 --- a/lib/routes/yahoo/namespace.ts +++ b/lib/routes/yahoo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Yahoo', url: 'hk.news.yahoo.com', + lang: 'zh-HK', }; diff --git a/lib/routes/yamap/namespace.ts b/lib/routes/yamap/namespace.ts index 1c0ffd0d05b0a3b..21ef8397ce3d23c 100644 --- a/lib/routes/yamap/namespace.ts +++ b/lib/routes/yamap/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'YAMAP', url: 'yamap.com', + lang: 'ja', }; diff --git a/lib/routes/yamibo/namespace.ts b/lib/routes/yamibo/namespace.ts index cb184893b5366ef..1704a40fb98bba1 100644 --- a/lib/routes/yamibo/namespace.ts +++ b/lib/routes/yamibo/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '百合会', url: 'yamibo.com', + lang: 'zh-CN', }; diff --git a/lib/routes/yande/namespace.ts b/lib/routes/yande/namespace.ts index fb85bd529117a81..83371c10c93bd56 100644 --- a/lib/routes/yande/namespace.ts +++ b/lib/routes/yande/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'yande.re', url: 'yande.re', description: `yande post`, + lang: 'en', }; diff --git a/lib/routes/yangtzeu/namespace.ts b/lib/routes/yangtzeu/namespace.ts index 33da8158a20f710..221f5cc97fe185b 100644 --- a/lib/routes/yangtzeu/namespace.ts +++ b/lib/routes/yangtzeu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '长江大学', url: 'yangtzeu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/ycwb/namespace.ts b/lib/routes/ycwb/namespace.ts index 71be8e8bbf99ee2..bf70b3da786b188 100644 --- a/lib/routes/ycwb/namespace.ts +++ b/lib/routes/ycwb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '羊城晚报金羊网', url: 'xwlb.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/yenpress/namespace.ts b/lib/routes/yenpress/namespace.ts index 2749ef6d48edf15..daedbb488989d68 100644 --- a/lib/routes/yenpress/namespace.ts +++ b/lib/routes/yenpress/namespace.ts @@ -4,4 +4,5 @@ export const namespace: Namespace = { name: 'Yen Press', url: 'yenpress.com', categories: ['reading'], + lang: 'en', }; diff --git a/lib/routes/ygkkk/namespace.ts b/lib/routes/ygkkk/namespace.ts index cd116d5ed4b926b..7a6c1a4d6dd0505 100644 --- a/lib/routes/ygkkk/namespace.ts +++ b/lib/routes/ygkkk/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '甬哥侃侃侃YouTube教程摘要随笔', url: 'ygkkk.blogspot.com', + lang: 'zh-CN', }; diff --git a/lib/routes/yicai/namespace.ts b/lib/routes/yicai/namespace.ts index 8a4a78e1d4bc869..f6da0a5574cf387 100644 --- a/lib/routes/yicai/namespace.ts +++ b/lib/routes/yicai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '第一财经', url: 'yicai.com', + lang: 'zh-CN', }; diff --git a/lib/routes/yilinzazhi/namespace.ts b/lib/routes/yilinzazhi/namespace.ts index 0aa77f133eb5aa3..9bc96d4a44a339d 100644 --- a/lib/routes/yilinzazhi/namespace.ts +++ b/lib/routes/yilinzazhi/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'www.yilinzazhi.com', categories: ['reading'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/ymgal/namespace.ts b/lib/routes/ymgal/namespace.ts index f595187df05f362..df169dcd4d05306 100644 --- a/lib/routes/ymgal/namespace.ts +++ b/lib/routes/ymgal/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '月幕 Galgame', url: 'ymgal.games', + lang: 'zh-CN', }; diff --git a/lib/routes/yoasobi-music/namespace.ts b/lib/routes/yoasobi-music/namespace.ts index 0bb58dbbb743493..3f9e72503ef4bd4 100644 --- a/lib/routes/yoasobi-music/namespace.ts +++ b/lib/routes/yoasobi-music/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Yoasobi Official', url: 'www.yoasobi-music.jp', + lang: 'ja', }; diff --git a/lib/routes/yomiuri/namespace.ts b/lib/routes/yomiuri/namespace.ts index ab8d90bfe05d4cb..8d252fa3a6e1499 100644 --- a/lib/routes/yomiuri/namespace.ts +++ b/lib/routes/yomiuri/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Yomiuri Shimbun 読売新聞', url: 'www.yomiuri.co.jp', + lang: 'ja', }; diff --git a/lib/routes/yomujp/namespace.ts b/lib/routes/yomujp/namespace.ts index b173c7d6c94e9b7..e4577af7fb5b180 100644 --- a/lib/routes/yomujp/namespace.ts +++ b/lib/routes/yomujp/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '日本語多読道場', url: 'yomujp.com', + lang: 'ja', }; diff --git a/lib/routes/youku/namespace.ts b/lib/routes/youku/namespace.ts index 92ff5cdaa721ba5..8e6635c9f895c56 100644 --- a/lib/routes/youku/namespace.ts +++ b/lib/routes/youku/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '优酷', url: 'i.youku.com', + lang: 'zh-CN', }; diff --git a/lib/routes/youtube/namespace.ts b/lib/routes/youtube/namespace.ts index 87a999a617bdaa4..1ee16b1dd8f48bd 100644 --- a/lib/routes/youtube/namespace.ts +++ b/lib/routes/youtube/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'YouTube', url: 'youtube.com', + lang: 'en', }; diff --git a/lib/routes/youzhiyouxing/namespace.ts b/lib/routes/youzhiyouxing/namespace.ts index 2f957a47e63f1e8..3cd9909935779d0 100644 --- a/lib/routes/youzhiyouxing/namespace.ts +++ b/lib/routes/youzhiyouxing/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '有知有行', url: 'youzhiyouxing.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/yuque/namespace.ts b/lib/routes/yuque/namespace.ts index ae395404b9b6c79..460ebbda06ad3ed 100644 --- a/lib/routes/yuque/namespace.ts +++ b/lib/routes/yuque/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '语雀', url: 'yuque.com', + lang: 'zh-CN', }; diff --git a/lib/routes/yxdown/namespace.ts b/lib/routes/yxdown/namespace.ts index 4dec1c81b3f3f31..969092288d5e09c 100644 --- a/lib/routes/yxdown/namespace.ts +++ b/lib/routes/yxdown/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '游讯网', url: 'yxdown.com', + lang: 'zh-CN', }; diff --git a/lib/routes/yxdzqb/namespace.ts b/lib/routes/yxdzqb/namespace.ts index ec539b1f2d95dda..7519a9c7a1996b9 100644 --- a/lib/routes/yxdzqb/namespace.ts +++ b/lib/routes/yxdzqb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '游戏打折情报', url: 'yxdzqb.com', + lang: 'zh-CN', }; diff --git a/lib/routes/yxrb/namespace.ts b/lib/routes/yxrb/namespace.ts index 144793e970cc68a..ad5a85448ca7fe6 100644 --- a/lib/routes/yxrb/namespace.ts +++ b/lib/routes/yxrb/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '游戏日报', url: 'news.yxrb.net', + lang: 'zh-CN', }; diff --git a/lib/routes/yyets/namespace.ts b/lib/routes/yyets/namespace.ts index 854e9fade248598..f77cc5b53cba57b 100644 --- a/lib/routes/yyets/namespace.ts +++ b/lib/routes/yyets/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '人人影视', url: 'yysub.net', + lang: 'zh-CN', }; diff --git a/lib/routes/yystv/namespace.ts b/lib/routes/yystv/namespace.ts index d9dd87dee36316f..bce52f569926967 100644 --- a/lib/routes/yystv/namespace.ts +++ b/lib/routes/yystv/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '游研社', url: 'yystv.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/zagg/namespace.ts b/lib/routes/zagg/namespace.ts index e1cd7691d38e18d..9cb4ccfbdc45f9d 100644 --- a/lib/routes/zagg/namespace.ts +++ b/lib/routes/zagg/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Zagg', url: 'zagg.com', + lang: 'en', }; diff --git a/lib/routes/zaker/namespace.ts b/lib/routes/zaker/namespace.ts index 1039159e7b7593b..fa33e72fc23703f 100644 --- a/lib/routes/zaker/namespace.ts +++ b/lib/routes/zaker/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ZAKER', url: 'myzaker.com', + lang: 'zh-CN', }; diff --git a/lib/routes/zaobao/namespace.ts b/lib/routes/zaobao/namespace.ts index 15e9a0e18f6f58e..086fcbd7a58dd31 100644 --- a/lib/routes/zaobao/namespace.ts +++ b/lib/routes/zaobao/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::warning 由于 [RSSHub#10309](https://github.com/DIYgod/RSSHub/issues/10309) 中的问题,使用靠近香港的服务器部署将从 hk 版联合早报爬取内容,造成输出的新闻段落顺序错乱。如有订阅此源的需求,建议寻求部署在远离香港的服务器上的 RSSHub,或者在自建时选择远离香港的服务器。 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/zaozao/namespace.ts b/lib/routes/zaozao/namespace.ts index e48ed3bbca6a97d..de8cf9845b88996 100644 --- a/lib/routes/zaozao/namespace.ts +++ b/lib/routes/zaozao/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '前端早早聊', url: 'www.zaozao.run', + lang: 'zh-CN', }; diff --git a/lib/routes/zcmu/namespace.ts b/lib/routes/zcmu/namespace.ts index c6227eb73436b68..af1ee8ce0dbe75b 100644 --- a/lib/routes/zcmu/namespace.ts +++ b/lib/routes/zcmu/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '浙江中医药大学', url: 'jwc.zcmu.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/zcool/namespace.ts b/lib/routes/zcool/namespace.ts index 8a9dc33167fc53c..9b34045666b2c9b 100644 --- a/lib/routes/zcool/namespace.ts +++ b/lib/routes/zcool/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '站酷', url: 'www.zcool.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/zhibo8/namespace.ts b/lib/routes/zhibo8/namespace.ts index b7e6b35661057d3..922250269c40a63 100644 --- a/lib/routes/zhibo8/namespace.ts +++ b/lib/routes/zhibo8/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '直播吧', url: 'zhibo8.cc', + lang: 'zh-CN', }; diff --git a/lib/routes/zhihu/namespace.ts b/lib/routes/zhihu/namespace.ts index b8b63d9c258677f..2f4458086ccf082 100644 --- a/lib/routes/zhihu/namespace.ts +++ b/lib/routes/zhihu/namespace.ts @@ -6,4 +6,5 @@ export const namespace: Namespace = { description: `:::tip 自2024年7月,未登录状态下大部分路由[无法获取全文](https://github.com/DIYgod/RSSHub/issues/16260)。若有需要请在登陆知乎后寻找并添加包含\`z_c0\`的Cookies至环境变量\`ZHIHU_COOKIES\`。 :::`, + lang: 'zh-CN', }; diff --git a/lib/routes/zhitongcaijing/namespace.ts b/lib/routes/zhitongcaijing/namespace.ts index 12f2eb5cce9b249..d23e16e3df70495 100644 --- a/lib/routes/zhitongcaijing/namespace.ts +++ b/lib/routes/zhitongcaijing/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '智通财经网', url: 'zhitongcaijing.com', + lang: 'zh-CN', }; diff --git a/lib/routes/zhiy/namespace.ts b/lib/routes/zhiy/namespace.ts index 3eadab44176a719..82cdf439980b8c1 100644 --- a/lib/routes/zhiy/namespace.ts +++ b/lib/routes/zhiy/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '知园', url: 'zhiy.cc', + lang: 'zh-CN', }; diff --git a/lib/routes/zhonglun/namespace.ts b/lib/routes/zhonglun/namespace.ts index 47b205794dd27cf..8eebd5d582b98c9 100644 --- a/lib/routes/zhonglun/namespace.ts +++ b/lib/routes/zhonglun/namespace.ts @@ -5,4 +5,5 @@ export const namespace: Namespace = { url: 'zhonglun.com', categories: ['new-media'], description: '', + lang: 'zh-CN', }; diff --git a/lib/routes/zhubai/namespace.ts b/lib/routes/zhubai/namespace.ts index 0a03a0fac5d4eed..96fcb953dd8ee30 100644 --- a/lib/routes/zhubai/namespace.ts +++ b/lib/routes/zhubai/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '竹白', url: 'zhubai.love', + lang: 'zh-CN', }; diff --git a/lib/routes/zhujiceping/namespace.ts b/lib/routes/zhujiceping/namespace.ts index cf6c4c11085020c..a400563195fdf82 100644 --- a/lib/routes/zhujiceping/namespace.ts +++ b/lib/routes/zhujiceping/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '国外主机测评', url: 'zhujiceping.com', + lang: 'zh-CN', }; diff --git a/lib/routes/zhuwang/namespace.ts b/lib/routes/zhuwang/namespace.ts index d068e11f4706750..375ae3acdcd7d97 100644 --- a/lib/routes/zhuwang/namespace.ts +++ b/lib/routes/zhuwang/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中国养猪网', url: 'zhujia.zhuwang.cc', + lang: 'zh-CN', }; diff --git a/lib/routes/zimuxia/namespace.ts b/lib/routes/zimuxia/namespace.ts index f8cd437829dc541..a57f519c49985eb 100644 --- a/lib/routes/zimuxia/namespace.ts +++ b/lib/routes/zimuxia/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'FIX 字幕侠', url: 'zimuxia.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/zjgtjy/namespace.ts b/lib/routes/zjgtjy/namespace.ts index 36caf6f7fc48a8a..cbe164abe36c5be 100644 --- a/lib/routes/zjgtjy/namespace.ts +++ b/lib/routes/zjgtjy/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '浙江省土地使用权网上交易系统', url: 'zjgtjy.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/zjol/namespace.ts b/lib/routes/zjol/namespace.ts index a9276423ae9d9b0..197f177514dd685 100644 --- a/lib/routes/zjol/namespace.ts +++ b/lib/routes/zjol/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '浙江在线', url: 'zjol.com.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/zju/namespace.ts b/lib/routes/zju/namespace.ts index f73eb4aab09d7be..9961052f9c6061d 100644 --- a/lib/routes/zju/namespace.ts +++ b/lib/routes/zju/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '浙江大学', url: 'physics.zju.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/zjut/namespace.ts b/lib/routes/zjut/namespace.ts index 6f7d00f6e4ed3ef..4670a812eaa1162 100644 --- a/lib/routes/zjut/namespace.ts +++ b/lib/routes/zjut/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '浙江工业大学', url: 'www.zjut.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/zjuvag/namespace.ts b/lib/routes/zjuvag/namespace.ts index 911d9abb17453ec..4109fe29e619fdc 100644 --- a/lib/routes/zjuvag/namespace.ts +++ b/lib/routes/zjuvag/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '浙江大学可视分析小组', url: 'zjuvag.org', + lang: 'zh-CN', }; diff --git a/lib/routes/zodgame/namespace.ts b/lib/routes/zodgame/namespace.ts index a9c4ce7bbcafe58..c806e92899f2b3d 100644 --- a/lib/routes/zodgame/namespace.ts +++ b/lib/routes/zodgame/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'ZodGame', url: 'zodgame.xyz', + lang: 'en', }; diff --git a/lib/routes/zotero/namespace.ts b/lib/routes/zotero/namespace.ts index ad2b5b6dd23432f..5f81425d8f85404 100644 --- a/lib/routes/zotero/namespace.ts +++ b/lib/routes/zotero/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Zotero', url: 'zotero.org', + lang: 'en', }; diff --git a/lib/routes/zrblog/namespace.ts b/lib/routes/zrblog/namespace.ts index 6d9be6adbe9c73a..8171cf4eab5b5ec 100644 --- a/lib/routes/zrblog/namespace.ts +++ b/lib/routes/zrblog/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '赵容部落', url: 'zrblog.net', + lang: 'zh-CN', }; diff --git a/lib/routes/zsxq/namespace.ts b/lib/routes/zsxq/namespace.ts index bca329d26d85d3d..0e541958e5f997a 100644 --- a/lib/routes/zsxq/namespace.ts +++ b/lib/routes/zsxq/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '知识星球', url: 'zsxq.com', + lang: 'zh-CN', }; diff --git a/lib/routes/zuel/namespace.ts b/lib/routes/zuel/namespace.ts index 91d26273c4b302c..aaf67ee1717a54e 100644 --- a/lib/routes/zuel/namespace.ts +++ b/lib/routes/zuel/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '中南财经政法大学', url: 'wap.zuel.edu.cn', + lang: 'zh-CN', }; diff --git a/lib/routes/zuvio/namespace.ts b/lib/routes/zuvio/namespace.ts index a61932d4735b093..f8454defd4949ca 100644 --- a/lib/routes/zuvio/namespace.ts +++ b/lib/routes/zuvio/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Zuvio', url: 'irs.zuvio.com.tw', + lang: 'zh-TW', }; diff --git a/lib/routes/zyshow/namespace.ts b/lib/routes/zyshow/namespace.ts index cc8275ae613eeb4..823e7c410dd2f67 100644 --- a/lib/routes/zyshow/namespace.ts +++ b/lib/routes/zyshow/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '综艺秀', url: 'zyshow.net', + lang: 'zh-CN', }; diff --git a/lib/routes/zyw/namespace.ts b/lib/routes/zyw/namespace.ts index eb270d22d52782f..79b34167a3e4f02 100644 --- a/lib/routes/zyw/namespace.ts +++ b/lib/routes/zyw/namespace.ts @@ -3,4 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'zyw', url: 'hot.zyw.asia', + lang: 'zh-CN', }; diff --git a/lib/types.ts b/lib/types.ts index 11edaafa90cb6c6..77fe770e827f8c5 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -90,6 +90,8 @@ export type Data = { ttl?: number; }; +type Language = 'en' | 'de' | 'ja' | 'zh-CN' | 'zh-TW' | 'zh-HK' | 'pt' | 'fr' | 'ar-DZ' | 'ar-SA' | 'ar-MA' | 'ar-IQ' | 'ar-KW' | 'ar-TN' | 'fi' | 'it' | 'ru' | 'es' | 'ko' | 'tr' | 'ne' | 'other'; + // namespace interface NamespaceItem { /** @@ -112,6 +114,11 @@ interface NamespaceItem { * Hints and additional explanations for users using this namespace, it will be inserted into the documentation */ description?: string; + + /** + * Main Language of the namespace + */ + lang?: Language; } interface Namespace extends NamespaceItem { From a3ec1fe3dbc9b7a13408b03a308aae3426f39343 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 23:51:23 +0800 Subject: [PATCH 362/740] chore(deps): bump imapflow from 1.0.164 to 1.0.165 (#17403) * chore(deps): bump imapflow from 1.0.164 to 1.0.165 Bumps [imapflow](https://github.com/postalsys/imapflow) from 1.0.164 to 1.0.165. - [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.164...v1.0.165) --- updated-dependencies: - dependency-name: imapflow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install * test: trigger tests --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 43 +++++++++++++++++++++---------------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index d51a2518e37bb02..32e3d1cc66ba337 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", "iconv-lite": "0.6.3", - "imapflow": "1.0.164", + "imapflow": "1.0.165", "instagram-private-api": "1.46.1", "ioredis": "5.4.1", "ip-regex": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a36df51abcc86a8..3e402eaa214ed7b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -126,8 +126,8 @@ importers: specifier: 0.6.3 version: 0.6.3 imapflow: - specifier: 1.0.164 - version: 1.0.164 + specifier: 1.0.165 + version: 1.0.165 instagram-private-api: specifier: 1.46.1 version: 1.46.1 @@ -3555,8 +3555,8 @@ packages: engines: {node: '>=6.9.0'} hasBin: true - imapflow@1.0.164: - resolution: {integrity: sha512-+KAmLrpqq2Q0Ts1imMP4svydfhYznlvlLHhgtTb8NiIcccZvdRNfdHVP8/RrGaw0hy0TOaluawsm/6q+TqdLPw==} + imapflow@1.0.165: + resolution: {integrity: sha512-Q8PC9UVksizRs1t6CgAT1SuHCZXfHrAc1ehrX98Z0WGD+E72YhgCV+s0UbKf8s3ffWq77743Wjhilps5gk/Rqg==} immediate@3.0.6: resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} @@ -4307,8 +4307,8 @@ packages: resolution: {integrity: sha512-7o38Yogx6krdoBf3jCAqnIN4oSQFx+fMa0I7dK1D+me9kBxx12D+/33wSb+fhOCtIxvYJ+4x4IMEhmhCKfAiOA==} engines: {node: '>=6.0.0'} - nodemailer@6.9.14: - resolution: {integrity: sha512-Dobp/ebDKBvz91sbtRKhcznLThrKxKt97GI2FAlAyy+fk19j73Uz3sBXolVtmcXjaorivqsbbbjDY+Jkt4/bQA==} + nodemailer@6.9.16: + resolution: {integrity: sha512-psAuZdTIRN08HKVd/E8ObdV6NO7NTBY3KsC30F7M4H1OnmLCUNaS56FpYxyb26zWLSyYF9Ozch9KYHhHegsiOQ==} engines: {node: '>=6.0.0'} nopt@5.0.0: @@ -4560,14 +4560,14 @@ packages: engines: {node: '>=0.10'} hasBin: true - pino-abstract-transport@1.2.0: - resolution: {integrity: sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==} + pino-abstract-transport@2.0.0: + resolution: {integrity: sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==} pino-std-serializers@7.0.0: resolution: {integrity: sha512-e906FRY0+tV27iq4juKzSYPbUj2do2X2JX4EzSca1631EB2QJQUqGbDuERal7LCtOpxl6x3+nvo9NPZcmjkiFA==} - pino@9.2.0: - resolution: {integrity: sha512-g3/hpwfujK5a4oVbaefoJxezLzsDgLcNJeITvC6yrfwYeT9la+edCK42j5QpEQSQCZgTKapXvnQIdgZwvRaZug==} + pino@9.5.0: + resolution: {integrity: sha512-xSEmD4pLnV54t0NOUN16yCl7RIB1c5UUOse5HSyEXtBp+FgFQyPeDutc+Q2ZO7/22vImV7VfEjH/1zV2QuqvYw==} hasBin: true pluralize@8.0.0: @@ -4599,8 +4599,8 @@ packages: engines: {node: '>=14'} hasBin: true - process-warning@3.0.0: - resolution: {integrity: sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==} + process-warning@4.0.0: + resolution: {integrity: sha512-/MyYDxttz7DfGMMHiysAsFE4qF+pQYAA8ziO/3NcRVrQ5fSk+Mns4QZA/oRPFzvcqNoVJXQNWNAsdwBXLUkQKw==} process@0.11.10: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} @@ -9351,7 +9351,7 @@ snapshots: image-size@0.7.5: {} - imapflow@1.0.164: + imapflow@1.0.165: dependencies: encoding-japanese: 2.2.0 iconv-lite: 0.6.3 @@ -9359,8 +9359,8 @@ snapshots: libmime: 5.3.5 libqp: 2.1.0 mailsplit: 5.4.0 - nodemailer: 6.9.14 - pino: 9.2.0 + nodemailer: 6.9.16 + pino: 9.5.0 socks: 2.8.3 immediate@3.0.6: {} @@ -10190,7 +10190,7 @@ snapshots: nodemailer@6.9.13: {} - nodemailer@6.9.14: {} + nodemailer@6.9.16: {} nopt@5.0.0: dependencies: @@ -10447,21 +10447,20 @@ snapshots: pidtree@0.6.0: {} - pino-abstract-transport@1.2.0: + pino-abstract-transport@2.0.0: dependencies: - readable-stream: 4.5.2 split2: 4.2.0 pino-std-serializers@7.0.0: {} - pino@9.2.0: + pino@9.5.0: dependencies: atomic-sleep: 1.0.0 fast-redact: 3.5.0 on-exit-leak-free: 2.1.2 - pino-abstract-transport: 1.2.0 + pino-abstract-transport: 2.0.0 pino-std-serializers: 7.0.0 - process-warning: 3.0.0 + process-warning: 4.0.0 quick-format-unescaped: 4.0.4 real-require: 0.2.0 safe-stable-stringify: 2.5.0 @@ -10511,7 +10510,7 @@ snapshots: prettier@3.3.3: {} - process-warning@3.0.0: {} + process-warning@4.0.0: {} process@0.11.10: {} From 5225991164342ed315efda130fc7f3ecf6e7a496 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Nov 2024 00:02:40 +0800 Subject: [PATCH 363/740] chore(deps-dev): bump @stylistic/eslint-plugin from 2.9.0 to 2.10.1 (#17405) * chore(deps-dev): bump @stylistic/eslint-plugin from 2.9.0 to 2.10.1 Bumps [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin) from 2.9.0 to 2.10.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/v2.10.1/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@stylistic/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install * test: trigger tests --------- Signed-off-by: dependabot[bot] <support@github.com> 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 32e3d1cc66ba337..f4070adaafa55e2 100644 --- a/package.json +++ b/package.json @@ -142,7 +142,7 @@ "@eslint/eslintrc": "3.1.0", "@eslint/js": "9.13.0", "@microsoft/eslint-formatter-sarif": "3.1.0", - "@stylistic/eslint-plugin": "2.9.0", + "@stylistic/eslint-plugin": "2.10.1", "@types/aes-js": "3.1.4", "@types/babel__preset-env": "7.9.7", "@types/crypto-js": "4.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3e402eaa214ed7b..5b1d1fd13a493c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -280,8 +280,8 @@ importers: specifier: 3.1.0 version: 3.1.0 '@stylistic/eslint-plugin': - specifier: 2.9.0 - version: 2.9.0(eslint@9.13.0)(typescript@5.6.3) + specifier: 2.10.1 + version: 2.10.1(eslint@9.13.0)(typescript@5.6.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -1785,8 +1785,8 @@ packages: resolution: {integrity: sha512-QWLl2P+rsCJeofkDNIT3WFmb6NrRud1SUYW8dIhXK/46XFV8Q/g7Bsvib0Askb0reRLe+WYPeeE+l5cH7SlkuQ==} engines: {node: '>=18'} - '@stylistic/eslint-plugin@2.9.0': - resolution: {integrity: sha512-OrDyFAYjBT61122MIY1a3SfEgy3YCMgt2vL4eoPmvTwDBwyQhAXurxNQznlRD/jESNfYWfID8Ej+31LljvF7Xg==} + '@stylistic/eslint-plugin@2.10.1': + resolution: {integrity: sha512-U+4yzNXElTf9q0kEfnloI9XbOyD4cnEQCxjUI94q0+W++0GAEQvJ/slwEj9lwjDHfGADRSr+Tco/z0XJvmDfCQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' @@ -7286,7 +7286,7 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.9.0(eslint@9.13.0)(typescript@5.6.3)': + '@stylistic/eslint-plugin@2.10.1(eslint@9.13.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) eslint: 9.13.0 From 6021d81d4a8b4f367e7cc506f333a55ba9fa2aa8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Nov 2024 00:22:06 +0800 Subject: [PATCH 364/740] chore(deps-dev): bump eslint-plugin-yml from 1.14.0 to 1.15.0 (#17404) * chore(deps-dev): bump eslint-plugin-yml from 1.14.0 to 1.15.0 Bumps [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) from 1.14.0 to 1.15.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.14.0...v1.15.0) --- updated-dependencies: - dependency-name: eslint-plugin-yml dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install * test: trigger tests --------- Signed-off-by: dependabot[bot] <support@github.com> 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 f4070adaafa55e2..dd8c0334067a223 100644 --- a/package.json +++ b/package.json @@ -176,7 +176,7 @@ "eslint-plugin-n": "17.12.0", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-unicorn": "56.0.0", - "eslint-plugin-yml": "1.14.0", + "eslint-plugin-yml": "1.15.0", "fs-extra": "11.2.0", "globals": "15.11.0", "got": "14.4.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5b1d1fd13a493c3..d604237cc7a2564 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -382,8 +382,8 @@ importers: specifier: 56.0.0 version: 56.0.0(eslint@9.13.0) eslint-plugin-yml: - specifier: 1.14.0 - version: 1.14.0(eslint@9.13.0) + specifier: 1.15.0 + version: 1.15.0(eslint@9.13.0) fs-extra: specifier: 11.2.0 version: 11.2.0 @@ -2009,8 +2009,8 @@ packages: '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} - '@unhead/schema@1.11.10': - resolution: {integrity: sha512-lXh7cm5XtFaw3gc+ZVXTSfIHXiBpAywbjtEiOsz5TR4GxOjj2rtfOAl4C3Difk1yupP6L2otYmOZdn/i8EXSJg==} + '@unhead/schema@1.11.11': + resolution: {integrity: sha512-xSGsWHPBYcMV/ckQeImbrVu6ddeRnrdDCgXUKv3xIjGBY+ob/96V80lGX8FKWh8GwdFSwhblISObKlDAt5K9ZQ==} '@vercel/nft@0.27.5': resolution: {integrity: sha512-b2A7M+4yMHdWKY7xCC+kBEcnMrpaSE84CnuauTjhKKoCEeej0byJMAB8h/RBVnw/HdZOAFVcxR0Izr3LL24FwA==} @@ -2973,8 +2973,8 @@ packages: peerDependencies: eslint: '>=8.56.0' - eslint-plugin-yml@1.14.0: - resolution: {integrity: sha512-ESUpgYPOcAYQO9czugcX5OqRvn/ydDVwGCPXY4YjPqc09rHaUVUA6IE6HLQys4rXk/S+qx3EwTd1wHCwam/OWQ==} + eslint-plugin-yml@1.15.0: + resolution: {integrity: sha512-leC8APYVOsKyWUlvRwVhewytK5wS70BfMqIaUplFstRfzCoVp0YoEroV4cUEvQrBj93tQ3M9LcjO/ewr6D4kjA==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' @@ -7241,7 +7241,7 @@ snapshots: '@scalar/types@0.0.18': dependencies: '@scalar/openapi-types': 0.1.4 - '@unhead/schema': 1.11.10 + '@unhead/schema': 1.11.11 '@sec-ant/readable-stream@0.4.1': {} @@ -7541,7 +7541,7 @@ snapshots: '@ungap/structured-clone@1.2.0': {} - '@unhead/schema@1.11.10': + '@unhead/schema@1.11.11': dependencies: hookable: 5.5.3 zhead: 2.2.4 @@ -8616,7 +8616,7 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-yml@1.14.0(eslint@9.13.0): + eslint-plugin-yml@1.15.0(eslint@9.13.0): dependencies: debug: 4.3.7 eslint: 9.13.0 From aad254be0f5e0502d0e1452a1fe448f177b8c7b9 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 1 Nov 2024 23:39:33 +0700 Subject: [PATCH 365/740] feat(api/category): add categories and lang query params to filter --- lib/api/category/one.ts | 56 +++++++++++++++++++++++++++++++++-------- 1 file changed, 45 insertions(+), 11 deletions(-) diff --git a/lib/api/category/one.ts b/lib/api/category/one.ts index 8ab3cf0b3391497..5aaf9b613d97d59 100644 --- a/lib/api/category/one.ts +++ b/lib/api/category/one.ts @@ -22,14 +22,12 @@ for (const namespace in namespaces) { } } -const ParamsSchema = z.object({ - category: z.string().openapi({ - param: { - name: 'category', - in: 'path', - }, - example: 'popular', - }), +const QuerySchema = z.object({ + categories: z + .string() + .transform((val) => val.split(',')) + .optional(), + lang: z.string().optional(), }); const route = createRoute({ @@ -37,18 +35,54 @@ const route = createRoute({ path: '/category/{category}', tags: ['Category'], request: { - params: ParamsSchema, + query: QuerySchema, + params: z.object({ + category: z.string(), + }), }, responses: { 200: { - description: 'Namespace list by category', + description: 'Namespace list by categories', + content: { + 'application/json': { + schema: z.object({ + data: z.record(z.string(), z.any()), + }), + }, + }, }, }, }); const handler: RouteHandler<typeof route> = (ctx) => { + const { categories, lang } = ctx.req.valid('query'); const { category } = ctx.req.valid('param'); - return ctx.json(categoryList[category]); + + let allCategories = [category]; + if (categories && categories.length > 0) { + allCategories = [...allCategories, ...categories]; + } + + // Get namespaces that exist in all requested categories + const commonNamespaces = Object.keys(categoryList[category] || {}).filter((namespace) => allCategories.every((cat) => categoryList[cat]?.[namespace])); + + // Create result using the path category as key + let result = { + [category]: Object.fromEntries(commonNamespaces.map((namespace) => [namespace, categoryList[category][namespace]])), + }; + + // Filter by language if provided + if (lang) { + result = Object.fromEntries( + Object.entries(result) + .map(([cat, namespaces]) => [cat, Object.fromEntries(Object.entries(namespaces).filter(([, value]) => value.lang === lang))]) + .filter(([, namespaces]) => Object.keys(namespaces).length > 0) + ); + } + + return ctx.json({ + data: result, + }); }; export { route, handler }; From 7976762c4728041a27544ecb213db91aa6fc550d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 2 Nov 2024 00:51:13 +0800 Subject: [PATCH 366/740] chore(deps-dev): bump @types/node from 22.8.4 to 22.8.6 (#17406) * chore(deps-dev): bump @types/node from 22.8.4 to 22.8.6 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.8.4 to 22.8.6. - [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] <support@github.com> * chore: fix pnpm install * test: trigger tests --------- Signed-off-by: dependabot[bot] <support@github.com> 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 dd8c0334067a223..42d67cd2042a749 100644 --- a/package.json +++ b/package.json @@ -159,7 +159,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.8.4", + "@types/node": "22.8.6", "@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 d604237cc7a2564..d50a5caf6f9ab6a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -331,8 +331,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.8.4 - version: 22.8.4 + specifier: 22.8.6 + version: 22.8.6 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -359,7 +359,7 @@ importers: version: 0.27.5 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.8.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.103 version: 0.37.103 @@ -425,10 +425,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.4)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.6)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.8.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1901,8 +1901,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.8.4': - resolution: {integrity: sha512-SpNNxkftTJOPk0oN+y2bIqurEXHTA2AOZ3EJDDKeJ5VzkvvORSvmQXGQarcOzWV1ac7DCaPBEdMDxBsM+d8jWw==} + '@types/node@22.8.6': + resolution: {integrity: sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6861,7 +6861,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.8.4 + '@types/node': 22.8.6 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7335,12 +7335,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.8.4 + '@types/node': 22.8.6 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.8.4 + '@types/node': 22.8.6 '@types/html-to-text@9.0.4': {} @@ -7348,13 +7348,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.8.4 + '@types/node': 22.8.6 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.8.4 + '@types/node': 22.8.6 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7364,7 +7364,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.8.4 + '@types/node': 22.8.6 '@types/jsrsasign@10.5.13': {} @@ -7374,7 +7374,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.8.4 + '@types/node': 22.8.6 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7396,14 +7396,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.8.4 + '@types/node': 22.8.6 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.8.4 + '@types/node': 22.8.6 form-data: 4.0.1 - '@types/node@22.8.4': + '@types/node@22.8.6': dependencies: undici-types: 6.19.8 @@ -7417,7 +7417,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.8.4 + '@types/node': 22.8.6 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7431,7 +7431,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.8.4 + '@types/node': 22.8.6 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7455,7 +7455,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.8.4 + '@types/node': 22.8.6 optional: true '@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': @@ -7564,7 +7564,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.8.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7578,7 +7578,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.8.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10530,7 +10530,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.8.4 + '@types/node': 22.8.6 long: 5.2.3 proxy-agent@6.4.0: @@ -11498,13 +11498,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.8.4): + vite-node@2.0.5(@types/node@22.8.6): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.8.4) + vite: 5.4.10(@types/node@22.8.6) transitivePeerDependencies: - '@types/node' - less @@ -11516,27 +11516,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.4)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.6)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.10(@types/node@22.8.4) + vite: 5.4.10(@types/node@22.8.6) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.8.4): + vite@5.4.10(@types/node@22.8.6): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.3 optionalDependencies: - '@types/node': 22.8.4 + '@types/node': 22.8.6 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.8.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11554,11 +11554,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.8.4) - vite-node: 2.0.5(@types/node@22.8.4) + vite: 5.4.10(@types/node@22.8.6) + vite-node: 2.0.5(@types/node@22.8.6) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.8.4 + '@types/node': 22.8.6 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From afcea8f4ee05bf2f816b16425bec18c8123e3822 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 1 Nov 2024 23:56:42 +0700 Subject: [PATCH 367/740] fix(api/category): codecov issues --- lib/api/category/one.ts | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/api/category/one.ts b/lib/api/category/one.ts index 5aaf9b613d97d59..ebcf5813eb976bc 100644 --- a/lib/api/category/one.ts +++ b/lib/api/category/one.ts @@ -22,6 +22,16 @@ for (const namespace in namespaces) { } } +const ParamsSchema = z.object({ + category: z.string().openapi({ + param: { + name: 'category', + in: 'path', + }, + example: 'popular', + }), +}); + const QuerySchema = z.object({ categories: z .string() @@ -36,20 +46,11 @@ const route = createRoute({ tags: ['Category'], request: { query: QuerySchema, - params: z.object({ - category: z.string(), - }), + params: ParamsSchema, }, responses: { 200: { - description: 'Namespace list by categories', - content: { - 'application/json': { - schema: z.object({ - data: z.record(z.string(), z.any()), - }), - }, - }, + description: 'Namespace list by categories and language', }, }, }); From 6348c1ccecf726217db80bce6f5b3daa5c967f06 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Sat, 2 Nov 2024 00:24:55 +0700 Subject: [PATCH 368/740] fix(api/category): category api return data --- lib/api/category/one.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/lib/api/category/one.ts b/lib/api/category/one.ts index ebcf5813eb976bc..06cadeb6504bf41 100644 --- a/lib/api/category/one.ts +++ b/lib/api/category/one.ts @@ -67,23 +67,15 @@ const handler: RouteHandler<typeof route> = (ctx) => { // Get namespaces that exist in all requested categories const commonNamespaces = Object.keys(categoryList[category] || {}).filter((namespace) => allCategories.every((cat) => categoryList[cat]?.[namespace])); - // Create result using the path category as key - let result = { - [category]: Object.fromEntries(commonNamespaces.map((namespace) => [namespace, categoryList[category][namespace]])), - }; + // Create result directly from common namespaces + let result = Object.fromEntries(commonNamespaces.map((namespace) => [namespace, categoryList[category][namespace]])); // Filter by language if provided if (lang) { - result = Object.fromEntries( - Object.entries(result) - .map(([cat, namespaces]) => [cat, Object.fromEntries(Object.entries(namespaces).filter(([, value]) => value.lang === lang))]) - .filter(([, namespaces]) => Object.keys(namespaces).length > 0) - ); + result = Object.fromEntries(Object.entries(result).filter(([, value]) => value.lang === lang)); } - return ctx.json({ - data: result, - }); + return ctx.json(result); }; export { route, handler }; From f9ec483baec1189c5d2234e0fb057a26d60a4326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=B9=E6=9E=97=E9=87=8C=E6=9C=89=E5=86=B0?= <zhullyb@outlook.com> Date: Sat, 2 Nov 2024 01:43:58 +0800 Subject: [PATCH 369/740] fix(route/zjut): filter out items that should not included (#17409) * fix(route/zjut): filter out items that should not included * camelCase --- lib/routes/zjut/www/index.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/routes/zjut/www/index.ts b/lib/routes/zjut/www/index.ts index 943f939e8d10d8d..4f4fb3ad1f74d57 100644 --- a/lib/routes/zjut/www/index.ts +++ b/lib/routes/zjut/www/index.ts @@ -38,6 +38,7 @@ export const route: Route = { | 通知公告 | 4528 | | 美誉工大 | 5389 | | 智库工大 | 5390 | +| 工大校历 | 4520 | | 校区班车 | xqbc |`, }; @@ -60,7 +61,16 @@ async function handler(ctx) { } else if (!link.startsWith('http')) { link = rootUrl.slice(0, -1) + link; } - const pubDate = timezone(parseDate(cheerioItem.find('.news_meta').text()), +8); + const dateText = cheerioItem.find('.news_meta').text(); + if (!dateText) { + // This should not be included, return an empty item to filter out + return { + title: '', + link: '', + pubDate: Date.now(), + }; + } + const pubDate = timezone(parseDate(dateText), +8); return { title, From 6fc4814b6d5e9f494fb448f8c60cad0633b92f4b Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Sat, 2 Nov 2024 11:03:09 +0800 Subject: [PATCH 370/740] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD=E5=9B=BD?= =?UTF-8?q?=E9=BB=84=E9=87=91=E5=8D=8F=E4=BC=9A=20(#17413)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 中国黄金协会 * Update lib/routes/cngold/namespace.ts --------- --- lib/routes/cngold/index.ts | 195 +++++++++++++++++++++++++++++++++ lib/routes/cngold/namespace.ts | 9 ++ 2 files changed, 204 insertions(+) create mode 100644 lib/routes/cngold/index.ts create mode 100644 lib/routes/cngold/namespace.ts diff --git a/lib/routes/cngold/index.ts b/lib/routes/cngold/index.ts new file mode 100644 index 000000000000000..3787256522bc113 --- /dev/null +++ b/lib/routes/cngold/index.ts @@ -0,0 +1,195 @@ +import { Route } from '@/types'; + +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +export const handler = async (ctx) => { + const { category = 'news-325' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 12; + + const rootUrl = 'https://www.cngold.org.cn'; + const currentUrl = new URL(`${category}.html`, rootUrl).href; + + const { data: response } = await got(currentUrl); + + const $ = load(response); + + const language = $('html').prop('lang'); + + let items = $('ul.newsList li') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + return { + title: item.find('t1').text(), + pubDate: parseDate(item.find('div.min, div.day').text(), ['YYYY-MM-DD', 'MM-DD']), + link: new URL(item.find('a').prop('href'), rootUrl).href, + language, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + const title = $$('div.details_top div.t1').text(); + const description = $$('div.details_con').html(); + + item.title = title; + item.description = description; + item.pubDate = parseDate($$('div.details_top div.min span').first().text()); + item.author = $$('div.details_top div.min span').last().text().split(/:/).pop(); + item.content = { + html: description, + text: $$('div.details_con').text(), + }; + item.language = language; + + return item; + }) + ) + ); + + const image = new URL($('div.logo img').prop('src'), rootUrl).href; + + return { + title: `${$('title').text()} - ${$('div.tab a.current').text()}`, + description: $('meta[name="description"]').prop('content'), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: $('meta[name="keywords"]').prop('content'), + language, + }; +}; + +export const route: Route = { + path: '/:category?', + name: '分类', + url: 'www.cngold.org.cn', + maintainers: ['nczitzk'], + handler, + example: '/cngold/news-325', + parameters: { category: '分类,默认为 `news-325`,即行业资讯,可在对应分类页 URL 中找到, Category, `news-325`,即行业资讯by default' }, + description: `:::tip + 若订阅 [行业资讯](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-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) | + + <details> + <summary>更多分类</summary> + + #### [政策法规](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/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/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) | + + </details> + `, + categories: ['new-media'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.cngold.org.cn/:category?'], + target: (params) => { + const category = params.category; + + return category ? `/${category}` : ''; + }, + }, + { + title: '政策法规 - 法律法规', + source: ['www.cngold.org.cn/policies-245.html'], + target: '/policies-245', + }, + { + title: '政策法规 - 产业政策', + source: ['www.cngold.org.cn/policies-262.html'], + target: '/policies-262', + }, + { + title: '政策法规 - 黄金标准', + source: ['www.cngold.org.cn/policies-281.html'], + target: '/policies-281', + }, + { + title: '行业培训 - 黄金投资分析师', + source: ['www.cngold.org.cn/training-242.html'], + target: '/training-242', + }, + { + title: '行业培训 - 教育部1+X', + source: ['www.cngold.org.cn/training-246.html'], + target: '/training-246', + }, + { + title: '行业培训 - 矿业权评估师', + source: ['www.cngold.org.cn/training-338.html'], + target: '/training-338', + }, + { + title: '行业培训 - 其他培训', + source: ['www.cngold.org.cn/training-247.html'], + target: '/training-247', + }, + { + title: '黄金科技 - 黄金协会科学技术奖', + source: ['www.cngold.org.cn/technology-318.html'], + target: '/technology-318', + }, + { + title: '黄金科技 - 科学成果评价', + source: ['www.cngold.org.cn/technology-319.html'], + target: '/technology-319', + }, + { + title: '黄金科技 - 新技术推广', + source: ['www.cngold.org.cn/technology-320.html'], + target: '/technology-320', + }, + { + title: '黄金科技 - 黄金技术大会', + source: ['www.cngold.org.cn/technology-350.html'], + target: '/technology-350', + }, + ], +}; diff --git a/lib/routes/cngold/namespace.ts b/lib/routes/cngold/namespace.ts new file mode 100644 index 000000000000000..e57011db5594753 --- /dev/null +++ b/lib/routes/cngold/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国黄金协会', + url: 'cngold.org.cn', + categories: ['new-media'], + description: '', + lang: 'zh-CN', +}; From f17408d98aaab598e53bea9da793242e6aa2c11d Mon Sep 17 00:00:00 2001 From: liyaozhong <yun.zhongyue@163.com> Date: Sat, 2 Nov 2024 11:23:00 +0800 Subject: [PATCH 371/740] feat(route): add nielsberglund (#17398) fix(route): fix pr issue --- lib/routes/nielsberglund/index.ts | 78 +++++++++++++++++++++++++++ lib/routes/nielsberglund/namespace.ts | 7 +++ 2 files changed, 85 insertions(+) create mode 100644 lib/routes/nielsberglund/index.ts create mode 100644 lib/routes/nielsberglund/namespace.ts diff --git a/lib/routes/nielsberglund/index.ts b/lib/routes/nielsberglund/index.ts new file mode 100644 index 000000000000000..5f4122948a34cf1 --- /dev/null +++ b/lib/routes/nielsberglund/index.ts @@ -0,0 +1,78 @@ +import { Route, DataItem } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import cache from '@/utils/cache'; + +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/nielsberglund/blog', + radar: [ + { + source: ['nielsberglund.com/'], + }, + ], + url: 'nielsberglund.com/', + name: 'Blog', + maintainers: ['liyaozhong'], + handler, + description: 'Niels Berglund Blog Posts', +}; + +async function handler() { + const rootUrl = 'https://nielsberglund.com'; + const currentUrl = rootUrl; + + const response = await got(currentUrl); + const $ = load(response.data); + + let items = $('.post-preview') + .toArray() + .map((item) => { + const $item = $(item); + const $link = $item.find('a').first(); + const href = $link.attr('href'); + const title = $item.find('.post-title').first().text().trim(); + const dateStr = $item.find('.post-meta').text().trim(); + + if (!href || !title) { + return null; + } + + const link = new URL(href, rootUrl).href; + const pubDate = parseDate(dateStr); + + return { + title, + link, + pubDate, + } as DataItem; + }) + .filter((item): item is DataItem => item !== null); + + items = ( + await Promise.all( + items.map((item) => + cache.tryGet(item.link as string, async () => { + try { + const detailResponse = await got(item.link); + const $detail = load(detailResponse.data); + + item.description = $detail('.post-container').html() || ''; + + return item; + } catch { + return item; + } + }) + ) + ) + ).filter((item): item is DataItem => item !== null); + + return { + title: 'Niels Berglund Blog', + link: rootUrl, + item: items, + }; +} diff --git a/lib/routes/nielsberglund/namespace.ts b/lib/routes/nielsberglund/namespace.ts new file mode 100644 index 000000000000000..4f221a7f49a1e00 --- /dev/null +++ b/lib/routes/nielsberglund/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Niels Berglund Blog', + url: 'nielsberglund.com', + lang: 'en', +}; From e9e095069256f1c1d623a7da88ba544aedc2a3c9 Mon Sep 17 00:00:00 2001 From: DFobain <dfobain@follow.re> Date: Sat, 2 Nov 2024 19:41:19 +0800 Subject: [PATCH 372/740] fix(route/follow): users link (#17417) --- lib/routes/follow/profile.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/follow/profile.ts b/lib/routes/follow/profile.ts index 5301a2a5436222d..f736026c91af97b 100644 --- a/lib/routes/follow/profile.ts +++ b/lib/routes/follow/profile.ts @@ -19,7 +19,7 @@ export const route: Route = { }, ], handler, - maintainers: ['KarasuShin', 'DIYgod'], + maintainers: ['KarasuShin', 'DIYgod', 'DFobain'], features: { supportRadar: true, }, @@ -64,7 +64,7 @@ async function handler(ctx: Context): Promise<Data> { category: subscription.category ? [subscription.category] : undefined, }; }), - link: `https://app.follow.is/share/user/${handleOrId}`, + link: `https://app.follow.is/share/users/${handleOrId}`, image: profile.data.image, }; } From 56d4c5e4e7288a0346879bd50f4a8b435f152f85 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Sat, 2 Nov 2024 19:38:16 +0700 Subject: [PATCH 373/740] refactor(route/telegram): use log instead of console to resolve eslint issue --- .../telegram/scripts/get-telegram-session.mjs | 13 ++++++++----- pnpm-lock.yaml | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/lib/routes/telegram/scripts/get-telegram-session.mjs b/lib/routes/telegram/scripts/get-telegram-session.mjs index a819073d66fe9d3..4564411001d0b7f 100644 --- a/lib/routes/telegram/scripts/get-telegram-session.mjs +++ b/lib/routes/telegram/scripts/get-telegram-session.mjs @@ -1,6 +1,9 @@ import { TelegramClient } from 'telegram'; import { StringSession } from 'telegram/sessions/index.js'; import readline from 'readline'; +import debug from 'debug'; + +const log = debug('telegram:session'); function userInput(question) { const rl = readline.createInterface({ @@ -16,7 +19,7 @@ function userInput(question) { } async function getSessionString() { - const apiId = parseInt(await userInput('Please enter your API ID: ')); + const apiId = Number.parseInt(await userInput('Please enter your API ID: ')); const apiHash = await userInput('Please enter your API Hash: '); const stringSession = new StringSession(''); const client = new TelegramClient(stringSession, apiId, apiHash, { @@ -26,16 +29,16 @@ async function getSessionString() { phoneNumber: async () => await userInput('Please enter your phone number: '), password: async () => await userInput('Please enter your password: '), phoneCode: async () => await userInput('Please enter the code you received: '), - onError: (err) => console.log(err), + onError: (err) => log('Error:', err), }); - console.log('You are now connected.'); + log('You are now connected.'); const sessionString = client.session.save(); + log('Your session string is:', sessionString); - console.log('Your session string is:', sessionString); await client.disconnect(); return sessionString; } // Run the function -getSessionString().catch(console.error); +getSessionString().catch((error) => log('Error:', error)); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d50a5caf6f9ab6a..362fbe164f5424e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8819,7 +8819,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.3.7 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -10536,7 +10536,7 @@ snapshots: proxy-agent@6.4.0: dependencies: agent-base: 7.1.1 - debug: 4.3.4 + debug: 4.3.7 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 lru-cache: 7.18.3 From 797470c0dbd79c52ebf0a28ad47b678fc52c6708 Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Sat, 2 Nov 2024 21:08:14 +0800 Subject: [PATCH 374/740] =?UTF-8?q?fix(route):=20=E4=BF=AE=E5=A4=8D=20bili?= =?UTF-8?q?bili=20=E5=8A=A8=E6=80=81=E8=B7=AF=E7=94=B1=E5=9C=A8=E9=83=A8?= =?UTF-8?q?=E5=88=86=E6=83=85=E5=86=B5=E4=B8=8B=E5=87=BA=E7=8E=B0=E7=A9=BA?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E7=9A=84=E9=97=AE=E9=A2=98=20(#17420)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #17414 --- lib/routes/bilibili/dynamic.ts | 11 +++++++---- lib/routes/bilibili/templates/description.art | 2 ++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/routes/bilibili/dynamic.ts b/lib/routes/bilibili/dynamic.ts index b5b21cf88f7e56a..cd1ffb353179f5a 100644 --- a/lib/routes/bilibili/dynamic.ts +++ b/lib/routes/bilibili/dynamic.ts @@ -117,6 +117,7 @@ const getIframe = (data?: Modules, embed: boolean = true) => { if (aid === undefined && bvid === undefined) { return ''; } + // 不通过 utils.renderUGCDescription 渲染 img/description 以兼容其他格式的动态 return utils.renderUGCDescription(embed, '', '', aid, undefined, bvid); }; @@ -146,7 +147,10 @@ const getImgs = (data?: Modules) => { if (major[type]?.cover) { imgUrls.push(major[type].cover); } - return imgUrls.map((url) => `<img src="${url}">`).join(''); + return imgUrls + .filter(Boolean) + .map((url) => `<img src="${url}">`) + .join(''); }; const getUrl = (item?: Item2, useAvid = false) => { @@ -354,10 +358,9 @@ async function handler(ctx) { // 换行处理 description = description.replaceAll('\r\n', '<br>').replaceAll('\n', '<br>'); originDescription = originDescription.replaceAll('\r\n', '<br>').replaceAll('\n', '<br>'); - - const descriptions = [description, originDescription, urlText, originUrlText, getIframe(data, embed), getIframe(origin, embed), getImgs(data), getImgs(origin)] - .filter(Boolean) + const descriptions = [description, getIframe(data, embed), getImgs(data), urlText, originDescription, getIframe(origin, embed), getImgs(origin), originUrlText] .map((e) => e?.trim()) + .filter(Boolean) .join('<br>'); return { diff --git a/lib/routes/bilibili/templates/description.art b/lib/routes/bilibili/templates/description.art index 65e2261cfd8687f..5f6e5847d51ec8e 100644 --- a/lib/routes/bilibili/templates/description.art +++ b/lib/routes/bilibili/templates/description.art @@ -7,6 +7,8 @@ {{ /if }} <br> {{ /if }} +{{ if img}} <img src="{{ img }}"> <br> +{{ /if }} {{@ description }} From c28516582afaf99240cd6f1a0870da1e9ee900ee Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Sat, 2 Nov 2024 22:03:48 +0700 Subject: [PATCH 375/740] fix(route/google): missing title, author and content --- lib/routes/google/news.ts | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/lib/routes/google/news.ts b/lib/routes/google/news.ts index 39ba4b38bcf92d8..c0f2bb5a690c8f4 100644 --- a/lib/routes/google/news.ts +++ b/lib/routes/google/news.ts @@ -3,7 +3,7 @@ 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 { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; @@ -25,7 +25,7 @@ export const route: Route = { supportScihub: false, }, name: 'News', - maintainers: ['zoenglinghou'], + maintainers: ['zoenglinghou', 'pseudoyu'], handler, }; @@ -34,7 +34,7 @@ async function handler(ctx) { const locale = ctx.req.param('locale'); const categoryUrls = await cache.tryGet(`google:news:${locale}`, async () => { - const { data: front_data } = await got(`${baseUrl}/?${locale}`); + const front_data = await ofetch(`${baseUrl}/?${locale}`); const $ = load(front_data); return [ @@ -61,14 +61,32 @@ async function handler(ctx) { }); const categoryUrl = categoryUrls.find((item) => item.category === category).url; - const { data } = await got(categoryUrl); + const data = await ofetch(categoryUrl); const $ = load(data); const list = [...$('.UwIKyb'), ...$('.IBr9hb'), ...$('.IFHyqb')]; // 3 rows of news, 3-rows-wide news, single row news const items = list.map((item) => { item = $(item); - const title = item.find('h4').text(); + + const title = item.find('.gPFEn').text(); + + const authorText = item.find('.bInasb span').text(); + const authors = authorText + ? authorText + .replace(/^By\s+/i, '') // Handle 'By' case-insensitively + .replaceAll(/\s+\([^)]*\)/g, '') // Remove parenthetical info like (She/Her) + .split(/,|\s+&\s+|\s+and\s+/) // Split on comma, &, and 'and' + .map((author) => author.trim()) + .filter((author) => { + // Filter out empty strings and common suffixes + if (!author) {return false;} + const suffixes = ['et al', 'et al.']; + return !suffixes.some((suffix) => author.toLowerCase().endsWith(suffix)); + }) + .map((author) => ({ name: author })) + : []; + return { title, description: art(path.join(__dirname, 'templates/news.art'), { @@ -76,7 +94,7 @@ async function handler(ctx) { brief: title, }), pubDate: parseDate(item.find('time').attr('datetime')), - author: item.find('.oovtQ').text(), + author: authors, link: new URL(item.find('a.WwrzSb').first().attr('href'), baseUrl).href, }; }); From eda1e39ccd344713b84bd0b0da550f91b03f7c3a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 2 Nov 2024 15:06:23 +0000 Subject: [PATCH 376/740] style: auto format --- lib/routes/google/news.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/google/news.ts b/lib/routes/google/news.ts index c0f2bb5a690c8f4..025da3e1bf1e543 100644 --- a/lib/routes/google/news.ts +++ b/lib/routes/google/news.ts @@ -80,7 +80,9 @@ async function handler(ctx) { .map((author) => author.trim()) .filter((author) => { // Filter out empty strings and common suffixes - if (!author) {return false;} + if (!author) { + return false; + } const suffixes = ['et al', 'et al.']; return !suffixes.some((suffix) => author.toLowerCase().endsWith(suffix)); }) From 74f56f77a425c090cdf1de9889bdaa226f06bd34 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Sat, 2 Nov 2024 23:54:26 +0700 Subject: [PATCH 377/740] fix(route/abc): undefine item url & use ofetch --- lib/routes/abc/index.ts | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/routes/abc/index.ts b/lib/routes/abc/index.ts index b78985a76aaf8c6..770ef16c4bc1024 100644 --- a/lib/routes/abc/index.ts +++ b/lib/routes/abc/index.ts @@ -3,7 +3,7 @@ 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 { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; @@ -11,6 +11,7 @@ import path from 'node:path'; export const route: Route = { path: '/:category{.+}?', + example: '/wa', radar: [ { source: ['abc.net.au/:category*'], @@ -30,7 +31,7 @@ export const route: Route = { The supported channels are all listed in the table below. For other channels, please find the \`documentId\` in the source code of the channel page and fill it in as above. :::`, - maintainers: ['nczitzk'], + maintainers: ['nczitzk', 'pseudoyu'], handler, }; @@ -50,18 +51,18 @@ async function handler(ctx) { documentId = category; const feedUrl = new URL(`news/feed/${documentId}/rss.xml`, rootUrl).href; - const { data: feedResponse } = await got(feedUrl); + const feedResponse = await ofetch(feedUrl); currentUrl = feedResponse.match(/<link>([\w-./:?]+)<\/link>/)[1]; } - const { data: currentResponse } = await got(currentUrl); + const currentResponse = await ofetch(currentUrl); const $ = load(currentResponse); documentId = documentId ?? $('div[data-uri^="coremedia://collection/"]').first().prop('data-uri').split(/\//).pop(); - const { data: response } = await got(apiUrl, { - searchParams: { + const response = await ofetch(apiUrl, { + query: { name: 'PaginationArticles', documentId, size: limit, @@ -71,7 +72,7 @@ async function handler(ctx) { let items = response.collection.slice(0, limit).map((i) => { const item = { title: i.title.children ?? i.title, - link: new URL(i.link.to, rootUrl).href, + link: i.link.startsWith('https://') ? i.link : new URL(i.link, rootUrl).href, description: art(path.join(__dirname, 'templates/description.art'), { image: i.image ? { @@ -99,7 +100,7 @@ async function handler(ctx) { items.map((item) => cache.tryGet(item.link, async () => { try { - const { data: detailResponse } = await got(item.link); + const detailResponse = await ofetch(item.link); const content = load(detailResponse); @@ -173,7 +174,7 @@ async function handler(ctx) { ) ); - const icon = new URL($('link[rel="apple-touch-icon"]').prop('href'), rootUrl).href; + const icon = new URL($('link[rel="apple-touch-icon"]').prop('href') || '', rootUrl).href; return { item: items, From a63c8b0d60ca5b280386bc3de93e0df7e4e0d0ee Mon Sep 17 00:00:00 2001 From: liyaozhong <yun.zhongyue@163.com> Date: Sun, 3 Nov 2024 14:05:35 +0800 Subject: [PATCH 378/740] feat(route): add langchain dev blog (#17415) fix(route): fix pr issue --- lib/routes/langchain/index.ts | 74 +++++++++++++++++++++++++++++++ lib/routes/langchain/namespace.ts | 7 +++ 2 files changed, 81 insertions(+) create mode 100644 lib/routes/langchain/index.ts create mode 100644 lib/routes/langchain/namespace.ts diff --git a/lib/routes/langchain/index.ts b/lib/routes/langchain/index.ts new file mode 100644 index 000000000000000..7dc1bf1ac96cb11 --- /dev/null +++ b/lib/routes/langchain/index.ts @@ -0,0 +1,74 @@ +import { Route, DataItem } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import cache from '@/utils/cache'; + +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/langchain/blog', + radar: [ + { + source: ['blog.langchain.dev/'], + }, + ], + url: 'blog.langchain.dev/', + name: 'Blog', + maintainers: ['liyaozhong'], + handler, + description: 'LangChain Blog Posts', +}; + +async function handler() { + const rootUrl = 'https://blog.langchain.dev'; + const currentUrl = rootUrl; + + const response = await got(currentUrl); + const $ = load(response.data); + + const items = await Promise.all( + $('.posts-feed .post-card') + .toArray() + .map((item) => { + const $item = $(item); + const $link = $item.find('.post-card__content-link').first(); + + const href = $link.attr('href'); + const title = $item.find('.post-card__title').text().trim(); + const excerpt = $item.find('.post-card__excerpt').text().trim(); + + if (!href || !title) { + return null; + } + + const link = new URL(href, rootUrl).href; + + return { + title, + description: excerpt, + link, + } as DataItem; + }) + .filter((item): item is DataItem => item !== null) + .map((item) => + cache.tryGet(item.link as string, async () => { + try { + const detailResponse = await got(item.link); + const $detail = load(detailResponse.data); + + item.description = $detail('.article-content').html() || item.description; + + return item as DataItem; + } catch { + return item; + } + }) + ) + ); + + return { + title: 'LangChain Blog', + link: rootUrl, + item: items.filter((item): item is DataItem => item !== null), + }; +} diff --git a/lib/routes/langchain/namespace.ts b/lib/routes/langchain/namespace.ts new file mode 100644 index 000000000000000..04b5fcbddf12664 --- /dev/null +++ b/lib/routes/langchain/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'LangChain Blog', + url: 'blog.langchain.dev', + lang: 'en', +}; From 35536f45ad5693ab778c19d33c7c1d5c8901b200 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Sun, 3 Nov 2024 18:03:20 +0800 Subject: [PATCH 379/740] feat(route/caixin): Add full text fetch (#17231) * feat(route/caixin): Add full text fetch * . * Update blog.ts * Update utils.ts * Update utils.ts * Update utils-fulltext.ts * Update utils-fulltext.ts --- lib/config.ts | 6 +++ lib/routes/caixin/article.ts | 2 +- lib/routes/caixin/blog.ts | 5 +- lib/routes/caixin/category.ts | 2 +- lib/routes/caixin/latest.ts | 23 +++------ lib/routes/caixin/namespace.ts | 2 +- lib/routes/caixin/utils-fulltext.ts | 49 +++++++++++++++++++ lib/routes/caixin/utils.ts | 74 ++++++++++++++--------------- 8 files changed, 104 insertions(+), 59 deletions(-) create mode 100644 lib/routes/caixin/utils-fulltext.ts diff --git a/lib/config.ts b/lib/config.ts index 2d7437bdf16f751..785e7d6ad8e2097 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -94,6 +94,9 @@ export type Config = { bupt: { portal_cookie?: string; }; + caixin: { + cookie?: string; + }; civitai: { cookie?: string; }; @@ -500,6 +503,9 @@ const calculateValue = () => { bupt: { portal_cookie: envs.BUPT_PORTAL_COOKIE, }, + caixin: { + cookie: envs.CAIXIN_COOKIE, + }, civitai: { cookie: envs.CIVITAI_COOKIE, }, diff --git a/lib/routes/caixin/article.ts b/lib/routes/caixin/article.ts index 9ab71ea06953fbc..1fd50c39203a2d9 100644 --- a/lib/routes/caixin/article.ts +++ b/lib/routes/caixin/article.ts @@ -42,7 +42,7 @@ async function handler() { audio_image_url: item.audio_image_url, })); - const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); + const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => parseArticle(item)))); return { title: '财新网 - 首页', diff --git a/lib/routes/caixin/blog.ts b/lib/routes/caixin/blog.ts index 4c5b6849ef0795e..90997606aca5bc5 100644 --- a/lib/routes/caixin/blog.ts +++ b/lib/routes/caixin/blog.ts @@ -67,8 +67,7 @@ async function handler(ctx) { pubDate: parseDate(item.publishTime, 'x'), })); - const items = await Promise.all(posts.map((item) => parseBlogArticle(item, cache.tryGet))); - + const items = await Promise.all(posts.map((item) => cache.tryGet(item.link, () => parseBlogArticle(item)))); return { title: `财新博客 - ${authorName}`, link, @@ -90,7 +89,7 @@ async function handler(ctx) { link: item.postUrl.replace('http://', 'https://'), pubDate: parseDate(item.publishTime, 'x'), })); - const items = await Promise.all(posts.map((item) => parseBlogArticle(item, cache.tryGet))); + const items = await Promise.all(posts.map((item) => cache.tryGet(item.link, () => parseBlogArticle(item)))); return { title: `财新博客 - 全部`, diff --git a/lib/routes/caixin/category.ts b/lib/routes/caixin/category.ts index 60f17b21aad69f3..7dc456c37c1145a 100644 --- a/lib/routes/caixin/category.ts +++ b/lib/routes/caixin/category.ts @@ -83,7 +83,7 @@ async function handler(ctx) { audio_image_url: item.pict.imgs[0].url, })); - const items = await Promise.all(list.map((item) => parseArticle(item, cache.tryGet))); + const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => parseArticle(item)))); return { title, diff --git a/lib/routes/caixin/latest.ts b/lib/routes/caixin/latest.ts index e8615ac03309eb6..b6b23a9b27cb0e0 100644 --- a/lib/routes/caixin/latest.ts +++ b/lib/routes/caixin/latest.ts @@ -1,12 +1,9 @@ import { Route, ViewType } from '@/types'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); +import { getFulltext } from './utils-fulltext'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { load } from 'cheerio'; -import { art } from '@/utils/render'; -import path from 'node:path'; +import { parseArticle } from './utils'; export const route: Route = { path: '/latest', @@ -31,10 +28,10 @@ export const route: Route = { maintainers: ['tpnonthealps'], handler, url: 'caixin.com/', - description: `说明:此 RSS feed 会自动抓取财新网的最新文章,但不包含 FM 及视频内容。`, + description: `说明:此 RSS feed 会自动抓取财新网的最新文章,但不包含 FM 及视频内容。订阅用户可根据文档设置环境变量后,在url传入\`fulltext=\`以解锁全文。`, }; -async function handler() { +async function handler(ctx) { const { data } = await got('https://gateway.caixin.com/api/dataplatform/scroll/index'); const list = data.data.articleList @@ -49,21 +46,15 @@ async function handler() { const rss = await Promise.all( list.map((item) => cache.tryGet(`caixin:latest:${item.link}`, async () => { - const entry_r = await got(item.link); - const $ = load(entry_r.data); - // desc - const desc = art(path.join(__dirname, 'templates/article.art'), { - item, - $, - }); + const desc = await parseArticle(item); - item.description = desc; + item.description = ctx.req.query('fulltext') === 'true' ? ((await getFulltext(item.link)) ?? desc.description) : desc.description; // prevent cache coliision with /caixin/article and /caixin/:column/:category // since those have podcasts item.guid = `caixin:latest:${item.link}`; - return item; + return { ...desc, ...item }; }) ) ); diff --git a/lib/routes/caixin/namespace.ts b/lib/routes/caixin/namespace.ts index 7a363a9004eb3b7..b00547f4e02ca1a 100644 --- a/lib/routes/caixin/namespace.ts +++ b/lib/routes/caixin/namespace.ts @@ -3,6 +3,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '财新博客', url: 'caixin.com', - description: `> 网站部分内容需要付费订阅,RSS 仅做更新提醒,不含付费内容。`, + description: `> 网站部分内容需要付费订阅,RSS 仅做更新提醒,不含付费内容。若需要得到付费内容全文,请使用订阅账户在手机网页版登录,然后设置\`CAIXIN_COOKIE\`为至少包含cookie中的以下字段: \`SA_USER_UID\`, \`SA_USER_UNIT\`, \`SA_USER_DEVICE_TYPE\`, \`USER_LOGIN_CODE\``, lang: 'zh-CN', }; diff --git a/lib/routes/caixin/utils-fulltext.ts b/lib/routes/caixin/utils-fulltext.ts new file mode 100644 index 000000000000000..c224dbd23ed661b --- /dev/null +++ b/lib/routes/caixin/utils-fulltext.ts @@ -0,0 +1,49 @@ +import crypto from 'crypto'; +import { hextob64, KJUR } from 'jsrsasign'; +import ofetch from '@/utils/ofetch'; +import { config } from '@/config'; + + +// The following constant is extracted from this script: https://file.caixin.com/pkg/cx-pay-layer/js/wap.js?v=5.15.421933 . It is believed to contain no sensitive information. +// Refer to this discussion for further explanation: https://github.com/DIYgod/RSSHub/pull/17231 +const rsaPrivateKey = + '-----BEGIN PRIVATE KEY-----MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCLci8q2u3NGFyFlMUwjCP91PsvGjHdRAq9fmqZLxvue+n+RhzNxnKKYOv35pLgFKWXsGq2TV+5Xrv6xZgNx36IUkqbmrO+eCa8NFmti04wvMfG3DCNdKA7Lue880daNiK3BOhlQlZPykUXt1NftMNS/z+e70W+Vpv1ZxCx5BipqZkdoceM3uin0vUQmqmHqjxi5qKUuov90dXLaMxypCA0TDsIDnX8RPvPtqKff1p2TMW2a0XYe7CPYhRggaQMpmo0TcFutgrM1Vywyr2TPxYR+H/tpuuWRET7tUIQykBYoO1WKfL2dX6cxarjAJfnYnod3sMzppHouyp8Pt7gHVG7AgMBAAECggEAEFshSy6IrADKgWSUyH/3jMNZfwnchW6Ar/9O847CAPQJ2yhQIpa/Qpnhs58Y5S2myqcHrUBgFPcWp3BbyGn43naAh8XahWHEcVjWl/N6BV9vM1UKYN0oGikDR3dljCBDbCIoPBBO3WcFOaXoIpaqPmbwCG1aSdwQyPUA0UzG08eDbuHK6L5jvbe3xv5kLpWTVddrocW+SakbZRAX1Ykp7IujOce235nM7GOfoq4b8jmK5CLg6VIZGQV20wnn9YxuFOndRSjneFberzfzBMhVLpPsQ16M2xDLpZaDTggZnq2L6nZygds8Hda++ga3WbD3TcgjJNYuENu1S88IowYhSQKBgQDFqRA+38mo6KsxVDCNWcuEk2hSq8NEUzRHJpS7/QjZmEIYpFzDXgSGwhZJ0WNsQtaxJeBbc7B/OOqh8TL1reLl5AdTimS1OLHWVf/MUsLVS7Y82hx/hpYWxZnRSq41oI3P8FO/53FiQMYo2wbwqF6uQjB1y8h58aqL3OYpTH/5xQKBgQC0mobALJ+bU4nCPzkVDZuD6RyNWPwS1aE3+925wDSN2rJ0iLIb4N5czWZmHb66VlAtfGbp2q+amsCV4r6UR19A/y8k9SFB0mdtxix6mjEfaGhVJm4B1mkvsn0OHMAanKkohUvCjROQc3sziyp2gqSEQ98G7//VMPx/3dhgyQpVfwKBgQCycsqu6N0n+D6t/0MCKiJaI7bYhCd7JN8aqVM4UN5PjG2Hz8PLwbK2cr0qkbaAA+vN7NMb3Vtn0FvMLnUCZqVlRTP0EQqQrYmoZuXUcpdhd8QkNgnqe/g+wND4qcKTucquA1uo8mtj9/Su5+bhGDC6hBk6D+uDZFHDiX/loyIavQKBgQCXF6AcLjjpDZ52b8Yloti0JtXIOuXILAlQeNoqiG5vLsOVUrcPM7VUFlLQo5no8kTpiOXgRyAaS9VKkAO4sW0zR0n9tUY5dvkokV6sw0rNZ9/BPQFTcDlXug99OvhMSzwJtlqHTNdNRg+QM6E2vF0+ejmf6DEz/mN/5e0cK5UFqQKBgCR2hVfbRtDz9Cm/P8chPqaWFkH5ulUxBpc704Igc6bVH5DrEoWo6akbeJixV2obAZO3sFyeJqBUqaCvqG17Xei6jn3Hc3WMz9nLrAJEI9BTCfwvuxCOyY0IxqAAYT28xYv42I4+ADT/PpCq2Dj5u43X0dapAjZBZDfVVis7q1Bw-----END PRIVATE KEY-----'; + +export async function getFulltext(url: string) { + if (!config.caixin.cookie) { + return; + } + + const nonce = crypto.randomUUID().replaceAll('-', '').toUpperCase(); + + const userID = config.caixin.cookie + .split(';') + .find((e) => e.includes('SA_USER_UID')) + ?.split('=')[1]; // + + const articleID = url.match(/(\d+)\.html/)[1]; + const rawString = `id=${articleID}&uid=${userID}&${nonce}=nonce`; + + const sig = new KJUR.crypto.Signature({ alg: 'SHA256withRSA' }); + sig.init(rsaPrivateKey); + sig.updateString(rawString); + const sigValueHex = hextob64(sig.sign()); + + const isWeekly = url.includes('weekly'); + const res = await ofetch(`https://gateway.caixin.com/api/newauth/checkAuthByIdJsonp`, { + params: { + type: 1, + page: isWeekly ? 0 : 1, + rand: Math.random(), + id: articleID, + }, + headers: { + 'X-Sign': encodeURIComponent(sigValueHex), + 'X-Nonce': encodeURIComponent(nonce), + Cookie: config.caixin.cookie, + }, + }); + + const { content } = JSON.parse(res.data.match(/resetContentInfo\((.*)\)/)[1]); + return content; +} diff --git a/lib/routes/caixin/utils.ts b/lib/routes/caixin/utils.ts index fca14c8761199cc..0bd0334e3bb4217 100644 --- a/lib/routes/caixin/utils.ts +++ b/lib/routes/caixin/utils.ts @@ -6,44 +6,44 @@ import { load } from 'cheerio'; import { art } from '@/utils/render'; import path from 'node:path'; -const parseArticle = (item, tryGet) => - /\.blog\.caixin\.com$/.test(new URL(item.link).hostname) - ? parseBlogArticle(item, tryGet) - : tryGet(item.link, async () => { - const { data: response } = await got(item.link); - - const $ = load(response); - - item.description = art(path.join(__dirname, 'templates/article.art'), { - item, - $, - }); - - if (item.audio) { - item.itunes_item_image = item.audio_image_url; - item.enclosure_url = item.audio; - item.enclosure_type = 'audio/mpeg'; - } - - return item; - }); - -const parseBlogArticle = (item, tryGet) => - tryGet(item.link, async () => { - const response = await got(item.link); - const $ = load(response.data); - const article = $('#the_content').removeAttr('style'); - article.find('img').removeAttr('style'); - article - .find('p') - // Non-breaking space U+00A0, ` ` in html - // element.children[0].data === $(element, article).text() - .filter((_, element) => element.children[0].data === String.fromCharCode(160)) - .remove(); - - item.description = article.html(); +const parseArticle = async (item) => { + if (/\.blog\.caixin\.com$/.test(new URL(item.link).hostname)) { + return parseBlogArticle(item); + } else { + const { data: response } = await got(item.link); + + const $ = load(response); + + item.description = art(path.join(__dirname, 'templates/article.art'), { + item, + $, + }); + + if (item.audio) { + item.itunes_item_image = item.audio_image_url; + item.enclosure_url = item.audio; + item.enclosure_type = 'audio/mpeg'; + } return item; - }); + } +}; + +const parseBlogArticle = async (item) => { + const response = await got(item.link); + const $ = load(response.data); + const article = $('#the_content').removeAttr('style'); + article.find('img').removeAttr('style'); + article + .find('p') + // Non-breaking space U+00A0, ` ` in html + // element.children[0].data === $(element, article).text() + .filter((_, element) => element.children[0].data === String.fromCodePoint(160)) + .remove(); + + item.description = article.html(); + + return item; +}; export { parseArticle, parseBlogArticle }; From 29a1334c1824bd2c080877533c0b78f277853497 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 3 Nov 2024 10:05:10 +0000 Subject: [PATCH 380/740] style: auto format --- lib/routes/caixin/utils-fulltext.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/routes/caixin/utils-fulltext.ts b/lib/routes/caixin/utils-fulltext.ts index c224dbd23ed661b..dd41e12a36eece5 100644 --- a/lib/routes/caixin/utils-fulltext.ts +++ b/lib/routes/caixin/utils-fulltext.ts @@ -3,7 +3,6 @@ import { hextob64, KJUR } from 'jsrsasign'; import ofetch from '@/utils/ofetch'; import { config } from '@/config'; - // The following constant is extracted from this script: https://file.caixin.com/pkg/cx-pay-layer/js/wap.js?v=5.15.421933 . It is believed to contain no sensitive information. // Refer to this discussion for further explanation: https://github.com/DIYgod/RSSHub/pull/17231 const rsaPrivateKey = From a8f891ecc69a2eb53f7e52aac5eb6311dbfd3131 Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Sun, 3 Nov 2024 18:58:59 +0800 Subject: [PATCH 381/740] fix(route): update package version parsing and cache key in Alpine Linux package route (#17426) --- lib/routes/alpinelinux/pkgs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/alpinelinux/pkgs.ts b/lib/routes/alpinelinux/pkgs.ts index b597836961b66fc..ea0c180d2054374 100644 --- a/lib/routes/alpinelinux/pkgs.ts +++ b/lib/routes/alpinelinux/pkgs.ts @@ -55,7 +55,7 @@ function parseTableToJSON(tableHTML: string) { package: $(row).find('.package a').text().trim(), packageUrl: $(row).find('.package a').attr('href')?.trim(), description: $(row).find('.package a').attr('aria-label')?.trim(), - version: $(row).find('.version a').text().trim(), + version: $(row).find('.version').text().trim(), project: $(row).find('.url a').attr('href')?.trim(), license: $(row).find('.license').text().trim(), branch: $(row).find('.branch').text().trim(), @@ -73,7 +73,7 @@ async function handler(ctx: Context): Promise<Data> { const query = new URLSearchParams(routeParams); query.append('name', name); const link = `https://pkgs.alpinelinux.org/packages?${query.toString()}`; - const key = `alpinelinux:${query.toString()}`; + const key = `alpinelinux:packages:${query.toString()}`; const rowData = (await cache.tryGet( key, async () => { From 70435d4ae1794af9b0b01ac10c78586065654b10 Mon Sep 17 00:00:00 2001 From: DIYgod <i@diygod.me> Date: Sun, 3 Nov 2024 21:28:21 +0800 Subject: [PATCH 382/740] feat(twitter): debug --- lib/routes/twitter/api/web-api/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 21d865cfd042cbf..235d2957b37deb3 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -160,7 +160,9 @@ export const twitterGot = async ( const remaining = response.headers.get('x-rate-limit-remaining'); const remainingInt = Number.parseInt(remaining || '0'); const reset = response.headers.get('x-rate-limit-reset'); - logger.debug(`twitter debug: twitter rate limit remaining for token ${auth?.token} is ${remaining} and reset at ${reset}`); + logger.debug( + `twitter debug: twitter rate limit remaining for token ${auth?.token} is ${remaining} and reset at ${reset}, auth: ${JSON.stringify(auth)}, status: ${response.status}, data: ${JSON.stringify(response._data?.data)}` + ); if (auth) { if (remaining && remainingInt < 2 && reset) { const resetTime = new Date(Number.parseInt(reset) * 1000); From a9d2ea5b04879d281dc7fb3ac3d3955981f60906 Mon Sep 17 00:00:00 2001 From: DIYgod <i@diygod.me> Date: Sun, 3 Nov 2024 21:45:55 +0800 Subject: [PATCH 383/740] feat(twitter): recover cookie updating --- lib/routes/twitter/api/web-api/utils.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 235d2957b37deb3..f75d2eee4ecb62c 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -161,7 +161,7 @@ export const twitterGot = async ( const remainingInt = Number.parseInt(remaining || '0'); const reset = response.headers.get('x-rate-limit-reset'); logger.debug( - `twitter debug: twitter rate limit remaining for token ${auth?.token} is ${remaining} and reset at ${reset}, auth: ${JSON.stringify(auth)}, status: ${response.status}, data: ${JSON.stringify(response._data?.data)}` + `twitter debug: twitter rate limit remaining for token ${auth?.token} is ${remaining} and reset at ${reset}, auth: ${JSON.stringify(auth)}, status: ${response.status}, data: ${JSON.stringify(response._data?.data)}, cookie: ${JSON.stringify(dispatchers?.jar.serializeSync())}` ); if (auth) { if (remaining && remainingInt < 2 && reset) { @@ -211,10 +211,10 @@ export const twitterGot = async ( }, }); - // if (auth?.token) { - // logger.debug(`twitter debug: update twitter cookie for token ${auth.token}`); - // await cache.set(`twitter:cookie:${auth.token}`, JSON.stringify(dispatchers?.jar.serializeSync()), config.cache.contentExpire); - // } + if (auth?.token) { + logger.debug(`twitter debug: update twitter cookie for token ${auth.token}`); + await cache.set(`twitter:cookie:${auth.token}`, JSON.stringify(dispatchers?.jar.serializeSync()), config.cache.contentExpire); + } return response._data; }; From 0c506b84c831741c3cb0f789dee7e9c9170c58f9 Mon Sep 17 00:00:00 2001 From: DIYgod <i@diygod.me> Date: Sun, 3 Nov 2024 22:15:46 +0800 Subject: [PATCH 384/740] feat(twitter): double lock time --- lib/routes/twitter/api/web-api/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index f75d2eee4ecb62c..0f739c63364e2e7 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -168,7 +168,7 @@ export const twitterGot = async ( const resetTime = new Date(Number.parseInt(reset) * 1000); const delay = (resetTime.getTime() - Date.now()) / 1000; logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}, will unlock after ${delay}s`); - await cache.set(`${lockPrefix}${auth.token}`, '1', Math.ceil(delay)); + await cache.set(`${lockPrefix}${auth.token}`, '1', Math.ceil(delay) * 2); } else if (response.status === 429 || JSON.stringify(response._data?.data) === '{"user":{}}') { logger.debug(`twitter debug: twitter rate limit exceeded for token ${auth.token} with status ${response.status}`); await cache.set(`${lockPrefix}${auth.token}`, '1', 2000); From fd5a888f185d97c7679dfb724a63b31b6de51638 Mon Sep 17 00:00:00 2001 From: Gnosnay <iamgnosnay@gmail.com> Date: Sun, 3 Nov 2024 22:18:10 +0800 Subject: [PATCH 385/740] fix(route/twitter): await when get cache (#17429) --- lib/routes/twitter/api/web-api/utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 0f739c63364e2e7..3738f229f70ac71 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -14,8 +14,9 @@ import login from './login'; let authTokenIndex = 0; const token2Cookie = async (token) => { - if (cache.get(`twitter:cookie:${token}`)) { - return cache.get(`twitter:cookie:${token}`); + const c = await cache.get(`twitter:cookie:${token}`); + if (c) { + return c; } const jar = new CookieJar(); jar.setCookieSync(`auth_token=${token}`, 'https://x.com'); From 3a2bac7a18179a466857b3db14439e546dc25d33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 06:25:45 -0800 Subject: [PATCH 386/740] chore(deps-dev): bump @eslint/js from 9.13.0 to 9.14.0 (#17438) * chore(deps-dev): bump @eslint/js from 9.13.0 to 9.14.0 Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.13.0 to 9.14.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.14.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 182 +++++++++++++++++++++++++------------------------ 2 files changed, 95 insertions(+), 89 deletions(-) diff --git a/package.json b/package.json index 42d67cd2042a749..2f06f7ff36b04b6 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "@babel/preset-typescript": "7.26.0", "@bbob/types": "4.1.1", "@eslint/eslintrc": "3.1.0", - "@eslint/js": "9.13.0", + "@eslint/js": "9.14.0", "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "2.10.1", "@types/aes-js": "3.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 362fbe164f5424e..4579591b03fc5a9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -274,8 +274,8 @@ importers: specifier: 3.1.0 version: 3.1.0 '@eslint/js': - specifier: 9.13.0 - version: 9.13.0 + specifier: 9.14.0 + version: 9.14.0 '@microsoft/eslint-formatter-sarif': specifier: 3.1.0 version: 3.1.0 @@ -1331,6 +1331,10 @@ packages: resolution: {integrity: sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.14.0': + resolution: {integrity: sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==} + 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} @@ -1634,93 +1638,93 @@ packages: resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} engines: {node: '>= 8.0.0'} - '@rollup/rollup-android-arm-eabi@4.24.3': - resolution: {integrity: sha512-ufb2CH2KfBWPJok95frEZZ82LtDl0A6QKTa8MoM+cWwDZvVGl5/jNb79pIhRvAalUu+7LD91VYR0nwRD799HkQ==} + '@rollup/rollup-android-arm-eabi@4.24.4': + resolution: {integrity: sha512-jfUJrFct/hTA0XDM5p/htWKoNNTbDLY0KRwEt6pyOA6k2fmk0WVwl65PdUdJZgzGEHWx+49LilkcSaumQRyNQw==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.24.3': - resolution: {integrity: sha512-iAHpft/eQk9vkWIV5t22V77d90CRofgR2006UiCjHcHJFVI1E0oBkQIAbz+pLtthFw3hWEmVB4ilxGyBf48i2Q==} + '@rollup/rollup-android-arm64@4.24.4': + resolution: {integrity: sha512-j4nrEO6nHU1nZUuCfRKoCcvh7PIywQPUCBa2UsootTHvTHIoIu2BzueInGJhhvQO/2FTRdNYpf63xsgEqH9IhA==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.24.3': - resolution: {integrity: sha512-QPW2YmkWLlvqmOa2OwrfqLJqkHm7kJCIMq9kOz40Zo9Ipi40kf9ONG5Sz76zszrmIZZ4hgRIkez69YnTHgEz1w==} + '@rollup/rollup-darwin-arm64@4.24.4': + resolution: {integrity: sha512-GmU/QgGtBTeraKyldC7cDVVvAJEOr3dFLKneez/n7BvX57UdhOqDsVwzU7UOnYA7AAOt+Xb26lk79PldDHgMIQ==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.24.3': - resolution: {integrity: sha512-KO0pN5x3+uZm1ZXeIfDqwcvnQ9UEGN8JX5ufhmgH5Lz4ujjZMAnxQygZAVGemFWn+ZZC0FQopruV4lqmGMshow==} + '@rollup/rollup-darwin-x64@4.24.4': + resolution: {integrity: sha512-N6oDBiZCBKlwYcsEPXGDE4g9RoxZLK6vT98M8111cW7VsVJFpNEqvJeIPfsCzbf0XEakPslh72X0gnlMi4Ddgg==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.24.3': - resolution: {integrity: sha512-CsC+ZdIiZCZbBI+aRlWpYJMSWvVssPuWqrDy/zi9YfnatKKSLFCe6fjna1grHuo/nVaHG+kiglpRhyBQYRTK4A==} + '@rollup/rollup-freebsd-arm64@4.24.4': + resolution: {integrity: sha512-py5oNShCCjCyjWXCZNrRGRpjWsF0ic8f4ieBNra5buQz0O/U6mMXCpC1LvrHuhJsNPgRt36tSYMidGzZiJF6mw==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.24.3': - resolution: {integrity: sha512-F0nqiLThcfKvRQhZEzMIXOQG4EeX61im61VYL1jo4eBxv4aZRmpin6crnBJQ/nWnCsjH5F6J3W6Stdm0mBNqBg==} + '@rollup/rollup-freebsd-x64@4.24.4': + resolution: {integrity: sha512-L7VVVW9FCnTTp4i7KrmHeDsDvjB4++KOBENYtNYAiYl96jeBThFfhP6HVxL74v4SiZEVDH/1ILscR5U9S4ms4g==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.24.3': - resolution: {integrity: sha512-KRSFHyE/RdxQ1CSeOIBVIAxStFC/hnBgVcaiCkQaVC+EYDtTe4X7z5tBkFyRoBgUGtB6Xg6t9t2kulnX6wJc6A==} + '@rollup/rollup-linux-arm-gnueabihf@4.24.4': + resolution: {integrity: sha512-10ICosOwYChROdQoQo589N5idQIisxjaFE/PAnX2i0Zr84mY0k9zul1ArH0rnJ/fpgiqfu13TFZR5A5YJLOYZA==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.24.3': - resolution: {integrity: sha512-h6Q8MT+e05zP5BxEKz0vi0DhthLdrNEnspdLzkoFqGwnmOzakEHSlXfVyA4HJ322QtFy7biUAVFPvIDEDQa6rw==} + '@rollup/rollup-linux-arm-musleabihf@4.24.4': + resolution: {integrity: sha512-ySAfWs69LYC7QhRDZNKqNhz2UKN8LDfbKSMAEtoEI0jitwfAG2iZwVqGACJT+kfYvvz3/JgsLlcBP+WWoKCLcw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.24.3': - resolution: {integrity: sha512-fKElSyXhXIJ9pqiYRqisfirIo2Z5pTTve5K438URf08fsypXrEkVmShkSfM8GJ1aUyvjakT+fn2W7Czlpd/0FQ==} + '@rollup/rollup-linux-arm64-gnu@4.24.4': + resolution: {integrity: sha512-uHYJ0HNOI6pGEeZ/5mgm5arNVTI0nLlmrbdph+pGXpC9tFHFDQmDMOEqkmUObRfosJqpU8RliYoGz06qSdtcjg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.24.3': - resolution: {integrity: sha512-YlddZSUk8G0px9/+V9PVilVDC6ydMz7WquxozToozSnfFK6wa6ne1ATUjUvjin09jp34p84milxlY5ikueoenw==} + '@rollup/rollup-linux-arm64-musl@4.24.4': + resolution: {integrity: sha512-38yiWLemQf7aLHDgTg85fh3hW9stJ0Muk7+s6tIkSUOMmi4Xbv5pH/5Bofnsb6spIwD5FJiR+jg71f0CH5OzoA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.24.3': - resolution: {integrity: sha512-yNaWw+GAO8JjVx3s3cMeG5Esz1cKVzz8PkTJSfYzE5u7A+NvGmbVFEHP+BikTIyYWuz0+DX9kaA3pH9Sqxp69g==} + '@rollup/rollup-linux-powerpc64le-gnu@4.24.4': + resolution: {integrity: sha512-q73XUPnkwt9ZNF2xRS4fvneSuaHw2BXuV5rI4cw0fWYVIWIBeDZX7c7FWhFQPNTnE24172K30I+dViWRVD9TwA==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.24.3': - resolution: {integrity: sha512-lWKNQfsbpv14ZCtM/HkjCTm4oWTKTfxPmr7iPfp3AHSqyoTz5AgLemYkWLwOBWc+XxBbrU9SCokZP0WlBZM9lA==} + '@rollup/rollup-linux-riscv64-gnu@4.24.4': + resolution: {integrity: sha512-Aie/TbmQi6UXokJqDZdmTJuZBCU3QBDA8oTKRGtd4ABi/nHgXICulfg1KI6n9/koDsiDbvHAiQO3YAUNa/7BCw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.24.3': - resolution: {integrity: sha512-HoojGXTC2CgCcq0Woc/dn12wQUlkNyfH0I1ABK4Ni9YXyFQa86Fkt2Q0nqgLfbhkyfQ6003i3qQk9pLh/SpAYw==} + '@rollup/rollup-linux-s390x-gnu@4.24.4': + resolution: {integrity: sha512-P8MPErVO/y8ohWSP9JY7lLQ8+YMHfTI4bAdtCi3pC2hTeqFJco2jYspzOzTUB8hwUWIIu1xwOrJE11nP+0JFAQ==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.24.3': - resolution: {integrity: sha512-mnEOh4iE4USSccBOtcrjF5nj+5/zm6NcNhbSEfR3Ot0pxBwvEn5QVUXcuOwwPkapDtGZ6pT02xLoPaNv06w7KQ==} + '@rollup/rollup-linux-x64-gnu@4.24.4': + resolution: {integrity: sha512-K03TljaaoPK5FOyNMZAAEmhlyO49LaE4qCsr0lYHUKyb6QacTNF9pnfPpXnFlFD3TXuFbFbz7tJ51FujUXkXYA==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.24.3': - resolution: {integrity: sha512-rMTzawBPimBQkG9NKpNHvquIUTQPzrnPxPbCY1Xt+mFkW7pshvyIS5kYgcf74goxXOQk0CP3EoOC1zcEezKXhw==} + '@rollup/rollup-linux-x64-musl@4.24.4': + resolution: {integrity: sha512-VJYl4xSl/wqG2D5xTYncVWW+26ICV4wubwN9Gs5NrqhJtayikwCXzPL8GDsLnaLU3WwhQ8W02IinYSFJfyo34Q==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.24.3': - resolution: {integrity: sha512-2lg1CE305xNvnH3SyiKwPVsTVLCg4TmNCF1z7PSHX2uZY2VbUpdkgAllVoISD7JO7zu+YynpWNSKAtOrX3AiuA==} + '@rollup/rollup-win32-arm64-msvc@4.24.4': + resolution: {integrity: sha512-ku2GvtPwQfCqoPFIJCqZ8o7bJcj+Y54cZSr43hHca6jLwAiCbZdBUOrqE6y29QFajNAzzpIOwsckaTFmN6/8TA==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.24.3': - resolution: {integrity: sha512-9SjYp1sPyxJsPWuhOCX6F4jUMXGbVVd5obVpoVEi8ClZqo52ViZewA6eFz85y8ezuOA+uJMP5A5zo6Oz4S5rVQ==} + '@rollup/rollup-win32-ia32-msvc@4.24.4': + resolution: {integrity: sha512-V3nCe+eTt/W6UYNr/wGvO1fLpHUrnlirlypZfKCT1fG6hWfqhPgQV/K/mRBXBpxc0eKLIF18pIOFVPh0mqHjlg==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.24.3': - resolution: {integrity: sha512-HGZgRFFYrMrP3TJlq58nR1xy8zHKId25vhmm5S9jETEfDf6xybPxsavFTJaufe2zgOGYJBskGlj49CwtEuFhWQ==} + '@rollup/rollup-win32-x64-msvc@4.24.4': + resolution: {integrity: sha512-LTw1Dfd0mBIEqUVCxbvTE/LLo+9ZxVC9k99v1v4ahg9Aak6FpqOfNu5kRkeTAn0wphoC4JU7No1/rL+bBCEwhg==} cpu: [x64] os: [win32] @@ -2341,8 +2345,8 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001676: - resolution: {integrity: sha512-Qz6zwGCiPghQXGJvgQAem79esjitvJ+CxSbSQkW9H/UX5hg8XM88d4lp2W+MEQ81j+Hip58Il+jGVdazk1z9cw==} + caniuse-lite@1.0.30001677: + resolution: {integrity: sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog==} caseless@0.12.0: resolution: {integrity: sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==} @@ -4903,8 +4907,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rollup@4.24.3: - resolution: {integrity: sha512-HBW896xR5HGmoksbi3JBDtmVzWiPAYqp7wip50hjQ67JbDz61nyoMPdqu1DvVW9asYb2M65Z20ZHsyJCMqMyDg==} + rollup@4.24.4: + resolution: {integrity: sha512-vGorVWIsWfX3xbcyAS+I047kFKapHYivmkaT63Smj77XwvLSJos6M1xGqZnBPFQFBRZDOcG1QnYEIxAvTr/HjA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -5293,8 +5297,8 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.57: - resolution: {integrity: sha512-lXnRhuQpx3zU9EONF9F7HfcRLvN1uRYUBIiKL+C/gehC/77XTU+Jye6ui86GA3rU6FjlJ0triD1Tkjt2F/2lEg==} + tldts-core@6.1.58: + resolution: {integrity: sha512-dR936xmhBm7AeqHIhCWwK765gZ7dFyL+IqLSFAjJbFlUXGMLCb8i2PzlzaOuWBuplBTaBYseSb565nk/ZEM0Bg==} tldts@6.1.57: resolution: {integrity: sha512-Oy7yDXK8meJl8vPMOldzA+MtueAJ5BrH4l4HXwZuj2AtfoQbLjmTJmjNWPUcAo+E/ibHn7QlqMS0BOcXJFJyHQ==} @@ -6803,6 +6807,8 @@ snapshots: '@eslint/js@9.13.0': {} + '@eslint/js@9.14.0': {} + '@eslint/object-schema@2.1.4': {} '@eslint/plugin-kit@0.2.2': @@ -7162,58 +7168,58 @@ snapshots: estree-walker: 2.0.2 picomatch: 2.3.1 - '@rollup/rollup-android-arm-eabi@4.24.3': + '@rollup/rollup-android-arm-eabi@4.24.4': optional: true - '@rollup/rollup-android-arm64@4.24.3': + '@rollup/rollup-android-arm64@4.24.4': optional: true - '@rollup/rollup-darwin-arm64@4.24.3': + '@rollup/rollup-darwin-arm64@4.24.4': optional: true - '@rollup/rollup-darwin-x64@4.24.3': + '@rollup/rollup-darwin-x64@4.24.4': optional: true - '@rollup/rollup-freebsd-arm64@4.24.3': + '@rollup/rollup-freebsd-arm64@4.24.4': optional: true - '@rollup/rollup-freebsd-x64@4.24.3': + '@rollup/rollup-freebsd-x64@4.24.4': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.24.3': + '@rollup/rollup-linux-arm-gnueabihf@4.24.4': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.24.3': + '@rollup/rollup-linux-arm-musleabihf@4.24.4': optional: true - '@rollup/rollup-linux-arm64-gnu@4.24.3': + '@rollup/rollup-linux-arm64-gnu@4.24.4': optional: true - '@rollup/rollup-linux-arm64-musl@4.24.3': + '@rollup/rollup-linux-arm64-musl@4.24.4': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.24.3': + '@rollup/rollup-linux-powerpc64le-gnu@4.24.4': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.24.3': + '@rollup/rollup-linux-riscv64-gnu@4.24.4': optional: true - '@rollup/rollup-linux-s390x-gnu@4.24.3': + '@rollup/rollup-linux-s390x-gnu@4.24.4': optional: true - '@rollup/rollup-linux-x64-gnu@4.24.3': + '@rollup/rollup-linux-x64-gnu@4.24.4': optional: true - '@rollup/rollup-linux-x64-musl@4.24.3': + '@rollup/rollup-linux-x64-musl@4.24.4': optional: true - '@rollup/rollup-win32-arm64-msvc@4.24.3': + '@rollup/rollup-win32-arm64-msvc@4.24.4': optional: true - '@rollup/rollup-win32-ia32-msvc@4.24.3': + '@rollup/rollup-win32-ia32-msvc@4.24.4': optional: true - '@rollup/rollup-win32-x64-msvc@4.24.3': + '@rollup/rollup-win32-x64-msvc@4.24.4': optional: true '@rss3/api-core@0.0.23': @@ -7844,7 +7850,7 @@ snapshots: browserslist@4.24.2: dependencies: - caniuse-lite: 1.0.30001676 + caniuse-lite: 1.0.30001677 electron-to-chromium: 1.5.50 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -7919,7 +7925,7 @@ snapshots: camelcase@6.3.0: {} - caniuse-lite@1.0.30001676: {} + caniuse-lite@1.0.30001677: {} caseless@0.12.0: {} @@ -8819,7 +8825,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.7 + debug: 4.3.4 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -10536,7 +10542,7 @@ snapshots: proxy-agent@6.4.0: dependencies: agent-base: 7.1.1 - debug: 4.3.7 + debug: 4.3.4 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 lru-cache: 7.18.3 @@ -10842,28 +10848,28 @@ snapshots: dependencies: glob: 7.2.3 - rollup@4.24.3: + rollup@4.24.4: dependencies: '@types/estree': 1.0.6 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.24.3 - '@rollup/rollup-android-arm64': 4.24.3 - '@rollup/rollup-darwin-arm64': 4.24.3 - '@rollup/rollup-darwin-x64': 4.24.3 - '@rollup/rollup-freebsd-arm64': 4.24.3 - '@rollup/rollup-freebsd-x64': 4.24.3 - '@rollup/rollup-linux-arm-gnueabihf': 4.24.3 - '@rollup/rollup-linux-arm-musleabihf': 4.24.3 - '@rollup/rollup-linux-arm64-gnu': 4.24.3 - '@rollup/rollup-linux-arm64-musl': 4.24.3 - '@rollup/rollup-linux-powerpc64le-gnu': 4.24.3 - '@rollup/rollup-linux-riscv64-gnu': 4.24.3 - '@rollup/rollup-linux-s390x-gnu': 4.24.3 - '@rollup/rollup-linux-x64-gnu': 4.24.3 - '@rollup/rollup-linux-x64-musl': 4.24.3 - '@rollup/rollup-win32-arm64-msvc': 4.24.3 - '@rollup/rollup-win32-ia32-msvc': 4.24.3 - '@rollup/rollup-win32-x64-msvc': 4.24.3 + '@rollup/rollup-android-arm-eabi': 4.24.4 + '@rollup/rollup-android-arm64': 4.24.4 + '@rollup/rollup-darwin-arm64': 4.24.4 + '@rollup/rollup-darwin-x64': 4.24.4 + '@rollup/rollup-freebsd-arm64': 4.24.4 + '@rollup/rollup-freebsd-x64': 4.24.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.4 + '@rollup/rollup-linux-arm-musleabihf': 4.24.4 + '@rollup/rollup-linux-arm64-gnu': 4.24.4 + '@rollup/rollup-linux-arm64-musl': 4.24.4 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.4 + '@rollup/rollup-linux-riscv64-gnu': 4.24.4 + '@rollup/rollup-linux-s390x-gnu': 4.24.4 + '@rollup/rollup-linux-x64-gnu': 4.24.4 + '@rollup/rollup-linux-x64-musl': 4.24.4 + '@rollup/rollup-win32-arm64-msvc': 4.24.4 + '@rollup/rollup-win32-ia32-msvc': 4.24.4 + '@rollup/rollup-win32-x64-msvc': 4.24.4 fsevents: 2.3.3 rrweb-cssom@0.7.1: {} @@ -11265,11 +11271,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.57: {} + tldts-core@6.1.58: {} tldts@6.1.57: dependencies: - tldts-core: 6.1.57 + tldts-core: 6.1.58 tmp@0.0.33: dependencies: @@ -11531,7 +11537,7 @@ snapshots: dependencies: esbuild: 0.21.5 postcss: 8.4.47 - rollup: 4.24.3 + rollup: 4.24.4 optionalDependencies: '@types/node': 22.8.6 fsevents: 2.3.3 From a5700169a07774c0755517879db610c8bcc97284 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 06:35:11 -0800 Subject: [PATCH 387/740] chore(deps-dev): bump eslint from 9.13.0 to 9.14.0 (#17434) * chore(deps-dev): bump eslint from 9.13.0 to 9.14.0 Bumps [eslint](https://github.com/eslint/eslint) from 9.13.0 to 9.14.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.13.0...v9.14.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 132 ++++++++++++++++++++++++------------------------- 2 files changed, 67 insertions(+), 67 deletions(-) diff --git a/package.json b/package.json index 2f06f7ff36b04b6..d042de95c13ede9 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "@vercel/nft": "0.27.5", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.103", - "eslint": "9.13.0", + "eslint": "9.14.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.12.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4579591b03fc5a9..fde25d6caf11c63 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -281,7 +281,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 2.10.1 - version: 2.10.1(eslint@9.13.0)(typescript@5.6.3) + version: 2.10.1(eslint@9.14.0)(typescript@5.6.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -350,10 +350,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.12.2 - version: 8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3) + version: 8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.12.2 - version: 8.12.2(eslint@9.13.0)(typescript@5.6.3) + version: 8.12.2(eslint@9.14.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.5 version: 0.27.5 @@ -364,26 +364,26 @@ importers: specifier: 0.37.103 version: 0.37.103 eslint: - specifier: 9.13.0 - version: 9.13.0 + specifier: 9.14.0 + version: 9.14.0 eslint-config-prettier: specifier: 9.1.0 - version: 9.1.0(eslint@9.13.0) + version: 9.1.0(eslint@9.14.0) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.13.0) + version: 8.1.0(eslint@9.14.0) eslint-plugin-n: specifier: 17.12.0 - version: 17.12.0(eslint@9.13.0) + version: 17.12.0(eslint@9.14.0) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0))(eslint@9.13.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3) eslint-plugin-unicorn: specifier: 56.0.0 - version: 56.0.0(eslint@9.13.0) + version: 56.0.0(eslint@9.14.0) eslint-plugin-yml: specifier: 1.15.0 - version: 1.15.0(eslint@9.13.0) + version: 1.15.0(eslint@9.14.0) fs-extra: specifier: 11.2.0 version: 11.2.0 @@ -1327,10 +1327,6 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.13.0': - resolution: {integrity: sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.14.0': resolution: {integrity: sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1387,6 +1383,10 @@ packages: resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} + '@humanwhocodes/retry@0.4.0': + resolution: {integrity: sha512-xnRgu9DxZbkWak/te3fcytNyp8MTbuiZIaueg2rgEvBuN55n04nwLYLU9TX/VVlusc9L2ZNXi99nUFNkHXtr5g==} + engines: {node: '>=18.18'} + '@ianvs/eslint-stats@2.0.0': resolution: {integrity: sha512-DnIVVAiXR4tfWERTiQxr1Prrs/uFEbC1C4gTGORMvbF4k7ENyVQeLcoUfNyhlAj2MB/OeorCrN3wSnYuDOUS6Q==} engines: {node: '>=8.0.0'} @@ -3009,8 +3009,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.13.0: - resolution: {integrity: sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==} + eslint@9.14.0: + resolution: {integrity: sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -6758,9 +6758,9 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.1(eslint@9.13.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.14.0)': dependencies: - eslint: 9.13.0 + eslint: 9.14.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -6805,8 +6805,6 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.13.0': {} - '@eslint/js@9.14.0': {} '@eslint/object-schema@2.1.4': {} @@ -6852,6 +6850,8 @@ snapshots: '@humanwhocodes/retry@0.3.1': {} + '@humanwhocodes/retry@0.4.0': {} + '@ianvs/eslint-stats@2.0.0': dependencies: chalk: 2.4.2 @@ -7292,10 +7292,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.10.1(eslint@9.13.0)(typescript@5.6.3)': + '@stylistic/eslint-plugin@2.10.1(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) - eslint: 9.13.0 + '@typescript-eslint/utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) + eslint: 9.14.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -7464,15 +7464,15 @@ snapshots: '@types/node': 22.8.6 optional: true - '@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3))(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.12.2(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.12.2(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.12.2 - '@typescript-eslint/type-utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.12.2 - eslint: 9.13.0 + eslint: 9.14.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -7482,14 +7482,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.12.2(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.12.2(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 8.12.2 '@typescript-eslint/types': 8.12.2 '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.12.2 debug: 4.3.7 - eslint: 9.13.0 + eslint: 9.14.0 optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -7500,10 +7500,10 @@ snapshots: '@typescript-eslint/types': 8.12.2 '@typescript-eslint/visitor-keys': 8.12.2 - '@typescript-eslint/type-utils@8.12.2(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.12.2(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.2(eslint@9.13.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: @@ -7529,13 +7529,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.12.2(eslint@9.13.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.12.2(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) '@typescript-eslint/scope-manager': 8.12.2 '@typescript-eslint/types': 8.12.2 '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) - eslint: 9.13.0 + eslint: 9.14.0 transitivePeerDependencies: - supports-color - typescript @@ -8540,18 +8540,18 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.13.0): + eslint-compat-utils@0.5.1(eslint@9.14.0): dependencies: - eslint: 9.13.0 + eslint: 9.14.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.13.0): + eslint-config-prettier@9.1.0(eslint@9.14.0): dependencies: - eslint: 9.13.0 + eslint: 9.14.0 - eslint-filtered-fix@0.3.0(eslint@9.13.0): + eslint-filtered-fix@0.3.0(eslint@9.14.0): dependencies: - eslint: 9.13.0 + eslint: 9.14.0 optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -8562,54 +8562,54 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.13.0): + eslint-nibble@8.1.0(eslint@9.14.0): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.13.0 - eslint-filtered-fix: 0.3.0(eslint@9.13.0) + eslint: 9.14.0 + eslint-filtered-fix: 0.3.0(eslint@9.14.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.13.0): + eslint-plugin-es-x@7.8.0(eslint@9.14.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) '@eslint-community/regexpp': 4.12.1 - eslint: 9.13.0 - eslint-compat-utils: 0.5.1(eslint@9.13.0) + eslint: 9.14.0 + eslint-compat-utils: 0.5.1(eslint@9.14.0) - eslint-plugin-n@17.12.0(eslint@9.13.0): + eslint-plugin-n@17.12.0(eslint@9.14.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) enhanced-resolve: 5.17.1 - eslint: 9.13.0 - eslint-plugin-es-x: 7.8.0(eslint@9.13.0) + eslint: 9.14.0 + eslint-plugin-es-x: 7.8.0(eslint@9.14.0) get-tsconfig: 4.8.1 globals: 15.11.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.13.0))(eslint@9.13.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3): dependencies: - eslint: 9.13.0 + eslint: 9.14.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 9.1.0(eslint@9.13.0) + eslint-config-prettier: 9.1.0(eslint@9.14.0) - eslint-plugin-unicorn@56.0.0(eslint@9.13.0): + eslint-plugin-unicorn@56.0.0(eslint@9.14.0): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.39.0 - eslint: 9.13.0 + eslint: 9.14.0 esquery: 1.6.0 globals: 15.11.0 indent-string: 4.0.0 @@ -8622,11 +8622,11 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-yml@1.15.0(eslint@9.13.0): + eslint-plugin-yml@1.15.0(eslint@9.14.0): dependencies: debug: 4.3.7 - eslint: 9.13.0 - eslint-compat-utils: 0.5.1(eslint@9.13.0) + eslint: 9.14.0 + eslint-compat-utils: 0.5.1(eslint@9.14.0) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.3 @@ -8695,18 +8695,18 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.13.0: + eslint@9.14.0: dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.18.0 '@eslint/core': 0.7.0 '@eslint/eslintrc': 3.1.0 - '@eslint/js': 9.13.0 + '@eslint/js': 9.14.0 '@eslint/plugin-kit': 0.2.2 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.3.1 + '@humanwhocodes/retry': 0.4.0 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 ajv: 6.12.6 From 2ffbec5e581f709408fcc532184e6d991a6c1ada Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 07:02:29 -0800 Subject: [PATCH 388/740] chore(deps): bump tldts from 6.1.57 to 6.1.58 (#17433) * chore(deps): bump tldts from 6.1.57 to 6.1.58 Bumps [tldts](https://github.com/remusao/tldts) from 6.1.57 to 6.1.58. - [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.57...v6.1.58) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 d042de95c13ede9..6a1253a256b17f1 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "telegram": "2.26.6", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.57", + "tldts": "6.1.58", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fde25d6caf11c63..7d978f49984c803 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -231,8 +231,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.57 - version: 6.1.57 + specifier: 6.1.58 + version: 6.1.58 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5300,8 +5300,8 @@ packages: tldts-core@6.1.58: resolution: {integrity: sha512-dR936xmhBm7AeqHIhCWwK765gZ7dFyL+IqLSFAjJbFlUXGMLCb8i2PzlzaOuWBuplBTaBYseSb565nk/ZEM0Bg==} - tldts@6.1.57: - resolution: {integrity: sha512-Oy7yDXK8meJl8vPMOldzA+MtueAJ5BrH4l4HXwZuj2AtfoQbLjmTJmjNWPUcAo+E/ibHn7QlqMS0BOcXJFJyHQ==} + tldts@6.1.58: + resolution: {integrity: sha512-MQJrJhjHOYGYb8DobR6Y4AdDbd4TYkyQ+KBDVc5ODzs1cbrvPpfN1IemYi9jfipJ/vR1YWvrDli0hg1y19VRoA==} hasBin: true tmp@0.0.33: @@ -11273,7 +11273,7 @@ snapshots: tldts-core@6.1.58: {} - tldts@6.1.57: + tldts@6.1.58: dependencies: tldts-core: 6.1.58 @@ -11311,7 +11311,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.57 + tldts: 6.1.58 tr46@0.0.3: {} From 44a4fc0128e167107403d68888dd4a7be47e84c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 07:03:08 -0800 Subject: [PATCH 389/740] chore(deps-dev): bump @types/node from 22.8.6 to 22.8.7 (#17435) * chore(deps-dev): bump @types/node from 22.8.6 to 22.8.7 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.8.6 to 22.8.7. - [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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 6a1253a256b17f1..3a02fec3638cfa2 100644 --- a/package.json +++ b/package.json @@ -159,7 +159,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.8.6", + "@types/node": "22.8.7", "@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 7d978f49984c803..3d7c3a047d59834 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -331,8 +331,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.8.6 - version: 22.8.6 + specifier: 22.8.7 + version: 22.8.7 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -359,7 +359,7 @@ importers: version: 0.27.5 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.8.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.8.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.103 version: 0.37.103 @@ -425,10 +425,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.6)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.7)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.8.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.8.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1905,8 +1905,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.8.6': - resolution: {integrity: sha512-tosuJYKrIqjQIlVCM4PEGxOmyg3FCPa/fViuJChnGeEIhjA46oy8FMVoF9su1/v8PNs2a8Q0iFNyOx0uOF91nw==} + '@types/node@22.8.7': + resolution: {integrity: sha512-LidcG+2UeYIWcMuMUpBKOnryBWG/rnmOHQR5apjn8myTQcx3rinFRn7DcIFhMnS0PPFSC6OafdIKEad0lj6U0Q==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6867,7 +6867,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.8.6 + '@types/node': 22.8.7 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7341,12 +7341,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.8.6 + '@types/node': 22.8.7 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.8.6 + '@types/node': 22.8.7 '@types/html-to-text@9.0.4': {} @@ -7354,13 +7354,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.8.6 + '@types/node': 22.8.7 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.8.6 + '@types/node': 22.8.7 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7370,7 +7370,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.8.6 + '@types/node': 22.8.7 '@types/jsrsasign@10.5.13': {} @@ -7380,7 +7380,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.8.6 + '@types/node': 22.8.7 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7402,14 +7402,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.8.6 + '@types/node': 22.8.7 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.8.6 + '@types/node': 22.8.7 form-data: 4.0.1 - '@types/node@22.8.6': + '@types/node@22.8.7': dependencies: undici-types: 6.19.8 @@ -7423,7 +7423,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.8.6 + '@types/node': 22.8.7 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7437,7 +7437,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.8.6 + '@types/node': 22.8.7 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7461,7 +7461,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.8.6 + '@types/node': 22.8.7 optional: true '@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': @@ -7570,7 +7570,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.8.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.8.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7584,7 +7584,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.8.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.8.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10536,7 +10536,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.8.6 + '@types/node': 22.8.7 long: 5.2.3 proxy-agent@6.4.0: @@ -11504,13 +11504,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.8.6): + vite-node@2.0.5(@types/node@22.8.7): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.8.6) + vite: 5.4.10(@types/node@22.8.7) transitivePeerDependencies: - '@types/node' - less @@ -11522,27 +11522,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.6)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.7)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.10(@types/node@22.8.6) + vite: 5.4.10(@types/node@22.8.7) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.8.6): + vite@5.4.10(@types/node@22.8.7): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.4 optionalDependencies: - '@types/node': 22.8.6 + '@types/node': 22.8.7 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.8.6)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.8.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11560,11 +11560,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.8.6) - vite-node: 2.0.5(@types/node@22.8.6) + vite: 5.4.10(@types/node@22.8.7) + vite-node: 2.0.5(@types/node@22.8.7) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.8.6 + '@types/node': 22.8.7 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From c6f12c3d7523081123253def26f893b07265f28d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 07:16:44 -0800 Subject: [PATCH 390/740] chore(deps): bump winston from 3.15.0 to 3.16.0 (#17436) * chore(deps): bump winston from 3.15.0 to 3.16.0 Bumps [winston](https://github.com/winstonjs/winston) from 3.15.0 to 3.16.0. - [Release notes](https://github.com/winstonjs/winston/releases) - [Changelog](https://github.com/winstonjs/winston/blob/master/CHANGELOG.md) - [Commits](https://github.com/winstonjs/winston/compare/v3.15.0...v3.16.0) --- updated-dependencies: - dependency-name: winston dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> 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 3a02fec3638cfa2..68f31823d694442 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "twitter-api-v2": "1.18.1", "undici": "6.20.1", "uuid": "11.0.2", - "winston": "3.15.0", + "winston": "3.16.0", "xxhash-wasm": "1.0.2", "zod": "3.23.8" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3d7c3a047d59834..1a53f8c1a0394ba 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -252,8 +252,8 @@ importers: specifier: 11.0.2 version: 11.0.2 winston: - specifier: 3.15.0 - version: 3.15.0 + specifier: 3.16.0 + version: 3.16.0 xxhash-wasm: specifier: 1.0.2 version: 1.0.2 @@ -5699,8 +5699,8 @@ packages: resolution: {integrity: sha512-qxSTKswC6llEMZKgCQdaWgDuMJQnhuvF5f2Nk3SNXc4byfQ+voo2mX1Px9dkNOuR8p0KAjfPG29PuYUSIb+vSA==} engines: {node: '>= 12.0.0'} - winston@3.15.0: - resolution: {integrity: sha512-RhruH2Cj0bV0WgNL+lOfoUBI4DVfdUNjVnJGVovWZmrcKtrFTTRzgXYK2O9cymSGjrERCtaAeHwMNnUWXlwZow==} + winston@3.16.0: + resolution: {integrity: sha512-xz7+cyGN5M+4CmmD4Npq1/4T+UZaz7HaeTlAruFUTjk79CNMq+P6H30vlE4z0qfqJ01VHYQwd7OZo03nYm/+lg==} engines: {node: '>= 12.0.0'} word-wrap@1.2.5: @@ -11638,7 +11638,7 @@ snapshots: readable-stream: 4.5.2 triple-beam: 1.4.1 - winston@3.15.0: + winston@3.16.0: dependencies: '@colors/colors': 1.6.0 '@dabh/diagnostics': 2.0.3 From 69337120acc9b199c4369c1f9b25a4c4b5a6cbd8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 23:46:47 +0800 Subject: [PATCH 391/740] chore(deps): bump hono from 4.6.8 to 4.6.9 (#17432) * chore(deps): bump hono from 4.6.8 to 4.6.9 Bumps [hono](https://github.com/honojs/hono) from 4.6.8 to 4.6.9. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.8...v4.6.9) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install * test: trigger tests --------- Signed-off-by: dependabot[bot] <support@github.com> 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 68f31823d694442..596d513ee530ba4 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.8", + "hono": "4.6.9", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1a53f8c1a0394ba..c3b241978e18b14 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,10 +16,10 @@ importers: version: 4.1.1 '@hono/node-server': specifier: 1.13.3 - version: 1.13.3(hono@4.6.8) + version: 1.13.3(hono@4.6.9) '@hono/zod-openapi': specifier: 0.16.4 - version: 0.16.4(hono@4.6.8)(zod@3.23.8) + version: 0.16.4(hono@4.6.9)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -52,7 +52,7 @@ importers: version: 0.0.23 '@scalar/hono-api-reference': specifier: 0.5.158 - version: 0.5.158(hono@4.6.8) + version: 0.5.158(hono@4.6.9) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -111,8 +111,8 @@ importers: specifier: 144.0.0 version: 144.0.0 hono: - specifier: 4.6.8 - version: 4.6.8 + specifier: 4.6.9 + version: 4.6.9 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3451,8 +3451,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.8: - resolution: {integrity: sha512-f+2Ec9JAzabT61pglDiLJcF/DjiSefZkjCn9bzm1cYLGkD5ExJ3Jnv93ax9h0bn7UPLHF81KktoyjdQfWI2n1Q==} + hono@4.6.9: + resolution: {integrity: sha512-p/pN5yZLuZaHzyAOT2nw2/Ud6HhJHYmDNGH6Ck1OWBhPMVeM1r74jbCRwNi0gyFRjjbsGgoHbOyj7mT1PDNbTw==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6813,20 +6813,20 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.3(hono@4.6.8)': + '@hono/node-server@1.13.3(hono@4.6.9)': dependencies: - hono: 4.6.8 + hono: 4.6.9 - '@hono/zod-openapi@0.16.4(hono@4.6.8)(zod@3.23.8)': + '@hono/zod-openapi@0.16.4(hono@4.6.9)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.3.0(hono@4.6.8)(zod@3.23.8) - hono: 4.6.8 + '@hono/zod-validator': 0.3.0(hono@4.6.9)(zod@3.23.8) + hono: 4.6.9 zod: 3.23.8 - '@hono/zod-validator@0.3.0(hono@4.6.8)(zod@3.23.8)': + '@hono/zod-validator@0.3.0(hono@4.6.9)(zod@3.23.8)': dependencies: - hono: 4.6.8 + hono: 4.6.9 zod: 3.23.8 '@humanfs/core@0.19.1': {} @@ -7237,10 +7237,10 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.158(hono@4.6.8)': + '@scalar/hono-api-reference@0.5.158(hono@4.6.9)': dependencies: '@scalar/types': 0.0.18 - hono: 4.6.8 + hono: 4.6.9 '@scalar/openapi-types@0.1.4': {} @@ -9226,7 +9226,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.8: {} + hono@4.6.9: {} hookable@5.5.3: {} From b68cfb25bca78805492b2810554b33a6f494789a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 00:08:02 +0800 Subject: [PATCH 392/740] chore(deps): bump @hono/node-server from 1.13.3 to 1.13.5 (#17437) * chore(deps): bump @hono/node-server from 1.13.3 to 1.13.5 Bumps [@hono/node-server](https://github.com/honojs/node-server) from 1.13.3 to 1.13.5. - [Release notes](https://github.com/honojs/node-server/releases) - [Commits](https://github.com/honojs/node-server/compare/v1.13.3...v1.13.5) --- updated-dependencies: - dependency-name: "@hono/node-server" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install * test: trigger tests --------- Signed-off-by: dependabot[bot] <support@github.com> 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 596d513ee530ba4..9f12932d9a5a2cf 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "dependencies": { "@bbob/html": "4.1.1", "@bbob/preset-html5": "4.1.1", - "@hono/node-server": "1.13.3", + "@hono/node-server": "1.13.5", "@hono/zod-openapi": "0.16.4", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3b241978e18b14..8a39acbbab9339b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,8 +15,8 @@ importers: specifier: 4.1.1 version: 4.1.1 '@hono/node-server': - specifier: 1.13.3 - version: 1.13.3(hono@4.6.9) + specifier: 1.13.5 + version: 1.13.5(hono@4.6.9) '@hono/zod-openapi': specifier: 0.16.4 version: 0.16.4(hono@4.6.9)(zod@3.23.8) @@ -1339,8 +1339,8 @@ packages: resolution: {integrity: sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@hono/node-server@1.13.3': - resolution: {integrity: sha512-tEo3hcyQ6chvSnJ3tKzfX4z2sd7Q+ZkBwwBdW1Ya8Mz29dukxC2xcWiB/lAMwGJrYMW8QTgknIsLu1AsnMBe7A==} + '@hono/node-server@1.13.5': + resolution: {integrity: sha512-lSo+CFlLqAFB4fX7ePqI9nauEn64wOfJHAfc9duYFTvAG3o416pC0nTGeNjuLHchLedH+XyWda5v79CVx1PIjg==} engines: {node: '>=18.14.1'} peerDependencies: hono: ^4 @@ -6813,7 +6813,7 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.3(hono@4.6.9)': + '@hono/node-server@1.13.5(hono@4.6.9)': dependencies: hono: 4.6.9 From 9faba9e088fef11e3989491c0d0b603670bf4a68 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Tue, 5 Nov 2024 00:17:40 +0800 Subject: [PATCH 393/740] =?UTF-8?q?feat(route):=20C114=20=E6=BB=9A?= =?UTF-8?q?=E5=8A=A8=E8=B5=84=E8=AE=AF=E5=8F=AA=E7=9C=8B=E5=8E=9F=E5=88=9B?= =?UTF-8?q?=20(#17430)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/c114/namespace.ts | 2 + lib/routes/c114/roll.ts | 113 ++++++++++++++++++++++------------- 2 files changed, 73 insertions(+), 42 deletions(-) diff --git a/lib/routes/c114/namespace.ts b/lib/routes/c114/namespace.ts index ef7f192c55f8b70..dd5c3be2afd3ae4 100644 --- a/lib/routes/c114/namespace.ts +++ b/lib/routes/c114/namespace.ts @@ -3,5 +3,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'C114 通信网', url: 'c114.com.cn', + categories: ['new-media'], + description: '', lang: 'zh-CN', }; diff --git a/lib/routes/c114/roll.ts b/lib/routes/c114/roll.ts index ae22d3c79884fa7..2e4835cad7a7b1c 100644 --- a/lib/routes/c114/roll.ts +++ b/lib/routes/c114/roll.ts @@ -1,4 +1,5 @@ import { Route } from '@/types'; + import cache from '@/utils/cache'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -6,78 +7,106 @@ import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import iconv from 'iconv-lite'; -export const route: Route = { - path: '/roll', - categories: ['new-media'], - example: '/c114/roll', - parameters: {}, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - radar: [ - { - source: ['c114.com.cn/news/roll.asp', 'c114.com.cn/'], - }, - ], - name: '滚动新闻', - maintainers: ['nczitzk'], - handler, - url: 'c114.com.cn/news/roll.asp', -}; +export const handler = async (ctx) => { + const { original = 'false' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 15; -async function handler(ctx) { const rootUrl = 'https://www.c114.com.cn'; - const currentUrl = `${rootUrl}/news/roll.asp`; + const currentUrl = new URL(`news/roll.asp${original === 'true' ? `?o=true` : ''}`, rootUrl).href; - const response = await got({ - method: 'get', - url: currentUrl, + const { data: response } = await got(currentUrl, { responseType: 'buffer', }); - const $ = load(iconv.decode(response.data, 'gbk')); + const $ = load(iconv.decode(response, 'gbk')); + + const language = $('html').prop('lang'); - let items = $('.new_list_c h6 a') - .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 50) + let items = $('div.new_list_c') + .slice(0, limit) .toArray() .map((item) => { item = $(item); return { - title: item.text(), - link: item.attr('href'), + title: item.find('h6 a').text(), + pubDate: timezone(parseDate(item.find('div.new_list_time').text(), ['HH:mm', 'M/D']), +8), + link: new URL(item.find('h6 a').prop('href'), rootUrl).href, + author: item.find('div.new_list_author').text().trim(), + language, }; }); items = await Promise.all( items.map((item) => cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, + const { data: detailResponse } = await got(item.link, { responseType: 'buffer', }); - const content = load(iconv.decode(detailResponse.data, 'gbk')); + const $$ = load(iconv.decode(detailResponse, 'gbk')); - item.description = content('.text').html(); - item.author = content('.author').first().text().replace('C114通信网  ', ''); - item.pubDate = timezone(parseDate(content('.r_time').text()), +8); - item.category = content('meta[name="keywords"]').attr('content').split(','); + const title = $$('h1').text(); + const description = $$('div.text').html(); + + item.title = title; + item.description = description; + item.pubDate = timezone(parseDate($$('div.r_time').text(), 'YYYY/M/D HH:mm'), +8); + item.author = $$('div.author').first().text().trim(); + item.content = { + html: description, + text: $$('.text').text(), + }; + item.language = language; return item; }) ) ); + const image = new URL($('div.top2-1 a img').prop('src'), rootUrl).href; + return { title: $('title').text(), + description: $('meta[name="description"]').prop('content'), link: currentUrl, item: items, + allowEmpty: true, + image, + author: $('p.top1-1-1 a').first().text(), + language, }; -} +}; + +export const route: Route = { + path: '/roll/:original?', + name: '滚动资讯', + url: 'c114.com.cn', + maintainers: ['nczitzk'], + handler, + example: '/c114/roll', + parameters: { original: '只看原创,可选 true 和 false,默认为 false' }, + description: '', + categories: ['new-media'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['c114.com.cn/news/roll.asp'], + target: (_, url) => { + url = new URL(url); + const original = url.searchParams.get('o'); + + return `/roll${original ? `/${original}` : ''}`; + }, + }, + ], +}; From 01141f94a733c905d429a79eb1e87f2824b12220 Mon Sep 17 00:00:00 2001 From: liyaozhong <yun.zhongyue@163.com> Date: Tue, 5 Nov 2024 00:23:16 +0800 Subject: [PATCH 394/740] feat(route): add baoyu's blog with complete content (#17439) --- lib/routes/baoyu/index.ts | 57 +++++++++++++++++++++++++++++++++++ lib/routes/baoyu/namespace.ts | 8 +++++ 2 files changed, 65 insertions(+) create mode 100644 lib/routes/baoyu/index.ts create mode 100644 lib/routes/baoyu/namespace.ts diff --git a/lib/routes/baoyu/index.ts b/lib/routes/baoyu/index.ts new file mode 100644 index 000000000000000..5b1011208895987 --- /dev/null +++ b/lib/routes/baoyu/index.ts @@ -0,0 +1,57 @@ +import { Route, DataItem } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import parser from '@/utils/rss-parser'; +import cache from '@/utils/cache'; + +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/baoyu/blog', + radar: [ + { + source: ['baoyu.io/'], + }, + ], + url: 'baoyu.io/', + name: 'Blog', + maintainers: ['liyaozhong'], + handler, + description: '宝玉 - 博客文章', +}; + +async function handler() { + const rootUrl = 'https://baoyu.io'; + const feedUrl = `${rootUrl}/feed.xml`; + + const feed = await parser.parseURL(feedUrl); + + const items = await Promise.all( + feed.items.map((item) => { + const link = item.link; + + return cache.tryGet(link as string, async () => { + const response = await got(link); + const $ = load(response.data); + + const container = $('.container'); + const content = container.find('.prose').html() || ''; + + return { + title: item.title, + description: content, + link, + pubDate: item.pubDate ? parseDate(item.pubDate) : undefined, + author: item.creator || '宝玉', + } as DataItem; + }); + }) + ); + + return { + title: '宝玉的博客', + link: rootUrl, + item: items, + }; +} diff --git a/lib/routes/baoyu/namespace.ts b/lib/routes/baoyu/namespace.ts new file mode 100644 index 000000000000000..6bc9da081013b23 --- /dev/null +++ b/lib/routes/baoyu/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '宝玉', + url: 'baoyu.io', + description: '宝玉的博客', + lang: 'zh-CN', +}; From 4ffe081eb29512f269b2cb2d5a6c0bb702286e34 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 5 Nov 2024 00:27:55 +0800 Subject: [PATCH 395/740] fix(bilibili): video reply (#17440) * fix(bilibili): video reply * fix * update --- lib/routes/bilibili/reply.ts | 2 ++ lib/utils/got.ts | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/routes/bilibili/reply.ts b/lib/routes/bilibili/reply.ts index cb63d4cc678efef..25a69415cf81b9f 100644 --- a/lib/routes/bilibili/reply.ts +++ b/lib/routes/bilibili/reply.ts @@ -33,11 +33,13 @@ async function handler(ctx) { } const link = `https://www.bilibili.com/video/${bvid || `av${aid}`}`; + const cookie = await cache.getCookie(); const response = await got({ method: 'get', url: `https://api.bilibili.com/x/v2/reply?type=1&oid=${aid}&sort=0`, headers: { Referer: link, + Cookie: cookie, }, }); diff --git a/lib/utils/got.ts b/lib/utils/got.ts index 1f623d9d6c256c4..cf03e74b21a0430 100644 --- a/lib/utils/got.ts +++ b/lib/utils/got.ts @@ -1,6 +1,10 @@ import { destr } from 'destr'; import ofetch from '@/utils/ofetch'; +function isObject(o) { + return o !== null && typeof o === 'object' && Array.isArray(o) === false; +} + const getFakeGot = (defaultOptions?: any) => { const fakeGot = (request, options?: any) => { if (!(typeof request === 'string' || request instanceof Request) && request.url) { @@ -35,7 +39,15 @@ const getFakeGot = (defaultOptions?: any) => { delete options.form; } if (options?.searchParams) { - request += '?' + new URLSearchParams(options.searchParams).toString(); + request += + '?' + + new URLSearchParams( + isObject(options.searchParams) + ? Object.entries(options.searchParams) + .filter(([, value]) => value !== undefined) + .map(([key, value]) => [key, String(value)]) + : options.searchParams + ).toString(); delete options.searchParams; } From 125124ca8760df7c22946638b038fe4995613953 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Tue, 5 Nov 2024 00:33:50 +0800 Subject: [PATCH 396/740] =?UTF-8?q?feat(route):=20add=20=E9=A3=9E=E5=AE=A2?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E8=AF=B4=20(#17441)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/flyert/forum.ts | 99 +++++++++++ lib/routes/flyert/namespace.ts | 1 + lib/routes/flyert/templates/description.art | 21 +++ lib/routes/flyert/util.ts | 188 ++++++++++++++++++++ 4 files changed, 309 insertions(+) create mode 100644 lib/routes/flyert/forum.ts create mode 100644 lib/routes/flyert/templates/description.art create mode 100644 lib/routes/flyert/util.ts diff --git a/lib/routes/flyert/forum.ts b/lib/routes/flyert/forum.ts new file mode 100644 index 000000000000000..1bb15da4a3f25c0 --- /dev/null +++ b/lib/routes/flyert/forum.ts @@ -0,0 +1,99 @@ +import { Route } from '@/types'; + +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import iconv from 'iconv-lite'; +import { load } from 'cheerio'; +import { rootUrl, parseArticleList, parsePostList, parseArticle, parsePost } from './util'; + +export const handler = async (ctx) => { + const { params } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 5; + + const decodedParams = params + ? decodeURIComponent(params) + .split(/&/) + .filter((p) => p.split(/=/).length === 2) + .join('&') + : undefined; + + const currentUrl = new URL(`forum.php${decodedParams ? `?${decodedParams}` : ''}`, rootUrl).href; + + const { data: response } = await got(currentUrl, { + responseType: 'buffer', + }); + + const $ = load(iconv.decode(response, 'gbk')); + + const language = $('meta[http-equiv="Content-Language"]').prop('content'); + + let items = $('table#threadlisttableid').length === 0 ? parseArticleList($, limit) : parsePostList($, limit); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const { data: detailResponse } = await got(item.link, { + responseType: 'buffer', + }); + + const $$ = load(iconv.decode(detailResponse, 'gbk').replaceAll(/<\/?ignore_js_op>/g, '')); + + item = $$('div.firstpost').length === 0 ? parseArticle($$, item) : parsePost($$, item); + + item.language = language; + + return item; + }) + ) + ); + + const image = `https:${$('div.wp h2 a img').prop('src')}`; + + return { + title: `飞客 - ${$('a.forum_name, li.a, li.cur, li.xw1, div.z > a.xw1') + .toArray() + .map((a) => $(a).text()) + .join(' - ')}`, + description: $('meta[name="description"]').prop('content'), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: $('meta[name="application-name"]').prop('content'), + }; +}; + +export const route: Route = { + path: '/forum/:params{.+}?', + name: '会员说', + url: 'www.flyert.com.cn', + maintainers: ['nczitzk'], + handler, + example: '/flyert/forum', + parameters: { params: '参数,默认为空,可在对应分类页 URL 中找到' }, + description: `:::tip + 若订阅 [酒店集团优惠](https://www.flyert.com.cn/forum.php?mod=forumdisplay&sum=all&fid=all&catid=322&filter=sortid&sortid=144&searchsort=1&youhui_type=19),网址为 \`https://www.flyert.com.cn/forum.php?mod=forumdisplay&sum=all&fid=all&catid=322&filter=sortid&sortid=144&searchsort=1&youhui_type=19\`。截取 \`https://www.flyert.com.cn/forum.php?\` 到末尾的部分 \`mod=forumdisplay&sum=all&fid=all&catid=322&filter=sortid&sortid=144&searchsort=1&youhui_type=19\` **进行 UrlEncode 编码** 后作为参数填入,此时路由为 [\`/flyert/forum/mod%3Dforumdisplay%26sum%3Dall%26fid%3Dall%26catid%3D322%26filter%3Dsortid%26sortid%3D144%26searchsort%3D1%26youhui_type%3D226\`](https://rsshub.app/flyert/forum/mod%3Dforumdisplay%26sum%3Dall%26fid%3Dall%26catid%3D322%26filter%3Dsortid%26sortid%3D144%26searchsort%3D1%26youhui_type%3D226)。 + ::: + `, + categories: ['bbs'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.flyert.com.cn/forum.php'], + target: (_, url) => { + const params = [...url.searchParams.entries()].map(([key, value]) => key + '=' + value).join('&'); + + return `/forum${params ? `/${encodeURIComponent(params)}` : ''}`; + }, + }, + ], +}; diff --git a/lib/routes/flyert/namespace.ts b/lib/routes/flyert/namespace.ts index 0643b1388456b84..e199ec23f4c357d 100644 --- a/lib/routes/flyert/namespace.ts +++ b/lib/routes/flyert/namespace.ts @@ -3,5 +3,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '飞客茶馆', url: 'flyert.com', + description: '', lang: 'zh-CN', }; diff --git a/lib/routes/flyert/templates/description.art b/lib/routes/flyert/templates/description.art new file mode 100644 index 000000000000000..249654e7e618a4a --- /dev/null +++ b/lib/routes/flyert/templates/description.art @@ -0,0 +1,21 @@ +{{ if images }} + {{ each images image }} + {{ if image?.src }} + <figure> + <img + {{ if image.alt }} + alt="{{ image.alt }}" + {{ /if }} + src="{{ image.src }}"> + </figure> + {{ /if }} + {{ /each }} +{{ /if }} + +{{ if intro }} + <blockquote>{{ intro }}</blockquote> +{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file diff --git a/lib/routes/flyert/util.ts b/lib/routes/flyert/util.ts new file mode 100644 index 000000000000000..9538d00550e0e19 --- /dev/null +++ b/lib/routes/flyert/util.ts @@ -0,0 +1,188 @@ +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'; +import { art } from '@/utils/render'; +import path from 'node:path'; + +const rootUrl = 'https://www.flyert.com.cn'; + +/** + * Parses a list of articles based on a CheerioAPI object and a limit. + * @param $ The CheerioAPI object. + * @param limit The maximum number of articles to parse. + * @returns An array of parsed article objects. + */ +const parseArticleList = ($: CheerioAPI, limit: number) => + $('div.comiis_wzli') + .slice(0, limit) + .toArray() + .map((item) => { + item = $(item); + + const title = item.find('div.wzbt').text().trim(); + const image = item.find('div.wzpic img').prop('src'); + const description = art(path.join(__dirname, 'templates/description.art'), { + images: image + ? [ + { + src: image, + alt: title, + }, + ] + : undefined, + description: item.find('div.wznr').html(), + }); + const pubDate = item.find('div.subcat span.y').contents()?.eq(2)?.text().trim() ?? undefined; + const link = new URL(item.find('div.wzbt a').prop('href'), rootUrl).href; + + return { + title, + description, + pubDate: pubDate ? parseDate(pubDate) : undefined, + link, + author: item.find('div.subcat span.y a').first().text(), + content: { + html: description, + text: item.find('div.wznr').text(), + }, + image, + banner: image, + }; + }); + +/** + * Parses a list of posts based on a CheerioAPI object and a limit. + * @param $ The CheerioAPI object. + * @param limit The maximum number of posts to parse. + * @returns An array of parsed post objects. + */ +const parsePostList = ($: CheerioAPI, limit: number) => + $('div.comiis_postlist') + .toArray() + .filter((item) => { + item = $(item); + + return item + .find('span.comiis_common a[data-track]') + .toArray() + .some((a) => { + a = $(a); + + const dataTrack = a.attr('data-track') || ''; + return dataTrack.endsWith('文章'); + }); + }) + .slice(0, limit) + .map((item) => { + item = $(item); + + const aEl = $( + item + .find('span.comiis_common a[data-track]') + .toArray() + .find((a) => { + a = $(a); + + const dataTrack = a.attr('data-track') || ''; + return dataTrack.endsWith('文章'); + }) + ); + + const pubDate = item.find('span.author_b span').prop('title') || undefined; + + return { + title: aEl.text().trim(), + pubDate: pubDate ? parseDate(pubDate) : undefined, + link: new URL(aEl.prop('href'), rootUrl).href, + author: item.find('a.author_t').text().trim(), + }; + }); + +/** + * Parses an article based on a CheerioAPI object and an item. + * @param $$ The CheerioAPI object. + * @param item The item to parse. + * @returns The parsed article object. + */ +const parseArticle = ($$: CheerioAPI, item) => { + const title = $$('h1.ph').text().trim(); + const description = art(path.join(__dirname, 'templates/description.art'), { + intro: $$('div.s').text() || undefined, + description: $$('div#artMain').html(), + }); + const pubDate = + $$('p.xg1') + .contents() + .first() + .text() + .trim() + ?.match(/(\d{4}-\d{1,2}-\d{1,2}\s\d{2}:\d{2})/)?.[1] ?? undefined; + const guid = `flyert-${item.link.split(/=/).pop()}`; + + item.title = title; + item.description = description; + item.pubDate = pubDate ? timezone(parseDate(pubDate), +8) : item.pubDate; + item.author = $$('p.xg1 a').first().text(); + item.guid = guid; + item.id = guid; + item.content = { + html: description, + text: $$('div#artMain').text(), + }; + + return item; +}; + +/** + * Parses a post based on a CheerioAPI object and an item. + * @param $$ The CheerioAPI object. + * @param item The item to parse. + * @returns The parsed post object. + */ +const parsePost = ($$: CheerioAPI, item) => { + $$('img.zoom').each((_, el) => { + el = $$(el); + + el.replaceWith( + art(path.join(__dirname, 'templates/description.art'), { + images: + el.prop('zoomfile') || el.prop('file') + ? [ + { + src: el.prop('zoomfile') || el.prop('file'), + alt: el.prop('alt') || el.prop('title'), + }, + ] + : undefined, + }) + ); + }); + + $$('i.pstatus').remove(); + $$('div.tip').remove(); + + const title = $$('span#thread_subject').text().trim(); + const description = $$('div.post_message').first().html(); + const pubDate = $$('span[title]').first().prop('title'); + + const tid = item.link.match(/tid=(\d+)/)?.[1] ?? undefined; + const guid = tid ? `flyert-${tid}` : undefined; + + item.title = title; + item.description = description; + item.pubDate = pubDate ? timezone(parseDate(pubDate), +8) : item.pubDate; + item.author = $$('a.kmxi2').first().text(); + item.guid = guid; + item.id = guid; + item.content = { + html: description, + text: $$('div.post_message').first().text(), + }; + + return item; +}; + +export { rootUrl, parseArticleList, parsePostList, parseArticle, parsePost }; From 9783660dd3ce32b11dbeaf8ea617a676d3dd4317 Mon Sep 17 00:00:00 2001 From: After9 <ap66.ron@gmail.com> Date: Tue, 5 Nov 2024 00:42:20 +0800 Subject: [PATCH 397/740] feat: add route(chart) for openrice.comOpenrice (#17431) * feat: add route for openrice.com * fix: Optimize the code according to the recommendations of review * fix: Remove the initial assignment of variable urlPath * feat: add route(chart) for openrice.com * Update lib/routes/openrice/namespace.ts update lang value following the type Namespace Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/openrice/chart.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/openrice/chart.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * remove blank option in ofetch Co-authored-by: Tony <TonyRL@users.noreply.github.com> --------- --- lib/routes/openrice/chart.ts | 68 +++++++++++++++++++++++++ lib/routes/openrice/templates/chart.art | 9 ++++ 2 files changed, 77 insertions(+) create mode 100644 lib/routes/openrice/chart.ts create mode 100644 lib/routes/openrice/templates/chart.art diff --git a/lib/routes/openrice/chart.ts b/lib/routes/openrice/chart.ts new file mode 100644 index 000000000000000..54dded34d669ecd --- /dev/null +++ b/lib/routes/openrice/chart.ts @@ -0,0 +1,68 @@ +import { Route } from '@/types'; +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 = { + path: '/:lang/hongkong/explore/chart/:category', + maintainers: ['after9'], + handler, + categories: ['shopping'], + example: '/openrice/zh/hongkong/explore/chart/most-bookmarked', + parameters: { lang: '语言,缺省为 zh', category: '类别,缺省为 most-bookmarked' }, + name: '香港餐廳排行榜', + description: ` + | 简体 | 繁體 | EN | + | ----- | ------ | ----- | + | zh-cn | zh | en | + + | 最多收藏 | 每周最高评分 | 最高浏览 | 最佳甜品餐厅 | + | ----- | ------ | ----- | ----- | + | most-bookmarked | best-rating | most-popular | best-dessert | + `, +}; + +async function handler(ctx) { + const lang = ctx.req.param('lang') ?? 'zh'; + const category = ctx.req.param('category') ?? 'most-bookmarked'; + + const urlPath: string = `/${lang}/hongkong/explore/chart/${category}`; + const response = await ofetch(baseUrl + urlPath); + const $ = load(response); + + const title = $('title').text() ?? 'Hong Kong Restaurant Chart'; + const description = $('title').text() ?? 'Hong Kong Restaurant Chart'; + + const data = $('.poi-chart-main-grid-item-desktop-wrapper'); + const resultList = data.toArray().map((item) => { + const $item = $(item); + const rankClass = $item.find('.rank-icon').attr('class'); + const rankNumber = rankClass?.match(/rank-(\d+)/)?.[1] ?? ''; + const desTags = $item.find('.pcmgidtr-left-section-poi-info-details .pcmgidtrls-poi-info-details-text'); + const desTagsArray: string[] = desTags.toArray().map((tag) => $(tag).text()); + 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, + }); + return { + title, + description, + link, + }; + }); + + return { + title, + link: baseUrl + urlPath, + description, + item: resultList, + }; +} diff --git a/lib/routes/openrice/templates/chart.art b/lib/routes/openrice/templates/chart.art new file mode 100644 index 000000000000000..7433821a1ddf032 --- /dev/null +++ b/lib/routes/openrice/templates/chart.art @@ -0,0 +1,9 @@ +<h3>Rank: {{ rankNumber }} / {{ title }}</h3> +<p> +{{ each description }} +{{ $value }} +{{ /each }} +</p> +{{ if image }} +<img src="{{ image }}"> +{{ /if }} \ No newline at end of file From 7a11c6bbfabc215ee42fab3bdcbf2f2d2fd78349 Mon Sep 17 00:00:00 2001 From: Don Yihtseu <tsurumiseiko@outlook.com> Date: Tue, 5 Nov 2024 01:18:42 +0800 Subject: [PATCH 398/740] feat(router/jlu): add JLU Phy (#17323) * feat(router/jlu): add JLU Phy * fix(router/jlu): add description * fix(router/jlu): add parameters and features * fix(router/jlu): check rule hope this --- lib/routes/jlu/phy/index.ts | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 lib/routes/jlu/phy/index.ts diff --git a/lib/routes/jlu/phy/index.ts b/lib/routes/jlu/phy/index.ts new file mode 100644 index 000000000000000..4b0ed4ad4f501aa --- /dev/null +++ b/lib/routes/jlu/phy/index.ts @@ -0,0 +1,55 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; + +export const route: Route = { + path: '/phy/:category/:column/:subcolumn?', + categories: ['university'], + example: '/jlu/phy/xzgz/tzgg', + parameters: { + category: '分类,为「行政工作」、「科学研究」、「人才培养」的拼音小写首字母。', + column: '栏目,当分类为「行政工作」时,为「通知公告」、「学院新闻」、「学院文件」的拼音小写首字母。当分类为「科学研究」时,为「科研动态」、「学术活动」的拼音小写首字母。当分类为「人才培养」时。为「本科生教育」、「研究生教育」、「学团工作」的拼音小写首字母。', + subcolumn: '子栏目。当栏目为「本科生教育」时,为「本科资讯」的拼音大写首字母,或为「教育思想大讨论系列活动」、「培养方案」的拼音小写首字母。当栏目为「研究生教育」时,为「教学通知」的拼音小写首字母。', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['phy.jlu.edu.cn/:category/:column', 'phy.jlu.edu.cn/:category/:column/:subcolumn'], + }, + ], + name: '物理学院', + maintainers: ['tsurumi-yizhou'], + url: 'phy.jlu.edu.cn', + handler: async (ctx) => { + const { category, column, subcolumn } = ctx.req.param(); + const query = subcolumn ? `${column}/${subcolumn}` : column; + const response = await got(`https://phy.jlu.edu.cn/${category}/${query}.htm`); + const $ = load(response.body); + const list = $('.tit-list ul li'); + + return { + title: '吉林大学物理学院', + link: 'https://phy.jlu.edu.cn/', + description: '吉林大学物理学院', + item: list.toArray().map((item) => { + const element = $(item).find('a'); + const title = element.find('.tl-top').find('h3').text().trim(); + const link = element.attr('href')!.replaceAll('../', 'https://phy.jlu.edu.cn/'); + const date = element.find('.tl-top').find('.tl-date'); + const pubDate = date.find('span').text().replaceAll('/', '').trim() + '-' + date.find('b').text(); + return { + title, + link, + pubDate: new Date(pubDate), + }; + }), + }; + }, +}; From 8b7568bf4f47e946f45dcb30ebcaa38acac309ca Mon Sep 17 00:00:00 2001 From: Neko Aria <990879119@qq.com> Date: Tue, 5 Nov 2024 04:30:44 +0800 Subject: [PATCH 399/740] feat(route/yande): extend yande post route with popular category (#17319) --- lib/routes/yande/post.ts | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/routes/yande/post.ts b/lib/routes/yande/post.ts index 794bcf613f99244..07d78aa990220dd 100644 --- a/lib/routes/yande/post.ts +++ b/lib/routes/yande/post.ts @@ -1,13 +1,23 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import queryString from 'query-string'; export const route: Route = { path: '/post/popular_recent/:period?', - categories: ['picture'], + categories: ['picture', 'popular'], + view: ViewType.Pictures, example: '/yande/post/popular_recent/1d', parameters: { - period: '展示时间', + period: { + description: '展示时间', + options: [ + { value: '1d', label: '最近 24 小时' }, + { value: '1w', label: '最近一周' }, + { value: '1m', label: '最近一月' }, + { value: '1y', label: '最近一年' }, + ], + default: '1d', + }, }, radar: [ { From 5d6bc8c55b86ebc3be9564beb6d159ecb3e6df6e Mon Sep 17 00:00:00 2001 From: liyaozhong <yun.zhongyue@163.com> Date: Tue, 5 Nov 2024 09:43:36 +0800 Subject: [PATCH 400/740] feat(route): add the gradient blog (#17427) fix(route): fix pr issue --- lib/routes/thegradient/index.ts | 80 +++++++++++++++++++++++++++++ lib/routes/thegradient/namespace.ts | 7 +++ 2 files changed, 87 insertions(+) create mode 100644 lib/routes/thegradient/index.ts create mode 100644 lib/routes/thegradient/namespace.ts diff --git a/lib/routes/thegradient/index.ts b/lib/routes/thegradient/index.ts new file mode 100644 index 000000000000000..f255f7ad54064d8 --- /dev/null +++ b/lib/routes/thegradient/index.ts @@ -0,0 +1,80 @@ +import { Route, DataItem } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import cache from '@/utils/cache'; + +export const route: Route = { + path: '/posts', + categories: ['blog'], + example: '/thegradient/posts', + radar: [ + { + source: ['thegradient.pub/'], + }, + ], + url: 'thegradient.pub/', + name: 'Posts', + maintainers: ['liyaozhong'], + handler, + description: 'The Gradient Blog Posts', +}; + +async function handler() { + const rootUrl = 'https://thegradient.pub'; + const currentUrl = rootUrl; + + const response = await got(currentUrl); + const $ = load(response.data); + + let items = $('.c-post-card-wrap') + .toArray() + .map((item) => { + const $item = $(item); + const $link = $item.find('.c-post-card__title-link').first(); + const $meta = $item.find('.c-post-card__meta'); + + const href = $link.attr('href'); + const title = $link.text().trim(); + const dateStr = $meta.find('time').attr('datetime'); + + if (!href || !title || !dateStr) { + return null; + } + + const link = new URL(href, rootUrl).href; + const pubDate = parseDate(dateStr); + + return { + title, + link, + pubDate, + } as DataItem; + }) + .filter((item): item is DataItem => item !== null); + + items = ( + await Promise.all( + items.map((item) => + cache.tryGet(item.link as string, async () => { + try { + const detailResponse = await got(item.link); + const $detail = load(detailResponse.data); + + item.description = $detail('.c-content').html() || ''; + + return item as DataItem; + } catch { + return item; + } + }) + ) + ) + ).filter((item): item is DataItem => item !== null); + + return { + title: 'The Gradient Blog', + link: rootUrl, + item: items, + }; +} diff --git a/lib/routes/thegradient/namespace.ts b/lib/routes/thegradient/namespace.ts new file mode 100644 index 000000000000000..fa3d32ebc51e9a4 --- /dev/null +++ b/lib/routes/thegradient/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Gradient', + url: 'thegradient.pub', + lang: 'en', +}; From 0b813e066ac427dac0855573da92d9146425165d Mon Sep 17 00:00:00 2001 From: liyaozhong <yun.zhongyue@163.com> Date: Tue, 5 Nov 2024 10:50:37 +0800 Subject: [PATCH 401/740] feat(route): add the hamel blog (#17428) fix(route): fix pr issue --- lib/routes/hamel/index.ts | 81 +++++++++++++++++++++++++++++++++++ lib/routes/hamel/namespace.ts | 7 +++ 2 files changed, 88 insertions(+) create mode 100644 lib/routes/hamel/index.ts create mode 100644 lib/routes/hamel/namespace.ts diff --git a/lib/routes/hamel/index.ts b/lib/routes/hamel/index.ts new file mode 100644 index 000000000000000..3946e48cba33367 --- /dev/null +++ b/lib/routes/hamel/index.ts @@ -0,0 +1,81 @@ +import { Route, DataItem } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import cache from '@/utils/cache'; + +export const route: Route = { + path: '/blog', + categories: ['blog'], + example: '/hamel/blog', + radar: [ + { + source: ['hamel.dev/'], + }, + ], + url: 'hamel.dev/', + name: 'Blog', + maintainers: ['liyaozhong'], + handler, + description: "Hamel's Blog Posts", +}; + +async function handler() { + const rootUrl = 'https://hamel.dev'; + const currentUrl = rootUrl; + + const response = await got(currentUrl); + const $ = load(response.data); + + let items = $('tr[data-index]') + .toArray() + .map((item) => { + const $item = $(item); + const $link = $item.find('td a').last(); + const $date = $item.find('.listing-date'); + + const href = $link.attr('href'); + const title = $link.text().trim(); + const dateStr = $date.text().trim(); + + if (!href || !title || !dateStr) { + return null; + } + + const link = new URL(href, rootUrl).href; + const pubDate = parseDate(dateStr, 'M/D/YY'); + + return { + title, + link, + pubDate, + } as DataItem; + }) + .filter((item): item is DataItem => item !== null); + + items = ( + await Promise.all( + items.map((item) => + cache.tryGet(item.link as string, async () => { + try { + const detailResponse = await got(item.link); + const $detail = load(detailResponse.data); + + return { + ...item, + description: $detail('.content').html() || '', + } as DataItem; + } catch { + return item; + } + }) + ) + ) + ).filter((item): item is DataItem => item !== null); + + return { + title: "Hamel's Blog", + link: rootUrl, + item: items, + }; +} diff --git a/lib/routes/hamel/namespace.ts b/lib/routes/hamel/namespace.ts new file mode 100644 index 000000000000000..f5a48a8f04c6fb2 --- /dev/null +++ b/lib/routes/hamel/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: "Hamel's Blog", + url: 'hamel.dev', + lang: 'en', +}; From e7526eada4cf8fbfe6da7b65a7f98315fd75a6ef Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 5 Nov 2024 11:27:13 +0800 Subject: [PATCH 402/740] fix: get SearchParams string (#17445) * fix: get SearchParams string * refactor: use ufo * lock deps --- lib/utils/got.ts | 15 ++------------- lib/utils/helpers.test.ts | 14 +++++++++++++- lib/utils/helpers.ts | 10 ++++++++++ package.json | 1 + pnpm-lock.yaml | 3 +++ 5 files changed, 29 insertions(+), 14 deletions(-) diff --git a/lib/utils/got.ts b/lib/utils/got.ts index cf03e74b21a0430..372fe125b33e516 100644 --- a/lib/utils/got.ts +++ b/lib/utils/got.ts @@ -1,9 +1,6 @@ import { destr } from 'destr'; import ofetch from '@/utils/ofetch'; - -function isObject(o) { - return o !== null && typeof o === 'object' && Array.isArray(o) === false; -} +import { getSearchParamsString } from './helpers'; const getFakeGot = (defaultOptions?: any) => { const fakeGot = (request, options?: any) => { @@ -39,15 +36,7 @@ const getFakeGot = (defaultOptions?: any) => { delete options.form; } if (options?.searchParams) { - request += - '?' + - new URLSearchParams( - isObject(options.searchParams) - ? Object.entries(options.searchParams) - .filter(([, value]) => value !== undefined) - .map(([key, value]) => [key, String(value)]) - : options.searchParams - ).toString(); + request += '?' + getSearchParamsString(options.searchParams); delete options.searchParams; } diff --git a/lib/utils/helpers.test.ts b/lib/utils/helpers.test.ts index 4870e54fc585404..23ac83ca0cb64d1 100644 --- a/lib/utils/helpers.test.ts +++ b/lib/utils/helpers.test.ts @@ -1,8 +1,20 @@ import { describe, expect, it } from 'vitest'; -import { getRouteNameFromPath } from '@/utils/helpers'; +import { getRouteNameFromPath, getSearchParamsString } from '@/utils/helpers'; describe('helpers', () => { it('getRouteNameFromPath', () => { expect(getRouteNameFromPath('/test/1')).toBe('test'); }); + + it('getSearchParamsString', () => { + expect(getSearchParamsString({ a: 1, b: 2 })).toBe('a=1&b=2'); + expect(getSearchParamsString({ a: 1, b: undefined })).toBe('a=1'); + expect(getSearchParamsString({ a: undefined })).toBe(''); + expect(getSearchParamsString({})).toBe(''); + + const searchParams = new URLSearchParams(); + searchParams.append('ids[]', '1'); + searchParams.append('ids[]', '2'); + expect(getSearchParamsString(searchParams)).toBe('ids%5B%5D=1&ids%5B%5D=2'); + }); }); diff --git a/lib/utils/helpers.ts b/lib/utils/helpers.ts index ff78e73a1849400..bc222464e97060b 100644 --- a/lib/utils/helpers.ts +++ b/lib/utils/helpers.ts @@ -1,5 +1,6 @@ import { fileURLToPath } from 'url'; import path from 'node:path'; +import { stringifyQuery } from 'ufo'; export const getRouteNameFromPath = (path: string) => { const p = path.split('/').filter(Boolean); @@ -30,3 +31,12 @@ export const getCurrentPath = (metaUrl: string) => { const __filename = path.join(fileURLToPath(metaUrl)); return path.dirname(__filename); }; + +function isPureObject(o: any) { + return Object.prototype.toString.call(o) === '[object Object]'; +} + +export function getSearchParamsString(searchParams: any) { + const searchParamsString = isPureObject(searchParams) ? stringifyQuery(searchParams) : null; + return searchParamsString ?? new URLSearchParams(searchParams).toString(); +} diff --git a/package.json b/package.json index 9f12932d9a5a2cf..873a0616b66cdc4 100644 --- a/package.json +++ b/package.json @@ -129,6 +129,7 @@ "tough-cookie": "5.0.0", "tsx": "4.19.2", "twitter-api-v2": "1.18.1", + "ufo": "1.5.4", "undici": "6.20.1", "uuid": "11.0.2", "winston": "3.16.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8a39acbbab9339b..0e60ee97cc4ffc2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -245,6 +245,9 @@ importers: twitter-api-v2: specifier: 1.18.1 version: 1.18.1 + ufo: + specifier: 1.5.4 + version: 1.5.4 undici: specifier: 6.20.1 version: 6.20.1 From 98763316e23ea5c91c5f55e6e589e1aca5ff6531 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Tue, 5 Nov 2024 12:14:52 +0800 Subject: [PATCH 403/740] feat(route/nytimes): Add support for EN version (#17442) * . * Add description. * Update rss.ts --- lib/routes/nytimes/rss.ts | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 lib/routes/nytimes/rss.ts diff --git a/lib/routes/nytimes/rss.ts b/lib/routes/nytimes/rss.ts new file mode 100644 index 000000000000000..681aaa39601017a --- /dev/null +++ b/lib/routes/nytimes/rss.ts @@ -0,0 +1,57 @@ +import { Route, ViewType } from '@/types'; +import cache from '@/utils/cache'; +import parser from '@/utils/rss-parser'; +import { load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/rss/:cat?', + categories: ['traditional-media', 'popular'], + view: ViewType.Articles, + example: '/nytimes/rss/HomePage', + parameters: { + cat: { + description: "Category name, corresponding to the last segment of [official feed's](https://www.nytimes.com/rss) url.", + }, + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['nytimes.com/'], + target: '', + }, + ], + name: 'News', + maintainers: ['HenryQW', 'pseudoyu', 'dzx-dzx'], + handler, + url: 'nytimes.com/', + description: `Enhance the official EN RSS feed`, +}; + +async function handler(ctx) { + const url = `https://rss.nytimes.com/services/xml/rss/nyt/${ctx.req.param('cat')}.xml`; + + const rss = await parser.parseURL(url); + + return { + ...rss, + item: await Promise.all( + rss.items.map((e) => + cache.tryGet(e.link, async () => { + const res = await ofetch(e.link, { headers: { 'User-Agent': 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)' }, referrer: 'https://www.google.com/' }); + + const $ = load(res); + + return { ...e, description: $("[name='articleBody']").html() }; + }) + ) + ), + }; +} From b4fece47ed5e20489b79014c2b60a9263069ee28 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 5 Nov 2024 12:58:48 +0700 Subject: [PATCH 404/740] feat(route/telegram): add mtproxy support for tglib --- lib/config.ts | 13 +++++++++++++ lib/routes/telegram/channel.ts | 30 +++++++++++++++++++++++++++++ lib/routes/telegram/tglib/client.ts | 18 ++++++++++------- 3 files changed, 54 insertions(+), 7 deletions(-) diff --git a/lib/config.ts b/lib/config.ts index 785e7d6ad8e2097..1784e1f97f2fc89 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -296,6 +296,14 @@ export type Config = { telegram: { token?: string; session?: string; + apiId?: number; + apiHash?: string; + maxConcurrentDownloads?: number; + proxy?: { + host?: string; + port?: number; + secret?: string; + }; }; tophub: { cookie?: string; @@ -709,6 +717,11 @@ const calculateValue = () => { apiId: envs.TELEGRAM_API_ID, apiHash: envs.TELEGRAM_API_HASH, maxConcurrentDownloads: envs.TELEGRAM_MAX_CONCURRENT_DOWNLOADS, + proxy: { + host: envs.TELEGRAM_PROXY_HOST, + port: envs.TELEGRAM_PROXY_PORT, + secret: envs.TELEGRAM_PROXY_SECRET, + }, }, tophub: { cookie: envs.TOPHUB_COOKIE, diff --git a/lib/routes/telegram/channel.ts b/lib/routes/telegram/channel.ts index b3b19857d5e9942..5b7caf6d5e97a78 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -98,6 +98,36 @@ For backward compatibility reasons, invalid \`routeParams\` will be treated as \ optional: true, description: 'Telegram API Authentication', }, + { + name: 'TELEGRAM_API_ID', + optional: true, + description: 'Telegram API ID', + }, + { + name: 'TELEGRAM_API_HASH', + optional: true, + description: 'Telegram API Hash', + }, + { + name: 'TELEGRAM_MAX_CONCURRENT_DOWNLOADS', + optional: true, + description: 'Telegram Max Concurrent Downloads', + }, + { + name: 'TELEGRAM_PROXY_HOST', + optional: true, + description: 'Telegram Proxy Host', + }, + { + name: 'TELEGRAM_PROXY_PORT', + optional: true, + description: 'Telegram Proxy Port', + }, + { + name: 'TELEGRAM_PROXY_SECRET', + optional: true, + description: 'Telegram Proxy Secret', + }, ], requirePuppeteer: false, antiCrawler: false, diff --git a/lib/routes/telegram/tglib/client.ts b/lib/routes/telegram/tglib/client.ts index 855c5f887d01db1..06ed2538cae8b15 100644 --- a/lib/routes/telegram/tglib/client.ts +++ b/lib/routes/telegram/tglib/client.ts @@ -23,14 +23,18 @@ export async function getClient(authParams?: UserAuthParams, session?: string) { autoReconnect: true, retryDelay: 3000, maxConcurrentDownloads: Number(config.telegram.maxConcurrentDownloads ?? 10), + proxy: + config.telegram.proxy?.host && config.telegram.proxy.port && config.telegram.proxy.secret + ? { + ip: config.telegram.proxy.host, + port: Number(config.telegram.proxy.port), + MTProxy: true, + secret: config.telegram.proxy.secret, + } + : undefined, }); - await client.start( - Object.assign(authParams ?? {}, { - onError: (err) => { - throw new Error('Cannot start TG: ' + err); - }, - }) as any - ); + + await client.connect(); return client; } From bdd5ad465820e91b199e463c8e1fd9a8532c1a12 Mon Sep 17 00:00:00 2001 From: pink-red <94079189+pink-red@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:13:13 +0400 Subject: [PATCH 405/740] fix(route): coomer (#17447) * Update posts.ts * Update namespace.ts * Update utils.ts * Update artist.ts --- lib/routes/coomer/artist.ts | 2 +- lib/routes/coomer/namespace.ts | 2 +- lib/routes/coomer/posts.ts | 4 ++-- lib/routes/coomer/utils.ts | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/routes/coomer/artist.ts b/lib/routes/coomer/artist.ts index a16dab6fa3f8eb9..e3e4119f0b86e01 100644 --- a/lib/routes/coomer/artist.ts +++ b/lib/routes/coomer/artist.ts @@ -16,7 +16,7 @@ export const route: Route = { }, radar: [ { - source: ['coomer.party/onlyfans/user/:id', 'coomer.party/'], + source: ['coomer.su/onlyfans/user/:id', 'coomer.su/'], }, ], name: 'Artist', diff --git a/lib/routes/coomer/namespace.ts b/lib/routes/coomer/namespace.ts index fcf726947984ade..9271eec4f2b6413 100644 --- a/lib/routes/coomer/namespace.ts +++ b/lib/routes/coomer/namespace.ts @@ -2,6 +2,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Coomer', - url: 'coomer.party', + url: 'coomer.su', lang: 'en', }; diff --git a/lib/routes/coomer/posts.ts b/lib/routes/coomer/posts.ts index 85a6d067efe419b..ff7ec889995633d 100644 --- a/lib/routes/coomer/posts.ts +++ b/lib/routes/coomer/posts.ts @@ -16,13 +16,13 @@ export const route: Route = { }, radar: [ { - source: ['coomer.party/posts', 'coomer.party/'], + source: ['coomer.su/posts', 'coomer.su/'], }, ], name: 'Recent Posts', maintainers: ['nczitzk'], handler, - url: 'coomer.party/posts', + url: 'coomer.su/posts', }; async function handler(ctx) { diff --git a/lib/routes/coomer/utils.ts b/lib/routes/coomer/utils.ts index 50483bea0185900..1767efdae43e639 100644 --- a/lib/routes/coomer/utils.ts +++ b/lib/routes/coomer/utils.ts @@ -4,7 +4,7 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; const fetchItems = async (ctx, currentUrl) => { - const rootUrl = 'https://coomer.party'; + const rootUrl = 'https://coomer.su'; currentUrl = `${rootUrl}/${currentUrl}`; const response = await got({ From 41bd7c3c93bb77b384b79f235d34ae481c31304b Mon Sep 17 00:00:00 2001 From: MachX <28209092+machsix@users.noreply.github.com> Date: Tue, 5 Nov 2024 01:32:51 -0500 Subject: [PATCH 406/740] fix(route): anime1 incorrect title (#17448) --- lib/routes/anime1/anime.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/anime1/anime.ts b/lib/routes/anime1/anime.ts index f0f066719bd65cd..a106a001c5d2146 100644 --- a/lib/routes/anime1/anime.ts +++ b/lib/routes/anime1/anime.ts @@ -38,7 +38,7 @@ async function handler(ctx) { const $ = load(response); - const title = $('page-title').text().trim(); + const title = $('.page-title').text().trim(); const items = $('article') .toArray() From fe0ebe312d52deaad053834941314743de199c99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 05:43:56 -0800 Subject: [PATCH 407/740] chore(deps-dev): bump got from 14.4.3 to 14.4.4 (#17453) * chore(deps-dev): bump got from 14.4.3 to 14.4.4 Bumps [got](https://github.com/sindresorhus/got) from 14.4.3 to 14.4.4. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v14.4.3...v14.4.4) --- updated-dependencies: - dependency-name: got dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 85 ++++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 76 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 873a0616b66cdc4..30d47a904379b31 100644 --- a/package.json +++ b/package.json @@ -180,7 +180,7 @@ "eslint-plugin-yml": "1.15.0", "fs-extra": "11.2.0", "globals": "15.11.0", - "got": "14.4.3", + "got": "14.4.4", "husky": "9.1.6", "js-beautify": "1.15.1", "lint-staged": "15.2.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0e60ee97cc4ffc2..f7e444c0e2c7443 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -394,8 +394,8 @@ importers: specifier: 15.11.0 version: 15.11.0 got: - specifier: 14.4.3 - version: 14.4.3 + specifier: 14.4.4 + version: 14.4.4 husky: specifier: 9.1.6 version: 9.1.6 @@ -1981,6 +1981,10 @@ packages: resolution: {integrity: sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.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/type-utils@8.12.2': resolution: {integrity: sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1994,6 +1998,10 @@ packages: resolution: {integrity: sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.13.0': + resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.12.2': resolution: {integrity: sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2003,16 +2011,35 @@ packages: typescript: optional: true + '@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/utils@8.12.2': resolution: {integrity: sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.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/visitor-keys@8.12.2': resolution: {integrity: sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.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} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -2803,8 +2830,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.50: - resolution: {integrity: sha512-eMVObiUQ2LdgeO1F/ySTXsvqvxb6ZH2zPGaMYsWzRDdOddUa77tdmI0ltg+L16UpbWdhPmuF3wIQYyQq65WfZw==} + electron-to-chromium@1.5.51: + resolution: {integrity: sha512-kKeWV57KSS8jH4alKt/jKnvHPmJgBxXzGUSbMd4eQF+iOsVPl7bz2KUmu6eo80eMP8wVioTfTyTzdMgM15WXNg==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -3376,8 +3403,8 @@ packages: resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==} engines: {node: '>=14.16'} - got@14.4.3: - resolution: {integrity: sha512-iTC0Z87yxSijWTh/IpvGpwOhIQK7+GgWkYrMRoN/hB9qeRj9RPuLGODwevs0p5idUf7nrxCVa5IlOmK3b8z+KA==} + got@14.4.4: + resolution: {integrity: sha512-tqiF7eSgTBwQkxb1LxsEpva8TaMYVisbhplrFVmw9GQE3855Z+MH/mnsXLLOkDxR6hZJRFMj5VTAZ8lmTF8ZOA==} engines: {node: '>=20'} graceful-fs@4.2.11: @@ -7297,7 +7324,7 @@ snapshots: '@stylistic/eslint-plugin@2.10.1(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) eslint: 9.14.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 @@ -7503,6 +7530,11 @@ snapshots: '@typescript-eslint/types': 8.12.2 '@typescript-eslint/visitor-keys': 8.12.2 + '@typescript-eslint/scope-manager@8.13.0': + dependencies: + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/visitor-keys': 8.13.0 + '@typescript-eslint/type-utils@8.12.2(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) @@ -7517,6 +7549,8 @@ snapshots: '@typescript-eslint/types@8.12.2': {} + '@typescript-eslint/types@8.13.0': {} + '@typescript-eslint/typescript-estree@8.12.2(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.12.2 @@ -7532,6 +7566,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.13.0(typescript@5.6.3)': + dependencies: + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/visitor-keys': 8.13.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.12.2(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) @@ -7543,11 +7592,27 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.13.0(eslint@9.14.0)(typescript@5.6.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@typescript-eslint/scope-manager': 8.13.0 + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) + eslint: 9.14.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@8.12.2': dependencies: '@typescript-eslint/types': 8.12.2 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.13.0': + dependencies: + '@typescript-eslint/types': 8.13.0 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.11': @@ -7854,7 +7919,7 @@ snapshots: browserslist@4.24.2: dependencies: caniuse-lite: 1.0.30001677 - electron-to-chromium: 1.5.50 + electron-to-chromium: 1.5.51 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -8395,7 +8460,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.50: {} + electron-to-chromium@1.5.51: {} ellipsize@0.1.0: {} @@ -9160,7 +9225,7 @@ snapshots: p-cancelable: 3.0.0 responselike: 3.0.0 - got@14.4.3: + got@14.4.4: dependencies: '@sindresorhus/is': 7.0.1 '@szmarczak/http-timer': 5.0.1 From fe22d59de6272079bd37f128d60bdcb4a520d523 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 05:45:06 -0800 Subject: [PATCH 408/740] chore(deps-dev): bump @typescript-eslint/parser from 8.12.2 to 8.13.0 (#17457) * chore(deps-dev): bump @typescript-eslint/parser from 8.12.2 to 8.13.0 Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.12.2 to 8.13.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.13.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] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 30d47a904379b31..1b7e59998f82d63 100644 --- a/package.json +++ b/package.json @@ -167,7 +167,7 @@ "@types/title": "3.4.3", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.12.2", - "@typescript-eslint/parser": "8.12.2", + "@typescript-eslint/parser": "8.13.0", "@vercel/nft": "0.27.5", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.103", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f7e444c0e2c7443..95b5d763367fcb3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -353,10 +353,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.12.2 - version: 8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) + version: 8.12.2(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/parser': - specifier: 8.12.2 - version: 8.12.2(eslint@9.14.0)(typescript@5.6.3) + specifier: 8.13.0 + version: 8.13.0(eslint@9.14.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.5 version: 0.27.5 @@ -1967,8 +1967,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.12.2': - resolution: {integrity: sha512-MrvlXNfGPLH3Z+r7Tk+Z5moZAc0dzdVjTgUgwsdGweH7lydysQsnSww3nAmsq8blFuRD5VRlAr9YdEFw3e6PBw==} + '@typescript-eslint/parser@8.13.0': + resolution: {integrity: sha512-w0xp+xGg8u/nONcGw1UXAr6cjCPU1w0XVyBs6Zqaj5eLmxkKQAByTdV/uGgNN5tVvN/kKpoQlP2cL7R+ajZZIQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -7494,10 +7494,10 @@ snapshots: '@types/node': 22.8.7 optional: true - '@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.12.2(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.12.2(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.13.0(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.12.2 '@typescript-eslint/type-utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) @@ -7512,12 +7512,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.12.2(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.12.2 - '@typescript-eslint/types': 8.12.2 - '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.12.2 + '@typescript-eslint/scope-manager': 8.13.0 + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.13.0 debug: 4.3.7 eslint: 9.14.0 optionalDependencies: From 2c2913bd57a9c91d33d4884002eb261cd05227ea Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:02:26 +0800 Subject: [PATCH 409/740] =?UTF-8?q?fix(route):=20=E4=BF=AE=E5=A4=8D=20bili?= =?UTF-8?q?bili=20UP=20=E4=B8=BB=E5=8A=A8=E6=80=81/=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E5=85=B3=E6=B3=A8=E5=8A=A8=E6=80=81=20=E5=BC=80=E5=90=AF?= =?UTF-8?q?=E5=86=85=E5=B5=8C=E8=A7=86=E9=A2=91=20=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98=20(#17462)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #17444 --- lib/routes/bilibili/dynamic.ts | 11 ++++++++--- lib/routes/bilibili/followings-dynamic.ts | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/lib/routes/bilibili/dynamic.ts b/lib/routes/bilibili/dynamic.ts index cd1ffb353179f5a..be3c3e8d7974128 100644 --- a/lib/routes/bilibili/dynamic.ts +++ b/lib/routes/bilibili/dynamic.ts @@ -19,7 +19,7 @@ export const route: Route = { | 键 | 含义 | 接受的值 | 默认值 | | ---------- | --------------------------------- | -------------- | ------ | | showEmoji | 显示或隐藏表情图片 | 0/1/true/false | false | -| embed | 默认开启内嵌视频 | 任意值 | | +| embed | 默认开启内嵌视频 | 0/1/true/false | true | | useAvid | 视频链接使用 AV 号 (默认为 BV 号) | 0/1/true/false | false | | directLink | 使用内容直链 | 0/1/true/false | false | | hideGoods | 隐藏带货动态 | 0/1/true/false | false | @@ -230,7 +230,7 @@ async function handler(ctx) { const uid = ctx.req.param('uid'); const routeParams = Object.fromEntries(new URLSearchParams(ctx.req.param('routeParams'))); const showEmoji = fallback(undefined, queryToBoolean(routeParams.showEmoji), false); - const embed = !ctx.req.param('embed'); + const embed = fallback(undefined, queryToBoolean(routeParams.embed), true); const displayArticle = ctx.req.query('mode') === 'fulltext'; const useAvid = fallback(undefined, queryToBoolean(routeParams.useAvid), false); const directLink = fallback(undefined, queryToBoolean(routeParams.directLink), false); @@ -259,7 +259,12 @@ async function handler(ctx) { const rssItems = await Promise.all( items - .filter((item) => !hideGoods || item.modules.module_dynamic?.additional?.type !== 'ADDITIONAL_TYPE_GOODS') + .filter((item) => { + if (hideGoods) { + return item.modules.module_dynamic?.additional?.type !== 'ADDITIONAL_TYPE_GOODS'; + } + return true; + }) .map(async (item) => { // const parsed = JSONbig.parse(item.card); diff --git a/lib/routes/bilibili/followings-dynamic.ts b/lib/routes/bilibili/followings-dynamic.ts index f1a22c56b5a37c7..4b6e953e6b29142 100644 --- a/lib/routes/bilibili/followings-dynamic.ts +++ b/lib/routes/bilibili/followings-dynamic.ts @@ -18,7 +18,7 @@ export const route: Route = { | 键 | 含义 | 接受的值 | 默认值 | | ---------- | --------------------------------- | -------------- | ------ | | showEmoji | 显示或隐藏表情图片 | 0/1/true/false | false | -| embed | 默认开启内嵌视频 | 任意值 | | +| embed | 默认开启内嵌视频 | 0/1/true/false | true | | useAvid | 视频链接使用 AV 号 (默认为 BV 号) | 0/1/true/false | false | | directLink | 使用内容直链 | 0/1/true/false | false | | hideGoods | 隐藏带货动态 | 0/1/true/false | false | @@ -55,7 +55,7 @@ async function handler(ctx) { const routeParams = querystring.parse(ctx.req.param('routeParams')); const showEmoji = fallback(undefined, queryToBoolean(routeParams.showEmoji), false); - const embed = !ctx.req.param('embed'); + const embed = fallback(undefined, queryToBoolean(routeParams.embed), true); const displayArticle = fallback(undefined, queryToBoolean(routeParams.displayArticle), false); const name = await cache.getUsernameFromUID(uid); From 12e7cf9c364c5f0d117891b5cfe6893b5fd05a4c Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:20:47 +0800 Subject: [PATCH 410/740] chore: pin difflib to github tarball in package.json remove auto commit since it skips tests related: https://github.com/dependabot/dependabot-core/issues/7258 https://github.com/dependabot/dependabot-core/issues/7851 https://github.com/dependabot/dependabot-core/issues/10124 https://github.com/pnpm/pnpm/issues/6050 https://github.com/pnpm/pnpm/issues/6530 https://github.com/pnpm/pnpm/issues/8343 --- .github/workflows/test.yml | 25 ------------------------- package.json | 5 +++++ 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e70dd3c8bb7d3ad..bc8fbb8cb131ab0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,31 +15,6 @@ permissions: checks: write jobs: - fix-pnpm-lock: - # workaround for https://github.com/dependabot/dependabot-core/issues/7258 - # until https://github.com/pnpm/pnpm/issues/6530 is fixed - if: github.triggering_actor == 'dependabot[bot]' && github.event_name == 'pull_request' - runs-on: ubuntu-latest - permissions: - pull-requests: write - contents: write - steps: - - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v4 - - uses: actions/setup-node@v4 - with: - node-version: lts/* - cache: 'pnpm' - - run: | - rm pnpm-lock.yaml - pnpm i - - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: 'chore: fix pnpm install' - commit_user_name: dependabot[bot] - commit_user_email: 49699333+dependabot[bot]@users.noreply.github.com - commit_author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> - vitest: runs-on: ubuntu-latest timeout-minutes: 10 diff --git a/package.json b/package.json index 1b7e59998f82d63..145c44770479eef 100644 --- a/package.json +++ b/package.json @@ -198,5 +198,10 @@ "packageManager": "pnpm@9.12.3", "engines": { "node": ">=22" + }, + "pnpm": { + "overrides": { + "difflib": "https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed" + } } } From 827c78b6d1920840aa0c38742e9174c2a1d7d3aa Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:26:39 +0800 Subject: [PATCH 411/740] chore: fix pnpm lockfile --- pnpm-lock.yaml | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 95b5d763367fcb3..bd8010a6e3c2b03 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,6 +4,9 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + difflib: https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed + importers: .: @@ -2026,12 +2029,6 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.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/visitor-keys@8.12.2': resolution: {integrity: sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2830,8 +2827,8 @@ packages: engines: {node: '>=14'} hasBin: true - electron-to-chromium@1.5.51: - resolution: {integrity: sha512-kKeWV57KSS8jH4alKt/jKnvHPmJgBxXzGUSbMd4eQF+iOsVPl7bz2KUmu6eo80eMP8wVioTfTyTzdMgM15WXNg==} + electron-to-chromium@1.5.50: + resolution: {integrity: sha512-eMVObiUQ2LdgeO1F/ySTXsvqvxb6ZH2zPGaMYsWzRDdOddUa77tdmI0ltg+L16UpbWdhPmuF3wIQYyQq65WfZw==} ellipsize@0.1.0: resolution: {integrity: sha512-5gxbEjcb/Z2n6TTmXZx9wVi3N/DOzE7RXY3Xg9dakDuhX/izwumB9rGjeWUV6dTA0D0+juvo+JonZgNR9sgA5A==} @@ -7324,7 +7321,7 @@ snapshots: '@stylistic/eslint-plugin@2.10.1(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) eslint: 9.14.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 @@ -7592,17 +7589,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.13.0(eslint@9.14.0)(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) - eslint: 9.14.0 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/visitor-keys@8.12.2': dependencies: '@typescript-eslint/types': 8.12.2 @@ -7919,7 +7905,7 @@ snapshots: browserslist@4.24.2: dependencies: caniuse-lite: 1.0.30001677 - electron-to-chromium: 1.5.51 + electron-to-chromium: 1.5.50 node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) @@ -8460,7 +8446,7 @@ snapshots: minimatch: 9.0.1 semver: 7.6.3 - electron-to-chromium@1.5.51: {} + electron-to-chromium@1.5.50: {} ellipsize@0.1.0: {} From dc434a6f2d3ccc2defe99387ac56b2f0197f8942 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:35:36 +0800 Subject: [PATCH 412/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin (#17455) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.12.2 to 8.13.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.13.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 49 +++++++++++++++++++++++++++++++++---------------- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 145c44770479eef..6558356f5bdd2ca 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.12.2", + "@typescript-eslint/eslint-plugin": "8.13.0", "@typescript-eslint/parser": "8.13.0", "@vercel/nft": "0.27.5", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bd8010a6e3c2b03..60f1c0b3719ae2b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -355,8 +355,8 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.12.2 - version: 8.12.2(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) + specifier: 8.13.0 + version: 8.13.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.13.0 version: 8.13.0(eslint@9.14.0)(typescript@5.6.3) @@ -1959,8 +1959,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.12.2': - resolution: {integrity: sha512-gQxbxM8mcxBwaEmWdtLCIGLfixBMHhQjBqR8sVWNTPpcj45WlYL2IObS/DNMLH1DBP0n8qz+aiiLTGfopPEebw==} + '@typescript-eslint/eslint-plugin@8.13.0': + resolution: {integrity: sha512-nQtBLiZYMUPkclSeC3id+x4uVd1SGtHuElTxL++SfP47jR0zfkZBJHc+gL4qPsgTuypz0k8Y2GheaDYn6Gy3rg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1988,8 +1988,8 @@ packages: resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.12.2': - resolution: {integrity: sha512-bwuU4TAogPI+1q/IJSKuD4shBLc/d2vGcRT588q+jzayQyjVK2X6v/fbR4InY2U2sgf8MEvVCqEWUzYzgBNcGQ==} + '@typescript-eslint/type-utils@8.13.0': + resolution: {integrity: sha512-Rqnn6xXTR316fP4D2pohZenJnp+NwQ1mo7/JM+J1LWZENSLkJI8ID8QNtlvFeb0HnFSK94D6q0cnMX6SbE5/vA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -2029,6 +2029,12 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.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/visitor-keys@8.12.2': resolution: {integrity: sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7491,14 +7497,14 @@ snapshots: '@types/node': 22.8.7 optional: true - '@typescript-eslint/eslint-plugin@8.12.2(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.13.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.12.2 - '@typescript-eslint/type-utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.12.2 + '@typescript-eslint/scope-manager': 8.13.0 + '@typescript-eslint/type-utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.13.0 eslint: 9.14.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7532,10 +7538,10 @@ snapshots: '@typescript-eslint/types': 8.13.0 '@typescript-eslint/visitor-keys': 8.13.0 - '@typescript-eslint/type-utils@8.12.2(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.13.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) - '@typescript-eslint/utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: @@ -7589,6 +7595,17 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.13.0(eslint@9.14.0)(typescript@5.6.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@typescript-eslint/scope-manager': 8.13.0 + '@typescript-eslint/types': 8.13.0 + '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) + eslint: 9.14.0 + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/visitor-keys@8.12.2': dependencies: '@typescript-eslint/types': 8.12.2 @@ -8879,7 +8896,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.3.7 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -10596,7 +10613,7 @@ snapshots: proxy-agent@6.4.0: dependencies: agent-base: 7.1.1 - debug: 4.3.4 + debug: 4.3.7 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 lru-cache: 7.18.3 From d898aae44984bc9127d8029aca1c696a361da691 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:46:12 +0800 Subject: [PATCH 413/740] chore(deps-dev): bump globals from 15.11.0 to 15.12.0 (#17451) Bumps [globals](https://github.com/sindresorhus/globals) from 15.11.0 to 15.12.0. - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v15.11.0...v15.12.0) --- updated-dependencies: - dependency-name: globals dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 6558356f5bdd2ca..0fb919c88970472 100644 --- a/package.json +++ b/package.json @@ -179,7 +179,7 @@ "eslint-plugin-unicorn": "56.0.0", "eslint-plugin-yml": "1.15.0", "fs-extra": "11.2.0", - "globals": "15.11.0", + "globals": "15.12.0", "got": "14.4.4", "husky": "9.1.6", "js-beautify": "1.15.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 60f1c0b3719ae2b..c1087c72c394d6b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -394,8 +394,8 @@ importers: specifier: 11.2.0 version: 11.2.0 globals: - specifier: 15.11.0 - version: 15.11.0 + specifier: 15.12.0 + version: 15.12.0 got: specifier: 14.4.4 version: 14.4.4 @@ -3380,8 +3380,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.11.0: - resolution: {integrity: sha512-yeyNSjdbyVaWurlwCpcA6XNBrHTMIeDdj0/hnvX/OLJ9ekOXYbLsLinH/MucQyGvNnXhidTdNhTtJaffL2sMfw==} + globals@15.12.0: + resolution: {integrity: sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==} engines: {node: '>=18'} globrex@0.1.2: @@ -8658,7 +8658,7 @@ snapshots: eslint: 9.14.0 eslint-plugin-es-x: 7.8.0(eslint@9.14.0) get-tsconfig: 4.8.1 - globals: 15.11.0 + globals: 15.12.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 @@ -8682,7 +8682,7 @@ snapshots: core-js-compat: 3.39.0 eslint: 9.14.0 esquery: 1.6.0 - globals: 15.11.0 + globals: 15.12.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 jsesc: 3.0.2 @@ -9174,7 +9174,7 @@ snapshots: globals@14.0.0: {} - globals@15.11.0: {} + globals@15.12.0: {} globrex@0.1.2: {} From 9c0036b51f0a5a0491b00092b2645551bc87519a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:50:36 +0800 Subject: [PATCH 414/740] chore(deps-dev): bump @types/node from 22.8.7 to 22.9.0 (#17452) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.8.7 to 22.9.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] <support@github.com> 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 0fb919c88970472..0e641e70b335b67 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.8.7", + "@types/node": "22.9.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 c1087c72c394d6b..e9fd9ec70b0ad50 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -337,8 +337,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.8.7 - version: 22.8.7 + specifier: 22.9.0 + version: 22.9.0 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -365,7 +365,7 @@ importers: version: 0.27.5 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.8.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.103 version: 0.37.103 @@ -431,10 +431,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.7)) + version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.8.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1911,8 +1911,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.8.7': - resolution: {integrity: sha512-LidcG+2UeYIWcMuMUpBKOnryBWG/rnmOHQR5apjn8myTQcx3rinFRn7DcIFhMnS0PPFSC6OafdIKEad0lj6U0Q==} + '@types/node@22.9.0': + resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6900,7 +6900,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7374,12 +7374,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/html-to-text@9.0.4': {} @@ -7387,13 +7387,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7403,7 +7403,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/jsrsasign@10.5.13': {} @@ -7413,7 +7413,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7435,14 +7435,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 form-data: 4.0.1 - '@types/node@22.8.7': + '@types/node@22.9.0': dependencies: undici-types: 6.19.8 @@ -7456,7 +7456,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.8.7 + '@types/node': 22.9.0 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7470,7 +7470,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.8.7 + '@types/node': 22.9.0 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7494,7 +7494,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 optional: true '@typescript-eslint/eslint-plugin@8.13.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': @@ -7641,7 +7641,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.8.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7655,7 +7655,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.8.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10607,7 +10607,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.8.7 + '@types/node': 22.9.0 long: 5.2.3 proxy-agent@6.4.0: @@ -11575,13 +11575,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.8.7): + vite-node@2.0.5(@types/node@22.9.0): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.8.7) + vite: 5.4.10(@types/node@22.9.0) transitivePeerDependencies: - '@types/node' - less @@ -11593,27 +11593,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.8.7)): + vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.10(@types/node@22.8.7) + vite: 5.4.10(@types/node@22.9.0) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.8.7): + vite@5.4.10(@types/node@22.9.0): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.4 optionalDependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.8.7)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11631,11 +11631,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.8.7) - vite-node: 2.0.5(@types/node@22.8.7) + vite: 5.4.10(@types/node@22.9.0) + vite-node: 2.0.5(@types/node@22.9.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.8.7 + '@types/node': 22.9.0 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 9dfeba7ae694bedf307bc6cb685a8de669d54457 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 23:59:20 +0800 Subject: [PATCH 415/740] chore(deps-dev): bump vite-tsconfig-paths from 5.0.1 to 5.1.0 (#17454) Bumps [vite-tsconfig-paths](https://github.com/aleclarson/vite-tsconfig-paths) from 5.0.1 to 5.1.0. - [Release notes](https://github.com/aleclarson/vite-tsconfig-paths/releases) - [Commits](https://github.com/aleclarson/vite-tsconfig-paths/compare/v5.0.1...v5.1.0) --- updated-dependencies: - dependency-name: vite-tsconfig-paths dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 0e641e70b335b67..9f332055fa8c249 100644 --- a/package.json +++ b/package.json @@ -191,7 +191,7 @@ "supertest": "7.0.0", "typescript": "5.6.3", "unified": "11.0.5", - "vite-tsconfig-paths": "5.0.1", + "vite-tsconfig-paths": "5.1.0", "vitest": "2.0.5", "yaml-eslint-parser": "1.2.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e9fd9ec70b0ad50..e43948748ce9e7f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -430,8 +430,8 @@ importers: specifier: 11.0.5 version: 11.0.5 vite-tsconfig-paths: - specifier: 5.0.1 - version: 5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)) + specifier: 5.1.0 + version: 5.1.0(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)) vitest: specifier: 2.0.5 version: 2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -5614,8 +5614,8 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-tsconfig-paths@5.0.1: - resolution: {integrity: sha512-yqwv+LstU7NwPeNqajZzLEBVpUFU6Dugtb2P84FXuvaoYA+/70l9MHE+GYfYAycVyPSDYZ7mjOFuYBRqlEpTig==} + vite-tsconfig-paths@5.1.0: + resolution: {integrity: sha512-Y1PLGHCJfAq1Zf4YIGEsmuU/NCX1epoZx9zwSr32Gjn3aalwQHRKr5aUmbo6r0JHeHkqmWpmDg7WOynhYXw1og==} peerDependencies: vite: '*' peerDependenciesMeta: @@ -11593,7 +11593,7 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.0.1(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)): + vite-tsconfig-paths@5.1.0(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)): dependencies: debug: 4.3.7 globrex: 0.1.2 From 7ea07bc9454ff00a9d0e092c946954c2f97752f5 Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Wed, 6 Nov 2024 00:33:21 +0800 Subject: [PATCH 416/740] =?UTF-8?q?fix(route):=20=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?=E7=B1=B3=E6=B8=B8=E7=A4=BE=E5=AE=98=E6=96=B9=E5=85=AC=E5=91=8A?= =?UTF-8?q?=20=E8=B7=AF=E7=94=B1=E7=9A=84=E6=8E=A5=E5=8F=A3=E9=94=99?= =?UTF-8?q?=E8=AF=AF=20(#17461)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/mihoyo/bbs/official.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/mihoyo/bbs/official.ts b/lib/routes/mihoyo/bbs/official.ts index 2fd289ebfa031b5..63d5ac39a53c518 100644 --- a/lib/routes/mihoyo/bbs/official.ts +++ b/lib/routes/mihoyo/bbs/official.ts @@ -53,12 +53,13 @@ class MiHoYoOfficialError extends Error { const getNewsList = async ({ gids, type, page_size, last_id }) => { const query = new URLSearchParams({ + client_type: '4', gids, type, page_size, last_id, }).toString(); - const url = `https://bbs-api.miyoushe.com/post/wapi/getNewsList?${query}`; + const url = `https://bbs-api-static.miyoushe.com/painter/wapi/getNewsList?${query}`; const response = await got({ method: 'get', url, From ee2f07d17bdb529ea9d74eba6cf1c12acf634fc6 Mon Sep 17 00:00:00 2001 From: Hanyan Yin <yinhanyan@outlook.com> Date: Wed, 6 Nov 2024 02:06:24 +0800 Subject: [PATCH 417/740] docs: typo error of docs (#17463) * feat(route/ruc/ai): add new route for ai.ruc.edu.cn * fix:eslint * fix: use cache * typo: camelCase * Update lib/routes/ruc/ai.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update ai.ts --------- --- lib/routes/ruc/ai.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/ruc/ai.ts b/lib/routes/ruc/ai.ts index c8f32b77906a26c..229112e0bac4b50 100644 --- a/lib/routes/ruc/ai.ts +++ b/lib/routes/ruc/ai.ts @@ -83,5 +83,5 @@ export const route: Route = { 分类字段处填写的是对应中国人民大学高瓴人工智能学院分类页网址中介于 **\`http://ai.ruc.edu.cn/\`** 和 **/index.htm** 中间的一段,并将其中的 \`/\` 修改为 \`-\`。 如 [中国人民大学高瓴人工智能学院 - 新闻公告 - 学院新闻](http://ai.ruc.edu.cn/newslist/newsdetail/index.htm) 的网址为 \`http://ai.ruc.edu.cn/newslist/newsdetail/index.htm\` 其中介于 **\`http://ai.ruc.edu.cn/\`** 和 **/index.htm** 中间的一段为 \`newslist/newsdetail\`。随后,并将其中的 \`/\` 修改为 \`-\`,可以得到 \`newslist-newsdetail\`。所以最终我们的路由为 [\`/ruc/ai/newslist-newsdetail\`](https://rsshub.app/ruc/ai/newslist-newsdetail) - :::`, + :::`, }; From d64c7620f983387bbb4a9b5fc72cd0b6dffc7d09 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 5 Nov 2024 10:25:45 -0800 Subject: [PATCH 418/740] feat(route): daily.dev sources (#17464) --- lib/routes/buaa/lib/space/newbook.ts | 2 +- lib/routes/daily/discussed.ts | 43 +++--- lib/routes/daily/index.ts | 25 ++-- lib/routes/daily/namespace.ts | 2 +- lib/routes/daily/source.ts | 186 ++++++++++++++++++++++++++ lib/routes/daily/upvoted.ts | 34 ++--- lib/routes/daily/user.ts | 29 +--- lib/routes/daily/utils.ts | 59 ++++---- lib/routes/espn/news.ts | 2 +- lib/routes/imdb/chart.ts | 2 +- lib/routes/jiuyangongshe/community.ts | 2 +- lib/routes/mi/utils.ts | 2 +- lib/routes/theblockbeats/index.ts | 2 +- lib/routes/vice/topic.ts | 2 +- lib/routes/wellcee/rent.ts | 2 +- 15 files changed, 281 insertions(+), 113 deletions(-) create mode 100644 lib/routes/daily/source.ts diff --git a/lib/routes/buaa/lib/space/newbook.ts b/lib/routes/buaa/lib/space/newbook.ts index 3ef8cde73e21556..810b8ef3cf5882b 100644 --- a/lib/routes/buaa/lib/space/newbook.ts +++ b/lib/routes/buaa/lib/space/newbook.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import cache from '@/utils/cache'; import { art } from '@/utils/render'; -import path from 'path'; +import path from 'node:path'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); diff --git a/lib/routes/daily/discussed.ts b/lib/routes/daily/discussed.ts index 54a5957276b6d48..23f80e4b57ba9a2 100644 --- a/lib/routes/daily/discussed.ts +++ b/lib/routes/daily/discussed.ts @@ -1,9 +1,5 @@ import { Route } from '@/types'; -import { getData, getList, getRedirectedLink } from './utils.js'; - -const variables = { - first: 15, -}; +import { baseUrl, getData, getList } from './utils.js'; const query = ` query MostDiscussedFeed( @@ -19,6 +15,7 @@ const query = ` edges { node { ...FeedPost + contentHtml } } } @@ -33,6 +30,7 @@ const query = ` image readTime permalink + commentsPermalink summary createdAt numUpvotes @@ -52,37 +50,40 @@ const query = ` bio } `; -const graphqlQuery = { - query, - variables, -}; export const route: Route = { path: '/discussed', example: '/daily/discussed', radar: [ { - source: ['daily.dev/popular'], + source: ['app.daily.dev/discussed'], }, ], name: 'Most Discussed', maintainers: ['Rjnishant530'], handler, - url: 'daily.dev/popular', + url: 'app.daily.dev/discussed', }; -async function handler() { - const baseUrl = 'https://app.daily.dev/discussed'; - const data = await getData(graphqlQuery); - const list = getList(data); - const items = await getRedirectedLink(list); +async function handler(ctx) { + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 20; + const link = `${baseUrl}/discussed`; + + const data = await getData({ + query, + variables: { + first: limit, + }, + }); + const items = getList(data); + return { - title: 'Most Discussed', - link: baseUrl, + title: 'Real-time discussions in the developer community | daily.dev', + link, item: items, - description: 'Most Discussed Posts on Daily.dev', - logo: 'https://app.daily.dev/favicon-32x32.png', - icon: 'https://app.daily.dev/favicon-32x32.png', + description: 'Stay on top of real-time developer discussions on daily.dev. Join conversations happening now and engage with the most active community members.', + logo: `${baseUrl}/favicon-32x32.png`, + icon: `${baseUrl}/favicon-32x32.png`, language: 'en-us', }; } diff --git a/lib/routes/daily/index.ts b/lib/routes/daily/index.ts index 031f47c0a773eb0..40f0fdfbeaef7d4 100644 --- a/lib/routes/daily/index.ts +++ b/lib/routes/daily/index.ts @@ -1,5 +1,5 @@ import { Route } from '@/types'; -import { getData, getList, getRedirectedLink } from './utils.js'; +import { baseUrl, getData, getList } from './utils.js'; const variables = { version: 11, @@ -28,6 +28,7 @@ const query = ` edges { node { ...FeedPost + contentHtml } } } @@ -42,6 +43,7 @@ const query = ` image readTime permalink + commentsPermalink summary createdAt numUpvotes @@ -72,27 +74,28 @@ export const route: Route = { example: '/daily', radar: [ { - source: ['daily.dev/popular'], + source: ['app.daily.dev/popular'], }, ], name: 'Popular', maintainers: ['Rjnishant530'], handler, - url: 'daily.dev/popular', + url: 'app.daily.dev/popular', }; async function handler() { - const baseUrl = 'https://app.daily.dev/popular'; + const link = `${baseUrl}/popular`; + const data = await getData(graphqlQuery); - const list = getList(data); - const items = await getRedirectedLink(list); + const items = getList(data); + return { - title: 'Popular', - link: baseUrl, + title: 'Popular posts on daily.dev', + link, item: items, - description: 'Popular Posts on Daily.dev', - logo: 'https://app.daily.dev/favicon-32x32.png', - icon: 'https://app.daily.dev/favicon-32x32.png', + description: 'daily.dev is the easiest way to stay updated on the latest programming news. Get the best content from the top tech publications on any topic you want.', + logo: `${baseUrl}/favicon-32x32.png`, + icon: `${baseUrl}/favicon-32x32.png`, language: 'en-us', }; } diff --git a/lib/routes/daily/namespace.ts b/lib/routes/daily/namespace.ts index f40a96813b7aecd..1b57d03d51c40a6 100644 --- a/lib/routes/daily/namespace.ts +++ b/lib/routes/daily/namespace.ts @@ -2,7 +2,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Daily.dev', - url: 'daily.dev', + url: 'app.daily.dev', categories: ['social-media'], lang: 'en', }; diff --git a/lib/routes/daily/source.ts b/lib/routes/daily/source.ts new file mode 100644 index 000000000000000..4594daa6d462c18 --- /dev/null +++ b/lib/routes/daily/source.ts @@ -0,0 +1,186 @@ +import { Route } from '@/types'; +import { baseUrl, getBuildId, getData, getList } from './utils'; +import ofetch from '@/utils/ofetch'; +import cache from '@/utils/cache'; +import { config } from '@/config'; + +interface Source { + id: string; + name: string; + handle: string; + image: string; + permalink: string; + description: string; + type: string; +} + +const sourceFeedQuery = ` +query SourceFeed($source: ID!, $loggedIn: Boolean! = false, $first: Int, $after: String, $ranking: Ranking, $supportedTypes: [String!]) { + page: sourceFeed( + source: $source + first: $first + after: $after + ranking: $ranking + supportedTypes: $supportedTypes + ) { + ...FeedPostConnection + } +} + +fragment FeedPostConnection on PostConnection { + pageInfo { + hasNextPage + endCursor + } + edges { + node { + ...FeedPost + pinnedAt + contentHtml + ...UserPost @include(if: $loggedIn) + } + } +} + +fragment FeedPost on Post { + ...FeedPostInfo + sharedPost { + id + title + image + readTime + permalink + commentsPermalink + createdAt + type + tags + source { + id + handle + permalink + image + } + slug + } + trending + feedMeta + collectionSources { + handle + image + } + numCollectionSources + updatedAt + slug +} + +fragment FeedPostInfo on Post { + id + title + image + readTime + permalink + commentsPermalink + createdAt + commented + bookmarked + views + numUpvotes + numComments + summary + bookmark { + remindAt + } + author { + id + name + image + username + permalink + } + type + tags + source { + id + handle + name + permalink + image + type + } + userState { + vote + flags { + feedbackDismiss + } + } + slug +} + +fragment UserPost on Post { + read + upvoted + commented + bookmarked + downvoted +}`; + +export const route: Route = { + path: '/source/:sourceId', + example: '/daily/source/hn', + parameters: { + sourceId: 'The source id', + }, + radar: [ + { + source: ['app.daily.dev/sources/:sourceId'], + }, + ], + name: 'Source Posts', + maintainers: ['TonyRL'], + handler, + url: 'app.daily.dev', +}; + +async function handler(ctx) { + const sourceId = ctx.req.param('sourceId'); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; + const link = `${baseUrl}/sources/${sourceId}`; + + const buildId = await getBuildId(); + + const userData = (await cache.tryGet(`daily:source:${sourceId}`, async () => { + const response = await ofetch(`${baseUrl}/_next/data/${buildId}/en/sources/${sourceId}.json`); + return response.pageProps.source; + })) as Source; + + const items = await cache.tryGet( + `daily:source:${sourceId}:posts`, + async () => { + const edges = await getData({ + query: sourceFeedQuery, + variables: { + source: sourceId, + supportedTypes: ['article', 'video:youtube', 'collection'], + period: 30, + first: limit, + after: '', + loggedIn: false, + }, + }); + return getList(edges); + }, + config.cache.routeExpire, + false + ); + + return { + title: `${userData.name} posts on daily.dev`, + description: userData.description, + link, + item: items, + image: userData.image, + logo: userData.image, + icon: userData.image, + language: 'en-us', + }; +} diff --git a/lib/routes/daily/upvoted.ts b/lib/routes/daily/upvoted.ts index 68a2a19d6cc7845..8326d0618ed6d0a 100644 --- a/lib/routes/daily/upvoted.ts +++ b/lib/routes/daily/upvoted.ts @@ -1,5 +1,5 @@ import { Route } from '@/types'; -import { getData, getList, getRedirectedLink } from './utils.js'; +import { baseUrl, getData, getList } from './utils.js'; const variables = { period: 7, @@ -21,6 +21,7 @@ const query = ` edges { node { ...FeedPost + contentHtml } } } @@ -35,6 +36,7 @@ const query = ` image readTime permalink + commentsPermalink summary createdAt numUpvotes @@ -56,37 +58,35 @@ const query = ` `; -const graphqlQuery = { - query, - variables, -}; - export const route: Route = { path: '/upvoted', example: '/daily/upvoted', radar: [ { - source: ['daily.dev/popular'], + source: ['app.daily.dev/upvoted'], }, ], name: 'Most upvoted', maintainers: ['Rjnishant530'], handler, - url: 'daily.dev/popular', + url: 'app.daily.dev/upvoted', }; async function handler() { - const baseUrl = 'https://app.daily.dev/upvoted'; - const data = await getData(graphqlQuery); - const list = getList(data); - const items = await getRedirectedLink(list); + const link = `${baseUrl}/upvoted`; + const data = await getData({ + query, + variables, + }); + const items = getList(data); + return { - title: 'Most Upvoted', - link: baseUrl, + title: 'Most upvoted posts for developers | daily.dev', + link, item: items, - description: 'Most Upvoted Posts on Daily.dev', - logo: 'https://app.daily.dev/favicon-32x32.png', - icon: 'https://app.daily.dev/favicon-32x32.png', + description: 'Find the most upvoted developer posts on daily.dev. Explore top-rated content in coding, tutorials, and tech news from the largest developer network in the world.', + logo: `${baseUrl}/favicon-32x32.png`, + icon: `${baseUrl}/favicon-32x32.png`, language: 'en-us', }; } diff --git a/lib/routes/daily/user.ts b/lib/routes/daily/user.ts index 7abaf15a029cb86..cdf7383684c7b7c 100644 --- a/lib/routes/daily/user.ts +++ b/lib/routes/daily/user.ts @@ -1,13 +1,8 @@ import { Route } from '@/types'; -import { baseUrl, getBuildId, getData } from './utils'; +import { baseUrl, getBuildId, getData, getList } from './utils'; import ofetch from '@/utils/ofetch'; import cache from '@/utils/cache'; import { config } from '@/config'; -import { parseDate } from '@/utils/parse-date'; -import { art } from '@/utils/render'; -import path from 'path'; -import { getCurrentPath } from '@/utils/helpers'; -const __dirname = getCurrentPath(import.meta.url); const userPostQuery = ` query AuthorFeed( @@ -155,20 +150,18 @@ const userPostQuery = ` downvoted }`; -const render = (data) => art(path.join(__dirname, 'templates/posts.art'), data); - export const route: Route = { path: '/user/:userId', example: '/daily/user/kramer', radar: [ { - source: ['daily.dev/:userId/posts', 'daily.dev/:userId'], + source: ['app.daily.dev/:userId/posts', 'app.daily.dev/:userId'], }, ], name: 'User Posts', maintainers: ['TonyRL'], handler, - url: 'daily.dev', + url: 'app.daily.dev', }; async function handler(ctx) { @@ -178,12 +171,12 @@ async function handler(ctx) { const buildId = await getBuildId(); const userData = await cache.tryGet(`daily:user:${userId}`, async () => { - const resposne = await ofetch(`${baseUrl}/_next/data/${buildId}/en/${userId}.json`, { + const response = await ofetch(`${baseUrl}/_next/data/${buildId}/en/${userId}.json`, { query: { userId, }, }); - return resposne.pageProps; + return response.pageProps; }); const user = (userData as any).user; @@ -198,17 +191,7 @@ async function handler(ctx) { loggedIn: false, }, }); - return edges.map(({ node }) => ({ - title: node.title, - description: render({ - image: node.image, - content: node.contentHtml?.replaceAll('\n', '<br>') ?? node.summary, - }), - link: node.permalink, - author: node.author?.name, - category: node.tags, - pubDate: parseDate(node.createdAt), - })); + return getList(edges); }, config.cache.routeExpire, false diff --git a/lib/routes/daily/utils.ts b/lib/routes/daily/utils.ts index 8f203c744d15a3e..4576a869502544e 100644 --- a/lib/routes/daily/utils.ts +++ b/lib/routes/daily/utils.ts @@ -2,10 +2,15 @@ import { parseDate } from '@/utils/parse-date'; import ofetch from '@/utils/ofetch'; import cache from '@/utils/cache'; 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); -const baseUrl = 'https://app.daily.dev'; +export const baseUrl = 'https://app.daily.dev'; +const gqlUrl = `https://api.daily.dev/graphql`; -const getBuildId = () => +export const getBuildId = () => cache.tryGet( 'daily:buildId', async () => { @@ -17,40 +22,30 @@ const getBuildId = () => false ); -const getData = async (graphqlQuery) => { - const response = await ofetch(`${baseUrl}/api/graphql`, { +export const getData = async (graphqlQuery) => { + const response = await ofetch(gqlUrl, { method: 'POST', body: graphqlQuery, }); return response.data.page.edges; }; -const getList = (data) => - data.map((value) => { - const { id, title, image, permalink, summary, createdAt, numUpvotes, author, tags, numComments } = value.node; - const pubDate = parseDate(createdAt); - return { - id, - title, - link: permalink, - description: summary, - author: author?.name, - itunes_item_image: image, - pubDate, - upvotes: numUpvotes, - comments: numComments, - category: tags, - }; - }); - -const getRedirectedLink = (data) => - Promise.all( - data.map((v) => - cache.tryGet(v.link, async () => { - const resp = await ofetch.raw(v.link); - return { ...v, link: resp.headers.get('location') }; - }) - ) - ); +const render = (data) => art(path.join(__dirname, 'templates/posts.art'), data); -export { baseUrl, getBuildId, getData, getList, getRedirectedLink }; +export const getList = (edges) => + edges.map(({ node }) => ({ + id: node.id, + title: node.title, + link: node.commentsPermalink ?? node.permalink, + guid: node.permalink, + description: render({ + image: node.image, + content: node.contentHtml?.replaceAll('\n', '<br>') ?? node.summary, + }), + author: node.author?.name, + itunes_item_image: node.image, + pubDate: parseDate(node.createdAt), + upvotes: node.numUpvotes, + comments: node.numComments, + category: node.tags, + })); diff --git a/lib/routes/espn/news.ts b/lib/routes/espn/news.ts index 154cb72cd530143..0187cd06c374180 100644 --- a/lib/routes/espn/news.ts +++ b/lib/routes/espn/news.ts @@ -2,7 +2,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; import * as cheerio from 'cheerio'; -import path from 'path'; +import path from 'node:path'; import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; diff --git a/lib/routes/imdb/chart.ts b/lib/routes/imdb/chart.ts index 4d1611280c65360..117454065137d45 100644 --- a/lib/routes/imdb/chart.ts +++ b/lib/routes/imdb/chart.ts @@ -3,7 +3,7 @@ import ofetch from '@/utils/ofetch'; import * as cheerio from 'cheerio'; import type { Context } from 'hono'; import { ChartTitleSearchConnection } from './types'; -import path from 'path'; +import path from 'node:path'; import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; diff --git a/lib/routes/jiuyangongshe/community.ts b/lib/routes/jiuyangongshe/community.ts index 05138854fa78974..d739cd5831efac2 100644 --- a/lib/routes/jiuyangongshe/community.ts +++ b/lib/routes/jiuyangongshe/community.ts @@ -4,7 +4,7 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import md5 from '@/utils/md5'; -import path from 'path'; +import path from 'node:path'; import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; diff --git a/lib/routes/mi/utils.ts b/lib/routes/mi/utils.ts index a0839f489a0ee4e..2fc2c90d2753811 100644 --- a/lib/routes/mi/utils.ts +++ b/lib/routes/mi/utils.ts @@ -9,7 +9,7 @@ import 'dayjs/locale/zh-cn'; import localizedFormat from 'dayjs/plugin/localizedFormat'; import timezone from 'dayjs/plugin/timezone'; import utc from 'dayjs/plugin/utc'; -import path from 'path'; +import path from 'node:path'; import { CrowdfundingData, CrowdfundingDetailData, CrowdfundingDetailInfo, CrowdfundingItem, CrowdfundingList, DataResponse } from './types'; dayjs.extend(localizedFormat); diff --git a/lib/routes/theblockbeats/index.ts b/lib/routes/theblockbeats/index.ts index 4fc1112c7621fe9..a61a6fc9f9d1fd0 100644 --- a/lib/routes/theblockbeats/index.ts +++ b/lib/routes/theblockbeats/index.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 path from 'path'; +import path from 'node:path'; import { art } from '@/utils/render'; import { getCurrentPath } from '@/utils/helpers'; diff --git a/lib/routes/vice/topic.ts b/lib/routes/vice/topic.ts index 339655ad8da9cea..51b0f977fcd953a 100644 --- a/lib/routes/vice/topic.ts +++ b/lib/routes/vice/topic.ts @@ -3,7 +3,7 @@ import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import cache from '@/utils/cache'; -import path from 'path'; +import path from 'node:path'; import { getCurrentPath } from '@/utils/helpers'; import { art } from '@/utils/render'; diff --git a/lib/routes/wellcee/rent.ts b/lib/routes/wellcee/rent.ts index dc67f30c91bfef6..9c092b40def83da 100644 --- a/lib/routes/wellcee/rent.ts +++ b/lib/routes/wellcee/rent.ts @@ -7,7 +7,7 @@ import { parseDate } from '@/utils/parse-date'; import { baseUrl, getCitys, getDistricts } from './utils'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import { art } from '@/utils/render'; -import path from 'path'; +import path from 'node:path'; import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); From 6451863ee95f157660c0849f209372b59d008022 Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Tue, 5 Nov 2024 19:26:36 +0000 Subject: [PATCH 419/740] fix(route/theinitium): Fix wp-block html (#17460) --- lib/routes/theinitium/app.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/routes/theinitium/app.ts b/lib/routes/theinitium/app.ts index 114667ab641d5cc..5789a78ecc36d6c 100644 --- a/lib/routes/theinitium/app.ts +++ b/lib/routes/theinitium/app.ts @@ -131,6 +131,10 @@ async function handler(ctx) { }); const article = $('.pp-article__body'); article.find('.block-related-articles').remove(); + article.find('figure.wp-block-pullquote').children().unwrap(); + article.find('div.block-explanation-note').wrapInner('<blockquote></blockquote>'); + article.find('div.wp-block-tcc-author-note').wrapInner('<em></em>').after('<hr>'); + article.find('p.has-small-font-size').wrapInner('<small></small>'); item.description = art(path.join(__dirname, 'templates/description.art'), { standfirst: $('.pp-header-group__standfirst').html(), coverImage: $('.pp-media__image').attr('src'), From cf7ce2470b1381cef2efc811e9c338a6ff73e866 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Wed, 6 Nov 2024 03:56:50 +0800 Subject: [PATCH 420/740] =?UTF-8?q?feat(route/pixiv):=20add=20R18=20novels?= =?UTF-8?q?=20support=20and=20full=20content=20toggle=20for=E2=80=A6=20(#1?= =?UTF-8?q?7391)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route/pixiv): add R18 novels support and full content toggle for user novels * fix: information & image placeholders * refactor: split novels fetching into SFW/NSFW modules and improve type definitions * feat: add info for sfw * feat: add radar * refactor: use jsdom instead of regex * feat: add limit support for nsfw novels * docs: rename radar title * revert: part of #17440 Object.entries(options.searchParams) returns `[]` * fix: clean up * feat: early exit when no SFW novels found * refactor: combine novel parsing logic into utils * docs: restore pixiv doc link * feat: cache novel content * refactor: cleanup * refactor: full content function --------- --- lib/routes/pixiv/api/get-illust-detail.ts | 22 ++ lib/routes/pixiv/api/get-novels-nsfw.ts | 247 ++++++++++++++++++++++ lib/routes/pixiv/api/get-novels-sfw.ts | 201 ++++++++++++++++++ lib/routes/pixiv/novels.ts | 110 ++++++---- lib/routes/pixiv/utils.ts | 119 +++++++++++ 5 files changed, 654 insertions(+), 45 deletions(-) create mode 100644 lib/routes/pixiv/api/get-illust-detail.ts create mode 100644 lib/routes/pixiv/api/get-novels-nsfw.ts create mode 100644 lib/routes/pixiv/api/get-novels-sfw.ts diff --git a/lib/routes/pixiv/api/get-illust-detail.ts b/lib/routes/pixiv/api/get-illust-detail.ts new file mode 100644 index 000000000000000..64f524f1f82941f --- /dev/null +++ b/lib/routes/pixiv/api/get-illust-detail.ts @@ -0,0 +1,22 @@ +import got from '../pixiv-got'; +import { maskHeader } from '../constants'; +import queryString from 'query-string'; + +/** + * 获取插画详细信息 + * @param {string} illust_id 插画作品 id + * @param {string} token pixiv oauth token + * @returns {Promise<got.AxiosResponse<{illust: IllustDetail}>>} + */ +export default function getIllustDetail(illust_id: string, token: string) { + return got('https://app-api.pixiv.net/v1/illust/detail', { + headers: { + ...maskHeader, + Authorization: 'Bearer ' + token, + }, + searchParams: queryString.stringify({ + illust_id, + filter: 'for_ios', + }), + }); +} diff --git a/lib/routes/pixiv/api/get-novels-nsfw.ts b/lib/routes/pixiv/api/get-novels-nsfw.ts new file mode 100644 index 000000000000000..bc6f125707e8f6e --- /dev/null +++ b/lib/routes/pixiv/api/get-novels-nsfw.ts @@ -0,0 +1,247 @@ +import got from '../pixiv-got'; +import { maskHeader } from '../constants'; +import queryString from 'query-string'; +import { config } from '@/config'; +import { JSDOM, VirtualConsole } from 'jsdom'; + +import pixivUtils from '../utils'; +import ConfigNotFoundError from '@/errors/types/config-not-found'; +import cache from '@/utils/cache'; +import { parseDate } from 'tough-cookie'; +import { getToken } from '../token'; + +interface nsfwNovelWork { + id: string; + title: string; + caption: string; + restrict: number; + x_restrict: number; + is_original: boolean; + image_urls: { + square_medium: string; + medium: string; + large: string; + }; + create_date: string; + tags: Array<{ + name: string; + translated_name: string | null; + added_by_uploaded_user: boolean; + }>; + page_count: number; + text_length: number; + user: { + id: number; + name: string; + account: string; + profile_image_urls: { + medium: string; + }; + is_followed: boolean; + is_access_blocking_user: boolean; + }; + series?: { + id?: number; + title?: string; + }; + total_bookmarks: number; + total_view: number; + total_comments: number; +} + +interface nsfwNovelsResponse { + data: { + user: { + id: number; + name: string; + account: string; + profile_image_urls: { + medium: string; + }; + is_followed: boolean; + is_access_blocking_user: boolean; + }; + novels: nsfwNovelWork[]; + }; +} + +interface nsfwNovelDetail { + id: string; + title: string; + seriesId: string | null; + seriesTitle: string | null; + seriesIsWatched: boolean | null; + userId: string; + coverUrl: string; + tags: string[]; + caption: string; + cdate: string; + rating: { + like: number; + bookmark: number; + view: number; + }; + text: string; + marker: null; + illusts: string[]; + images: { + [key: string]: { + novelImageId: string; + sl: string; + urls: { + '240mw': string; + '480mw': string; + '1200x1200': string; + '128x128': string; + original: string; + }; + }; + }; + seriesNavigation: { + nextNovel: null; + prevNovel: { + id: number; + viewable: boolean; + contentOrder: string; + title: string; + coverUrl: string; + viewableMessage: null; + } | null; + } | null; + glossaryItems: string[]; + replaceableItemIds: string[]; + aiType: number; + isOriginal: boolean; +} + +function getNovels(user_id: string, token: string): Promise<nsfwNovelsResponse> { + return got('https://app-api.pixiv.net/v1/user/novels', { + headers: { + ...maskHeader, + Authorization: 'Bearer ' + token, + }, + searchParams: queryString.stringify({ + user_id, + filter: 'for_ios', + }), + }); +} + +async function getNovelFullContent(novel_id: string, token: string): Promise<nsfwNovelDetail> { + return (await cache.tryGet(`https://app-api.pixiv.net/webview/v2/novel:${novel_id}`, async () => { + // https://github.com/mikf/gallery-dl/blob/main/gallery_dl/extractor/pixiv.py + // https://github.com/mikf/gallery-dl/commit/db507e30c7431d4ed7e23c153a044ce1751c2847 + const response = await got('https://app-api.pixiv.net/webview/v2/novel', { + headers: { + ...maskHeader, + Authorization: 'Bearer ' + token, + }, + searchParams: queryString.stringify({ + id: novel_id, + viewer_version: '20221031_ai', + }), + }); + + const virtualConsole = new VirtualConsole().on('error', () => void 0); + + const { window } = new JSDOM(response.data, { + runScripts: 'dangerously', + virtualConsole, + }); + + const novelDetail = window.pixiv?.novel as nsfwNovelDetail; + + window.close(); + + if (!novelDetail) { + throw new Error('No novel data found'); + } + + return novelDetail; + })) as nsfwNovelDetail; +} + +function convertPixivProtocolExtended(caption: string): string { + const protocolMap = new Map([ + [/pixiv:\/\/novels\/(\d+)/g, 'https://www.pixiv.net/novel/show.php?id=$1'], + [/pixiv:\/\/illusts\/(\d+)/g, 'https://www.pixiv.net/artworks/$1'], + [/pixiv:\/\/users\/(\d+)/g, 'https://www.pixiv.net/users/$1'], + [/pixiv:\/\/novel\/series\/(\d+)/g, 'https://www.pixiv.net/novel/series/$1'], + ]); + + let convertedText = caption; + + for (const [pattern, replacement] of protocolMap) { + convertedText = convertedText.replace(pattern, replacement); + } + + return convertedText; +} + +export async function getR18Novels(id: string, fullContent: boolean, limit: number = 100) { + if (!config.pixiv || !config.pixiv.refreshToken) { + throw new ConfigNotFoundError( + '該用戶爲 R18 創作者,需要 PIXIV_REFRESHTOKEN。This user is an R18 creator, PIXIV_REFRESHTOKEN is required - pixiv RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>' + ); + } + + const token = await getToken(cache.tryGet); + if (!token) { + throw new ConfigNotFoundError('pixiv not login'); + } + + const response = await getNovels(id, token); + const novels = limit ? response.data.novels.slice(0, limit) : response.data.novels; + const username = novels[0].user.name; + + const items = await Promise.all( + novels.map(async (novel) => { + const baseItem = { + title: novel.series?.title ? `${novel.series.title} - ${novel.title}` : novel.title, + description: ` + <img src="${pixivUtils.getProxiedImageUrl(novel.image_urls.large)}" /> + <p>${convertPixivProtocolExtended(novel.caption) || ''}</p> + <p> + 字數:${novel.text_length}<br> + 閱覽數:${novel.total_view}<br> + 收藏數:${novel.total_bookmarks}<br> + 評論數:${novel.total_comments}<br> + </p>`, + author: novel.user.name, + pubDate: parseDate(novel.create_date), + link: `https://www.pixiv.net/novel/show.php?id=${novel.id}`, + category: novel.tags.map((t) => t.name), + }; + + if (!fullContent) { + return baseItem; + } + + try { + const novelDetail = await getNovelFullContent(novel.id, token); + const images = Object.fromEntries( + Object.entries(novelDetail.images) + .filter(([, image]) => image?.urls?.original) + .map(([id, image]) => [id, image.urls.original.replace('https://i.pximg.net', config.pixiv.imgProxy || '')]) + ); + + const content = await pixivUtils.parseNovelContent(novelDetail.text, images, token); + + return { + ...baseItem, + description: `${baseItem.description}<hr>${content}`, + }; + } catch { + return baseItem; + } + }) + ); + + return { + title: `${username}'s novels - pixiv`, + description: `${username} 的 pixiv 最新小说`, + image: pixivUtils.getProxiedImageUrl(novels[0].user.profile_image_urls.medium), + link: `https://www.pixiv.net/users/${id}/novels`, + item: items, + }; +} diff --git a/lib/routes/pixiv/api/get-novels-sfw.ts b/lib/routes/pixiv/api/get-novels-sfw.ts new file mode 100644 index 000000000000000..7bb74c8970a02e1 --- /dev/null +++ b/lib/routes/pixiv/api/get-novels-sfw.ts @@ -0,0 +1,201 @@ +import got from '@/utils/got'; +import cache from '@/utils/cache'; +import pixivUtils from '../utils'; +import { parseDate } from '@/utils/parse-date'; + +const baseUrl = 'https://www.pixiv.net'; +interface sfwNovelWork { + id: string; + title: string; + genre: string; + xRestrict: number; + restrict: number; + url: string; + tags: string[]; + userId: string; + userName: string; + profileImageUrl: string; + textCount: number; + wordCount: number; + readingTime: number; + useWordCount: boolean; + description: string; + isBookmarkable: boolean; + bookmarkData: null; + bookmarkCount: number; + isOriginal: boolean; + marker: null; + titleCaptionTranslation: { + workTitle: null; + workCaption: null; + }; + createDate: string; + updateDate: string; + isMasked: boolean; + aiType: number; + seriesId: string; + seriesTitle: string; + isUnlisted: boolean; +} + +interface sfwNovelsResponse { + data: { + error: boolean; + message: string; + body: { + works: Record<string, sfwNovelWork>; + extraData: { + meta: { + title: string; + description: string; + canonical: string; + ogp: { + description: string; + image: string; + title: string; + type: string; + }; + twitter: { + description: string; + image: string; + title: string; + card: string; + }; + alternateLanguages: { + ja: string; + en: string; + }; + descriptionHeader: string; + }; + }; + }; + }; +} + +interface sfwNovelDetail { + body: { + content: string; + textEmbeddedImages: Record< + string, + { + novelImageId: string; + sl: string; + urls: { + original: string; + '1200x1200': string; + '480mw': string; + '240mw': string; + '128x128': string; + }; + } + >; + }; +} + +async function getNovelFullContent(novel_id: string): Promise<{ content: string; images: Record<string, string> }> { + const url = `${baseUrl}/ajax/novel/${novel_id}`; + return (await cache.tryGet(url, async () => { + const response = await got(url, { + headers: { + referer: `${baseUrl}/novel/show.php?id=${novel_id}`, + }, + }); + + const novelDetail = response.data as sfwNovelDetail; + + if (!novelDetail) { + throw new Error('No novel data found'); + } + + const images: Record<string, string> = {}; + + if (novelDetail.body.textEmbeddedImages) { + for (const [id, image] of Object.entries(novelDetail.body.textEmbeddedImages)) { + images[id] = pixivUtils.getProxiedImageUrl(image.urls.original); + } + } + + return { + content: novelDetail.body.content, + images, + }; + })) as { content: string; images: Record<string, string> }; +} + +export async function getNonR18Novels(id: string, fullContent: boolean, limit: number = 100) { + const url = `${baseUrl}/users/${id}/novels`; + const { data: allData } = await got(`${baseUrl}/ajax/user/${id}/profile/all`, { + headers: { + referer: url, + }, + }); + + const novels = Object.keys(allData.body.novels) + .sort((a, b) => Number(b) - Number(a)) + .slice(0, Number.parseInt(String(limit), 10)); + + if (novels.length === 0) { + throw new Error('No novels found, fallback to R18 API'); + // Throw error early to avoid unnecessary API requests + // Since hasPixivAuth() check failed earlier and R18 API requires authentication, this will result in ConfigNotFoundError + } + + const searchParams = new URLSearchParams(); + for (const novel of novels) { + searchParams.append('ids[]', novel); + } + + const { data } = (await got(`${baseUrl}/ajax/user/${id}/profile/novels`, { + headers: { + referer: url, + }, + searchParams, + })) as sfwNovelsResponse; + + const items = await Promise.all( + Object.values(data.body.works).map(async (item) => { + const baseItem = { + title: item.title, + description: ` + <img src=${pixivUtils.getProxiedImageUrl(item.url)} /> + <p>${item.description}</p> + <p> + 字數:${item.textCount}<br> + 閱讀時間:${item.readingTime} 分鐘<br> + 收藏數:${item.bookmarkCount}<br> + </p> + `, + link: `${baseUrl}/novel/show.php?id=${item.id}`, + author: item.userName, + pubDate: parseDate(item.createDate), + updated: parseDate(item.updateDate), + category: item.tags, + }; + + if (!fullContent) { + return baseItem; + } + + try { + const { content: initialContent, images } = await getNovelFullContent(item.id); + + const content = await pixivUtils.parseNovelContent(initialContent, images); + + return { + ...baseItem, + description: `${baseItem.description}<hr>${content}`, + }; + } catch { + return baseItem; + } + }) + ); + + return { + title: data.body.extraData.meta.title, + description: data.body.extraData.meta.ogp.description, + image: pixivUtils.getProxiedImageUrl(Object.values(data.body.works)[0].profileImageUrl), + link: url, + item: items, + }; +} diff --git a/lib/routes/pixiv/novels.ts b/lib/routes/pixiv/novels.ts index 9d9ccdf5b9d3a31..4bdc76e286e11fc 100644 --- a/lib/routes/pixiv/novels.ts +++ b/lib/routes/pixiv/novels.ts @@ -1,15 +1,36 @@ -import { Route } from '@/types'; -import got from '@/utils/got'; -import { parseDate } from '@/utils/parse-date'; -const baseUrl = 'https://www.pixiv.net'; +import { Data, Route, ViewType } from '@/types'; +import { fallback, queryToBoolean } from '@/utils/readable-social'; +import { getR18Novels } from './api/get-novels-nsfw'; +import { getNonR18Novels } from './api/get-novels-sfw'; +import { config } from '@/config'; export const route: Route = { - path: '/user/novels/:id', + path: '/user/novels/:id/:full_content?', categories: ['social-media'], + view: ViewType.Articles, example: '/pixiv/user/novels/27104704', - parameters: { id: "User id, available in user's homepage URL" }, + parameters: { + id: "User id, available in user's homepage URL", + full_content: { + description: 'Enable or disable the display of full content. ', + options: [ + { value: 'true', label: 'true' }, + { value: 'false', label: 'false' }, + ], + default: 'false', + }, + }, features: { - requireConfig: false, + requireConfig: [ + { + name: 'PIXIV_REFRESHTOKEN', + optional: true, + description: ` +Pixiv 登錄後的 refresh_token,用於獲取 R18 小說 +refresh_token after Pixiv login, required for accessing R18 novels +[https://docs.rsshub.app/deploy/config#pixiv](https://docs.rsshub.app/deploy/config#pixiv)`, + }, + ], requirePuppeteer: false, antiCrawler: false, supportBT: false, @@ -18,54 +39,53 @@ export const route: Route = { }, radar: [ { + title: 'User Novels (簡介 Basic info)', source: ['www.pixiv.net/users/:id/novels'], + target: '/user/novels/:id', + }, + { + title: 'User Novels (全文 Full text)', + source: ['www.pixiv.net/users/:id/novels'], + target: '/user/novels/:id/true', }, ], name: 'User Novels', - maintainers: ['TonyRL'], + maintainers: ['TonyRL', 'SnowAgar25'], handler, + description: ` +| 小說類型 Novel Type | full_content | PIXIV_REFRESHTOKEN | 返回內容 Content | +|-------------------|--------------|-------------------|-----------------| +| Non R18 | false | 不需要 Not Required | 簡介 Basic info | +| Non R18 | true | 不需要 Not Required | 全文 Full text | +| R18 | false | 需要 Required | 簡介 Basic info | +| R18 | true | 需要 Required | 全文 Full text | + +Default value for \`full_content\` is \`false\` if not specified. + +Example: +- \`/pixiv/user/novels/79603797\` → 簡介 Basic info +- \`/pixiv/user/novels/79603797/true\` → 全文 Full text`, }; -async function handler(ctx) { +const hasPixivAuth = () => Boolean(config.pixiv && config.pixiv.refreshToken); + +async function handler(ctx): Promise<Data> { const id = ctx.req.param('id'); - const { limit = 100 } = ctx.req.query(); - const url = `${baseUrl}/users/${id}/novels`; - const { data: allData } = await got(`${baseUrl}/ajax/user/${id}/profile/all`, { - headers: { - referer: url, - }, - }); + const fullContent = fallback(undefined, queryToBoolean(ctx.req.param('full_content')), false); - const novels = Object.keys(allData.body.novels) - .sort((a, b) => b - a) - .slice(0, Number.parseInt(limit, 10)); - const searchParams = new URLSearchParams(); - for (const novel of novels) { - searchParams.append('ids[]', novel); - } + const { limit } = ctx.req.query(); - const { data } = await got(`${baseUrl}/ajax/user/${id}/profile/novels`, { - headers: { - referer: url, - }, - searchParams, - }); + // Use R18 API first if auth exists + if (hasPixivAuth()) { + return await getR18Novels(id, fullContent, limit); + } - const items = Object.values(data.body.works).map((item) => ({ - title: item.seriesTitle || item.title, - description: item.description || item.title, - link: `${baseUrl}/novel/series/${item.id}`, - author: item.userName, - pubDate: parseDate(item.createDate), - updated: parseDate(item.updateDate), - category: item.tags, - })); + // Attempt non-R18 API when Pixiv auth is missing + const nonR18Result = await getNonR18Novels(id, fullContent, limit).catch(() => null); + if (nonR18Result) { + return nonR18Result; + } - return { - title: data.body.extraData.meta.title, - description: data.body.extraData.meta.ogp.description, - image: Object.values(data.body.works)[0].profileImageUrl, - link: url, - item: items, - }; + // Fallback to R18 API as last resort + return await getR18Novels(id, fullContent, limit); } diff --git a/lib/routes/pixiv/utils.ts b/lib/routes/pixiv/utils.ts index 824f742e3a95da1..9bd7dab5a00f13d 100644 --- a/lib/routes/pixiv/utils.ts +++ b/lib/routes/pixiv/utils.ts @@ -1,4 +1,6 @@ import { config } from '@/config'; +import { load } from 'cheerio'; +import getIllustDetail from './api/get-illust-detail'; export default { getImgs(illust) { @@ -14,4 +16,121 @@ export default { } return images; }, + getProxiedImageUrl(originalUrl: string): string { + return originalUrl.replace('https://i.pximg.net', config.pixiv.imgProxy || ''); + }, + // docs: https://www.pixiv.help/hc/ja/articles/235584168-小説作品の本文内に使える特殊タグとは + async parseNovelContent(content: string, images: Record<string, string>, token?: string): Promise<string> { + try { + // 如果有 token,處理 pixiv 圖片引用 + // If token exists, process pixiv image references + if (token) { + const imageMatches = [...content.matchAll(/\[pixivimage:(\d+)(?:-(\d+))?\]/g)]; + const imageIdToUrl = new Map<string, string>(); + + // 批量獲取圖片資訊 + // Batch fetch image information + await Promise.all( + imageMatches.map(async ([, illustId, pageNum]) => { + if (!illustId) { + return; + } + + try { + const illust = (await getIllustDetail(illustId, token)).data.illust; + const pixivimages = this.getImgs(illust).map((img) => img.match(/src="([^"]+)"/)?.[1] || ''); + + const imageUrl = pixivimages[Number(pageNum) || 0]; + if (imageUrl) { + imageIdToUrl.set(pageNum ? `${illustId}-${pageNum}` : illustId, imageUrl); + } + } catch (error) { + // 記錄錯誤但不中斷處理 + // Log error but don't interrupt processing + logger.warn(`Failed to fetch illust detail for ID ${illustId}: ${error instanceof Error ? error.message : String(error)}`); + } + }) + ); + + // 替換 pixiv 圖片引用為 img 標籤 + // Replace pixiv image references with img tags + content = content.replaceAll(/\[pixivimage:(\d+)(?:-(\d+))?\]/g, (match, illustId, pageNum) => { + const key = pageNum ? `${illustId}-${pageNum}` : illustId; + const imageUrl = imageIdToUrl.get(key); + return imageUrl ? `<img src="${imageUrl}" alt="pixiv illustration ${illustId}${pageNum ? ` page ${pageNum}` : ''}">` : match; + }); + } else { + /* + * 處理 get-novels-sfw 的情況 + * 當沒有 PIXIV_REFRESHTOKEN 時,將 [pixivimage:(\d+)] 格式轉換為 artwork 連結 + * 因無法獲取 Pixiv 作品詳情,改為提供直接連結到原始作品頁面 + * + * Handle get-novels-sfw case + * When PIXIV_REFRESHTOKEN is not available, convert [pixivimage:(\d+)] format to artwork link + * Provide direct link to original artwork page since artwork details cannot be retrieved + */ + content = content.replaceAll(/\[pixivimage:(\d+)(?:-(\d+))?\]/g, (_, illustId) => `<a href="https://www.pixiv.net/artworks/${illustId}" target="_blank" rel="noopener noreferrer">Pixiv Artwork #${illustId}</a>`); + } + + // 處理作者上傳的圖片 + // Process author uploaded images + content = content.replaceAll(/\[uploadedimage:(\d+)\]/g, (match, imageId) => { + if (images[imageId]) { + return `<img src="${images[imageId]}" alt="novel illustration ${imageId}">`; + } + return match; + }); + + // 基本格式處理 + // Basic formatting + content = content + // 換行轉換為 HTML 換行 + // Convert newlines to HTML breaks + .replaceAll('\n', '<br>') + // 連續換行轉換為段落 + // Convert consecutive breaks to paragraphs + .replaceAll(/(<br>){2,}/g, '</p><p>') + // ruby 標籤(為日文漢字標註讀音) + // ruby tags (for Japanese kanji readings) + .replaceAll(/\[\[rb:(.*?)>(.*?)\]\]/g, '<ruby>$1<rt>$2</rt></ruby>') + // 外部連結 + // external links + .replaceAll(/\[\[jumpuri:(.*?)>(.*?)\]\]/g, '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>') + // 頁面跳轉,但由於 [newpage] 使用 hr 分隔,沒有頁數,沒必要跳轉,所以只顯示文字 + // Page jumps, but since [newpage] uses hr separators, without the page numbers, jumping isn't needed, so just display text + .replaceAll(/\[jump:(\d+)\]/g, 'Jump to page $1') + // 章節標題 + // chapter titles + .replaceAll(/\[chapter:(.*?)\]/g, '<h2>$1</h2>') + // 分頁符 + // page breaks + .replaceAll('[newpage]', '<hr>'); + + // 使用 cheerio 進行 HTML 清理和優化 + // Use cheerio for HTML cleanup and optimization + const $content = load(`<article><p>${content}</p></article>`); + + // 處理嵌套段落:移除多餘的嵌套 + // Handle nested paragraphs: remove unnecessary nesting + $content('p p').each((_, elem) => { + const $elem = $content(elem); + $elem.replaceWith($elem.html() || ''); + }); + + // 處理段落中的標題:確保正確的 HTML 結構 + // Handle headings in paragraphs: ensure correct HTML structure + $content('p h2').each((_, elem) => { + const $elem = $content(elem); + const $parent = $elem.parent('p'); + const html = $elem.prop('outerHTML'); + if ($parent.length && html) { + $parent.replaceWith(`</p>${html}<p>`); + } + }); + + return $content.html() || ''; + } catch (error) { + throw new Error(`Error parsing novel content: ${error instanceof Error ? error.message : String(error)}`); + } + }, }; From 66533f57e8ff407b98520c440b95dc4cf919c846 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Wed, 6 Nov 2024 04:37:29 +0800 Subject: [PATCH 421/740] feat(route/apnews): Enhance live page post extraction. (#17446) --- lib/routes/apnews/utils.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/routes/apnews/utils.ts b/lib/routes/apnews/utils.ts index 17ff80487cd3994..5db057510ade079 100644 --- a/lib/routes/apnews/utils.ts +++ b/lib/routes/apnews/utils.ts @@ -51,10 +51,14 @@ export function fetchArticle(item) { // Live ldjson = rawLdjson; + const url = new URL(item.link); + const description = url.hash ? $(url.hash).parent().find('.LiveBlogPost-body').html() : ldjson.description; + const pubDate = url.hash ? parseDate(Number.parseInt($(url.hash).parent().attr('data-posted-date-timestamp'), 10)) : parseDate(ldjson.coverageStartTime); + return { category: ldjson.keywords, - pubDate: parseDate(ldjson.coverageStartTime), - description: ldjson.description, + pubDate, + description, guid: $("meta[name='brightspot.contentId']").attr('content'), ...item, }; From ff1ff8d9404043c631bccfcf9291da22fb66d34a Mon Sep 17 00:00:00 2001 From: bugyaluwang <70185413+GrinZero@users.noreply.github.com> Date: Wed, 6 Nov 2024 04:50:43 +0800 Subject: [PATCH 422/740] feat(dev): visualize network requests in the development environment on Chrome Devtools's network tab (#17308) * chore: add node-network-devtools to enhance development experience * feat(dev): visualize network requests in the development environment on Chrome Devtools's network tab * chore(deps): update node-network-devtools * fix: lock error when ci * chore: update node-network-devtools to v1.0.18 * chore: update node-network-devtools * chore: use node-network-devtools v1.0.20 * feat: use hook to add custom headers for fetch * fix: complex method 16 * test: add test for fetch * fix: test type error * fix: hard code * chore(cr): rename the fetch.spec.ts to fetch.test.ts and use exact version * chore: fix lock error --------- --- lib/utils/ofetch.ts | 3 + lib/utils/request-rewriter/fetch.test.ts | 93 ++++++++++++++++++++++++ lib/utils/request-rewriter/fetch.ts | 13 ++++ package.json | 1 + pnpm-lock.yaml | 49 +++++++++++++ 5 files changed, 159 insertions(+) create mode 100644 lib/utils/request-rewriter/fetch.test.ts diff --git a/lib/utils/ofetch.ts b/lib/utils/ofetch.ts index 2cddd52e3cd268a..2a66a6f8cddca64 100644 --- a/lib/utils/ofetch.ts +++ b/lib/utils/ofetch.ts @@ -1,6 +1,9 @@ import { createFetch } from 'ofetch'; import { config } from '@/config'; import logger from '@/utils/logger'; +import { register } from 'node-network-devtools'; + +process.env.NODE_ENV === 'dev' && register(); const rofetch = createFetch().create({ retryStatusCodes: [400, 408, 409, 425, 429, 500, 502, 503, 504], diff --git a/lib/utils/request-rewriter/fetch.test.ts b/lib/utils/request-rewriter/fetch.test.ts new file mode 100644 index 000000000000000..ccb4e448c0d026d --- /dev/null +++ b/lib/utils/request-rewriter/fetch.test.ts @@ -0,0 +1,93 @@ +import { getCurrentCell, setCurrentCell } from 'node-network-devtools'; +import { useCustomHeader } from './fetch'; +import { describe, beforeEach, afterEach, test, expect } from 'vitest'; + +const getInitRequest = () => + ({ + requestHeaders: {} as Record<string, string>, + id: '', + loadCallFrames: () => {}, + cookies: '', + requestData: '', + responseData: '', + responseHeaders: {}, + responseInfo: {}, + }) satisfies NonNullable<ReturnType<typeof getCurrentCell>>['request']; + +enum Env { + dev = 'dev', + production = 'production', + test = 'test', +} + +describe('useCustomHeader', () => { + let originalEnv: string; + + beforeEach(() => { + originalEnv = process.env.NODE_ENV || Env.test; + }); + + afterEach(() => { + process.env.NODE_ENV = originalEnv; + }); + + test('should register request with custom headers in dev environment', () => { + process.env.NODE_ENV = Env.dev; + + const headers = new Headers(); + const headerText = 'authorization'; + const headerValue = 'Bearer token'; + headers.set(headerText, headerValue); + + const req = getInitRequest(); + setCurrentCell({ + request: req, + pipes: [], + isAborted: false, + }); + + useCustomHeader(headers); + + const cell = getCurrentCell(); + expect(cell).toBeDefined(); + + let request = req; + if (cell) { + for (const { pipe } of cell.pipes) { + request = pipe(request); + } + } + + expect(request.requestHeaders[headerText]).toEqual(headerValue); + }); + + test('should not register request in non-dev environment', () => { + process.env.NODE_ENV = Env.production; + + const headers = new Headers(); + const headerText = 'content-type'; + const headerValue = 'application/json'; + + headers.set(headerText, headerValue); + const req = getInitRequest(); + + setCurrentCell({ + request: req, + pipes: [], + isAborted: false, + }); + useCustomHeader(headers); + + const cell = getCurrentCell(); + expect(cell).toBeDefined(); + + let request = req; + if (cell) { + for (const { pipe } of cell.pipes) { + request = pipe(request); + } + } + + expect(req.requestHeaders[headerText]).toBeUndefined(); + }); +}); diff --git a/lib/utils/request-rewriter/fetch.ts b/lib/utils/request-rewriter/fetch.ts index 136e93bc86753c1..9985701100d0d28 100644 --- a/lib/utils/request-rewriter/fetch.ts +++ b/lib/utils/request-rewriter/fetch.ts @@ -3,6 +3,7 @@ import { config } from '@/config'; import undici, { Request, RequestInfo, RequestInit } from 'undici'; import proxy from '@/utils/proxy'; import { RateLimiterMemory, RateLimiterQueue } from 'rate-limiter-flexible'; +import { useRegisterRequest } from 'node-network-devtools'; const limiter = new RateLimiterMemory({ points: 10, @@ -14,6 +15,16 @@ const limiterQueue = new RateLimiterQueue(limiter, { maxQueueSize: 5000, }); +export const useCustomHeader = (headers: Headers) => { + process.env.NODE_ENV === 'dev' && + useRegisterRequest((req) => { + for (const [key, value] of headers.entries()) { + req.requestHeaders[key] = value; + } + return req; + }); +}; + const wrappedFetch: typeof undici.fetch = async (input: RequestInfo, init?: RequestInit) => { const request = new Request(input, init); const options: RequestInit = {}; @@ -46,6 +57,8 @@ const wrappedFetch: typeof undici.fetch = async (input: RequestInfo, init?: Requ request.headers.delete('x-prefer-proxy'); } + useCustomHeader(request.headers); + // proxy if (!init?.dispatcher && proxy.dispatcher && (proxy.proxyObj.strategy !== 'on_retry' || isRetry)) { const proxyRegex = new RegExp(proxy.proxyObj.url_regex); diff --git a/package.json b/package.json index 9f332055fa8c249..4253290716ed557 100644 --- a/package.json +++ b/package.json @@ -186,6 +186,7 @@ "lint-staged": "15.2.10", "mockdate": "3.0.5", "msw": "2.4.3", + "node-network-devtools": "1.0.22", "prettier": "3.3.3", "remark-parse": "11.0.0", "supertest": "7.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e43948748ce9e7f..1109876d96e8aaa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -414,6 +414,9 @@ importers: msw: specifier: 2.4.3 version: 2.4.3(typescript@5.6.3) + node-network-devtools: + specifier: 1.0.22 + version: 1.0.22(bufferutil@4.0.8)(undici@6.20.1)(utf-8-validate@5.0.10) prettier: specifier: 3.3.3 version: 3.3.3 @@ -2723,6 +2726,10 @@ packages: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} + define-lazy-prop@2.0.0: + resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} + engines: {node: '>=8'} + degenerator@5.0.1: resolution: {integrity: sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==} engines: {node: '>= 14'} @@ -3666,6 +3673,11 @@ packages: resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} engines: {node: '>= 0.4'} + is-docker@2.2.1: + resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} + engines: {node: '>=8'} + hasBin: true + is-extendable@0.1.1: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} engines: {node: '>=0.10.0'} @@ -3747,6 +3759,10 @@ packages: resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==} engines: {node: '>=10'} + is-wsl@2.2.0: + resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} + engines: {node: '>=8'} + isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -4337,6 +4353,11 @@ packages: resolution: {integrity: sha512-vv8fJuOUCCvSPjDjBLlMqYMHob4aGjkmrkaE42/mZr0VT+ZAU10jRF8oTnX9+pgU9/vYJ8P7YT3Vd6ajkmzSCw==} engines: {node: '>=0.12'} + node-network-devtools@1.0.22: + resolution: {integrity: sha512-frZ+j3UNvtxdo2YNEAZIKxAHcMuiCUkkm6rP3bYSfnBKfAybidNVOLae1dlirv2mv1THfPBKp9+sVq/5mEfOCw==} + peerDependencies: + undici: ^6 + node-releases@2.0.18: resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} @@ -4429,6 +4450,10 @@ packages: resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} engines: {node: '>=18'} + open@8.4.2: + resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} + engines: {node: '>=12'} + openapi-fetch@0.11.3: resolution: {integrity: sha512-r18fERgpxFrI4pv79ABD1dqFetWz7pTfwRd7jQmRm/lFdCDpWF43kvHUiOqOZu+tWsMydDJMpJN1hlZ9inRvfA==} @@ -8345,6 +8370,8 @@ snapshots: es-errors: 1.3.0 gopd: 1.0.1 + define-lazy-prop@2.0.0: {} + degenerator@5.0.1: dependencies: ast-types: 0.13.4 @@ -9541,6 +9568,8 @@ snapshots: dependencies: hasown: 2.0.2 + is-docker@2.2.1: {} + is-extendable@0.1.1: {} is-extglob@2.1.1: {} @@ -9589,6 +9618,10 @@ snapshots: is-unicode-supported@0.1.0: {} + is-wsl@2.2.0: + dependencies: + is-docker: 2.2.1 + isexe@2.0.0: {} isobject@3.0.1: {} @@ -10263,6 +10296,16 @@ snapshots: dependencies: write-file-atomic: 1.3.4 + node-network-devtools@1.0.22(bufferutil@4.0.8)(undici@6.20.1)(utf-8-validate@5.0.10): + dependencies: + iconv-lite: 0.6.3 + open: 8.4.2 + undici: 6.20.1 + ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) + transitivePeerDependencies: + - bufferutil + - utf-8-validate + node-releases@2.0.18: {} nodemailer@6.9.13: {} @@ -10354,6 +10397,12 @@ snapshots: dependencies: mimic-function: 5.0.1 + open@8.4.2: + dependencies: + define-lazy-prop: 2.0.0 + is-docker: 2.2.1 + is-wsl: 2.2.0 + openapi-fetch@0.11.3: dependencies: openapi-typescript-helpers: 0.0.13 From f31071c52f705cd2f115899495d505f8a664fdd6 Mon Sep 17 00:00:00 2001 From: After9 <ap66.ron@gmail.com> Date: Wed, 6 Nov 2024 10:06:23 +0800 Subject: [PATCH 423/740] feat: add route(voting) to Openrice.com (#17443) * feat: add route for openrice.com * fix: Optimize the code according to the recommendations of review * fix: Remove the initial assignment of variable urlPath * feat: add route(chart) for openrice.com * Update lib/routes/openrice/namespace.ts update lang value following the type Namespace Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/openrice/chart.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/openrice/chart.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * remove blank option in ofetch Co-authored-by: Tony <TonyRL@users.noreply.github.com> * feat: add route(voting) for openrice.com * adding categoryKey description for Route parameters --------- --- lib/routes/openrice/voting.ts | 84 +++++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 lib/routes/openrice/voting.ts diff --git a/lib/routes/openrice/voting.ts b/lib/routes/openrice/voting.ts new file mode 100644 index 000000000000000..1f3179852161e55 --- /dev/null +++ b/lib/routes/openrice/voting.ts @@ -0,0 +1,84 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +const baseUrl = 'https://www.openrice.com'; + +export const route: Route = { + path: '/:lang/hongkong/voting/top/:categoryKey', + maintainers: ['after9'], + handler, + categories: ['shopping'], + example: '/openrice/zh/hongkong/voting/top/chinese', + parameters: { lang: '语言,缺省为 zh', categoryKey: '类别,缺省为 chinese' }, + name: 'OpenRice 開飯熱店 - 年度餐廳投票', + description: ` + lang: 语言,见下方列表 + | 简体 | 繁體 | EN | + | ----- | ------ | ----- | + | zh-cn | zh | en | + + categoryKey: 部分类别,见下方列表 (更多的类别可以在页面的link中对照获取) + | 中菜館 | 上海菜 | 粵菜 | 川菜 | 港式 | 粥粉麵店 | 廚師發辦 | 韓國菜 | 泰國菜 | 越南菜 | + | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | -------- | + | chinese | shanghainese | guangdong | sichuan | hkstyle | congee_noodles | omakase | korean | thai | vietnamese | + `, +}; + +async function handler(ctx) { + const lang = ctx.req.param('lang') ?? 'zh'; + const categoryKey = ctx.req.param('categoryKey') ?? 'chinese'; + + const apiPath = '/api/v2/voting/search/poi'; + const urlPath = `/${lang}/hongkong/voting/top`; + let title: string, description: string; + switch (lang) { + case 'zh-cn': + title = 'OpenRice 开饭热店'; + description = 'OpenRice用戶可以在網站或手機應用程式,點擊餐廳頁面中「投票」按鈕,即可完成投票。參加投票的用戶有機會參加大抽獎,贏取豐富獎品。'; + break; + case 'en': + title = 'OpenRice Best Restaurant'; + description = + 'OpenRice users can vote by clicking the "Vote" button on the restaurant page on the website or mobile app. Voters will have the opportunity to participate in the grand lottery and win grand prizes.'; + break; + case 'zh': + default: + title = 'OpenRice 開飯熱店'; + description = 'OpenRice用戶可以在網站或手機應用程式,點擊餐廳頁面中「投票」按鈕,即可完成投票。參加投票的用戶有機會參加大抽獎,贏取豐富獎品。'; + } + const response = await ofetch(baseUrl + apiPath, { + headers: { + accept: 'application/json', + }, + query: { + uiLang: lang, + uiCity: 'hongkong', + categoryKey, + shortlistIndexLt: 20, + startAt: 0, + regionId: 0, + rows: 20, + needTag: true, + _isPrivate: true, + }, + }); + + const data = response.paginationResult.results; + + const resultList = data.map((item) => { + const title = item.name ?? ''; + const link = `${baseUrl}/${lang}/hongkong/r-${item.name}-r${item.poiId}`; + const description = `${item.district.name}-${item.categories.map((category) => category.name).join('-')}`; + return { + title, + description, + link, + }; + }); + + return { + title, + link: baseUrl + urlPath, + description, + item: resultList, + }; +} From 28e84f62ac730bb8dc6738a60e196d7e66058631 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 5 Nov 2024 19:28:53 -0800 Subject: [PATCH 424/740] feat(route/youtube): cache handle lookup (#17466) --- lib/routes/youtube/user.ts | 54 ++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 23 deletions(-) diff --git a/lib/routes/youtube/user.ts b/lib/routes/youtube/user.ts index a9dc403b67ba95f..3ff41c74035ba58 100644 --- a/lib/routes/youtube/user.ts +++ b/lib/routes/youtube/user.ts @@ -3,8 +3,8 @@ import cache from '@/utils/cache'; import utils from './utils'; import { config } from '@/config'; import { parseDate } from '@/utils/parse-date'; -import got from '@/utils/got'; -import { load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; import ConfigNotFoundError from '@/errors/types/config-not-found'; export const route: Route = { @@ -44,34 +44,42 @@ async function handler(ctx) { const username = ctx.req.param('username'); const embed = !ctx.req.param('embed'); - let playlistId; - let channelName; - let image; - let description; + let userHandleData; if (username.startsWith('@')) { - const link = `https://www.youtube.com/${username}`; - const response = await got(link); - const $ = load(response.data); - const ytInitialData = JSON.parse( - $('script') - .text() - .match(/ytInitialData = ({.*?});/)?.[1] || '{}' - ); - const channelId = ytInitialData.metadata.channelMetadataRenderer.externalId; - channelName = ytInitialData.metadata.channelMetadataRenderer.title; - image = ytInitialData.metadata.channelMetadataRenderer.avatar?.thumbnails?.[0]?.url; - description = ytInitialData.metadata.channelMetadataRenderer.description; - playlistId = (await utils.getChannelWithId(channelId, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads; + userHandleData = await cache.tryGet(`youtube:handle:${username}`, async () => { + const link = `https://www.youtube.com/${username}`; + const response = await ofetch(link); + const $ = cheerio.load(response); + const ytInitialData = JSON.parse( + $('script') + .text() + .match(/ytInitialData = ({.*?});/)?.[1] || '{}' + ); + const metadataRenderer = ytInitialData.metadata.channelMetadataRenderer; + + const channelId = metadataRenderer.externalId; + const channelName = metadataRenderer.title; + const image = metadataRenderer.avatar?.thumbnails?.[0]?.url; + const description = metadataRenderer.description; + const playlistId = (await utils.getChannelWithId(channelId, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads; + + return { + channelName, + image, + description, + playlistId, + }; + }); } - playlistId = playlistId || (await utils.getChannelWithUsername(username, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads; + const playlistId = userHandleData?.playlistId || (await utils.getChannelWithUsername(username, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads; const data = (await utils.getPlaylistItems(playlistId, 'snippet', cache)).data.items; return { - title: `${channelName || username} - YouTube`, + title: `${userHandleData?.channelName || username} - YouTube`, link: username.startsWith('@') ? `https://www.youtube.com/${username}` : `https://www.youtube.com/user/${username}`, - description: description || `YouTube user ${username}`, - image, + description: userHandleData?.description || `YouTube user ${username}`, + image: userHandleData?.image, item: data .filter((d) => d.snippet.title !== 'Private video' && d.snippet.title !== 'Deleted video') .map((item) => { From b54b2fd63c0a3db5b7a0de4ad81a4cf7c6f122a9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:01:42 +0000 Subject: [PATCH 425/740] chore(deps): bump @opentelemetry/exporter-prometheus (#17471) Bumps [@opentelemetry/exporter-prometheus](https://github.com/open-telemetry/opentelemetry-js) from 0.54.0 to 0.54.1. - [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/experimental/v0.54.0...experimental/v0.54.1) --- updated-dependencies: - dependency-name: "@opentelemetry/exporter-prometheus" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 4253290716ed557..cf8ca811a11e219 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@hono/zod-openapi": "0.16.4", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-prometheus": "0.54.0", + "@opentelemetry/exporter-prometheus": "0.54.1", "@opentelemetry/exporter-trace-otlp-http": "0.54.0", "@opentelemetry/resources": "1.27.0", "@opentelemetry/sdk-metrics": "1.27.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1109876d96e8aaa..ac6503e48ab678b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: specifier: 1.9.0 version: 1.9.0 '@opentelemetry/exporter-prometheus': - specifier: 0.54.0 - version: 0.54.0(@opentelemetry/api@1.9.0) + specifier: 0.54.1 + version: 0.54.1(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http': specifier: 0.54.0 version: 0.54.0(@opentelemetry/api@1.9.0) @@ -1509,8 +1509,8 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/exporter-prometheus@0.54.0': - resolution: {integrity: sha512-httb+/c36hZvkIR9SqwXj+fLeE2XDdWfZqGO24MboNMHihmnvjE0/LN29I9CjsJqC2jEi8FErfQha/JeOfsFaA==} + '@opentelemetry/exporter-prometheus@0.54.1': + resolution: {integrity: sha512-TN4c0jPn205FEIOOF8D+4KG+GADegd3AqhVi/7iIvWdAPVOla2Ojdql/xJq+s4TLEDCjG54lP6jAqH4/4zHAdg==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 @@ -7053,7 +7053,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/exporter-prometheus@0.54.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/exporter-prometheus@0.54.1(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) From 9de4165dca43981c8e530c6bb18ade0ed5bbcf63 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:02:18 +0000 Subject: [PATCH 426/740] chore(deps-dev): bump @vercel/nft from 0.27.5 to 0.27.6 (#17473) Bumps [@vercel/nft](https://github.com/vercel/nft) from 0.27.5 to 0.27.6. - [Release notes](https://github.com/vercel/nft/releases) - [Commits](https://github.com/vercel/nft/compare/0.27.5...0.27.6) --- updated-dependencies: - dependency-name: "@vercel/nft" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 cf8ca811a11e219..94a55ce4f8d5d46 100644 --- a/package.json +++ b/package.json @@ -168,7 +168,7 @@ "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.13.0", "@typescript-eslint/parser": "8.13.0", - "@vercel/nft": "0.27.5", + "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.103", "eslint": "9.14.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ac6503e48ab678b..20be1aec482bd7b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -361,8 +361,8 @@ importers: specifier: 8.13.0 version: 8.13.0(eslint@9.14.0)(typescript@5.6.3) '@vercel/nft': - specifier: 0.27.5 - version: 0.27.5 + specifier: 0.27.6 + version: 0.27.6 '@vitest/coverage-v8': specifier: 2.0.5 version: 2.0.5(vitest@2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) @@ -2052,8 +2052,8 @@ packages: '@unhead/schema@1.11.11': resolution: {integrity: sha512-xSGsWHPBYcMV/ckQeImbrVu6ddeRnrdDCgXUKv3xIjGBY+ob/96V80lGX8FKWh8GwdFSwhblISObKlDAt5K9ZQ==} - '@vercel/nft@0.27.5': - resolution: {integrity: sha512-b2A7M+4yMHdWKY7xCC+kBEcnMrpaSE84CnuauTjhKKoCEeej0byJMAB8h/RBVnw/HdZOAFVcxR0Izr3LL24FwA==} + '@vercel/nft@0.27.6': + resolution: {integrity: sha512-mwuyUxskdcV8dd7N7JnxBgvFEz1D9UOePI/WyLLzktv6HSCwgPNQGit/UJ2IykAWGlypKw4pBQjOKWvIbXITSg==} engines: {node: '>=16'} hasBin: true @@ -7648,7 +7648,7 @@ snapshots: hookable: 5.5.3 zhead: 2.2.4 - '@vercel/nft@0.27.5': + '@vercel/nft@0.27.6': dependencies: '@mapbox/node-pre-gyp': 1.0.11 '@rollup/pluginutils': 4.2.1 From c867b53d3aed379dcb8027b38482877ff5c4cba2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:06:19 +0000 Subject: [PATCH 427/740] chore(deps): bump @opentelemetry/exporter-trace-otlp-http (#17472) Bumps [@opentelemetry/exporter-trace-otlp-http](https://github.com/open-telemetry/opentelemetry-js) from 0.54.0 to 0.54.1. - [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/experimental/v0.54.0...experimental/v0.54.1) --- updated-dependencies: - dependency-name: "@opentelemetry/exporter-trace-otlp-http" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 46 +++++++++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 94a55ce4f8d5d46..3423e38f055ef95 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.54.1", - "@opentelemetry/exporter-trace-otlp-http": "0.54.0", + "@opentelemetry/exporter-trace-otlp-http": "0.54.1", "@opentelemetry/resources": "1.27.0", "@opentelemetry/sdk-metrics": "1.27.0", "@opentelemetry/sdk-trace-base": "1.27.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 20be1aec482bd7b..95ecd266489c333 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,8 +33,8 @@ importers: specifier: 0.54.1 version: 0.54.1(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http': - specifier: 0.54.0 - version: 0.54.0(@opentelemetry/api@1.9.0) + specifier: 0.54.1 + version: 0.54.1(@opentelemetry/api@1.9.0) '@opentelemetry/resources': specifier: 1.27.0 version: 1.27.0(@opentelemetry/api@1.9.0) @@ -1495,8 +1495,8 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@opentelemetry/api-logs@0.54.0': - resolution: {integrity: sha512-9HhEh5GqFrassUndqJsyW7a0PzfyWr2eV2xwzHLIS+wX3125+9HE9FMRAKmJRwxZhgZGwH3HNQQjoMGZqmOeVA==} + '@opentelemetry/api-logs@0.54.1': + resolution: {integrity: sha512-tFOyYT8tFRSuUc+pEXnHG99270y7K8MSBLQSPiYBJ/0cgCp+8KmSej4joBfah0JoXAwbPzMCom3ri0xsiYbLvg==} engines: {node: '>=14'} '@opentelemetry/api@1.9.0': @@ -1515,20 +1515,20 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-trace-otlp-http@0.54.0': - resolution: {integrity: sha512-00X6rtr6Ew59+MM9pPSH7Ww5ScpWKBLiBA49awbPqQuVL/Bp0qp7O1cTxKHgjWdNkhsELzJxAEYwuRnDGrMXyA==} + '@opentelemetry/exporter-trace-otlp-http@0.54.1': + resolution: {integrity: sha512-yencb6HQ0ImSuMsR8RR+FtxkzJcJhy759/oAPDRUFowbncJHRK7vlty35hQeOhdzi3F/TzQhkzaCa8QGm/VTUw==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-exporter-base@0.54.0': - resolution: {integrity: sha512-g+H7+QleVF/9lz4zhaR9Dt4VwApjqG5WWupy5CTMpWJfHB/nLxBbX73GBZDgdiNfh08nO3rNa6AS7fK8OhgF5g==} + '@opentelemetry/otlp-exporter-base@0.54.1': + resolution: {integrity: sha512-cqX2uAg8UVzpEq9BrMhn6jQGp480Ykf0gQR4nOwpBkQ0BzoKHnu5GIhAuhHH4laVym0KrUVgWZWrdT52WrSXVA==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-transformer@0.54.0': - resolution: {integrity: sha512-jRexIASQQzdK4AjfNIBfn94itAq4Q8EXR9d3b/OVbhd3kKQKvMr7GkxYDjbeTbY7hHCOLcLfJ3dpYQYGOe8qOQ==} + '@opentelemetry/otlp-transformer@0.54.1': + resolution: {integrity: sha512-8aleigiRCeo3S1IqB88EFlYu9WlZmJOMcAse9U9yB/CdGiLN5g5jjMHEO47+YspTwVlc9U3B/Vj+oG/OFPSfDQ==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 @@ -1539,8 +1539,8 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/sdk-logs@0.54.0': - resolution: {integrity: sha512-HeWvOPiWhEw6lWvg+lCIi1WhJnIPbI4/OFZgHq9tKfpwF3LX6/kk3+GR8sGUGAEZfbjPElkkngzvd2s03zbD7Q==} + '@opentelemetry/sdk-logs@0.54.1': + resolution: {integrity: sha512-FoHgzFT9XHt1NdLNwNzqZCCWT7XF1aSxXuSRlGdfwmkhFjB0F3t0a7pngChejIP7ugc9XTIaKlboloe5DlGHzw==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': '>=1.4.0 <1.10.0' @@ -7042,7 +7042,7 @@ snapshots: '@open-draft/until@2.1.0': {} - '@opentelemetry/api-logs@0.54.0': + '@opentelemetry/api-logs@0.54.1': dependencies: '@opentelemetry/api': 1.9.0 @@ -7060,28 +7060,28 @@ snapshots: '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/exporter-trace-otlp-http@0.54.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/exporter-trace-otlp-http@0.54.1(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base': 0.54.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.54.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-exporter-base': 0.54.1(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.54.1(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base@0.54.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/otlp-exporter-base@0.54.1(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.54.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.54.1(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer@0.54.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/otlp-transformer@0.54.1(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.54.0 + '@opentelemetry/api-logs': 0.54.1 '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-logs': 0.54.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-logs': 0.54.1(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.27.0(@opentelemetry/api@1.9.0) protobufjs: 7.4.0 @@ -7092,10 +7092,10 @@ snapshots: '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/sdk-logs@0.54.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/sdk-logs@0.54.1(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.54.0 + '@opentelemetry/api-logs': 0.54.1 '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) From e17536621c3bd9fa8d89e638785077c4151eef4f Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Wed, 6 Nov 2024 02:06:00 -0800 Subject: [PATCH 428/740] feat(route): toutiao (#17468) * feat(route): toutiao * fix(route): poping undefined * Apply suggestions from code review --- lib/routes/toutiao/a-bogus.ts | 540 ++++++++++++++++++++++++++++++++ lib/routes/toutiao/namespace.ts | 7 + lib/routes/toutiao/types.ts | 324 +++++++++++++++++++ lib/routes/toutiao/user.ts | 71 +++++ 4 files changed, 942 insertions(+) create mode 100644 lib/routes/toutiao/a-bogus.ts create mode 100644 lib/routes/toutiao/namespace.ts create mode 100644 lib/routes/toutiao/types.ts create mode 100644 lib/routes/toutiao/user.ts diff --git a/lib/routes/toutiao/a-bogus.ts b/lib/routes/toutiao/a-bogus.ts new file mode 100644 index 000000000000000..1522472f3a1b8c4 --- /dev/null +++ b/lib/routes/toutiao/a-bogus.ts @@ -0,0 +1,540 @@ +/* eslint-disable unicorn/prefer-spread */ +/* eslint-disable unicorn/prefer-math-trunc */ +// @ts-nocheck + +// Credits: +// https://github.com/NearHuiwen/TiktokDouyinCrawler/blob/main/utils/a_bogus.js +// https://github.com/110Art/a-bogus/blob/main/a_bogus.js +// https://github.com/ShilongLee/Crawler/blob/main/lib/js/douyin.js + +// Reference: +// https://github.com/Endy-c/gm-crypt/blob/87bfc13f4b234c538d56798ed2457da16bc006ac/src/sm3.js + +import logger from '@/utils/logger'; + +function rc4_encrypt(plaintext, key) { + const s: number[] = []; + for (let i = 0; i < 256; i++) { + s[i] = i; + } + for (let i = 0, j = 0; i < 256; i++) { + j = (j + s[i] + key.codePointAt(i % key.length)) % 256; + const temp = s[i]; + s[i] = s[j]; + s[j] = temp; + } + + const cipher: string[] = []; + for (let i = 0, j = 0, k = 0; k < plaintext.length; k++) { + i = (i + 1) % 256; + j = (j + s[i]) % 256; + const temp = s[i]; + s[i] = s[j]; + s[j] = temp; + const t = (s[i] + s[j]) % 256; + cipher.push(String.fromCodePoint(s[t] ^ plaintext.codePointAt(k))); + } + return cipher.join(''); +} + +function rotateLeft32(e, r) { + return ((e << (r %= 32)) | (e >>> (32 - r))) >>> 0; +} + +function T(j) { + if (0 <= j && j < 16) { + return 0x79_cc_45_19; + } else if (16 <= j && j < 64) { + return 0x7a_87_9d_8a; + } else { + logger.error('invalid j for constant Tj'); + } +} + +function FF(j, x, y, z) { + if (0 <= j && j < 16) { + return (x ^ y ^ z) >>> 0; + } else if (16 <= j && j < 64) { + return ((x & y) | (x & z) | (y & z)) >>> 0; + } else { + logger.error('invalid j for bool function FF'); + return 0; + } +} + +function GG(j, x, y, z) { + if (0 <= j && j < 16) { + return (x ^ y ^ z) >>> 0; + } else if (16 <= j && j < 64) { + return ((x & y) | (~x & z)) >>> 0; + } else { + logger.error('invalid j for bool function GG'); + return 0; + } +} + +function reset(this: any) { + this.reg[0] = 0x73_80_16_6f; + this.reg[1] = 0x49_14_b2_b9; + this.reg[2] = 0x17_24_42_d7; + this.reg[3] = 0xda_8a_06_00; + this.reg[4] = 0xa9_6f_30_bc; + this.reg[5] = 0x16_31_38_aa; + this.reg[6] = 0xe3_8d_ee_4d; + this.reg[7] = 0xb0_fb_0e_4e; + this.chunk = []; + this.size = 0; +} + +function strToBytes(str) { + const n = encodeURIComponent(str).replaceAll(/%([0-9A-F]{2})/g, (e, r) => String.fromCodePoint('0x' + r)); + const a = Array.from({ length: n.length }); + Array.prototype.forEach.call(n, (e, r) => { + a[r] = e.codePointAt(0); + }); + return a; +} + +function write(this: any, message) { + const a = typeof message === 'string' ? strToBytes(message) : message; + this.size += a.length; + let f = 64 - this.chunk.length; + if (a.length < f) { + this.chunk = this.chunk.concat(a); + } else { + this.chunk = this.chunk.concat(a.slice(0, f)); + while (this.chunk.length >= 64) { + this._compress(this.chunk); + this.chunk = f < a.length ? a.slice(f, Math.min(f + 64, a.length)) : []; + f += 64; + } + } +} + +function sum(this: any, message, encoding) { + if (message) { + this.reset(); + this.write(message); + } + this._fill(); + for (let f = 0; f < this.chunk.length; f += 64) { + this._compress(this.chunk.slice(f, f + 64)); + } + let digest; + if (encoding === 'hex') { + digest = ''; + for (let f = 0; f < 8; f++) { + digest += se(this.reg[f].toString(16), 8, '0'); + } + } else { + digest = Array.from({ length: 32 }); + for (let f = 0; f < 8; f++) { + let c = this.reg[f]; + digest[4 * f + 3] = (255 & c) >>> 0; + c >>>= 8; + digest[4 * f + 2] = (255 & c) >>> 0; + c >>>= 8; + digest[4 * f + 1] = (255 & c) >>> 0; + c >>>= 8; + digest[4 * f] = (255 & c) >>> 0; + } + } + this.reset(); + return digest; +} + +function expand(e) { + const r: number[] = Array.from({ length: 132 }); + for (let t = 0; t < 16; t++) { + r[t] = e[4 * t] << 24; + r[t] |= e[4 * t + 1] << 16; + r[t] |= e[4 * t + 2] << 8; + r[t] |= e[4 * t + 3]; + r[t] >>>= 0; + } + for (let n = 16; n < 68; n++) { + let a = r[n - 16] ^ r[n - 9] ^ rotateLeft32(r[n - 3], 15); + a = a ^ rotateLeft32(a, 15) ^ rotateLeft32(a, 23); + r[n] = (a ^ rotateLeft32(r[n - 13], 7) ^ r[n - 6]) >>> 0; + } + for (let n = 0; n < 64; n++) { + r[n + 68] = (r[n] ^ r[n + 4]) >>> 0; + } + return r; +} + +function _compress(this: any, t) { + if (t < 64) { + logger.error('compress error: not enough data'); + return; + } else { + const f = expand(t); + const i = this.reg.slice(0); + for (let c = 0; c < 64; c++) { + let o = rotateLeft32(i[0], 12) + i[4] + rotateLeft32(T(c), c); + o = (0xff_ff_ff_ff & o) >>> 0; + o = rotateLeft32(o, 7); + + const s = (o ^ rotateLeft32(i[0], 12)) >>> 0; + let u = FF(c, i[0], i[1], i[2]); + u = u + i[3] + s + f[c + 68]; + u = (0xff_ff_ff_ff & u) >>> 0; + + let b = GG(c, i[4], i[5], i[6]); + b = b + i[7] + o + f[c]; + b = (0xff_ff_ff_ff & b) >>> 0; + i[3] = i[2]; + i[2] = rotateLeft32(i[1], 9); + i[1] = i[0]; + i[0] = u; + i[7] = i[6]; + i[6] = rotateLeft32(i[5], 19); + i[5] = i[4]; + i[4] = (b ^ rotateLeft32(b, 9) ^ rotateLeft32(b, 17)) >>> 0; + } + for (let l = 0; l < 8; l++) { + this.reg[l] = (this.reg[l] ^ i[l]) >>> 0; + } + } +} + +function _fill(this: any) { + const a = 8 * this.size; + let f = this.chunk.push(128) % 64; + for (64 - f < 8 && (f -= 64); f < 56; f++) { + this.chunk.push(0); + } + for (let i = 0; i < 4; i++) { + const c = Math.floor(a / 0x1_00_00_00_00); + this.chunk.push((c >>> (8 * (3 - i))) & 0xff); + } + for (let i = 0; i < 4; i++) { + this.chunk.push((a >>> (8 * (3 - i))) & 0xff); + } +} + +function SM3(this: any) { + this.reg = []; + this.chunk = []; + this.size = 0; + this.reset(); +} +SM3.prototype.reset = reset; +SM3.prototype.write = write; +SM3.prototype.sum = sum; +SM3.prototype._compress = _compress; +SM3.prototype._fill = _fill; + +function result_encrypt(long_str: string, num: 's0' | 's1' | 's2' | 's3' | 's4') { + const s_obj = { + s0: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', + s1: 'Dkdpgh4ZKsQB80/Mfvw36XI1R25+WUAlEi7NLboqYTOPuzmFjJnryx9HVGcaStCe=', + s2: 'Dkdpgh4ZKsQB80/Mfvw36XI1R25-WUAlEi7NLboqYTOPuzmFjJnryx9HVGcaStCe=', + s3: 'ckdp1h4ZKsUB80/Mfvw36XIgR25+WQAlEi7NLboqYTOPuzmFjJnryx9HVGDaStCe', + s4: 'Dkdpgh2ZmsQB80/MfvV36XI1R45-WUAlEixNLwoqYTOPuzKFjJnry79HbGcaStCe', + }; + const constant = { + '0': 16_515_072, + '1': 258048, + '2': 4032, + str: s_obj[num], + }; + + let result = ''; + let lound = 0; + let long_int = get_long_int(lound, long_str); + for (let i = 0; i < (long_str.length / 3) * 4; i++) { + if (Math.floor(i / 4) !== lound) { + lound += 1; + long_int = get_long_int(lound, long_str); + } + const key = i % 4; + let temp_int: number; + switch (key) { + case 0: + temp_int = (long_int & constant['0']) >> 18; + result += constant.str.charAt(temp_int); + break; + case 1: + temp_int = (long_int & constant['1']) >> 12; + result += constant.str.charAt(temp_int); + break; + case 2: + temp_int = (long_int & constant['2']) >> 6; + result += constant.str.charAt(temp_int); + break; + case 3: + temp_int = long_int & 63; + result += constant.str.charAt(temp_int); + break; + default: + break; + } + } + return result; +} + +function get_long_int(round, long_str) { + round = round * 3; + return (long_str.codePointAt(round) << 16) | (long_str.codePointAt(round + 1) << 8) | long_str.codePointAt(round + 2); +} + +function gener_random(random, option) { + return [ + (random & 255 & 170) | (option[0] & 85), // 163 + (random & 255 & 85) | (option[0] & 170), // 87 + ((random >> 8) & 255 & 170) | (option[1] & 85), // 37 + ((random >> 8) & 255 & 85) | (option[1] & 170), // 41 + ]; +} + +// //////////////////////////////////////////// +function generate_rc4_bb_str(url_search_params, user_agent, window_env_str, suffix = 'cus', Arguments = [0, 1, 14]) { + const sm3 = new SM3(); + const start_time = Date.now(); + /** + * 进行3次加密处理 + * 1: url_search_params两次sm3之的结果 + * 2: 对后缀两次sm3之的结果 + * 3: 对ua处理之后的结果 + */ + // url_search_params两次sm3之的结果 + const url_search_params_list = sm3.sum(sm3.sum(url_search_params + suffix)); + // 对后缀两次sm3之的结果 + const cus = sm3.sum(sm3.sum(suffix)); + // 对ua处理之后的结果 + const ua = sm3.sum(result_encrypt(rc4_encrypt(user_agent, Reflect.apply(String.fromCharCode, null, [0.003_906_25, 1, 14])), 's3')); + // + const end_time = Date.now(); + // b + const b = { + 8: 3, // 固定 + 10: end_time, // 3次加密结束时间 + 15: { + aid: 6383, + pageId: 6241, + boe: false, + ddrt: 7, + paths: { + include: [{}, {}, {}, {}, {}, {}, {}], + exclude: [], + }, + track: { + mode: 0, + delay: 300, + paths: [], + }, + dump: true, + rpU: '', + }, + 16: start_time, // 3次加密开始时间 + 18: 44, // 固定 + 19: [1, 0, 1, 5], + }; + + // 3次加密开始时间 + b[20] = (b[16] >> 24) & 255; + b[21] = (b[16] >> 16) & 255; + b[22] = (b[16] >> 8) & 255; + b[23] = b[16] & 255; + b[24] = (b[16] / 256 / 256 / 256 / 256) >> 0; + b[25] = (b[16] / 256 / 256 / 256 / 256 / 256) >> 0; + + // 参数Arguments [0, 1, 14, ...] + // let Arguments = [0, 1, 14] + b[26] = (Arguments[0] >> 24) & 255; + b[27] = (Arguments[0] >> 16) & 255; + b[28] = (Arguments[0] >> 8) & 255; + b[29] = Arguments[0] & 255; + + b[30] = (Arguments[1] / 256) & 255; + b[31] = Arguments[1] % 256 & 255; + b[32] = (Arguments[1] >> 24) & 255; + b[33] = (Arguments[1] >> 16) & 255; + + b[34] = (Arguments[2] >> 24) & 255; + b[35] = (Arguments[2] >> 16) & 255; + b[36] = (Arguments[2] >> 8) & 255; + b[37] = Arguments[2] & 255; + + // (url_search_params + "cus") 两次sm3之的结果 + /** let url_search_params_list = [ + 91, 186, 35, 86, 143, 253, 6, 76, + 34, 21, 167, 148, 7, 42, 192, 219, + 188, 20, 182, 85, 213, 74, 213, 147, + 37, 155, 93, 139, 85, 118, 228, 213 + ]*/ + b[38] = url_search_params_list[21]; + b[39] = url_search_params_list[22]; + + // ("cus") 对后缀两次sm3之的结果 + /** + * let cus = [ + 136, 101, 114, 147, 58, 77, 207, 201, + 215, 162, 154, 93, 248, 13, 142, 160, + 105, 73, 215, 241, 83, 58, 51, 43, + 255, 38, 168, 141, 216, 194, 35, 236 + ]*/ + b[40] = cus[21]; + b[41] = cus[22]; + + // 对ua处理之后的结果 + /** + * let ua = [ + 129, 190, 70, 186, 86, 196, 199, 53, + 99, 38, 29, 209, 243, 17, 157, 69, + 147, 104, 53, 23, 114, 126, 66, 228, + 135, 30, 168, 185, 109, 156, 251, 88 + ]*/ + b[42] = ua[23]; + b[43] = ua[24]; + + // 3次加密结束时间 + b[44] = (b[10] >> 24) & 255; + b[45] = (b[10] >> 16) & 255; + b[46] = (b[10] >> 8) & 255; + b[47] = b[10] & 255; + b[48] = b[8]; + b[49] = (b[10] / 256 / 256 / 256 / 256) >> 0; + b[50] = (b[10] / 256 / 256 / 256 / 256 / 256) >> 0; + + // object配置项 + b[51] = b[15].pageId; + b[52] = (b[15].pageId >> 24) & 255; + b[53] = (b[15].pageId >> 16) & 255; + b[54] = (b[15].pageId >> 8) & 255; + b[55] = b[15].pageId & 255; + + b[56] = b[15].aid; + b[57] = b[15].aid & 255; + b[58] = (b[15].aid >> 8) & 255; + b[59] = (b[15].aid >> 16) & 255; + b[60] = (b[15].aid >> 24) & 255; + + // 中间进行了环境检测 + // 代码索引: 2496 索引值: 17 (索引64关键条件) + // '1536|747|1536|834|0|30|0|0|1536|834|1536|864|1525|747|24|24|Win32'.charCodeAt()得到65位数组 + /** + * let window_env_list = [49, 53, 51, 54, 124, 55, 52, 55, 124, 49, 53, 51, 54, 124, 56, 51, 52, 124, 48, 124, 51, + * 48, 124, 48, 124, 48, 124, 49, 53, 51, 54, 124, 56, 51, 52, 124, 49, 53, 51, 54, 124, 56, + * 54, 52, 124, 49, 53, 50, 53, 124, 55, 52, 55, 124, 50, 52, 124, 50, 52, 124, 87, 105, 110, + * 51, 50] + */ + const window_env_list: number[] = []; + for (let index = 0; index < window_env_str.length; index++) { + window_env_list.push(window_env_str.codePointAt(index)); + } + b[64] = window_env_list.length; + b[65] = b[64] & 255; + b[66] = (b[64] >> 8) & 255; + + b[69] = [].length; + b[70] = b[69] & 255; + b[71] = (b[69] >> 8) & 255; + + b[72] = + b[18] ^ + b[20] ^ + b[26] ^ + b[30] ^ + b[38] ^ + b[40] ^ + b[42] ^ + b[21] ^ + b[27] ^ + b[31] ^ + b[35] ^ + b[39] ^ + b[41] ^ + b[43] ^ + b[22] ^ + b[28] ^ + b[32] ^ + b[36] ^ + b[23] ^ + b[29] ^ + b[33] ^ + b[37] ^ + b[44] ^ + b[45] ^ + b[46] ^ + b[47] ^ + b[48] ^ + b[49] ^ + b[50] ^ + b[24] ^ + b[25] ^ + b[52] ^ + b[53] ^ + b[54] ^ + b[55] ^ + b[57] ^ + b[58] ^ + b[59] ^ + b[60] ^ + b[65] ^ + b[66] ^ + b[70] ^ + b[71]; + let bb = [ + b[18], + b[20], + b[52], + b[26], + b[30], + b[34], + b[58], + b[38], + b[40], + b[53], + b[42], + b[21], + b[27], + b[54], + b[55], + b[31], + b[35], + b[57], + b[39], + b[41], + b[43], + b[22], + b[28], + b[32], + b[60], + b[36], + b[23], + b[29], + b[33], + b[37], + b[44], + b[45], + b[59], + b[46], + b[47], + b[48], + b[49], + b[50], + b[24], + b[25], + b[65], + b[66], + b[70], + b[71], + ]; + bb = bb.concat(window_env_list).concat(b[72]); + return rc4_encrypt(String.fromCharCode.apply(null, bb), Reflect.apply(String.fromCharCode, null, [121])); +} + +function generate_random_str() { + let random_str_list: number[] = []; + random_str_list = random_str_list.concat(gener_random(Math.random() * 10000, [3, 45])); + random_str_list = random_str_list.concat(gener_random(Math.random() * 10000, [1, 0])); + random_str_list = random_str_list.concat(gener_random(Math.random() * 10000, [1, 5])); + return String.fromCharCode.apply(null, random_str_list); +} + +export function generate_a_bogus(url_search_params, user_agent) { + const result_str = generate_random_str() + generate_rc4_bb_str(url_search_params, user_agent, '1536|747|1536|834|0|30|0|0|1536|834|1536|864|1525|747|24|24|Win32'); + return result_encrypt(result_str, 's4') + '='; +} diff --git a/lib/routes/toutiao/namespace.ts b/lib/routes/toutiao/namespace.ts new file mode 100644 index 000000000000000..5f89ec4ccd17dd8 --- /dev/null +++ b/lib/routes/toutiao/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '今日头条', + url: 'www.toutiao.com', + lang: 'zh-CN', +}; diff --git a/lib/routes/toutiao/types.ts b/lib/routes/toutiao/types.ts new file mode 100644 index 000000000000000..a422596ac6cae02 --- /dev/null +++ b/lib/routes/toutiao/types.ts @@ -0,0 +1,324 @@ +export interface Feed { + abstract: string; + aggr_type: number; + article_sub_type: number; + article_type: number; + article_url: string; + article_version: number; + ban_comment: boolean; + behot_time: number; + bury_count: number; + bury_style_show: number; + cell_ctrls: CellCtrls; + cell_flag: number; + cell_layout_style: number; + cell_type: number; + comment_count: number; + common_raw_data: string; + /** + * Appears only if cell_type is 32 + */ + content?: string; + content_decoration: string; + control_meta: ControlMeta; + cursor: number; + data_type: number; + digg_count: number; + display_url: string; + forum_extra_data: string; + forward_info: ForwardInfo; + gallary_image_count: number; + group_flags: number; + group_id: string; + group_source: number; + group_type: number; + has_image: boolean; + has_m3u8_video: boolean; + has_mp4_video: boolean; + has_video: boolean; + hot: number; + id: string; + is_original: boolean; + itemCell: ItemCell; + itemCellDebug: null; + item_id: string; + item_id_str: string; + item_version: number; + label_style: number; + level: number; + like_count: number; + log_pb: LogPb; + lynx_server: LynxServer; + natant_level: number; + preload_web: number; + publish_time: number; + /** + * Appears only if cell_type is 32 + */ + rich_content?: string; + read_count: number; + reback_flag: number; + repin_count: number; + repin_time: number; + req_id: string; + share_url: string; + show_more: ShowMore; + source: string; + subject_group_id: number; + tag_id: number; + tip: number; + title: string; + url: string; + /** + * Appears only if cell_type is 32 + */ + user?: UserInfo; + user_bury: number; + user_digg: number; + user_info?: UserInfo; + user_like: number; + user_repin: number; + user_repin_time: number; + video_duration: number; + video_style: number; + image_list: ImageListItem[]; + large_image_list: LargeImageListItem[]; + middle_image: MiddleImage; + video_detail_info: VideoDetailInfo; +} + +interface CellCtrls { + cell_flag: number; + cell_height: number; + cell_layout_style: number; +} + +interface ControlMeta { + modify: Modify; + remove: Remove; + share: Share; +} + +interface Modify { + hide: boolean; + name: string; + permission: boolean; + tips: string; +} + +interface Remove { + hide: boolean; + name: string; + permission: boolean; + tips: string; +} + +interface Share { + hide: boolean; + name: string; + permission: boolean; + tips: string; +} + +interface ForwardInfo { + forward_count: number; +} + +interface ItemCell { + actionCtrl: ActionCtrl; + articleBase: ArticleBase; + articleClassification: ArticleClassification; + cellCtrl: CellCtrl; + extra: Extra; + imageList: ImageList; + itemCounter: ItemCounter; + locationInfo: LocationInfo; + shareInfo: ShareInfo; + tagInfo: TagInfo; + userInteraction: UserInteraction; + videoInfo: VideoInfo; +} + +interface ActionCtrl { + actionBar: ActionBar; + banBury: boolean; + banComment: boolean; + banDigg: boolean; + controlMeta: ActionControlMeta; +} + +interface ActionBar { + actionSettingList: ActionSetting[]; +} + +interface ActionSetting { + actionType: number; + styleSetting: StyleSetting; +} + +interface StyleSetting { + iconKey: string; + layoutDirection: number; + text: string; +} + +interface ActionControlMeta { + modify: ActionModify; + remove: ActionRemove; + share: ActionShare; +} + +interface ActionModify { + permission: boolean; + tips: string; +} + +interface ActionRemove { + permission: boolean; + tips: string; +} + +interface ActionShare { + permission: boolean; + tips: string; +} + +interface ArticleBase { + gidStr: string; + itemStatus: number; +} + +interface ArticleClassification { + aggrType: number; + articleSubType: number; + articleType: number; + bizID: number; + bizTag: number; + groupSource: number; + isForAudioPlaylist: boolean; + isOriginal: boolean; + isSubject: boolean; + level: number; +} + +interface CellCtrl { + buryStyleShow: number; + cellFlag: number; + cellLayoutStyle: number; + cellType: number; + cellUIType: string; + groupFlags: number; +} + +interface Extra { + ping: string; +} + +type ImageList = unknown; + +interface ItemCounter { + commentCount: number; + diggCount: number; + forwardCount: number; + readCount: number; + repinCount: number; + shareCount: number; + showCount: number; + textCount: number; + videoWatchCount: number; + buryCount: number; +} + +interface LocationInfo { + publishLocInfo: string; +} + +interface ShareInfo { + shareURL: string; + shareControl: ShareControl; +} + +interface ShareControl { + isHighQuality: boolean; +} + +type TagInfo = unknown; + +interface UserInteraction { + userDigg: boolean; + userRepin: boolean; +} + +type VideoInfo = unknown; + +interface LogPb { + cell_layout_style: string; + group_id_str: string; + group_source: string; + impr_id: string; + is_following: string; + is_yaowen: string; +} + +type LynxServer = unknown; + +interface ShowMore { + title: string; + url: string; +} + +interface UserInfo { + avatar_url: string; + description: string; + desc: string; + follow: boolean; + name: string; + user_auth_info: string; + user_id: string; + user_verified: boolean; + verified_content: string; +} + +interface ImageListItem { + height: number; + uri: string; + url: string; + url_list: UrlList[]; + width: number; +} + +interface UrlList { + url: string; +} + +interface LargeImageListItem { + height: number; + uri: string; + url: string; + url_list: UrlList[]; + width: number; +} + +interface MiddleImage { + height: number; + uri: string; + url: string; + url_list: UrlList[]; + width: number; +} + +interface VideoDetailInfo { + detail_video_large_image: DetailVideoLargeImage; + direct_play: number; + group_flags: number; + show_pgc_subscribe: number; + video_id: string; +} + +interface DetailVideoLargeImage { + height: number; + uri: string; + url: string; + url_list: UrlList[]; + width: number; +} diff --git a/lib/routes/toutiao/user.ts b/lib/routes/toutiao/user.ts new file mode 100644 index 000000000000000..5a8d50cb9df64e1 --- /dev/null +++ b/lib/routes/toutiao/user.ts @@ -0,0 +1,71 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import randUserAgent from '@/utils/rand-user-agent'; +import { generate_a_bogus } from './a-bogus'; +import { Feed } from './types'; +import RejectError from '@/errors/types/reject'; +import { config } from '@/config'; + +export const route: Route = { + path: '/user/token/:token', + categories: ['new-media'], + example: '/toutiao/user/token/MS4wLjABAAAAEmbqJP2CmC8XXv1BpMvQ3sQHKAxFsq8wHxj8XVIQWja6tMcB-QEbFkzkRNgMl12M', + parameters: { token: '用户 token,可在用户主页 URL 找到' }, + features: { + antiCrawler: true, + }, + radar: [ + { + source: ['www.toutiao.com/c/user/token/:token'], + }, + ], + name: '头条主页', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { + const { token } = ctx.req.param(); + const ua = randUserAgent({ browser: 'chrome', os: 'windows', device: 'desktop' }); + + const feed = (await cache.tryGet(`toutiao:user:${token}`, async () => { + const query = `category=profile_all&token=${token}&max_behot_time=0&entrance_gid&aid=24&app_name=toutiao_web`; + + const data = await ofetch(`https://www.toutiao.com/api/pc/list/feed?${query}&a_bogus=${generate_a_bogus(query, ua)}`, { + headers: { + 'User-Agent': ua, + }, + }); + + return data.data; + },config.cache.routeExpire, + false +)) as Feed[]; + + if (!feed) { + throw new RejectError('无法获取用户信息'); + } + + const items = feed.map((item) => { + const enclosure = item.large_image_list?.pop(); + return { + title: item.title, + description: item.rich_content ?? item.abstract ?? item.content, + link: `https://www.toutiao.com/${item.cell_type === 60 ? 'article' : /* 32 */ 'w'}/${item.id}/`, + pubDate: parseDate(item.publish_time, 'X'), + author: item.user_info?.name ?? item.user?.name ?? item.source, + enclosure_url: enclosure?.url, + enclosure_type: enclosure?.url ? `image/${new URL(enclosure.url).pathname.split('.').pop()}` : undefined, + }; + }); + + return { + title: `${feed[0].user_info?.name ?? feed[0].user?.name ?? feed[0].source}的头条主页 - 今日头条(www.toutiao.com)`, + description: feed[0].user_info?.description ?? feed[0].user?.desc, + link: `https://www.toutiao.com/c/user/token/${token}/`, + image: feed[0].user_info?.avatar_url ?? feed[0].user?.avatar_url, + item: items, + }; +} From f894dfe7fd993e3ee2c54946bc73835f3d2a730d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:07:57 +0000 Subject: [PATCH 429/740] style: auto format --- lib/routes/toutiao/user.ts | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/routes/toutiao/user.ts b/lib/routes/toutiao/user.ts index 5a8d50cb9df64e1..a6418bcd769f2e7 100644 --- a/lib/routes/toutiao/user.ts +++ b/lib/routes/toutiao/user.ts @@ -30,19 +30,22 @@ async function handler(ctx) { const { token } = ctx.req.param(); const ua = randUserAgent({ browser: 'chrome', os: 'windows', device: 'desktop' }); - const feed = (await cache.tryGet(`toutiao:user:${token}`, async () => { - const query = `category=profile_all&token=${token}&max_behot_time=0&entrance_gid&aid=24&app_name=toutiao_web`; + const feed = (await cache.tryGet( + `toutiao:user:${token}`, + async () => { + const query = `category=profile_all&token=${token}&max_behot_time=0&entrance_gid&aid=24&app_name=toutiao_web`; - const data = await ofetch(`https://www.toutiao.com/api/pc/list/feed?${query}&a_bogus=${generate_a_bogus(query, ua)}`, { - headers: { - 'User-Agent': ua, - }, - }); + const data = await ofetch(`https://www.toutiao.com/api/pc/list/feed?${query}&a_bogus=${generate_a_bogus(query, ua)}`, { + headers: { + 'User-Agent': ua, + }, + }); - return data.data; - },config.cache.routeExpire, + return data.data; + }, + config.cache.routeExpire, false -)) as Feed[]; + )) as Feed[]; if (!feed) { throw new RejectError('无法获取用户信息'); From 9542f67191e7e8b76712d96a4b6ec500c048bc0f Mon Sep 17 00:00:00 2001 From: mocusez <mocusz@163.com> Date: Thu, 7 Nov 2024 00:23:54 +1100 Subject: [PATCH 430/740] fix(route/sycl): docs example wrong (#17469) --- lib/routes/sycl/feeds.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/sycl/feeds.ts b/lib/routes/sycl/feeds.ts index d7896ace7c0fa33..6da6f50b4122456 100644 --- a/lib/routes/sycl/feeds.ts +++ b/lib/routes/sycl/feeds.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:feed?', categories: ['programming'], - example: '/sycltech/news', + example: '/sycl/news', parameters: { feed: 'Feed source, defaults to news, references https://feeds.sycl.tech/' }, features: { requireConfig: false, From 2e4b8105ad1d64a5e59467ffb6fd5683cb47d2d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 05:26:17 -0800 Subject: [PATCH 431/740] chore(deps): bump imapflow from 1.0.165 to 1.0.166 (#17470) Bumps [imapflow](https://github.com/postalsys/imapflow) from 1.0.165 to 1.0.166. - [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.165...v1.0.166) --- updated-dependencies: - dependency-name: imapflow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 3423e38f055ef95..5aa479888492b7f 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", "iconv-lite": "0.6.3", - "imapflow": "1.0.165", + "imapflow": "1.0.166", "instagram-private-api": "1.46.1", "ioredis": "5.4.1", "ip-regex": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 95ecd266489c333..561ed95b445a831 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -129,8 +129,8 @@ importers: specifier: 0.6.3 version: 0.6.3 imapflow: - specifier: 1.0.165 - version: 1.0.165 + specifier: 1.0.166 + version: 1.0.166 instagram-private-api: specifier: 1.46.1 version: 1.46.1 @@ -3599,8 +3599,8 @@ packages: engines: {node: '>=6.9.0'} hasBin: true - imapflow@1.0.165: - resolution: {integrity: sha512-Q8PC9UVksizRs1t6CgAT1SuHCZXfHrAc1ehrX98Z0WGD+E72YhgCV+s0UbKf8s3ffWq77743Wjhilps5gk/Rqg==} + imapflow@1.0.166: + resolution: {integrity: sha512-UDgwiJqVIT9TvT0BP4iX4X9moq0QeBgluhVtlEmWOSZjgY7U1NO7biB/Bb97BVEl5tgl+SYb+RK2TsnSZjkaqw==} immediate@3.0.6: resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} @@ -9455,7 +9455,7 @@ snapshots: image-size@0.7.5: {} - imapflow@1.0.165: + imapflow@1.0.166: dependencies: encoding-japanese: 2.2.0 iconv-lite: 0.6.3 From 9f77cb93485281637cbf40408098d8107a2a6bd3 Mon Sep 17 00:00:00 2001 From: cubroe <jockey.kyd@gmail.com> Date: Wed, 6 Nov 2024 23:03:23 +0800 Subject: [PATCH 432/740] feat(route): no longer publish date available (#17475) --- lib/routes/freecomputerbooks/index.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/routes/freecomputerbooks/index.ts b/lib/routes/freecomputerbooks/index.ts index 2b6643a03ea1171..60d3667d6225ca5 100644 --- a/lib/routes/freecomputerbooks/index.ts +++ b/lib/routes/freecomputerbooks/index.ts @@ -8,7 +8,6 @@ import path from 'node:path'; import got from '@/utils/got'; import { art } from '@/utils/render'; -import { parseDate } from '@/utils/parse-date'; const baseURL = 'https://freecomputerbooks.com/'; @@ -89,15 +88,6 @@ function buildPostItem(listItem, categoryTitle, cache) { : categoryTitle, }; - const pubDateText = postInfo.find('span:last').text().replace(/^on /, ''); - if (pubDateText) { - // Pretty much the same situation: Only a "Selected New Books" page has - // explicit publication dates for posts; even on each post's details - // page, there seems to be only the publication date for the book, but - // the post's creation date is still missing. - postItem.pubDate = parseDate(pubDateText); - } - return cache.tryGet(postItem.link, () => insertDescriptionInto(postItem)); } From 9856a2a2fc321dfae22799351a7dbfe6e65b7083 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Thu, 7 Nov 2024 00:14:20 +0800 Subject: [PATCH 433/740] =?UTF-8?q?fix(route):=20=E5=8D=8E=E4=B8=AD?= =?UTF-8?q?=E7=A7=91=E6=8A=80=E5=A4=A7=E5=AD=A6=E7=A0=94=E7=A9=B6=E7=94=9F?= =?UTF-8?q?=E9=99=A2=E6=A0=87=E9=A2=98=E4=B8=8D=E5=AE=8C=E6=95=B4=20(#1747?= =?UTF-8?q?8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/hust/gs.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/routes/hust/gs.ts b/lib/routes/hust/gs.ts index 1f3eb6a77f60ff0..2339b4790ad3afd 100644 --- a/lib/routes/hust/gs.ts +++ b/lib/routes/hust/gs.ts @@ -57,11 +57,12 @@ export const handler = async (ctx) => { ) ); - const image = new URL($('div.logo img').prop('content'), rootUrl).href; + const title = $('meta[name="keywords"]').prop('content')?.replace(/,/g, ' - ') ?? $('title').text(); + const image = new URL($('div.logo img').prop('src'), rootUrl).href; return { - title: $('title').text(), - description: $('META[Name="keywords"]').prop('Content'), + title, + description: title.split(/-/).pop()?.trim(), link: currentUrl, item: items, allowEmpty: true, From 2d1c6cc2e9b2690f2bfbc29f3ac84288b3e98cf4 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Wed, 6 Nov 2024 09:35:20 -0800 Subject: [PATCH 434/740] feat(route): toutiao video (#17479) --- lib/routes/toutiao/templates/video.art | 7 ++ lib/routes/toutiao/types.ts | 133 +++++++++++++++++++++++-- lib/routes/toutiao/user.ts | 79 ++++++++++++--- 3 files changed, 199 insertions(+), 20 deletions(-) create mode 100644 lib/routes/toutiao/templates/video.art diff --git a/lib/routes/toutiao/templates/video.art b/lib/routes/toutiao/templates/video.art new file mode 100644 index 000000000000000..1b007c35c256e71 --- /dev/null +++ b/lib/routes/toutiao/templates/video.art @@ -0,0 +1,7 @@ +<video controls preload="metadata" + {{ if poster }} + poster="{{ poster }}" + {{ /if }} +> + <source src="{{ url }}" type="video/mp4" /> +</video> diff --git a/lib/routes/toutiao/types.ts b/lib/routes/toutiao/types.ts index a422596ac6cae02..e3ede3b0d650a94 100644 --- a/lib/routes/toutiao/types.ts +++ b/lib/routes/toutiao/types.ts @@ -12,13 +12,19 @@ export interface Feed { cell_ctrls: CellCtrls; cell_flag: number; cell_layout_style: number; + /** + * 0: video + * 32: text (w) + * 49: video + * 60: article + */ cell_type: number; comment_count: number; common_raw_data: string; /** * Appears only if cell_type is 32 */ - content?: string; + content: string; content_decoration: string; control_meta: ControlMeta; cursor: number; @@ -55,7 +61,7 @@ export interface Feed { /** * Appears only if cell_type is 32 */ - rich_content?: string; + rich_content: string; read_count: number; reback_flag: number; repin_count: number; @@ -70,15 +76,22 @@ export interface Feed { title: string; url: string; /** - * Appears only if cell_type is 32 + * Appears only if cell_type is 32, 49(0) */ - user?: UserInfo; + user: UserInfoCell32 | UserInfoCell49; user_bury: number; user_digg: number; - user_info?: UserInfo; + /** + * Appears only if cell_type is 0, 60 + */ + user_info: UserInfoCell60; user_like: number; user_repin: number; user_repin_time: number; + /** + * Appears only if cell_type is 0, 49 + */ + video: Video; video_duration: number; video_style: number; image_list: ImageListItem[]; @@ -251,6 +264,62 @@ interface UserInteraction { type VideoInfo = unknown; +interface Video { + bitrate: number; + codec_type: string; + definition: string; + download_addr: DownloadAddr; + duration: number; + encode_user_tag: string; + file_hash: string; + height: number; + origin_cover: OriginCover; + play_addr: PlayAddr; + play_addr_list: PlayAddrListItem[]; + ratio: string; + size: number; + url_expire: number; + video_id: string; + volume: Volume; + vtype: string; + width: number; +} + +interface DownloadAddr { + uri: string; + url_list: string[]; +} + +interface OriginCover { + uri: string; + url_list: string[]; +} + +interface PlayAddr { + uri: string; + url_list: string[]; +} + +interface PlayAddrListItem { + bitrate: number; + codec_type: string; + definition: string; + encode_user_tag: string; + file_hash: string; + play_url_list: string[]; + quality: string; + size: number; + url_expire: number; + video_quality: number; + volume: Volume; + vtype: string; +} + +interface Volume { + Loudness: number; + Peak: number; +} + interface LogPb { cell_layout_style: string; group_id_str: string; @@ -267,10 +336,60 @@ interface ShowMore { url: string; } -interface UserInfo { +interface UserInfoCell32 { avatar_url: string; - description: string; desc: string; + id: number; + is_blocked: number; + is_blocking: number; + is_followed: number; + is_following: number; + is_friend: number; + live_info_type: number; + medals: unknown; + name: string; + remark_name: string; + schema: string; + screen_name: string; + theme_day: string; + user_auth_info: string; + user_decoration: string; + user_id: string; + user_verified: number; + verified_content: string; +} + +interface UserInfoCell49 { + info: { + avatar_uri: string; + avatar_url: string; + ban_status: boolean; + desc: string; + media_id: string; + name: string; + origin_profile_url: boolean; + origin_user_id: string; + schema: string; + user_auth_info: string; + user_id: string; + user_verified: number; + verified_content: string; + }; + relation: { + is_followed: number; + is_following: number; + is_friend: number; + }; + relation_count: { + followers_count: number; + following_count: number; + }; + user_id: string; +} + +interface UserInfoCell60 { + avatar_url: string; + description: string; follow: boolean; name: string; user_auth_info: string; diff --git a/lib/routes/toutiao/user.ts b/lib/routes/toutiao/user.ts index a6418bcd769f2e7..21c66876eec124a 100644 --- a/lib/routes/toutiao/user.ts +++ b/lib/routes/toutiao/user.ts @@ -7,6 +7,11 @@ import { generate_a_bogus } from './a-bogus'; 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', @@ -52,23 +57,71 @@ async function handler(ctx) { } const items = feed.map((item) => { - const enclosure = item.large_image_list?.pop(); - return { - title: item.title, - description: item.rich_content ?? item.abstract ?? item.content, - link: `https://www.toutiao.com/${item.cell_type === 60 ? 'article' : /* 32 */ 'w'}/${item.id}/`, - pubDate: parseDate(item.publish_time, 'X'), - author: item.user_info?.name ?? item.user?.name ?? item.source, - enclosure_url: enclosure?.url, - enclosure_type: enclosure?.url ? `image/${new URL(enclosure.url).pathname.split('.').pop()}` : undefined, - }; + switch (item.cell_type) { + case 0: + case 49: { + 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'), { + 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], + }), + link: `https://www.toutiao.com/video/${item.id}/`, + pubDate: parseDate(item.publish_time, 'X'), + author: item.user?.info.name ?? item.source, + enclosure_url: video?.play_url_list[0], + enclosure_type: video?.play_url_list[0] ? 'video/mp4' : undefined, + user: { + name: item.user?.info.name, + avatar: item.user?.info.avatar_url, + description: item.user?.info.desc, + }, + }; + } + + // text w/o title + case 32: { + const enclosure = item.large_image_list?.pop(); + return { + title: item.content?.split('\n')[0], + description: item.rich_content, + link: `https://www.toutiao.com/w/${item.id}/`, + pubDate: parseDate(item.publish_time, 'X'), + author: item.user?.name, + enclosure_url: enclosure?.url, + enclosure_type: enclosure?.url ? `image/${new URL(enclosure.url).pathname.split('.').pop()}` : undefined, + user: { + name: item.user?.name, + avatar: item.user?.avatar_url, + description: item.user?.desc, + }, + }; + } + + // text w/ title + case 60: + default: + return { + title: item.title, + description: item.abstract, + link: `https://www.toutiao.com/article/${item.id}/`, + pubDate: parseDate(item.publish_time, 'X'), + author: item.user_info?.name, + user: { + name: item.user_info?.name, + avatar: item.user_info?.avatar_url, + description: item.user_info?.description, + }, + }; + } }); return { - title: `${feed[0].user_info?.name ?? feed[0].user?.name ?? feed[0].source}的头条主页 - 今日头条(www.toutiao.com)`, - description: feed[0].user_info?.description ?? feed[0].user?.desc, + title: `${items[0].user.name}的头条主页 - 今日头条(www.toutiao.com)`, + description: items[0].user.description, link: `https://www.toutiao.com/c/user/token/${token}/`, - image: feed[0].user_info?.avatar_url ?? feed[0].user?.avatar_url, + image: items[0].user.avatar, item: items, }; } From 40bab08529ffc1430c8b84cbf12cf580e8df5cf4 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Thu, 7 Nov 2024 01:55:12 +0800 Subject: [PATCH 435/740] feat: better error message display (#17477) --- lib/middleware/access-control.ts | 6 +++--- lib/views/error.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/middleware/access-control.ts b/lib/middleware/access-control.ts index dade5f26608cace..41123b1f84527a6 100644 --- a/lib/middleware/access-control.ts +++ b/lib/middleware/access-control.ts @@ -3,8 +3,8 @@ import { config } from '@/config'; import md5 from '@/utils/md5'; import RejectError from '@/errors/types/reject'; -const reject = () => { - throw new RejectError('Authentication failed. Access denied.'); +const reject = (requestPath) => { + throw new RejectError(`Authentication failed. Access denied.\n${requestPath}`); }; const middleware: MiddlewareHandler = async (ctx, next) => { @@ -16,7 +16,7 @@ const middleware: MiddlewareHandler = async (ctx, next) => { await next(); } else { if (config.accessKey && !(config.accessKey === accessKey || accessCode === md5(requestPath + config.accessKey))) { - return reject(); + return reject(requestPath); } await next(); } diff --git a/lib/views/error.tsx b/lib/views/error.tsx index 5277358be57611e..f24e9b27d8446d0 100644 --- a/lib/views/error.tsx +++ b/lib/views/error.tsx @@ -26,7 +26,7 @@ const Index: FC<{ <p className="message"> Error Message: <br /> - <code className="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details">{message}</code> + <code className="mt-2 block max-h-28 overflow-auto bg-zinc-100 align-bottom w-fit details whitespace-pre-line">{message}</code> </p> <p className="message"> Route: <code className="ml-2 bg-zinc-100">{errorRoute}</code> From 4772604709e4d400dd5f885fe4c42af36d82895d Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 7 Nov 2024 04:31:09 +0800 Subject: [PATCH 436/740] chore(gha): update node.js versioning --- .github/workflows/npm-publish.yml | 3 +-- .github/workflows/test.yml | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index c66e85e68326beb..bd6666ae3af8f82 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -24,8 +24,7 @@ jobs: - uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: - # pinned to 18 until https://github.com/compulim/version-from-git/issues/16 is fixed - node-version: 18 + node-version: lts/* cache: 'pnpm' registry-url: 'https://registry.npmjs.org' - name: Install dependencies (pnpm) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc8fbb8cb131ab0..183040e6330988d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [ 20, 22 ] + node-version: [ latest, lts/*, lts/-1 ] name: Vitest on Node ${{ matrix.node-version }} steps: - uses: actions/checkout@v4 @@ -58,7 +58,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [ 20, 22 ] + node-version: [ latest, lts/*, lts/-1 ] chromium: - name: bundled Chromium dependency: '' @@ -115,7 +115,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [ 20, 22 ] + node-version: [ latest, lts/*, lts/-1 ] name: Build radar and maintainer on Node ${{ matrix.node-version }} steps: - uses: actions/checkout@v4 From 0ccfd86a74ac56e9014f730e42c969ea51b539f5 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 7 Nov 2024 04:41:15 +0800 Subject: [PATCH 437/740] chore(gha): use job container ID as artifact name --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 183040e6330988d..45e92a1a196f0c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -115,7 +115,7 @@ jobs: strategy: fail-fast: false matrix: - node-version: [ latest, lts/*, lts/-1 ] + node-version: [ 23, 22, 20 ] name: Build radar and maintainer on Node ${{ matrix.node-version }} steps: - uses: actions/checkout@v4 From 5f208f0ac547c11dcd0b28b8711404950d3906e8 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 7 Nov 2024 14:46:34 +0700 Subject: [PATCH 438/740] fix(route/solidot): change solidot language --- lib/routes/solidot/namespace.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/solidot/namespace.ts b/lib/routes/solidot/namespace.ts index 4f91f330f7bd993..1fd7f60b59be1e4 100644 --- a/lib/routes/solidot/namespace.ts +++ b/lib/routes/solidot/namespace.ts @@ -3,5 +3,5 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Solidot', url: 'www.solidot.org', - lang: 'en', + lang: 'zh-CN', }; From d0fbbeb31177579e9de2a8f6c9bd079023a6fb22 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 09:09:25 +0000 Subject: [PATCH 439/740] chore(deps): bump imapflow from 1.0.166 to 1.0.168 (#17490) Bumps [imapflow](https://github.com/postalsys/imapflow) from 1.0.166 to 1.0.168. - [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.166...v1.0.168) --- updated-dependencies: - dependency-name: imapflow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 5aa479888492b7f..d9d17ec99c6f122 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", "iconv-lite": "0.6.3", - "imapflow": "1.0.166", + "imapflow": "1.0.168", "instagram-private-api": "1.46.1", "ioredis": "5.4.1", "ip-regex": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 561ed95b445a831..0c8026b587c34c1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -129,8 +129,8 @@ importers: specifier: 0.6.3 version: 0.6.3 imapflow: - specifier: 1.0.166 - version: 1.0.166 + specifier: 1.0.168 + version: 1.0.168 instagram-private-api: specifier: 1.46.1 version: 1.46.1 @@ -3599,8 +3599,8 @@ packages: engines: {node: '>=6.9.0'} hasBin: true - imapflow@1.0.166: - resolution: {integrity: sha512-UDgwiJqVIT9TvT0BP4iX4X9moq0QeBgluhVtlEmWOSZjgY7U1NO7biB/Bb97BVEl5tgl+SYb+RK2TsnSZjkaqw==} + imapflow@1.0.168: + resolution: {integrity: sha512-vPK06gESqQHh5P8qo2r1nth7v3nDvxvCd1qUATRtLoLWDvUvdHNYSkSoXn7lctXWssjRx8lMJg6e+9Dj2t/JTw==} immediate@3.0.6: resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} @@ -9455,7 +9455,7 @@ snapshots: image-size@0.7.5: {} - imapflow@1.0.166: + imapflow@1.0.168: dependencies: encoding-japanese: 2.2.0 iconv-lite: 0.6.3 From 741aebbbeefe3add6a09eabb21fd52b20d9ff6f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 02:00:27 -0800 Subject: [PATCH 440/740] chore(deps-dev): bump eslint-plugin-n from 17.12.0 to 17.13.0 (#17489) Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 17.12.0 to 17.13.0. - [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases) - [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/v17.12.0...v17.13.0) --- updated-dependencies: - dependency-name: eslint-plugin-n dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 d9d17ec99c6f122..b6a181bc846ab6e 100644 --- a/package.json +++ b/package.json @@ -174,7 +174,7 @@ "eslint": "9.14.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", - "eslint-plugin-n": "17.12.0", + "eslint-plugin-n": "17.13.0", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-unicorn": "56.0.0", "eslint-plugin-yml": "1.15.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0c8026b587c34c1..d207fb3722e3d4f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,8 +379,8 @@ importers: specifier: 8.1.0 version: 8.1.0(eslint@9.14.0) eslint-plugin-n: - specifier: 17.12.0 - version: 17.12.0(eslint@9.14.0) + specifier: 17.13.0 + version: 17.13.0(eslint@9.14.0) eslint-plugin-prettier: specifier: 5.2.1 version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3) @@ -2991,8 +2991,8 @@ packages: peerDependencies: eslint: '>=8' - eslint-plugin-n@17.12.0: - resolution: {integrity: sha512-zNAtz/erDn0v78bIY3MASSQlyaarV4IOTvP5ldHsqblRFrXriikB6ghkDTkHjUad+nMRrIbOy9euod2azjRfBg==} + eslint-plugin-n@17.13.0: + resolution: {integrity: sha512-7xEJgZPKe2FNtyWA1aWtHzG0Etnd8jzA2NjurITPs7yhNkxFjaruJFHE3n0ac/U5ataZ24rlbVoSAXfN7770XA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' @@ -8678,7 +8678,7 @@ snapshots: eslint: 9.14.0 eslint-compat-utils: 0.5.1(eslint@9.14.0) - eslint-plugin-n@17.12.0(eslint@9.14.0): + eslint-plugin-n@17.13.0(eslint@9.14.0): dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) enhanced-resolve: 5.17.1 From 8ea3ee37609ff93f60c407ccd10b7a1441a09205 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 7 Nov 2024 02:01:19 -0800 Subject: [PATCH 441/740] chore(deps): bump @hono/zod-openapi from 0.16.4 to 0.17.0 (#17488) Bumps [@hono/zod-openapi](https://github.com/honojs/middleware) from 0.16.4 to 0.17.0. - [Release notes](https://github.com/honojs/middleware/releases) - [Commits](https://github.com/honojs/middleware/compare/@hono/zod-openapi@0.16.4...@hono/zod-openapi@0.17.0) --- updated-dependencies: - dependency-name: "@hono/zod-openapi" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 b6a181bc846ab6e..f41c1fb012a3b79 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@bbob/html": "4.1.1", "@bbob/preset-html5": "4.1.1", "@hono/node-server": "1.13.5", - "@hono/zod-openapi": "0.16.4", + "@hono/zod-openapi": "0.17.0", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.54.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d207fb3722e3d4f..99078203176a702 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,8 +21,8 @@ importers: specifier: 1.13.5 version: 1.13.5(hono@4.6.9) '@hono/zod-openapi': - specifier: 0.16.4 - version: 0.16.4(hono@4.6.9)(zod@3.23.8) + specifier: 0.17.0 + version: 0.17.0(hono@4.6.9)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -1354,8 +1354,8 @@ packages: peerDependencies: hono: ^4 - '@hono/zod-openapi@0.16.4': - resolution: {integrity: sha512-mnF6GthBaKex0D5PsY/4lYNtkaGJNE38bjeUI//EUqq7Ee4TNm2su35IUiFH4HcmJp5fWYMLyOJOpjnkClzEGw==} + '@hono/zod-openapi@0.17.0': + resolution: {integrity: sha512-Ed6U/6cbCOBQYl0N3E94Q9UKAT5eg+x1RtShGU9OERH9ZM/SYMSLk2Biu8Eba2myu7MuzDsne9rVLrUpno1GnA==} engines: {node: '>=16.0.0'} peerDependencies: hono: '>=4.3.6' @@ -6875,7 +6875,7 @@ snapshots: dependencies: hono: 4.6.9 - '@hono/zod-openapi@0.16.4(hono@4.6.9)(zod@3.23.8)': + '@hono/zod-openapi@0.17.0(hono@4.6.9)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) '@hono/zod-validator': 0.3.0(hono@4.6.9)(zod@3.23.8) From c8f182dc4c5278f0e272a669cef4ad4f26f7db9d Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Thu, 7 Nov 2024 23:23:21 +0800 Subject: [PATCH 442/740] fix(route/caixin): filter out articles that does not have ID (#17495) --- lib/routes/caixin/utils-fulltext.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/routes/caixin/utils-fulltext.ts b/lib/routes/caixin/utils-fulltext.ts index dd41e12a36eece5..1a8289049dda181 100644 --- a/lib/routes/caixin/utils-fulltext.ts +++ b/lib/routes/caixin/utils-fulltext.ts @@ -12,6 +12,10 @@ export async function getFulltext(url: string) { if (!config.caixin.cookie) { return; } + if (!/(\d+)\.html/.test(url)) { + return; + } + const articleID = url.match(/(\d+)\.html/)[1]; const nonce = crypto.randomUUID().replaceAll('-', '').toUpperCase(); @@ -20,7 +24,6 @@ export async function getFulltext(url: string) { .find((e) => e.includes('SA_USER_UID')) ?.split('=')[1]; // - const articleID = url.match(/(\d+)\.html/)[1]; const rawString = `id=${articleID}&uid=${userID}&${nonce}=nonce`; const sig = new KJUR.crypto.Signature({ alg: 'SHA256withRSA' }); From a4e1f031b27ca7c47e0f9d59f187516f2c763134 Mon Sep 17 00:00:00 2001 From: moppman <moppman@users.noreply.github.com> Date: Thu, 7 Nov 2024 17:22:04 +0100 Subject: [PATCH 443/740] fix: Update metacritic API root URL (#17494) --- lib/routes/metacritic/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/metacritic/index.ts b/lib/routes/metacritic/index.ts index 204e6409a2b4f4f..ba17895ac69869a 100644 --- a/lib/routes/metacritic/index.ts +++ b/lib/routes/metacritic/index.ts @@ -22,7 +22,7 @@ async function handler(ctx) { const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 50; const rootUrl = 'https://www.metacritic.com'; - const rootApiUrl = 'https://internal-prod.apigee.fandom.net'; + const rootApiUrl = 'https://backend.metacritic.com'; const apiUrl = new URL('v1/xapi/finder/metacritic/web', rootApiUrl).href; const currentUrlObject = new URL(`/browse/${type}/all/all/all-time/${sort}/${filter ? `?${filter}` : ''}`, rootUrl); From 3699679206d94d58ca7d74423f4039c1a72617cf Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Fri, 8 Nov 2024 03:37:46 +0800 Subject: [PATCH 444/740] chore(gha): fix upload coverage condition --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 45e92a1a196f0c4..feb06fb989f3f31 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -47,7 +47,7 @@ jobs: env: REDIS_URL: redis://localhost:${{ job.services.redis.ports[6379] }}/ - name: Upload coverage to Codecov - if: ${{ matrix.node-version == '20' }} + if: ${{ matrix.node-version == 'lts/*' }} uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos as documented, but seems broken From 4e404a73284ac9f6690479840d0fa04abac2a640 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:08:05 -0800 Subject: [PATCH 445/740] chore: disable remote debugger by default (#17498) --- lib/config.ts | 12 +++++++++++- lib/utils/ofetch.ts | 2 +- lib/utils/request-rewriter/fetch.test.ts | 1 + lib/utils/request-rewriter/fetch.ts | 4 ++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/lib/config.ts b/lib/config.ts index 1784e1f97f2fc89..86637e3dc384734 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -5,12 +5,14 @@ import { ofetch } from 'ofetch'; let envs = process.env; export type Config = { + // app config disallowRobot: boolean; enableCluster?: string; isPackage: boolean; nodeName?: string; puppeteerWSEndpoint?: string; chromiumExecutablePath?: string; + // network connect: { port: number; }; @@ -20,6 +22,7 @@ export type Config = { ua: string; trueUA: string; allowOrigin?: string; + // cache cache: { type: string; requestTimeout: number; @@ -32,6 +35,7 @@ export type Config = { redis: { url: string; }; + // proxy proxyUri?: string; proxy: { protocol?: string; @@ -43,7 +47,9 @@ export type Config = { }; pacUri?: string; pacScript?: string; + // access control accessKey?: string; + // logging debugInfo: string; loggerLevel: string; noLogfiles?: boolean; @@ -56,6 +62,8 @@ export type Config = { dsn?: string; routeTimeout: number; }; + enableRemoteDebugging?: boolean; + // feed config hotlink: { template?: string; includePaths?: string[]; @@ -78,6 +86,8 @@ export type Config = { promptTitle: string; promptDescription: string; }; + + // Route-specific Configurations bilibili: { cookies: Record<string, string | undefined>; dmImgList?: string; @@ -426,7 +436,6 @@ const calculateValue = () => { requestTimeout: toInt(envs.REQUEST_TIMEOUT, 30000), // Milliseconds to wait for the server to end the response before aborting the request ua: envs.UA ?? (toBoolean(envs.NO_RANDOM_UA, false) ? TRUE_UA : randUserAgent({ browser: 'chrome', os: 'mac os', device: 'desktop' })), trueUA: TRUE_UA, - // cors request allowOrigin: envs.ALLOW_ORIGIN, // cache cache: { @@ -470,6 +479,7 @@ const calculateValue = () => { dsn: envs.SENTRY, routeTimeout: toInt(envs.SENTRY_ROUTE_TIMEOUT, 30000), }, + enableRemoteDebugging: toBoolean(envs.ENABLE_REMOTE_DEBUGGING, false), // feed config hotlink: { template: envs.HOTLINK_TEMPLATE, diff --git a/lib/utils/ofetch.ts b/lib/utils/ofetch.ts index 2a66a6f8cddca64..bb3443183698626 100644 --- a/lib/utils/ofetch.ts +++ b/lib/utils/ofetch.ts @@ -3,7 +3,7 @@ import { config } from '@/config'; import logger from '@/utils/logger'; import { register } from 'node-network-devtools'; -process.env.NODE_ENV === 'dev' && register(); +config.enableRemoteDebugging && process.env.NODE_ENV === 'dev' && register(); const rofetch = createFetch().create({ retryStatusCodes: [400, 408, 409, 425, 429, 500, 502, 503, 504], diff --git a/lib/utils/request-rewriter/fetch.test.ts b/lib/utils/request-rewriter/fetch.test.ts index ccb4e448c0d026d..e8de9773bc13320 100644 --- a/lib/utils/request-rewriter/fetch.test.ts +++ b/lib/utils/request-rewriter/fetch.test.ts @@ -25,6 +25,7 @@ describe('useCustomHeader', () => { beforeEach(() => { originalEnv = process.env.NODE_ENV || Env.test; + process.env.ENABLE_REMOTE_DEBUGGING = 'true'; }); afterEach(() => { diff --git a/lib/utils/request-rewriter/fetch.ts b/lib/utils/request-rewriter/fetch.ts index 9985701100d0d28..a04d6a0607a7ebe 100644 --- a/lib/utils/request-rewriter/fetch.ts +++ b/lib/utils/request-rewriter/fetch.ts @@ -12,7 +12,7 @@ const limiter = new RateLimiterMemory({ }); const limiterQueue = new RateLimiterQueue(limiter, { - maxQueueSize: 5000, + maxQueueSize: 4800, }); export const useCustomHeader = (headers: Headers) => { @@ -57,7 +57,7 @@ const wrappedFetch: typeof undici.fetch = async (input: RequestInfo, init?: Requ request.headers.delete('x-prefer-proxy'); } - useCustomHeader(request.headers); + config.enableRemoteDebugging && useCustomHeader(request.headers); // proxy if (!init?.dispatcher && proxy.dispatcher && (proxy.proxyObj.strategy !== 'on_retry' || isRetry)) { From 2e7d9ffa05d33ae40264732c234d55444e5d3649 Mon Sep 17 00:00:00 2001 From: gudezhi <gudezhi@users.noreply.github.com> Date: Fri, 8 Nov 2024 12:07:52 +0800 Subject: [PATCH 446/740] =?UTF-8?q?feat(route):=20add=20LastOrigin?= =?UTF-8?q?=E6=97=A5=E6=9C=AC=E5=AE=98=E7=BD=91=E5=85=AC=E5=91=8A=20(#1748?= =?UTF-8?q?3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ```routes /last-origin/news.html ``` - [x] New Route / 新的路由 - [x] Follows [Script Standard](https://docs.rsshub.app/joinus/advanced/script-standard) / 跟随 [路由规范](https://docs.rsshub.app/zh/joinus/advanced/script-standard) - [ ] Documentation / 文档说明 - [x] Full text / 全文获取 - [x] Use cache / 使用缓存 - [ ] Anti-bot or rate limit / 反爬/频率限制 - [ ] If yes, do your code reflect this sign? / 如果有, 是否有对应的措施? - [x] [Date and time](https://docs.rsshub.app/joinus/advanced/pub-date) / [日期和时间](https://docs.rsshub.app/zh/joinus/advanced/pub-date) - [x] Parsed / 可以解析 - [x] Correct time zone / 时区正确 - [ ] New package added / 添加了新的包 - [ ] `Puppeteer` * Update lib/routes/last-origin/namespace.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/last-origin/news.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/last-origin/news.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/last-origin/news.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/last-origin/news.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/last-origin/news.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> --------- --- lib/routes/last-origin/namespace.ts | 7 ++++ lib/routes/last-origin/news.ts | 65 +++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 lib/routes/last-origin/namespace.ts create mode 100644 lib/routes/last-origin/news.ts diff --git a/lib/routes/last-origin/namespace.ts b/lib/routes/last-origin/namespace.ts new file mode 100644 index 000000000000000..d977feadc0689cb --- /dev/null +++ b/lib/routes/last-origin/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'LastOrigin', + url: 'www.last-origin.com', + lang: 'ja', +}; diff --git a/lib/routes/last-origin/news.ts b/lib/routes/last-origin/news.ts new file mode 100644 index 000000000000000..6dacb38c94d0b10 --- /dev/null +++ b/lib/routes/last-origin/news.ts @@ -0,0 +1,65 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +export const route: Route = { + path: '/news', + name: 'News', + url: 'www.last-origin.com', + maintainers: ['gudezhi'], + example: '/last-origin/news', + parameters: {}, + categories: ['game'], + features: { + supportRadar: true, + }, + radar: [ + { + source: ['www.last-origin.com/news.html', 'www.last-origin.com'], + target: '/news', + }, + ], + handler, + description: '', +}; + +async function handler() { + const baseUrl = 'https://www.last-origin.com/news.html'; + const response = await ofetch(baseUrl); + const $ = load(response); + + const list = $('.contents .news_wrap') + .toArray() + .map((item) => { + const title = $(item).find('.news_title').text().trim(); + const link = new URL($(item).find('a').attr('href')!, baseUrl).href; + const date = $(item).find('time').text().trim(); + const pubDate = timezone(parseDate(date), +9); + return { + title, + link, + pubDate, + description: '', + }; + }); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const response = await ofetch(item.link); + const $ = load(response); + item.description = $('.news_contents_editor').html() ?? ''; + return item; + }) + ) + ); + + return { + title: 'LastOrigin官网公告', + link: baseUrl, + item: items, + }; +} From 886624a9d3fff8ea895086f7203df80b36a6a15c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:20:12 -0800 Subject: [PATCH 447/740] chore(deps-dev): bump eslint-plugin-n from 17.13.0 to 17.13.1 (#17506) Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 17.13.0 to 17.13.1. - [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases) - [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/v17.13.0...v17.13.1) --- updated-dependencies: - dependency-name: eslint-plugin-n dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 f41c1fb012a3b79..6919ed50ea710a2 100644 --- a/package.json +++ b/package.json @@ -174,7 +174,7 @@ "eslint": "9.14.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", - "eslint-plugin-n": "17.13.0", + "eslint-plugin-n": "17.13.1", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-unicorn": "56.0.0", "eslint-plugin-yml": "1.15.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 99078203176a702..fbfe112dc8ae8ca 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,8 +379,8 @@ importers: specifier: 8.1.0 version: 8.1.0(eslint@9.14.0) eslint-plugin-n: - specifier: 17.13.0 - version: 17.13.0(eslint@9.14.0) + specifier: 17.13.1 + version: 17.13.1(eslint@9.14.0) eslint-plugin-prettier: specifier: 5.2.1 version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3) @@ -2991,8 +2991,8 @@ packages: peerDependencies: eslint: '>=8' - eslint-plugin-n@17.13.0: - resolution: {integrity: sha512-7xEJgZPKe2FNtyWA1aWtHzG0Etnd8jzA2NjurITPs7yhNkxFjaruJFHE3n0ac/U5ataZ24rlbVoSAXfN7770XA==} + eslint-plugin-n@17.13.1: + resolution: {integrity: sha512-97qzhk1z3DdSJNCqT45EslwCu5+LB9GDadSyBItgKUfGsXAmN/aa7LRQ0ZxHffUxUzvgbTPJL27/pE9ZQWHy7A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' @@ -8678,7 +8678,7 @@ snapshots: eslint: 9.14.0 eslint-compat-utils: 0.5.1(eslint@9.14.0) - eslint-plugin-n@17.13.0(eslint@9.14.0): + eslint-plugin-n@17.13.1(eslint@9.14.0): dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) enhanced-resolve: 5.17.1 From 4bc5e37fd115e8d6ddaff907d9270cfb93caf221 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:20:32 -0800 Subject: [PATCH 448/740] chore(deps): bump tldts from 6.1.58 to 6.1.59 (#17508) Bumps [tldts](https://github.com/remusao/tldts) from 6.1.58 to 6.1.59. - [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.58...v6.1.59) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 6919ed50ea710a2..43da2280de8af02 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "telegram": "2.26.6", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.58", + "tldts": "6.1.59", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fbfe112dc8ae8ca..e1a97a35cdb9aac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -234,8 +234,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.58 - version: 6.1.58 + specifier: 6.1.59 + version: 6.1.59 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5355,11 +5355,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.58: - resolution: {integrity: sha512-dR936xmhBm7AeqHIhCWwK765gZ7dFyL+IqLSFAjJbFlUXGMLCb8i2PzlzaOuWBuplBTaBYseSb565nk/ZEM0Bg==} + tldts-core@6.1.59: + resolution: {integrity: sha512-EiYgNf275AQyVORl8HQYYe7rTVnmLb4hkWK7wAk/12Ksy5EiHpmUmTICa4GojookBPC8qkLMBKKwCmzNA47ZPQ==} - tldts@6.1.58: - resolution: {integrity: sha512-MQJrJhjHOYGYb8DobR6Y4AdDbd4TYkyQ+KBDVc5ODzs1cbrvPpfN1IemYi9jfipJ/vR1YWvrDli0hg1y19VRoA==} + tldts@6.1.59: + resolution: {integrity: sha512-472ilPxsRuqBBpn+KuRBHJvZhk6tTo4yTVsmODrLBNLwRYJPkDfMEHivgNwp5iEl+cbrZzzRtLKRxZs7+QKkRg==} hasBin: true tmp@0.0.33: @@ -11391,11 +11391,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.58: {} + tldts-core@6.1.59: {} - tldts@6.1.58: + tldts@6.1.59: dependencies: - tldts-core: 6.1.58 + tldts-core: 6.1.59 tmp@0.0.33: dependencies: @@ -11431,7 +11431,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.58 + tldts: 6.1.59 tr46@0.0.3: {} From ddf50d4f320848e5e081e44c32193f99bf3b38b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:30:50 -0800 Subject: [PATCH 449/740] chore(deps-dev): bump discord-api-types from 0.37.103 to 0.37.104 (#17510) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.103 to 0.37.104. - [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.103...0.37.104) --- updated-dependencies: - dependency-name: discord-api-types dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 43da2280de8af02..87a7ac155723cf0 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "@typescript-eslint/parser": "8.13.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", - "discord-api-types": "0.37.103", + "discord-api-types": "0.37.104", "eslint": "9.14.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e1a97a35cdb9aac..2ad040fd32436cc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -367,8 +367,8 @@ importers: specifier: 2.0.5 version: 2.0.5(vitest@2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: - specifier: 0.37.103 - version: 0.37.103 + specifier: 0.37.104 + version: 0.37.104 eslint: specifier: 9.14.0 version: 9.14.0 @@ -2773,8 +2773,8 @@ packages: resolution: {integrity: sha512-d9paCbverdqmuwR+B40phSqiHhgPKiP8dpsMz5WT9U6ug2VVQ3tqXNCedpa6iGHg6mgv9lHaoq5DJUu2IXMjsQ==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.103: - resolution: {integrity: sha512-r+qitxXKe2l6KFw5odPdZSSqdEou+7eNC7BfbZ7mny5Me/K06wCTeKUMVeH/YsI9+4QQudskeQ307kr/7ppQ1A==} + discord-api-types@0.37.104: + resolution: {integrity: sha512-kIX9RXGekag1Yd/R/douqBTRyt5GY5mCoxntKLuyqfYpKQ1fl8XpHNFIMtnoDSD343TJWsah49XylrsNFfTu0Q==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -8407,7 +8407,7 @@ snapshots: directory-import@3.3.1: {} - discord-api-types@0.37.103: {} + discord-api-types@0.37.104: {} doctrine@3.0.0: dependencies: From e6d01108cc4f548e9d884139335c505771cae9fa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:31:08 -0800 Subject: [PATCH 450/740] chore(deps): bump @scalar/hono-api-reference from 0.5.158 to 0.5.159 (#17507) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.158 to 0.5.159. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 87a7ac155723cf0..cc61c5c07d39453 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.23", - "@scalar/hono-api-reference": "0.5.158", + "@scalar/hono-api-reference": "0.5.159", "@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 2ad040fd32436cc..bbb2f8fc3c9b6da 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,8 +54,8 @@ importers: specifier: 0.0.23 version: 0.0.23 '@scalar/hono-api-reference': - specifier: 0.5.158 - version: 0.5.158(hono@4.6.9) + specifier: 0.5.159 + version: 0.5.159(hono@4.6.9) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1746,18 +1746,18 @@ packages: '@rss3/sdk@0.0.23': resolution: {integrity: sha512-1cF1AqLU0k6dMwqQ5Fch3rOAbh4UXJ4UZLtOwzp/RWyGoCvu3lUOUIdJF41omunuH/JJSP2z6rJTPj4S6a60eg==} - '@scalar/hono-api-reference@0.5.158': - resolution: {integrity: sha512-2P7l/ivuC/RWpAKddLtkqIZ89TA5/QlpfEBrdpH9/yjn4NpR5XkbtT+/8uZVELCyjfUMpGcaNXrxuJERFJ3sxA==} + '@scalar/hono-api-reference@0.5.159': + resolution: {integrity: sha512-nUKaN0CKvytbXPj9b6taF/efKKRqEUwhVxlfLVjrJXN0eHNHDWxG9e/5Tyw1o2MXJo1cQpGZ4qTh48k/8u6ZjA==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 - '@scalar/openapi-types@0.1.4': - resolution: {integrity: sha512-+wRXgmqzgDnj8Dxqf4OOPMPo4or/LRd1Bsy4pnrIW0yBt8rKSdtBb+jH/aRnhgDDmKVjWxJ+KFk7WlSKvZwNTw==} + '@scalar/openapi-types@0.1.5': + resolution: {integrity: sha512-6geH9ehvQ/sG/xUyy3e0lyOw3BaY5s6nn22wHjEJhcobdmWyFER0O6m7AU0ZN4QTjle/gYvFJOjj552l/rsNSw==} engines: {node: '>=18'} - '@scalar/types@0.0.18': - resolution: {integrity: sha512-gfJB/e9Rq/vjsiWlNwBkaIAZVb9v5guHQB5uVoVFcU0gdAuXni0KVxFxl3gGTu2zhBdB+DkixjyPcNzpqwksmA==} + '@scalar/types@0.0.19': + resolution: {integrity: sha512-wOxtXd35BS0DaVhBopQUB8c8hfLQ+/PKEr99GbOZW+4DWCrEB8JfWJgvpJyxHU6by7LHNVY4fvpFQR7Ezh1IIw==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7295,16 +7295,16 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.158(hono@4.6.9)': + '@scalar/hono-api-reference@0.5.159(hono@4.6.9)': dependencies: - '@scalar/types': 0.0.18 + '@scalar/types': 0.0.19 hono: 4.6.9 - '@scalar/openapi-types@0.1.4': {} + '@scalar/openapi-types@0.1.5': {} - '@scalar/types@0.0.18': + '@scalar/types@0.0.19': dependencies: - '@scalar/openapi-types': 0.1.4 + '@scalar/openapi-types': 0.1.5 '@unhead/schema': 1.11.11 '@sec-ant/readable-stream@0.4.1': {} From e1a5409035485b252cc9b5ae75ab6856709dcc4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:31:35 -0800 Subject: [PATCH 451/740] chore(deps): bump @opentelemetry/exporter-trace-otlp-http (#17509) Bumps [@opentelemetry/exporter-trace-otlp-http](https://github.com/open-telemetry/opentelemetry-js) from 0.54.1 to 0.54.2. - [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/experimental/v0.54.1...experimental/v0.54.2) --- updated-dependencies: - dependency-name: "@opentelemetry/exporter-trace-otlp-http" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 46 +++++++++++++++++++++++----------------------- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index cc61c5c07d39453..98718e6956a5478 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.54.1", - "@opentelemetry/exporter-trace-otlp-http": "0.54.1", + "@opentelemetry/exporter-trace-otlp-http": "0.54.2", "@opentelemetry/resources": "1.27.0", "@opentelemetry/sdk-metrics": "1.27.0", "@opentelemetry/sdk-trace-base": "1.27.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bbb2f8fc3c9b6da..af0726c4bf6b569 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,8 +33,8 @@ importers: specifier: 0.54.1 version: 0.54.1(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http': - specifier: 0.54.1 - version: 0.54.1(@opentelemetry/api@1.9.0) + specifier: 0.54.2 + version: 0.54.2(@opentelemetry/api@1.9.0) '@opentelemetry/resources': specifier: 1.27.0 version: 1.27.0(@opentelemetry/api@1.9.0) @@ -1495,8 +1495,8 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@opentelemetry/api-logs@0.54.1': - resolution: {integrity: sha512-tFOyYT8tFRSuUc+pEXnHG99270y7K8MSBLQSPiYBJ/0cgCp+8KmSej4joBfah0JoXAwbPzMCom3ri0xsiYbLvg==} + '@opentelemetry/api-logs@0.54.2': + resolution: {integrity: sha512-4MTVwwmLgUh5QrJnZpYo6YRO5IBLAggf2h8gWDblwRagDStY13aEvt7gGk3jewrMaPlHiF83fENhIx0HO97/cQ==} engines: {node: '>=14'} '@opentelemetry/api@1.9.0': @@ -1515,20 +1515,20 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-trace-otlp-http@0.54.1': - resolution: {integrity: sha512-yencb6HQ0ImSuMsR8RR+FtxkzJcJhy759/oAPDRUFowbncJHRK7vlty35hQeOhdzi3F/TzQhkzaCa8QGm/VTUw==} + '@opentelemetry/exporter-trace-otlp-http@0.54.2': + resolution: {integrity: sha512-BgWKKyD/h2zpISdmYHN/sapwTjvt1P4p5yx4xeBV8XAEqh4OQUhOtSGFG80+nPQ1F8of3mKOT1DDoDbJp1u25w==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-exporter-base@0.54.1': - resolution: {integrity: sha512-cqX2uAg8UVzpEq9BrMhn6jQGp480Ykf0gQR4nOwpBkQ0BzoKHnu5GIhAuhHH4laVym0KrUVgWZWrdT52WrSXVA==} + '@opentelemetry/otlp-exporter-base@0.54.2': + resolution: {integrity: sha512-NrNyxu6R/bGAwanhz1HI0aJWKR6xUED4TjCH4iWMlAfyRukGbI9Kt/Akd2sYLwRKNhfS+sKetKGCUQPMDyYYMA==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-transformer@0.54.1': - resolution: {integrity: sha512-8aleigiRCeo3S1IqB88EFlYu9WlZmJOMcAse9U9yB/CdGiLN5g5jjMHEO47+YspTwVlc9U3B/Vj+oG/OFPSfDQ==} + '@opentelemetry/otlp-transformer@0.54.2': + resolution: {integrity: sha512-2tIjahJlMRRUz0A2SeE+qBkeBXBFkSjR0wqJ08kuOqaL8HNGan5iZf+A8cfrfmZzPUuMKCyY9I+okzFuFs6gKQ==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 @@ -1539,8 +1539,8 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/sdk-logs@0.54.1': - resolution: {integrity: sha512-FoHgzFT9XHt1NdLNwNzqZCCWT7XF1aSxXuSRlGdfwmkhFjB0F3t0a7pngChejIP7ugc9XTIaKlboloe5DlGHzw==} + '@opentelemetry/sdk-logs@0.54.2': + resolution: {integrity: sha512-yIbYqDLS/AtBbPjCjh6eSToGNRMqW2VR8RrKEy+G+J7dFG7pKoptTH5T+XlKPleP9NY8JZYIpgJBlI+Osi0rFw==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': '>=1.4.0 <1.10.0' @@ -7042,7 +7042,7 @@ snapshots: '@open-draft/until@2.1.0': {} - '@opentelemetry/api-logs@0.54.1': + '@opentelemetry/api-logs@0.54.2': dependencies: '@opentelemetry/api': 1.9.0 @@ -7060,28 +7060,28 @@ snapshots: '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/exporter-trace-otlp-http@0.54.1(@opentelemetry/api@1.9.0)': + '@opentelemetry/exporter-trace-otlp-http@0.54.2(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base': 0.54.1(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.54.1(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-exporter-base': 0.54.2(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.54.2(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base@0.54.1(@opentelemetry/api@1.9.0)': + '@opentelemetry/otlp-exporter-base@0.54.2(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.54.1(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.54.2(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer@0.54.1(@opentelemetry/api@1.9.0)': + '@opentelemetry/otlp-transformer@0.54.2(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.54.1 + '@opentelemetry/api-logs': 0.54.2 '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-logs': 0.54.1(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-logs': 0.54.2(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': 1.27.0(@opentelemetry/api@1.9.0) protobufjs: 7.4.0 @@ -7092,10 +7092,10 @@ snapshots: '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/sdk-logs@0.54.1(@opentelemetry/api@1.9.0)': + '@opentelemetry/sdk-logs@0.54.2(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.54.1 + '@opentelemetry/api-logs': 0.54.2 '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) From 158a4c7be927410212a83dbffbb82a3964df9fb0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 13:47:21 +0000 Subject: [PATCH 452/740] chore(deps): bump @opentelemetry/exporter-prometheus (#17511) Bumps [@opentelemetry/exporter-prometheus](https://github.com/open-telemetry/opentelemetry-js) from 0.54.1 to 0.54.2. - [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/experimental/v0.54.1...experimental/v0.54.2) --- updated-dependencies: - dependency-name: "@opentelemetry/exporter-prometheus" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 98718e6956a5478..9a8b96b46b46bc2 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@hono/zod-openapi": "0.17.0", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-prometheus": "0.54.1", + "@opentelemetry/exporter-prometheus": "0.54.2", "@opentelemetry/exporter-trace-otlp-http": "0.54.2", "@opentelemetry/resources": "1.27.0", "@opentelemetry/sdk-metrics": "1.27.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index af0726c4bf6b569..d3092e881e998e6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: specifier: 1.9.0 version: 1.9.0 '@opentelemetry/exporter-prometheus': - specifier: 0.54.1 - version: 0.54.1(@opentelemetry/api@1.9.0) + specifier: 0.54.2 + version: 0.54.2(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http': specifier: 0.54.2 version: 0.54.2(@opentelemetry/api@1.9.0) @@ -1509,8 +1509,8 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/exporter-prometheus@0.54.1': - resolution: {integrity: sha512-TN4c0jPn205FEIOOF8D+4KG+GADegd3AqhVi/7iIvWdAPVOla2Ojdql/xJq+s4TLEDCjG54lP6jAqH4/4zHAdg==} + '@opentelemetry/exporter-prometheus@0.54.2': + resolution: {integrity: sha512-U/XoupMPmrdEc3tzSxvMft+r/qK2O6SigZWewpC0183UF0cnGlQr1sPx/VxXo7RXJ6zMxDFHhO2Z1AWApXD1Pw==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 @@ -7053,7 +7053,7 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/exporter-prometheus@0.54.1(@opentelemetry/api@1.9.0)': + '@opentelemetry/exporter-prometheus@0.54.2(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) From b2ef174ebe5664d555899da74c24a4c338cafa8e Mon Sep 17 00:00:00 2001 From: Chikit-L <57130625+Chikit-L@users.noreply.github.com> Date: Fri, 8 Nov 2024 23:00:38 +0800 Subject: [PATCH 453/740] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD=E5=9B=BD?= =?UTF-8?q?=E5=9C=B0=E8=B4=A8=E7=A7=91=E5=AD=A6=E9=99=A2=E7=A0=94=E7=A9=B6?= =?UTF-8?q?=E7=94=9F=E9=99=A2=20(#17458)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 新增 中国地质科学院研究生院 路由 * feat(route): add 中国地质科学院研究生院 * Update namespace.ts * feat(route): add 中国地质科学院研究生院 --- lib/routes/cags/edu/index.ts | 84 ++++++++++++++++++++++++++++++++++++ lib/routes/cags/namespace.ts | 9 ++++ 2 files changed, 93 insertions(+) create mode 100644 lib/routes/cags/edu/index.ts create mode 100644 lib/routes/cags/namespace.ts diff --git a/lib/routes/cags/edu/index.ts b/lib/routes/cags/edu/index.ts new file mode 100644 index 000000000000000..f5e71ed6d6fb7e6 --- /dev/null +++ b/lib/routes/cags/edu/index.ts @@ -0,0 +1,84 @@ +import ofetch from '@/utils/ofetch'; +import { Route } from '@/types'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +const host = 'https://edu.cags.ac.cn'; + +const titles = { + tzgg: '通知公告', + ywjx: '要闻简讯', + zs_bss: '博士生招生', + zs_sss: '硕士生招生', + zs_dxsxly: '大学生夏令营', +}; + +export const route: Route = { + path: '/edu/:category', + categories: ['university'], + example: '/cags/edu/tzgg', + parameters: { + category: '通知频道,可选 tzgg/ywjx/zs_bss/zs_sss/zs_dxsxly', + }, + features: { + antiCrawler: false, + requireConfig: false, + requirePuppeteer: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '研究生院', + maintainers: ['Chikit-L'], + radar: [ + { + source: ['edu.cags.ac.cn/'], + }, + ], + handler, + description: ` +| 通知公告 | 要闻简讯 | 博士生招生 | 硕士生招生 | 大学生夏令营 | +| -------- | -------- | ---------- | ---------- | ------------ | +| tzgg | ywjx | zs_bss | zs_sss | zs_dxsxly | +`, +}; + +async function handler(ctx) { + const category = ctx.req.param('category'); + const title = titles[category]; + + if (!title) { + throw new Error(`Invalid category: ${category}`); + } + + const API_URL = `${host}/api/cms/cmsNews/pageByCmsNavBarId/${category}/1/10/0`; + const response = await ofetch(API_URL); + const data = response.data; + + const items = data.map((item) => { + const id = item.id; + const title = item.title; + + let pubDate = null; + if (item.publishDate) { + pubDate = parseDate(item.publishDate, 'YYYY-MM-DD'); + pubDate = timezone(pubDate, 8); + } + + const link = `${host}/#/dky/view/id=${id}/barId=${category}`; + + return { + title, + description: item.introduction, + link, + guid: link, + pubDate, + }; + }); + + return { + title, + link: `${host}/#/dky/list/barId=${category}/cmsNavCategory=1`, + item: items, + }; +} diff --git a/lib/routes/cags/namespace.ts b/lib/routes/cags/namespace.ts new file mode 100644 index 000000000000000..abb34c06bfc9fbc --- /dev/null +++ b/lib/routes/cags/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Chinese Academy of Geological Sciences', + url: 'cags.cgs.gov.cn', + zh: { + name: '中国地质科学院', + }, +}; From 3ea381e7db4a55157be4ae0ef9614ade8fc943d2 Mon Sep 17 00:00:00 2001 From: DIYgod <i@diygod.me> Date: Sat, 9 Nov 2024 02:01:24 +0800 Subject: [PATCH 454/740] feat(twitter): debug --- lib/routes/twitter/api/web-api/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 3738f229f70ac71..84b0015fd7a73df 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -57,6 +57,7 @@ const getAuth = async (retry: number) => { const token = config.twitter.authToken[index]; const lock = await cache.get(`${lockPrefix}${token}`, false); if (lock) { + logger.debug(`twitter debug: twitter cookie for token ${token} is locked, retry: ${retry}`); await new Promise((resolve) => setTimeout(resolve, Math.random() * 500 + 500)); return await getAuth(retry - 1); } else { From a267675d8d61af8ffc4ccd3111821996ca1494ea Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Sat, 9 Nov 2024 03:31:48 +0800 Subject: [PATCH 455/740] fix: update csdn url (#17504) * fix: update csdn url * catch detail error * fix: add back maintainers --------- --- lib/routes/csdn/blog.ts | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/lib/routes/csdn/blog.ts b/lib/routes/csdn/blog.ts index 4b1997e756eb391..3f5fd52cc76c08a 100644 --- a/lib/routes/csdn/blog.ts +++ b/lib/routes/csdn/blog.ts @@ -23,35 +23,39 @@ export const route: Route = { }, ], name: 'User Feed', - maintainers: [], + maintainers: ['Jkker'], handler, }; async function handler(ctx) { const user = ctx.req.param('user'); - const rootUrl = 'https://blog.csdn.net'; + const rootUrl = 'https://rss.csdn.net'; const blogUrl = `${rootUrl}/${user}`; - const rssUrl = blogUrl + '/rss/list'; + const rssUrl = blogUrl + '/rss/map'; const feed = await rssParser.parseURL(rssUrl); const items = await Promise.all( feed.items.map((item) => cache.tryGet(item.link, async () => { - const response = await got({ - method: 'get', - url: item.link, - }); + try { + const response = await got({ + method: 'get', + url: item.link, + }); - const $ = load(response.data); + const $ = load(response.data); - const description = $('#content_views').html(); + const description = $('#content_views').html(); - return { - ...item, - description, - }; + return { + ...item, + description, + }; + } catch { + return item; + } }) ) ); From 2534d452dd27785b488227a3fcef5ac9956d764e Mon Sep 17 00:00:00 2001 From: AiraNadih <128119996+AiraNadih@users.noreply.github.com> Date: Sat, 9 Nov 2024 03:59:31 +0800 Subject: [PATCH 456/740] fix(route/xsijishe): update rank list parsing logic (#17497) * fix(route/xsijishe): update rank list parsing logic * fix(route/xsijishe): update rank list parsing logic * Update lib/routes/xsijishe/rank.ts --------- --- lib/routes/xsijishe/rank.ts | 39 ++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/lib/routes/xsijishe/rank.ts b/lib/routes/xsijishe/rank.ts index f388533c318e10c..bf6fba1cc0b7ef4 100644 --- a/lib/routes/xsijishe/rank.ts +++ b/lib/routes/xsijishe/rank.ts @@ -8,9 +8,17 @@ const baseUrl = 'https://xsijishe.com'; export const route: Route = { path: '/rank/:type', - categories: ['bbs'], + categories: ['bbs', 'popular'], example: '/xsijishe/rank/weekly', - parameters: { type: '排行榜类型: weekly | monthly' }, + parameters: { + type: { + description: '排行榜类型', + options: [ + { value: 'weekly', label: '周榜' }, + { value: 'monthly', label: '月榜' }, + ], + }, + }, features: { requireConfig: [ { @@ -29,23 +37,25 @@ export const route: Route = { supportScihub: false, }, name: '排行榜', - maintainers: ['akynazh'], + maintainers: ['akynazh', 'AiraNadih'], handler, }; async function handler(ctx) { const rankType = ctx.req.param('type'); let title; - let rankId; + let index; // 用于选择第几个 li + if (rankType === 'weekly') { title = '司机社综合周排行榜'; - rankId = 'nex_recons_demens'; + index = 0; // 第一个 li 是周榜 } else if (rankType === 'monthly') { title = '司机社综合月排行榜'; - rankId = 'nex_recons_demens1'; + index = 1; // 第二个 li 是月榜 } else { throw new InvalidParameterError('Invalid rank type'); } + const url = `${baseUrl}/portal.php`; const headers = { 'Accept-Encoding': 'gzip, deflate, br', @@ -53,11 +63,25 @@ async function handler(ctx) { Cookie: config.xsijishe.cookie, 'User-Agent': config.xsijishe.user_agent, }; + const resp = await got(url, { headers, }); + + const redirectMatch = resp.data.match(/window\.location\.href\s*=\s*"([^"]+)"/); + if (redirectMatch) { + const redirectUrl = `${baseUrl}${redirectMatch[1]}`; + // 使用提取到的地址重新请求 + const realResp = await got(redirectUrl, { + headers, + }); + resp.data = realResp.data; + } + const $ = load(resp.data); - let items = $(`#${rankId} dd`) + // 根据 index 选择对应的 li,然后获取其中的 dd 元素 + let items = $('.nex_recon_lists ul li').eq(index) + .find('.nex_recons_demens dl dd') .toArray() .map((item) => { item = $(item); @@ -68,6 +92,7 @@ async function handler(ctx) { link: `${baseUrl}/${link}`, }; }); + items = await Promise.all( items.map((item) => cache.tryGet(item.link, async () => { From fb116bb73d7453f69167f603eaaf3371d94673ea Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 20:01:31 +0000 Subject: [PATCH 457/740] style: auto format --- lib/routes/xsijishe/rank.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/routes/xsijishe/rank.ts b/lib/routes/xsijishe/rank.ts index bf6fba1cc0b7ef4..6b20aa90d708210 100644 --- a/lib/routes/xsijishe/rank.ts +++ b/lib/routes/xsijishe/rank.ts @@ -44,14 +44,14 @@ export const route: Route = { async function handler(ctx) { const rankType = ctx.req.param('type'); let title; - let index; // 用于选择第几个 li + let index; // 用于选择第几个 li if (rankType === 'weekly') { title = '司机社综合周排行榜'; - index = 0; // 第一个 li 是周榜 + index = 0; // 第一个 li 是周榜 } else if (rankType === 'monthly') { title = '司机社综合月排行榜'; - index = 1; // 第二个 li 是月榜 + index = 1; // 第二个 li 是月榜 } else { throw new InvalidParameterError('Invalid rank type'); } @@ -80,7 +80,8 @@ async function handler(ctx) { const $ = load(resp.data); // 根据 index 选择对应的 li,然后获取其中的 dd 元素 - let items = $('.nex_recon_lists ul li').eq(index) + let items = $('.nex_recon_lists ul li') + .eq(index) .find('.nex_recons_demens dl dd') .toArray() .map((item) => { From 50533bc758d5b75b4e3335ea18cdabc05979b966 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Sat, 9 Nov 2024 20:03:35 +0800 Subject: [PATCH 458/740] docs: add back maintainer in #13255 --- 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 5b7caf6d5e97a78..3d66b1833927b10 100644 --- a/lib/routes/telegram/channel.ts +++ b/lib/routes/telegram/channel.ts @@ -142,7 +142,7 @@ For backward compatibility reasons, invalid \`routeParams\` will be treated as \ }, ], name: 'Channel', - maintainers: ['DIYgod', 'Rongronggg9', 'pseudoyu'], + maintainers: ['DIYgod', 'Rongronggg9', 'synchrone', 'pseudoyu'], handler, description: ` :::tip From 7bec9c51f4bf1a47eb869f9bd359f9e20fa0866e Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Sat, 9 Nov 2024 20:32:42 +0800 Subject: [PATCH 459/740] chore(telegram): replace debug with winston --- .../telegram/scripts/get-telegram-session.mjs | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lib/routes/telegram/scripts/get-telegram-session.mjs b/lib/routes/telegram/scripts/get-telegram-session.mjs index 4564411001d0b7f..9d1a830c14ce837 100644 --- a/lib/routes/telegram/scripts/get-telegram-session.mjs +++ b/lib/routes/telegram/scripts/get-telegram-session.mjs @@ -1,14 +1,12 @@ import { TelegramClient } from 'telegram'; import { StringSession } from 'telegram/sessions/index.js'; import readline from 'readline'; -import debug from 'debug'; - -const log = debug('telegram:session'); +import winston from 'winston'; function userInput(question) { const rl = readline.createInterface({ input: process.stdin, - output: process.stdout + output: process.stdout, }); return new Promise((resolve) => { rl.question(question, (answer) => { @@ -18,6 +16,15 @@ function userInput(question) { }); } +const logger = winston.createLogger({ + level: 'info', + format: winston.format.combine( + winston.format.timestamp(), + winston.format.printf(({ level, message, timestamp }) => `${timestamp} ${level}: ${message}`) + ), + transports: [new winston.transports.Console()], +}); + async function getSessionString() { const apiId = Number.parseInt(await userInput('Please enter your API ID: ')); const apiHash = await userInput('Please enter your API Hash: '); @@ -29,16 +36,16 @@ async function getSessionString() { phoneNumber: async () => await userInput('Please enter your phone number: '), password: async () => await userInput('Please enter your password: '), phoneCode: async () => await userInput('Please enter the code you received: '), - onError: (err) => log('Error:', err), + onError: (err) => logger.error(err), }); - log('You are now connected.'); + logger.info('You are now connected.'); const sessionString = client.session.save(); - log('Your session string is:', sessionString); + logger.info(`Your session string is: ${sessionString}`); await client.disconnect(); return sessionString; } // Run the function -getSessionString().catch((error) => log('Error:', error)); +getSessionString().catch((error) => logger.error(error)); From 566d3d0201537cf74762776d43f19e4470e2bb6b Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Sat, 9 Nov 2024 21:07:53 +0800 Subject: [PATCH 460/740] fix(route/telegram): improve typing --- lib/routes/telegram/tglib/channel.ts | 21 ++++++++++++--------- lib/routes/telegram/tglib/client.ts | 4 ++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/routes/telegram/tglib/channel.ts b/lib/routes/telegram/tglib/channel.ts index 7af7cc50c82b91c..ef8f91fe5c379eb 100644 --- a/lib/routes/telegram/tglib/channel.ts +++ b/lib/routes/telegram/tglib/channel.ts @@ -2,6 +2,8 @@ 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 { DataItem } from '@/types'; +import type { Api } from 'telegram'; function parseRange(range, length) { if (!range) { @@ -111,24 +113,25 @@ async function getMedia(ctx) { } export default async function handler(ctx) { + const { username } = ctx.req.param(); const client = await getClient(); - const item = []; - const chat = await client.getInputEntity(ctx.req.param('username')); + const item: DataItem[] = []; + const chat = (await client.getInputEntity(username)) as Api.InputPeerChannel; const channelInfo = await client.getEntity(chat); if (channelInfo.className !== 'Channel') { - throw new Error(`${ctx.req.param('username')} is not a channel`); + throw new Error(`${username} is not a channel`); } - let attachments = []; + let attachments: string[] = []; const messages = await client.getMessages(chat, { limit: 50 }); for (const message of messages) { if (message.media) { // messages that have no text are shown as if they're one post // because in TG only 1 attachment per message is possible - attachments.push(getMediaLink(ctx, chat, ctx.req.param('username'), message)); + attachments.push(getMediaLink(ctx, chat, username, message)); } if (message.text !== '') { let description = attachments.join('\n'); @@ -144,8 +147,8 @@ export default async function handler(ctx) { title, description, pubDate: new Date(message.date * 1000).toUTCString(), - link: `https://t.me/s/${ctx.req.param('username')}/${message.id}`, - author: `${channelInfo.title} (@${ctx.req.param('username')})`, + link: `https://t.me/s/${username}/${message.id}`, + author: `${channelInfo.title} (@${username})`, }); } } @@ -153,10 +156,10 @@ export default async function handler(ctx) { return { title: channelInfo.title, language: null, - link: `https://t.me/${ctx.req.param('username')}`, + link: `https://t.me/${username}`, item, allowEmpty: ctx.req.param('id') === 'allow_empty', - description: `@${ctx.req.param('username')} on Telegram`, + description: `@${username} on Telegram`, }; } diff --git a/lib/routes/telegram/tglib/client.ts b/lib/routes/telegram/tglib/client.ts index 06ed2538cae8b15..00afc8f539faf76 100644 --- a/lib/routes/telegram/tglib/client.ts +++ b/lib/routes/telegram/tglib/client.ts @@ -81,7 +81,7 @@ function ExpandInlineBytes(bytes) { return real; } -function getMediaLink(ctx, channel, channelName, message) { +function getMediaLink(ctx, channel: Api.InputPeerChannel, channelName: string, message: Api.Message) { const base = `${ctx.protocol}://${ctx.host}/telegram/channel/${channelName}`; const src = base + `${channel.channelId}_${message.id}`; @@ -102,7 +102,7 @@ function getMediaLink(ctx, channel, channelName, message) { linkText += ` (${humanFileSize(x.document.size)})`; return `<a href="${src}" target="_blank"><img src="${src}?thumb" alt=""/><br/>${linkText}</a>`; } - return; + return ''; } function getFilename(x) { if (x instanceof Api.MessageMediaDocument) { From 5f256bf9f8ae2b13223859bf4052621bf097ea31 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Sun, 10 Nov 2024 02:51:14 +0800 Subject: [PATCH 461/740] fix(route): DeepLearning.AI The Batch with tags (#17514) --- lib/routes/deeplearning/namespace.ts | 4 +- .../deeplearning/templates/description.art | 21 ++ lib/routes/deeplearning/the-batch.ts | 296 ++++++++++++++++++ lib/routes/deeplearning/thebatch.ts | 74 ----- 4 files changed, 320 insertions(+), 75 deletions(-) create mode 100644 lib/routes/deeplearning/templates/description.art create mode 100644 lib/routes/deeplearning/the-batch.ts delete mode 100644 lib/routes/deeplearning/thebatch.ts diff --git a/lib/routes/deeplearning/namespace.ts b/lib/routes/deeplearning/namespace.ts index 82bbae5596d1f63..85f560dc8625c0b 100644 --- a/lib/routes/deeplearning/namespace.ts +++ b/lib/routes/deeplearning/namespace.ts @@ -1,7 +1,9 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'deeplearning.ai', + name: 'DeepLearning.AI', url: 'www.deeplearning.ai', + categories: ['programming'], + description: '', lang: 'en', }; diff --git a/lib/routes/deeplearning/templates/description.art b/lib/routes/deeplearning/templates/description.art new file mode 100644 index 000000000000000..249654e7e618a4a --- /dev/null +++ b/lib/routes/deeplearning/templates/description.art @@ -0,0 +1,21 @@ +{{ if images }} + {{ each images image }} + {{ if image?.src }} + <figure> + <img + {{ if image.alt }} + alt="{{ image.alt }}" + {{ /if }} + src="{{ image.src }}"> + </figure> + {{ /if }} + {{ /each }} +{{ /if }} + +{{ if intro }} + <blockquote>{{ intro }}</blockquote> +{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file diff --git a/lib/routes/deeplearning/the-batch.ts b/lib/routes/deeplearning/the-batch.ts new file mode 100644 index 000000000000000..3456d03f822d2a8 --- /dev/null +++ b/lib/routes/deeplearning/the-batch.ts @@ -0,0 +1,296 @@ +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'; +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) => { + const { tag } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 1; + + const rootUrl = 'https://www.deeplearning.ai'; + const currentUrl = new URL(`the-batch${tag ? `/tag/${tag.replace(/^tag\//, '').replace(/\/$/, '')}` : ''}/`, rootUrl).href; + + const response = await ofetch(currentUrl); + + const $ = load(response); + + const language = $('html').prop('lang'); + + const data = JSON.parse($('script#__NEXT_DATA__').text()); + + const nextBuildId = data.buildId; + const posts = data.props?.pageProps?.posts ?? []; + + let items = posts.slice(0, limit).map((item) => { + const title = item.title; + const description = art(path.join(__dirname, 'templates/description.art'), { + images: item.feature_image + ? [ + { + src: item.feature_image, + alt: item.feature_image_alt, + }, + ] + : undefined, + intro: item.excerpt ?? item.custom_excerpt, + }); + const image = item.feature_image; + const guid = `the-batch-${item.slug}`; + + return { + title, + description, + pubDate: parseDate(item.published_at), + link: new URL(`_next/data/${nextBuildId}/the-batch/${item.slug}.json`, rootUrl).href, + category: item.tags.map((t) => t.name), + guid, + id: guid, + content: { + html: description, + text: item.excerpt ?? item.custom_excerpt, + }, + image, + banner: image, + language, + }; + }); + + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const detailResponse = await ofetch(item.link); + + const post = detailResponse.pageProps?.cmsData?.post ?? undefined; + + if (!post) { + return item; + } + + const $$ = load(post.html); + + $$('a').each((_, ele) => { + if (ele.attribs.href?.includes('utm_campaign')) { + const url = new URL(ele.attribs.href); + url.searchParams.delete('utm_campaign'); + url.searchParams.delete('utm_source'); + url.searchParams.delete('utm_medium'); + url.searchParams.delete('_hsenc'); + ele.attribs.href = url.href; + } + }); + + const title = post.title; + const description = art(path.join(__dirname, 'templates/description.art'), { + images: post.feature_image + ? [ + { + src: post.feature_image, + alt: post.feature_image_alt, + }, + ] + : undefined, + intro: post.excerpt ?? post.custom_excerpt, + description: $$.html(), + }); + const guid = `the-batch-${post.slug}`; + const image = post.feature_image; + + item.title = title; + item.description = description; + item.pubDate = parseDate(post.published_at); + item.link = new URL(`the-batch/${post.slug}`, rootUrl).href; + item.category = post.tags.map((t) => t.name); + item.author = post.authors.map((a) => a.name).join('/'); + item.guid = guid; + item.id = guid; + item.content = { + html: description, + text: post.excerpt ?? post.custom_excerpt, + }; + item.image = image; + item.banner = image; + item.updated = parseDate(post.updated_at); + item.language = language; + + return item; + }) + ) + ); + + const image = new URL($('meta[property="og:image"]').prop('content'), rootUrl).href; + + return { + title: $('title').text(), + description: $('meta[property="og:description"]').prop('content'), + link: currentUrl, + item: items, + allowEmpty: true, + image, + author: $('meta[property="og:site_name"]').prop('content'), + language, + }; +}; + +export const route: Route = { + path: '/the-batch/:tag{.+}?', + name: 'The Batch', + url: 'www.deeplearning.ai', + maintainers: ['nczitzk', 'juvenn', 'TonyRL'], + handler, + example: '/deeplearning/the-batch', + parameters: { tag: 'Tag, Weekly Issues by default' }, + description: `:::tip + If you subscribe to [Data Points](https://www.deeplearning.ai/the-batch/tag/data-points/),where the URL is \`https://www.deeplearning.ai/the-batch/tag/data-points/\`, extract the part \`https://www.deeplearning.ai/the-batch/tag\` to the end, which is \`data-points\`, and use it as the parameter to fill in. Therefore, the route will be [\`/deeplearning/the-batch/data-points\`](https://rsshub.app/deeplearning/the-batch/data-points). + + ::: + + | 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/) + + | 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'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.deeplearning.ai/the-batch', 'www.deeplearning.ai/the-batch/tag/:tag/'], + target: (params) => { + const tag = params.tag; + + return `/the-batch${tag ? `/${tag}` : ''}`; + }, + }, + { + title: 'Weekly Issues', + source: ['www.deeplearning.ai/the-batch/'], + target: '/the-batch', + }, + { + title: "Andrew's Letters", + source: ['www.deeplearning.ai/the-batch/tag/letters/'], + target: '/the-batch/letters', + }, + { + title: 'Data Points', + source: ['www.deeplearning.ai/the-batch/tag/data-points/'], + target: '/the-batch/data-points', + }, + { + title: 'ML Research', + source: ['www.deeplearning.ai/the-batch/tag/research/'], + target: '/the-batch/research', + }, + { + title: 'Business', + source: ['www.deeplearning.ai/the-batch/tag/business/'], + target: '/the-batch/business', + }, + { + title: 'Science', + source: ['www.deeplearning.ai/the-batch/tag/science/'], + target: '/the-batch/science', + }, + { + title: 'AI & Society', + source: ['www.deeplearning.ai/the-batch/tag/ai-society/'], + target: '/the-batch/ai-society', + }, + { + title: 'Culture', + source: ['www.deeplearning.ai/the-batch/tag/culture/'], + target: '/the-batch/culture', + }, + { + title: 'Hardware', + source: ['www.deeplearning.ai/the-batch/tag/hardware/'], + target: '/the-batch/hardware', + }, + { + title: 'AI Careers', + source: ['www.deeplearning.ai/the-batch/tag/ai-careers/'], + target: '/the-batch/ai-careers', + }, + { + title: 'Letters from Andrew Ng - All', + source: ['www.deeplearning.ai/the-batch/tag/letters/'], + target: '/the-batch/letters', + }, + { + title: 'Letters from Andrew Ng - Personal Insights', + source: ['www.deeplearning.ai/the-batch/tag/personal-insights/'], + target: '/the-batch/personal-insights', + }, + { + title: 'Letters from Andrew Ng - Technical Insights', + source: ['www.deeplearning.ai/the-batch/tag/technical-insights/'], + target: '/the-batch/technical-insights', + }, + { + title: 'Letters from Andrew Ng - Business Insights', + source: ['www.deeplearning.ai/the-batch/tag/business-insights/'], + target: '/the-batch/business-insights', + }, + { + title: 'Letters from Andrew Ng - Tech & Society', + source: ['www.deeplearning.ai/the-batch/tag/tech-society/'], + target: '/the-batch/tech-society', + }, + { + title: 'Letters from Andrew Ng - DeepLearning.AI News', + source: ['www.deeplearning.ai/the-batch/tag/deeplearning-ai-news/'], + target: '/the-batch/deeplearning-ai-news', + }, + { + title: 'Letters from Andrew Ng - AI Careers', + source: ['www.deeplearning.ai/the-batch/tag/ai-careers/'], + target: '/the-batch/ai-careers', + }, + { + title: 'Letters from Andrew Ng - Just For Fun', + source: ['www.deeplearning.ai/the-batch/tag/just-for-fun/'], + target: '/the-batch/just-for-fun', + }, + { + title: 'Letters from Andrew Ng - Learning & Education', + source: ['www.deeplearning.ai/the-batch/tag/learning-education/'], + target: '/the-batch/learning-education', + }, + ], +}; diff --git a/lib/routes/deeplearning/thebatch.ts b/lib/routes/deeplearning/thebatch.ts deleted file mode 100644 index f7816a7e060cc15..000000000000000 --- a/lib/routes/deeplearning/thebatch.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Route } from '@/types'; -import cache from '@/utils/cache'; -import ofetch from '@/utils/ofetch'; -import * as cheerio from 'cheerio'; -import { parseDate } from '@/utils/parse-date'; - -export const route: Route = { - path: '/thebatch', - categories: ['programming'], - example: '/deeplearning/thebatch', - parameters: {}, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - radar: [ - { - source: ['www.deeplearning.ai/thebatch', 'www.deeplearning.ai/'], - }, - ], - name: 'TheBatch 周报', - maintainers: ['nczitzk', 'juvenn'], - handler, - url: 'www.deeplearning.ai/thebatch', -}; - -async function handler() { - const baseUrl = 'https://www.deeplearning.ai'; - const link = `${baseUrl}/the-batch/`; - const page = await ofetch(link); - const $ = cheerio.load(page); - const nextJs = $('script#__NEXT_DATA__').text(); - const nextBuildId = JSON.parse(nextJs).buildId; - - const listing = await ofetch(`${baseUrl}/_next/data/${nextBuildId}/the-batch.json`); - - const items = listing.pageProps.posts.map((item) => ({ - title: item.title, - link: `${link}${item.slug}`, - jsonUrl: `${baseUrl}/_next/data/${nextBuildId}/the-batch/${item.slug}.json`, - pubDate: parseDate(item.published_at), - })); - - return { - title: 'The Batch - a new weekly newsletter from deeplearning.ai', - link, - item: await Promise.all( - items.map((item) => - cache.tryGet(item.link, async () => { - const resp = await ofetch(item.jsonUrl); - const $ = cheerio.load(resp.pageProps.cmsData.post.html); - - $('a').each((_, ele) => { - if (ele.attribs.href?.includes('utm_campaign')) { - const url = new URL(ele.attribs.href); - url.searchParams.delete('utm_campaign'); - url.searchParams.delete('utm_source'); - url.searchParams.delete('utm_medium'); - url.searchParams.delete('_hsenc'); - ele.attribs.href = url.href; - } - }); - - item.description = $.html(); - return item; - }) - ) - ), - }; -} From 173ae7182595a45178bbe9ecfb49d99e5ab9caea Mon Sep 17 00:00:00 2001 From: ueiu <39592269+ueiu@users.noreply.github.com> Date: Sun, 10 Nov 2024 18:14:00 +0800 Subject: [PATCH 462/740] =?UTF-8?q?fix(route/xiaoheihe):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=B0=8F=E9=BB=91=E7=9B=92=20-=20=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E6=8A=98=E6=89=A3=E6=95=B0=E6=8D=AE=E6=8A=93=E5=8F=96=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=20(#17520)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(route/xiaoheihe): 修复小黑盒 - 游戏折扣数据抓取失败 * refactor(route/xiaoheihe): 小黑盒游戏折扣券后价格式化显示 --- lib/routes/xiaoheihe/discount.ts | 100 ++++++++++++++++++++++--------- 1 file changed, 72 insertions(+), 28 deletions(-) diff --git a/lib/routes/xiaoheihe/discount.ts b/lib/routes/xiaoheihe/discount.ts index ee6afbd46af0226..82a269ee463e09b 100644 --- a/lib/routes/xiaoheihe/discount.ts +++ b/lib/routes/xiaoheihe/discount.ts @@ -1,5 +1,6 @@ import { Route } from '@/types'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; +import { calculate } from './util'; export const route: Route = { path: '/discount/:platform', @@ -23,20 +24,59 @@ export const route: Route = { }; const PLATFORM_MAP = { - pc: 'PC', - switch: 'Switch', - psn: 'PSN', - xbox: 'Xbox', + pc: { + key: 'pc', + desc: 'PC', + }, + switch: { + key: 'switch', + desc: 'Switch', + }, + psn: { + key: 'ps4', + desc: 'PSN', + }, + xbox: { + key: 'xbox', + desc: 'Xbox', + }, }; +function getDiscountDesc(discount) { + return `${(100 - discount) / 10}折`; +} + +function getLowestDesc(priceInfo, isSuperLowest = false) { + if (!('is_lowest' in priceInfo) || priceInfo.is_lowest === 0) { + return ''; + } else if (isSuperLowest) { + return '[超史低]'; + } else if (priceInfo.is_lowest && priceInfo.is_lowest === 1 && priceInfo.new_lowest && priceInfo.new_lowest === 1) { + return '[新史低]'; + } else if (priceInfo.is_lowest && priceInfo.is_lowest === 1) { + return '[史低]'; + } +} + +function getHeyboxPriceDesc(heyboxPriceInfo) { + if (heyboxPriceInfo.coupon_info) { + let discountPrice = heyboxPriceInfo.cost_coin / 1000; + discountPrice = discountPrice - heyboxPriceInfo.coupon_info.max_reduce; + const formatPrice = Number.isInteger(discountPrice) ? discountPrice.toFixed(0) : discountPrice.toFixed(2); + return `| 券后价: ${formatPrice} [${heyboxPriceInfo.coupon_info.coupon_desc}]`; + } else { + return ''; + } +} + async function handler(ctx) { - const platform = ctx.req.param('platform'); + const platformInfo = PLATFORM_MAP[ctx.req.param('platform')]; - const response = await got({ - method: 'get', - url: `https://api.xiaoheihe.cn/game/get_game_list_v3?sort_type=discount&filter_head=${platform}&offset=0&limit=30&os_type=web`, - }); - const data = response.data.result.games; + const dataUrl = calculate( + `https://api.xiaoheihe.cn/game/get_game_list_v3/?filter_head=${platformInfo.key}&offset=0&limit=30&os_type=web&app=heybox&client_type=mobile&version=999.0.3&x_client_type=web&x_os_type=Mac&x_app=heybox&heybox_id=-1&include_filter=-1` + ); + const response = await ofetch(dataUrl); + const data = response.result.games; const items = data.map((item) => { const title = `${item.name}${item.name_en ? '/' + item.name_en : ''}`; @@ -47,44 +87,48 @@ async function handler(ctx) { for (const platform of item.platform_infos) { if (platform.price) { if (platform.key) { - description += `平台: ${platform.key}<br/>>`; + description += `平台: ${platform.key.toUpperCase()}<br/>`; } if (platform.price.current) { - description += `当前价格: ${platform.price.current}${platform.price.discount === platform.price.lowest_discount ? '[史低]' : ''}<br/>`; + description += `当前价格: ${platform.price.current} ${getLowestDesc(platform.price)}<br/>`; } if (platform.price.initial) { description += `原价: ${platform.price.initial}<br/>`; } - if (platform.price.discount_desc) { - description += `折扣力度: ${platform.price.discount_desc}<br/>`; + if (platform.price.discount && platform.price.discount > 0) { + description += `折扣力度: ${getDiscountDesc(platform.price.discount)}<br/>`; } if (platform.price.deadline_date) { description += `截止时间: ${platform.price.deadline_date}<br/>`; } - description += '<br/>'; } } } else { if (item.price) { - description += `平台: ${platform.toUpperCase()}<br/>`; - if (item.price.discount) { - description += `折扣力度: ${(100 - item.price.discount) / 10}折<br/>`; - } - if (item.price.initial && item.price.discount) { - const current = Math.round((item.price.initial * (100 - item.price.discount)) / 100); - description += `当前价格: ${current}${item.price.discount === item.price.lowest_discount ? '[史低]' : ''}  `; + description += `平台: ${platformInfo.desc}<br/>`; + if (item.heybox_price) { + description += `当前价格: ${item.price.current} ${getHeyboxPriceDesc(item.heybox_price)} ${getLowestDesc(item.price, item.heybox_price.super_lowest)}<br/>`; + } else if (item.price.current) { + description += `当前价格: ${item.price.current} ${getLowestDesc(item.price)}<br/>`; } if (item.price.initial) { description += `原价: ${item.price.initial}<br/>`; } - if (item.score) { - description += `评分: ${item.score}<br/>`; + if (item.price.discount && item.price.discount > 0) { + description += `折扣力度: ${getDiscountDesc(item.price.discount)}<br/>`; + } + if (item.price.deadline_date) { + description += `截止时间: ${item.price.deadline_date}<br/>`; } - description += '<br/>'; } } + if (item.score) { + description += `评分: ${item.score}<br/>`; + } + description += '<br/>'; + let link = `https://api.xiaoheihe.cn/game/share_game_detail?appid=${item.steam_appid}`; - if (platform === 'pc') { + if (platformInfo.key === 'pc') { link = `https://store.steampowered.com/app/${item.steam_appid}`; } return { @@ -95,7 +139,7 @@ async function handler(ctx) { }); return { - title: `小黑盒 ${PLATFORM_MAP[platform]} 游戏折扣`, + title: `小黑盒 ${platformInfo.desc} 游戏折扣`, link: `https://xiaoheihe.cn`, item: items, }; From d2905cf94409e04b92ea90f4e0dd99afb4cb9dd9 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Sun, 10 Nov 2024 18:37:30 +0800 Subject: [PATCH 463/740] docs: fix doc build --- lib/routes/deeplearning/the-batch.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/deeplearning/the-batch.ts b/lib/routes/deeplearning/the-batch.ts index 3456d03f822d2a8..11d50796b6a26d7 100644 --- a/lib/routes/deeplearning/the-batch.ts +++ b/lib/routes/deeplearning/the-batch.ts @@ -145,14 +145,14 @@ export const route: Route = { handler, example: '/deeplearning/the-batch', parameters: { tag: 'Tag, Weekly Issues by default' }, - description: `:::tip + description: `::: tip If you subscribe to [Data Points](https://www.deeplearning.ai/the-batch/tag/data-points/),where the URL is \`https://www.deeplearning.ai/the-batch/tag/data-points/\`, extract the part \`https://www.deeplearning.ai/the-batch/tag\` to the end, which is \`data-points\`, and use it as the parameter to fill in. Therefore, the route will be [\`/deeplearning/the-batch/data-points\`](https://rsshub.app/deeplearning/the-batch/data-points). ::: | Tag | ID | | ---------------------------------------------------------------------- | -------------------------------------------------------------------- | - | [Weekly Issues](https://www.deeplearning.ai/the-batch/) | [<null>](https://rsshub.app/deeplearning/the-batch) | + | [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) | From 468bfcd55a709da7ed03d1ad278ffe0e6d885c88 Mon Sep 17 00:00:00 2001 From: AiraNadih <128119996+AiraNadih@users.noreply.github.com> Date: Sun, 10 Nov 2024 19:52:35 +0800 Subject: [PATCH 464/740] feat(route/bsky): replace video thumbnail with video player (#17499) * feat(route/bsky): replace video thumbnail with video player * Update lib/routes/bsky/templates/post.art --------- --- lib/routes/bsky/posts.ts | 1 - lib/routes/bsky/templates/post.art | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index dda7eb999ec31ab..20c15a7bed58bca 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -63,7 +63,6 @@ async function handler(ctx) { text: post.record.text.replaceAll('\n', '<br>'), embed: post.embed, // embed.$type "app.bsky.embed.record#view" and "app.bsky.embed.recordWithMedia#view" are not handled - // "app.bsky.embed.video#view" is rendered as image }), author: post.author.displayName, pubDate: parseDate(post.record.createdAt), diff --git a/lib/routes/bsky/templates/post.art b/lib/routes/bsky/templates/post.art index 54edbfc88b000d4..80d41fea1844caa 100644 --- a/lib/routes/bsky/templates/post.art +++ b/lib/routes/bsky/templates/post.art @@ -8,7 +8,14 @@ <img src="{{ i.fullsize }}" alt="{{ i.alt }}"><br> {{ /each }} {{ else if embed.$type === 'app.bsky.embed.video#view' }} - <img src="{{ embed.thumbnail }}"><br> + <video + controls + poster="{{ embed.thumbnail }}" + style="max-width: 100%; height: auto;" + preload="metadata"> + <source src="{{ embed.playlist }}" type="application/x-mpegURL"> + Your browser does not support HTML5 video playback. + </video><br> {{ else if embed.$type === 'app.bsky.embed.external#view' }} <a href="{{ embed.external.uri }}"><b>{{ embed.external.title }}</b><br> {{ embed.external.description }} From 6895333c057ad763728339334db26d1b8b67c7e0 Mon Sep 17 00:00:00 2001 From: XU Ke <kexu567@gmail.com> Date: Sun, 10 Nov 2024 20:36:42 +0800 Subject: [PATCH 465/740] =?UTF-8?q?feat:=20add=20route=20for=20School=20of?= =?UTF-8?q?=20Economics=20&=20Management,=20Tongji=20University=20(?= =?UTF-8?q?=E5=90=8C=E6=B5=8E=E5=A4=A7=E5=AD=A6=E7=BB=8F=E6=B5=8E=E4=B8=8E?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=AD=A6=E9=99=A2)=20(#17516)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add RSS for Tongji SEM * Update notice.ts * Update _utils.ts * Update notice.ts Fix url * Update notice.ts Fetch data from the first page only. * Update notice.ts * Use the redirected URL instead * Update code --- lib/routes/tongji/sem/_utils.ts | 39 +++++++++++++++++++++++++++++++++ lib/routes/tongji/sem/notice.ts | 34 ++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+) create mode 100644 lib/routes/tongji/sem/_utils.ts create mode 100644 lib/routes/tongji/sem/notice.ts diff --git a/lib/routes/tongji/sem/_utils.ts b/lib/routes/tongji/sem/_utils.ts new file mode 100644 index 000000000000000..2a45f9c2ce628a0 --- /dev/null +++ b/lib/routes/tongji/sem/_utils.ts @@ -0,0 +1,39 @@ +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import { config } from '@/config'; + +export async function getNotifByPage() { + const pageUrl: string = `https://sem.tongji.edu.cn/semch/category/frontpage/notice`; + + try { + const response = await got.get(pageUrl, { + headers: { + 'User-Agent': config.ua, + }, + }); + + const html = response.body; + const $ = load(html); + + const notifListElements = $('#page-wrap > div.maim_pages > div > div.leftmain_page > div > ul > li'); + + return notifListElements.toArray().map((Element) => { + const aTagFirst = $(Element).find('a.bt'); + const aTagSecond = $(Element).find('a.time'); + + const title = aTagFirst.attr('title'); + const href = aTagFirst.attr('href'); + const time = aTagSecond.text().trim(); + + return { + title, + link: href, + pubDate: parseDate(time, 'YYYY-MM-DD'), + }; + }); + } catch { + // console.error(error); + } + return []; +} diff --git a/lib/routes/tongji/sem/notice.ts b/lib/routes/tongji/sem/notice.ts new file mode 100644 index 000000000000000..55651dad99c78f5 --- /dev/null +++ b/lib/routes/tongji/sem/notice.ts @@ -0,0 +1,34 @@ +// Warning: The author still knows nothing about javascript! +import { Route } from '@/types'; +import { getNotifByPage } from './_utils'; + +export const route: Route = { + path: '/sem', + categories: ['university'], + example: '/tongji/sem', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '经济与管理学院通知', + maintainers: ['sitdownkevin'], + url: 'sem.tongji.edu.cn/semch/category/frontpage/notice', + handler, + description: ``, +}; + +async function handler() { + const results = await getNotifByPage(); + + // feed the data to rss + return { + title: '同济大学经济与管理学院', + link: 'https://sem.tongji.edu.cn/semch/category/frontpage/notice', + item: results, + }; +} From 7b1c166a60b356a8673ace0d8702c5f73bc27d3c Mon Sep 17 00:00:00 2001 From: ueiu <39592269+ueiu@users.noreply.github.com> Date: Mon, 11 Nov 2024 08:13:06 +0800 Subject: [PATCH 466/740] =?UTF-8?q?fix(route/zhonglun):=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=B8=AD=E4=BC=A6=E5=BE=8B=E5=B8=88=E4=BA=8B=E5=8A=A1?= =?UTF-8?q?=E6=89=80=E7=A0=94=E7=A9=B6=E6=96=87=E7=AB=A0=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=94=B9=E7=89=88=E5=AF=BC=E8=87=B4=E6=95=B0=E6=8D=AE=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=8E=B7=E5=8F=96=20(#17527)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/zhonglun/index.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/routes/zhonglun/index.ts b/lib/routes/zhonglun/index.ts index 01e7ed05a3b7253..8f5a6d05cda2218 100644 --- a/lib/routes/zhonglun/index.ts +++ b/lib/routes/zhonglun/index.ts @@ -20,22 +20,21 @@ export const handler = async (ctx) => { const $ = load(response); - let items = $('div#dataList h3') + let items = $('div#dataList > dl > dd, div#dataList > ul > li') .slice(0, limit) .toArray() .map((item) => { item = $(item); - const title = item.text(); const description = art(path.join(__dirname, 'templates/description.art'), { - intro: item.next().text(), + intro: item.find('p').text(), }); return { - title, + title: item.find('h3 > a').text(), description, - pubDate: parseDate(item.find('span').first().text()), - link: item.find('a').prop('href'), + pubDate: parseDate(item.find('span').text()), + link: item.find('h3 > a').prop('href'), language, }; }); From 2e6aef65758403354501642dca4676b04d1fcbb9 Mon Sep 17 00:00:00 2001 From: Loongphy Wei <Loongphy@outlook.com> Date: Mon, 11 Nov 2024 08:36:06 +0800 Subject: [PATCH 467/740] feat(route): google developers blog (#17521) * feat(route): google developers blog * docs: fix category --------- --- lib/routes/google/developers.ts | 71 +++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 lib/routes/google/developers.ts diff --git a/lib/routes/google/developers.ts b/lib/routes/google/developers.ts new file mode 100644 index 000000000000000..54777fc1bfe7e17 --- /dev/null +++ b/lib/routes/google/developers.ts @@ -0,0 +1,71 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import type { Context } from 'hono'; + +const baseUrl = 'https://developers.googleblog.com'; + +export const route: Route = { + path: '/developers/:locale?', + name: 'Developers Blog', + url: 'developers.googleblog.com', + maintainers: ['Loongphy'], + handler, + example: '/google/developers/en', + parameters: { + locale: { + description: 'language', + default: 'en', + options: [ + { value: 'en', label: 'English' }, + { value: 'es', label: 'Español (Latam)' }, + { value: 'id', label: 'Bahasa Indonesia' }, + { value: 'ja', label: '日本語' }, + { value: 'ko', label: '한국어' }, + { value: 'pt-br', label: 'Português (Brasil)' }, + { value: 'zh-hans', label: '简体中文' }, + ], + }, + }, + description: 'Google Developers Blog', + categories: ['blog'], + radar: [ + { + source: ['developers.googleblog.com'], + }, + ], +}; + +async function handler(ctx: Context) { + const locale = ctx.req.param('locale') ?? 'en'; + + const response = await ofetch(`${baseUrl}/${locale}/search`); + const $ = load(response); + + const items = $('.search-result') + .toArray() + .map((element) => { + const dateCategory = $(element).find('.search-result__eyebrow').text().trim(); + const [date, category] = dateCategory.split(' / '); + const titleElement = $(element).find('.search-result__title a'); + const title = titleElement.text().trim(); + const link = titleElement.attr('href'); + const summary = $(element).find('.search-result__summary').text().trim(); + + return { + title, + link: `${baseUrl}${link}`, + pubDate: parseDate(date), + description: summary, + author: 'Google', + category: [category], + }; + }); + + return { + title: 'Google Developers Blog', + link: baseUrl, + item: items, + }; +} From ef8660285398ad570cce949cc3b507b3aad424c1 Mon Sep 17 00:00:00 2001 From: Neko Aria <23137034+NekoAria@users.noreply.github.com> Date: Mon, 11 Nov 2024 10:09:12 +0800 Subject: [PATCH 468/740] feat(route/discord): add guild messages search with comprehensive parameters (#17522) * feat(route/discord): add guild messages search with comprehensive parameters * fix(route/discord): enhance search parameter validation and filtering * Update lib/routes/discord/search.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> --------- Co-authored-by: NekoAria <NekoAria@users.noreply.github.com> --- lib/routes/discord/discord-api.ts | 46 ++++++++++++- lib/routes/discord/search.ts | 103 ++++++++++++++++++++++++++++++ 2 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 lib/routes/discord/search.ts diff --git a/lib/routes/discord/discord-api.ts b/lib/routes/discord/discord-api.ts index e5576a944d5b34f..9cf85e3ec2c87b2 100644 --- a/lib/routes/discord/discord-api.ts +++ b/lib/routes/discord/discord-api.ts @@ -1,7 +1,9 @@ +import { APIMessage } from 'discord-api-types/v10'; +import { RESTGetAPIGuildResult, RESTGetAPIGuildChannelsResult, RESTGetAPIChannelResult, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult } from 'discord-api-types/rest/v10'; + +import { config } from '@/config'; import cache from '@/utils/cache'; import ofetch from '@/utils/ofetch'; -import { config } from '@/config'; -import { RESTGetAPIGuildResult, RESTGetAPIGuildChannelsResult, RESTGetAPIChannelResult, RESTGetAPIChannelMessagesQuery, RESTGetAPIChannelMessagesResult } from 'discord-api-types/rest/v10'; export const baseUrl = 'https://discord.com'; const apiUrl = `${baseUrl}/api/v10`; @@ -48,3 +50,43 @@ export const getChannelMessages = (channelId, authorization, limit = 100) => config.cache.routeExpire, false ) as Promise<RESTGetAPIChannelMessagesResult>; + +interface SearchGuildMessagesResult { + analytics_id: string; + doing_deep_historical_index: boolean; + total_results: number; + messages: APIMessage[][]; +} + +export const VALID_HAS_TYPES = new Set(['link', 'embed', 'poll', 'file', 'video', 'image', 'sound', 'sticker', 'snapshot'] as const); + +export type HasType = typeof VALID_HAS_TYPES extends Set<infer T> ? T : never; + +export interface SearchGuildMessagesParams { + content?: string; + author_id?: string; + mentions?: string; + has?: HasType[]; + max_id?: string; + min_id?: string; + channel_id?: string; + pinned?: boolean; +} + +export const searchGuildMessages = (guildId: string, authorization: string, params: SearchGuildMessagesParams) => + cache.tryGet( + `discord:guilds:${guildId}:search:${JSON.stringify(params)}`, + () => { + const queryParams = { + ...params, + has: params.has?.length ? params.has : undefined, + }; + + return ofetch(`${apiUrl}/guilds/${guildId}/messages/search`, { + headers: { authorization }, + query: queryParams, + }); + }, + config.cache.routeExpire, + false + ) as Promise<SearchGuildMessagesResult>; diff --git a/lib/routes/discord/search.ts b/lib/routes/discord/search.ts new file mode 100644 index 000000000000000..633539f7d0a3905 --- /dev/null +++ b/lib/routes/discord/search.ts @@ -0,0 +1,103 @@ +import path from 'node:path'; + +import { config } from '@/config'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; +import { Route } from '@/types'; +import { parseDate } from '@/utils/parse-date'; +import { art } from '@/utils/render'; +import ConfigNotFoundError from '@/errors/types/config-not-found'; +import { queryToBoolean } from '@/utils/readable-social'; + +import { baseUrl, getGuild, searchGuildMessages, SearchGuildMessagesParams, HasType, VALID_HAS_TYPES } from './discord-api'; + +export const route: Route = { + path: '/search/:guildId/:routeParams', + categories: ['social-media'], + example: '/discord/search/302094807046684672/content=friendly&has=image,video', + parameters: { + guildId: 'Guild ID', + routeParams: 'Search parameters, support content, author_id, mentions, has, min_id, max_id, channel_id, pinned', + }, + features: { + requireConfig: [ + { + name: 'DISCORD_AUTHORIZATION', + description: 'Discord authorization header', + }, + ], + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Guild Search', + maintainers: ['NekoAria'], + handler, +}; + +const parseSearchParams = (routeParams?: string): SearchGuildMessagesParams => { + const parsed = new URLSearchParams(routeParams); + const hasTypes = parsed.get('has')?.split(',').filter(Boolean); + const validHasTypes = hasTypes?.filter((type) => VALID_HAS_TYPES.has(type as HasType)) as HasType[]; + + const params = { + content: parsed.get('content') ?? undefined, + author_id: parsed.get('author_id') ?? undefined, + mentions: parsed.get('mentions') ?? undefined, + has: validHasTypes?.length ? validHasTypes : undefined, + min_id: parsed.get('min_id') ?? undefined, + max_id: parsed.get('max_id') ?? undefined, + channel_id: parsed.get('channel_id') ?? undefined, + pinned: parsed.has('pinned') ? queryToBoolean(parsed.get('pinned')) : undefined, + }; + + return Object.fromEntries(Object.entries(params).filter(([, value]) => value !== undefined)); +}; + +async function handler(ctx) { + const { authorization } = config.discord || {}; + if (!authorization) { + throw new ConfigNotFoundError('Discord RSS is disabled due to the lack of authorization config'); + } + + const { guildId } = ctx.req.param(); + const searchParams = parseSearchParams(ctx.req.param('routeParams')); + + if (!Object.keys(searchParams).length) { + throw new InvalidParameterError('At least one valid search parameter is required'); + } + + const [guildInfo, searchResult] = await Promise.all([getGuild(guildId, authorization), searchGuildMessages(guildId, authorization, searchParams)]); + + if (!searchResult?.messages?.length) { + return { + title: `Search Results - ${guildInfo.name}`, + link: `${baseUrl}/channels/${guildId}`, + item: [], + allowEmpty: true, + }; + } + + const messages = searchResult.messages.flat().map((message) => ({ + title: message.content.split('\n')[0] || '(no content)', + description: art(path.join(__dirname, 'templates/message.art'), { message, guildInfo }), + author: message.author.global_name ?? message.author.username, + pubDate: parseDate(message.timestamp), + updated: message.edited_timestamp ? parseDate(message.edited_timestamp) : undefined, + category: [`#${message.channel_id}`], + link: `${baseUrl}/channels/${guildId}/${message.channel_id}/${message.id}`, + })); + + const searchDesc = Object.entries(searchParams) + .filter(([, value]) => value !== undefined) + .map(([key, value]) => `${key}:${Array.isArray(value) ? value.join(',') : value}`) + .join(' '); + + return { + title: `Search "${searchDesc}" in ${guildInfo.name} - Discord`, + link: `${baseUrl}/channels/${guildId}`, + item: messages, + allowEmpty: true, + }; +} From 47a9bc50f0d7afb3caa723019f4943b043cb7b29 Mon Sep 17 00:00:00 2001 From: XU Ke <kexu567@gmail.com> Date: Mon, 11 Nov 2024 11:52:14 +0800 Subject: [PATCH 469/740] feat(route/tongji/sem): Add description for articles (#17528) --- lib/routes/tongji/sem/_utils.ts | 28 +++++++++++++++++++++++++++- lib/routes/tongji/sem/notice.ts | 14 ++++++++++---- 2 files changed, 37 insertions(+), 5 deletions(-) diff --git a/lib/routes/tongji/sem/_utils.ts b/lib/routes/tongji/sem/_utils.ts index 2a45f9c2ce628a0..7a1d6c0d2d919e8 100644 --- a/lib/routes/tongji/sem/_utils.ts +++ b/lib/routes/tongji/sem/_utils.ts @@ -3,7 +3,7 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; -export async function getNotifByPage() { +export async function getNotifByPage(): Promise<{ title: string; link: string; pubDate: Date }[]> { const pageUrl: string = `https://sem.tongji.edu.cn/semch/category/frontpage/notice`; try { @@ -37,3 +37,29 @@ export async function getNotifByPage() { } return []; } + +export async function getArticle(item) { + const articleUrl: string = item.link; + + if (articleUrl.includes('sem.tongji.edu.cn/semch')) { + // console.log(articleUrl); + + try { + const response = await got.get(articleUrl, { + headers: { + 'User-Agent': config.ua, + }, + }); + + const html = response.body; + const $ = load(html); + + const articleContentElement = $('#page-wrap > div.maim_pages > div > div.leftmain_page > div'); + item.description = articleContentElement ? articleContentElement.html() : ''; + } catch { + // console.error(error); + } + } + + return item; +} diff --git a/lib/routes/tongji/sem/notice.ts b/lib/routes/tongji/sem/notice.ts index 55651dad99c78f5..97772afc5ead915 100644 --- a/lib/routes/tongji/sem/notice.ts +++ b/lib/routes/tongji/sem/notice.ts @@ -1,6 +1,7 @@ // Warning: The author still knows nothing about javascript! import { Route } from '@/types'; -import { getNotifByPage } from './_utils'; +import { getNotifByPage, getArticle } from './_utils'; +import cache from '@/utils/cache'; export const route: Route = { path: '/sem', @@ -23,12 +24,17 @@ export const route: Route = { }; async function handler() { - const results = await getNotifByPage(); + const results: { title: string; link: string; pubDate: Date }[] = await getNotifByPage(); + const resultsWithContent = await Promise.all(results.map((item) => cache.tryGet(item.link, () => getArticle(item)))); // feed the data to rss return { title: '同济大学经济与管理学院', - link: 'https://sem.tongji.edu.cn/semch/category/frontpage/notice', - item: results, + description: '同济大学经济与管理学院官网通知', + language: 'zh-cn', + image: 'https://sem.tongji.edu.cn/semch/wp-content/themes/wood-themes-cn/images/pages/page_banner.gif', + logo: 'https://tongji.edu.cn/images/badge.png', + link: 'https://sem.tongji.edu.cn/semch', + item: resultsWithContent, }; } From a490992da2b30c40185d46b1805c94f1d35819b9 Mon Sep 17 00:00:00 2001 From: Neko Aria <23137034+NekoAria@users.noreply.github.com> Date: Mon, 11 Nov 2024 12:11:12 +0800 Subject: [PATCH 470/740] fix(route/discord): add missing `__dirname` definition in search route (#17530) Co-authored-by: NekoAria <NekoAria@users.noreply.github.com> --- lib/routes/discord/search.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/routes/discord/search.ts b/lib/routes/discord/search.ts index 633539f7d0a3905..5e36f35d865bf21 100644 --- a/lib/routes/discord/search.ts +++ b/lib/routes/discord/search.ts @@ -3,6 +3,7 @@ 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'; @@ -10,6 +11,8 @@ 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'], From 787cb1c76ae17d5ca23f0de5233dc9a24e61a5de Mon Sep 17 00:00:00 2001 From: Jeff Wen <sinchangwen@gmail.com> Date: Mon, 11 Nov 2024 13:23:20 +0800 Subject: [PATCH 471/740] fix(route/mastodon): Correct the only_media param (#17531) --- lib/routes/mastodon/account-id.ts | 2 +- lib/routes/mastodon/acct.ts | 2 +- lib/routes/mastodon/timeline-local.ts | 4 ++-- lib/routes/mastodon/timeline-remote.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/routes/mastodon/account-id.ts b/lib/routes/mastodon/account-id.ts index f1fb49110e228fd..1d9ddf90a24d1d4 100644 --- a/lib/routes/mastodon/account-id.ts +++ b/lib/routes/mastodon/account-id.ts @@ -36,7 +36,7 @@ export const route: Route = { async function handler(ctx) { const site = ctx.req.param('site'); const account_id = ctx.req.param('account_id'); - const only_media = ctx.req.param('only_media') ? 'true' : 'false'; + const only_media = ctx.req.param('only_media') === 'true' ? 'true' : 'false'; if (!config.feature.allow_user_supply_unsafe_domain && !utils.allowSiteList.includes(site)) { throw new ConfigNotFoundError(`This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`); } diff --git a/lib/routes/mastodon/acct.ts b/lib/routes/mastodon/acct.ts index ae5f5b919ef6d7d..6ee925dcb2bd673 100644 --- a/lib/routes/mastodon/acct.ts +++ b/lib/routes/mastodon/acct.ts @@ -35,7 +35,7 @@ However, you can still specify these route-specific configurations if you need t async function handler(ctx) { const acct = ctx.req.param('acct'); - const only_media = ctx.req.param('only_media') ? 'true' : 'false'; + const only_media = ctx.req.param('only_media') === 'true' ? 'true' : 'false'; const { site, account_id } = await utils.getAccountIdByAcct(acct); diff --git a/lib/routes/mastodon/timeline-local.ts b/lib/routes/mastodon/timeline-local.ts index 1713c9e8fba5bb6..ad1b34e19b45c38 100644 --- a/lib/routes/mastodon/timeline-local.ts +++ b/lib/routes/mastodon/timeline-local.ts @@ -36,7 +36,7 @@ export const route: Route = { async function handler(ctx) { const site = ctx.req.param('site'); - const only_media = ctx.req.param('only_media') ? 'true' : 'false'; + const only_media = ctx.req.param('only_media') === 'true' ? 'true' : 'false'; if (!config.feature.allow_user_supply_unsafe_domain && !utils.allowSiteList.includes(site)) { throw new ConfigNotFoundError(`This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`); } @@ -47,7 +47,7 @@ async function handler(ctx) { const list = response.data; return { - title: `Local Public${ctx.req.param('only_media') ? ' Media' : ''} Timeline on ${site}`, + title: `Local Public${ctx.req.param('only_media') === 'true' ? ' Media' : ''} Timeline on ${site}`, link: `https://${site}`, item: utils.parseStatuses(list), }; diff --git a/lib/routes/mastodon/timeline-remote.ts b/lib/routes/mastodon/timeline-remote.ts index 5e9627353717317..bc441b9ece8415a 100644 --- a/lib/routes/mastodon/timeline-remote.ts +++ b/lib/routes/mastodon/timeline-remote.ts @@ -36,7 +36,7 @@ export const route: Route = { async function handler(ctx) { const site = ctx.req.param('site'); - const only_media = ctx.req.param('only_media') ? 'true' : 'false'; + const only_media = ctx.req.param('only_media') === 'true' ? 'true' : 'false'; if (!config.feature.allow_user_supply_unsafe_domain && !utils.allowSiteList.includes(site)) { throw new ConfigNotFoundError(`This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`); } @@ -47,7 +47,7 @@ async function handler(ctx) { const list = response.data; return { - title: `Federated Public${ctx.req.param('only_media') ? ' Media' : ''} Timeline on ${site}`, + title: `Federated Public${ctx.req.param('only_media') === 'true' ? ' Media' : ''} Timeline on ${site}`, link: `https://${site}`, item: utils.parseStatuses(list), }; From c2acbe1d2f9c6abba303ce5812ebeb3db880a069 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 08:31:28 +0000 Subject: [PATCH 472/740] chore(deps-dev): bump vite-tsconfig-paths from 5.1.0 to 5.1.2 (#17534) Bumps [vite-tsconfig-paths](https://github.com/aleclarson/vite-tsconfig-paths) from 5.1.0 to 5.1.2. - [Release notes](https://github.com/aleclarson/vite-tsconfig-paths/releases) - [Commits](https://github.com/aleclarson/vite-tsconfig-paths/compare/v5.1.0...v5.1.2) --- updated-dependencies: - dependency-name: vite-tsconfig-paths dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 9a8b96b46b46bc2..5996249273cb415 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "supertest": "7.0.0", "typescript": "5.6.3", "unified": "11.0.5", - "vite-tsconfig-paths": "5.1.0", + "vite-tsconfig-paths": "5.1.2", "vitest": "2.0.5", "yaml-eslint-parser": "1.2.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d3092e881e998e6..80b905931e84b3a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -433,8 +433,8 @@ importers: specifier: 11.0.5 version: 11.0.5 vite-tsconfig-paths: - specifier: 5.1.0 - version: 5.1.0(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)) + specifier: 5.1.2 + version: 5.1.2(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)) vitest: specifier: 2.0.5 version: 2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -5639,8 +5639,8 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-tsconfig-paths@5.1.0: - resolution: {integrity: sha512-Y1PLGHCJfAq1Zf4YIGEsmuU/NCX1epoZx9zwSr32Gjn3aalwQHRKr5aUmbo6r0JHeHkqmWpmDg7WOynhYXw1og==} + vite-tsconfig-paths@5.1.2: + resolution: {integrity: sha512-gEIbKfJzSEv0yR3XS2QEocKetONoWkbROj6hGx0FHM18qKUojhvcokQsxQx5nMkelZq2n37zbSGCJn+FSODSjA==} peerDependencies: vite: '*' peerDependenciesMeta: @@ -11642,7 +11642,7 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.0(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)): + vite-tsconfig-paths@5.1.2(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)): dependencies: debug: 4.3.7 globrex: 0.1.2 From 0f23e7a75bd7d0ee9d025e0b17149a8cc91c3cc8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 08:33:25 +0000 Subject: [PATCH 473/740] chore(deps): bump uuid from 11.0.2 to 11.0.3 (#17536) Bumps [uuid](https://github.com/uuidjs/uuid) from 11.0.2 to 11.0.3. - [Release notes](https://github.com/uuidjs/uuid/releases) - [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md) - [Commits](https://github.com/uuidjs/uuid/compare/v11.0.2...v11.0.3) --- updated-dependencies: - dependency-name: uuid dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 5996249273cb415..9d663f56905d5df 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "twitter-api-v2": "1.18.1", "ufo": "1.5.4", "undici": "6.20.1", - "uuid": "11.0.2", + "uuid": "11.0.3", "winston": "3.16.0", "xxhash-wasm": "1.0.2", "zod": "3.23.8" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 80b905931e84b3a..554f8c754f2da7b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -255,8 +255,8 @@ importers: specifier: 6.20.1 version: 6.20.1 uuid: - specifier: 11.0.2 - version: 11.0.2 + specifier: 11.0.3 + version: 11.0.3 winston: specifier: 3.16.0 version: 3.16.0 @@ -5601,8 +5601,8 @@ packages: resolution: {integrity: sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw==} engines: {node: '>= 4'} - uuid@11.0.2: - resolution: {integrity: sha512-14FfcOJmqdjbBPdDjFQyk/SdT4NySW4eM0zcG+HqbHP5jzuH56xO3J1DGhgs/cEMCfwYi3HQI1gnTO62iaG+tQ==} + uuid@11.0.3: + resolution: {integrity: sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==} hasBin: true uuid@3.4.0: @@ -11593,7 +11593,7 @@ snapshots: utility-types@3.11.0: {} - uuid@11.0.2: {} + uuid@11.0.3: {} uuid@3.4.0: {} From f9f22eb36fd3a39f5995ca8ee83e842a33fbc224 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 08:33:38 +0000 Subject: [PATCH 474/740] chore(deps): bump twitter-api-v2 from 1.18.1 to 1.18.2 (#17538) Bumps [twitter-api-v2](https://github.com/plhery/node-twitter-api-v2) from 1.18.1 to 1.18.2. - [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.18.1...1.18.2) --- updated-dependencies: - dependency-name: twitter-api-v2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 9d663f56905d5df..faa3057bf236d48 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", - "twitter-api-v2": "1.18.1", + "twitter-api-v2": "1.18.2", "ufo": "1.5.4", "undici": "6.20.1", "uuid": "11.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 554f8c754f2da7b..32a6d75728ccae1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -246,8 +246,8 @@ importers: specifier: 4.19.2 version: 4.19.2 twitter-api-v2: - specifier: 1.18.1 - version: 1.18.1 + specifier: 1.18.2 + version: 1.18.2 ufo: specifier: 1.5.4 version: 1.5.4 @@ -5460,8 +5460,8 @@ packages: tweetnacl@0.14.5: resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} - twitter-api-v2@1.18.1: - resolution: {integrity: sha512-6pChAlfH/7VakKnPfVdG2fjxVJJgKCXvvWhuEOCdJ52Y+rzmAmsnTKDgjhnj11XgboSYQx1bn3j2VWyR+vnRiA==} + twitter-api-v2@1.18.2: + resolution: {integrity: sha512-ggImmoAeVgETYqrWeZy+nWnDpwgTP+IvFEc03Pitt1HcgMX+Yw17rP38Fb5FFTinuyNvS07EPtAfZ184uIyB0A==} type-check@0.3.2: resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==} @@ -11480,7 +11480,7 @@ snapshots: tweetnacl@0.14.5: {} - twitter-api-v2@1.18.1: {} + twitter-api-v2@1.18.2: {} type-check@0.3.2: dependencies: From 1405f155405cf8e50ae3d3059feb4722a6037bfc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 08:33:56 +0000 Subject: [PATCH 475/740] chore(deps): bump @hono/node-server from 1.13.5 to 1.13.6 (#17541) Bumps [@hono/node-server](https://github.com/honojs/node-server) from 1.13.5 to 1.13.6. - [Release notes](https://github.com/honojs/node-server/releases) - [Commits](https://github.com/honojs/node-server/compare/v1.13.5...v1.13.6) --- updated-dependencies: - dependency-name: "@hono/node-server" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 faa3057bf236d48..906e8e7c90176b5 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "dependencies": { "@bbob/html": "4.1.1", "@bbob/preset-html5": "4.1.1", - "@hono/node-server": "1.13.5", + "@hono/node-server": "1.13.6", "@hono/zod-openapi": "0.17.0", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 32a6d75728ccae1..cd002bd117d82ec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: 4.1.1 version: 4.1.1 '@hono/node-server': - specifier: 1.13.5 - version: 1.13.5(hono@4.6.9) + specifier: 1.13.6 + version: 1.13.6(hono@4.6.9) '@hono/zod-openapi': specifier: 0.17.0 version: 0.17.0(hono@4.6.9)(zod@3.23.8) @@ -1348,8 +1348,8 @@ packages: resolution: {integrity: sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@hono/node-server@1.13.5': - resolution: {integrity: sha512-lSo+CFlLqAFB4fX7ePqI9nauEn64wOfJHAfc9duYFTvAG3o416pC0nTGeNjuLHchLedH+XyWda5v79CVx1PIjg==} + '@hono/node-server@1.13.6': + resolution: {integrity: sha512-Y2ivw4UmLIBKfzvkFgcsrhc0GLn272diGjlnKOF9T1OiY6ud4RaVO8FKEnifNkuU7meOeCU371/8fmhgeYf7Lw==} engines: {node: '>=18.14.1'} peerDependencies: hono: ^4 @@ -6871,7 +6871,7 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.5(hono@4.6.9)': + '@hono/node-server@1.13.6(hono@4.6.9)': dependencies: hono: 4.6.9 From 3d9311960db2f7afd7030178ed6e8eaf8f24e94a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 01:20:41 -0800 Subject: [PATCH 476/740] chore(deps): bump imapflow from 1.0.168 to 1.0.169 (#17540) Bumps [imapflow](https://github.com/postalsys/imapflow) from 1.0.168 to 1.0.169. - [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.168...v1.0.169) --- updated-dependencies: - dependency-name: imapflow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 906e8e7c90176b5..9ca11c686c12686 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", "iconv-lite": "0.6.3", - "imapflow": "1.0.168", + "imapflow": "1.0.169", "instagram-private-api": "1.46.1", "ioredis": "5.4.1", "ip-regex": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cd002bd117d82ec..61d5826de7e04df 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -129,8 +129,8 @@ importers: specifier: 0.6.3 version: 0.6.3 imapflow: - specifier: 1.0.168 - version: 1.0.168 + specifier: 1.0.169 + version: 1.0.169 instagram-private-api: specifier: 1.46.1 version: 1.46.1 @@ -3599,8 +3599,8 @@ packages: engines: {node: '>=6.9.0'} hasBin: true - imapflow@1.0.168: - resolution: {integrity: sha512-vPK06gESqQHh5P8qo2r1nth7v3nDvxvCd1qUATRtLoLWDvUvdHNYSkSoXn7lctXWssjRx8lMJg6e+9Dj2t/JTw==} + imapflow@1.0.169: + resolution: {integrity: sha512-bPq5KyS6TgNX9rj+khGnIsfwREEvM0OIqnkOgIzz2i/duBHUk5erXYe3+bCMWT89p2WDDyIQeRjezQ5rDwob/Q==} immediate@3.0.6: resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} @@ -9455,7 +9455,7 @@ snapshots: image-size@0.7.5: {} - imapflow@1.0.168: + imapflow@1.0.169: dependencies: encoding-japanese: 2.2.0 iconv-lite: 0.6.3 From 36e3bd52641a10cbd520f45f9062d734c21d7a7e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 01:20:55 -0800 Subject: [PATCH 477/740] chore(deps): bump tldts from 6.1.59 to 6.1.60 (#17535) Bumps [tldts](https://github.com/remusao/tldts) from 6.1.59 to 6.1.60. - [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.59...v6.1.60) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 9ca11c686c12686..cd73c9e3b18dc8e 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "telegram": "2.26.6", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.59", + "tldts": "6.1.60", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 61d5826de7e04df..72327cf975dd873 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -234,8 +234,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.59 - version: 6.1.59 + specifier: 6.1.60 + version: 6.1.60 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5355,11 +5355,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.59: - resolution: {integrity: sha512-EiYgNf275AQyVORl8HQYYe7rTVnmLb4hkWK7wAk/12Ksy5EiHpmUmTICa4GojookBPC8qkLMBKKwCmzNA47ZPQ==} + tldts-core@6.1.60: + resolution: {integrity: sha512-XHjoxak8SFQnHnmYHb3PcnW5TZ+9ErLZemZei3azuIRhQLw4IExsVbL3VZJdHcLeNaXq6NqawgpDPpjBOg4B5g==} - tldts@6.1.59: - resolution: {integrity: sha512-472ilPxsRuqBBpn+KuRBHJvZhk6tTo4yTVsmODrLBNLwRYJPkDfMEHivgNwp5iEl+cbrZzzRtLKRxZs7+QKkRg==} + tldts@6.1.60: + resolution: {integrity: sha512-TYVHm7G9NCnhgqOsFalbX6MG1Po5F4efF+tLfoeiOGQq48Oqgwcgz8upY2R1BHWa4aDrj28RYx0dkYJ63qCFMg==} hasBin: true tmp@0.0.33: @@ -11391,11 +11391,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.59: {} + tldts-core@6.1.60: {} - tldts@6.1.59: + tldts@6.1.60: dependencies: - tldts-core: 6.1.59 + tldts-core: 6.1.60 tmp@0.0.33: dependencies: @@ -11431,7 +11431,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.59 + tldts: 6.1.60 tr46@0.0.3: {} From ede76729122de05e1164648860cdaab6a29d8231 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 01:25:06 -0800 Subject: [PATCH 478/740] chore(deps): bump winston from 3.16.0 to 3.17.0 (#17537) Bumps [winston](https://github.com/winstonjs/winston) from 3.16.0 to 3.17.0. - [Release notes](https://github.com/winstonjs/winston/releases) - [Changelog](https://github.com/winstonjs/winston/blob/master/CHANGELOG.md) - [Commits](https://github.com/winstonjs/winston/compare/v3.16.0...v3.17.0) --- updated-dependencies: - dependency-name: winston dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 68 +++++++++++--------------------------------------- 2 files changed, 16 insertions(+), 54 deletions(-) diff --git a/package.json b/package.json index cd73c9e3b18dc8e..df91469cef147de 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "ufo": "1.5.4", "undici": "6.20.1", "uuid": "11.0.3", - "winston": "3.16.0", + "winston": "3.17.0", "xxhash-wasm": "1.0.2", "zod": "3.23.8" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 72327cf975dd873..8932af41a451fe8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -258,8 +258,8 @@ importers: specifier: 11.0.3 version: 11.0.3 winston: - specifier: 3.16.0 - version: 3.16.0 + specifier: 3.17.0 + version: 3.17.0 xxhash-wasm: specifier: 1.0.2 version: 1.0.2 @@ -2090,10 +2090,6 @@ packages: resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - abort-controller@3.0.0: - resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} - engines: {node: '>=6.5'} - acorn-import-attributes@1.9.5: resolution: {integrity: sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==} peerDependencies: @@ -3109,17 +3105,9 @@ packages: event-emitter@0.3.5: resolution: {integrity: sha512-D9rRn9y7kLPnJ+hMq7S/nhvoKwwvVJahBi2BPmx3bvbsEdK3W9ii8cBSGjP+72/LnM4n6fo3+dkCX5FeTQruXA==} - event-target-shim@5.0.1: - resolution: {integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==} - engines: {node: '>=6'} - eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} - events@3.3.0: - resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} - engines: {node: '>=0.8.x'} - execa@0.8.0: resolution: {integrity: sha512-zDWS+Rb1E8BlqqhALSt9kUhss8Qq4nN3iof3gsOdyINksElaPyNBtKUMTR62qhvgVWR0CqCX7sdnKe4MnUbFEA==} engines: {node: '>=4'} @@ -4022,8 +4010,8 @@ packages: resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} engines: {node: '>=18'} - logform@2.6.1: - resolution: {integrity: sha512-CdaO738xRapbKIMVn2m4F6KTj4j7ooJ8POVnebSgKo3KBz5axNXRAL7ZdRjIV6NOr2Uf4vjtRkxrFETOioCqSA==} + logform@2.7.0: + resolution: {integrity: sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==} engines: {node: '>= 12.0.0'} long@5.2.3: @@ -4664,10 +4652,6 @@ packages: process-warning@4.0.0: resolution: {integrity: sha512-/MyYDxttz7DfGMMHiysAsFE4qF+pQYAA8ziO/3NcRVrQ5fSk+Mns4QZA/oRPFzvcqNoVJXQNWNAsdwBXLUkQKw==} - process@0.11.10: - resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} - engines: {node: '>= 0.6.0'} - progress@2.0.3: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} engines: {node: '>=0.4.0'} @@ -4830,10 +4814,6 @@ packages: resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} engines: {node: '>= 6'} - readable-stream@4.5.2: - resolution: {integrity: sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - real-cancellable-promise@1.2.0: resolution: {integrity: sha512-FYhmx1FVSgoPRjneoTjh+EKZcNb8ijl/dyatTzase5eujYhVrLNDOiIY6AgQq7GU1kOoLgEd9jLVbhFg8k8dOQ==} @@ -5753,12 +5733,12 @@ packages: wide-align@1.1.5: resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - winston-transport@4.8.0: - resolution: {integrity: sha512-qxSTKswC6llEMZKgCQdaWgDuMJQnhuvF5f2Nk3SNXc4byfQ+voo2mX1Px9dkNOuR8p0KAjfPG29PuYUSIb+vSA==} + winston-transport@4.9.0: + resolution: {integrity: sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==} engines: {node: '>= 12.0.0'} - winston@3.16.0: - resolution: {integrity: sha512-xz7+cyGN5M+4CmmD4Npq1/4T+UZaz7HaeTlAruFUTjk79CNMq+P6H30vlE4z0qfqJ01VHYQwd7OZo03nYm/+lg==} + winston@3.17.0: + resolution: {integrity: sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==} engines: {node: '>= 12.0.0'} word-wrap@1.2.5: @@ -7725,10 +7705,6 @@ snapshots: abbrev@2.0.0: {} - abort-controller@3.0.0: - dependencies: - event-target-shim: 5.0.1 - acorn-import-attributes@1.9.5(acorn@8.14.0): dependencies: acorn: 8.14.0 @@ -8881,12 +8857,8 @@ snapshots: d: 1.0.2 es5-ext: 0.10.64 - event-target-shim@5.0.1: {} - eventemitter3@5.0.1: {} - events@3.3.0: {} - execa@0.8.0: dependencies: cross-spawn: 5.1.0 @@ -9905,7 +9877,7 @@ snapshots: strip-ansi: 7.1.0 wrap-ansi: 9.0.0 - logform@2.6.1: + logform@2.7.0: dependencies: '@colors/colors': 1.6.0 '@types/triple-beam': 1.3.5 @@ -10638,8 +10610,6 @@ snapshots: process-warning@4.0.0: {} - process@0.11.10: {} - progress@2.0.3: {} proto-list@1.2.4: {} @@ -10824,14 +10794,6 @@ snapshots: string_decoder: 1.3.0 util-deprecate: 1.0.2 - readable-stream@4.5.2: - dependencies: - abort-controller: 3.0.0 - buffer: 6.0.3 - events: 3.3.0 - process: 0.11.10 - string_decoder: 1.3.0 - real-cancellable-promise@1.2.0: {} real-require@0.2.0: {} @@ -11752,25 +11714,25 @@ snapshots: dependencies: string-width: 4.2.3 - winston-transport@4.8.0: + winston-transport@4.9.0: dependencies: - logform: 2.6.1 - readable-stream: 4.5.2 + logform: 2.7.0 + readable-stream: 3.6.2 triple-beam: 1.4.1 - winston@3.16.0: + winston@3.17.0: dependencies: '@colors/colors': 1.6.0 '@dabh/diagnostics': 2.0.3 async: 3.2.6 is-stream: 2.0.1 - logform: 2.6.1 + logform: 2.7.0 one-time: 1.0.0 readable-stream: 3.6.2 safe-stable-stringify: 2.5.0 stack-trace: 0.0.10 triple-beam: 1.4.1 - winston-transport: 4.8.0 + winston-transport: 4.9.0 word-wrap@1.2.5: {} From 1f05d495da544fd53936d9a12d7a7035bc202d7a Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Mon, 11 Nov 2024 22:00:49 +0800 Subject: [PATCH 479/740] fix(bilibili)!: update ranking api (#17544) --- lib/routes/bilibili/ranking.ts | 287 +++++++++++++++++++-------------- 1 file changed, 170 insertions(+), 117 deletions(-) diff --git a/lib/routes/bilibili/ranking.ts b/lib/routes/bilibili/ranking.ts index 89f4dd612a54c59..fb69eaa1fdc8752 100644 --- a/lib/routes/bilibili/ranking.ts +++ b/lib/routes/bilibili/ranking.ts @@ -2,144 +2,197 @@ import { Route, ViewType } from '@/types'; import got from '@/utils/got'; import utils from './utils'; +// https://www.bilibili.com/v/popular/rank/all + +// 0 all https://api.bilibili.com/x/web-interface/ranking/v2?rid=0&type=all&web_location=333.934&w_rid=d4e0c1b83157e3d36836eb3c4258ef61&wts=1731320484 +// 1 bangumi https://api.bilibili.com/pgc/web/rank/list?day=3&season_type=1&web_location=333.934&w_rid=2d46eff2d363c4960bc875e63e24df6c&wts=1731320507 +// 2 guochan https://api.bilibili.com/pgc/season/rank/web/list?day=3&season_type=4&web_location=333.934&w_rid=b26195dc9ee2f925bc196da68df341a5&wts=1731320523 +// 3 guochuang https://api.bilibili.com/x/web-interface/ranking/v2?rid=168&type=all&web_location=333.934&w_rid=f99e5982b011eb24643a2daffb7baf00&wts=1731320537 +// 4 documentary https://api.bilibili.com/pgc/season/rank/web/list?day=3&season_type=3&web_location=333.934&w_rid=2067f7277cf49cbea4c5e5630eeb929a&wts=1731320556 +// 5 douga https://api.bilibili.com/x/web-interface/ranking/v2?rid=1&type=all&web_location=333.934&w_rid=14bf53ce651e8d575d5982b24e1cebdf&wts=1731320579 +// 6 music https://api.bilibili.com/x/web-interface/ranking/v2?rid=3&type=all&web_location=333.934&w_rid=70f4c870f860b9334ebe6e9fe835d3fe&wts=1731320595 +// 7 dance https://api.bilibili.com/x/web-interface/ranking/v2?rid=129&type=all&web_location=333.934&w_rid=691f713f7fc6d3cc08174affcc59f97c&wts=1731321260 +// 8 game https://api.bilibili.com/x/web-interface/ranking/v2?rid=4&type=all&web_location=333.934&w_rid=cac9f26f49da223cb8ab6f189250ec23&wts=1731320726 +// 9 knowledge https://api.bilibili.com/x/web-interface/ranking/v2?rid=36&type=all&web_location=333.934&w_rid=79c274d74e90d93ac7adfd2df968288e&wts=1731320750 +// 10 tech https://api.bilibili.com/x/web-interface/ranking/v2?rid=188&type=all&web_location=333.934&w_rid=115d9e69c48bf958622c4cc0ee861b57&wts=1731320766 +// 11 sports https://api.bilibili.com/x/web-interface/ranking/v2?rid=234&type=all&web_location=333.934&w_rid=c618d12f36e2379bda0c9a2754cd71e0&wts=1731320783 +// 12 car https://api.bilibili.com/x/web-interface/ranking/v2?rid=223&type=all&web_location=333.934&w_rid=753bc1395718051aa53aedaa3cd04d76&wts=1731320797 +// 13 life https://api.bilibili.com/x/web-interface/ranking/v2?rid=160&type=all&web_location=333.934&w_rid=3e8895d4749e905173886dd387f657e9&wts=1731320823 +// 14 food https://api.bilibili.com/x/web-interface/ranking/v2?rid=211&type=all&web_location=333.934&w_rid=9ec93cab672a98ea972dfb9cb7ed6368&wts=1731320838 +// 15 animal https://api.bilibili.com/x/web-interface/ranking/v2?rid=217&type=all&web_location=333.934&w_rid=794e69434ec4a818f4d589e5306e9a21&wts=1731320852 +// 16 kichiku https://api.bilibili.com/x/web-interface/ranking/v2?rid=119&type=all&web_location=333.934&w_rid=c5e35f3f247bc9294557ab90e0be166a&wts=1731320865 +// 17 fashion https://api.bilibili.com/x/web-interface/ranking/v2?rid=155&type=all&web_location=333.934&w_rid=f3711c888057a8fef1f47da9cf4bcd86&wts=1731320878 +// 18 ent https://api.bilibili.com/x/web-interface/ranking/v2?rid=5&type=all&web_location=333.934&w_rid=5ca1b2da22de1c9e818ac619d309fed2&wts=1731320889 +// 19 cinephile https://api.bilibili.com/x/web-interface/ranking/v2?rid=181&type=all&web_location=333.934&w_rid=8f5cae08b232025f93b74feaefdc95d9&wts=1731320903 +// 20 movie https://api.bilibili.com/pgc/season/rank/web/list?day=3&season_type=2&web_location=333.934&w_rid=ccd42543ab1c4330e9f81fb52b098a9c&wts=1731320916 +// 21 tv https://api.bilibili.com/pgc/season/rank/web/list?day=3&season_type=5&web_location=333.934&w_rid=10fae974e8d30dd6bba11527fe17e551&wts=1731320934 +// 22 variety https://api.bilibili.com/pgc/season/rank/web/list?day=3&season_type=7&web_location=333.934&w_rid=c3105fd0dac70dcdf4f08ca6b5cbdb8f&wts=1731320948 +// 23 origin https://api.bilibili.com/x/web-interface/ranking/v2?rid=0&type=origin&web_location=333.934&w_rid=53100b7aeeca012399f4f8f3746bcbdb&wts=1731320960 +// 24 rookie https://api.bilibili.com/x/web-interface/ranking/v2?rid=0&type=rookie&web_location=333.934&w_rid=b8adda7447e2f115b2ed36495e436934&wts=1731320971 + +const ridNumberList = ['0', '1', '4', '168', '3', '1', '3', '129', '4', '36', '188', '234', '223', '160', '211', '217', '119', '155', '5', '181', '2', '5', '7', '0', '0']; +const ridChineseList = [ + '全站', + '番剧', + '国产动画', + '国创相关', + '纪录片', + '动画', + '音乐', + '舞蹈', + '游戏', + '知识', + '科技', + '运动', + '汽车', + '生活', + '美食', + '动物圈', + '鬼畜', + '时尚', + '娱乐', + '影视', + '电影', + '电视剧', + '综艺', + '原创', + '新人', +]; +const ridEnglishList = [ + 'all', + 'bangumi', + 'guochan', + 'guochuang', + 'documentary', + 'douga', + 'music', + 'dance', + 'game', + 'knowledge', + 'tech', + 'sports', + 'car', + 'life', + 'food', + 'animal', + 'kichiku', + 'fashion', + 'ent', + 'cinephile', + 'movie', + 'tv', + 'variety', + 'origin', + 'rookie', +]; +const ridTypeList = [ + 'x/rid', + 'pgc/web', + 'pgc/season', + 'x/rid', + 'pgc/season', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'x/rid', + 'pgc/season', + 'pgc/season', + 'pgc/season', + 'x/type', + 'x/type', +]; + export const route: Route = { - path: '/ranking/:rid?/:day?/:arc_type?/:embed?', + path: '/ranking/:rid_index?/:embed?', name: '排行榜', - maintainers: ['DIYgod'], + maintainers: ['DIYgod', 'hyoban'], categories: ['social-media', 'popular'], view: ViewType.Videos, - example: '/bilibili/ranking/0/3/1', + example: '/bilibili/ranking/0', parameters: { - rid: { - description: '排行榜分区 id', + rid_index: { + description: '排行榜分区 id 序号', default: '0', - options: [ - { - label: '全站', - value: '0', - }, - { - label: '动画', - value: '1', - }, - { - label: '国创相关', - value: '168', - }, - { - label: '音乐', - value: '3', - }, - { - label: '舞蹈', - value: '129', - }, - { - label: '游戏', - value: '4', - }, - { - label: '科技', - value: '36', - }, - { - label: '数码', - value: '188', - }, - { - label: '生活', - value: '160', - }, - { - label: '鬼畜', - value: '119', - }, - { - label: '时尚', - value: '155', - }, - { - label: '娱乐', - value: '5', - }, - { - label: '影视', - value: '181', - }, - ], - }, - day: { - description: '时间跨度', - default: '3', - options: [ - { - value: '1', - label: '1日', - }, - { - value: '3', - label: '3日', - }, - { - value: '7', - label: '7日', - }, - { - value: '30', - label: '30日', - }, - ], - }, - arc_type: { - description: '投稿时间', - default: '1', - options: [ - { - value: '0', - label: '全部投稿', - }, - { - value: '1', - label: '近期投稿', - }, - ], + options: Array.from({ length: ridNumberList.length }, (_, i) => ({ + value: String(i), + label: ridChineseList[i], + })).filter((_, i) => !ridTypeList[i].startsWith('pgc/')), }, embed: '默认为开启内嵌视频, 任意值为关闭', }, handler, }; +function getAPI(ridIndex: number) { + if (ridIndex < 0 || ridIndex >= ridNumberList.length) { + throw new Error('Invalid rid index'); + } + const rid = ridNumberList[ridIndex]; + const ridType = ridTypeList[ridIndex]; + const ridChinese = ridChineseList[ridIndex]; + const ridEnglish = ridEnglishList[ridIndex]; + + let apiURL = ''; + + switch (ridType) { + case 'x/rid': + apiURL = `https://api.bilibili.com/x/web-interface/ranking?rid=${rid}&type=all`; + break; + case 'pgc/web': + apiURL = `https://api.bilibili.com/pgc/web/rank/list?day=3&season_type=${rid}`; + break; + case 'pgc/season': + apiURL = `https://api.bilibili.com/pgc/season/rank/web/list?day=3&season_type=${rid}`; + break; + case 'x/type': + apiURL = `https://api.bilibili.com/x/web-interface/ranking?rid=0&type=${ridEnglish}`; + break; + default: + throw new Error('Invalid rid type'); + } + + return { + apiURL, + referer: `https://www.bilibili.com/v/popular/rank/${ridEnglish}`, + ridChinese, + ridType, + link: `https://www.bilibili.com/v/popular/rank/${ridEnglish}`, + }; +} + async function handler(ctx) { - const rid = ctx.req.param('rid') || '0'; - const day = ctx.req.param('day') || '3'; - const arc_type = ctx.req.param('arc_type') || '1'; + const ridIndex = ctx.req.param('rid_index') || '0'; const embed = !ctx.req.param('embed'); - const arc_type1 = arc_type === '0' ? '全部投稿' : '近期投稿'; - const rid_1 = ['0', '1', '168', '3', '129', '4', '36', '188', '160', '119', '155', '5', '181']; - const rid_2 = ['全站', '动画', '国创相关', '音乐', '舞蹈', '游戏', '科技', '数码', '生活', '鬼畜', '时尚', '娱乐', '影视']; - const rid_i = rid_1.indexOf(rid + ''); - const rid_type = rid_2[rid_i]; + + const { apiURL, referer, ridChinese, link, ridType } = getAPI(Number(ridIndex)); + if (ridType.startsWith('pgc/')) { + throw new Error('This type of ranking is not supported yet'); + } + const response = await got({ method: 'get', - url: `https://api.bilibili.com/x/web-interface/ranking?jsonp=jsonp&rid=${rid}&day=${day}&type=1&arc_type=${arc_type}&callback=__jp0`, + url: apiURL, headers: { - Referer: `https://www.bilibili.com/ranking/all/${rid}/${arc_type}/${day}`, + Referer: referer, }, }); - const data = JSON.parse(response.data.match(/^__jp0\((.*)\)$/)[1]).data || {}; - let list = data.list || []; - for (let i = 0; i < list.length; i++) { - if (list[i].others && list[i].others.length) { - for (const item of list[i].others) { - item.author = list[i].author; - } - list = [...list, ...list[i].others]; - } - } + const data = response.data.data || response.data.result; + const list = data.list || []; return { - title: `bilibili ${day}日排行榜-${rid_type}-${arc_type1}`, - link: `https://www.bilibili.com/ranking/all/${rid}/0/${day}`, + title: `bilibili 排行榜-${ridChinese}`, + link, item: list.map((item) => ({ title: item.title, description: utils.renderUGCDescription(embed, item.pic, item.description || item.title, item.aid, undefined, item.bvid), From 947429a85effcd2c0d32e6cbed4c1b05f820de33 Mon Sep 17 00:00:00 2001 From: XU Ke <kexu567@gmail.com> Date: Tue, 12 Nov 2024 01:25:56 +0800 Subject: [PATCH 480/740] feat(/scu/scupi): Add route for SCUPI (#17542) * Add route for SCUPI * Update _utils.ts Add image for each article --- lib/routes/scu/namespace.ts | 7 ++++ lib/routes/scu/scupi/_utils.ts | 63 ++++++++++++++++++++++++++++++++++ lib/routes/scu/scupi/notice.ts | 40 +++++++++++++++++++++ 3 files changed, 110 insertions(+) create mode 100644 lib/routes/scu/namespace.ts create mode 100644 lib/routes/scu/scupi/_utils.ts create mode 100644 lib/routes/scu/scupi/notice.ts diff --git a/lib/routes/scu/namespace.ts b/lib/routes/scu/namespace.ts new file mode 100644 index 000000000000000..75b8db5fdb8e5b5 --- /dev/null +++ b/lib/routes/scu/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '四川大学', + url: 'www.scu.edu.cn', + lang: 'zh-CN', +}; diff --git a/lib/routes/scu/scupi/_utils.ts b/lib/routes/scu/scupi/_utils.ts new file mode 100644 index 000000000000000..4446cb9a96df956 --- /dev/null +++ b/lib/routes/scu/scupi/_utils.ts @@ -0,0 +1,63 @@ +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import { config } from '@/config'; + +export async function getNotifList() { + try { + const response = await got.get('https://scupi.scu.edu.cn/activities/notice', { + headers: { + 'User-Agent': config.ua, + }, + }); + const html = response.body; + const $ = load(html); + + const listElement = $('body > div.wrapper > main > section > div > div > div.news > div > ul'); + return listElement + .find('article') + .toArray() + .map((articleElement) => { + const titleElement = $(articleElement).find('li > div > div.news-text > h4 > a'); + const timeElement = $(articleElement).find('li > div > div.news-text > span'); + const imageElement = $(articleElement).find('li > div > div.news-img > a > img'); + + const link = titleElement.attr('href'); + const title = titleElement.attr('title'); + const pubDate = timeElement.text().trim(); + + return { + title, + link, + itunes_item_image: imageElement.attr('src'), + pubDate: parseDate(pubDate, 'YYYY-MM-DD'), + }; + }); + } catch { + // console.error(error); + } + + return []; +} + +export async function getArticle(item) { + try { + const response = await got.get(item.link, { + headers: { + 'User-Agent': config.ua, + }, + }); + const html = response.body; + const $ = load(html); + const articleContentElement = $('body > div > main > section > div > div > div.post-content-contaier > div'); + const content = articleContentElement.html(); + const modifiedContent = content?.replace(/\n/g, '<br>'); + + item.description = modifiedContent; + return item; + } catch { + // console.error(error); + } + + return item; +} diff --git a/lib/routes/scu/scupi/notice.ts b/lib/routes/scu/scupi/notice.ts new file mode 100644 index 000000000000000..b7cc03bbd87459f --- /dev/null +++ b/lib/routes/scu/scupi/notice.ts @@ -0,0 +1,40 @@ +// Warning: The author still knows nothing about javascript! + +import { getNotifList, getArticle } from './_utils'; +import { Route } from '@/types'; +import cache from '@/utils/cache'; + +export const route: Route = { + path: '/scupi', + categories: ['university'], + example: '/scu/scupi', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '匹兹堡学院通知', + maintainers: ['sitdownkevin'], + url: 'scupi.scu.edu.cn/activities/notice', + handler, + description: ``, +}; + +async function handler() { + // feed the data to rss + const items = await getNotifList(); + const itemsWithContent = await Promise.all(items.map((item) => cache.tryGet(item.link, () => getArticle(item)))); + + return { + title: '四川大学匹兹堡学院', + description: '四川大学匹兹堡学院官网通知', + language: 'zh-cn', + image: 'https://scupi.scu.edu.cn/wp-content/themes/scupi/img/logo.png', + link: 'https://scupi.scu.edu.cn/', + item: itemsWithContent, + }; +} From 56e66f50b75e621b4130603b556974ee2a5e5466 Mon Sep 17 00:00:00 2001 From: XU Ke <kexu567@gmail.com> Date: Tue, 12 Nov 2024 01:30:52 +0800 Subject: [PATCH 481/740] feat(/tongji/sem): Add new routes for /tongji/sem/* (#17543) * Add description for articles * Update route /tongji/sem Add notice, enrollment, academic-paper, news, events, focus, collegerecruitment * Update notice.ts --- lib/routes/tongji/sem/_utils.ts | 6 ++++-- lib/routes/tongji/sem/notice.ts | 38 +++++++++++++++++++++++---------- 2 files changed, 31 insertions(+), 13 deletions(-) diff --git a/lib/routes/tongji/sem/_utils.ts b/lib/routes/tongji/sem/_utils.ts index 7a1d6c0d2d919e8..f23d51f296cecb5 100644 --- a/lib/routes/tongji/sem/_utils.ts +++ b/lib/routes/tongji/sem/_utils.ts @@ -3,8 +3,9 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; -export async function getNotifByPage(): Promise<{ title: string; link: string; pubDate: Date }[]> { - const pageUrl: string = `https://sem.tongji.edu.cn/semch/category/frontpage/notice`; + +export async function getNotifByPage(url): Promise<{ title: string; link: string; pubDate: Date }[]> { + const pageUrl: string = url; try { const response = await got.get(pageUrl, { @@ -38,6 +39,7 @@ export async function getNotifByPage(): Promise<{ title: string; link: string; p return []; } + export async function getArticle(item) { const articleUrl: string = item.link; diff --git a/lib/routes/tongji/sem/notice.ts b/lib/routes/tongji/sem/notice.ts index 97772afc5ead915..17f9863e0081b04 100644 --- a/lib/routes/tongji/sem/notice.ts +++ b/lib/routes/tongji/sem/notice.ts @@ -4,10 +4,10 @@ import { getNotifByPage, getArticle } from './_utils'; import cache from '@/utils/cache'; export const route: Route = { - path: '/sem', + path: '/sem/:type?', categories: ['university'], - example: '/tongji/sem', - parameters: {}, + example: '/tongji/sem/notice', + parameters: { type: '通知类型,默认为 `notice`' }, features: { requireConfig: false, requirePuppeteer: false, @@ -18,22 +18,38 @@ export const route: Route = { }, name: '经济与管理学院通知', maintainers: ['sitdownkevin'], - url: 'sem.tongji.edu.cn/semch/category/frontpage/notice', + url: 'sem.tongji.edu.cn/semch', handler, - description: ``, + description: `| 学院通知 | 招生通知 | 学术观点 | 新闻 | 活动 | 视点 | 教师与行政人员招聘 | +| -------- | -------------- | ------------------ | ---- | ---------- | --------- | ------------------ | +| notice | enrollment | academic-paper | news | events | focus | collegerecruitment | +`, }; -async function handler() { - const results: { title: string; link: string; pubDate: Date }[] = await getNotifByPage(); +async function handler(ctx) { + const type = ctx.req.param('type') || 'notice'; + const subType = new Set(['enrollment', 'academic-paper', 'news', 'events', 'focus', 'collegerecruitment']); + const subTypeName = { + notice: '学院通知', + enrollment: '招生通知', + 'academic-paper': '学术观点', + news: '新闻', + events: '活动', + focus: '视点', + collegerecruitment: '教师与行政人员招聘', + }; + + const url = `https://sem.tongji.edu.cn/semch/category/frontpage/${subType.has(type) ? type : 'notice'}`; + + const results: { title: string; link: string; pubDate: Date }[] = await getNotifByPage(url); + const resultsWithContent = await Promise.all(results.map((item) => cache.tryGet(item.link, () => getArticle(item)))); // feed the data to rss return { title: '同济大学经济与管理学院', - description: '同济大学经济与管理学院官网通知', - language: 'zh-cn', - image: 'https://sem.tongji.edu.cn/semch/wp-content/themes/wood-themes-cn/images/pages/page_banner.gif', - logo: 'https://tongji.edu.cn/images/badge.png', + description: String(subType.has(type) ? subTypeName[type] : '学院通知'), + image: 'https://tongji.edu.cn/images/badge.png', link: 'https://sem.tongji.edu.cn/semch', item: resultsWithContent, }; From 60b30784826f334aec2e45d03ec2a871e4a1ab34 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 17:33:40 +0000 Subject: [PATCH 482/740] style: auto format --- lib/routes/tongji/sem/_utils.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/routes/tongji/sem/_utils.ts b/lib/routes/tongji/sem/_utils.ts index f23d51f296cecb5..090d1fce946d39b 100644 --- a/lib/routes/tongji/sem/_utils.ts +++ b/lib/routes/tongji/sem/_utils.ts @@ -3,7 +3,6 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; - export async function getNotifByPage(url): Promise<{ title: string; link: string; pubDate: Date }[]> { const pageUrl: string = url; @@ -39,7 +38,6 @@ export async function getNotifByPage(url): Promise<{ title: string; link: string return []; } - export async function getArticle(item) { const articleUrl: string = item.link; From 72d9c0ec91d352a50ff6d76ec0f798e47f12dfa5 Mon Sep 17 00:00:00 2001 From: SkyNetX007 <43953725+SkyNetX007@users.noreply.github.com> Date: Tue, 12 Nov 2024 01:53:21 +0800 Subject: [PATCH 483/740] feat(route/furaffinity): Add routes for furaffinity as a substitute for deprecated routes (#17314) * feat(route): Init furaffinity namespace, add status route * feat(route): Add browse, home, search, user routes for FA * fix(route): fix wrong url in search route * feat(route): Add gallery, scraps, favorites as art route for furaffinity * style: fix example url of art route * feat(route): Add watcher,watching route * feat(route): Add shouts, journals, commissions route * fix(route): Allow empty gallery and search result * style: Follow eslint rules * style: Fix UNUSED_VAR_ASSIGN * Fixes issues based on review feedback * Remove deprecated furaffinity routes * Update lib/routes/furaffinity/commissions.ts * Update lib/routes/furaffinity/namespace.ts --------- --- lib/routes-deprecated/furaffinity/browse.js | 44 --------- .../furaffinity/commissions.js | 39 -------- .../furaffinity/favorites.js | 56 ----------- lib/routes-deprecated/furaffinity/gallery.js | 56 ----------- lib/routes-deprecated/furaffinity/home.js | 72 -------------- .../furaffinity/journal-comments.js | 50 ---------- lib/routes-deprecated/furaffinity/journals.js | 49 ---------- lib/routes-deprecated/furaffinity/scraps.js | 56 ----------- lib/routes-deprecated/furaffinity/search.js | 56 ----------- lib/routes-deprecated/furaffinity/shouts.js | 40 -------- lib/routes-deprecated/furaffinity/status.js | 38 -------- .../furaffinity/submission-comments.js | 50 ---------- lib/routes-deprecated/furaffinity/watchers.js | 47 ---------- lib/routes-deprecated/furaffinity/watching.js | 47 ---------- lib/routes/furaffinity/art.ts | 85 +++++++++++++++++ lib/routes/furaffinity/browse.ts | 58 ++++++++++++ lib/routes/furaffinity/commissions.ts | 55 +++++++++++ lib/routes/furaffinity/home.ts | 80 ++++++++++++++++ lib/routes/furaffinity/journal-comments.ts | 64 +++++++++++++ lib/routes/furaffinity/journals.ts | 56 +++++++++++ lib/routes/furaffinity/namespace.ts | 7 ++ lib/routes/furaffinity/search.ts | 72 ++++++++++++++ lib/routes/furaffinity/shouts.ts | 56 +++++++++++ lib/routes/furaffinity/status.ts | 58 ++++++++++++ lib/routes/furaffinity/submission-comments.ts | 64 +++++++++++++ .../user.js => routes/furaffinity/user.ts} | 94 +++++++++++-------- lib/routes/furaffinity/watchers.ts | 62 ++++++++++++ lib/routes/furaffinity/watching.ts | 62 ++++++++++++ 28 files changed, 832 insertions(+), 741 deletions(-) delete mode 100644 lib/routes-deprecated/furaffinity/browse.js delete mode 100644 lib/routes-deprecated/furaffinity/commissions.js delete mode 100644 lib/routes-deprecated/furaffinity/favorites.js delete mode 100644 lib/routes-deprecated/furaffinity/gallery.js delete mode 100644 lib/routes-deprecated/furaffinity/home.js delete mode 100644 lib/routes-deprecated/furaffinity/journal-comments.js delete mode 100644 lib/routes-deprecated/furaffinity/journals.js delete mode 100644 lib/routes-deprecated/furaffinity/scraps.js delete mode 100644 lib/routes-deprecated/furaffinity/search.js delete mode 100644 lib/routes-deprecated/furaffinity/shouts.js delete mode 100644 lib/routes-deprecated/furaffinity/status.js delete mode 100644 lib/routes-deprecated/furaffinity/submission-comments.js delete mode 100644 lib/routes-deprecated/furaffinity/watchers.js delete mode 100644 lib/routes-deprecated/furaffinity/watching.js create mode 100644 lib/routes/furaffinity/art.ts create mode 100644 lib/routes/furaffinity/browse.ts create mode 100644 lib/routes/furaffinity/commissions.ts create mode 100644 lib/routes/furaffinity/home.ts create mode 100644 lib/routes/furaffinity/journal-comments.ts create mode 100644 lib/routes/furaffinity/journals.ts create mode 100644 lib/routes/furaffinity/namespace.ts create mode 100644 lib/routes/furaffinity/search.ts create mode 100644 lib/routes/furaffinity/shouts.ts create mode 100644 lib/routes/furaffinity/status.ts create mode 100644 lib/routes/furaffinity/submission-comments.ts rename lib/{routes-deprecated/furaffinity/user.js => routes/furaffinity/user.ts} (64%) create mode 100644 lib/routes/furaffinity/watchers.ts create mode 100644 lib/routes/furaffinity/watching.ts diff --git a/lib/routes-deprecated/furaffinity/browse.js b/lib/routes-deprecated/furaffinity/browse.js deleted file mode 100644 index 446498b8cdc4069..000000000000000 --- a/lib/routes-deprecated/furaffinity/browse.js +++ /dev/null @@ -1,44 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - // 传入参数 - const nsfw = String(ctx.params.nsfw); - - // 判断传入的参数nsfw - let url = 'https://faexport.spangle.org.uk/browse.json?sfw=1'; - if (nsfw === '1') { - url = 'https://faexport.spangle.org.uk/browse.json'; - } - // 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - const data = response.data; - - ctx.state.data = { - // 源标题 - title: `Fur Affinity Browse`, - // 源链接 - link: `https://www.furaffinity.net/browse/`, - // 源说明 - description: `Fur Affinity Browse`, - - // 遍历此前获取的数据 - item: data.map((item) => ({ - // 标题 - title: item.title, - // 正文 - description: `<img src="${item.thumbnail}">`, - // 链接 - link: item.link, - // 作者 - author: item.name, - // 由于源API未提供日期,故无pubDate - })), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/commissions.js b/lib/routes-deprecated/furaffinity/commissions.js deleted file mode 100644 index c2a21eecc880293..000000000000000 --- a/lib/routes-deprecated/furaffinity/commissions.js +++ /dev/null @@ -1,39 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - // 传入参数 - const username = String(ctx.params.username); - - // 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/user/${username}/commissions.json`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - const data = response.data; - - ctx.state.data = { - // 源标题 - title: `${username}'s Commissions`, - // 源链接 - link: `https://www.furaffinity.net/commissions/${username}/`, - // 源说明 - description: `Fur Affinity ${username}'s Commissions`, - - // 遍历此前获取的数据 - item: data.map((item) => ({ - // 标题 - title: item.title, - // 正文 - description: `${item.description} <br> <img src="${item.submission.thumbnail}"> `, - // 链接 - link: item.submission.link, - // 作者 - author: username, - // 由于源API未提供日期,故无pubDate - })), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/favorites.js b/lib/routes-deprecated/furaffinity/favorites.js deleted file mode 100644 index 0219886e5e7fb29..000000000000000 --- a/lib/routes-deprecated/furaffinity/favorites.js +++ /dev/null @@ -1,56 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - // 传入参数 - const nsfw = String(ctx.params.nsfw); - const username = String(ctx.params.username); - - // 添加参数username以及判断传入的参数nsfw - let url = `https://faexport.spangle.org.uk/user/${username}/favorites.rss?sfw=1`; - if (nsfw === '1') { - url = `https://faexport.spangle.org.uk/user/${username}/favorites.rss`; - } - - // 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - // 使用 cheerio 加载返回的 HTML - - const data = response.data; - const $ = cheerio.load(data, { - xmlMode: true, - }); - - const list = $('item'); - - ctx.state.data = { - // 源标题 - title: `${username}'s Favorites`, - // 源链接 - link: `https://www.furaffinity.net/favorites/${username}/`, - // 源说明 - description: `Fur Affinity ${username}'s Favorites`, - - // 遍历此前获取的数据 - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('title').text(), - description: item.find('description').text(), - link: item.find('link').text(), - pubDate: new Date(item.find('pubDate').text()).toUTCString(), - }; - }) - .get(), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/gallery.js b/lib/routes-deprecated/furaffinity/gallery.js deleted file mode 100644 index 57cc86f2ddb980c..000000000000000 --- a/lib/routes-deprecated/furaffinity/gallery.js +++ /dev/null @@ -1,56 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - // 传入参数 - const nsfw = String(ctx.params.nsfw); - const username = String(ctx.params.username); - - // 添加参数username以及判断传入的参数nsfw - let url = `https://faexport.spangle.org.uk/user/${username}/gallery.rss?sfw=1`; - if (nsfw === '1') { - url = `https://faexport.spangle.org.uk/user/${username}/gallery.rss`; - } - // 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - // 使用 cheerio 加载返回的 HTML - - const data = response.data; - const $ = cheerio.load(data, { - xmlMode: true, - }); - - const list = $('item'); - - ctx.state.data = { - // 源标题 - title: `${username}'s Gallery`, - // 源链接 - link: `https://www.furaffinity.net/gallery/${username}/`, - // 源说明 - description: `Fur Affinity ${username}'s Gallery`, - - // 遍历此前获取的数据 - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('title').text(), - description: item.find('description').text(), - link: item.find('link').text(), - pubDate: new Date(item.find('pubDate').text()).toUTCString(), - author: username, - }; - }) - .get(), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/home.js b/lib/routes-deprecated/furaffinity/home.js deleted file mode 100644 index 86745240bd98977..000000000000000 --- a/lib/routes-deprecated/furaffinity/home.js +++ /dev/null @@ -1,72 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - // 传入参数 - const type = String(ctx.params.type); - const nsfw = String(ctx.params.nsfw); - - // 判断传入的参数nsfw - let url = 'https://faexport.spangle.org.uk/home.json?sfw=1'; - if (nsfw === '1' || type === '1') { - url = 'https://faexport.spangle.org.uk/home.json'; - } - - // 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - let data = response.data; - - // 判断传入的参数type,分别为:artwork、crafts、music、writing - switch (type) { - case 'artwork': - data = data.artwork; - - break; - - case 'crafts': - data = data.crafts; - - break; - - case 'music': - data = data.music; - - break; - - case 'writing': - data = data.writing; - - break; - - default: - data = data.artwork; - } - - ctx.state.data = { - // 源标题 - title: `Fur Affinity Home`, - // 源链接 - link: `https://www.furaffinity.net/`, - // 源说明 - description: `Fur Affinity Home`, - - // 遍历此前获取的数据 - item: data.map((item) => ({ - // 标题 - title: item.title, - // 正文 - description: `<img src="${item.thumbnail}">`, - // 链接 - link: item.link, - // 作者 - author: item.name, - // 由于源API未提供日期,故无pubDate - })), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/journal-comments.js b/lib/routes-deprecated/furaffinity/journal-comments.js deleted file mode 100644 index 3a86d239e42e149..000000000000000 --- a/lib/routes-deprecated/furaffinity/journal-comments.js +++ /dev/null @@ -1,50 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - // 传入参数 - const id = String(ctx.params.id); - - // 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/journal/${id}/comments.json`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - // 发起第二个 HTTP GET 请求,用于获取该日记的标题 - const response2 = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/journal/${id}.json`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - const data = response.data; - const data2 = response2.data; - - ctx.state.data = { - // 源标题 - title: `${data2.title} - Journal Comments`, - // 源链接 - link: `https://www.furaffinity.net/journal/${id}/`, - // 源说明 - description: `Fur Affinity ${data2.title} - Journal Comments`, - - // 遍历此前获取的数据 - item: data.map((item) => ({ - // 标题 - title: item.text, - // 正文 - description: `<img src="${item.avatar}"> <br> ${item.name}: ${item.text}`, - // 链接 - link: `https://www.furaffinity.net/journal/${id}/`, - // 作者 - author: item.name, - // 日期 - pubDate: new Date(item.posted_at).toUTCString(), - })), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/journals.js b/lib/routes-deprecated/furaffinity/journals.js deleted file mode 100644 index 74862de0f87b1b9..000000000000000 --- a/lib/routes-deprecated/furaffinity/journals.js +++ /dev/null @@ -1,49 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - // 传入参数 - const username = String(ctx.params.username); - - // 添加参数username 和 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/user/${username}/journals.rss`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - // 使用 cheerio 加载返回的 HTML - const data = response.data; - const $ = cheerio.load(data, { - xmlMode: true, - }); - - const list = $('item'); - - ctx.state.data = { - // 源标题 - title: `${username}'s Journals`, - // 源链接 - link: `https://www.furaffinity.net/journals/${username}/`, - // 源说明 - description: `Fur Affinity ${username}'s Journals`, - - // 遍历此前获取的数据 - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('title').text(), - description: item.find('description').text(), - link: item.find('link').text(), - pubDate: new Date(item.find('pubDate').text()).toUTCString(), - author: username, - }; - }) - .get(), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/scraps.js b/lib/routes-deprecated/furaffinity/scraps.js deleted file mode 100644 index 0acb53fcd358755..000000000000000 --- a/lib/routes-deprecated/furaffinity/scraps.js +++ /dev/null @@ -1,56 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - // 传入参数 - const nsfw = String(ctx.params.nsfw); - const username = String(ctx.params.username); - - // 添加参数username以及判断传入的参数nsfw - let url = `https://faexport.spangle.org.uk/user/${username}/scraps.rss?sfw=1`; - if (nsfw === '1') { - url = `https://faexport.spangle.org.uk/user/${username}/scraps.rss`; - } - - // 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - // 使用 cheerio 加载返回的 HTML - const data = response.data; - const $ = cheerio.load(data, { - xmlMode: true, - }); - - const list = $('item'); - - ctx.state.data = { - // 源标题 - title: `${username}'s Scraps`, - // 源链接 - link: `https://www.furaffinity.net/scraps/${username}/`, - // 源说明 - description: `Fur Affinity ${username}'s Scraps`, - - // 遍历此前获取的数据 - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('title').text(), - description: item.find('description').text(), - link: item.find('link').text(), - pubDate: new Date(item.find('pubDate').text()).toUTCString(), - author: username, - }; - }) - .get(), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/search.js b/lib/routes-deprecated/furaffinity/search.js deleted file mode 100644 index 90066bd324a6a0f..000000000000000 --- a/lib/routes-deprecated/furaffinity/search.js +++ /dev/null @@ -1,56 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -module.exports = async (ctx) => { - // 传入参数 - const nsfw = String(ctx.params.nsfw); - const keyword = String(ctx.params.keyword); - - // 添加参数keyword以及判断传入的参数nsfw - let url = `https://faexport.spangle.org.uk/search.rss?q=${keyword}&sfw=1`; - if (nsfw === '1') { - url = `https://faexport.spangle.org.uk/search.rss?q=${keyword}`; - } - - // 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - // 使用 cheerio 加载返回的 HTML - const data = response.data; - const $ = cheerio.load(data, { - xmlMode: true, - }); - - const list = $('item'); - - ctx.state.data = { - // 源标题 - title: `FA Search for ${keyword}`, - // 源链接 - link: `https://www.furaffinity.net/search/?q=${keyword}`, - // 源说明 - description: `Fur Affinity Search for ${keyword}`, - - // 遍历此前获取的数据 - item: - list && - list - .map((index, item) => { - item = $(item); - return { - title: item.find('title').text(), - description: item.find('description').text(), - link: item.find('link').text(), - pubDate: new Date(item.find('pubDate').text()).toUTCString(), - // 由于源API未提供作者信息,故无author - }; - }) - .get(), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/shouts.js b/lib/routes-deprecated/furaffinity/shouts.js deleted file mode 100644 index ca3685c029ebc71..000000000000000 --- a/lib/routes-deprecated/furaffinity/shouts.js +++ /dev/null @@ -1,40 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - // 传入参数 - const username = String(ctx.params.username); - - // 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/user/${username}/shouts.json`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - const data = response.data; - - ctx.state.data = { - // 源标题 - title: `${username}'s Shouts`, - // 源链接 - link: `https://www.furaffinity.net/user/${username}/`, - // 源说明 - description: `Fur Affinity ${username}'s Shouts`, - - // 遍历此前获取的数据 - item: data.map((item) => ({ - // 标题 - title: item.text, - // 正文 - description: `<img src="${item.avatar}"> <br> ${item.name}: ${item.text} `, - // 链接 - link: `https://www.furaffinity.net/user/${username}/`, - // 作者 - author: item.name, - // 日期 - pubDate: new Date(item.posted_at).toUTCString(), - })), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/status.js b/lib/routes-deprecated/furaffinity/status.js deleted file mode 100644 index 6b0d772e2ace6f6..000000000000000 --- a/lib/routes-deprecated/furaffinity/status.js +++ /dev/null @@ -1,38 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - // 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/status.json`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - const data = response.data; - const status = data.online; - - let description = ''; - description = - Object.keys(data)[0] === 'online' - ? `Status: ${Object.keys(data)[0]} <br> Guests: ${status.guests} <br>Registered: ${status.registered} <br> Other: ${status.other} <br>Total: ${status.total} <br> Fa Server Time: ${data.fa_server_time}` - : 'offline'; - const item = []; - item.push({ - title: `Status:${Object.keys(data)[0]}`, - description, - link: `https://www.furaffinity.net/`, - }); - - ctx.state.data = { - // 源标题 - title: `Fur Affinity Status`, - // 源链接 - link: `https://www.furaffinity.net/`, - // 源说明 - description: `Fur Affinity Status`, - - item, - }; -}; diff --git a/lib/routes-deprecated/furaffinity/submission-comments.js b/lib/routes-deprecated/furaffinity/submission-comments.js deleted file mode 100644 index e08c5ba26ec018d..000000000000000 --- a/lib/routes-deprecated/furaffinity/submission-comments.js +++ /dev/null @@ -1,50 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - // 传入参数 - const id = String(ctx.params.id); - - // 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/submission/${id}/comments.json`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - // 发起第二个 HTTP GET 请求,用于获取该作品的标题 - const response2 = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/submission/${id}.json`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - const data = response.data; - const data2 = response2.data; - - ctx.state.data = { - // 源标题 - title: `${data2.title} - Submission Comments`, - // 源链接 - link: `https://www.furaffinity.net/view/${id}/`, - // 源说明 - description: `Fur Affinity ${data2.title} - Submission Comments`, - - // 遍历此前获取的数据 - item: data.map((item) => ({ - // 标题 - title: item.text, - // 正文 - description: `<img src="${item.avatar}"> <br> ${item.name}: ${item.text}`, - // 链接 - link: `https://www.furaffinity.net/view/${id}/`, - // 作者 - author: item.name, - // 日期 - pubDate: new Date(item.posted_at).toUTCString(), - })), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/watchers.js b/lib/routes-deprecated/furaffinity/watchers.js deleted file mode 100644 index a02a2befeebabf6..000000000000000 --- a/lib/routes-deprecated/furaffinity/watchers.js +++ /dev/null @@ -1,47 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - // 传入参数 - const username = String(ctx.params.username); - - // 添加参数username 和 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/user/${username}/watchers.json`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - // 发起第二个HTTP GET请求,用于获取该用户被关注总数 - const response2 = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/user/${username}.json`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - const data = response.data; - const data2 = response2.data; - - ctx.state.data = { - // 源标题 - title: `${username}'s Watcher List`, - // 源链接 - link: `https://www.furaffinity.net/watchlist/to/${username}/`, - // 源说明 - description: `Fur Affinity ${username}'s Watcher List`, - - // 遍历此前获取的数据 - item: data.map((item) => ({ - // 标题 - title: item, - // 正文 - description: `${username} was watched by ${item} <br> Totall: ${data2.watchers.count} `, - // 链接 - link: `https://www.furaffinity.net/user/${item}/`, - // 由于源API未提供日期,故无pubDate - })), - }; -}; diff --git a/lib/routes-deprecated/furaffinity/watching.js b/lib/routes-deprecated/furaffinity/watching.js deleted file mode 100644 index 9532320b4fd29e4..000000000000000 --- a/lib/routes-deprecated/furaffinity/watching.js +++ /dev/null @@ -1,47 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - // 传入参数 - const username = String(ctx.params.username); - - // 添加参数username 和 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/user/${username}/watching.json`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - // 发起第二个HTTP GET请求,用于获取该用户关注总数 - const response2 = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/user/${username}.json`, - headers: { - Referer: `https://faexport.spangle.org.uk/`, - }, - }); - - const data = response.data; - const data2 = response2.data; - - ctx.state.data = { - // 源标题 - title: `${username}'s Watching List`, - // 源链接 - link: `https://www.furaffinity.net/watchlist/by/${username}/`, - // 源说明 - description: `Fur Affinity ${username}}'s Search List`, - - // 遍历此前获取的数据 - item: data.map((item) => ({ - // 标题 - title: item, - // 正文 - description: `${username} watched ${item} <br> Totall: ${data2.watching.count}`, - // 链接 - link: `https://www.furaffinity.net/user/${item}/`, - // 由于源API未提供日期,故无pubDate - })), - }; -}; diff --git a/lib/routes/furaffinity/art.ts b/lib/routes/furaffinity/art.ts new file mode 100644 index 000000000000000..c160bdee7a39c71 --- /dev/null +++ b/lib/routes/furaffinity/art.ts @@ -0,0 +1,85 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/art/:folder/:username/:mode?', + name: 'Gallery', + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/art/gallery/fender/nsfw', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { + username: 'Username, can find in userpage', + folder: 'Image folders, options are gallery, scraps, favorites', + mode: 'R18 content toggle, default value is sfw, options are sfw, nsfw', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net/gallery/:username'], + target: '/gallery/:username', + }, + { + source: ['furaffinity.net/scraps/:username'], + target: '/scraps/:username', + }, + { + source: ['furaffinity.net/favorites/:username'], + target: '/favorites/:username', + }, + ], + handler, +}; + +async function handler(ctx) { + const { username, folder = 'gallery', mode = 'sfw' } = ctx.req.param(); + let url = `https://faexport.spangle.org.uk/user/${username}/${folder}.json?sfw=1&full=1`; + if (mode === 'nsfw') { + url = `https://faexport.spangle.org.uk/user/${username}/${folder}.json?full=1`; + } + const data = await ofetch(url, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + let folderName; + + switch (folder) { + case 'gallery': + folderName = 'Gallery'; + break; + case 'scraps': + folderName = 'Scraps'; + break; + case 'favorites': + folderName = 'Favorites'; + break; + default: + folderName = 'Gallery'; + } + const items = data.map((item) => ({ + title: item.title, + link: item.link, + guid: item.id, + description: `<img src="${item.thumbnail}">`, + // 由于源API未提供日期,故无pubDate + author: item.name, + })); + + return { + allowEmpty: true, + title: `Fur Affinity | ${folderName} of ${username}`, + link: `https://www.furaffinity.net/${folder}/${username}`, + description: `Fur Affinity ${folderName} of ${username}`, + item: items, + }; +} diff --git a/lib/routes/furaffinity/browse.ts b/lib/routes/furaffinity/browse.ts new file mode 100644 index 000000000000000..eb423cbf490c451 --- /dev/null +++ b/lib/routes/furaffinity/browse.ts @@ -0,0 +1,58 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/browse/:mode?', + name: 'Browse', + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/browse/nsfw', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { mode: 'R18 content toggle, default value is sfw, options are sfw, nsfw' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net'], + target: '/browse', + }, + ], + handler, +}; + +async function handler(ctx) { + const { mode = 'sfw' } = ctx.req.param(); + let url = 'https://faexport.spangle.org.uk/browse.json?sfw=1'; + if (mode === 'nsfw') { + url = 'https://faexport.spangle.org.uk/browse.json'; + } + + const data = await ofetch(url, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const items = data.map((item) => ({ + title: item.title, + link: item.link, + guid: item.id, + description: `<img src="${item.thumbnail}">`, + // 由于源API未提供日期,故无pubDate + author: item.name, + })); + + return { + title: 'Fur Affinity | Browse', + link: 'https://www.furaffinity.net/browse/', + description: `Fur Affinity Browsing Artwork`, + item: items, + }; +} diff --git a/lib/routes/furaffinity/commissions.ts b/lib/routes/furaffinity/commissions.ts new file mode 100644 index 000000000000000..740265da7b9a47a --- /dev/null +++ b/lib/routes/furaffinity/commissions.ts @@ -0,0 +1,55 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/commissions/:username', + name: 'Commissions', + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/commissions/fender', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { username: 'Username, can find in userpage' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net/commissions/:username'], + target: '/commissions/:username', + }, + ], + handler, +}; + +async function handler(ctx) { + const { username } = ctx.req.param(); + const url = `https://faexport.spangle.org.uk/user/${username}/commissions.json?full=1`; + + const data = await ofetch(url, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const items = data.map((item) => ({ + title: item.title, + link: item.submission.link, + guid: item.submission.id, + description: `${item.description} <br> <img src="${item.submission.thumbnail}">`, + author: username, + })); + + return { + allowEmpty: true, + title: `Fur Affinity | ${username}'s Commissions`, + link: `https://www.furaffinity.net/commissions/${username}`, + description: `Fur Affinity ${username}'s Commissions`, + item: items, + }; +} diff --git a/lib/routes/furaffinity/home.ts b/lib/routes/furaffinity/home.ts new file mode 100644 index 000000000000000..383b79e92e51d99 --- /dev/null +++ b/lib/routes/furaffinity/home.ts @@ -0,0 +1,80 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/home/:category/:mode?', + name: 'Home', + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/home/nsfw', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { + category: 'Category, default value is artwork, options are artwork, writing, music, crafts', + mode: 'R18 content toggle, default value is sfw, options are sfw, nsfw', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net'], + target: '/', + }, + ], + handler, +}; + +async function handler(ctx) { + const { category = 'artwork', mode = 'sfw' } = ctx.req.param(); + let url = 'https://faexport.spangle.org.uk/home.json?sfw=1'; + if (mode === 'nsfw') { + url = 'https://faexport.spangle.org.uk/home.json'; + } + + const data = await ofetch(url, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + let dataSelect; + + switch (category) { + case 'artwork': + dataSelect = data.artwork; + break; + case 'writing': + dataSelect = data.writing; + break; + case 'music': + dataSelect = data.music; + break; + case 'crafts': + dataSelect = data.crafts; + break; + default: + dataSelect = data.artwork; + } + + const items = dataSelect.map((item) => ({ + title: item.title, + link: item.link, + guid: item.id, + description: `<img src="${item.thumbnail}">`, + // 由于源API未提供日期,故无pubDate + author: item.name, + })); + + return { + title: 'Fur Affinity | Home', + link: 'https://www.furaffinity.net/', + description: `Fur Affinity Index`, + item: items, + }; +} diff --git a/lib/routes/furaffinity/journal-comments.ts b/lib/routes/furaffinity/journal-comments.ts new file mode 100644 index 000000000000000..19935b967e9c2b6 --- /dev/null +++ b/lib/routes/furaffinity/journal-comments.ts @@ -0,0 +1,64 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/journal-comments/:id', + name: 'Journal Comments', + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/journal-comments/10925112', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { id: 'Journal ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net/journal/:id'], + target: '/journal-comments/:id', + }, + ], + handler, +}; + +async function handler(ctx) { + const { id } = ctx.req.param(); + const urlJournal = `https://faexport.spangle.org.uk/journal/${id}.json`; + const urlComments = `https://faexport.spangle.org.uk/journal/${id}/comments.json`; + + const dataJournal = await ofetch(urlJournal, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const dataComments = await ofetch(urlComments, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const items = dataComments.map((item) => ({ + title: item.text, + link: `https://www.furaffinity.net/journal/${id}`, + guid: item.id, + description: `<img src="${item.avatar}"> <br> ${item.name}: ${item.text}`, + pubDate: new Date(item.posted_at).toUTCString(), + author: item.name, + })); + + return { + allowEmpty: true, + title: `${dataJournal.title} - ${dataJournal.name} | Journal Comments`, + link: `https://www.furaffinity.net/journal/${id}`, + description: `Fur Affinity | ${dataJournal.title} by ${dataJournal.name} - Journal Comments`, + item: items, + }; +} diff --git a/lib/routes/furaffinity/journals.ts b/lib/routes/furaffinity/journals.ts new file mode 100644 index 000000000000000..df13b826215f783 --- /dev/null +++ b/lib/routes/furaffinity/journals.ts @@ -0,0 +1,56 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/journals/:username', + name: 'Journals', + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/journals/fender', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { username: 'Username, can find in userpage' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net/journals/:username'], + target: '/journals/:username', + }, + ], + handler, +}; + +async function handler(ctx) { + const { username } = ctx.req.param(); + const url = `https://faexport.spangle.org.uk/user/${username}/journals.json?full=1`; + + const data = await ofetch(url, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const items = data.map((item) => ({ + title: item.title, + link: item.link, + guid: item.id, + description: item.description, + pubDate: new Date(item.posted_at).toUTCString(), + author: username, + })); + + return { + allowEmpty: true, + title: `Fur Affinity | ${username}'s Journals`, + link: `https://www.furaffinity.net/journals/${username}`, + description: `Fur Affinity ${username}'s Journals`, + item: items, + }; +} diff --git a/lib/routes/furaffinity/namespace.ts b/lib/routes/furaffinity/namespace.ts new file mode 100644 index 000000000000000..186165cb463b551 --- /dev/null +++ b/lib/routes/furaffinity/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Furaffinity', + url: 'furaffinity.net', + lang: 'en', +}; diff --git a/lib/routes/furaffinity/search.ts b/lib/routes/furaffinity/search.ts new file mode 100644 index 000000000000000..1f9d9eda2028194 --- /dev/null +++ b/lib/routes/furaffinity/search.ts @@ -0,0 +1,72 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/search/:query/:mode?/:routeParams?', + name: 'Search', + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/search/protogen/nsfw', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { + query: 'Query value', + mode: 'R18 content toggle, default value is sfw, options are sfw, nsfw', + routeParams: 'Additional search parameters', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net'], + target: '/search', + }, + ], + handler, + description: `Additional search parameters +| Parameter | Description | Default | Options | +|-----------------|----------------------|-----------|----------------------------------------------------------------| +| order_by | Sort by | relevancy | relevancy, date, popularity | +| order_direction | Sort order | desc | desc, asc | +| range | Date range | all | all, 1day, 3days, 7days, 30days, 90days, 1year, 3years, 5years | +| pattern | Query match pattern | extended | all, any, extended | +| type | Category of artworks | all | art, flash, photo, music, story, poetry | +`, +}; + +async function handler(ctx) { + const { query, mode = 'sfw', routeParams = 'order_by=relevancy' } = ctx.req.param(); + let url = `https://faexport.spangle.org.uk/search.json?sfw=1&full=1&q=${query}&${routeParams}`; + if (mode === 'nsfw') { + url = `https://faexport.spangle.org.uk/search.json?full=1&q=${query}&${routeParams}`; + } + + const data = await ofetch(url, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const items = data.map((item) => ({ + title: item.title, + link: item.link, + guid: item.id, + description: `<img src="${item.thumbnail}">`, + // 由于源API未提供日期,故无pubDate + author: item.name, + })); + + return { + allowEmpty: true, + title: 'Fur Affinity | Search', + link: `https://www.furaffinity.net/Search/?q=${query}`, + description: `Fur Affinity Search`, + item: items, + }; +} diff --git a/lib/routes/furaffinity/shouts.ts b/lib/routes/furaffinity/shouts.ts new file mode 100644 index 000000000000000..94e5c071a0caf28 --- /dev/null +++ b/lib/routes/furaffinity/shouts.ts @@ -0,0 +1,56 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/shouts/:username', + name: 'Shouts', + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/shouts/fender', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { username: 'Username, can find in userpage' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net/user/:username'], + target: '/shouts/:username', + }, + ], + handler, +}; + +async function handler(ctx) { + const { username } = ctx.req.param(); + const url = `https://faexport.spangle.org.uk/user/${username}/shouts.json?full=1`; + + const data = await ofetch(url, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const items = data.map((item) => ({ + title: `${item.name} shout at ${username}`, + link: `https://www.furaffinity.net/user/${username}`, + guid: item.id, + description: `<img src="${item.avatar}"> <br> ${item.name}: ${item.text}`, + pubDate: new Date(item.posted_at).toUTCString(), + author: username, + })); + + return { + allowEmpty: true, + title: `Fur Affinity | ${username}'s Shouts`, + link: `https://www.furaffinity.net/user/${username}`, + description: `Fur Affinity ${username}'s Shouts`, + item: items, + }; +} diff --git a/lib/routes/furaffinity/status.ts b/lib/routes/furaffinity/status.ts new file mode 100644 index 000000000000000..5c4201558b8aea7 --- /dev/null +++ b/lib/routes/furaffinity/status.ts @@ -0,0 +1,58 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/status', + name: 'Status', + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/status', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net'], + target: '/', + }, + ], + handler, +}; + +async function handler() { + const url = 'https://faexport.spangle.org.uk/status.json'; + + const data = await ofetch(url, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const description = + Object.keys(data)[0] === 'online' + ? `Status: FA Server Online <br> Guests: ${data.online.guests} <br> Registered: ${data.online.registered} <br> Other: ${data.online.other} <br> Total: ${data.online.total} <br> FA Server Time: ${data.fa_server_time} <br> FA Server Time at: ${data.fa_server_time_at}` + : 'FA Server Offline'; + + const items: { title: string; link: string; description: string }[] = [ + { + title: `Status: ${Object.keys(data)[0]}`, + link: 'https://www.furaffinity.net/', + description, + }, + ]; + + return { + title: 'Fur Affinity | Status', + link: 'https://www.furaffinity.net/', + description: `Fur Affinity Status`, + item: items, + }; +} diff --git a/lib/routes/furaffinity/submission-comments.ts b/lib/routes/furaffinity/submission-comments.ts new file mode 100644 index 000000000000000..7bb1009b0c9b5ff --- /dev/null +++ b/lib/routes/furaffinity/submission-comments.ts @@ -0,0 +1,64 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/submission-comments/:id', + name: 'Submission Comments', + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/submission-comments/24259751', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { id: 'Submission ID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net/view/:id'], + target: '/submission-comments/:id', + }, + ], + handler, +}; + +async function handler(ctx) { + const { id } = ctx.req.param(); + const urlSubmission = `https://faexport.spangle.org.uk/submission/${id}.json`; + const urlComments = `https://faexport.spangle.org.uk/submission/${id}/comments.json`; + + const dataSubmission = await ofetch(urlSubmission, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const dataComments = await ofetch(urlComments, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const items = dataComments.map((item) => ({ + title: item.text, + link: `https://www.furaffinity.net/view/${id}`, + guid: item.id, + description: `<img src="${item.avatar}"> <br> ${item.name}: ${item.text}`, + pubDate: new Date(item.posted_at).toUTCString(), + author: item.name, + })); + + return { + allowEmpty: true, + title: `${dataSubmission.title} - ${dataSubmission.name} | Submission Comments`, + link: `https://www.furaffinity.net/view/${id}`, + description: `Fur Affinity | ${dataSubmission.title} by ${dataSubmission.name} - Submission Comments`, + item: items, + }; +} diff --git a/lib/routes-deprecated/furaffinity/user.js b/lib/routes/furaffinity/user.ts similarity index 64% rename from lib/routes-deprecated/furaffinity/user.js rename to lib/routes/furaffinity/user.ts index 79ad79ecd46b7ce..a2b47e1169d8123 100644 --- a/lib/routes-deprecated/furaffinity/user.js +++ b/lib/routes/furaffinity/user.ts @@ -1,20 +1,42 @@ -const got = require('@/utils/got'); +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/user/:username', + name: 'Userpage', + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/user/fender/nsfw', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { username: 'Username, can find in userpage' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net/user/:username'], + target: '/user/:username', + }, + ], + handler, +}; -module.exports = async (ctx) => { - // 传入参数 - const username = String(ctx.params.username); +async function handler(ctx) { + const { username } = ctx.req.param(); + const url = `https://faexport.spangle.org.uk/user/${username}.json`; - // 添加参数username 和 发起 HTTP GET 请求 - const response = await got({ - method: 'get', - url: `https://faexport.spangle.org.uk/user/${username}.json`, + const data = await ofetch(url, { + method: 'GET', headers: { - Referer: `https://faexport.spangle.org.uk/`, + Referer: 'https://faexport.spangle.org.uk/', }, }); - const data = response.data; - // 收集传入的数据 const name = data.name; const profile = data.profile; @@ -49,37 +71,30 @@ module.exports = async (ctx) => { const contact_information = data.contact_information; let contact_result = 'none <br> <br> '; - // 对一个或多个用户联系方式进行遍历 if (contact_information) { contact_result = ''; for (const element of contact_information) { - for (const j in element) { - switch (j) { + for (const x in element) { + switch (x) { case 'title': - contact_result += `Title: ${element[j]} <br> `; - + contact_result += `Title: ${element[x]} <br> `; break; - case 'name': - contact_result += `Name: ${element[j]} <br> `; - + contact_result += `Name: ${element[x]} <br> `; break; - case 'link': - contact_result += `Link: ${element[j]} <br> `; - + contact_result += `Link: ${element[x]} <br> `; break; - default: - throw new Error(`Unknown type: ${j}`); + throw new Error(`Unknown type: ${x}`); } } contact_result += `<br> `; } } - const description = `Name: ${name} <br> Profile: ${profile} <br> Account Type: ${account_type} <br> + const description = `Name: ${name} <br> Profile: ${profile} <br> Account Type: ${account_type} <br> Avatar: ${avatar} <br> Full Name: ${full_name} <br> Artist Type: ${artist_type} <br> User Title: ${user_title} <br> Registered Since: ${registered_since} <br> Current Mood: ${current_mood} <br> <br> Artist Profile: <br> ${artist_profile} <br> <br> Pageviews: ${pageviews} <br> Submissions: ${submissions} <br> Comments_Received: ${comments_received} <br> Comments Given: ${comments_given} <br> @@ -88,21 +103,18 @@ module.exports = async (ctx) => { Favorite Animal: ${favorites_animal} <br> Favorite Website: ${favorites_website} <br> Favorite Food: ${favorites_food} <br> <br> Contact Information: <br> ${contact_result} Watchers Count: ${watchers_count} <br> Watching Count: ${watching_count} `; - const item = []; - item.push({ - title: `${data.name}'s Current Profile`, - description, - link: `https://www.furaffinity.net/user/${username}/`, - }); - - ctx.state.data = { - // 源标题 - title: `Userpage of ${data.name}`, - // 源链接 - link: `https://www.furaffinity.net/`, - // 源说明 - description: `Fur Affinity Userpage Profile of ${data.name}`, + const items: { title: string; link: string; description: string }[] = [ + { + title: `${data.name}'s User Profile`, + link: `https://www.furaffinity.net/user/${username}`, + description, + }, + ]; - item, + return { + title: `Fur Affinity | Userpage of ${data.name}`, + link: `https://www.furaffinity.net/user/${username}`, + description: `Fur Affinity User Profile of ${data.name}`, + item: items, }; -}; +} diff --git a/lib/routes/furaffinity/watchers.ts b/lib/routes/furaffinity/watchers.ts new file mode 100644 index 000000000000000..b278ed6083f38f6 --- /dev/null +++ b/lib/routes/furaffinity/watchers.ts @@ -0,0 +1,62 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/watchers/:username', + name: `User's Watcher List`, + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/watchers/fender', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { username: 'Username, can find in userpage' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net/watchlist/to/:username'], + target: '/watchers/:username', + }, + ], + handler, +}; + +async function handler(ctx) { + const { username } = ctx.req.param(); + const url = `https://faexport.spangle.org.uk/user/${username}/watchers.json`; + const data = await ofetch(url, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const urlUserInfo = `https://faexport.spangle.org.uk/user/${username}.json`; + const dataUserInfo = await ofetch(urlUserInfo, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + const watchersCount = dataUserInfo.watchers.count; + + const items = data.map((item) => ({ + title: item, + link: `https://www.furaffinity.net/user/${item}`, + guid: item, + description: `${username} was watched by ${item} <br> Total: ${watchersCount}`, + author: item, + })); + + return { + title: `Fur Affinity | Watchers of ${username}`, + link: `https://www.furaffinity.net/watchlist/to/${username}/`, + description: `Fur Affinity Watchers of ${username}`, + item: items, + }; +} diff --git a/lib/routes/furaffinity/watching.ts b/lib/routes/furaffinity/watching.ts new file mode 100644 index 000000000000000..394f62021006e41 --- /dev/null +++ b/lib/routes/furaffinity/watching.ts @@ -0,0 +1,62 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/watching/:username', + name: `User's Watching List`, + url: 'furaffinity.net', + categories: ['social-media'], + example: '/furaffinity/watching/fender', + maintainers: ['TigerCubDen', 'SkyNetX007'], + parameters: { username: 'Username, can find in userpage' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['furaffinity.net/watchlist/by/:username'], + target: '/watching/:username', + }, + ], + handler, +}; + +async function handler(ctx) { + const { username } = ctx.req.param(); + const url = `https://faexport.spangle.org.uk/user/${username}/watching.json`; + const data = await ofetch(url, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + + const urlUserInfo = `https://faexport.spangle.org.uk/user/${username}.json`; + const dataUserInfo = await ofetch(urlUserInfo, { + method: 'GET', + headers: { + Referer: 'https://faexport.spangle.org.uk/', + }, + }); + const watchingCount = dataUserInfo.watching.count; + + const items = data.map((item) => ({ + title: item, + link: `https://www.furaffinity.net/user/${item}`, + guid: item, + description: `${username} is watching ${item} <br> Total: ${watchingCount}`, + author: item, + })); + + return { + title: `Fur Affinity | Users ${username} is watching`, + link: `https://www.furaffinity.net/watchlist/by/${username}/`, + description: `Fur Affinity Users ${username} is watching`, + item: items, + }; +} From a8ae1e1567e2cd2c87dd15e9c182205413712125 Mon Sep 17 00:00:00 2001 From: Gnosnay <iamgnosnay@gmail.com> Date: Tue, 12 Nov 2024 02:34:23 +0800 Subject: [PATCH 484/740] fix(twitter): await set cookie (#17545) --- lib/routes/twitter/api/web-api/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index 84b0015fd7a73df..c3ed221b7ed70fa 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -19,7 +19,7 @@ const token2Cookie = async (token) => { return c; } const jar = new CookieJar(); - jar.setCookieSync(`auth_token=${token}`, 'https://x.com'); + await jar.setCookie(`auth_token=${token}`, 'https://x.com'); try { const agent = proxy.proxyUri ? new ProxyAgent({ From fb8e90dff0848181d3a3ef4e680178ef5066afe1 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:14:02 +0800 Subject: [PATCH 485/740] feat(route/pixiv): refactor novels api and add series support (#17532) * feat(route/pixiv): refactor novels api and add series support * chore: cleanup * Update lib/routes/pixiv/novel-api/series/nsfw.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/pixiv/novel-api/series/sfw.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/pixiv/novel-api/user-novels/nsfw.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/pixiv/novel-api/user-novels/nsfw.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/pixiv/novels.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/pixiv/series.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * refactor: rename pixiv/series to pixiv/novel/series --------- --- lib/routes/pixiv/api/get-novels-nsfw.ts | 247 ----------------- lib/routes/pixiv/api/get-novels-sfw.ts | 201 -------------- lib/routes/pixiv/novel-api/content/nsfw.ts | 73 +++++ lib/routes/pixiv/novel-api/content/sfw.ts | 63 +++++ lib/routes/pixiv/novel-api/content/types.ts | 254 ++++++++++++++++++ lib/routes/pixiv/novel-api/content/utils.ts | 133 +++++++++ lib/routes/pixiv/novel-api/series/nsfw.ts | 83 ++++++ lib/routes/pixiv/novel-api/series/sfw.ts | 72 +++++ lib/routes/pixiv/novel-api/series/types.ts | 68 +++++ .../pixiv/novel-api/user-novels/nsfw.ts | 86 ++++++ lib/routes/pixiv/novel-api/user-novels/sfw.ts | 77 ++++++ .../pixiv/novel-api/user-novels/types.ts | 133 +++++++++ lib/routes/pixiv/novel-series.ts | 52 ++++ lib/routes/pixiv/novels.ts | 27 +- lib/routes/pixiv/utils.ts | 116 -------- 15 files changed, 1110 insertions(+), 575 deletions(-) delete mode 100644 lib/routes/pixiv/api/get-novels-nsfw.ts delete mode 100644 lib/routes/pixiv/api/get-novels-sfw.ts create mode 100644 lib/routes/pixiv/novel-api/content/nsfw.ts create mode 100644 lib/routes/pixiv/novel-api/content/sfw.ts create mode 100644 lib/routes/pixiv/novel-api/content/types.ts create mode 100644 lib/routes/pixiv/novel-api/content/utils.ts create mode 100644 lib/routes/pixiv/novel-api/series/nsfw.ts create mode 100644 lib/routes/pixiv/novel-api/series/sfw.ts create mode 100644 lib/routes/pixiv/novel-api/series/types.ts create mode 100644 lib/routes/pixiv/novel-api/user-novels/nsfw.ts create mode 100644 lib/routes/pixiv/novel-api/user-novels/sfw.ts create mode 100644 lib/routes/pixiv/novel-api/user-novels/types.ts create mode 100644 lib/routes/pixiv/novel-series.ts diff --git a/lib/routes/pixiv/api/get-novels-nsfw.ts b/lib/routes/pixiv/api/get-novels-nsfw.ts deleted file mode 100644 index bc6f125707e8f6e..000000000000000 --- a/lib/routes/pixiv/api/get-novels-nsfw.ts +++ /dev/null @@ -1,247 +0,0 @@ -import got from '../pixiv-got'; -import { maskHeader } from '../constants'; -import queryString from 'query-string'; -import { config } from '@/config'; -import { JSDOM, VirtualConsole } from 'jsdom'; - -import pixivUtils from '../utils'; -import ConfigNotFoundError from '@/errors/types/config-not-found'; -import cache from '@/utils/cache'; -import { parseDate } from 'tough-cookie'; -import { getToken } from '../token'; - -interface nsfwNovelWork { - id: string; - title: string; - caption: string; - restrict: number; - x_restrict: number; - is_original: boolean; - image_urls: { - square_medium: string; - medium: string; - large: string; - }; - create_date: string; - tags: Array<{ - name: string; - translated_name: string | null; - added_by_uploaded_user: boolean; - }>; - page_count: number; - text_length: number; - user: { - id: number; - name: string; - account: string; - profile_image_urls: { - medium: string; - }; - is_followed: boolean; - is_access_blocking_user: boolean; - }; - series?: { - id?: number; - title?: string; - }; - total_bookmarks: number; - total_view: number; - total_comments: number; -} - -interface nsfwNovelsResponse { - data: { - user: { - id: number; - name: string; - account: string; - profile_image_urls: { - medium: string; - }; - is_followed: boolean; - is_access_blocking_user: boolean; - }; - novels: nsfwNovelWork[]; - }; -} - -interface nsfwNovelDetail { - id: string; - title: string; - seriesId: string | null; - seriesTitle: string | null; - seriesIsWatched: boolean | null; - userId: string; - coverUrl: string; - tags: string[]; - caption: string; - cdate: string; - rating: { - like: number; - bookmark: number; - view: number; - }; - text: string; - marker: null; - illusts: string[]; - images: { - [key: string]: { - novelImageId: string; - sl: string; - urls: { - '240mw': string; - '480mw': string; - '1200x1200': string; - '128x128': string; - original: string; - }; - }; - }; - seriesNavigation: { - nextNovel: null; - prevNovel: { - id: number; - viewable: boolean; - contentOrder: string; - title: string; - coverUrl: string; - viewableMessage: null; - } | null; - } | null; - glossaryItems: string[]; - replaceableItemIds: string[]; - aiType: number; - isOriginal: boolean; -} - -function getNovels(user_id: string, token: string): Promise<nsfwNovelsResponse> { - return got('https://app-api.pixiv.net/v1/user/novels', { - headers: { - ...maskHeader, - Authorization: 'Bearer ' + token, - }, - searchParams: queryString.stringify({ - user_id, - filter: 'for_ios', - }), - }); -} - -async function getNovelFullContent(novel_id: string, token: string): Promise<nsfwNovelDetail> { - return (await cache.tryGet(`https://app-api.pixiv.net/webview/v2/novel:${novel_id}`, async () => { - // https://github.com/mikf/gallery-dl/blob/main/gallery_dl/extractor/pixiv.py - // https://github.com/mikf/gallery-dl/commit/db507e30c7431d4ed7e23c153a044ce1751c2847 - const response = await got('https://app-api.pixiv.net/webview/v2/novel', { - headers: { - ...maskHeader, - Authorization: 'Bearer ' + token, - }, - searchParams: queryString.stringify({ - id: novel_id, - viewer_version: '20221031_ai', - }), - }); - - const virtualConsole = new VirtualConsole().on('error', () => void 0); - - const { window } = new JSDOM(response.data, { - runScripts: 'dangerously', - virtualConsole, - }); - - const novelDetail = window.pixiv?.novel as nsfwNovelDetail; - - window.close(); - - if (!novelDetail) { - throw new Error('No novel data found'); - } - - return novelDetail; - })) as nsfwNovelDetail; -} - -function convertPixivProtocolExtended(caption: string): string { - const protocolMap = new Map([ - [/pixiv:\/\/novels\/(\d+)/g, 'https://www.pixiv.net/novel/show.php?id=$1'], - [/pixiv:\/\/illusts\/(\d+)/g, 'https://www.pixiv.net/artworks/$1'], - [/pixiv:\/\/users\/(\d+)/g, 'https://www.pixiv.net/users/$1'], - [/pixiv:\/\/novel\/series\/(\d+)/g, 'https://www.pixiv.net/novel/series/$1'], - ]); - - let convertedText = caption; - - for (const [pattern, replacement] of protocolMap) { - convertedText = convertedText.replace(pattern, replacement); - } - - return convertedText; -} - -export async function getR18Novels(id: string, fullContent: boolean, limit: number = 100) { - if (!config.pixiv || !config.pixiv.refreshToken) { - throw new ConfigNotFoundError( - '該用戶爲 R18 創作者,需要 PIXIV_REFRESHTOKEN。This user is an R18 creator, PIXIV_REFRESHTOKEN is required - pixiv RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>' - ); - } - - const token = await getToken(cache.tryGet); - if (!token) { - throw new ConfigNotFoundError('pixiv not login'); - } - - const response = await getNovels(id, token); - const novels = limit ? response.data.novels.slice(0, limit) : response.data.novels; - const username = novels[0].user.name; - - const items = await Promise.all( - novels.map(async (novel) => { - const baseItem = { - title: novel.series?.title ? `${novel.series.title} - ${novel.title}` : novel.title, - description: ` - <img src="${pixivUtils.getProxiedImageUrl(novel.image_urls.large)}" /> - <p>${convertPixivProtocolExtended(novel.caption) || ''}</p> - <p> - 字數:${novel.text_length}<br> - 閱覽數:${novel.total_view}<br> - 收藏數:${novel.total_bookmarks}<br> - 評論數:${novel.total_comments}<br> - </p>`, - author: novel.user.name, - pubDate: parseDate(novel.create_date), - link: `https://www.pixiv.net/novel/show.php?id=${novel.id}`, - category: novel.tags.map((t) => t.name), - }; - - if (!fullContent) { - return baseItem; - } - - try { - const novelDetail = await getNovelFullContent(novel.id, token); - const images = Object.fromEntries( - Object.entries(novelDetail.images) - .filter(([, image]) => image?.urls?.original) - .map(([id, image]) => [id, image.urls.original.replace('https://i.pximg.net', config.pixiv.imgProxy || '')]) - ); - - const content = await pixivUtils.parseNovelContent(novelDetail.text, images, token); - - return { - ...baseItem, - description: `${baseItem.description}<hr>${content}`, - }; - } catch { - return baseItem; - } - }) - ); - - return { - title: `${username}'s novels - pixiv`, - description: `${username} 的 pixiv 最新小说`, - image: pixivUtils.getProxiedImageUrl(novels[0].user.profile_image_urls.medium), - link: `https://www.pixiv.net/users/${id}/novels`, - item: items, - }; -} diff --git a/lib/routes/pixiv/api/get-novels-sfw.ts b/lib/routes/pixiv/api/get-novels-sfw.ts deleted file mode 100644 index 7bb74c8970a02e1..000000000000000 --- a/lib/routes/pixiv/api/get-novels-sfw.ts +++ /dev/null @@ -1,201 +0,0 @@ -import got from '@/utils/got'; -import cache from '@/utils/cache'; -import pixivUtils from '../utils'; -import { parseDate } from '@/utils/parse-date'; - -const baseUrl = 'https://www.pixiv.net'; -interface sfwNovelWork { - id: string; - title: string; - genre: string; - xRestrict: number; - restrict: number; - url: string; - tags: string[]; - userId: string; - userName: string; - profileImageUrl: string; - textCount: number; - wordCount: number; - readingTime: number; - useWordCount: boolean; - description: string; - isBookmarkable: boolean; - bookmarkData: null; - bookmarkCount: number; - isOriginal: boolean; - marker: null; - titleCaptionTranslation: { - workTitle: null; - workCaption: null; - }; - createDate: string; - updateDate: string; - isMasked: boolean; - aiType: number; - seriesId: string; - seriesTitle: string; - isUnlisted: boolean; -} - -interface sfwNovelsResponse { - data: { - error: boolean; - message: string; - body: { - works: Record<string, sfwNovelWork>; - extraData: { - meta: { - title: string; - description: string; - canonical: string; - ogp: { - description: string; - image: string; - title: string; - type: string; - }; - twitter: { - description: string; - image: string; - title: string; - card: string; - }; - alternateLanguages: { - ja: string; - en: string; - }; - descriptionHeader: string; - }; - }; - }; - }; -} - -interface sfwNovelDetail { - body: { - content: string; - textEmbeddedImages: Record< - string, - { - novelImageId: string; - sl: string; - urls: { - original: string; - '1200x1200': string; - '480mw': string; - '240mw': string; - '128x128': string; - }; - } - >; - }; -} - -async function getNovelFullContent(novel_id: string): Promise<{ content: string; images: Record<string, string> }> { - const url = `${baseUrl}/ajax/novel/${novel_id}`; - return (await cache.tryGet(url, async () => { - const response = await got(url, { - headers: { - referer: `${baseUrl}/novel/show.php?id=${novel_id}`, - }, - }); - - const novelDetail = response.data as sfwNovelDetail; - - if (!novelDetail) { - throw new Error('No novel data found'); - } - - const images: Record<string, string> = {}; - - if (novelDetail.body.textEmbeddedImages) { - for (const [id, image] of Object.entries(novelDetail.body.textEmbeddedImages)) { - images[id] = pixivUtils.getProxiedImageUrl(image.urls.original); - } - } - - return { - content: novelDetail.body.content, - images, - }; - })) as { content: string; images: Record<string, string> }; -} - -export async function getNonR18Novels(id: string, fullContent: boolean, limit: number = 100) { - const url = `${baseUrl}/users/${id}/novels`; - const { data: allData } = await got(`${baseUrl}/ajax/user/${id}/profile/all`, { - headers: { - referer: url, - }, - }); - - const novels = Object.keys(allData.body.novels) - .sort((a, b) => Number(b) - Number(a)) - .slice(0, Number.parseInt(String(limit), 10)); - - if (novels.length === 0) { - throw new Error('No novels found, fallback to R18 API'); - // Throw error early to avoid unnecessary API requests - // Since hasPixivAuth() check failed earlier and R18 API requires authentication, this will result in ConfigNotFoundError - } - - const searchParams = new URLSearchParams(); - for (const novel of novels) { - searchParams.append('ids[]', novel); - } - - const { data } = (await got(`${baseUrl}/ajax/user/${id}/profile/novels`, { - headers: { - referer: url, - }, - searchParams, - })) as sfwNovelsResponse; - - const items = await Promise.all( - Object.values(data.body.works).map(async (item) => { - const baseItem = { - title: item.title, - description: ` - <img src=${pixivUtils.getProxiedImageUrl(item.url)} /> - <p>${item.description}</p> - <p> - 字數:${item.textCount}<br> - 閱讀時間:${item.readingTime} 分鐘<br> - 收藏數:${item.bookmarkCount}<br> - </p> - `, - link: `${baseUrl}/novel/show.php?id=${item.id}`, - author: item.userName, - pubDate: parseDate(item.createDate), - updated: parseDate(item.updateDate), - category: item.tags, - }; - - if (!fullContent) { - return baseItem; - } - - try { - const { content: initialContent, images } = await getNovelFullContent(item.id); - - const content = await pixivUtils.parseNovelContent(initialContent, images); - - return { - ...baseItem, - description: `${baseItem.description}<hr>${content}`, - }; - } catch { - return baseItem; - } - }) - ); - - return { - title: data.body.extraData.meta.title, - description: data.body.extraData.meta.ogp.description, - image: pixivUtils.getProxiedImageUrl(Object.values(data.body.works)[0].profileImageUrl), - link: url, - item: items, - }; -} diff --git a/lib/routes/pixiv/novel-api/content/nsfw.ts b/lib/routes/pixiv/novel-api/content/nsfw.ts new file mode 100644 index 000000000000000..86eab24e670f0fd --- /dev/null +++ b/lib/routes/pixiv/novel-api/content/nsfw.ts @@ -0,0 +1,73 @@ +import { JSDOM, VirtualConsole } from 'jsdom'; +import cache from '@/utils/cache'; +import got from '../../pixiv-got'; +import { maskHeader } from '../../constants'; +import queryString from 'query-string'; +import { parseNovelContent } from './utils'; +import type { NovelContent, NSFWNovelDetail } from './types'; +import { parseDate } from '@/utils/parse-date'; + +export async function getNSFWNovelContent(novelId: string, token: string): Promise<NovelContent> { + return (await cache.tryGet(`https://app-api.pixiv.net/webview/v2/novel:${novelId}`, async () => { + const response = await got('https://app-api.pixiv.net/webview/v2/novel', { + headers: { + ...maskHeader, + Authorization: 'Bearer ' + token, + }, + searchParams: queryString.stringify({ + id: novelId, + viewer_version: '20221031_ai', + }), + }); + + const virtualConsole = new VirtualConsole().on('error', () => void 0); + + const { window } = new JSDOM(response.data, { + runScripts: 'dangerously', + virtualConsole, + }); + + const novelDetail = window.pixiv?.novel as NSFWNovelDetail; + + window.close(); + + if (!novelDetail) { + throw new Error('No novel data found'); + } + + const images = Object.fromEntries( + Object.entries(novelDetail.images) + .filter(([, image]) => image?.urls?.original) + .map(([id, image]) => [id, image.urls.original]) + ); + + const parsedContent = await parseNovelContent(novelDetail.text, images, token); + + return { + id: novelDetail.id, + title: novelDetail.title, + description: novelDetail.caption, + content: parsedContent, + + userId: novelDetail.userId, + userName: null, // Not provided in NSFW API + + bookmarkCount: novelDetail.rating.bookmark, + viewCount: novelDetail.rating.view, + likeCount: novelDetail.rating.like, + + createDate: parseDate(novelDetail.cdate), + updateDate: null, // Not provided in NSFW API + + isOriginal: novelDetail.isOriginal, + aiType: novelDetail.aiType, + tags: novelDetail.tags, + + coverUrl: novelDetail.coverUrl, + images, + + seriesId: novelDetail.seriesId || null, + seriesTitle: novelDetail.seriesTitle || null, + }; + })) as NovelContent; +} diff --git a/lib/routes/pixiv/novel-api/content/sfw.ts b/lib/routes/pixiv/novel-api/content/sfw.ts new file mode 100644 index 000000000000000..c58d2489d9a4e73 --- /dev/null +++ b/lib/routes/pixiv/novel-api/content/sfw.ts @@ -0,0 +1,63 @@ +import got from '@/utils/got'; +import cache from '@/utils/cache'; +import pixivUtils from '../../utils'; +import { parseNovelContent } from './utils'; +import { NovelContent, SFWNovelDetail } from './types'; +import { parseDate } from '@/utils/parse-date'; + +const baseUrl = 'https://www.pixiv.net'; + +export async function getSFWNovelContent(novelId: string): Promise<NovelContent> { + const url = `${baseUrl}/ajax/novel/${novelId}`; + return (await cache.tryGet(url, async () => { + const response = await got(url, { + headers: { + referer: `${baseUrl}/novel/show.php?id=${novelId}`, + }, + }); + + const novelDetail = response.data as SFWNovelDetail; + + if (!novelDetail) { + throw new Error('No novel data found'); + } + + const body = novelDetail.body; + const images: Record<string, string> = {}; + + if (novelDetail.body.textEmbeddedImages) { + for (const [id, image] of Object.entries(novelDetail.body.textEmbeddedImages)) { + images[id] = pixivUtils.getProxiedImageUrl(image.urls.original); + } + } + + const parsedContent = await parseNovelContent(novelDetail.body.content, images); + + return { + id: body.id, + title: body.title, + description: body.description, + content: parsedContent, + + userId: body.userId, + userName: body.userName, + + bookmarkCount: body.bookmarkCount, + viewCount: body.viewCount, + likeCount: body.likeCount, + + createDate: parseDate(body.createDate), + updateDate: parseDate(body.uploadDate), + + isOriginal: body.isOriginal, + aiType: body.aiType, + tags: body.tags.tags.map((tag) => tag.tag), + + coverUrl: body.coverUrl, + images, + + seriesId: body.seriesNavData?.seriesId?.toString() || null, + seriesTitle: body.seriesNavData?.title || null, + }; + })) as NovelContent; +} diff --git a/lib/routes/pixiv/novel-api/content/types.ts b/lib/routes/pixiv/novel-api/content/types.ts new file mode 100644 index 000000000000000..752878c73a40a37 --- /dev/null +++ b/lib/routes/pixiv/novel-api/content/types.ts @@ -0,0 +1,254 @@ +export interface NovelContent { + id: string; + title: string; + description: string; + content: string; + + userId: string; + userName: string | null; + + bookmarkCount: number; + viewCount: number; + likeCount: number; + + createDate: Date; + updateDate: Date | null; + + tags: string[]; + + coverUrl: string; + images: Record<string, string>; + + seriesId: string | null; + seriesTitle: string | null; +} + +export interface SFWNovelDetail { + error: boolean; + message: string; + body: { + bookmarkCount: number; + commentCount: number; + markerCount: number; + createDate: string; + uploadDate: string; + description: string; + id: string; + title: string; + likeCount: number; + pageCount: number; + userId: string; + userName: string; + viewCount: number; + isOriginal: boolean; + isBungei: boolean; + xRestrict: number; + restrict: number; + content: string; + coverUrl: string; + suggestedSettings: { + viewMode: number; + themeBackground: number; + themeSize: null; + themeSpacing: null; + }; + isBookmarkable: boolean; + bookmarkData: null; + likeData: boolean; + pollData: null; + marker: null; + tags: { + authorId: string; + isLocked: boolean; + tags: Array<{ + tag: string; + locked: boolean; + deletable: boolean; + userId: string; + userName: string; + }>; + writable: boolean; + }; + seriesNavData: { + seriesType: string; + seriesId: number; + title: string; + isConcluded: boolean; + isReplaceable: boolean; + isWatched: boolean; + isNotifying: boolean; + order: number; + next: { + title: string; + order: number; + id: string; + available: boolean; + } | null; + prev: null; + } | null; + descriptionBoothId: null; + descriptionYoutubeId: null; + comicPromotion: null; + fanboxPromotion: null; + contestBanners: any[]; + contestData: null; + request: null; + imageResponseOutData: any[]; + imageResponseData: any[]; + imageResponseCount: number; + userNovels: { + [key: string]: { + id: string; + title: string; + genre: string; + xRestrict: number; + restrict: number; + url: string; + tags: string[]; + userId: string; + userName: string; + profileImageUrl: string; + textCount: number; + wordCount: number; + readingTime: number; + useWordCount: boolean; + description: string; + isBookmarkable: boolean; + bookmarkData: null; + bookmarkCount: number | null; + isOriginal: boolean; + marker: null; + titleCaptionTranslation: { + workTitle: null; + workCaption: null; + }; + createDate: string; + updateDate: string; + isMasked: boolean; + aiType: number; + seriesId?: string; + seriesTitle?: string; + isUnlisted: boolean; + } | null; + }; + hasGlossary: boolean; + zoneConfig: { + [key: string]: { + url: string; + }; + }; + extraData: { + meta: { + title: string; + description: string; + canonical: string; + descriptionHeader: string; + ogp: { + description: string; + image: string; + title: string; + type: string; + }; + twitter: { + description: string; + image: string; + title: string; + card: string; + }; + }; + }; + titleCaptionTranslation: { + workTitle: null; + workCaption: null; + }; + isUnlisted: boolean; + language: string; + textEmbeddedImages: { + [key: string]: { + novelImageId: string; + sl: string; + urls: { + '240mw': string; + '480mw': string; + '1200x1200': string; + '128x128': string; + original: string; + }; + }; + }; + commentOff: number; + characterCount: number; + wordCount: number; + useWordCount: boolean; + readingTime: number; + genre: string; + aiType: number; + noLoginData: { + breadcrumbs: { + successor: any[]; + current: { + ja: string; + }; + }; + zengoWorkData: { + nextWork: { + id: string; + title: string; + } | null; + prevWork: { + id: string; + title: string; + } | null; + }; + }; + }; +} + +export interface NSFWNovelDetail { + id: string; + title: string; + seriesId: string | null; + seriesTitle: string | null; + seriesIsWatched: boolean | null; + userId: string; + coverUrl: string; + tags: string[]; + caption: string; + cdate: string; + rating: { + like: number; + bookmark: number; + view: number; + }; + text: string; + marker: null; + illusts: string[]; + images: { + [key: string]: { + novelImageId: string; + sl: string; + urls: { + '240mw': string; + '480mw': string; + '1200x1200': string; + '128x128': string; + original: string; + }; + }; + }; + seriesNavigation: { + nextNovel: null; + prevNovel: { + id: number; + viewable: boolean; + contentOrder: string; + title: string; + coverUrl: string; + viewableMessage: null; + } | null; + } | null; + glossaryItems: string[]; + replaceableItemIds: string[]; + aiType: number; + isOriginal: boolean; +} diff --git a/lib/routes/pixiv/novel-api/content/utils.ts b/lib/routes/pixiv/novel-api/content/utils.ts new file mode 100644 index 000000000000000..8808cf6882d0f09 --- /dev/null +++ b/lib/routes/pixiv/novel-api/content/utils.ts @@ -0,0 +1,133 @@ +import { load } from 'cheerio'; +import getIllustDetail from '../../api/get-illust-detail'; +import pixivUtils from '../../utils'; + +export function convertPixivProtocolExtended(caption: string): string { + const protocolMap = new Map([ + [/pixiv:\/\/novels\/(\d+)/g, 'https://www.pixiv.net/novel/show.php?id=$1'], + [/pixiv:\/\/illusts\/(\d+)/g, 'https://www.pixiv.net/artworks/$1'], + [/pixiv:\/\/users\/(\d+)/g, 'https://www.pixiv.net/users/$1'], + [/pixiv:\/\/novel\/series\/(\d+)/g, 'https://www.pixiv.net/novel/series/$1'], + ]); + + let convertedText = caption; + for (const [pattern, replacement] of protocolMap) { + convertedText = convertedText.replace(pattern, replacement); + } + return convertedText; +} + +// docs: https://www.pixiv.help/hc/ja/articles/235584168-小説作品の本文内に使える特殊タグとは +export async function parseNovelContent(content: string, images: Record<string, string>, token?: string): Promise<string> { + try { + // 如果有 token,處理 pixiv 圖片引用 + // If token exists, process pixiv image references + if (token) { + const imageMatches = [...content.matchAll(/\[pixivimage:(\d+)(?:-(\d+))?\]/g)]; + const imageIdToUrl = new Map<string, string>(); + + // 批量獲取圖片資訊 + // Batch fetch image information + await Promise.all( + imageMatches.map(async ([, illustId, pageNum]) => { + if (!illustId) { + return; + } + + try { + const illust = (await getIllustDetail(illustId, token)).data.illust; + const pixivimages = pixivUtils.getImgs(illust).map((img) => img.match(/src="([^"]+)"/)?.[1] || ''); + + const imageUrl = pixivimages[Number(pageNum) || 0]; + if (imageUrl) { + imageIdToUrl.set(pageNum ? `${illustId}-${pageNum}` : illustId, imageUrl); + } + } catch (error) { + // 記錄錯誤但不中斷處理 + // Log error but don't interrupt processing + logger.warn(`Failed to fetch illust detail for ID ${illustId}: ${error instanceof Error ? error.message : String(error)}`); + } + }) + ); + + // 替換 pixiv 圖片引用為 img 標籤 + // Replace pixiv image references with img tags + content = content.replaceAll(/\[pixivimage:(\d+)(?:-(\d+))?\]/g, (match, illustId, pageNum) => { + const key = pageNum ? `${illustId}-${pageNum}` : illustId; + const imageUrl = imageIdToUrl.get(key); + return imageUrl ? `<img src="${imageUrl}" alt="pixiv illustration ${illustId}${pageNum ? ` page ${pageNum}` : ''}">` : match; + }); + } else { + /* + * 處理 get-novels-sfw 的情況 + * 當沒有 PIXIV_REFRESHTOKEN 時,將 [pixivimage:(\d+)] 格式轉換為 artwork 連結 + * 因無法獲取 Pixiv 作品詳情,改為提供直接連結到原始作品頁面 + * + * Handle get-novels-sfw case + * When PIXIV_REFRESHTOKEN is not available, convert [pixivimage:(\d+)] format to artwork link + * Provide direct link to original artwork page since artwork details cannot be retrieved + */ + content = content.replaceAll(/\[pixivimage:(\d+)(?:-(\d+))?\]/g, (_, illustId) => `<a href="https://www.pixiv.net/artworks/${illustId}" target="_blank" rel="noopener noreferrer">Pixiv Artwork #${illustId}</a>`); + } + + // 處理作者上傳的圖片 + // Process author uploaded images + content = content.replaceAll(/\[uploadedimage:(\d+)\]/g, (match, imageId) => { + if (images[imageId]) { + return `<img src="${pixivUtils.getProxiedImageUrl(images[imageId])}" alt="novel illustration ${imageId}">`; + } + return match; + }); + + // 基本格式處理 + // Basic formatting + content = content + // 換行轉換為 HTML 換行 + // Convert newlines to HTML breaks + .replaceAll('\n', '<br>') + // 連續換行轉換為段落 + // Convert consecutive breaks to paragraphs + .replaceAll(/(<br>){2,}/g, '</p><p>') + // ruby 標籤(為日文漢字標註讀音) + // ruby tags (for Japanese kanji readings) + .replaceAll(/\[\[rb:(.*?)>(.*?)\]\]/g, '<ruby>$1<rt>$2</rt></ruby>') + // 外部連結 + // external links + .replaceAll(/\[\[jumpuri:(.*?)>(.*?)\]\]/g, '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>') + // 頁面跳轉,但由於 [newpage] 使用 hr 分隔,沒有頁數,沒必要跳轉,所以只顯示文字 + // Page jumps, but since [newpage] uses hr separators, without the page numbers, jumping isn't needed, so just display text + .replaceAll(/\[jump:(\d+)\]/g, 'Jump to page $1') + // 章節標題 + // chapter titles + .replaceAll(/\[chapter:(.*?)\]/g, '<h2>$1</h2>') + // 分頁符 + // page breaks + .replaceAll('[newpage]', '<hr>'); + + // 使用 cheerio 進行 HTML 清理和優化 + // Use cheerio for HTML cleanup and optimization + const $content = load(`<article><p>${content}</p></article>`); + + // 處理嵌套段落:移除多餘的嵌套 + // Handle nested paragraphs: remove unnecessary nesting + $content('p p').each((_, elem) => { + const $elem = $content(elem); + $elem.replaceWith($elem.html() || ''); + }); + + // 處理段落中的標題:確保正確的 HTML 結構 + // Handle headings in paragraphs: ensure correct HTML structure + $content('p h2').each((_, elem) => { + const $elem = $content(elem); + const $parent = $elem.parent('p'); + const html = $elem.prop('outerHTML'); + if ($parent.length && html) { + $parent.replaceWith(`</p>${html}<p>`); + } + }); + + return $content.html() || ''; + } catch (error) { + throw new Error(`Error parsing novel content: ${error instanceof Error ? error.message : String(error)}`); + } +} diff --git a/lib/routes/pixiv/novel-api/series/nsfw.ts b/lib/routes/pixiv/novel-api/series/nsfw.ts new file mode 100644 index 000000000000000..f0bf067369253b2 --- /dev/null +++ b/lib/routes/pixiv/novel-api/series/nsfw.ts @@ -0,0 +1,83 @@ +import got from '../../pixiv-got'; +import { maskHeader } from '../../constants'; +import { getNSFWNovelContent } from '../content/nsfw'; +import pixivUtils from '../../utils'; +import { SeriesContentResponse, SeriesDetail, SeriesFeed } from './types'; +import ConfigNotFoundError from '@/errors/types/config-not-found'; +import { getToken } from '../../token'; +import { config } from '@/config'; +import cache from '@/utils/cache'; + +const baseUrl = 'https://www.pixiv.net'; + +export async function getNSFWSeriesNovels(seriesId: string, limit: number = 10): Promise<SeriesFeed> { + if (!config.pixiv || !config.pixiv.refreshToken) { + throw new ConfigNotFoundError('This user is an R18 creator, PIXIV_REFRESHTOKEN is required.\npixiv RSS is disabled due to the lack of relevant config.\n該用戶爲 R18 創作者,需要 PIXIV_REFRESHTOKEN。'); + } + + const token = await getToken(cache.tryGet); + if (!token) { + throw new ConfigNotFoundError('pixiv not login'); + } + + const seriesResponse = await got(`${baseUrl}/ajax/novel/series/${seriesId}`, { + headers: { + ...maskHeader, + Authorization: 'Bearer ' + token, + }, + }); + + const seriesData = seriesResponse.data as SeriesDetail; + + if (seriesData.error) { + throw new Error(seriesData.message || 'Failed to get series detail'); + } + + // Get chapters + const chaptersResponse = await got(`${baseUrl}/ajax/novel/series/${seriesId}/content_titles`, { + headers: { + ...maskHeader, + Authorization: 'Bearer ' + token, + }, + }); + + const data = chaptersResponse.data as SeriesContentResponse; + + if (data.error) { + throw new Error(data.message || 'Failed to get series data'); + } + + const chapters = data.body.slice(-Math.abs(limit)); + const chapterStartNum = Math.max(data.body.length - limit + 1, 1); + + const items = await Promise.all( + chapters.map(async (chapter, index) => { + const novelContent = await getNSFWNovelContent(chapter.id, token); + return { + title: `#${chapterStartNum + index} ${novelContent.title}`, + description: ` + <img src="${pixivUtils.getProxiedImageUrl(novelContent.coverUrl)}" /> + <p>${novelContent.description}</p> + <p> + 收藏數:${novelContent.bookmarkCount}<br> + 閱覧數:${novelContent.viewCount}<br> + 喜歡數:${novelContent.likeCount}<br> + </p><hr> + ${novelContent.content} + `, + link: `${baseUrl}/novel/show.php?id=${novelContent.id}`, + pubDate: novelContent.createDate, + author: novelContent.userName || `User ID: ${novelContent.userId}`, + category: novelContent.tags, + }; + }) + ); + + return { + title: seriesData.body.title, + description: seriesData.body.caption, + link: `${baseUrl}/novel/series/${seriesId}`, + image: pixivUtils.getProxiedImageUrl(seriesData.body.cover.urls.original), + item: items, + }; +} diff --git a/lib/routes/pixiv/novel-api/series/sfw.ts b/lib/routes/pixiv/novel-api/series/sfw.ts new file mode 100644 index 000000000000000..f39cbeb8f4842b6 --- /dev/null +++ b/lib/routes/pixiv/novel-api/series/sfw.ts @@ -0,0 +1,72 @@ +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { getSFWNovelContent } from '../content/sfw'; +import pixivUtils from '../../utils'; +import { SeriesContentResponse, SeriesFeed } from './types'; + +const baseUrl = 'https://www.pixiv.net'; + +export async function getSFWSeriesNovels(seriesId: string, limit: number = 10): Promise<SeriesFeed> { + const seriesPage = await got(`${baseUrl}/novel/series/${seriesId}`); + const $ = load(seriesPage.data); + + const title = $('meta[property="og:title"]').attr('content') || ''; + const description = $('meta[property="og:description"]').attr('content') || ''; + const image = $('meta[property="og:image"]').attr('content') || ''; + + const response = await got(`${baseUrl}/ajax/novel/series/${seriesId}/content_titles`, { + headers: { + referer: `${baseUrl}/novel/series/${seriesId}`, + }, + }); + + const data = response.data as SeriesContentResponse; + + if (data.error) { + throw new Error(data.message || 'Failed to get series data'); + } + + const chapters = data.body.slice(-Math.abs(limit)); + const chapterStartNum = Math.max(data.body.length - limit + 1, 1); + + const items = await Promise.all( + chapters + .map(async (chapter, index) => { + if (!chapter.available) { + return { + title: `#${chapterStartNum + index} ${chapter.title}`, + description: `PIXIV_REFRESHTOKEN is required to view the full content.<br>需要 PIXIV_REFRESHTOKEN 才能查看完整內文。`, + link: `${baseUrl}/novel/show.php?id=${chapter.id}`, + }; + } + + const novelContent = await getSFWNovelContent(chapter.id); + return { + title: `#${chapterStartNum + index} ${novelContent.title}`, + description: ` + <img src="${pixivUtils.getProxiedImageUrl(novelContent.coverUrl)}" /> + <p>${novelContent.description}</p> + <p> + 收藏數:${novelContent.bookmarkCount}<br> + 閱覧數:${novelContent.viewCount}<br> + 喜歡數:${novelContent.likeCount}<br> + </p><hr> + ${novelContent.content} + `, + link: `${baseUrl}/novel/show.php?id=${novelContent.id}`, + pubDate: novelContent.createDate, + author: novelContent.userName || `User ID: ${novelContent.userId}`, + category: novelContent.tags, + }; + }) + .reverse() + ); + + return { + title, + description, + image: pixivUtils.getProxiedImageUrl(image), + link: `${baseUrl}/novel/series/${seriesId}`, + item: items, + }; +} diff --git a/lib/routes/pixiv/novel-api/series/types.ts b/lib/routes/pixiv/novel-api/series/types.ts new file mode 100644 index 000000000000000..13f9c189b851b9d --- /dev/null +++ b/lib/routes/pixiv/novel-api/series/types.ts @@ -0,0 +1,68 @@ +export interface SeriesChapter { + id: string; + title: string; + available: boolean; +} + +export interface SeriesContentResponse { + error: boolean; + message: string; + body: SeriesChapter[]; +} + +export interface SeriesDetail { + error: boolean; + message: string; + body: { + id: string; + userId: string; + userName: string; + title: string; + caption: string; + description?: string; + tags: string[]; + publishedContentCount: number; + createDate: string; + updateDate: string; + firstNovelId: string; + latestNovelId: string; + xRestrict: number; + isOriginal: boolean; + cover: { + urls: { + original: string; + small?: string; + regular?: string; + original_square?: string; + }; + }; + extraData: { + meta: { + title: string; + description: string; + canonical: string; + ogp: { + description: string; + image: string; + title: string; + type: string; + }; + }; + }; + }; +} + +export interface SeriesFeed { + title: string; + description: string; + image: string; + link: string; + item: Array<{ + title: string; + description: string; + link: string; + pubDate?: Date; + author?: string; + category?: string[]; + }>; +} diff --git a/lib/routes/pixiv/novel-api/user-novels/nsfw.ts b/lib/routes/pixiv/novel-api/user-novels/nsfw.ts new file mode 100644 index 000000000000000..203e4660aecf0e3 --- /dev/null +++ b/lib/routes/pixiv/novel-api/user-novels/nsfw.ts @@ -0,0 +1,86 @@ +import got from '../../pixiv-got'; +import { maskHeader } from '../../constants'; +import queryString from 'query-string'; +import { config } from '@/config'; +import pixivUtils from '../../utils'; +import { getNSFWNovelContent } from '../content/nsfw'; +import { parseDate } from '@/utils/parse-date'; +import { convertPixivProtocolExtended } from '../content/utils'; +import type { NSFWNovelsResponse, NovelList } from './types'; +import ConfigNotFoundError from '@/errors/types/config-not-found'; +import cache from '@/utils/cache'; +import { getToken } from '../../token'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; + +function getNovels(user_id: string, token: string): Promise<NSFWNovelsResponse> { + return got('https://app-api.pixiv.net/v1/user/novels', { + headers: { + ...maskHeader, + Authorization: 'Bearer ' + token, + }, + searchParams: queryString.stringify({ + user_id, + filter: 'for_ios', + }), + }); +} + +export async function getNSFWUserNovels(id: string, fullContent: boolean = false, limit: number = 100): Promise<NovelList> { + if (!config.pixiv || !config.pixiv.refreshToken) { + throw new ConfigNotFoundError('This user is an R18 creator, PIXIV_REFRESHTOKEN is required.\npixiv RSS is disabled due to the lack of relevant config.\n該用戶爲 R18 創作者,需要 PIXIV_REFRESHTOKEN。'); + } + + const token = await getToken(cache.tryGet); + if (!token) { + throw new ConfigNotFoundError('pixiv not login'); + } + + const response = await getNovels(id, token); + const novels = limit ? response.data.novels.slice(0, limit) : response.data.novels; + + if (novels.length === 0) { + throw new InvalidParameterError(`${id} is not a valid user ID, or the user has no novels.\n${id} 不是有效的用戶 ID,或者該用戶沒有小說作品。`); + } + + const username = novels[0].user.name; + + const items = await Promise.all( + novels.map(async (novel) => { + const baseItem = { + title: novel.series?.title ? `${novel.series.title} - ${novel.title}` : novel.title, + description: ` + <img src="${pixivUtils.getProxiedImageUrl(novel.image_urls.large)}" /> + <p>${convertPixivProtocolExtended(novel.caption)}</p> + <p> + 字數:${novel.text_length}<br> + 閱覽數:${novel.total_view}<br> + 收藏數:${novel.total_bookmarks}<br> + 評論數:${novel.total_comments}<br> + </p>`, + author: novel.user.name, + pubDate: parseDate(novel.create_date), + link: `https://www.pixiv.net/novel/show.php?id=${novel.id}`, + category: novel.tags.map((t) => t.name), + }; + + if (!fullContent) { + return baseItem; + } + + const { content } = await getNSFWNovelContent(novel.id, token); + + return { + ...baseItem, + description: `${baseItem.description}<hr>${content}`, + }; + }) + ); + + return { + title: `${username}'s novels - pixiv`, + description: `${username} 的 pixiv 最新小说`, + image: pixivUtils.getProxiedImageUrl(novels[0].user.profile_image_urls.medium), + link: `https://www.pixiv.net/users/${id}/novels`, + item: items, + }; +} diff --git a/lib/routes/pixiv/novel-api/user-novels/sfw.ts b/lib/routes/pixiv/novel-api/user-novels/sfw.ts new file mode 100644 index 000000000000000..40c46a6885388e5 --- /dev/null +++ b/lib/routes/pixiv/novel-api/user-novels/sfw.ts @@ -0,0 +1,77 @@ +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; +import pixivUtils from '../../utils'; +import { getSFWNovelContent } from '../content/sfw'; +import type { SFWNovelsResponse, NovelList } from './types'; + +const baseUrl = 'https://www.pixiv.net'; + +export async function getSFWUserNovels(id: string, fullContent: boolean = false, limit: number = 100): Promise<NovelList> { + const url = `${baseUrl}/users/${id}/novels`; + const { data: allData } = await got(`${baseUrl}/ajax/user/${id}/profile/all`, { + headers: { + referer: url, + }, + }); + + const novels = Object.keys(allData.body.novels) + .sort((a, b) => Number(b) - Number(a)) + .slice(0, Number.parseInt(String(limit), 10)); + + if (novels.length === 0) { + throw new Error('No novels found for this user, or is an R18 creator, fallback to ConfigNotFoundError'); + } + + const searchParams = new URLSearchParams(); + for (const novel of novels) { + searchParams.append('ids[]', novel); + } + + const { data } = (await got(`${baseUrl}/ajax/user/${id}/profile/novels`, { + headers: { + referer: url, + }, + searchParams, + })) as SFWNovelsResponse; + + const items = await Promise.all( + Object.values(data.body.works).map(async (item) => { + const baseItem = { + title: item.title, + description: ` + <img src=${pixivUtils.getProxiedImageUrl(item.url)} /> + <p>${item.description}</p> + <p> + 字數:${item.textCount}<br> + 閱讀時間:${item.readingTime} 分鐘<br> + 收藏數:${item.bookmarkCount}<br> + </p> + `, + link: `${baseUrl}/novel/show.php?id=${item.id}`, + author: item.userName, + pubDate: parseDate(item.createDate), + updated: parseDate(item.updateDate), + category: item.tags, + }; + + if (!fullContent) { + return baseItem; + } + + const { content } = await getSFWNovelContent(item.id); + + return { + ...baseItem, + description: `${baseItem.description}<hr>${content}`, + }; + }) + ); + + return { + title: data.body.extraData.meta.title, + description: data.body.extraData.meta.ogp.description, + image: pixivUtils.getProxiedImageUrl(Object.values(data.body.works)[0].profileImageUrl), + link: url, + item: items, + }; +} diff --git a/lib/routes/pixiv/novel-api/user-novels/types.ts b/lib/routes/pixiv/novel-api/user-novels/types.ts new file mode 100644 index 000000000000000..1ca3da4f81f8bad --- /dev/null +++ b/lib/routes/pixiv/novel-api/user-novels/types.ts @@ -0,0 +1,133 @@ +export interface SFWNovelsResponse { + data: { + error: boolean; + message: string; + body: { + works: Record<string, SFWNovelWork>; + extraData: { + meta: { + title: string; + description: string; + canonical: string; + ogp: { + description: string; + image: string; + title: string; + type: string; + }; + twitter: { + description: string; + image: string; + title: string; + card: string; + }; + alternateLanguages: { + ja: string; + en: string; + }; + descriptionHeader: string; + }; + }; + }; + }; +} + +export interface SFWNovelWork { + id: string; + title: string; + genre: string; + xRestrict: number; + restrict: number; + url: string; + tags: string[]; + userId: string; + userName: string; + profileImageUrl: string; + textCount: number; + wordCount: number; + readingTime: number; + useWordCount: boolean; + description: string; + isBookmarkable: boolean; + bookmarkData: null; + bookmarkCount: number; + isOriginal: boolean; + marker: null; + titleCaptionTranslation: { + workTitle: null; + workCaption: null; + }; + createDate: string; + updateDate: string; + isMasked: boolean; + aiType: number; + seriesId: string; + seriesTitle: string; + isUnlisted: boolean; +} + +export interface NSFWNovelsResponse { + data: { + user: { + id: number; + name: string; + account: string; + profile_image_urls: { + medium: string; + }; + is_followed: boolean; + is_access_blocking_user: boolean; + }; + novels: NSFWNovelWork[]; + }; +} + +export interface NSFWNovelWork { + id: string; + title: string; + caption: string; + restrict: number; + x_restrict: number; + image_urls: { + square_medium: string; + medium: string; + large: string; + }; + create_date: string; + tags: Array<{ + name: string; + translated_name: string | null; + added_by_uploaded_user: boolean; + }>; + text_length: number; + user: { + id: number; + name: string; + account: string; + profile_image_urls: { + medium: string; + }; + }; + series?: { + id?: number; + title?: string; + }; + total_bookmarks: number; + total_view: number; + total_comments: number; +} + +export interface NovelList { + title: string; + description: string; + image: string; + link: string; + item: Array<{ + title: string; + description: string; + author: string; + pubDate: Date; + link: string; + category: string[]; + }>; +} diff --git a/lib/routes/pixiv/novel-series.ts b/lib/routes/pixiv/novel-series.ts new file mode 100644 index 000000000000000..7f41c8586167cee --- /dev/null +++ b/lib/routes/pixiv/novel-series.ts @@ -0,0 +1,52 @@ +import { Data, Route } from '@/types'; +import { config } from '@/config'; +import { getNSFWSeriesNovels } from './novel-api/series/nsfw'; +import { getSFWSeriesNovels } from './novel-api/series/sfw'; + +export const route: Route = { + path: '/novel/series/:id', + categories: ['social-media'], + example: '/pixiv/novel/series/11586857', + parameters: { + id: 'Series id, can be found in URL', + }, + features: { + requireConfig: [ + { + name: 'PIXIV_REFRESHTOKEN', + optional: true, + description: ` +refresh_token after Pixiv login, required for accessing R18 novels +Pixiv 登錄後的 refresh_token,用於獲取 R18 小說 +[https://docs.rsshub.app/deploy/config#pixiv](https://docs.rsshub.app/deploy/config#pixiv)`, + }, + ], + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Novel Series', + maintainers: ['SnowAgar25'], + handler, + radar: [ + { + source: ['www.pixiv.net/novel/series/:id'], + target: '/novel/series/:id', + }, + ], +}; + +const hasPixivAuth = () => Boolean(config.pixiv && config.pixiv.refreshToken); + +async function handler(ctx): Promise<Data> { + const id = ctx.req.param('id'); + const { limit } = ctx.req.query(); + + if (hasPixivAuth()) { + return await getNSFWSeriesNovels(id, limit); + } + + return await getSFWSeriesNovels(id, limit); +} diff --git a/lib/routes/pixiv/novels.ts b/lib/routes/pixiv/novels.ts index 4bdc76e286e11fc..345f815d7283e1c 100644 --- a/lib/routes/pixiv/novels.ts +++ b/lib/routes/pixiv/novels.ts @@ -1,8 +1,9 @@ import { Data, Route, ViewType } from '@/types'; import { fallback, queryToBoolean } from '@/utils/readable-social'; -import { getR18Novels } from './api/get-novels-nsfw'; -import { getNonR18Novels } from './api/get-novels-sfw'; import { config } from '@/config'; +import { getNSFWUserNovels } from './novel-api/user-novels/nsfw'; +import { getSFWUserNovels } from './novel-api/user-novels/sfw'; +import ConfigNotFoundError from '@/errors/types/config-not-found'; export const route: Route = { path: '/user/novels/:id/:full_content?', @@ -40,12 +41,12 @@ refresh_token after Pixiv login, required for accessing R18 novels radar: [ { title: 'User Novels (簡介 Basic info)', - source: ['www.pixiv.net/users/:id/novels'], + source: ['www.pixiv.net/users/:id/novels', 'www.pixiv.net/users/:id'], target: '/user/novels/:id', }, { title: 'User Novels (全文 Full text)', - source: ['www.pixiv.net/users/:id/novels'], + source: ['www.pixiv.net/users/:id/novels', 'www.pixiv.net/users/:id'], target: '/user/novels/:id/true', }, ], @@ -72,20 +73,24 @@ const hasPixivAuth = () => Boolean(config.pixiv && config.pixiv.refreshToken); async function handler(ctx): Promise<Data> { const id = ctx.req.param('id'); const fullContent = fallback(undefined, queryToBoolean(ctx.req.param('full_content')), false); - const { limit } = ctx.req.query(); - // Use R18 API first if auth exists if (hasPixivAuth()) { - return await getR18Novels(id, fullContent, limit); + return await getNSFWUserNovels(id, fullContent, limit); } - // Attempt non-R18 API when Pixiv auth is missing - const nonR18Result = await getNonR18Novels(id, fullContent, limit).catch(() => null); + const nonR18Result = await getSFWUserNovels(id, fullContent, limit).catch((error) => { + if (error.name === 'Error') { + return null; + } + throw error; + }); + if (nonR18Result) { return nonR18Result; } - // Fallback to R18 API as last resort - return await getR18Novels(id, fullContent, limit); + throw new ConfigNotFoundError( + 'This user may not have any novel works, or is an R18 creator, PIXIV_REFRESHTOKEN is required.\npixiv RSS is disabled due to the lack of relevant config.\n該用戶可能沒有小說作品,或者該用戶爲 R18 創作者,需要 PIXIV_REFRESHTOKEN。' + ); } diff --git a/lib/routes/pixiv/utils.ts b/lib/routes/pixiv/utils.ts index 9bd7dab5a00f13d..5d3e71b968b28c3 100644 --- a/lib/routes/pixiv/utils.ts +++ b/lib/routes/pixiv/utils.ts @@ -1,6 +1,4 @@ import { config } from '@/config'; -import { load } from 'cheerio'; -import getIllustDetail from './api/get-illust-detail'; export default { getImgs(illust) { @@ -19,118 +17,4 @@ export default { getProxiedImageUrl(originalUrl: string): string { return originalUrl.replace('https://i.pximg.net', config.pixiv.imgProxy || ''); }, - // docs: https://www.pixiv.help/hc/ja/articles/235584168-小説作品の本文内に使える特殊タグとは - async parseNovelContent(content: string, images: Record<string, string>, token?: string): Promise<string> { - try { - // 如果有 token,處理 pixiv 圖片引用 - // If token exists, process pixiv image references - if (token) { - const imageMatches = [...content.matchAll(/\[pixivimage:(\d+)(?:-(\d+))?\]/g)]; - const imageIdToUrl = new Map<string, string>(); - - // 批量獲取圖片資訊 - // Batch fetch image information - await Promise.all( - imageMatches.map(async ([, illustId, pageNum]) => { - if (!illustId) { - return; - } - - try { - const illust = (await getIllustDetail(illustId, token)).data.illust; - const pixivimages = this.getImgs(illust).map((img) => img.match(/src="([^"]+)"/)?.[1] || ''); - - const imageUrl = pixivimages[Number(pageNum) || 0]; - if (imageUrl) { - imageIdToUrl.set(pageNum ? `${illustId}-${pageNum}` : illustId, imageUrl); - } - } catch (error) { - // 記錄錯誤但不中斷處理 - // Log error but don't interrupt processing - logger.warn(`Failed to fetch illust detail for ID ${illustId}: ${error instanceof Error ? error.message : String(error)}`); - } - }) - ); - - // 替換 pixiv 圖片引用為 img 標籤 - // Replace pixiv image references with img tags - content = content.replaceAll(/\[pixivimage:(\d+)(?:-(\d+))?\]/g, (match, illustId, pageNum) => { - const key = pageNum ? `${illustId}-${pageNum}` : illustId; - const imageUrl = imageIdToUrl.get(key); - return imageUrl ? `<img src="${imageUrl}" alt="pixiv illustration ${illustId}${pageNum ? ` page ${pageNum}` : ''}">` : match; - }); - } else { - /* - * 處理 get-novels-sfw 的情況 - * 當沒有 PIXIV_REFRESHTOKEN 時,將 [pixivimage:(\d+)] 格式轉換為 artwork 連結 - * 因無法獲取 Pixiv 作品詳情,改為提供直接連結到原始作品頁面 - * - * Handle get-novels-sfw case - * When PIXIV_REFRESHTOKEN is not available, convert [pixivimage:(\d+)] format to artwork link - * Provide direct link to original artwork page since artwork details cannot be retrieved - */ - content = content.replaceAll(/\[pixivimage:(\d+)(?:-(\d+))?\]/g, (_, illustId) => `<a href="https://www.pixiv.net/artworks/${illustId}" target="_blank" rel="noopener noreferrer">Pixiv Artwork #${illustId}</a>`); - } - - // 處理作者上傳的圖片 - // Process author uploaded images - content = content.replaceAll(/\[uploadedimage:(\d+)\]/g, (match, imageId) => { - if (images[imageId]) { - return `<img src="${images[imageId]}" alt="novel illustration ${imageId}">`; - } - return match; - }); - - // 基本格式處理 - // Basic formatting - content = content - // 換行轉換為 HTML 換行 - // Convert newlines to HTML breaks - .replaceAll('\n', '<br>') - // 連續換行轉換為段落 - // Convert consecutive breaks to paragraphs - .replaceAll(/(<br>){2,}/g, '</p><p>') - // ruby 標籤(為日文漢字標註讀音) - // ruby tags (for Japanese kanji readings) - .replaceAll(/\[\[rb:(.*?)>(.*?)\]\]/g, '<ruby>$1<rt>$2</rt></ruby>') - // 外部連結 - // external links - .replaceAll(/\[\[jumpuri:(.*?)>(.*?)\]\]/g, '<a href="$2" target="_blank" rel="noopener noreferrer">$1</a>') - // 頁面跳轉,但由於 [newpage] 使用 hr 分隔,沒有頁數,沒必要跳轉,所以只顯示文字 - // Page jumps, but since [newpage] uses hr separators, without the page numbers, jumping isn't needed, so just display text - .replaceAll(/\[jump:(\d+)\]/g, 'Jump to page $1') - // 章節標題 - // chapter titles - .replaceAll(/\[chapter:(.*?)\]/g, '<h2>$1</h2>') - // 分頁符 - // page breaks - .replaceAll('[newpage]', '<hr>'); - - // 使用 cheerio 進行 HTML 清理和優化 - // Use cheerio for HTML cleanup and optimization - const $content = load(`<article><p>${content}</p></article>`); - - // 處理嵌套段落:移除多餘的嵌套 - // Handle nested paragraphs: remove unnecessary nesting - $content('p p').each((_, elem) => { - const $elem = $content(elem); - $elem.replaceWith($elem.html() || ''); - }); - - // 處理段落中的標題:確保正確的 HTML 結構 - // Handle headings in paragraphs: ensure correct HTML structure - $content('p h2').each((_, elem) => { - const $elem = $content(elem); - const $parent = $elem.parent('p'); - const html = $elem.prop('outerHTML'); - if ($parent.length && html) { - $parent.replaceWith(`</p>${html}<p>`); - } - }); - - return $content.html() || ''; - } catch (error) { - throw new Error(`Error parsing novel content: ${error instanceof Error ? error.message : String(error)}`); - } - }, }; From 51ab45628cb32e61b49e7f93556e5ccb29214356 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Mon, 11 Nov 2024 22:58:31 -0800 Subject: [PATCH 486/740] feat(route): afr (#17547) * feat(route): afr * feat(route/afr): add image support to latest and navigation endpoints --- lib/routes/afr/latest.ts | 69 +++++++ lib/routes/afr/namespace.ts | 7 + lib/routes/afr/navigation.ts | 75 ++++++++ lib/routes/afr/query.ts | 349 +++++++++++++++++++++++++++++++++++ lib/routes/afr/utils.ts | 80 ++++++++ 5 files changed, 580 insertions(+) create mode 100644 lib/routes/afr/latest.ts create mode 100644 lib/routes/afr/namespace.ts create mode 100644 lib/routes/afr/navigation.ts create mode 100644 lib/routes/afr/query.ts create mode 100644 lib/routes/afr/utils.ts diff --git a/lib/routes/afr/latest.ts b/lib/routes/afr/latest.ts new file mode 100644 index 000000000000000..b656755ceccfc87 --- /dev/null +++ b/lib/routes/afr/latest.ts @@ -0,0 +1,69 @@ +import { Route } from '@/types'; +import type { Context } from 'hono'; + +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import { assetsConnectionByCriteriaQuery } from './query'; +import { getItem } from './utils'; + +export const route: Route = { + path: '/latest', + categories: ['traditional-media'], + example: '/afr/latest', + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.afr.com/latest', 'www.afr.com/'], + }, + ], + name: 'Latest', + maintainers: ['TonyRL'], + handler, + url: 'www.afr.com/latest', +}; + +async function handler(ctx: Context) { + const limit = Number.parseInt(ctx.req.query('limit') ?? '10'); + const response = await ofetch('https://api.afr.com/graphql', { + query: { + query: assetsConnectionByCriteriaQuery, + operationName: 'assetsConnectionByCriteria', + variables: { + brand: 'afr', + first: limit, + render: 'web', + types: ['article', 'bespoke', 'featureArticle', 'liveArticle', 'video'], + after: '', + }, + }, + }); + + const list = response.data.assetsConnectionByCriteria.edges.map(({ node }) => ({ + title: node.asset.headlines.headline, + description: node.asset.about, + link: `https://www.afr.com${node.urls.published.afr.path}`, + pubDate: parseDate(node.dates.firstPublished), + updated: parseDate(node.dates.modified), + author: node.asset.byline, + category: [node.tags.primary.displayName, ...node.tags.secondary.map((tag) => tag.displayName)], + image: node.featuredImages && `https://static.ffx.io/images/${node.featuredImages.landscape16x9.data.id}`, + })); + + const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => getItem(item)))); + + return { + title: 'Latest | The Australian Financial Review | AFR', + description: 'The latest news, events, analysis and opinion from The Australian Financial Review', + image: 'https://www.afr.com/apple-touch-icon-1024x1024.png', + link: 'https://www.afr.com/latest', + item: items, + }; +} diff --git a/lib/routes/afr/namespace.ts b/lib/routes/afr/namespace.ts new file mode 100644 index 000000000000000..d6fd9b647e21654 --- /dev/null +++ b/lib/routes/afr/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'The Australian Financial Review', + url: 'afr.com', + lang: 'en', +}; diff --git a/lib/routes/afr/navigation.ts b/lib/routes/afr/navigation.ts new file mode 100644 index 000000000000000..cbe7421a296b16f --- /dev/null +++ b/lib/routes/afr/navigation.ts @@ -0,0 +1,75 @@ +import { Route } from '@/types'; +import type { Context } from 'hono'; + +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import { pageByNavigationPathQuery } from './query'; +import { getItem } from './utils'; + +export const route: Route = { + path: '/navigation/:path{.+}', + categories: ['traditional-media'], + example: '/afr/navigation/markets', + parameters: { + path: 'Navigation path, can be found in the URL of the page', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.afr.com/path*'], + }, + ], + name: 'Navigation', + maintainers: ['TonyRL'], + handler, + url: 'www.afr.com', +}; + +async function handler(ctx: Context) { + const { path } = ctx.req.param(); + const limit = Number.parseInt(ctx.req.query('limit') ?? '10'); + + const response = await ofetch('https://api.afr.com/api/content-audience/afr/graphql', { + query: { + query: pageByNavigationPathQuery, + operationName: 'pageByNavigationPath', + variables: { + input: { brandKey: 'afr', navigationPath: `/${path}`, renderName: 'web' }, + firstStories: limit, + afterStories: '', + }, + }, + }); + + const list = response.data.pageByNavigationPath.page.latestStoriesConnection.edges.map(({ node }) => ({ + title: node.headlines.headline, + description: node.overview.about, + link: `https://www.afr.com${node.urls.canonical.path}`, + pubDate: parseDate(node.dates.firstPublished), + updated: parseDate(node.dates.modified), + author: node.byline + .filter((byline) => byline.type === 'AUTHOR') + .map((byline) => byline.author.name) + .join(', '), + category: [node.tags.primary.displayName, ...node.tags.secondary.map((tag) => tag.displayName)], + image: node.images && `https://static.ffx.io/images/${node.images.landscape16x9.mediaId}`, + })); + + const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => getItem(item)))); + + return { + title: response.data.pageByNavigationPath.page.seo.title, + description: response.data.pageByNavigationPath.page.seo.description, + image: 'https://www.afr.com/apple-touch-icon-1024x1024.png', + link: `https://www.afr.com/${path}`, + item: items, + }; +} diff --git a/lib/routes/afr/query.ts b/lib/routes/afr/query.ts new file mode 100644 index 000000000000000..a596f8fc4f70dd2 --- /dev/null +++ b/lib/routes/afr/query.ts @@ -0,0 +1,349 @@ +export const pageByNavigationPathQuery = `query pageByNavigationPath( + $input: PageByNavigationPathInput! + $firstStories: Int + $afterStories: Cursor + ) { + pageByNavigationPath(input: $input) { + error { + message + type { + class + ... on ErrorTypeInvalidRequest { + fields { + field + message + } + } + } + } + page { + ads { + suppress + } + description + id + latestStoriesConnection(first: $firstStories, after: $afterStories) { + edges { + node { + byline { + ...AssetBylineFragment + } + headlines { + headline + } + ads { + sponsor { + name + } + } + overview { + about + label + } + type + dates { + firstPublished + published + } + id + publicId + images { + ...AssetImagesFragmentAudience + } + tags { + primary { + ...TagFragmentAudience + } + secondary { + ...TagFragmentAudience + } + } + urls { + ...AssetUrlsAudienceFragment + } + } + } + pageInfo { + endCursor + hasNextPage + } + } + name + seo { + canonical { + brand { + key + } + } + description + title + } + social { + image { + height + url + width + } + } + } + redirect + } + } + fragment AssetBylineFragment on AssetByline { + type + ... on AssetBylineAuthor { + author { + name + publicId + profile { + avatar + bio + body + canonical { + brand { + key + } + } + email + socials { + facebook { + publicId + } + twitter { + publicId + } + } + title + } + } + } + ... on AssetBylineName { + name + } + } + fragment AssetImagesFragmentAudience on ImageRenditions { + landscape16x9 { + ...ImageFragmentAudience + } + landscape3x2 { + ...ImageFragmentAudience + } + portrait2x3 { + ...ImageFragmentAudience + } + square1x1 { + ...ImageFragmentAudience + } + } + fragment ImageFragmentAudience on ImageRendition { + altText + animated + caption + credit + crop { + offsetX + offsetY + width + zoom + } + mediaId + mimeType + source + type + } + fragment AssetUrlsAudienceFragment on AssetURLs { + canonical { + brand { + key + } + path + } + external { + url + } + published { + brand { + key + } + path + } + } + fragment TagFragmentAudience on Tag { + company { + exchangeCode + stockCode + } + context { + name + } + description + displayName + externalEntities { + google { + placeId + } + wikipedia { + publicId + url + } + } + id + location { + latitude + longitude + postalCode + state + } + name + publicId + seo { + description + title + } + urls { + canonical { + brand { + key + } + path + } + published { + brand { + key + } + path + } + } + }`; + +export const assetsConnectionByCriteriaQuery = `query assetsConnectionByCriteria( + $after: ID + $brand: Brand! + $categories: [Int!] + $first: Int! + $render: Render! + $types: [AssetType!]! + ) { + assetsConnectionByCriteria( + after: $after + brand: $brand + categories: $categories + first: $first + render: $render + types: $types + ) { + edges { + cursor + node { + ...AssetFragment + sponsor { + name + } + } + } + error { + message + type { + class + } + } + pageInfo { + endCursor + hasNextPage + } + } + } + fragment AssetFragment on Asset { + asset { + about + byline + duration + headlines { + headline + } + live + } + assetType + dates { + firstPublished + modified + published + } + id + featuredImages { + landscape16x9 { + ...ImageFragment + } + landscape3x2 { + ...ImageFragment + } + portrait2x3 { + ...ImageFragment + } + square1x1 { + ...ImageFragment + } + } + label + tags { + primary: primaryTag { + ...AssetTag + } + secondary { + ...AssetTag + } + } + urls { + ...AssetURLs + } + } + fragment AssetTag on AssetTagDetails { + ...AssetTagAudience + shortID + slug + } + fragment AssetTagAudience on AssetTagDetails { + company { + exchangeCode + stockCode + } + context + displayName + id + name + urls { + canonical { + brand + path + } + published { + afr { + path + } + } + } + } + fragment AssetURLs on AssetURLs { + canonical { + brand + path + } + published { + afr { + path + } + } + } + fragment ImageFragment on Image { + data { + altText + aspect + autocrop + caption + cropWidth + id + offsetX + offsetY + zoom + } + }`; diff --git a/lib/routes/afr/utils.ts b/lib/routes/afr/utils.ts new file mode 100644 index 000000000000000..c055ae9e70d29af --- /dev/null +++ b/lib/routes/afr/utils.ts @@ -0,0 +1,80 @@ +import * as cheerio from 'cheerio'; +import ofetch from '@/utils/ofetch'; + +export const getItem = async (item) => { + const response = await ofetch(item.link); + const $ = cheerio.load(response); + + const reduxState = JSON.parse($('script#__REDUX_STATE__').text().replaceAll(':undefined', ':null').match('__REDUX_STATE__=(.*);')?.[1] || '{}'); + + const content = reduxState.page.content; + const asset = content.asset; + + switch (content.assetType) { + case 'liveArticle': + item.description = asset.posts.map((post) => `<h2>${post.asset.headlines.headline}</h2>${post.asset.body}`).join(''); + break; + + case 'article': + case 'featureArticle': + item.description = renderArticle(asset, item.link); + break; + + default: + throw new Error(`Unknown asset type: ${content.assetType} in ${item.link}`); + } + + return item; +}; + +const renderArticle = (asset, link: string) => { + const $ = cheerio.load(asset.body, null, false); + $('x-placeholder').each((_, el) => { + const $el = $(el); + const id = $el.attr('id'); + if (!id) { + $el.replaceWith(''); + } + + const placeholder = asset.bodyPlaceholders[id!]; + switch (placeholder?.type) { + case 'callout': + case 'relatedStory': + $el.replaceWith(''); + break; + + case 'iframe': + $el.replaceWith(`<iframe src="${placeholder.data.url}" frameborder="0" allowfullscreen></iframe>`); + break; + + case 'image': + $el.replaceWith(`<img src="https://static.ffx.io/images/${placeholder.data.fileName}" alt="${placeholder.data.altText}" />`); + break; + + case 'linkArticle': + $el.replaceWith(placeholder.data.text); + break; + + case 'linkExternal': + $el.replaceWith(`<a href="${placeholder.data.url}" target="_blank" rel="noopener">${placeholder.data.text}</a>`); + break; + + case 'quote': + $el.replaceWith(placeholder.data.markup); + break; + + case 'scribd': + $el.replaceWith(`<a href="${placeholder.data.url}" target="_blank" rel="noopener">View on Scribd</a>`); + break; + + case 'twitter': + $el.replaceWith(`<a href="${placeholder.data.url}">${placeholder.data.url}</a>`); + break; + + default: + throw new Error(`Unknown placeholder type: ${placeholder?.type} in ${link}`); + } + }); + + return $.html(); +}; From 482986d0658041d5d5fe931aceb39d48f5d479c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 03:26:33 -0800 Subject: [PATCH 487/740] chore(deps-dev): bump @typescript-eslint/parser from 8.13.0 to 8.14.0 (#17548) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.13.0 to 8.14.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.14.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 72 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 61 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index df91469cef147de..a546caeaf63ab55 100644 --- a/package.json +++ b/package.json @@ -167,7 +167,7 @@ "@types/title": "3.4.3", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.13.0", - "@typescript-eslint/parser": "8.13.0", + "@typescript-eslint/parser": "8.14.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.104", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8932af41a451fe8..2a6412c1f0a49b9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -356,10 +356,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.13.0 - version: 8.13.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) + version: 8.13.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/parser': - specifier: 8.13.0 - version: 8.13.0(eslint@9.14.0)(typescript@5.6.3) + specifier: 8.14.0 + version: 8.14.0(eslint@9.14.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.6 version: 0.27.6 @@ -1973,8 +1973,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.13.0': - resolution: {integrity: sha512-w0xp+xGg8u/nONcGw1UXAr6cjCPU1w0XVyBs6Zqaj5eLmxkKQAByTdV/uGgNN5tVvN/kKpoQlP2cL7R+ajZZIQ==} + '@typescript-eslint/parser@8.14.0': + resolution: {integrity: sha512-2p82Yn9juUJq0XynBXtFCyrBDb6/dJombnz6vbo6mgQEtWHfvHbQuEa9kAOVIt1c9YFwi7H6WxtPj1kg+80+RA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1991,6 +1991,10 @@ packages: resolution: {integrity: sha512-XsGWww0odcUT0gJoBZ1DeulY1+jkaHUciUq4jKNv4cpInbvvrtDoyBH9rE/n2V29wQJPk8iCH1wipra9BhmiMA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.14.0': + resolution: {integrity: sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.13.0': resolution: {integrity: sha512-Rqnn6xXTR316fP4D2pohZenJnp+NwQ1mo7/JM+J1LWZENSLkJI8ID8QNtlvFeb0HnFSK94D6q0cnMX6SbE5/vA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2008,6 +2012,10 @@ packages: resolution: {integrity: sha512-4cyFErJetFLckcThRUFdReWJjVsPCqyBlJTi6IDEpc1GWCIIZRFxVppjWLIMcQhNGhdWJJRYFHpHoDWvMlDzng==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.14.0': + resolution: {integrity: sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.12.2': resolution: {integrity: sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2026,6 +2034,15 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.14.0': + resolution: {integrity: sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@8.12.2': resolution: {integrity: sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2046,6 +2063,10 @@ packages: resolution: {integrity: sha512-7N/+lztJqH4Mrf0lb10R/CbI1EaAMMGyF5y0oJvFoAhafwgiRA7TXyd8TFn8FC8k5y2dTsYogg238qavRGNnlw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.14.0': + resolution: {integrity: sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -7502,10 +7523,10 @@ snapshots: '@types/node': 22.9.0 optional: true - '@typescript-eslint/eslint-plugin@8.13.0(@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.13.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.13.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.14.0(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.13.0 '@typescript-eslint/type-utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) @@ -7520,12 +7541,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.13.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.13.0 + '@typescript-eslint/scope-manager': 8.14.0 + '@typescript-eslint/types': 8.14.0 + '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.14.0 debug: 4.3.7 eslint: 9.14.0 optionalDependencies: @@ -7543,6 +7564,11 @@ snapshots: '@typescript-eslint/types': 8.13.0 '@typescript-eslint/visitor-keys': 8.13.0 + '@typescript-eslint/scope-manager@8.14.0': + dependencies: + '@typescript-eslint/types': 8.14.0 + '@typescript-eslint/visitor-keys': 8.14.0 + '@typescript-eslint/type-utils@8.13.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) @@ -7559,6 +7585,8 @@ snapshots: '@typescript-eslint/types@8.13.0': {} + '@typescript-eslint/types@8.14.0': {} + '@typescript-eslint/typescript-estree@8.12.2(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.12.2 @@ -7589,6 +7617,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.14.0(typescript@5.6.3)': + dependencies: + '@typescript-eslint/types': 8.14.0 + '@typescript-eslint/visitor-keys': 8.14.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.12.2(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) @@ -7621,6 +7664,11 @@ snapshots: '@typescript-eslint/types': 8.13.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.14.0': + dependencies: + '@typescript-eslint/types': 8.14.0 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.11': From 91d9acc68b5a4ec19158ba9c10c4d31e28aac7ec Mon Sep 17 00:00:00 2001 From: DIYgod <i@diygod.me> Date: Tue, 12 Nov 2024 20:13:35 +0800 Subject: [PATCH 488/740] fix: redirection in router handler --- lib/middleware/template.test.ts | 6 ++++++ lib/middleware/template.tsx | 4 +++- lib/routes/141jav/index.ts | 2 +- lib/routes/141ppv/index.ts | 2 +- lib/routes/aqara/region.ts | 2 +- lib/routes/cs/zzkx.ts | 2 +- lib/routes/dongqiudi/daily.ts | 2 +- lib/routes/hostmonit/cloudflareyesv6.ts | 2 +- lib/routes/jiemian/list.ts | 2 +- lib/routes/liulinblog/itnews.ts | 2 +- lib/routes/nbd/daily.ts | 2 +- lib/routes/scmp/coronavirus.ts | 2 +- lib/routes/test/index.ts | 4 ++++ lib/routes/weibo/timeline.ts | 5 +++-- 14 files changed, 26 insertions(+), 13 deletions(-) diff --git a/lib/middleware/template.test.ts b/lib/middleware/template.test.ts index 2a03c5ddd77a12b..da61f0ffec20e46 100644 --- a/lib/middleware/template.test.ts +++ b/lib/middleware/template.test.ts @@ -108,4 +108,10 @@ describe('template', () => { expect(parsed.items[0].enclosure?.length).toBe('3661'); expect(parsed.items[0].itunes.duration).toBe('10:10:10'); }); + + it(`redirect`, async () => { + const response = await app.request('/test/redirect'); + expect(response.status).toBe(301); + expect(response.headers.get('location')).toBe('/test/1'); + }); }); diff --git a/lib/middleware/template.tsx b/lib/middleware/template.tsx index 36dae2e72d93d5d..6bcf3fd639502bd 100644 --- a/lib/middleware/template.tsx +++ b/lib/middleware/template.tsx @@ -102,7 +102,9 @@ const middleware: MiddlewareHandler = async (ctx, next) => { return ctx.json(result); } - if (ctx.get('no-content')) { + if (ctx.get('redirect')) { + return ctx.redirect(ctx.get('redirect'), 301); + } else if (ctx.get('no-content')) { return ctx.body(null); } else { // retain .ums for backward compatibility diff --git a/lib/routes/141jav/index.ts b/lib/routes/141jav/index.ts index 5eb1d07579eda58..b7f58edad2498b1 100644 --- a/lib/routes/141jav/index.ts +++ b/lib/routes/141jav/index.ts @@ -66,7 +66,7 @@ async function handler(ctx) { const $ = load(response.data); if (getSubPath(ctx) === '/') { - ctx.redirect(`/141jav${$('.overview').first().attr('href')}`); + ctx.set('redirect', `/141jav${$('.overview').first().attr('href')}`); return; } diff --git a/lib/routes/141ppv/index.ts b/lib/routes/141ppv/index.ts index 2e084470440f2e0..fbf1239b4c71461 100644 --- a/lib/routes/141ppv/index.ts +++ b/lib/routes/141ppv/index.ts @@ -66,7 +66,7 @@ async function handler(ctx) { const $ = load(response.data); if (getSubPath(ctx) === '/') { - ctx.redirect(`/141ppv${$('.overview').first().attr('href')}`); + ctx.set('redirect', `/141ppv${$('.overview').first().attr('href')}`); return; } diff --git a/lib/routes/aqara/region.ts b/lib/routes/aqara/region.ts index e3c20484d217d8b..48174a0834bec38 100644 --- a/lib/routes/aqara/region.ts +++ b/lib/routes/aqara/region.ts @@ -14,5 +14,5 @@ function handler(ctx) { const { region = 'en', type = 'news' } = ctx.req.param(); const redirectTo = `/aqara/${region}/category/${types[type]}`; - ctx.redirect(redirectTo); + ctx.set('redirect', redirectTo); } diff --git a/lib/routes/cs/zzkx.ts b/lib/routes/cs/zzkx.ts index 0786a25591907a7..783ce264b525894 100644 --- a/lib/routes/cs/zzkx.ts +++ b/lib/routes/cs/zzkx.ts @@ -10,5 +10,5 @@ function handler(ctx) { // https://www.cs.com.cn/sylm/jsbd/ const redirectTo = '/cs/sylm/jsbd'; - ctx.redirect(redirectTo); + ctx.set('redirect', redirectTo); } diff --git a/lib/routes/dongqiudi/daily.ts b/lib/routes/dongqiudi/daily.ts index d4e32f93b435514..c5ec38e677026ec 100644 --- a/lib/routes/dongqiudi/daily.ts +++ b/lib/routes/dongqiudi/daily.ts @@ -18,5 +18,5 @@ export const route: Route = { }; function handler(ctx) { - ctx.redirect('/dongqiudi/special/48'); + ctx.set('redirect', '/dongqiudi/special/48'); } diff --git a/lib/routes/hostmonit/cloudflareyesv6.ts b/lib/routes/hostmonit/cloudflareyesv6.ts index a52287cfb064856..c7d38cbae387960 100644 --- a/lib/routes/hostmonit/cloudflareyesv6.ts +++ b/lib/routes/hostmonit/cloudflareyesv6.ts @@ -7,5 +7,5 @@ export const route: Route = { }; function handler(ctx) { - ctx.redirect('/hostmonit/cloudflareyes/v6'); + ctx.set('redirect', '/hostmonit/cloudflareyes/v6'); } diff --git a/lib/routes/jiemian/list.ts b/lib/routes/jiemian/list.ts index ea316e701487327..95637ee14fd9019 100644 --- a/lib/routes/jiemian/list.ts +++ b/lib/routes/jiemian/list.ts @@ -10,5 +10,5 @@ function handler(ctx) { const id = ctx.req.param('id'); const redirectTo = `/jiemian${id ? `/lists/${id}` : ''}`; - ctx.redirect(redirectTo); + ctx.set('redirect', redirectTo); } diff --git a/lib/routes/liulinblog/itnews.ts b/lib/routes/liulinblog/itnews.ts index bc627efc54c1b92..155ad9060fb7738 100644 --- a/lib/routes/liulinblog/itnews.ts +++ b/lib/routes/liulinblog/itnews.ts @@ -9,5 +9,5 @@ export const route: Route = { function handler(ctx) { const { channel } = ctx.req.param(); const redirectTo = `/liulinblog/${channel}`; - ctx.redirect(redirectTo); + ctx.set('redirect', redirectTo); } diff --git a/lib/routes/nbd/daily.ts b/lib/routes/nbd/daily.ts index a05b1060734c58b..49c554967a6caad 100644 --- a/lib/routes/nbd/daily.ts +++ b/lib/routes/nbd/daily.ts @@ -24,5 +24,5 @@ export const route: Route = { }; function handler(ctx) { - ctx.redirect('/nbd/332'); + ctx.set('redirect', '/nbd/332'); } diff --git a/lib/routes/scmp/coronavirus.ts b/lib/routes/scmp/coronavirus.ts index 7745656b475b16f..193267e80f21339 100644 --- a/lib/routes/scmp/coronavirus.ts +++ b/lib/routes/scmp/coronavirus.ts @@ -18,5 +18,5 @@ export const route: Route = { }; function handler(ctx) { - ctx.redirect('/scmp/topics/coronavirus-pandemic-all-stories'); + ctx.set('redirect', '/scmp/topics/coronavirus-pandemic-all-stories'); } diff --git a/lib/routes/test/index.ts b/lib/routes/test/index.ts index 70c88815b7e1e93..a4a744fe06eefe2 100644 --- a/lib/routes/test/index.ts +++ b/lib/routes/test/index.ts @@ -32,6 +32,10 @@ async function handler(ctx) { if (ctx.req.param('id') === 'invalid-parameter-error') { throw new InvalidParameterError('Test invalid parameter error'); } + if (ctx.req.param('id') === 'redirect') { + ctx.set('redirect', '/test/1'); + return; + } let item: DataItem[] = []; let image: string | null = null; switch (ctx.req.param('id')) { diff --git a/lib/routes/weibo/timeline.ts b/lib/routes/weibo/timeline.ts index 1acdacc594cdef4..921d5cc0f7963d5 100644 --- a/lib/routes/weibo/timeline.ts +++ b/lib/routes/weibo/timeline.ts @@ -95,7 +95,8 @@ async function handler(ctx) { ctx.set({ 'Cache-Control': 'no-cache', }); - ctx.redirect(`https://api.weibo.com/oauth2/authorize?client_id=${app_key}&redirect_uri=${redirect_url}${routeParams ? `&state=${routeParams}` : ''}`); + ctx.set('redirect', `https://api.weibo.com/oauth2/authorize?client_id=${app_key}&redirect_uri=${redirect_url}${routeParams ? `&state=${routeParams}` : ''}`); + return; } const resultItem = await Promise.all( response.statuses.map(async (item) => { @@ -183,6 +184,6 @@ async function handler(ctx) { ctx.set({ 'Cache-Control': 'no-cache', }); - ctx.redirect(`https://api.weibo.com/oauth2/authorize?client_id=${app_key}&redirect_uri=${redirect_url}${routeParams ? `&state=${feature}/${routeParams.replaceAll('&', '%26')}` : ''}`); + ctx.set('redirect', `https://api.weibo.com/oauth2/authorize?client_id=${app_key}&redirect_uri=${redirect_url}${routeParams ? `&state=${feature}/${routeParams.replaceAll('&', '%26')}` : ''}`); } } From 91dbce4029bfc28dd8d28aa9ad60068194aa556d Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Tue, 12 Nov 2024 20:47:09 +0800 Subject: [PATCH 489/740] fix: redirect old bilibili ranking route (#17553) --- lib/routes/bilibili/ranking.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/routes/bilibili/ranking.ts b/lib/routes/bilibili/ranking.ts index fb69eaa1fdc8752..ab292460122f33b 100644 --- a/lib/routes/bilibili/ranking.ts +++ b/lib/routes/bilibili/ranking.ts @@ -114,7 +114,7 @@ const ridTypeList = [ ]; export const route: Route = { - path: '/ranking/:rid_index?/:embed?', + path: '/ranking/:rid_index?/:embed?/:redirect1?/:redirect2?', name: '排行榜', maintainers: ['DIYgod', 'hyoban'], categories: ['social-media', 'popular'], @@ -130,10 +130,20 @@ export const route: Route = { })).filter((_, i) => !ridTypeList[i].startsWith('pgc/')), }, embed: '默认为开启内嵌视频, 任意值为关闭', + redirect1: '留空,用于兼容之前的路由', + redirect2: '留空,用于兼容之前的路由', }, handler, }; +function getRidIndexByRid(rid: string): number { + const index = ridNumberList.indexOf(rid); + if (index === -1) { + throw new Error('Invalid rid'); + } + return index; +} + function getAPI(ridIndex: number) { if (ridIndex < 0 || ridIndex >= ridNumberList.length) { throw new Error('Invalid rid index'); @@ -172,6 +182,14 @@ function getAPI(ridIndex: number) { } async function handler(ctx) { + const args = ctx.req.param(); + if (args.redirect1 || args.redirect2) { + // redirect old routes like /bilibili/ranking/0/3/1 or /bilibili/ranking/0/3/1/xxx + const embedArg = args.redirect2 ? '/' + args.redirect2 : ''; + ctx.set('redirect', `/bilibili/ranking/${getRidIndexByRid(args.rid_index)}${embedArg}`); + return; + } + const ridIndex = ctx.req.param('rid_index') || '0'; const embed = !ctx.req.param('embed'); From 03e881a6fe256eedc20b9344eeb1351827fd1cbe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 05:10:15 -0800 Subject: [PATCH 490/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin (#17549) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.13.0 to 8.14.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.14.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 88 ++++++++++++-------------------------------------- 2 files changed, 21 insertions(+), 69 deletions(-) diff --git a/package.json b/package.json index a546caeaf63ab55..68fce1897ae9da7 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.13.0", + "@typescript-eslint/eslint-plugin": "8.14.0", "@typescript-eslint/parser": "8.14.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2a6412c1f0a49b9..372f904126e8803 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -355,8 +355,8 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.13.0 - version: 8.13.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) + specifier: 8.14.0 + version: 8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.14.0 version: 8.14.0(eslint@9.14.0)(typescript@5.6.3) @@ -1962,8 +1962,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.13.0': - resolution: {integrity: sha512-nQtBLiZYMUPkclSeC3id+x4uVd1SGtHuElTxL++SfP47jR0zfkZBJHc+gL4qPsgTuypz0k8Y2GheaDYn6Gy3rg==} + '@typescript-eslint/eslint-plugin@8.14.0': + resolution: {integrity: sha512-tqp8H7UWFaZj0yNO6bycd5YjMwxa6wIHOLZvWPkidwbgLCsBMetQoGj7DPuAlWa2yGO3H48xmPwjhsSPPCGU5w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -1987,16 +1987,12 @@ packages: resolution: {integrity: sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.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.14.0': resolution: {integrity: sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.13.0': - resolution: {integrity: sha512-Rqnn6xXTR316fP4D2pohZenJnp+NwQ1mo7/JM+J1LWZENSLkJI8ID8QNtlvFeb0HnFSK94D6q0cnMX6SbE5/vA==} + '@typescript-eslint/type-utils@8.14.0': + resolution: {integrity: sha512-Xcz9qOtZuGusVOH5Uk07NGs39wrKkf3AxlkK79RBK6aJC1l03CobXjJbwBPSidetAOV+5rEVuiT1VSBUOAsanQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '*' @@ -2008,10 +2004,6 @@ packages: resolution: {integrity: sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.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.14.0': resolution: {integrity: sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2025,15 +2017,6 @@ packages: typescript: optional: true - '@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.14.0': resolution: {integrity: sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2049,8 +2032,8 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.13.0': - resolution: {integrity: sha512-A1EeYOND6Uv250nybnLZapeXpYMl8tkzYUxqmoKAWnI4sei3ihf2XdZVd+vVOmHGcp3t+P7yRrNsyyiXTvShFQ==} + '@typescript-eslint/utils@8.14.0': + resolution: {integrity: sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2059,10 +2042,6 @@ packages: resolution: {integrity: sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.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.14.0': resolution: {integrity: sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7523,14 +7502,14 @@ snapshots: '@types/node': 22.9.0 optional: true - '@typescript-eslint/eslint-plugin@8.13.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.14.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/type-utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.13.0 + '@typescript-eslint/scope-manager': 8.14.0 + '@typescript-eslint/type-utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.14.0 eslint: 9.14.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7559,20 +7538,15 @@ snapshots: '@typescript-eslint/types': 8.12.2 '@typescript-eslint/visitor-keys': 8.12.2 - '@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.14.0': dependencies: '@typescript-eslint/types': 8.14.0 '@typescript-eslint/visitor-keys': 8.14.0 - '@typescript-eslint/type-utils@8.13.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.14.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.13.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: @@ -7583,8 +7557,6 @@ snapshots: '@typescript-eslint/types@8.12.2': {} - '@typescript-eslint/types@8.13.0': {} - '@typescript-eslint/types@8.14.0': {} '@typescript-eslint/typescript-estree@8.12.2(typescript@5.6.3)': @@ -7602,21 +7574,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.13.0(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/visitor-keys': 8.13.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.14.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.14.0 @@ -7643,12 +7600,12 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.13.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.14.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) - '@typescript-eslint/scope-manager': 8.13.0 - '@typescript-eslint/types': 8.13.0 - '@typescript-eslint/typescript-estree': 8.13.0(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.14.0 + '@typescript-eslint/types': 8.14.0 + '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) eslint: 9.14.0 transitivePeerDependencies: - supports-color @@ -7659,11 +7616,6 @@ snapshots: '@typescript-eslint/types': 8.12.2 eslint-visitor-keys: 3.4.3 - '@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.14.0': dependencies: '@typescript-eslint/types': 8.14.0 From 05acee4b9ed3d22d1ecca97c805c99e659dde772 Mon Sep 17 00:00:00 2001 From: EsuRt <15177069+EsuRt@users.noreply.github.com> Date: Tue, 12 Nov 2024 21:10:40 +0800 Subject: [PATCH 491/740] fix(route/mittrchina): update api (#17552) --- lib/routes/mittrchina/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/mittrchina/index.ts b/lib/routes/mittrchina/index.ts index 2fcfb22fe87f1b6..fa2d8d14d1c7a4a 100644 --- a/lib/routes/mittrchina/index.ts +++ b/lib/routes/mittrchina/index.ts @@ -52,7 +52,7 @@ async function handler(ctx) { const { type = 'index' } = ctx.req.param(); const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; - const link = `https://apii.mittrchina.com${typeMap[type].apiPath}`; + const link = `https://apii.web.mittrchina.com${typeMap[type].apiPath}`; const { data: response } = type === 'breaking' ? await got.post(link, { @@ -95,7 +95,7 @@ async function handler(ctx) { cache.tryGet(item.link, async () => { const { data: { data: details }, - } = await got(`https://apii.mittrchina.com/information/details?id=${item.id}`); + } = await got(`https://apii.web.mittrchina.com/information/details?id=${item.id}`); item.description = details.content; From 078fa0c6c31ad9738329b569e7c75fb41d7141e1 Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Tue, 12 Nov 2024 23:22:03 +0800 Subject: [PATCH 492/740] =?UTF-8?q?fix(route):=20hellogithub=20=E6=9C=88?= =?UTF-8?q?=E5=88=8A=E8=B7=AF=E7=94=B1=E5=A2=9E=E5=8A=A0=20pubDate=20(#175?= =?UTF-8?q?55)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/hellogithub/volume.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/routes/hellogithub/volume.ts b/lib/routes/hellogithub/volume.ts index 34bd20a219b2b0e..1282068fba2676e 100644 --- a/lib/routes/hellogithub/volume.ts +++ b/lib/routes/hellogithub/volume.ts @@ -12,6 +12,7 @@ const md = MarkdownIt({ import { load } from 'cheerio'; import cache from '@/utils/cache'; import { config } from '@/config'; +import { parseDate } from '@/utils/parse-date'; art.defaults.imports.render = function (string) { return md.render(string); @@ -39,6 +40,7 @@ async function handler(ctx) { const items = await Promise.all( volumes.map(async (volume) => { const current = volume.num; + const lastmod = volume.lastmod; const currentUrl = `${rootUrl}/periodical/volume/${current}`; const key = `hellogithub:${currentUrl}`; return await cache.tryGet( @@ -61,6 +63,7 @@ async function handler(ctx) { description: art(path.join(__dirname, 'templates/volume.art'), { data: data.pageProps.volume.data, }), + pubDate: parseDate(lastmod), }; }, config.cache.routeExpire, From d10cd08e04b7059db24ef2f3bb087129a643530e Mon Sep 17 00:00:00 2001 From: You Ziang <75403952+Chi-hong22@users.noreply.github.com> Date: Wed, 13 Nov 2024 00:36:02 +0800 Subject: [PATCH 493/740] =?UTF-8?q?feat:=20add=20route=20for=20HRBEU=20Sch?= =?UTF-8?q?ool=20of=20Naval=20Architecture=EF=BC=88=E5=93=88=E5=B0=94?= =?UTF-8?q?=E6=BB=A8=E5=B7=A5=E7=A8=8B=E5=A4=A7=E5=AD=A6=E8=88=B9=E8=88=B6?= =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E5=AD=A6=E9=99=A2=EF=BC=89=20(#17513)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add route for HRBEU School of Naval Architecture(哈尔滨工程大学船舶工程学院) * feat: add route for HRBEU School of Naval Architecture(哈尔滨工程大学船舶工程学院) by Chi-hong22 * remove the position of .toArray() * Modify bug to make local validation successful * use .toArray() instead. * 测试白天外网许可进入情况 * use .toArray() before .map() * update the code by the suggestions with Collaborator TonyRL * update the code by the suggestions with Collaborator TonyRL * update the code by the suggestions with Collaborator TonyRL --- lib/routes/hrbeu/sec/list.ts | 80 ++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 lib/routes/hrbeu/sec/list.ts diff --git a/lib/routes/hrbeu/sec/list.ts b/lib/routes/hrbeu/sec/list.ts new file mode 100644 index 000000000000000..795f861908aa28a --- /dev/null +++ b/lib/routes/hrbeu/sec/list.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'; +const rootUrl = 'http://sec.hrbeu.edu.cn'; + +export const route: Route = { + path: '/sec/:id', + categories: ['university'], + example: '/hrbeu/sec/xshd', + parameters: { id: '栏目编号,由 `URL` 中获取。' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['sec.hrbeu.edu.cn/:id/list.htm'], + }, + ], + name: '船舶工程学院', + maintainers: ['Chi-hong22'], + handler, + description: `| 学院要闻 | 学术活动 | 通知公告 | 学科方向 | +| :------: | :------: |:------: | :------: | +| xyyw | xshd | 229 | xkfx |`, +}; + +async function handler(ctx) { + const id = ctx.req.param('id'); + const response = await got(`${rootUrl}/${id}/list.htm`, { + headers: { + Referer: rootUrl, + }, + }); + + const $ = load(response.data); + + const bigTitle = $('div [class=lanmuInnerMiddleBigClass_right]').find('div [portletmode=simpleColumnAttri]').text().replaceAll(/[\s·]/g, '').trim(); + + const list = $('li.list_item') + .toArray() + .map((item) => { + let link = $(item).find('a').attr('href'); + if (link && link.includes('page.htm')) { + link = `${rootUrl}${link}`; + } + return { + title: $(item).find('a').attr('title'), + pubDate: parseDate($(item).find('span.Article_PublishDate').text()), + link, + }; + }); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + if (item.link.includes('page.htm')) { + const detailResponse = await got(item.link); + const content = load(detailResponse.data); + item.description = content('div.wp_articlecontent').html(); + } else { + item.description = '本文需跳转,请点击标题后阅读'; + } + return item; + }) + ) + ); + + return { + title: '船舶工程学院 - ' + bigTitle, + link: rootUrl.concat('/', id, '/list.htm'), + item: items, + }; +} From 40d4a1f81a7e948d42f684ff0f2afba642afd74b Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 12 Nov 2024 09:16:55 -0800 Subject: [PATCH 494/740] =?UTF-8?q?fix(route):=20=E4=BF=AE=E5=A4=8D=20?= =?UTF-8?q?=E9=83=A8=E5=88=86=E6=83=85=E5=86=B5=E4=B8=8B=20url.expanded=5F?= =?UTF-8?q?url=20=E5=8F=AF=E8=83=BD=E4=B8=BA=20undefined=20=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20(#17560)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #17382 Co-authored-by: CaoMeiYouRen <996881204@qq.com> --- lib/routes/twitter/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/twitter/utils.ts b/lib/routes/twitter/utils.ts index 387884ca2e73b21..f78534875bb124a 100644 --- a/lib/routes/twitter/utils.ts +++ b/lib/routes/twitter/utils.ts @@ -35,7 +35,7 @@ const formatText = (item) => { const urls = item.entities.urls || []; for (const url of urls) { // trim link pointing to the tweet itself (usually appears when the tweet is truncated) - text = text.replaceAll(url.url, url.expanded_url.endsWith(id_str) ? '' : url.expanded_url); + text = text.replaceAll(url.url, url.expanded_url?.endsWith(id_str) ? '' : url.expanded_url); } const media = item.extended_entities?.media || []; for (const m of media) { From f4c0c98fa5f975e9e5ed8e00bd9cecafee405232 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 12 Nov 2024 10:59:05 -0800 Subject: [PATCH 495/740] feat(route): vertikal (#17561) * feat(route): vertikal * fix(route/vertikal): standardize title string quotes in latest.ts --- lib/routes/vertikal/latest.ts | 73 ++++++++++++++++++++++++++++++++ lib/routes/vertikal/namespace.ts | 7 +++ 2 files changed, 80 insertions(+) create mode 100644 lib/routes/vertikal/latest.ts create mode 100644 lib/routes/vertikal/namespace.ts diff --git a/lib/routes/vertikal/latest.ts b/lib/routes/vertikal/latest.ts new file mode 100644 index 000000000000000..d7e765147a48149 --- /dev/null +++ b/lib/routes/vertikal/latest.ts @@ -0,0 +1,73 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import cache from '@/utils/cache'; + +export const route: Route = { + path: '/latest', + categories: ['new-media'], + example: '/vertikal/latest', + radar: [ + { + source: ['vertikal.net/en/news', 'vertikal.net'], + }, + ], + name: 'News Archive', + maintainers: ['TonyRL'], + handler, + url: 'vertikal.net/en/news', +}; + +const baseUrl = 'https://vertikal.net'; + +async function handler() { + const response = await ofetch(`${baseUrl}/en/homepage/async-news-loader`, { + query: { + perPage: 24, + page: 1, + }, + }); + const $ = cheerio.load(response); + + const list = $('.grid__column') + .toArray() + .map((item) => { + const $item = $(item); + return { + title: $item.find('.news-teaser__title').text(), + link: `${baseUrl}${$item.find('.news-teaser').attr('href')}`, + pubDate: parseDate($item.find('.news-teaser__date').text(), 'DD.MM.YYYY'), + description: $item.find('.news-teaser__text').text(), + }; + }); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const response = await ofetch(item.link); + const $ = cheerio.load(response); + + const content = $('.newsentry'); + + item.category = content + .find('.newsentry__tags a') + .toArray() + .map((tag) => $(tag).text().trim()); + + content.find('.newsentry__date, .newsentry__title, .lazyimage-placeholder, .newsentry__tags, .newsentry__share, .newsentry__comments, .newsentry__write-comment').remove(); + + item.description = content.html(); + + return item; + }) + ) + ); + + return { + title: 'News Archive | Vertikal.net', + link: `${baseUrl}/en/news`, + image: `${baseUrl}/apple-touch-icon-152x152.png`, + item: items, + }; +} diff --git a/lib/routes/vertikal/namespace.ts b/lib/routes/vertikal/namespace.ts new file mode 100644 index 000000000000000..92bb61b7b0697b9 --- /dev/null +++ b/lib/routes/vertikal/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Vertikal.net', + url: 'vertikal.net', + lang: 'en', +}; From dee35fad1bededd7d241481313a46bcb60964546 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 12 Nov 2024 11:33:02 -0800 Subject: [PATCH 496/740] =?UTF-8?q?fix(route/natgeo):=20replace=20got=20wi?= =?UTF-8?q?th=20ofetch=20for=20content=20loading=20and=20im=E2=80=A6=20(#1?= =?UTF-8?q?7562)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(route/natgeo): replace got with ofetch for content loading and improve data extraction * fix(route/natgeo): include image source in content loading --- lib/routes/natgeo/natgeo.ts | 49 +++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 24 deletions(-) diff --git a/lib/routes/natgeo/natgeo.ts b/lib/routes/natgeo/natgeo.ts index 1960088d1136848..72bcb226ac8ccd9 100644 --- a/lib/routes/natgeo/natgeo.ts +++ b/lib/routes/natgeo/natgeo.ts @@ -1,29 +1,36 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import { load } from 'cheerio'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; -// https://www.natgeomedia.com//article/ +// https://www.natgeomedia.com/article/ async function loadContent(link) { - const { data } = await got(link); + const data = await ofetch(link); const $ = load(data); const dtStr = $('.content-title-area') .find('h6') .first() - .html() + .text() .replaceAll(/ /gi, ' ') .trim(); - let description = $('article').first().html() + $('article').eq(1).html(); - if (/photo/.test(link)) { + $('.splide__arrows, .slide-control').remove(); + + let description = ($('article').eq(0).html() ?? '') + ($('article').eq(1).html() ?? ''); + if (/photo|gallery/.test(link)) { description = $('#content-album').html() + description; } return { title: $('title').text(), - pubDate: parseDate(dtStr, 'MMM. DD YYYY'), + pubDate: parseDate(dtStr), description, + category: $('.content-tag a') + .toArray() + .map((i) => $(i).text()), + link, + image: $('link[rel="image_src"]').attr('href'), }; } @@ -42,8 +49,8 @@ export const route: Route = { }, radar: [ { - source: ['natgeomedia.com/:cat/:type', 'natgeomedia.com/'], - target: '/:cat/:type', + source: ['natgeomedia.com/:cat/:type', 'natgeomedia.com/:cat/', 'natgeomedia.com/'], + target: '/:cat/:type?', }, ], name: '分类', @@ -54,29 +61,23 @@ export const route: Route = { async function handler(ctx) { const type = ctx.req.param('type') ?? ''; const url = `https://www.natgeomedia.com/${ctx.req.param('cat')}/${type}`; - const res = await got(url); - const $ = load(res.data); + const res = await ofetch(url); + const $ = load(res); - const urlList = $('.article-link-w100') - .find('.read-btn') + const urlList = $('.article-link-content h4') .toArray() .map((i) => ({ link: $(i).find('a[href]').first().attr('href'), - })); + })) + .filter((i) => i.link); + + const out = await Promise.all(urlList.map((i) => cache.tryGet(i.link!, () => loadContent(i.link)))); - const out = await Promise.all( - urlList.map(async (i) => { - const link = i.link; - const single = { - link, - }; - const other = await cache.tryGet(link, () => loadContent(link)); - return { ...single, ...other }; - }) - ); return { title: $('title').text(), + description: $('meta[name="description"]').attr('content'), link: url, + image: 'https://www.natgeomedia.com/img/app_icon.png', item: out, }; } From 489630a1b9bbb718acfb708b0297f55eadc6179a Mon Sep 17 00:00:00 2001 From: Cat_yyy <zongyejian@gmail.com> Date: Wed, 13 Nov 2024 11:04:09 +0900 Subject: [PATCH 497/740] =?UTF-8?q?feat(route):=20add=20Science=20Tokyo=20?= =?UTF-8?q?News=20=E6=9D=B1=E4=BA=AC=E7=A7=91=E5=AD=A6=E5=A4=A7=E5=AD=A6?= =?UTF-8?q?=E3=83=8B=E3=83=A5=E3=83=BC=E3=82=B9=20(#17550)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): bump telegram from 2.26.2 to 2.26.6 (#17384) * chore(deps): bump telegram from 2.26.2 to 2.26.6 Bumps [telegram](https://github.com/gram-js/gramjs) from 2.26.2 to 2.26.6. - [Release notes](https://github.com/gram-js/gramjs/releases) - [Commits](https://github.com/gram-js/gramjs/commits) --- updated-dependencies: - dependency-name: telegram dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore: fix pnpm install --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * 基础功能实现 * Update lib/routes/isct/namespace.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/isct/news.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- lib/routes/isct/namespace.ts | 11 ++++++ lib/routes/isct/news.ts | 66 ++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 lib/routes/isct/namespace.ts create mode 100644 lib/routes/isct/news.ts diff --git a/lib/routes/isct/namespace.ts b/lib/routes/isct/namespace.ts new file mode 100644 index 000000000000000..8a765050b3f1aed --- /dev/null +++ b/lib/routes/isct/namespace.ts @@ -0,0 +1,11 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Institute of Science Tokyo', + url: 'isct.ac.jp', + lang: 'ja', + + ja: { + name: '東京科学大学', + }, +}; diff --git a/lib/routes/isct/news.ts b/lib/routes/isct/news.ts new file mode 100644 index 000000000000000..aedb93f10dc0409 --- /dev/null +++ b/lib/routes/isct/news.ts @@ -0,0 +1,66 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import { decode } from 'entities'; + +interface NewsItem { + ID: string; + TITLE: string; + PUBLISH_DATE: string; + META_DESCRIPTION: string; + MEDIA_CD: string; +} + +export const route: Route = { + path: '/news/:lang', + categories: ['university'], + example: '/isct/news/ja', + parameters: { lang: 'language, could be ja or en' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.isct.ac.jp/:lang/news'], + target: '/news/:lang', + }, + ], + name: 'News', + maintainers: ['catyyy'], + handler: async (ctx) => { + const { lang = 'ja' } = ctx.req.param(); + const response = await ofetch(`https://www.isct.ac.jp/expansion/get_media_list_json.php?lang_cd=${lang}`); + + const decodedResponse = decode(response); + const data = JSON.parse(decodedResponse); + const itemsArray: NewsItem[] = Object.values(data); + + const items = itemsArray.map((item) => ({ + // 文章标题 + title: item.TITLE, + // 文章链接 + link: 'news/' + item.MEDIA_CD, + // 文章正文 + description: item.META_DESCRIPTION, + // 文章发布日期 + pubDate: parseDate(item.PUBLISH_DATE), + // 如果有的话,文章作者 + // author: item.user.login, + // 如果有的话,文章分类 + // category: item.labels.map((label) => label.name), + })); + return { + // 源标题 + title: `ISCT News - ${lang}`, + // 源链接 + link: `https://www.isct.ac.jp/${lang}/news`, + // 源文章 + item: items, + }; + }, +}; From f6c2ebb4ab7af307639808ed6d73ce0637494c73 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 12 Nov 2024 19:47:47 -0800 Subject: [PATCH 498/740] fix(route/oschina): improve cookie handling (#17564) --- lib/routes/oschina/news.ts | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/lib/routes/oschina/news.ts b/lib/routes/oschina/news.ts index 73a64b32feae751..23783d52c08969d 100644 --- a/lib/routes/oschina/news.ts +++ b/lib/routes/oschina/news.ts @@ -1,10 +1,11 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { parseDate, parseRelativeDate } from '@/utils/parse-date'; import timezone from '@/utils/timezone'; import { load } from 'cheerio'; import { fetchArticle } from '@/utils/wechat-mp'; +import { config } from '@/config'; const configs = { all: { @@ -73,17 +74,34 @@ export const route: Route = { [osc_pl]: https://www.oschina.net/news/programming "开源中国 - 编程语言资讯"`, }; +const getCookie = () => + cache.tryGet( + 'oschina:cookie', + async () => { + const res = await ofetch.raw('https://www.oschina.net/news'); + const cookie = res.headers + .getSetCookie() + .map((i) => i.split(';')[0]) + .join('; '); + return cookie; + }, + config.cache.routeExpire, + false + ); + async function handler(ctx) { const category = ctx.req.param('category') ?? 'all'; const config = configs[category]; - const res = await got(config.ajaxUrl, { + const cookie = await getCookie(); + const res = await ofetch(config.ajaxUrl, { headers: { Referer: config.link, 'X-Requested-With': 'XMLHttpRequest', + Cookie: cookie, }, }); - const $ = load(res.data); + const $ = load(res); $('.ad-wrap').remove(); @@ -104,23 +122,24 @@ async function handler(ctx) { list.map((item) => cache.tryGet(item.link, async () => { if (/^https?:\/\/(my|www)\.oschina.net\/.*$/.test(item.link)) { - const detail = await got(item.link, { + const detail = await ofetch(item.link, { headers: { Referer: config.link, + Cookie: cookie, }, }); - const content = load(detail.data); + const content = load(detail); content('.ad-wrap').remove(); item.description = content('.article-detail').html(); item.author = content('.article-box__meta .item').first().text(); } else if (/^https?:\/\/gitee\.com\/.*$/.test(item.link)) { - const detail = await got(item.link, { + const detail = await ofetch(item.link, { headers: { Referer: config.link, }, }); - const content = load(detail.data); + const content = load(detail); item.description = content('.file_content').html(); } else if (/^https?:\/\/osc\.cool\/.*$/.test(item.link)) { From 1a8988660eba25e1c4f005fc245c7097b17c9cf3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 01:36:55 -0800 Subject: [PATCH 499/740] chore(deps): bump hono from 4.6.9 to 4.6.10 (#17568) Bumps [hono](https://github.com/honojs/hono) from 4.6.9 to 4.6.10. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.9...v4.6.10) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 68fce1897ae9da7..11f6f489ca67438 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.9", + "hono": "4.6.10", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 372f904126e8803..b96fcfd35c4551c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,10 +19,10 @@ importers: version: 4.1.1 '@hono/node-server': specifier: 1.13.6 - version: 1.13.6(hono@4.6.9) + version: 1.13.6(hono@4.6.10) '@hono/zod-openapi': specifier: 0.17.0 - version: 0.17.0(hono@4.6.9)(zod@3.23.8) + version: 0.17.0(hono@4.6.10)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -55,7 +55,7 @@ importers: version: 0.0.23 '@scalar/hono-api-reference': specifier: 0.5.159 - version: 0.5.159(hono@4.6.9) + version: 0.5.159(hono@4.6.10) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -114,8 +114,8 @@ importers: specifier: 144.0.0 version: 144.0.0 hono: - specifier: 4.6.9 - version: 4.6.9 + specifier: 4.6.10 + version: 4.6.10 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3479,8 +3479,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.9: - resolution: {integrity: sha512-p/pN5yZLuZaHzyAOT2nw2/Ud6HhJHYmDNGH6Ck1OWBhPMVeM1r74jbCRwNi0gyFRjjbsGgoHbOyj7mT1PDNbTw==} + hono@4.6.10: + resolution: {integrity: sha512-IXXNfRAZEahFnWBhUUlqKEGF9upeE6hZoRZszvNkyAz/CYp+iVbxm3viMvStlagRJohjlBRGOQ7f4jfcV0XMGg==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6851,20 +6851,20 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.6(hono@4.6.9)': + '@hono/node-server@1.13.6(hono@4.6.10)': dependencies: - hono: 4.6.9 + hono: 4.6.10 - '@hono/zod-openapi@0.17.0(hono@4.6.9)(zod@3.23.8)': + '@hono/zod-openapi@0.17.0(hono@4.6.10)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.3.0(hono@4.6.9)(zod@3.23.8) - hono: 4.6.9 + '@hono/zod-validator': 0.3.0(hono@4.6.10)(zod@3.23.8) + hono: 4.6.10 zod: 3.23.8 - '@hono/zod-validator@0.3.0(hono@4.6.9)(zod@3.23.8)': + '@hono/zod-validator@0.3.0(hono@4.6.10)(zod@3.23.8)': dependencies: - hono: 4.6.9 + hono: 4.6.10 zod: 3.23.8 '@humanfs/core@0.19.1': {} @@ -7275,10 +7275,10 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.159(hono@4.6.9)': + '@scalar/hono-api-reference@0.5.159(hono@4.6.10)': dependencies: '@scalar/types': 0.0.19 - hono: 4.6.9 + hono: 4.6.10 '@scalar/openapi-types@0.1.5': {} @@ -9296,7 +9296,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.9: {} + hono@4.6.10: {} hookable@5.5.3: {} From a60b1361b939e98ce29548144fd6705c0e9129ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 09:44:10 +0000 Subject: [PATCH 500/740] chore(deps): bump @hono/node-server from 1.13.6 to 1.13.7 (#17569) Bumps [@hono/node-server](https://github.com/honojs/node-server) from 1.13.6 to 1.13.7. - [Release notes](https://github.com/honojs/node-server/releases) - [Commits](https://github.com/honojs/node-server/compare/v1.13.6...v1.13.7) --- updated-dependencies: - dependency-name: "@hono/node-server" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 11f6f489ca67438..dc9822a19ad4d41 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "dependencies": { "@bbob/html": "4.1.1", "@bbob/preset-html5": "4.1.1", - "@hono/node-server": "1.13.6", + "@hono/node-server": "1.13.7", "@hono/zod-openapi": "0.17.0", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b96fcfd35c4551c..012273459fe64ee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,8 +18,8 @@ importers: specifier: 4.1.1 version: 4.1.1 '@hono/node-server': - specifier: 1.13.6 - version: 1.13.6(hono@4.6.10) + specifier: 1.13.7 + version: 1.13.7(hono@4.6.10) '@hono/zod-openapi': specifier: 0.17.0 version: 0.17.0(hono@4.6.10)(zod@3.23.8) @@ -1348,8 +1348,8 @@ packages: resolution: {integrity: sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@hono/node-server@1.13.6': - resolution: {integrity: sha512-Y2ivw4UmLIBKfzvkFgcsrhc0GLn272diGjlnKOF9T1OiY6ud4RaVO8FKEnifNkuU7meOeCU371/8fmhgeYf7Lw==} + '@hono/node-server@1.13.7': + resolution: {integrity: sha512-kTfUMsoloVKtRA2fLiGSd9qBddmru9KadNyhJCwgKBxTiNkaAJEwkVN9KV/rS4HtmmNRtUh6P+YpmjRMl0d9vQ==} engines: {node: '>=18.14.1'} peerDependencies: hono: ^4 @@ -6851,7 +6851,7 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.6(hono@4.6.10)': + '@hono/node-server@1.13.7(hono@4.6.10)': dependencies: hono: 4.6.10 From 716c0a32914894cdccb7f7e39597e68952c321a8 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Wed, 13 Nov 2024 22:38:58 +0800 Subject: [PATCH 501/740] feat(route/caixin): Add support for photos channel. Example: https://photos.caixin.com/2024-11-02/102252287.html (#17566) * feat(route/caixin): Add support for photos channel. Example: https://photos.caixin.com/2024-11-02/102252287.html * Update utils-fulltext.ts * . --- lib/routes/caixin/latest.ts | 7 ++++++- lib/routes/caixin/utils-fulltext.ts | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/routes/caixin/latest.ts b/lib/routes/caixin/latest.ts index b6b23a9b27cb0e0..da585b75c2e2939 100644 --- a/lib/routes/caixin/latest.ts +++ b/lib/routes/caixin/latest.ts @@ -49,7 +49,12 @@ async function handler(ctx) { // desc const desc = await parseArticle(item); - item.description = ctx.req.query('fulltext') === 'true' ? ((await getFulltext(item.link)) ?? desc.description) : desc.description; + if (ctx.req.query('fulltext') === 'true') { + const authorizedFullText = await getFulltext(item.link); + item.description = authorizedFullText === '' ? desc.description : authorizedFullText; + } else { + item.description = desc.description; + } // prevent cache coliision with /caixin/article and /caixin/:column/:category // since those have podcasts item.guid = `caixin:latest:${item.link}`; diff --git a/lib/routes/caixin/utils-fulltext.ts b/lib/routes/caixin/utils-fulltext.ts index 1a8289049dda181..c866784508e529f 100644 --- a/lib/routes/caixin/utils-fulltext.ts +++ b/lib/routes/caixin/utils-fulltext.ts @@ -46,6 +46,6 @@ export async function getFulltext(url: string) { }, }); - const { content } = JSON.parse(res.data.match(/resetContentInfo\((.*)\)/)[1]); - return content; + const { content = '', pictureList } = JSON.parse(res.data.match(/resetContentInfo\((.*)\)/)[1]); + return content + (pictureList ? pictureList.map((e) => `<img src="${e.url}" id="picture_${e.id}" alt="${e.desc}"><dl><dt>${e.desc}</dt></dl>`).join('') : ''); } From c37d64c26b27c5942e1b21043bbd4c11031d3f44 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Thu, 14 Nov 2024 00:12:26 +0800 Subject: [PATCH 502/740] fix: Use renote ID for cross-instance notes (#17572) --- lib/routes/misskey/utils.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/lib/routes/misskey/utils.ts b/lib/routes/misskey/utils.ts index bc2eb823ca1339d..0d852b80f09575d 100644 --- a/lib/routes/misskey/utils.ts +++ b/lib/routes/misskey/utils.ts @@ -38,7 +38,25 @@ const parseNotes = (data: MisskeyNote[], site: string) => title = `${author}: "${noteToUse.text ?? ''}"`; } - const link = `https://${host}/notes/${noteToUse.id}`; + /** + * For renotes from non-Misskey instances (e.g. Mastodon, Pleroma), + * we can't use noteToUse.id to link to the original note since: + * 1. The URL format differs from Misskey's /notes/{id} pattern + * 2. Direct access to the original note may not be possible + * Therefore, we link to the renote itself in such cases + */ + let noteId = noteToUse.id; + + if (isRenote) { + const renoteHost = item.user.host ?? site; + const noteHost = noteToUse.user.host ?? site; + + // Use renote's ID if the note is from a different host or not in allowSiteList + if (renoteHost !== noteHost || !allowSiteList.includes(noteHost)) { + noteId = item.id; + } + } + const link = `https://${host}/notes/${noteId}`; const pubDate = parseDate(noteToUse.createdAt); return { From 855015008672b0639be441387f1796b697004a48 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Wed, 13 Nov 2024 09:27:46 -0800 Subject: [PATCH 503/740] fix(route/inspirehep): fix getAuthorById custom accept header (#17574) --- lib/routes/inspirehep/author.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lib/routes/inspirehep/author.ts b/lib/routes/inspirehep/author.ts index ed7eb2b6d490764..768ebea1d067497 100644 --- a/lib/routes/inspirehep/author.ts +++ b/lib/routes/inspirehep/author.ts @@ -19,7 +19,15 @@ export const route: Route = { handler, }; -export const getAuthorById = (id: string) => cache.tryGet(`inspirehep:author:${id}`, () => ofetch<AuthorResponse>(`${baseUrl}/api/authors/${id}`)); +export const getAuthorById = (id: string) => + cache.tryGet(`inspirehep:author:${id}`, () => + ofetch<AuthorResponse>(`${baseUrl}/api/authors/${id}`, { + headers: { + accept: 'application/vnd+inspire.record.ui+json', + }, + parseResponse: JSON.parse, + }) + ); async function handler(ctx) { const id = ctx.req.param('id'); From 5ab66182d8dd075f35fe4d6ae913267bfc63be61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 08:26:27 +0000 Subject: [PATCH 504/740] chore(deps): bump tldts from 6.1.60 to 6.1.61 (#17579) Bumps [tldts](https://github.com/remusao/tldts) from 6.1.60 to 6.1.61. - [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.60...v6.1.61) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 dc9822a19ad4d41..878a78b17d62e8d 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "telegram": "2.26.6", "tiny-async-pool": "2.1.0", "title": "3.5.3", - "tldts": "6.1.60", + "tldts": "6.1.61", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 012273459fe64ee..02f1f7e3031aaa7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -234,8 +234,8 @@ importers: specifier: 3.5.3 version: 3.5.3 tldts: - specifier: 6.1.60 - version: 6.1.60 + specifier: 6.1.61 + version: 6.1.61 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5335,11 +5335,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.60: - resolution: {integrity: sha512-XHjoxak8SFQnHnmYHb3PcnW5TZ+9ErLZemZei3azuIRhQLw4IExsVbL3VZJdHcLeNaXq6NqawgpDPpjBOg4B5g==} + tldts-core@6.1.61: + resolution: {integrity: sha512-In7VffkDWUPgwa+c9picLUxvb0RltVwTkSgMNFgvlGSWveCzGBemBqTsgJCL4EDFWZ6WH0fKTsot6yNhzy3ZzQ==} - tldts@6.1.60: - resolution: {integrity: sha512-TYVHm7G9NCnhgqOsFalbX6MG1Po5F4efF+tLfoeiOGQq48Oqgwcgz8upY2R1BHWa4aDrj28RYx0dkYJ63qCFMg==} + tldts@6.1.61: + resolution: {integrity: sha512-rv8LUyez4Ygkopqn+M6OLItAOT9FF3REpPQDkdMx5ix8w4qkuE7Vo2o/vw1nxKQYmJDV8JpAMJQr1b+lTKf0FA==} hasBin: true tmp@0.0.33: @@ -11353,11 +11353,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.60: {} + tldts-core@6.1.61: {} - tldts@6.1.60: + tldts@6.1.61: dependencies: - tldts-core: 6.1.60 + tldts-core: 6.1.61 tmp@0.0.33: dependencies: @@ -11393,7 +11393,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.60 + tldts: 6.1.61 tr46@0.0.3: {} From 091ed089301b942b916807f081e2316a9d04c125 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 05:42:25 -0800 Subject: [PATCH 505/740] chore(deps): bump undici from 6.20.1 to 6.21.0 (#17578) Bumps [undici](https://github.com/nodejs/undici) from 6.20.1 to 6.21.0. - [Release notes](https://github.com/nodejs/undici/releases) - [Commits](https://github.com/nodejs/undici/compare/v6.20.1...v6.21.0) --- updated-dependencies: - dependency-name: undici dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 878a78b17d62e8d..e2f69df303a8247 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "tsx": "4.19.2", "twitter-api-v2": "1.18.2", "ufo": "1.5.4", - "undici": "6.20.1", + "undici": "6.21.0", "uuid": "11.0.3", "winston": "3.17.0", "xxhash-wasm": "1.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 02f1f7e3031aaa7..5a94cf9f9922d1b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -121,7 +121,7 @@ importers: version: 9.0.5 http-cookie-agent: specifier: 6.0.6 - version: 6.0.6(tough-cookie@5.0.0)(undici@6.20.1) + version: 6.0.6(tough-cookie@5.0.0)(undici@6.21.0) https-proxy-agent: specifier: 7.0.5 version: 7.0.5 @@ -252,8 +252,8 @@ importers: specifier: 1.5.4 version: 1.5.4 undici: - specifier: 6.20.1 - version: 6.20.1 + specifier: 6.21.0 + version: 6.21.0 uuid: specifier: 11.0.3 version: 11.0.3 @@ -416,7 +416,7 @@ importers: version: 2.4.3(typescript@5.6.3) node-network-devtools: specifier: 1.0.22 - version: 1.0.22(bufferutil@4.0.8)(undici@6.20.1)(utf-8-validate@5.0.10) + version: 1.0.22(bufferutil@4.0.8)(undici@6.21.0)(utf-8-validate@5.0.10) prettier: specifier: 3.3.3 version: 3.3.3 @@ -5503,8 +5503,8 @@ packages: undici-types@6.19.8: resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} - undici@6.20.1: - resolution: {integrity: sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==} + undici@6.21.0: + resolution: {integrity: sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==} engines: {node: '>=18.17'} unicode-canonical-property-names-ecmascript@2.0.1: @@ -8083,7 +8083,7 @@ snapshots: parse5: 7.2.1 parse5-htmlparser2-tree-adapter: 7.1.0 parse5-parser-stream: 7.1.2 - undici: 6.20.1 + undici: 6.21.0 whatwg-mimetype: 4.0.0 chownr@2.0.0: {} @@ -9358,12 +9358,12 @@ snapshots: http-cache-semantics@4.1.1: {} - http-cookie-agent@6.0.6(tough-cookie@5.0.0)(undici@6.20.1): + http-cookie-agent@6.0.6(tough-cookie@5.0.0)(undici@6.21.0): dependencies: agent-base: 7.1.1 tough-cookie: 5.0.0 optionalDependencies: - undici: 6.20.1 + undici: 6.21.0 transitivePeerDependencies: - supports-color @@ -10268,11 +10268,11 @@ snapshots: dependencies: write-file-atomic: 1.3.4 - node-network-devtools@1.0.22(bufferutil@4.0.8)(undici@6.20.1)(utf-8-validate@5.0.10): + node-network-devtools@1.0.22(bufferutil@4.0.8)(undici@6.21.0)(utf-8-validate@5.0.10): dependencies: iconv-lite: 0.6.3 open: 8.4.2 - undici: 6.20.1 + undici: 6.21.0 ws: 8.18.0(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - bufferutil @@ -11488,7 +11488,7 @@ snapshots: undici-types@6.19.8: {} - undici@6.20.1: {} + undici@6.21.0: {} unicode-canonical-property-names-ecmascript@2.0.1: {} From 44d1333b4b98f02410875335b7cce8fa0fe526bf Mon Sep 17 00:00:00 2001 From: Webber Qian <32994870+findwei@users.noreply.github.com> Date: Fri, 15 Nov 2024 11:07:09 +0800 Subject: [PATCH 506/740] feat: new router logrocket (#17533) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: new router logrocket * fix: router * fix:article edit * fix:remove unused file --------- Co-authored-by: 钱巍 <wei.qian_ext@aispeech.com> --- lib/routes/logrocket/index.ts | 71 +++++++++++++++++++++++++++++++ lib/routes/logrocket/namespace.ts | 7 +++ 2 files changed, 78 insertions(+) create mode 100644 lib/routes/logrocket/index.ts create mode 100644 lib/routes/logrocket/namespace.ts diff --git a/lib/routes/logrocket/index.ts b/lib/routes/logrocket/index.ts new file mode 100644 index 000000000000000..16bb17de4b0406b --- /dev/null +++ b/lib/routes/logrocket/index.ts @@ -0,0 +1,71 @@ +import { parseDate } from '@/utils/parse-date'; +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'], + example: '/dev', + parameters: { type: 'dev | product-management | ux-design' }, + radar: [ + { + source: ['blog.logrocket.com'], + }, + ], + name: 'blog.logrocket', + maintainers: ['findwei'], + handler, + url: 'blog.logrocket.com/', +}; +async function handler(ctx) { + const type = ctx.req.param('type'); + const link = 'https://blog.logrocket.com/'; + let title = 'Dev'; + if (type === 'product-management') { + title = 'Product Management'; + } else if (type === 'ux-design') { + title = 'UX Design'; + } + const response = await ofetch(`${link}${type}`); + const $ = load(response); + const list = $('div.post-list .post-card') + .toArray() + .map((item) => { + item = $(item); + const a = item.find('a').first(); + const title = item.find('.post-card-title').first(); + return { + title: title.text(), + link: a.attr('href'), + pubDate: parseDate(item.find('.post-card-author-name').next().text().split(' ⋅ ')[0], 'MMM D, YYYY'), + author: item.find('.post-card-author-name').text(), + }; + }); + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const response = await ofetch(item.link); + const $ = load(response); + // + $('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; + }) + ) + ); + return { + title: `logrocket-${title}`, + link, + description: `logrocket-${title}`, + item: items, + }; +} diff --git a/lib/routes/logrocket/namespace.ts b/lib/routes/logrocket/namespace.ts new file mode 100644 index 000000000000000..3a091ddc538e6bf --- /dev/null +++ b/lib/routes/logrocket/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'logrocket blog', + url: 'blog.logrocket.com', + lang: 'en', +}; From 2cc724fc9bf4c0d5bacd67a81ff35eb55ae3ddcc Mon Sep 17 00:00:00 2001 From: Webber Qian <32994870+findwei@users.noreply.github.com> Date: Fri, 15 Nov 2024 14:04:34 +0800 Subject: [PATCH 507/740] fix: example edit or authentication source (#17583) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: new router logrocket * fix: router * fix:article edit * fix:remove unused file * fix: example edit or authentication source * fix:example --------- Co-authored-by: 钱巍 <wei.qian_ext@aispeech.com> --- lib/routes/logrocket/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/logrocket/index.ts b/lib/routes/logrocket/index.ts index 16bb17de4b0406b..8a1f605b983ef58 100644 --- a/lib/routes/logrocket/index.ts +++ b/lib/routes/logrocket/index.ts @@ -10,7 +10,7 @@ import cache from '@/utils/cache'; export const route: Route = { path: '/:type', categories: ['blog'], - example: '/dev', + example: '/logrocket/dev', parameters: { type: 'dev | product-management | ux-design' }, radar: [ { From 481504db75690cdc8bc1235052013e4e687ce709 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 18:07:05 +0800 Subject: [PATCH 508/740] chore(deps-dev): bump eslint-plugin-n from 17.13.1 to 17.13.2 (#17588) Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 17.13.1 to 17.13.2. - [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases) - [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/v17.13.1...v17.13.2) --- updated-dependencies: - dependency-name: eslint-plugin-n dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 e2f69df303a8247..23685a7e778d6b3 100644 --- a/package.json +++ b/package.json @@ -174,7 +174,7 @@ "eslint": "9.14.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", - "eslint-plugin-n": "17.13.1", + "eslint-plugin-n": "17.13.2", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-unicorn": "56.0.0", "eslint-plugin-yml": "1.15.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5a94cf9f9922d1b..3d4986a9c35496b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,8 +379,8 @@ importers: specifier: 8.1.0 version: 8.1.0(eslint@9.14.0) eslint-plugin-n: - specifier: 17.13.1 - version: 17.13.1(eslint@9.14.0) + specifier: 17.13.2 + version: 17.13.2(eslint@9.14.0) eslint-plugin-prettier: specifier: 5.2.1 version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3) @@ -2987,8 +2987,8 @@ packages: peerDependencies: eslint: '>=8' - eslint-plugin-n@17.13.1: - resolution: {integrity: sha512-97qzhk1z3DdSJNCqT45EslwCu5+LB9GDadSyBItgKUfGsXAmN/aa7LRQ0ZxHffUxUzvgbTPJL27/pE9ZQWHy7A==} + eslint-plugin-n@17.13.2: + resolution: {integrity: sha512-MhBAKkT01h8cOXcTBTlpuR7bxH5OBUNpUXefsvwSVEy46cY4m/Kzr2osUCQvA3zJFD6KuCeNNDv0+HDuWk/OcA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' @@ -8654,7 +8654,7 @@ snapshots: eslint: 9.14.0 eslint-compat-utils: 0.5.1(eslint@9.14.0) - eslint-plugin-n@17.13.1(eslint@9.14.0): + eslint-plugin-n@17.13.2(eslint@9.14.0): dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) enhanced-resolve: 5.17.1 From 2ec475576609d7f4bff5e2258b829882d1de9ffb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 18:09:00 +0800 Subject: [PATCH 509/740] chore(deps-dev): bump discord-api-types from 0.37.104 to 0.37.105 (#17589) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.104 to 0.37.105. - [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.104...0.37.105) --- updated-dependencies: - dependency-name: discord-api-types dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 23685a7e778d6b3..bdcbec8541b5b87 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "@typescript-eslint/parser": "8.14.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", - "discord-api-types": "0.37.104", + "discord-api-types": "0.37.105", "eslint": "9.14.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3d4986a9c35496b..10ce1ddc32874e8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -367,8 +367,8 @@ importers: specifier: 2.0.5 version: 2.0.5(vitest@2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: - specifier: 0.37.104 - version: 0.37.104 + specifier: 0.37.105 + version: 0.37.105 eslint: specifier: 9.14.0 version: 9.14.0 @@ -2769,8 +2769,8 @@ packages: resolution: {integrity: sha512-d9paCbverdqmuwR+B40phSqiHhgPKiP8dpsMz5WT9U6ug2VVQ3tqXNCedpa6iGHg6mgv9lHaoq5DJUu2IXMjsQ==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.104: - resolution: {integrity: sha512-kIX9RXGekag1Yd/R/douqBTRyt5GY5mCoxntKLuyqfYpKQ1fl8XpHNFIMtnoDSD343TJWsah49XylrsNFfTu0Q==} + discord-api-types@0.37.105: + resolution: {integrity: sha512-TSNlLF5Q9vFLMeHjYskhmDj/zCQ4dFA+OLxQrHUypGW48gt8ttGaB+opCD9w3Zkq1otyoBoetrwaoDFZAFuGng==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -8383,7 +8383,7 @@ snapshots: directory-import@3.3.1: {} - discord-api-types@0.37.104: {} + discord-api-types@0.37.105: {} doctrine@3.0.0: dependencies: From a5263093b9ece7b1ddb7809ebfa54f5ccd6c579f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 18:12:37 +0800 Subject: [PATCH 510/740] chore(deps): bump codecov/codecov-action from 4 to 5 (#17587) Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v4...v5) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index feb06fb989f3f31..f335abdebb77259 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -48,7 +48,7 @@ jobs: REDIS_URL: redis://localhost:${{ job.services.redis.ports[6379] }}/ - name: Upload coverage to Codecov if: ${{ matrix.node-version == 'lts/*' }} - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos as documented, but seems broken From b857abcf42f144539db3e64f3efc9c1ed93dfb96 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Fri, 15 Nov 2024 02:13:49 -0800 Subject: [PATCH 511/740] feat(route): javtrailers (#17590) * feat(route): javtrailers * feat(casts): enhance description with castWiki data --- lib/routes/javtrailers/casts.ts | 41 +++++++++++++ lib/routes/javtrailers/categories.ts | 40 +++++++++++++ lib/routes/javtrailers/namespace.ts | 7 +++ lib/routes/javtrailers/studios.ts | 39 ++++++++++++ .../javtrailers/templates/description.art | 31 ++++++++++ lib/routes/javtrailers/types.ts | 59 +++++++++++++++++++ lib/routes/javtrailers/utils.ts | 48 +++++++++++++++ 7 files changed, 265 insertions(+) create mode 100644 lib/routes/javtrailers/casts.ts create mode 100644 lib/routes/javtrailers/categories.ts create mode 100644 lib/routes/javtrailers/namespace.ts create mode 100644 lib/routes/javtrailers/studios.ts create mode 100644 lib/routes/javtrailers/templates/description.art create mode 100644 lib/routes/javtrailers/types.ts create mode 100644 lib/routes/javtrailers/utils.ts diff --git a/lib/routes/javtrailers/casts.ts b/lib/routes/javtrailers/casts.ts new file mode 100644 index 000000000000000..f8c3bceca40040f --- /dev/null +++ b/lib/routes/javtrailers/casts.ts @@ -0,0 +1,41 @@ +import { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import cache from '@/utils/cache'; +import { baseUrl, getItem, headers, parseList } from './utils'; + +export const route: Route = { + path: '/casts/:cast', + categories: ['multimedia'], + example: '/javtrailers/casts/hibiki-otsuki', + parameters: { cast: 'Cast name, can be found in the URL of the cast page' }, + radar: [ + { + source: ['javtrailers.com/casts/:category'], + }, + ], + name: 'Casts', + maintainers: ['TonyRL'], + url: 'javtrailers.com/casts', + handler, +}; + +async function handler(ctx) { + const { cast } = ctx.req.param(); + + const response = await ofetch(`${baseUrl}/api/casts/${cast}?page=0`, { + headers, + }); + + const list = parseList(response.videos); + + const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => getItem(item)))); + + return { + title: `Watch ${response.cast.name} Jav Online | Japanese Adult Video - JavTrailers.com`, + description: response.cast.castWiki?.description.replaceAll('\n', ' ') ?? `Watch ${response.cast.name} Jav video’s free, we have the largest Jav collections with high definition`, + image: response.cast.avatar, + link: `${baseUrl}/casts/${cast}`, + item: items, + }; +} diff --git a/lib/routes/javtrailers/categories.ts b/lib/routes/javtrailers/categories.ts new file mode 100644 index 000000000000000..402e366b3a22923 --- /dev/null +++ b/lib/routes/javtrailers/categories.ts @@ -0,0 +1,40 @@ +import { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import cache from '@/utils/cache'; +import { baseUrl, getItem, headers, parseList } from './utils'; + +export const route: Route = { + path: '/categories/:category', + categories: ['multimedia'], + example: '/javtrailers/categories/50001755', + parameters: { category: 'Category name, can be found in the URL of the category page' }, + radar: [ + { + source: ['javtrailers.com/categories/:category'], + }, + ], + name: 'Categories', + maintainers: ['TonyRL'], + url: 'javtrailers.com/categories', + handler, +}; + +async function handler(ctx) { + const { category } = ctx.req.param(); + + const response = await ofetch(`${baseUrl}/api/categories/${category}?page=0`, { + headers, + }); + + const list = parseList(response.videos); + + const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => getItem(item)))); + + return { + title: `Watch ${response.category.name} Jav Online | Japanese Adult Video - JavTrailers.com`, + description: `Watch ${response.category.name} Jav video’s free, we have the largest Jav collections with high definition`, + link: `${baseUrl}/categories/${category}`, + item: items, + }; +} diff --git a/lib/routes/javtrailers/namespace.ts b/lib/routes/javtrailers/namespace.ts new file mode 100644 index 000000000000000..48e5c45912fb15d --- /dev/null +++ b/lib/routes/javtrailers/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'JavTrailers', + url: 'javtrailers.com', + lang: 'ja', +}; diff --git a/lib/routes/javtrailers/studios.ts b/lib/routes/javtrailers/studios.ts new file mode 100644 index 000000000000000..72ebfca6c6d8813 --- /dev/null +++ b/lib/routes/javtrailers/studios.ts @@ -0,0 +1,39 @@ +import { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import cache from '@/utils/cache'; +import { baseUrl, getItem, headers, parseList } from './utils'; + +export const route: Route = { + path: '/studios/:studio', + categories: ['multimedia'], + example: '/javtrailers/studios/s1-no-1-style', + parameters: { studio: 'Studio name, can be found in the URL of the studio page' }, + radar: [ + { + source: ['javtrailers.com/studios/:category'], + }, + ], + name: 'Studios', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { + const { studio } = ctx.req.param(); + + const response = await ofetch(`${baseUrl}/api/studios/${studio}?page=0`, { + headers, + }); + + const list = parseList(response.videos); + + const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => getItem(item)))); + + return { + title: `${response.studio.hotDvdIds?.join(' ') ?? response.studio.name} Jav Online | Japanese Adult Video - JavTrailers.com`, + description: 'Watch Jav made by Prestige free, with high definition, we have over 4,000 studios available for free streaming.', + link: `${baseUrl}/studios/${studio}`, + item: items, + }; +} diff --git a/lib/routes/javtrailers/templates/description.art b/lib/routes/javtrailers/templates/description.art new file mode 100644 index 000000000000000..36b47a10240a94c --- /dev/null +++ b/lib/routes/javtrailers/templates/description.art @@ -0,0 +1,31 @@ +{{ if videoInfo.image }} + <img src="{{ videoInfo.image }}"><br> +{{ /if }} + +{{ if videoInfo.dvdId }}<b>DVD ID:</b> {{ videoInfo.dvdId }}<br>{{ /if }} +{{ if videoInfo.contentId }}<b>Content ID:</b> {{ videoInfo.contentId }}<br>{{ /if }} +{{ if videoInfo.releaseDate }}<b>Release Date:</b> {{ videoInfo.releaseDate }}<br>{{ /if }} +{{ if videoInfo.duration }}<b>Duration:</b> {{ videoInfo.duration }} mins<br>{{ /if }} +{{ if videoInfo.director }}<b>Director:</b> {{ videoInfo.director }} {{ videoInfo.jpDirector }}<br>{{ /if }} +{{ if videoInfo.studio }}<b>Studio:</b> {{ videoInfo.studio.name }}<br>{{ /if }} +{{ if videoInfo.categories }} + <b>Categories:</b> + {{ each videoInfo.categories c }} + {{ c.name }}, + {{ /each }} + <br> +{{ /if }} +{{ if videoInfo.casts }} + <b>Cast(s):</b> + {{ each videoInfo.casts c }} + {{ c.name }} {{ c.jpName }} + {{ /each }} + <br> +{{ /if }} + + +{{ if videoInfo.gallery }} + {{ each videoInfo.gallery g }} + <img src="{{ g }}" ><br> + {{ /each }} +{{ /if }} diff --git a/lib/routes/javtrailers/types.ts b/lib/routes/javtrailers/types.ts new file mode 100644 index 000000000000000..2ac2e1eb4c54034 --- /dev/null +++ b/lib/routes/javtrailers/types.ts @@ -0,0 +1,59 @@ +export interface Video { + _id: string; + categories: Category[]; + casts: Cast[]; + director: string; + gallery: string[]; + title: string; + javLink: JavLink; + contentId: string; + dvdId: string; + studio: Studio; + releaseDate: string; + duration: number; + image: string; + jpDirector: string; + jpTitle: string; + /** + * HLS stream URL + */ + trailer: string; + zhTitle: string; + __v: number; +} + +interface Category { + _id: string; + slug: string; + name: string; + jpName: string; + zhName: string; +} + +interface Cast { + _id: string; + slug: string; + ruby: string; + link: string; + name: string; + jpName: string; + avatar: string; + __v: number; +} + +interface JavLink { + _id: string; + link: string; + processed: boolean; + isProfessional: boolean; + upcoming: boolean; + __v: number; +} + +interface Studio { + _id: string; + slug: string; + name: string; + link: string; + jpName: string; +} diff --git a/lib/routes/javtrailers/utils.ts b/lib/routes/javtrailers/utils.ts new file mode 100644 index 000000000000000..5b8037bef24240c --- /dev/null +++ b/lib/routes/javtrailers/utils.ts @@ -0,0 +1,48 @@ +import { Video } from './types'; + +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 = { + Authorization: 'AELAbPQCh_fifd93wMvf_kxMD_fqkUAVf@BVgb2!md@TNW8bUEopFExyGCoKRcZX', +}; + +export const hdGallery = (gallery) => + gallery.map((item) => { + if (item.startsWith('https://pics.dmm.co.jp/')) { + return item.replace(/-(\d+)\.jpg$/, 'jp-$1.jpg'); + } else if (item.startsWith('https://image.mgstage.com/')) { + return item.replace(/cap_t1_/, 'cap_e_'); + } + return item; + }); + +export const parseList = (videos) => + videos.map((item) => ({ + title: `${item.dvdId} ${item.title}`, + link: `${baseUrl}/video/${item.contentId}`, + pubDate: parseDate(item.releaseDate), + contentId: item.contentId, + })); + +export const getItem = async (item) => { + const response = await ofetch(`${baseUrl}/api/video/${item.contentId}`, { + headers, + }); + + const videoInfo: Video = response.video; + videoInfo.gallery = hdGallery(videoInfo.gallery); + + item.description = art(path.join(__dirname, 'templates/description.art'), { + videoInfo, + }); + item.author = videoInfo.casts.map((cast) => `${cast.name} ${cast.jpName}`).join(', '); + item.category = videoInfo.categories.map((category) => `${category.name}/${category.jpName}/${category.zhName}`); + + return item; +}; From e8f020e31c986c811c0ecbce189510f1c0bf582e Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Fri, 15 Nov 2024 18:37:04 +0800 Subject: [PATCH 512/740] feat(mastodon): add 'fosstodon.org' to allowed site list --- lib/routes/mastodon/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/mastodon/utils.ts b/lib/routes/mastodon/utils.ts index 40b4401ade10f51..d2beb9e334cd8cf 100644 --- a/lib/routes/mastodon/utils.ts +++ b/lib/routes/mastodon/utils.ts @@ -4,7 +4,7 @@ import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; import ConfigNotFoundError from '@/errors/types/config-not-found'; -const allowSiteList = ['mastodon.social', 'pawoo.net', config.mastodon.apiHost].filter(Boolean); +const allowSiteList = ['mastodon.social', 'pawoo.net', 'fosstodon.org', config.mastodon.apiHost].filter(Boolean); const apiHeaders = (site) => { const { accessToken, apiHost } = config.mastodon; From 47ae077dee57ac746a49dc7945e0b7675a679c78 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Fri, 15 Nov 2024 03:52:40 -0800 Subject: [PATCH 513/740] feat(route): qstheory magazine (#17591) --- lib/router.js | 3 - lib/routes-deprecated/qstheory/index.js | 122 ------------------------ lib/routes/qstheory/index.ts | 121 +++++++++++++++++++++++ lib/routes/qstheory/magazine.ts | 64 +++++++++++++ lib/routes/qstheory/namespace.ts | 7 ++ lib/routes/qstheory/utils.ts | 25 +++++ 6 files changed, 217 insertions(+), 125 deletions(-) delete mode 100644 lib/routes-deprecated/qstheory/index.js create mode 100644 lib/routes/qstheory/index.ts create mode 100644 lib/routes/qstheory/magazine.ts create mode 100644 lib/routes/qstheory/namespace.ts create mode 100644 lib/routes/qstheory/utils.ts diff --git a/lib/router.js b/lib/router.js index 063ef5ab3ed9d13..0e19dd05f23e2c6 100644 --- a/lib/router.js +++ b/lib/router.js @@ -1455,9 +1455,6 @@ router.get('/deepl/blog/:lang?', lazyloadRouteHandler('./routes/deepl/blog')); router.get('/muchong/journal/:type?', lazyloadRouteHandler('./routes/muchong/journal')); router.get('/muchong/:id/:type?/:sort?', lazyloadRouteHandler('./routes/muchong/index')); -// 求是网 -router.get('/qstheory/:category?', lazyloadRouteHandler('./routes/qstheory/index')); - // 生命时报 router.get('/lifetimes/:category?', lazyloadRouteHandler('./routes/lifetimes/index')); diff --git a/lib/routes-deprecated/qstheory/index.js b/lib/routes-deprecated/qstheory/index.js deleted file mode 100644 index 95d5a4e3bec31eb..000000000000000 --- a/lib/routes-deprecated/qstheory/index.js +++ /dev/null @@ -1,122 +0,0 @@ -const got = require('@/utils/got'); -const cheerio = require('cheerio'); - -const rootUrl = 'http://www.qstheory.cn/'; - -const config = { - toutiao: { - title: '头条', - url: `${rootUrl}/v9zhuanqu/toutiao/index.htm`, - }, - qswp: { - title: '网评', - url: `${rootUrl}/qswp.htm`, - }, - qssp: { - title: '视频', - url: `${rootUrl}/qssp/index.htm`, - }, - qslgxd: { - title: '原创', - url: `${rootUrl}/qslgxd/index.htm`, - }, - economy: { - title: '经济', - url: `${rootUrl}/economy/index.htm`, - }, - politics: { - title: '政治', - url: `${rootUrl}/politics/index.htm`, - }, - culture: { - title: '文化', - url: `${rootUrl}/culture/index.htm`, - }, - society: { - title: '社会', - url: `${rootUrl}/society/index.htm`, - }, - cpc: { - title: '党建', - url: `${rootUrl}/cpc/index.htm`, - }, - science: { - title: '科教', - url: `${rootUrl}/science/index.htm`, - }, - zoology: { - title: '生态', - url: `${rootUrl}/zoology/index.htm`, - }, - defense: { - title: '国防', - url: `${rootUrl}/defense/index.htm`, - }, - international: { - title: '国际', - url: `${rootUrl}/international/index.htm`, - }, - books: { - title: '图书', - url: `${rootUrl}/books/index.htm`, - }, - xxbj: { - title: '学习笔记', - url: `${rootUrl}/qszq/xxbj/index.htm`, - }, -}; - -module.exports = async (ctx) => { - const category = ctx.params.category || 'toutiao'; - - const currentUrl = config[category].url; - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = cheerio.load(response.data); - - const list = $('.list-style1 ul li a, .text h2 a, .no-pic ul li a') - .slice(0, 15) - .map((_, item) => { - item = $(item); - return { - title: item.text(), - link: item.attr('href'), - }; - }) - .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); - - content('.fs-text, .fs-pinglun, .hidden-xs').remove(); - - item.author = content('.appellation').text(); - item.description = content('.highlight, .text').html() || content('.content').html(); - item.pubDate = new Date( - content('.puttime_mobi, .pubtime, .headtitle span') - .text() - .replace('发表于', '') - .replaceAll(/(年|月)/g, '-') - .replace('日', '') - ).toUTCString(); - - return item; - }) - ) - ); - - ctx.state.data = { - title: $('title').text(), - link: currentUrl, - item: items, - }; -}; diff --git a/lib/routes/qstheory/index.ts b/lib/routes/qstheory/index.ts new file mode 100644 index 000000000000000..9af215f31f25af2 --- /dev/null +++ b/lib/routes/qstheory/index.ts @@ -0,0 +1,121 @@ +import { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; +import cache from '@/utils/cache'; +import { baseUrl as rootUrl, getItem } from './utils'; + +const config = { + toutiao: { + title: '头条', + url: `${rootUrl}/v9zhuanqu/toutiao/index.htm`, + }, + qswp: { + title: '网评', + url: `${rootUrl}/qswp.htm`, + }, + qssp: { + title: '视频', + url: `${rootUrl}/qssp/index.htm`, + }, + qslgxd: { + title: '原创', + url: `${rootUrl}/qslgxd/index.htm`, + }, + economy: { + title: '经济', + url: `${rootUrl}/economy/index.htm`, + }, + politics: { + title: '政治', + url: `${rootUrl}/politics/index.htm`, + }, + culture: { + title: '文化', + url: `${rootUrl}/culture/index.htm`, + }, + society: { + title: '社会', + url: `${rootUrl}/society/index.htm`, + }, + cpc: { + title: '党建', + url: `${rootUrl}/cpc/index.htm`, + }, + science: { + title: '科教', + url: `${rootUrl}/science/index.htm`, + }, + zoology: { + title: '生态', + url: `${rootUrl}/zoology/index.htm`, + }, + defense: { + title: '国防', + url: `${rootUrl}/defense/index.htm`, + }, + international: { + title: '国际', + url: `${rootUrl}/international/index.htm`, + }, + books: { + title: '图书', + url: `${rootUrl}/books/index.htm`, + }, + xxbj: { + title: '学习笔记', + url: `${rootUrl}/qszq/xxbj/index.htm`, + }, + llwx: { + title: '理论文选', + url: `${rootUrl}/qszq/llwx/index.htm`, + }, +}; + +export const route: Route = { + path: '/:category?', + categories: ['traditional-media'], + example: '/qstheory', + parameters: { industry: '分类,见下表' }, + radar: [ + { + source: ['www.qstheory.cn/v9zhuanqu/:category/index.htm', 'www.qstheory.cn/qszq/:category/index.htm', 'www.qstheory.cn/:category/index.htm'], + }, + ], + name: '分类', + maintainers: ['nczitzk'], + handler, + description: ` +| 头条 | 网评 | 视频 | 原创 | 经济 | 政治 | 文化 | 社会 | 党建 | 科教 | 生态 | 国防 | 国际 | 图书 | 学习笔记 | 理论文选 | +| ------- | ---- | ---- | ------ | ------- | -------- | ------- | ------- | ---- | ------- | ------- | ------- | ------------- | ----- | -------- | -------- | +| toutiao | qswp | qssp | qslgxd | economy | politics | culture | society | cpc | science | zoology | defense | international | books | xxbj | llwx |`, +}; + +async function handler(ctx) { + const { category = 'toutiao' } = ctx.req.param(); + const limit = Number.parseInt(ctx.req.query('limit')) || 50; + + const currentUrl = config[category].url; + const response = await ofetch(currentUrl); + + const $ = cheerio.load(response); + + const list = $('.list-style1 ul li a, .text h2 a, .no-pic ul li a') + .slice(0, limit) + .toArray() + .map((item) => { + const $item = $(item); + return { + title: $item.text(), + link: $item.attr('href')!, + }; + }); + + const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => getItem(item)))); + + return { + title: $('title').text(), + link: currentUrl, + item: items, + }; +} diff --git a/lib/routes/qstheory/magazine.ts b/lib/routes/qstheory/magazine.ts new file mode 100644 index 000000000000000..57f8767b7bd5a95 --- /dev/null +++ b/lib/routes/qstheory/magazine.ts @@ -0,0 +1,64 @@ +import { Route } from '@/types'; + +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; +import cache from '@/utils/cache'; +import { baseUrl, getItem } from './utils'; + +export const route: Route = { + path: '/magazine/:magazine', + categories: ['traditional-media'], + example: '/qstheory/magazine/qs', + parameters: { magazine: '刊物,`qs` 为求是,`hqwglist` 为红旗文稿' }, + radar: [ + { + source: ['www.qstheory.cn/:magazine/mulu.htm'], + }, + ], + name: '在线读刊', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { + const { magazine } = ctx.req.param(); + + const link = `${baseUrl}/${magazine}/mulu.htm`; + const yearResponse = await ofetch(link); + + const $ = cheerio.load(yearResponse); + + const yearList = $('.booktitle a') + .toArray() + .map((item) => { + const $item = $(item); + return { + title: $item.text(), + link: $item.attr('href')!, + }; + }); + + const issueResponse = await ofetch(yearList[0].link); + const $$ = cheerio.load(issueResponse); + + const list = $$('.highlight span a') + .toArray() + .map((item) => { + const $item = $$(item); + return { + title: $item.text(), + link: $item.attr('href')!, + }; + }) + .toReversed() + .filter((item) => item.title); + + const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => getItem(item)))); + + return { + title: $('head title').text(), + link, + image: new URL($('.book img').attr('src')!, link).href, + item: items, + }; +} diff --git a/lib/routes/qstheory/namespace.ts b/lib/routes/qstheory/namespace.ts new file mode 100644 index 000000000000000..80ea898cb8b66f9 --- /dev/null +++ b/lib/routes/qstheory/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '求是网', + url: 'www.qstheory.cn', + lang: 'zh-CN', +}; diff --git a/lib/routes/qstheory/utils.ts b/lib/routes/qstheory/utils.ts new file mode 100644 index 000000000000000..08878d9c3aa2cb3 --- /dev/null +++ b/lib/routes/qstheory/utils.ts @@ -0,0 +1,25 @@ +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +export const baseUrl = 'http://www.qstheory.cn'; + +export const getItem = async (item) => { + const response = await ofetch(item.link); + const $ = cheerio.load(response); + + $('.fs-text, .fs-pinglun, .hidden-xs').remove(); + + item.author = $('.appellation').text(); + item.description = $('.highlight, .text').html() || $('.content').html(); + item.pubDate = parseDate( + $('.puttime_mobi, .pubtime, .headtitle span') + .text() + .trim() + .replace('发表于', '') + .replaceAll(/(年|月)/g, '-') + .replace('日', '') + ); + + return item; +}; From 99ee9e7030b903dc9dfb30336657dfb7b7da928f Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Fri, 15 Nov 2024 20:19:42 +0800 Subject: [PATCH 514/740] chore: escape HTML entity in route test URL display (#17592) --- scripts/workflow/test-route/test.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/workflow/test-route/test.mjs b/scripts/workflow/test-route/test.mjs index 545db42b7527104..58cb40345dcfbeb 100644 --- a/scripts/workflow/test-route/test.mjs +++ b/scripts/workflow/test-route/test.mjs @@ -41,7 +41,7 @@ export default async function test({ github, context, core }, baseUrl, routes, n let routeFeedback = ` <details> -<summary><a href="${lks}">${lks}</a> - ${success ? 'Success ✔️' : '<b>Failed ❌</b>'}</summary> +<summary><a href="${lks}">${lks.replaceAll('&', '&')}</a> - ${success ? 'Success ✔️' : '<b>Failed ❌</b>'}</summary> \`\`\`${success ? 'rss' : ''}`; routeFeedback += ` From 4b6658605ab63cdd247186b901dcaf66396b828a Mon Sep 17 00:00:00 2001 From: lifegpc <root@lifegpc.com> Date: Fri, 15 Nov 2024 23:48:09 +0800 Subject: [PATCH 515/740] =?UTF-8?q?fix(twitter)!:=20=E4=BF=AE=E5=A4=8DTwit?= =?UTF-8?q?ter=20=E9=95=BF=E6=96=87=E6=9C=AC=E6=98=BE=E7=A4=BA=E4=B8=8D?= =?UTF-8?q?=E5=85=A8=20(#17596)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Try fix * apply fix for mobile api --- lib/routes/twitter/api/mobile-api/api.ts | 8 ++++++++ lib/routes/twitter/api/web-api/utils.ts | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/routes/twitter/api/mobile-api/api.ts b/lib/routes/twitter/api/mobile-api/api.ts index 6552fc1f2d99fe1..d4b79e511612a49 100644 --- a/lib/routes/twitter/api/mobile-api/api.ts +++ b/lib/routes/twitter/api/mobile-api/api.ts @@ -160,6 +160,14 @@ function gatherLegacyFromData(entries, filterNested, userId) { t.legacy.quoted_status = quote.legacy; t.legacy.quoted_status.user = quote.core.user_result?.result?.legacy || quote.core.user_results?.result?.legacy; } + if (t.note_tweet) { + const tmp = t.note_tweet.note_tweet_results.result; + t.legacy.entities.hashtags = tmp.entity_set.hashtags; + t.legacy.entities.symbols = tmp.entity_set.symbols; + t.legacy.entities.urls = tmp.entity_set.urls; + t.legacy.entities.user_mentions = tmp.entity_set.user_mentions; + t.legacy.full_text = tmp.text; + } } const legacy = tweet.legacy; if (legacy) { diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index c3ed221b7ed70fa..d3902425deecc89 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -286,6 +286,14 @@ export function gatherLegacyFromData(entries: any[], filterNested?: string[], us t.legacy.quoted_status = quote.legacy; t.legacy.quoted_status.user = quote.core.user_result?.result?.legacy || quote.core.user_results?.result?.legacy; } + if (t.note_tweet) { + const tmp = t.note_tweet.note_tweet_results.result; + t.legacy.entities.hashtags = tmp.entity_set.hashtags; + t.legacy.entities.symbols = tmp.entity_set.symbols; + t.legacy.entities.urls = tmp.entity_set.urls; + t.legacy.entities.user_mentions = tmp.entity_set.user_mentions; + t.legacy.full_text = tmp.text; + } } const legacy = tweet.legacy; if (legacy) { From adbe01dad7118133e2df7c98b959d0da1ea24ac5 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Fri, 15 Nov 2024 08:05:15 -0800 Subject: [PATCH 516/740] feat(route): wallstreetcn (#17597) * feat(route): wallstreetcn * fix(route): correct country_id reference in link generation --- lib/routes/wallstreetcn/calendar.ts | 90 +++++++++++++++++++++++++++++ lib/routes/wallstreetcn/hot.ts | 4 +- lib/routes/wallstreetcn/live.ts | 2 +- lib/routes/wallstreetcn/news.ts | 8 ++- 4 files changed, 98 insertions(+), 6 deletions(-) create mode 100644 lib/routes/wallstreetcn/calendar.ts diff --git a/lib/routes/wallstreetcn/calendar.ts b/lib/routes/wallstreetcn/calendar.ts new file mode 100644 index 000000000000000..5eae0a3cbfba1d7 --- /dev/null +++ b/lib/routes/wallstreetcn/calendar.ts @@ -0,0 +1,90 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/calendar/:section?', + categories: ['finance'], + example: '/wallstreetcn/calendar', + parameters: { section: '`macrodatas` 或 `report`,默认为 `macrodatas`' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['wallstreetcn.com/calendar'], + }, + ], + name: '财经日历', + maintainers: ['TonyRL'], + handler, + url: 'wallstreetcn.com/calendar', +}; + +const rootUrl = 'https://wallstreetcn.com'; + +const MacrodataSuffix = { + CA: 'CA10YR.OTC', + CN: 'USDCNH.OTC', + DE: 'DE30.OTC', + FR: 'FR40.OTC', + // HK: '', + IT: 'EURUSD.OTC', + JP: 'USDJPY.OTC', + UK: 'UK100.OTC', + US: 'DXY.OTC', +}; + +const getMacrodataUrl = (countryId, wscnTicker) => `${rootUrl}/data-analyse/${wscnTicker}/${MacrodataSuffix[countryId]}`; + +async function handler(ctx) { + const { section = 'macrodatas' } = ctx.req.param(); + + const link = `${rootUrl}/calendar`; + const apiRootUrl = section === 'macrodatas' ? 'https://api-one-wscn.awtmt.com' : 'https://api-ddc-wscn.awtmt.com'; + const apiUrl = section === 'macrodatas' ? `${apiRootUrl}/apiv1/finance/macrodatas` : `${apiRootUrl}/finance/report/list`; + + const response = await ofetch(apiUrl, { + query: + section === 'macrodatas' + ? { + start: new Date().setHours(0, 0, 0, 0) / 1000, + end: Math.trunc(new Date().setHours(23, 59, 59, 999) / 1000), + } + : undefined, + }); + + const items = + section === 'macrodatas' + ? response.data.items.map((item) => ({ + title: `${item.country}${item.title}`, + description: `${item.country}${item.title} 重要性: ${'★'.repeat(item.importance)} 今值: ${item.actual || '-'}${item.actual && item.unit} 预期: ${item.forecast || '-'}${item.forecast && item.unit} 前值: ${item.revised || item.previous || '-'}${(item.revised || item.previous) && item.unit}`, + link: item.uri && MacrodataSuffix[item.country_id] && getMacrodataUrl(item.country_id, item.wscn_ticker), + guid: item.id, + pubDate: parseDate(item.public_date, 'X'), + category: item.country, + })) + : // report + response.data.items + .map((item) => Object.fromEntries(response.data.fields.map((field, index) => [field, item[index]]))) + .map((item) => ({ + title: `${item.company_name} ${item.observation_date}`, + description: `${item.code} ${item.company_name} ${item.observation_date} 预期EPS: ${item.eps_estimate === 0 ? '-' : item.eps_estimate} 实际EPS: ${item.reported_eps === 0 ? '-' : item.reported_eps} 差异度: ${item.surprise === 0 || item.surprise === -1 ? '-' : (item.surprise * 100).toFixed(2) + '%'}`, + link, + guid: item.id, + pubDate: parseDate(item.public_date, 'X'), + })); + + return { + title: '财经日历 - 华尔街见闻', + link, + item: items, + itunes_author: '华尔街见闻', + image: 'https://static.wscn.net/wscn/_static/favicon.png', + }; +} diff --git a/lib/routes/wallstreetcn/hot.ts b/lib/routes/wallstreetcn/hot.ts index 9adc7ea9aa924f9..5bdaeb9e27debca 100644 --- a/lib/routes/wallstreetcn/hot.ts +++ b/lib/routes/wallstreetcn/hot.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/hot/:period?', - categories: ['traditional-media'], + categories: ['finance'], example: '/wallstreetcn/hot', parameters: { period: '时期,可选 `day` 即 当日 或 `week` 即 当周,默认为当日' }, features: { @@ -77,6 +77,6 @@ async function handler(ctx) { link: rootUrl, item: items, itunes_author: '华尔街见闻', - image: 'https://static-alpha-wscn.awtmt.com/wscn-static/qrcode.jpg', + image: 'https://static.wscn.net/wscn/_static/favicon.png', }; } diff --git a/lib/routes/wallstreetcn/live.ts b/lib/routes/wallstreetcn/live.ts index 02a7c7f5f8a309c..71f16baa2f179b9 100644 --- a/lib/routes/wallstreetcn/live.ts +++ b/lib/routes/wallstreetcn/live.ts @@ -19,7 +19,7 @@ const titles = { export const route: Route = { path: '/live/:category?/:score?', - categories: ['traditional-media'], + categories: ['finance'], example: '/wallstreetcn/live', parameters: { category: '快讯分类,默认`global`,见下表', score: '快讯重要度,默认`1`全部快讯,可设置为`2`只看重要的' }, features: { diff --git a/lib/routes/wallstreetcn/news.ts b/lib/routes/wallstreetcn/news.ts index 30c1ef781616545..f7674c75f957b38 100644 --- a/lib/routes/wallstreetcn/news.ts +++ b/lib/routes/wallstreetcn/news.ts @@ -18,13 +18,15 @@ const titles = { }; export const route: Route = { - path: ['/news/:category?', '/:category?'], + path: '/news/:category?', + categories: ['finance'], + example: '/wallstreetcn/news', radar: [ { source: ['wallstreetcn.com/news/:category', 'wallstreetcn.com/'], }, ], - name: 'Unknown', + name: '资讯', maintainers: ['nczitzk'], handler, description: `| id | 分类 | @@ -98,6 +100,6 @@ async function handler(ctx) { link: currentUrl, item: items, itunes_author: '华尔街见闻', - image: 'https://static-alpha-wscn.awtmt.com/wscn-static/qrcode.jpg', + image: 'https://static.wscn.net/wscn/_static/favicon.png', }; } From 682d95496c9f819d29f59541c6558ac331c70777 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Sat, 16 Nov 2024 01:13:46 +0800 Subject: [PATCH 517/740] fix(bilibili)!: update article api (#17586) * fix(bilibili): update article api * fix(bilibili): use default ua --------- --- lib/routes/bilibili/article.ts | 51 ++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/lib/routes/bilibili/article.ts b/lib/routes/bilibili/article.ts index 6bed24998b030e2..1c9980d0e1b4065 100644 --- a/lib/routes/bilibili/article.ts +++ b/lib/routes/bilibili/article.ts @@ -1,8 +1,10 @@ import { Route } from '@/types'; import got from '@/utils/got'; import cache from './cache'; - +import cacheGeneral from '@/utils/cache'; +import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; + export const route: Route = { path: '/user/article/:uid', categories: ['social-media'], @@ -21,8 +23,8 @@ export const route: Route = { source: ['space.bilibili.com/:uid'], }, ], - name: 'UP 主专栏', - maintainers: ['lengthmin', 'Qixingchen'], + name: 'UP 主图文', + maintainers: ['lengthmin', 'Qixingchen', 'hyoban'], handler, }; @@ -31,24 +33,45 @@ async function handler(ctx) { const name = await cache.getUsernameFromUID(uid); const response = await got({ method: 'get', - url: `https://api.bilibili.com/x/space/article?mid=${uid}&pn=1&ps=10&sort=publish_time&jsonp=jsonp`, + url: `https://api.bilibili.com/x/polymer/web-dynamic/v1/opus/feed/space?host_mid=${uid}`, headers: { - Referer: `https://space.bilibili.com/${uid}/`, + Referer: `https://space.bilibili.com/${uid}/article`, }, }); const data = response.data.data; - const title = `${name} 的 bilibili 专栏`; + const title = `${name} 的 bilibili 图文`; const link = `https://space.bilibili.com/${uid}/article`; - const description = `${name} 的 bilibili 专栏`; + const description = `${name} 的 bilibili 图文`; + const cookie = await cache.getCookie(); + const item = await Promise.all( - data.articles.map(async (item) => { - const { url: art_url, description: eDescription } = await cache.getArticleDataFromCvid(item.id, uid); - const publishDate = parseDate(item.publish_time * 1000); + data.items.map(async (item) => { + const link = 'https:' + item.jump_url; + const data = await cacheGeneral.tryGet( + link, + async () => + ( + await got({ + method: 'get', + url: link, + headers: { + Referer: `https://space.bilibili.com/${uid}/article`, + Cookie: cookie, + }, + }) + ).data + ); + + const $ = load(data as string); + const description = $('.opus-module-content').html(); + const pubDate = $('.opus-module-author__pub__text').text().replace('编辑于 ', ''); + const single = { - title: item.title, - link: art_url, - description: eDescription, - pubDate: publishDate, + title: item.content, + link, + description: description || item.content, + // 2019年11月11日 08:50 + pubDate: pubDate ? parseDate(pubDate, 'YYYY年MM月DD日 HH:mm') : undefined, }; return single; }) From 7ce029a051d3b243bc223337d8f6991a520fcfda Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Fri, 15 Nov 2024 19:03:52 +0000 Subject: [PATCH 518/740] feat(route): add dw route (#17575) * feat(route): add dw route * fix * Apply suggestions from code review Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Apply suggestions from code review * Apply suggestions with code review * add mp4 video src * fix: preload metadata -------- --- lib/routes/dw/namespace.ts | 6 + lib/routes/dw/news.ts | 91 +++++++++++++ lib/routes/dw/rss.ts | 62 +++++++++ lib/routes/dw/templates/description.art | 23 ++++ lib/routes/dw/templates/liveblog.art | 13 ++ lib/routes/dw/templates/video.art | 14 ++ lib/routes/dw/utils.ts | 171 ++++++++++++++++++++++++ 7 files changed, 380 insertions(+) create mode 100644 lib/routes/dw/namespace.ts create mode 100644 lib/routes/dw/news.ts create mode 100644 lib/routes/dw/rss.ts create mode 100644 lib/routes/dw/templates/description.art create mode 100644 lib/routes/dw/templates/liveblog.art create mode 100644 lib/routes/dw/templates/video.art create mode 100644 lib/routes/dw/utils.ts diff --git a/lib/routes/dw/namespace.ts b/lib/routes/dw/namespace.ts new file mode 100644 index 000000000000000..33696e36c0a8c1e --- /dev/null +++ b/lib/routes/dw/namespace.ts @@ -0,0 +1,6 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'DW Deutsche Welle', + url: 'dw.com', +}; diff --git a/lib/routes/dw/news.ts b/lib/routes/dw/news.ts new file mode 100644 index 000000000000000..e9391b0d7058f5a --- /dev/null +++ b/lib/routes/dw/news.ts @@ -0,0 +1,91 @@ +import { Route } from '@/types'; +import { processItems } from './utils'; +import got from '@/utils/got'; +import cache from '@/utils/cache'; +import { config } from '@/config'; + +export const route: Route = { + path: '/news/:lang?/:id?', + categories: ['traditional-media'], + example: '/dw/news', + parameters: { + lang: 'Language, see below, default to en', + id: 'Category ID, see below, default to the id of the Top Stories Page of the language chosen', + }, + features: { + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + requireConfig: false, + }, + name: 'News', + maintainers: ['quiniapiezoelectricity'], + handler, + description: ` +:::tip +Parameters can be obtained from the official website, for instance: +For the site https://www.dw.com/de/deutschland/s-12321 the language code would be \`de\` and the category ID would be \`s-1432\`. +::: +`, + radar: [ + { + source: ['www.dw.com/:lang/:name/:id'], + target: '/news/:lang/:id', + }, + ], +}; + +const defaultUrl = `https://www.dw.com/graph-api/en/content/navigation/9097`; +const typenames = new Set(['Article', 'Liveblog', 'Video']); + +async function handler(ctx) { + const lang = ctx.req.param('lang') ?? 'en'; + let id = ctx.req.param('id'); + + if (/^s-\d+$/.test(id)) { + id = id.match(/^s-(\d+)$/i)[1]; // convert s-1234 id to 1234 + } else if (id === undefined) { + // Look up the id of the Top Stories Page of the selected language if id is not specified in the URL. + const navigation = await cache.tryGet( + 'dw:navigation', + async () => { + const res = await got(defaultUrl); + return res.data.data.content.topStoriesNavigations; + }, + config.cache.routeExpire, + false + ); + id = navigation + .map((item) => item.namedUrl.split('/')) + .find((item) => item[1] === lang)[3] + .match(/^s-(\d+)$/i)[1]; + } + + const response = await got(`https://www.dw.com/graph-api/${lang}/content/navigation/${id}`); + const feed = response.data.data.content; + cache.set('dw:navigation', feed.topStoriesNavigations, config.cache.routeExpire); + + const list = feed.contentComposition.informationSpaces + .flatMap((section) => Object.values(section).flatMap((component) => component[0]?.contents || [])) + .filter((item) => typenames.has(item.__typename) && item.id); + const items = await processItems( + list.map((item) => { + item.link = new URL(item.namedUrl, 'https://www.dw.com').href; + item.pubDate = item.contentDate; + item.description = item.teaser; + item.language = lang; + item.type = item.__typename.toLowerCase(); + return item; + }) + ); + + return { + title: `DW | ${feed.title}`, + link: feed.canonicalUrl, + description: feed.metaDescription, + language: feed.topStoriesNavigations.find((item) => item.namedUrl.startsWith(`/${lang}/`))?.localeLang ?? lang, + item: items, + }; +} diff --git a/lib/routes/dw/rss.ts b/lib/routes/dw/rss.ts new file mode 100644 index 000000000000000..835f267a653fe75 --- /dev/null +++ b/lib/routes/dw/rss.ts @@ -0,0 +1,62 @@ +import { Route } from '@/types'; +import { config } from '@/config'; +import Parser from 'rss-parser'; +import { processItems } from './utils'; + +export const route: Route = { + path: '/rss/:channel?', + categories: ['traditional-media'], + example: '/dw/rss/rss-en-all', + parameters: { + category: 'RSS Feed Channel, see below, `rss-en-all` by default', + }, + features: { + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + requireConfig: false, + }, + name: 'RSS', + maintainers: ['quiniapiezoelectricity'], + 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 +`, +}; + +async function handler(ctx) { + const category = ctx.req.param('channel') ?? 'rss-en-all'; + + const parser = new Parser({ + customFields: { + item: ['dwsyn:contentID'], + }, + headers: { + 'User-Agent': config.ua, + }, + }); + + const feed = await parser.parseURL(`https://rss.dw.com/rdf/${category}`); + const items = await processItems( + feed.items.map((item) => { + item.id = item['dwsyn:contentID']; + item.pubDate = item.isoDate; + item.description = item.content; + 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 + return item; + }) + ); + + return { + title: feed.title, + link: feed.link, + description: feed.description, + item: items, + }; +} diff --git a/lib/routes/dw/templates/description.art b/lib/routes/dw/templates/description.art new file mode 100644 index 000000000000000..bc96a9c68a971f0 --- /dev/null +++ b/lib/routes/dw/templates/description.art @@ -0,0 +1,23 @@ +{{ if teaser }} + <blockquote><p><em>{{ teaser }}</em></p></blockquote> +{{ /if }} +{{ if video }} + {{@ video }} +{{ else if mainImage }} + <figure> + <img + src="https://static.dw.com/image/{{ mainImage.targetId }}_{{ formatId }}.jpg" + alt="{{ mainImage.additionalInformation }}" + > + <figcaption> + {{ mainImage.description }} + <small>{{ imageI18n }}: {{ mainImage.target.licenserSupplement }}</small> + </figcaption> + </figure> +{{ /if }} +{{ if text }} + {{@ text }} +{{ /if }} +{{ if liveblog }} + {{@ liveblog }} +{{ /if }} \ No newline at end of file diff --git a/lib/routes/dw/templates/liveblog.art b/lib/routes/dw/templates/liveblog.art new file mode 100644 index 000000000000000..d133a1ed31b59f8 --- /dev/null +++ b/lib/routes/dw/templates/liveblog.art @@ -0,0 +1,13 @@ +{{ if posts }} +{{ each posts }} + <hr> + {{ if $value.localizedContentDate }}<p><i>{{ $value.localizedContentDate }}</i></p>{{ /if }} + {{ if $value.title }}<h2>{{ $value.title }}</h2>{{ /if }} + {{ if $value.persons }} + {{ each $value.persons }} + <p><i>{{ $value.fullName }}</i></p> + {{ /each }} + {{ /if }} + {{ if $value.text }}{{@ $value.text }}{{ /if }} +{{ /each }} +{{ /if }} \ No newline at end of file diff --git a/lib/routes/dw/templates/video.art b/lib/routes/dw/templates/video.art new file mode 100644 index 000000000000000..7a6060404e910e3 --- /dev/null +++ b/lib/routes/dw/templates/video.art @@ -0,0 +1,14 @@ +{{ if hlsVideoSrc }} +<video +{{ if posterImageUrl }} poster="{{ posterImageUrl }}" {{ /if }} +controls preload="metadata"> + <source + src="{{ hlsVideoSrc }}" + type="application/x-mpegURL" + > + <source + src="{{ mp4VideoSrc }}" + type="video/mp4" + > +</video> +{{ /if }} diff --git a/lib/routes/dw/utils.ts b/lib/routes/dw/utils.ts new file mode 100644 index 000000000000000..47637ef1e75d1b1 --- /dev/null +++ b/lib/routes/dw/utils.ts @@ -0,0 +1,171 @@ +import cache from '@/utils/cache'; +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) => { + switch (word) { + case 'Image': + switch (lang) { + case 'sq': + return 'Fotografi'; + case 'am': + return 'ምስል'; + case 'ar': + return 'صورة من'; + case 'bn': + return 'ছবি'; + case 'bs': + return 'Foto'; + case 'bg': + return 'Снимка'; + case 'zh': + return '图像来源'; + case 'zh-hant': + return '圖片來源'; + case 'hr': + return 'Foto'; + case 'fa-af': + return 'عکس'; + case 'en': + return 'Image'; + case 'fr': + return 'Image'; + case 'de': + return 'Bild'; + case 'el': + return 'Εικόνα'; + case 'ha': + return 'Hoto'; + case 'hi': + return 'तस्वीर'; + case 'id': + return 'Foto'; + case 'sw': + return 'Picha'; + case 'mk': + return 'Фотографија'; + case 'ps': + return 'انځور'; + case 'fa-ir': + return 'عکس'; + case 'pl': + return 'Zdjęcie'; + case 'pt-002': + return 'Foto'; + case 'pt-br': + return 'Foto'; + case 'ro': + return 'Imagine'; + case 'ru': + return 'Фото'; + case 'sr': + return 'Foto'; + case 'es': + return 'Imagen'; + case 'tr': + return 'Fotoğraf'; + case 'uk': + return 'Фото'; + case 'ur': + return 'تصویر'; + default: + return 'Image'; + } + default: + return word; + } +}; + +const m3u8tomp4 = (src: string) => src.replace('https://hlsvod.dw.com/i/', 'https://tvdownloaddw-a.akamaihd.net/').replace(',AVC_480x270,AVC_512x288,AVC_640x360,AVC_960x540,AVC_1280x720,AVC_1920x1080,.mp4.csmil/master.m3u8', 'AVC_1920x1080.mp4'); + +const processHtml = ($: CheerioAPI, contentLinks) => { + $('img').each((_, elem) => { + try { + const id = $(elem).attr('data-id'); + const contentLink = contentLinks.find((item) => String(item.targetId) === id); + $(elem).attr({ + title: contentLink?.name, + alt: contentLink?.description, + src: `https://static.dw.com/image/${id}_${formatId}.jpg`, + }); + $(elem).removeAttr('style'); + } catch { + // no-empty + } + }); + $('video').each((_, elem) => { + try { + $(elem).attr('poster', $(elem).attr('data-posterurl')); + } catch { + // no-empty + } + }); + $('iframe').each((_, elem) => { + try { + $(elem).attr('src', $(elem).attr('data-src')); + } catch { + // no-empty + } + }); + $('svg').remove(); // svg will screw up in a lot of rss readers +}; + +const processContent = (item, content) => { + const $text = load(content.text); + processHtml($text, content.contentLinks); + const liveblog = + item.type === 'liveblog' && content.posts + ? art(path.join(__dirname, 'templates/liveblog.art'), { + posts: content.posts.map((post) => { + const $post = load(post.text); + processHtml($post, content.contentLinks); + post.text = $post.html(); + return post; + }), + }) + : undefined; + const video = + item.type === 'video' && content.hlsVideoSrc + ? art(path.join(__dirname, 'templates/video.art'), { + hlsVideoSrc: content.hlsVideoSrc, + mp4VideoSrc: m3u8tomp4(content.hlsVideoSrc), + posterImageUrl: content.posterImageUrl, + }) + : undefined; + item.description = art(path.join(__dirname, 'templates/description.art'), { + teaser: content.teaser, + video, + mainImage: $text(`[data-id="${content.mainContentImageLink?.targetId}"]`).length === 0 ? content.mainContentImageLink : undefined, + // occasionally the text html already includes the main image, testing to see if an image with the same id exists + text: $text.html(), + liveblog, + imageI18n: i18n('Image', item.language), + formatId, + }); + if (content.trackingCategories) { + item.category = content.trackingCategories; + } + if (content.firstPersonArray) { + item.author = content.firstPersonArray.map((person) => person.fullName).join(', '); + } + return item; +}; + +export const processItems = async (items) => { + items = await Promise.all( + items.map((item) => + cache.tryGet(item.link, async () => { + const response = await got(`https://www.dw.com/graph-api/${item.language}/content/${item.type}/${item.id}`); + const content = response.data.data.content; + return processContent(item, content); + }) + ) + ); + return items; +}; From af7e399cff3e13eaa973cf0aa946e101782d2e23 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 19:05:48 +0000 Subject: [PATCH 519/740] style: auto format --- lib/routes/dw/news.ts | 4 +--- lib/routes/dw/utils.ts | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/routes/dw/news.ts b/lib/routes/dw/news.ts index e9391b0d7058f5a..aea7130d677d047 100644 --- a/lib/routes/dw/news.ts +++ b/lib/routes/dw/news.ts @@ -67,9 +67,7 @@ async function handler(ctx) { const feed = response.data.data.content; cache.set('dw:navigation', feed.topStoriesNavigations, config.cache.routeExpire); - const list = feed.contentComposition.informationSpaces - .flatMap((section) => Object.values(section).flatMap((component) => component[0]?.contents || [])) - .filter((item) => typenames.has(item.__typename) && item.id); + const list = feed.contentComposition.informationSpaces.flatMap((section) => Object.values(section).flatMap((component) => component[0]?.contents || [])).filter((item) => typenames.has(item.__typename) && item.id); const items = await processItems( list.map((item) => { item.link = new URL(item.namedUrl, 'https://www.dw.com').href; diff --git a/lib/routes/dw/utils.ts b/lib/routes/dw/utils.ts index 47637ef1e75d1b1..87514c626ed02eb 100644 --- a/lib/routes/dw/utils.ts +++ b/lib/routes/dw/utils.ts @@ -82,7 +82,8 @@ const i18n = (word: string, lang: string) => { } }; -const m3u8tomp4 = (src: string) => src.replace('https://hlsvod.dw.com/i/', 'https://tvdownloaddw-a.akamaihd.net/').replace(',AVC_480x270,AVC_512x288,AVC_640x360,AVC_960x540,AVC_1280x720,AVC_1920x1080,.mp4.csmil/master.m3u8', 'AVC_1920x1080.mp4'); +const m3u8tomp4 = (src: string) => + src.replace('https://hlsvod.dw.com/i/', 'https://tvdownloaddw-a.akamaihd.net/').replace(',AVC_480x270,AVC_512x288,AVC_640x360,AVC_960x540,AVC_1280x720,AVC_1920x1080,.mp4.csmil/master.m3u8', 'AVC_1920x1080.mp4'); const processHtml = ($: CheerioAPI, contentLinks) => { $('img').each((_, elem) => { From b05cb70dbd32b49287c46019709249c839122fac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 21:49:03 +0000 Subject: [PATCH 520/740] chore(deps): bump @eslint/plugin-kit from 0.2.2 to 0.2.3 (#17599) Bumps [@eslint/plugin-kit](https://github.com/eslint/rewrite) from 0.2.2 to 0.2.3. - [Release notes](https://github.com/eslint/rewrite/releases) - [Changelog](https://github.com/eslint/rewrite/blob/main/release-please-config.json) - [Commits](https://github.com/eslint/rewrite/compare/plugin-kit-v0.2.2...plugin-kit-v0.2.3) --- updated-dependencies: - dependency-name: "@eslint/plugin-kit" dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 10ce1ddc32874e8..078a33d0a9b1f7e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1344,8 +1344,8 @@ packages: resolution: {integrity: sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/plugin-kit@0.2.2': - resolution: {integrity: sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==} + '@eslint/plugin-kit@0.2.3': + resolution: {integrity: sha512-2b/g5hRmpbb1o4GnTZax9N9m0FXzz9OV42ZzI4rDDMDuHUqigAiQCEWChBWCY4ztAGVRjoWT19v0yMmc5/L5kA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@hono/node-server@1.13.7': @@ -6847,7 +6847,7 @@ snapshots: '@eslint/object-schema@2.1.4': {} - '@eslint/plugin-kit@0.2.2': + '@eslint/plugin-kit@0.2.3': dependencies: levn: 0.4.1 @@ -8777,7 +8777,7 @@ snapshots: '@eslint/core': 0.7.0 '@eslint/eslintrc': 3.1.0 '@eslint/js': 9.14.0 - '@eslint/plugin-kit': 0.2.2 + '@eslint/plugin-kit': 0.2.3 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.0 From 97cdb212b650f6128c23ff45273212ecc596893f Mon Sep 17 00:00:00 2001 From: Kyle-You <165610721+Kyle-You@users.noreply.github.com> Date: Sun, 17 Nov 2024 15:11:51 +0800 Subject: [PATCH 521/740] feat(route): add scu jwc notice (#17014) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 添加SCU教务处通知公告路由 * 空提交 * feat(route): cache tzgg * Update lib/routes/scu/jwc/tzgg.ts --- lib/routes/scu/jwc/tzgg.ts | 71 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 lib/routes/scu/jwc/tzgg.ts diff --git a/lib/routes/scu/jwc/tzgg.ts b/lib/routes/scu/jwc/tzgg.ts new file mode 100644 index 000000000000000..0f4d1bda591dc59 --- /dev/null +++ b/lib/routes/scu/jwc/tzgg.ts @@ -0,0 +1,71 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; // 可以使用类似 jQuery 的 API HTML 解析器 + +const baseUrl = 'https://jwc.scu.edu.cn/tzgg.htm'; +const baseIndexUrl = 'https://jwc.scu.edu.cn/'; + +export const route: Route = { + path: '/jwc', + categories: ['university'], + example: '/scu/jwc', + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['jwc.scu.edu.cn'], + target: '/jwc', + }, + ], + name: '教务处通知公告', + maintainers: ['Kyle-You'], + handler, +}; + +async function handler() { + const { data: response } = await got.get(baseUrl); + const $ = load(response); + + const links: string[] = $('.tz-list ul li a') + .toArray() + .map((item) => { + item = $(item); + const link: string = item.attr('href'); + return link.startsWith('http') ? link : baseIndexUrl + link; + }); + + const items = await Promise.all( + links.map((link) => + cache.tryGet(link, async () => { + const { data: info } = await got.get(link); + const $ = load(info); + + // 获取head里的meta标签 + const title = $('head meta[name="ArticleTitle"]').attr('content') ?? ''; + const pubDate = parseDate($('head meta[name="PubDate"]').attr('content') ?? ''); + const description = $('.v_news_content').html(); + return { + title, + link, + pubDate, + description, + }; + }) + ) + ); + + return { + title: '四川大学教务处', + link: baseIndexUrl, + description: '四川大学教务处通知公告', + item: items, + }; +} From 34053adf695c597f1acaf05a9b7490015dfde325 Mon Sep 17 00:00:00 2001 From: Kyle-You <165610721+Kyle-You@users.noreply.github.com> Date: Sun, 17 Nov 2024 17:28:02 +0800 Subject: [PATCH 522/740] feat: add icon for /scu/jwc (#17603) --- lib/routes/scu/jwc/tzgg.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/routes/scu/jwc/tzgg.ts b/lib/routes/scu/jwc/tzgg.ts index 0f4d1bda591dc59..dcc7383e3dc7f20 100644 --- a/lib/routes/scu/jwc/tzgg.ts +++ b/lib/routes/scu/jwc/tzgg.ts @@ -67,5 +67,9 @@ async function handler() { link: baseIndexUrl, description: '四川大学教务处通知公告', item: items, + language: 'zh-cn', + image: 'https://www.scu.edu.cn/__local/B/67/25/DFAF986CCD6529E52D7830F180D_C37C7DEE_4340.png', + logo: 'https://www.scu.edu.cn/__local/B/67/25/DFAF986CCD6529E52D7830F180D_C37C7DEE_4340.png', + icon: 'https://www.scu.edu.cn/__local/B/67/25/DFAF986CCD6529E52D7830F180D_C37C7DEE_4340.png', }; } From ae98fe1d519bbf883c2acb0113b1df7b77aa5552 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:08:56 +0800 Subject: [PATCH 523/740] docs: update maintainer github id #4083 --- lib/routes/linkresearcher/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/linkresearcher/index.ts b/lib/routes/linkresearcher/index.ts index 567144f5eeae457..2f28096de2bad4f 100644 --- a/lib/routes/linkresearcher/index.ts +++ b/lib/routes/linkresearcher/index.ts @@ -8,7 +8,7 @@ const baseURL = 'https://www.linkresearcher.com'; export const route: Route = { path: '/:params', name: 'Unknown', - maintainers: ['yech1990'], + maintainers: ['y9c'], handler, }; From ffcc02590f84da6b3ca780d54766b3421945a32f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 08:12:59 +0000 Subject: [PATCH 524/740] chore(deps): bump @hono/zod-openapi from 0.17.0 to 0.17.1 (#17614) Bumps [@hono/zod-openapi](https://github.com/honojs/middleware) from 0.17.0 to 0.17.1. - [Release notes](https://github.com/honojs/middleware/releases) - [Commits](https://github.com/honojs/middleware/compare/@hono/zod-openapi@0.17.0...@hono/zod-openapi@0.17.1) --- updated-dependencies: - dependency-name: "@hono/zod-openapi" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 bdcbec8541b5b87..6fc3d9013681a73 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@bbob/html": "4.1.1", "@bbob/preset-html5": "4.1.1", "@hono/node-server": "1.13.7", - "@hono/zod-openapi": "0.17.0", + "@hono/zod-openapi": "0.17.1", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.54.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 078a33d0a9b1f7e..9a1d180cef71db6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,8 +21,8 @@ importers: specifier: 1.13.7 version: 1.13.7(hono@4.6.10) '@hono/zod-openapi': - specifier: 0.17.0 - version: 0.17.0(hono@4.6.10)(zod@3.23.8) + specifier: 0.17.1 + version: 0.17.1(hono@4.6.10)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -1354,8 +1354,8 @@ packages: peerDependencies: hono: ^4 - '@hono/zod-openapi@0.17.0': - resolution: {integrity: sha512-Ed6U/6cbCOBQYl0N3E94Q9UKAT5eg+x1RtShGU9OERH9ZM/SYMSLk2Biu8Eba2myu7MuzDsne9rVLrUpno1GnA==} + '@hono/zod-openapi@0.17.1': + resolution: {integrity: sha512-5atEdv7bf92mhxuBVR8LHM4WfaB1jchW+p/f4P/asgWDDmeHcwM8rsBhbbk622MXbUTuAwpsyrJ7u3qnXbjCsQ==} engines: {node: '>=16.0.0'} peerDependencies: hono: '>=4.3.6' @@ -6855,7 +6855,7 @@ snapshots: dependencies: hono: 4.6.10 - '@hono/zod-openapi@0.17.0(hono@4.6.10)(zod@3.23.8)': + '@hono/zod-openapi@0.17.1(hono@4.6.10)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) '@hono/zod-validator': 0.3.0(hono@4.6.10)(zod@3.23.8) From 94e3173d19fb3ec594ac5353886145da4f171691 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 08:13:21 +0000 Subject: [PATCH 525/740] chore(deps): bump proxy-chain from 2.5.4 to 2.5.5 (#17616) Bumps [proxy-chain](https://github.com/apify/proxy-chain) from 2.5.4 to 2.5.5. - [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.4...v2.5.5) --- updated-dependencies: - dependency-name: proxy-chain dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 6fc3d9013681a73..f5d854f663b9fb7 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "ofetch": "1.4.1", "otplib": "12.0.1", "pac-proxy-agent": "7.0.2", - "proxy-chain": "2.5.4", + "proxy-chain": "2.5.5", "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 9a1d180cef71db6..c9cae0b7a015863 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -180,8 +180,8 @@ importers: specifier: 7.0.2 version: 7.0.2 proxy-chain: - specifier: 2.5.4 - version: 2.5.4 + specifier: 2.5.5 + version: 2.5.5 puppeteer: specifier: 22.6.2 version: 22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) @@ -4667,8 +4667,8 @@ packages: resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==} engines: {node: '>= 14'} - proxy-chain@2.5.4: - resolution: {integrity: sha512-Tsdqbo3fyteHO3dHtxcBE6uKlhg4sO2qtDxmiM805l3O08R6zRbGTeIDbW1ksSv/n4xPQ3B0YiK+KZ2D9YIfBA==} + proxy-chain@2.5.5: + resolution: {integrity: sha512-CPZEmY9FKU3veQQbsrimaXUu5d/FXLfkQj0tCJ8DSJpzQYeDlISbTaf70bjcBQWlXR1FDBOtpFOuB66js+Ik7g==} engines: {node: '>=14'} proxy-from-env@1.1.0: @@ -10642,7 +10642,7 @@ snapshots: transitivePeerDependencies: - supports-color - proxy-chain@2.5.4: + proxy-chain@2.5.5: dependencies: socks: 2.8.3 socks-proxy-agent: 8.0.4 From 1705caa1a860a17992aca4a280ad128ae3d63134 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 08:16:49 +0000 Subject: [PATCH 526/740] chore(deps-dev): bump @eslint/eslintrc from 3.1.0 to 3.2.0 (#17612) Bumps [@eslint/eslintrc](https://github.com/eslint/eslintrc) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/eslint/eslintrc/releases) - [Changelog](https://github.com/eslint/eslintrc/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslintrc/compare/v3.1.0...v3.2.0) --- updated-dependencies: - dependency-name: "@eslint/eslintrc" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 f5d854f663b9fb7..719b06b932586e3 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "@babel/preset-env": "7.26.0", "@babel/preset-typescript": "7.26.0", "@bbob/types": "4.1.1", - "@eslint/eslintrc": "3.1.0", + "@eslint/eslintrc": "3.2.0", "@eslint/js": "9.14.0", "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "2.10.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c9cae0b7a015863..bf10fba2d5c5872 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -277,8 +277,8 @@ importers: specifier: 4.1.1 version: 4.1.1 '@eslint/eslintrc': - specifier: 3.1.0 - version: 3.1.0 + specifier: 3.2.0 + version: 3.2.0 '@eslint/js': specifier: 9.14.0 version: 9.14.0 @@ -1328,8 +1328,8 @@ packages: resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/eslintrc@3.1.0': - resolution: {integrity: sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==} + '@eslint/eslintrc@3.2.0': + resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/js@8.57.1': @@ -6827,7 +6827,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/eslintrc@3.1.0': + '@eslint/eslintrc@3.2.0': dependencies: ajv: 6.12.6 debug: 4.3.7 @@ -8775,7 +8775,7 @@ snapshots: '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.18.0 '@eslint/core': 0.7.0 - '@eslint/eslintrc': 3.1.0 + '@eslint/eslintrc': 3.2.0 '@eslint/js': 9.14.0 '@eslint/plugin-kit': 0.2.3 '@humanfs/node': 0.16.6 From 25c00b86e7d953a81eaec7852678387544e4b541 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 00:51:47 -0800 Subject: [PATCH 527/740] chore(deps-dev): bump @eslint/js from 9.14.0 to 9.15.0 (#17613) Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.14.0 to 9.15.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.15.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 719b06b932586e3..0cc6770a5210c90 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "@babel/preset-typescript": "7.26.0", "@bbob/types": "4.1.1", "@eslint/eslintrc": "3.2.0", - "@eslint/js": "9.14.0", + "@eslint/js": "9.15.0", "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "2.10.1", "@types/aes-js": "3.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bf10fba2d5c5872..8469a005ab9a22f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -280,8 +280,8 @@ importers: specifier: 3.2.0 version: 3.2.0 '@eslint/js': - specifier: 9.14.0 - version: 9.14.0 + specifier: 9.15.0 + version: 9.15.0 '@microsoft/eslint-formatter-sarif': specifier: 3.1.0 version: 3.1.0 @@ -1340,6 +1340,10 @@ packages: resolution: {integrity: sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.15.0': + resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} + 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} @@ -6845,6 +6849,8 @@ snapshots: '@eslint/js@9.14.0': {} + '@eslint/js@9.15.0': {} + '@eslint/object-schema@2.1.4': {} '@eslint/plugin-kit@0.2.3': From f6a6627f8d8231455bf0cf43889e57a38e51be2a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 01:22:26 -0800 Subject: [PATCH 528/740] chore(deps-dev): bump eslint from 9.14.0 to 9.15.0 (#17615) Bumps [eslint](https://github.com/eslint/eslint) from 9.14.0 to 9.15.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.14.0...v9.15.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 167 +++++++++++++++++++++++++------------------------ 2 files changed, 86 insertions(+), 83 deletions(-) diff --git a/package.json b/package.json index 0cc6770a5210c90..0b1f5309a6c9fc5 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.105", - "eslint": "9.14.0", + "eslint": "9.15.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8469a005ab9a22f..329c3c1075e58c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -287,7 +287,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 2.10.1 - version: 2.10.1(eslint@9.14.0)(typescript@5.6.3) + version: 2.10.1(eslint@9.15.0)(typescript@5.6.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -356,10 +356,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.14.0 - version: 8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) + version: 8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.14.0 - version: 8.14.0(eslint@9.14.0)(typescript@5.6.3) + version: 8.14.0(eslint@9.15.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.6 version: 0.27.6 @@ -370,26 +370,26 @@ importers: specifier: 0.37.105 version: 0.37.105 eslint: - specifier: 9.14.0 - version: 9.14.0 + specifier: 9.15.0 + version: 9.15.0 eslint-config-prettier: specifier: 9.1.0 - version: 9.1.0(eslint@9.14.0) + version: 9.1.0(eslint@9.15.0) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.14.0) + version: 8.1.0(eslint@9.15.0) eslint-plugin-n: specifier: 17.13.2 - version: 17.13.2(eslint@9.14.0) + version: 17.13.2(eslint@9.15.0) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.3.3) eslint-plugin-unicorn: specifier: 56.0.0 - version: 56.0.0(eslint@9.14.0) + version: 56.0.0(eslint@9.15.0) eslint-plugin-yml: specifier: 1.15.0 - version: 1.15.0(eslint@9.14.0) + version: 1.15.0(eslint@9.15.0) fs-extra: specifier: 11.2.0 version: 11.2.0 @@ -1316,12 +1316,12 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.18.0': - resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} + '@eslint/config-array@0.19.0': + resolution: {integrity: sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.7.0': - resolution: {integrity: sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==} + '@eslint/core@0.9.0': + resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@2.1.4': @@ -1336,10 +1336,6 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.14.0': - resolution: {integrity: sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.15.0': resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1396,8 +1392,8 @@ packages: resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} - '@humanwhocodes/retry@0.4.0': - resolution: {integrity: sha512-xnRgu9DxZbkWak/te3fcytNyp8MTbuiZIaueg2rgEvBuN55n04nwLYLU9TX/VVlusc9L2ZNXi99nUFNkHXtr5g==} + '@humanwhocodes/retry@0.4.1': + resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} engines: {node: '>=18.18'} '@ianvs/eslint-stats@2.0.0': @@ -2610,6 +2606,10 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + cross-spawn@7.0.5: + resolution: {integrity: sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==} + engines: {node: '>= 8'} + crypto-js@4.2.0: resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} @@ -3049,8 +3049,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.14.0: - resolution: {integrity: sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==} + eslint@9.15.0: + resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -6800,14 +6800,14 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.1(eslint@9.14.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0)': dependencies: - eslint: 9.14.0 + eslint: 9.15.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.18.0': + '@eslint/config-array@0.19.0': dependencies: '@eslint/object-schema': 2.1.4 debug: 4.3.7 @@ -6815,7 +6815,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/core@0.7.0': {} + '@eslint/core@0.9.0': {} '@eslint/eslintrc@2.1.4': dependencies: @@ -6847,8 +6847,6 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.14.0': {} - '@eslint/js@9.15.0': {} '@eslint/object-schema@2.1.4': {} @@ -6894,7 +6892,7 @@ snapshots: '@humanwhocodes/retry@0.3.1': {} - '@humanwhocodes/retry@0.4.0': {} + '@humanwhocodes/retry@0.4.1': {} '@ianvs/eslint-stats@2.0.0': dependencies: @@ -7336,10 +7334,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.10.1(eslint@9.14.0)(typescript@5.6.3)': + '@stylistic/eslint-plugin@2.10.1(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) - eslint: 9.14.0 + '@typescript-eslint/utils': 8.12.2(eslint@9.15.0)(typescript@5.6.3) + eslint: 9.15.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -7508,15 +7506,15 @@ snapshots: '@types/node': 22.9.0 optional: true - '@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.14.0(eslint@9.15.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.14.0 - '@typescript-eslint/type-utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.14.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.14.0(eslint@9.15.0)(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.14.0 - eslint: 9.14.0 + eslint: 9.15.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -7526,14 +7524,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.14.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 8.14.0 '@typescript-eslint/types': 8.14.0 '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.14.0 debug: 4.3.7 - eslint: 9.14.0 + eslint: 9.15.0 optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -7549,10 +7547,10 @@ snapshots: '@typescript-eslint/types': 8.14.0 '@typescript-eslint/visitor-keys': 8.14.0 - '@typescript-eslint/type-utils@8.14.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.14.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.14.0(eslint@9.15.0)(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: @@ -7595,24 +7593,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.12.2(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.12.2(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) '@typescript-eslint/scope-manager': 8.12.2 '@typescript-eslint/types': 8.12.2 '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) - eslint: 9.14.0 + eslint: 9.15.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.14.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.14.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) '@typescript-eslint/scope-manager': 8.14.0 '@typescript-eslint/types': 8.14.0 '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) - eslint: 9.14.0 + eslint: 9.15.0 transitivePeerDependencies: - supports-color - typescript @@ -8256,6 +8254,12 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + cross-spawn@7.0.5: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + crypto-js@4.2.0: {} css-select@1.2.0: @@ -8620,18 +8624,18 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.14.0): + eslint-compat-utils@0.5.1(eslint@9.15.0): dependencies: - eslint: 9.14.0 + eslint: 9.15.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.14.0): + eslint-config-prettier@9.1.0(eslint@9.15.0): dependencies: - eslint: 9.14.0 + eslint: 9.15.0 - eslint-filtered-fix@0.3.0(eslint@9.14.0): + eslint-filtered-fix@0.3.0(eslint@9.15.0): dependencies: - eslint: 9.14.0 + eslint: 9.15.0 optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -8642,54 +8646,54 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.14.0): + eslint-nibble@8.1.0(eslint@9.15.0): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.14.0 - eslint-filtered-fix: 0.3.0(eslint@9.14.0) + eslint: 9.15.0 + eslint-filtered-fix: 0.3.0(eslint@9.15.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.14.0): + eslint-plugin-es-x@7.8.0(eslint@9.15.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) '@eslint-community/regexpp': 4.12.1 - eslint: 9.14.0 - eslint-compat-utils: 0.5.1(eslint@9.14.0) + eslint: 9.15.0 + eslint-compat-utils: 0.5.1(eslint@9.15.0) - eslint-plugin-n@17.13.2(eslint@9.14.0): + eslint-plugin-n@17.13.2(eslint@9.15.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) enhanced-resolve: 5.17.1 - eslint: 9.14.0 - eslint-plugin-es-x: 7.8.0(eslint@9.14.0) + eslint: 9.15.0 + eslint-plugin-es-x: 7.8.0(eslint@9.15.0) get-tsconfig: 4.8.1 globals: 15.12.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.3.3): dependencies: - eslint: 9.14.0 + eslint: 9.15.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 9.1.0(eslint@9.14.0) + eslint-config-prettier: 9.1.0(eslint@9.15.0) - eslint-plugin-unicorn@56.0.0(eslint@9.14.0): + eslint-plugin-unicorn@56.0.0(eslint@9.15.0): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.39.0 - eslint: 9.14.0 + eslint: 9.15.0 esquery: 1.6.0 globals: 15.12.0 indent-string: 4.0.0 @@ -8702,11 +8706,11 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-yml@1.15.0(eslint@9.14.0): + eslint-plugin-yml@1.15.0(eslint@9.15.0): dependencies: debug: 4.3.7 - eslint: 9.14.0 - eslint-compat-utils: 0.5.1(eslint@9.14.0) + eslint: 9.15.0 + eslint-compat-utils: 0.5.1(eslint@9.15.0) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.3 @@ -8775,23 +8779,23 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.14.0: + eslint@9.15.0: dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.18.0 - '@eslint/core': 0.7.0 + '@eslint/config-array': 0.19.0 + '@eslint/core': 0.9.0 '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.14.0 + '@eslint/js': 9.15.0 '@eslint/plugin-kit': 0.2.3 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.0 + '@humanwhocodes/retry': 0.4.1 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.3 + cross-spawn: 7.0.5 debug: 4.3.7 escape-string-regexp: 4.0.0 eslint-scope: 8.2.0 @@ -8811,7 +8815,6 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 - text-table: 0.2.0 transitivePeerDependencies: - supports-color From 437e7ca30b8acfbda9bb01e1c4c8cc0b402f0093 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Mon, 18 Nov 2024 18:37:39 +0800 Subject: [PATCH 529/740] revert: "chore(deps-dev): bump eslint from 9.14.0 to 9.15.0 (#17615)" This reverts commit f6a6627f8d8231455bf0cf43889e57a38e51be2a. --- package.json | 2 +- pnpm-lock.yaml | 167 ++++++++++++++++++++++++------------------------- 2 files changed, 83 insertions(+), 86 deletions(-) diff --git a/package.json b/package.json index 0b1f5309a6c9fc5..0cc6770a5210c90 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.105", - "eslint": "9.15.0", + "eslint": "9.14.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 329c3c1075e58c3..8469a005ab9a22f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -287,7 +287,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 2.10.1 - version: 2.10.1(eslint@9.15.0)(typescript@5.6.3) + version: 2.10.1(eslint@9.14.0)(typescript@5.6.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -356,10 +356,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.14.0 - version: 8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3) + version: 8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.14.0 - version: 8.14.0(eslint@9.15.0)(typescript@5.6.3) + version: 8.14.0(eslint@9.14.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.6 version: 0.27.6 @@ -370,26 +370,26 @@ importers: specifier: 0.37.105 version: 0.37.105 eslint: - specifier: 9.15.0 - version: 9.15.0 + specifier: 9.14.0 + version: 9.14.0 eslint-config-prettier: specifier: 9.1.0 - version: 9.1.0(eslint@9.15.0) + version: 9.1.0(eslint@9.14.0) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.15.0) + version: 8.1.0(eslint@9.14.0) eslint-plugin-n: specifier: 17.13.2 - version: 17.13.2(eslint@9.15.0) + version: 17.13.2(eslint@9.14.0) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3) eslint-plugin-unicorn: specifier: 56.0.0 - version: 56.0.0(eslint@9.15.0) + version: 56.0.0(eslint@9.14.0) eslint-plugin-yml: specifier: 1.15.0 - version: 1.15.0(eslint@9.15.0) + version: 1.15.0(eslint@9.14.0) fs-extra: specifier: 11.2.0 version: 11.2.0 @@ -1316,12 +1316,12 @@ 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.18.0': + resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.9.0': - resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} + '@eslint/core@0.7.0': + resolution: {integrity: sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@2.1.4': @@ -1336,6 +1336,10 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + '@eslint/js@9.14.0': + resolution: {integrity: sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.15.0': resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1392,8 +1396,8 @@ packages: resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} - '@humanwhocodes/retry@0.4.1': - resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} + '@humanwhocodes/retry@0.4.0': + resolution: {integrity: sha512-xnRgu9DxZbkWak/te3fcytNyp8MTbuiZIaueg2rgEvBuN55n04nwLYLU9TX/VVlusc9L2ZNXi99nUFNkHXtr5g==} engines: {node: '>=18.18'} '@ianvs/eslint-stats@2.0.0': @@ -2606,10 +2610,6 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} - cross-spawn@7.0.5: - resolution: {integrity: sha512-ZVJrKKYunU38/76t0RMOulHOnUcbU9GbpWKAOZ0mhjr7CX6FVrH+4FrAapSOekrgFQ3f/8gwMEuIft0aKq6Hug==} - engines: {node: '>= 8'} - crypto-js@4.2.0: resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} @@ -3049,8 +3049,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.15.0: - resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} + eslint@9.14.0: + resolution: {integrity: sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -6800,14 +6800,14 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.14.0)': dependencies: - eslint: 9.15.0 + eslint: 9.14.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.19.0': + '@eslint/config-array@0.18.0': dependencies: '@eslint/object-schema': 2.1.4 debug: 4.3.7 @@ -6815,7 +6815,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/core@0.9.0': {} + '@eslint/core@0.7.0': {} '@eslint/eslintrc@2.1.4': dependencies: @@ -6847,6 +6847,8 @@ snapshots: '@eslint/js@8.57.1': {} + '@eslint/js@9.14.0': {} + '@eslint/js@9.15.0': {} '@eslint/object-schema@2.1.4': {} @@ -6892,7 +6894,7 @@ snapshots: '@humanwhocodes/retry@0.3.1': {} - '@humanwhocodes/retry@0.4.1': {} + '@humanwhocodes/retry@0.4.0': {} '@ianvs/eslint-stats@2.0.0': dependencies: @@ -7334,10 +7336,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.10.1(eslint@9.15.0)(typescript@5.6.3)': + '@stylistic/eslint-plugin@2.10.1(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.12.2(eslint@9.15.0)(typescript@5.6.3) - eslint: 9.15.0 + '@typescript-eslint/utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) + eslint: 9.14.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -7506,15 +7508,15 @@ snapshots: '@types/node': 22.9.0 optional: true - '@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.14.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.14.0(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.14.0 - '@typescript-eslint/type-utils': 8.14.0(eslint@9.15.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.14.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.14.0 - eslint: 9.15.0 + eslint: 9.14.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -7524,14 +7526,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.14.0(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 8.14.0 '@typescript-eslint/types': 8.14.0 '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.14.0 debug: 4.3.7 - eslint: 9.15.0 + eslint: 9.14.0 optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -7547,10 +7549,10 @@ snapshots: '@typescript-eslint/types': 8.14.0 '@typescript-eslint/visitor-keys': 8.14.0 - '@typescript-eslint/type-utils@8.14.0(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.14.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.14.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) debug: 4.3.7 ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: @@ -7593,24 +7595,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.12.2(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.12.2(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) '@typescript-eslint/scope-manager': 8.12.2 '@typescript-eslint/types': 8.12.2 '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) - eslint: 9.15.0 + eslint: 9.14.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.14.0(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.14.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) '@typescript-eslint/scope-manager': 8.14.0 '@typescript-eslint/types': 8.14.0 '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) - eslint: 9.15.0 + eslint: 9.14.0 transitivePeerDependencies: - supports-color - typescript @@ -8254,12 +8256,6 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - cross-spawn@7.0.5: - dependencies: - path-key: 3.1.1 - shebang-command: 2.0.0 - which: 2.0.2 - crypto-js@4.2.0: {} css-select@1.2.0: @@ -8624,18 +8620,18 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.15.0): + eslint-compat-utils@0.5.1(eslint@9.14.0): dependencies: - eslint: 9.15.0 + eslint: 9.14.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.15.0): + eslint-config-prettier@9.1.0(eslint@9.14.0): dependencies: - eslint: 9.15.0 + eslint: 9.14.0 - eslint-filtered-fix@0.3.0(eslint@9.15.0): + eslint-filtered-fix@0.3.0(eslint@9.14.0): dependencies: - eslint: 9.15.0 + eslint: 9.14.0 optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -8646,54 +8642,54 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.15.0): + eslint-nibble@8.1.0(eslint@9.14.0): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.15.0 - eslint-filtered-fix: 0.3.0(eslint@9.15.0) + eslint: 9.14.0 + eslint-filtered-fix: 0.3.0(eslint@9.14.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.15.0): + eslint-plugin-es-x@7.8.0(eslint@9.14.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) '@eslint-community/regexpp': 4.12.1 - eslint: 9.15.0 - eslint-compat-utils: 0.5.1(eslint@9.15.0) + eslint: 9.14.0 + eslint-compat-utils: 0.5.1(eslint@9.14.0) - eslint-plugin-n@17.13.2(eslint@9.15.0): + eslint-plugin-n@17.13.2(eslint@9.14.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) enhanced-resolve: 5.17.1 - eslint: 9.15.0 - eslint-plugin-es-x: 7.8.0(eslint@9.15.0) + eslint: 9.14.0 + eslint-plugin-es-x: 7.8.0(eslint@9.14.0) get-tsconfig: 4.8.1 globals: 15.12.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3): dependencies: - eslint: 9.15.0 + eslint: 9.14.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 9.1.0(eslint@9.15.0) + eslint-config-prettier: 9.1.0(eslint@9.14.0) - eslint-plugin-unicorn@56.0.0(eslint@9.15.0): + eslint-plugin-unicorn@56.0.0(eslint@9.14.0): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.39.0 - eslint: 9.15.0 + eslint: 9.14.0 esquery: 1.6.0 globals: 15.12.0 indent-string: 4.0.0 @@ -8706,11 +8702,11 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-yml@1.15.0(eslint@9.15.0): + eslint-plugin-yml@1.15.0(eslint@9.14.0): dependencies: debug: 4.3.7 - eslint: 9.15.0 - eslint-compat-utils: 0.5.1(eslint@9.15.0) + eslint: 9.14.0 + eslint-compat-utils: 0.5.1(eslint@9.14.0) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.3 @@ -8779,23 +8775,23 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.15.0: + eslint@9.14.0: dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.19.0 - '@eslint/core': 0.9.0 + '@eslint/config-array': 0.18.0 + '@eslint/core': 0.7.0 '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.15.0 + '@eslint/js': 9.14.0 '@eslint/plugin-kit': 0.2.3 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.1 + '@humanwhocodes/retry': 0.4.0 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.5 + cross-spawn: 7.0.3 debug: 4.3.7 escape-string-regexp: 4.0.0 eslint-scope: 8.2.0 @@ -8815,6 +8811,7 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 + text-table: 0.2.0 transitivePeerDependencies: - supports-color From d9ca0d09b186576a658c99a474f09e55fe0d9bfc Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:21:24 -0800 Subject: [PATCH 530/740] feat(route): patreon (#17621) * feat(route): patreon * fix: typo * fix: typo --- lib/config.ts | 6 + lib/routes/patreon/feed.ts | 126 ++++++ lib/routes/patreon/namespace.ts | 7 + lib/routes/patreon/templates/description.art | 39 ++ lib/routes/patreon/types.ts | 387 +++++++++++++++++++ 5 files changed, 565 insertions(+) create mode 100644 lib/routes/patreon/feed.ts create mode 100644 lib/routes/patreon/namespace.ts create mode 100644 lib/routes/patreon/templates/description.art create mode 100644 lib/routes/patreon/types.ts diff --git a/lib/config.ts b/lib/config.ts index 86637e3dc384734..9227906df8b1d90 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -252,6 +252,9 @@ export type Config = { notion: { key?: string; }; + patreon: { + sessionId?: string; + }; pianyuan: { cookie?: string; }; @@ -670,6 +673,9 @@ const calculateValue = () => { notion: { key: envs.NOTION_TOKEN, }, + patreon: { + sessionId: envs.PATREON_SESSION_ID, + }, pianyuan: { cookie: envs.PIANYUAN_COOKIE, }, diff --git a/lib/routes/patreon/feed.ts b/lib/routes/patreon/feed.ts new file mode 100644 index 000000000000000..1cf45c833bf823b --- /dev/null +++ b/lib/routes/patreon/feed.ts @@ -0,0 +1,126 @@ +import { Route } from '@/types'; +import { CreatorData, MediaRelation, PostData } from './types'; + +import cache from '@/utils/cache'; +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'], + example: '/patreon/straightupsisters', + parameters: { creator: 'Patreon creator id, can be found in the url' }, + features: { + requireConfig: [ + { + name: 'PATREON_SESSION_ID', + optional: true, + description: 'The value of the session_id cookie after logging in to Patreon, required to access paid posts', + }, + ], + }, + radar: [ + { + source: ['patreon.com/:creator'], + }, + ], + name: 'Home', + maintainers: ['TonyRL'], + handler, +}; + +async function handler(ctx) { + const { creator } = ctx.req.param(); + + const baseUrl = 'https://www.patreon.com'; + const link = `${baseUrl}/${creator}`; + + const creatorData = (await cache.tryGet(`patreon:creator:${creator}`, async () => { + const response = await ofetch(link); + + const $ = cheerio.load(response); + const nextData = JSON.parse($('#__NEXT_DATA__').text()); + const bootstrapEnvelope = nextData.props.pageProps.bootstrapEnvelope; + + return { + meta: bootstrapEnvelope.meta, + id: bootstrapEnvelope.pageBootstrap.campaign.data.id, + attributes: bootstrapEnvelope.pageBootstrap.campaign.data.attributes, + }; + })) as CreatorData; + + if (!creatorData.id) { + throw new Error('Creator not found'); + } + + let headers = {}; + if (config.patreon?.sessionId) { + headers = { + Cookie: `session_id=${config.patreon.sessionId}`, + }; + } + + const posts = await ofetch<PostData>('https://www.patreon.com/api/posts', { + headers, + query: { + include: + 'campaign,access_rules,access_rules.tier.null,attachments_media,audio,audio_preview.null,drop,images,media,native_video_insights,poll.choices,poll.current_user_responses.user,poll.current_user_responses.choice,poll.current_user_responses.poll,user,user_defined_tags,ti_checks,video.null,content_unlock_options.product_variant.null', + 'fields[campaign]': 'currency,show_audio_post_download_links,avatar_photo_url,avatar_photo_image_urls,earnings_visibility,is_nsfw,is_monthly,name,url', + 'fields[post]': + 'change_visibility_at,comment_count,commenter_count,content,created_at,current_user_can_comment,current_user_can_delete,current_user_can_report,current_user_can_view,current_user_comment_disallowed_reason,current_user_has_liked,embed,image,insights_last_updated_at,is_paid,like_count,meta_image_url,min_cents_pledged_to_view,monetization_ineligibility_reason,post_file,post_metadata,published_at,patreon_url,post_type,pledge_url,preview_asset_type,thumbnail,thumbnail_url,teaser_text,title,upgrade_url,url,was_posted_by_campaign_owner,has_ti_violation,moderation_status,post_level_suspension_removal_date,pls_one_liners_by_category,video,video_preview,view_count,content_unlock_options,is_new_to_current_user,watch_state', + 'fields[post_tag]': 'tag_type,value', + 'fields[user]': 'image_url,full_name,url', + 'fields[access_rule]': 'access_rule_type,amount_cents', + 'fields[media]': 'id,image_urls,display,download_url,metadata,file_name', + 'fields[native_video_insights]': 'average_view_duration,average_view_pct,has_preview,id,last_updated_at,num_views,preview_views,video_duration', + 'fields[content-unlock-option]': 'content_unlock_type', + 'fields[product-variant]': 'price_cents,currency_code,checkout_url,is_hidden,published_at_datetime,content_type,orders_count,access_metadata', + 'filter[campaign_id]': creatorData.id, + 'filter[contains_exclusive_posts]': true, + 'filter[is_draft]': false, + sort: '-published_at', + 'json-api-use-default-includes': false, + 'json-api-version': '1.0', + }, + }); + + const items = posts.data.map(({ attributes, relationships }) => { + for (const [key, value] of Object.entries(relationships)) { + if (value.data) { + relationships[key] = Array.isArray(value.data) ? value.data.map((item) => posts.included.find((i) => i.id === item.id)) : posts.included.find((i) => i.id === value.data.id); + } + } + if (attributes.video_preview) { + relationships.video_preview = posts.included.find((i) => Number.parseInt(i.id) === attributes.video_preview.media_id) as unknown as MediaRelation; + } + + return { + title: attributes.title, + description: art(path.join(__dirname, 'templates/description.art'), { + attributes, + relationships, + included: posts.included, + }), + link: attributes.url, + pubDate: parseDate(attributes.published_at), + image: attributes.thumbnail?.url ?? attributes.image.url, + category: relationships.user_defined_tags?.map((tag) => tag.attributes.value), + }; + }); + + return { + title: creatorData.meta.title, + description: creatorData.meta.desc, + link, + image: creatorData.attributes.avatar_photo_url, + item: items, + allowEmpty: true, + }; +} diff --git a/lib/routes/patreon/namespace.ts b/lib/routes/patreon/namespace.ts new file mode 100644 index 000000000000000..d6f8fece4102de5 --- /dev/null +++ b/lib/routes/patreon/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Patreon', + url: 'www.patreon.com', + lang: 'en', +}; diff --git a/lib/routes/patreon/templates/description.art b/lib/routes/patreon/templates/description.art new file mode 100644 index 000000000000000..8e69481239e88f7 --- /dev/null +++ b/lib/routes/patreon/templates/description.art @@ -0,0 +1,39 @@ +{{ if attributes.post_type === 'image_file' }} + {{ each attributes.post_metadata.image_order mediaIdStr }} + {{ set img = included.find((i) => i.id === mediaIdStr) }} + {{ if img }} + <img src="{{ img.attributes.image_urls.original }}" alt="{{ img.attributes.file_name }}"><br> + {{ /if }} + {{ /each }} + +{{ else if attributes.post_type === 'video_external_file' }} + {{ if attributes.video_preview }} + <video controls preload="metadata" poster="{{ attributes.image.url }}"> + <source src="{{ relationships.video_preview.attributes.download_url }}" type="video/mp4"> + </video><br> + {{ /if }} + +{{ else if attributes.post_type === 'audio_file' || attributes.post_type === 'podcast' }} + <img src="{{ attributes.thumbnail.url }}"><br> + {{ set url = relationships.audio.attributes.download_url || relationships.audio_preview.attributes.download_url }} + <audio controls preload="metadata"> + <source src="{{ url }}" type="audio/mpeg"> + </audio><br> + +{{ else if attributes.post_type === 'video_embed' || attributes.post_type === 'link' }} + <img src="{{ attributes.image.url }}"><br> + +{{ else }} +Post type: "{{ attributes.post_type }}" is not supported. <br> + +{{ /if }} + +{{ if attributes.content || attributes.teaser_text }} + {{@ attributes.content || attributes.teaser_text }} +{{ /if }} + +{{ if relationships.attachments_media }} + {{ each relationships.attachments_media media }} + <a href="{{ media.attributes.download_url }}">{{ media.attributes.file_name }}</a><br> + {{ /each }} +{{ /if }} diff --git a/lib/routes/patreon/types.ts b/lib/routes/patreon/types.ts new file mode 100644 index 000000000000000..bf87cc6231c315f --- /dev/null +++ b/lib/routes/patreon/types.ts @@ -0,0 +1,387 @@ +export interface CreatorData { + meta: { + desc: string; + height: null; + imageUrl: string; + isPrivate: boolean; + key: string; + openGraph: OpenGraph; + title: string; + url: string; + videoHeight: null; + videoUrl: null; + videoWidth: null; + viewport: string; + }; + id: string; + attributes: IncludedAttributes; +} + +interface OpenGraph { + desc: null; + imageUrl: null; + title: null; +} + +export interface PostData { + data: Datum[]; + included: IncludedItem[]; + links: Links; + meta: Meta; +} + +interface Datum { + attributes: Attributes; + id: string; + relationships: Relationships; + type: string; +} + +interface Attributes { + change_visibility_at: null; + comment_count: number; + commenter_count: number; + created_at: string; + current_user_can_comment: boolean; + current_user_can_delete: boolean; + current_user_can_report: boolean; + current_user_can_view: boolean; + current_user_comment_disallowed_reason: string; + has_ti_violation: boolean; + image: Image; + is_new_to_current_user: boolean; + is_paid: boolean; + like_count: number; + meta_image_url: string; + min_cents_pledged_to_view: number | null; + moderation_status: string; + patreon_url: string; + pledge_url: string; + pls_one_liners_by_category: any[]; // Items are `false`, so an empty array + post_level_suspension_removal_date: null; + post_metadata: PostMetadata; + post_type: string; + preview_asset_type: string | null; + published_at: string; + teaser_text: string | null; + title: string; + upgrade_url: string; + url: string; + video_preview: VideoPreview | null; + was_posted_by_campaign_owner: boolean; + thumbnail?: Thumbnail; + content?: string; + embed?: null; + post_file?: PostFile; +} + +interface Image { + height: number; + url: string; + width: number; + large_url?: string; + thumb_square_large_url?: string; + thumb_square_url?: string; + thumb_url?: string; +} + +interface PostMetadata { + image_order?: string[]; + platform?: object; +} + +interface VideoPreview { + closed_captions_enabled: boolean; + default_thumbnail: DefaultThumbnail; + duration: number; + expires_at: string; + full_content_duration: number; + full_duration: number; + height: number; + media_id: number; + progress: Progress; + state: string; + url: string; + video_issues: object; + width: number; +} + +interface DefaultThumbnail { + url: string; +} + +interface Progress { + is_watched: boolean; + watch_state: string; +} + +interface PostFile { + height: number; + image_colors: ImageColors; + media_id: number; + state: string; + url: string; + width: number; +} + +interface ImageColors { + average_colors_of_corners: AverageColorsOfCorners; + dominant_color: string; + palette: string[]; + text_color: string; +} + +interface AverageColorsOfCorners { + bottom_left: string; + bottom_right: string; + top_left: string; + top_right: string; +} + +interface Thumbnail { + url: string; + large?: string; + large_2?: string; + square?: string; + gif_url?: string; + height?: number; + width?: number; +} + +interface Relationships { + access_rules: AccessRules; + audio: MediaRelation; + audio_preview: MediaRelation; + campaign: CampaignRelation; + content_unlock_options: ContentUnlockOptions; + drop: Drop; + images: Images; + media: Media; + poll: Poll; + user: UserRelation; + user_defined_tags: UserDefinedTags; + video: MediaRelation; + attachments_media?: AttachmentsMedia; + // Custom relationships + video_preview?: MediaRelation; +} + +interface AccessRules { + data: AccessRuleData[]; +} + +interface AccessRuleData { + id: string; + type: string; +} + +export interface MediaRelation { + data: MediaData | null; + links?: RelatedLink; +} + +interface MediaData { + id: string; + type: string; +} + +interface CampaignRelation { + data: CampaignData; + links: RelatedLink; +} + +interface CampaignData { + id: string; + type: string; +} + +interface RelatedLink { + related: string; +} + +interface ContentUnlockOptions { + data: any[]; // Empty array +} + +interface Drop { + data: null; +} + +interface Images { + data: MediaData[]; +} + +interface Media { + data: MediaData[]; +} + +interface Poll { + data: null; +} + +interface UserRelation { + data: UserData; + links: RelatedLink; +} + +interface UserData { + id: string; + type: string; +} + +interface UserDefinedTags { + data: UserDefinedTagData[]; + attributes: IncludedAttributes; +} + +interface UserDefinedTagData { + id: string; + type: string; +} + +interface AttachmentsMedia { + data: AttachmentMediaData[]; +} + +interface AttachmentMediaData { + id: string; + type: string; +} + +interface IncludedItem { + attributes: IncludedAttributes; + id: string; + type: string; + relationships?: IncludedRelationships; +} + +interface IncludedAttributes { + // Depending on the `type`, attributes vary + // For example, if `type` is 'user', attributes include: + full_name?: string; + image_url?: string | null; + avatar_photo_image_urls?: Image; + avatar_photo_url?: string; + currency?: string; + earnings_visibility?: string; + is_monthly?: boolean; + is_nsfw?: boolean; + name?: string; + show_audio_post_download_links?: boolean; + url?: string; + // Additional properties for other types + // For 'post_tag' type + tag_type?: string; + value?: string; + // For 'display' + display?: Display; + // For 'file' + file_name?: string | null; + image_urls?: Image | null; + metadata?: Metadata; + download_url?: string; + // For 'tier' + access_rule_type?: string; + amount_cents?: number | null; + post_count?: number; + amount?: number; + created_at?: string; + declined_patron_count?: number; + description?: string; + discord_role_ids?: null; + edited_at?: string; + is_free_tier?: boolean; + patron_amount_cents?: number; + patron_currency?: string; + published?: boolean; + published_at?: string; + remaining?: null; + requires_shipping?: boolean; + title?: string; + unpublished_at?: null; +} + +interface Display { + default_thumbnail?: DefaultThumbnail & { position?: number }; + url?: string; + closed_captions_enabled?: boolean; + expires_at?: string; + height?: number; + video_issues?: VideoIssues; + width?: number; + duration?: number; + full_content_duration?: number; + media_id?: number; + progress?: Progress; + state?: string; + image_colors?: ImageColors; +} + +interface VideoIssues { + processing_warning?: { + video_bitrate?: string; + video_codec?: string; + video_resolution?: string; + }; +} + +interface Image { + thumbnail: string; + url: string; + default?: string; + default_blurred?: string; + default_blurred_small?: string; + default_small?: string; + original?: string; + thumbnail_large?: string; + thumbnail_small?: string; +} + +interface Metadata { + audio_preview_duration?: number; + audio_preview_start_time?: number; + video_preview_end_ms?: number | null; + video_preview_start_ms?: number | null; + duration?: number; + start_position?: number; + duration_s?: number; + orientation?: string; + variant?: string; + dimensions?: Dimensions; +} + +interface Dimensions { + h: number; + w: number; +} + +interface IncludedRelationships { + tier?: TierRelation; +} + +interface TierRelation { + data: TierData | null; + links?: RelatedLink; +} + +interface TierData { + id: string; + type: string; +} + +interface Links { + next: string; +} + +interface Meta { + pagination: Pagination; +} + +interface Pagination { + cursors: Cursors; + total: number; +} + +interface Cursors { + next: string; +} From e0d9b7996afa66602c01b49ce8b7f5f795b30489 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Tue, 19 Nov 2024 02:50:00 +0800 Subject: [PATCH 531/740] =?UTF-8?q?fix(route):=2078=E5=8A=A8=E6=BC=AB=20(#?= =?UTF-8?q?17598)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(route): 78动漫 * fix typo --- lib/routes/78dm/index.ts | 472 ++++++++++++++++++++-- lib/routes/78dm/namespace.ts | 2 + lib/routes/78dm/templates/description.art | 17 + lib/routes/78dm/templates/image.art | 1 - 4 files changed, 448 insertions(+), 44 deletions(-) create mode 100644 lib/routes/78dm/templates/description.art delete mode 100644 lib/routes/78dm/templates/image.art diff --git a/lib/routes/78dm/index.ts b/lib/routes/78dm/index.ts index 490990fa1f888a9..eab9eb5fec913f5 100644 --- a/lib/routes/78dm/index.ts +++ b/lib/routes/78dm/index.ts @@ -2,7 +2,6 @@ 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'; import got from '@/utils/got'; import { load } from 'cheerio'; @@ -11,77 +10,464 @@ import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; -export const route: Route = { - path: '*', - name: 'Unknown', - maintainers: [], - handler, -}; +export const handler = async (ctx) => { + const { category = 'news' } = ctx.req.param(); + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit'), 10) : 10; -async function handler(ctx) { const rootUrl = 'https://www.78dm.net'; - const currentUrl = `${rootUrl}${getSubPath(ctx) === '/' ? '/news' : /\/\d+$/.test(getSubPath(ctx)) ? `${getSubPath(ctx)}.html` : getSubPath(ctx)}`; + const currentUrl = new URL(category.includes('/') ? `${category}.html` : category, rootUrl).href; + + const { data: response } = await got(currentUrl); - const response = await got({ - method: 'get', - url: currentUrl, - }); + const $ = load(response); - const $ = load(response.data); + const language = $('html').prop('lang'); - let items = $('.card-title') - .slice(0, ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 30) + let items = $('section.box-content div.card a.card-title') + .slice(0, limit) .toArray() .map((item) => { - item = $(item); + item = $(item).parent(); + + const title = item.find('a.card-title').text(); + + const src = item.find('a.card-image img').prop('data-src'); + const image = src?.startsWith('//') ? `https:${src}` : src; + + const description = art(path.join(__dirname, 'templates/description.art'), { + images: image + ? [ + { + src: image, + alt: title, + }, + ] + : undefined, + }); + const pubDate = item.find('div.card-info span.item').last().text(); - const link = item.attr('href'); + const href = item.find('a.card-title').prop('href'); return { - title: item.text(), - link: /^\/\//.test(link) ? `https:${link}` : link, + title, + description, + pubDate: pubDate && /\d{4}(?:\.\d{2}){2}\s\d{2}:\d{2}/.test(pubDate) ? timezone(parseDate(pubDate, 'YYYY.MM.DD HH:mm'), +8) : undefined, + link: href?.startsWith('//') ? `https:${href}` : href, + category: [ + ...new Set([ + ...item + .find('span.tag-title') + .toArray() + .map((c) => $(c).text()), + item.find('div.card-info span.item').first().text(), + ]), + ].filter(Boolean), + image, + banner: image, + language, }; }); items = await Promise.all( items.map((item) => cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); + const { data: detailResponse } = await got(item.link); + + const $$ = load(detailResponse); + + $$('i.p-status').remove(); + + $$('div.image-text-content p img.lazy').each((_, el) => { + el = $$(el); - const content = load(detailResponse.data); + const src = el.prop('data-src'); + const image = src?.startsWith('//') ? `https:${src}` : src; - content('.tag, .level').remove(); - content('.lazy').each(function () { - content(this).replaceWith( - art(path.join(__dirname, 'templates/image.art'), { - image: content(this).attr('data-src'), + el.parent().replaceWith( + art(path.join(__dirname, 'templates/description.art'), { + images: image + ? [ + { + src: image, + alt: el.prop('title') ?? '', + }, + ] + : undefined, }) ); }); - item.author = content('.push-username').first().text().split('楼主')[0]; - item.pubDate = timezone( - parseDate( - content('.push-time') - .first() - .text() - .match(/(\d{4}-\d{2}-\d{2} \d{2}:\d{2})/)[1] - ), - +8 - ); - item.description = content('.image-text-content').first().html(); + const title = $$('h2.title').text(); + const description = + item.description + + art(path.join(__dirname, 'templates/description.art'), { + description: $$('div.image-text-content').first().html(), + }); + + item.title = title; + item.description = description; + item.pubDate = timezone(parseDate($$('p.push-time').text().split(/:/).pop()), +8); + item.author = $$('a.push-username').contents().first().text(); + item.content = { + html: description, + text: $$('div.image-text-content').first().text(), + }; + item.language = language; return item; }) ) ); + const title = $('title').text(); + const image = new URL($('a.logo img').prop('src'), rootUrl).href; + return { - title: `78动漫 - ${$('title').text().split('_')[0]} - ${$('.actived').first().text()}`, + title: `${title} | ${$('div.actived').text()}`, + description: $('meta[name="description"]').prop('content'), link: currentUrl, item: items, + allowEmpty: true, + image, + author: $('meta[property="og:site_name"]').prop('content'), + language, }; -} +}; + +export const route: Route = { + path: '/:category{.+}?', + name: '分类', + url: '78dm.net', + maintainers: ['nczitzk'], + handler, + example: '/78dm/news', + parameters: { category: '分类,默认为 `news`,即新品速递,可在对应分类页 URL 中找到' }, + description: `:::tip + 若订阅 [新品速递](https://www.78dm.net/news),网址为 \`https://www.78dm.net/news\`。截取 \`https://www.78dm.net/\` 到末尾的部分 \`news\` 作为参数填入,此时路由为 [\`/78dm/news\`](https://rsshub.app/78dm/news)。 + + 若订阅 [精彩评测 - 变形金刚](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)。 + ::: + + <details> + <summary>更多分类</summary> + + #### [新品速递](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) | + </details> + `, + categories: ['new-media'], + + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.78dm.net/:category?'], + target: (params) => { + const category = params.category?.replace(/\.html$/, ''); + + return `/78dm${category ? `/${category}` : ''}`; + }, + }, + { + title: '新品速递 - 全部', + source: ['www.78dm.net/news/0/0/0/0/0/0/0/1.html'], + target: '/news/0/0/0/0/0/0/0/1', + }, + { + title: '新品速递 - 变形金刚', + source: ['www.78dm.net/news/3/0/0/0/0/0/0/1.html'], + target: '/news/3/0/0/0/0/0/0/1', + }, + { + title: '新品速递 - 高达', + source: ['www.78dm.net/news/4/0/0/0/0/0/0/1.html'], + target: '/news/4/0/0/0/0/0/0/1', + }, + { + title: '新品速递 - 圣斗士', + source: ['www.78dm.net/news/2/0/0/0/0/0/0/1.html'], + target: '/news/2/0/0/0/0/0/0/1', + }, + { + title: '新品速递 - 海贼王', + source: ['www.78dm.net/news/8/0/0/0/0/0/0/1.html'], + target: '/news/8/0/0/0/0/0/0/1', + }, + { + title: '新品速递 - PVC手办', + source: ['www.78dm.net/news/0/5/0/0/0/0/0/1.html'], + target: '/news/0/5/0/0/0/0/0/1', + }, + { + title: '新品速递 - 拼装模型', + source: ['www.78dm.net/news/0/1/0/0/0/0/0/1.html'], + target: '/news/0/1/0/0/0/0/0/1', + }, + { + title: '新品速递 - 机甲成品', + source: ['www.78dm.net/news/0/2/0/0/0/0/0/1.html'], + target: '/news/0/2/0/0/0/0/0/1', + }, + { + title: '新品速递 - 特摄', + source: ['www.78dm.net/news/0/3/0/0/0/0/0/1.html'], + target: '/news/0/3/0/0/0/0/0/1', + }, + { + title: '新品速递 - 美系', + source: ['www.78dm.net/news/0/4/0/0/0/0/0/1.html'], + target: '/news/0/4/0/0/0/0/0/1', + }, + { + title: '新品速递 - GK', + source: ['www.78dm.net/news/0/6/0/0/0/0/0/1.html'], + target: '/news/0/6/0/0/0/0/0/1', + }, + { + title: '新品速递 - 扭蛋盒蛋食玩', + source: ['www.78dm.net/news/0/7/0/0/0/0/0/1.html'], + target: '/news/0/7/0/0/0/0/0/1', + }, + { + title: '新品速递 - 其他', + source: ['www.78dm.net/news/0/8/0/0/0/0/0/1.html'], + target: '/news/0/8/0/0/0/0/0/1', + }, + { + title: '新品速递 - 综合', + source: ['www.78dm.net/news/0/9/0/0/0/0/0/1.html'], + target: '/news/0/9/0/0/0/0/0/1', + }, + { + title: '新品速递 - 军模', + source: ['www.78dm.net/news/0/10/0/0/0/0/0/1.html'], + target: '/news/0/10/0/0/0/0/0/1', + }, + { + title: '新品速递 - 民用', + source: ['www.78dm.net/news/0/11/0/0/0/0/0/1.html'], + target: '/news/0/11/0/0/0/0/0/1', + }, + { + title: '新品速递 - 配件', + source: ['www.78dm.net/news/0/12/0/0/0/0/0/1.html'], + target: '/news/0/12/0/0/0/0/0/1', + }, + { + title: '新品速递 - 工具', + source: ['www.78dm.net/news/0/13/0/0/0/0/0/1.html'], + target: '/news/0/13/0/0/0/0/0/1', + }, + { + title: '精彩评测 - 全部', + source: ['www.78dm.net/eval_list/0/0/0/1.html'], + target: '/eval_list/0/0/0/1', + }, + { + title: '精彩评测 - 变形金刚', + source: ['www.78dm.net/eval_list/109/0/0/1.html'], + target: '/eval_list/109/0/0/1', + }, + { + title: '精彩评测 - 高达', + source: ['www.78dm.net/eval_list/110/0/0/1.html'], + target: '/eval_list/110/0/0/1', + }, + { + title: '精彩评测 - 圣斗士', + source: ['www.78dm.net/eval_list/111/0/0/1.html'], + target: '/eval_list/111/0/0/1', + }, + { + title: '精彩评测 - 海贼王', + source: ['www.78dm.net/eval_list/112/0/0/1.html'], + target: '/eval_list/112/0/0/1', + }, + { + title: '精彩评测 - PVC手办', + source: ['www.78dm.net/eval_list/115/0/0/1.html'], + target: '/eval_list/115/0/0/1', + }, + { + title: '精彩评测 - 拼装模型', + source: ['www.78dm.net/eval_list/113/0/0/1.html'], + target: '/eval_list/113/0/0/1', + }, + { + title: '精彩评测 - 机甲成品', + source: ['www.78dm.net/eval_list/114/0/0/1.html'], + target: '/eval_list/114/0/0/1', + }, + { + title: '精彩评测 - 特摄', + source: ['www.78dm.net/eval_list/116/0/0/1.html'], + target: '/eval_list/116/0/0/1', + }, + { + title: '精彩评测 - 美系', + source: ['www.78dm.net/eval_list/117/0/0/1.html'], + target: '/eval_list/117/0/0/1', + }, + { + title: '精彩评测 - GK', + source: ['www.78dm.net/eval_list/118/0/0/1.html'], + target: '/eval_list/118/0/0/1', + }, + { + title: '精彩评测 - 综合', + source: ['www.78dm.net/eval_list/120/0/0/1.html'], + target: '/eval_list/120/0/0/1', + }, + { + title: '好贴推荐 - 全部', + source: ['www.78dm.net/ht_list/0/0/0/1.html'], + target: '/ht_list/0/0/0/1', + }, + { + title: '好贴推荐 - 变形金刚', + source: ['www.78dm.net/ht_list/95/0/0/1.html'], + target: '/ht_list/95/0/0/1', + }, + { + title: '好贴推荐 - 高达', + source: ['www.78dm.net/ht_list/96/0/0/1.html'], + target: '/ht_list/96/0/0/1', + }, + { + title: '好贴推荐 - 圣斗士', + source: ['www.78dm.net/ht_list/98/0/0/1.html'], + target: '/ht_list/98/0/0/1', + }, + { + title: '好贴推荐 - 海贼王', + source: ['www.78dm.net/ht_list/99/0/0/1.html'], + target: '/ht_list/99/0/0/1', + }, + { + title: '好贴推荐 - PVC手办', + source: ['www.78dm.net/ht_list/100/0/0/1.html'], + target: '/ht_list/100/0/0/1', + }, + { + title: '好贴推荐 - 拼装模型', + source: ['www.78dm.net/ht_list/101/0/0/1.html'], + target: '/ht_list/101/0/0/1', + }, + { + title: '好贴推荐 - 机甲成品', + source: ['www.78dm.net/ht_list/102/0/0/1.html'], + target: '/ht_list/102/0/0/1', + }, + { + title: '好贴推荐 - 特摄', + source: ['www.78dm.net/ht_list/103/0/0/1.html'], + target: '/ht_list/103/0/0/1', + }, + { + title: '好贴推荐 - 美系', + source: ['www.78dm.net/ht_list/104/0/0/1.html'], + target: '/ht_list/104/0/0/1', + }, + { + title: '好贴推荐 - GK', + source: ['www.78dm.net/ht_list/105/0/0/1.html'], + target: '/ht_list/105/0/0/1', + }, + { + title: '好贴推荐 - 综合', + source: ['www.78dm.net/ht_list/107/0/0/1.html'], + target: '/ht_list/107/0/0/1', + }, + { + title: '好贴推荐 - 装甲战车', + source: ['www.78dm.net/ht_list/131/0/0/1.html'], + target: '/ht_list/131/0/0/1', + }, + { + title: '好贴推荐 - 舰船模型', + source: ['www.78dm.net/ht_list/132/0/0/1.html'], + target: '/ht_list/132/0/0/1', + }, + { + title: '好贴推荐 - 飞机模型', + source: ['www.78dm.net/ht_list/133/0/0/1.html'], + target: '/ht_list/133/0/0/1', + }, + { + title: '好贴推荐 - 民用模型', + source: ['www.78dm.net/ht_list/134/0/0/1.html'], + target: '/ht_list/134/0/0/1', + }, + { + title: '好贴推荐 - 兵人模型', + source: ['www.78dm.net/ht_list/135/0/0/1.html'], + target: '/ht_list/135/0/0/1', + }, + ], +}; diff --git a/lib/routes/78dm/namespace.ts b/lib/routes/78dm/namespace.ts index 44344119024834f..2fa777e3cefd302 100644 --- a/lib/routes/78dm/namespace.ts +++ b/lib/routes/78dm/namespace.ts @@ -3,5 +3,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '78 动漫', url: '78dm.net', + categories: ['anime'], + description: '', lang: 'zh-CN', }; diff --git a/lib/routes/78dm/templates/description.art b/lib/routes/78dm/templates/description.art new file mode 100644 index 000000000000000..dfab19230c11085 --- /dev/null +++ b/lib/routes/78dm/templates/description.art @@ -0,0 +1,17 @@ +{{ if images }} + {{ each images image }} + {{ if image?.src }} + <figure> + <img + {{ if image.alt }} + alt="{{ image.alt }}" + {{ /if }} + src="{{ image.src }}"> + </figure> + {{ /if }} + {{ /each }} +{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file diff --git a/lib/routes/78dm/templates/image.art b/lib/routes/78dm/templates/image.art deleted file mode 100644 index 929353dbbd7ddf0..000000000000000 --- a/lib/routes/78dm/templates/image.art +++ /dev/null @@ -1 +0,0 @@ -<img src="{{ image }}"> \ No newline at end of file From 100ee1f6b72d9d129e118b3b7f99ab9abe03278c Mon Sep 17 00:00:00 2001 From: lifetraveler <lifetraveler@outlook.com> Date: Tue, 19 Nov 2024 10:20:28 +0800 Subject: [PATCH 532/740] =?UTF-8?q?feat:=20add=20new=20route=20about=20air?= =?UTF-8?q?-level=20=E7=A9=BA=E6=B0=94=E8=B4=A8=E9=87=8F=20(#17594)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 123 * 空气质量 * 重复代码,无用代码删除 * 格式化代码-注释重新生成 * resolve pr problem * 1. Using String() on a string is redundant. 2. example should start with / and the namespace 3.Do not start the description with line breaks. * fix: add category --------- Co-authored-by: DESKTOP-EMU7G44\randomtree <548880923@qq.com> --- lib/routes/air-level/index.ts | 49 +++++++++++++++++++++++ lib/routes/air-level/levelrank.ts | 65 +++++++++++++++++++++++++++++++ lib/routes/air-level/namespace.ts | 12 ++++++ 3 files changed, 126 insertions(+) create mode 100644 lib/routes/air-level/index.ts create mode 100644 lib/routes/air-level/levelrank.ts create mode 100644 lib/routes/air-level/namespace.ts diff --git a/lib/routes/air-level/index.ts b/lib/routes/air-level/index.ts new file mode 100644 index 000000000000000..93ba54123b08499 --- /dev/null +++ b/lib/routes/air-level/index.ts @@ -0,0 +1,49 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; // 统一使用的请求库 +import { load } from 'cheerio'; // 类似 jQuery 的 API HTML 解析器 + +export const route: Route = { + path: '/air/:area', + radar: [ + { + source: ['m.air-level.com/air/:area/'], + target: '/air/:area', + }, + ], + parameters: { + area: '地区', + }, + name: '空气质量', + maintainers: ['lifetraveler'], + example: '/air-level/air/xian', + handler, +}; + +async function handler(ctx) { + const area = ctx.req.param('area'); + const currentUrl = `https://m.air-level.com/air/${area}`; + const response = await ofetch(currentUrl); + const $ = load(response); + + const title = $('body > div.container > div.row.page > div:nth-child(1) > h2').text().replaceAll('[]', ''); + + const table = $('body > div.container > div.row.page > div:nth-child(1) > div:nth-child(3) > table'); + + const qt = $('body > div.container > div.row.page > div:nth-child(1) > div.aqi-dv > div > span.aqi-bg.aqi-level-2').text(); + const pubtime = $('body > div.container > div.row.page > div:nth-child(1) > div.aqi-dv > div > span.label.label-info').text(); + + const items = [ + { + title: title + ' ' + qt + ' ' + pubtime, + link: currentUrl, + description: `<table border="1 solid black">${table.html()}</table>`, + guid: pubtime, + }, + ]; + return { + title, + item: items, + description: '订阅每个城市的天气质量', + link: currentUrl, + }; +} diff --git a/lib/routes/air-level/levelrank.ts b/lib/routes/air-level/levelrank.ts new file mode 100644 index 000000000000000..31136891aefab8b --- /dev/null +++ b/lib/routes/air-level/levelrank.ts @@ -0,0 +1,65 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; // 统一使用的请求库 +import { load } from 'cheerio'; // 类似 jQuery 的 API HTML 解析器 + +export const route: Route = { + path: ['/rank/:status?'], + radar: [ + { + source: ['m.air-level.com/rank/:status', 'm.air-level.com/rank'], + target: '/rank/:status', + }, + ], + parameters: { + status: '地区', + }, + name: '空气质量排行', + maintainers: ['lifetraveler'], + example: '/air-level/rank/best,/air-level/rank', + handler, +}; + +async function handler(ctx) { + const status = ctx.req.param('status'); + const currentUrl = 'https://m.air-level.com/rank'; + const response = await ofetch(currentUrl); + const $ = load(response); + let table = ''; + let title = ''; + + const titleBest = $('body > div.container > div.row.page > div:nth-child(1) > div:nth-child(5) > h3').text().replaceAll('[]', ''); + const tableBest = $('body > div.container > div.row.page > div:nth-child(1) > div:nth-child(5) > table').html(); + const titleWorst = $('body > div.container > div.row.page > div:nth-child(1) > div:nth-child(3) > h3').text().replaceAll('[]', ''); + const tableWorst = $('body > div.container > div.row.page > div:nth-child(1) > div:nth-child(3) > table').html(); + + if (status) { + if (status === 'best') { + title = titleBest; + table = `<table border="1 solid black">${tableBest}</table>`; + } + + if (status === 'worsest') { + title = titleWorst; + table = `<table border="1 solid black">${tableWorst}</table>`; + } + } else { + title = $('body > div.container > div.row.page > div:nth-child(1) > h2').text().replaceAll('[]', ''); + table = `${titleBest}<br/><table border="1 solid black">${tableBest}</table><br/><table border="1 solid black">${titleWorst}<br/>${tableWorst}</table>`; + } + + const pubtime = $('body > div.container > div.row.page > div:nth-child(1) > h4').text(); + const items = [ + { + title, + link: currentUrl, + description: table, + guid: pubtime, + }, + ]; + return { + title, + item: items, + description: '空气质量排行', + link: currentUrl, + }; +} diff --git a/lib/routes/air-level/namespace.ts b/lib/routes/air-level/namespace.ts new file mode 100644 index 000000000000000..d85046bbd874722 --- /dev/null +++ b/lib/routes/air-level/namespace.ts @@ -0,0 +1,12 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Air-Level', + url: 'air-level.com', + description: ` + - 可以订阅每个城市的空气质量,按照拼音订阅 + - 支持订阅每天的实时排名 + `, + categories: ['forecast'], + lang: 'zh-CN', +}; From 45f42b455680f552ce9b64f6cfbf892686286235 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 00:56:36 -0800 Subject: [PATCH 533/740] chore(deps): bump @hono/zod-openapi from 0.17.1 to 0.18.0 (#17632) Bumps [@hono/zod-openapi](https://github.com/honojs/middleware) from 0.17.1 to 0.18.0. - [Release notes](https://github.com/honojs/middleware/releases) - [Commits](https://github.com/honojs/middleware/compare/@hono/zod-openapi@0.17.1...@hono/zod-openapi@0.18.0) --- updated-dependencies: - dependency-name: "@hono/zod-openapi" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 0cc6770a5210c90..8bd1f3e8c548952 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "@bbob/html": "4.1.1", "@bbob/preset-html5": "4.1.1", "@hono/node-server": "1.13.7", - "@hono/zod-openapi": "0.17.1", + "@hono/zod-openapi": "0.18.0", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.54.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8469a005ab9a22f..1572bc7e500a2e8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,8 +21,8 @@ importers: specifier: 1.13.7 version: 1.13.7(hono@4.6.10) '@hono/zod-openapi': - specifier: 0.17.1 - version: 0.17.1(hono@4.6.10)(zod@3.23.8) + specifier: 0.18.0 + version: 0.18.0(hono@4.6.10)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -1358,15 +1358,15 @@ packages: peerDependencies: hono: ^4 - '@hono/zod-openapi@0.17.1': - resolution: {integrity: sha512-5atEdv7bf92mhxuBVR8LHM4WfaB1jchW+p/f4P/asgWDDmeHcwM8rsBhbbk622MXbUTuAwpsyrJ7u3qnXbjCsQ==} + '@hono/zod-openapi@0.18.0': + resolution: {integrity: sha512-MNdFSbACkEq1txteKsBrVB0Mnil0zd5urOrP8eti6kUDI95CKVws+vjHQWNddRqmqlBHa5kFAcVXSInHFmcYGQ==} engines: {node: '>=16.0.0'} peerDependencies: hono: '>=4.3.6' zod: 3.* - '@hono/zod-validator@0.3.0': - resolution: {integrity: sha512-7XcTk3yYyk6ldrO/VuqsroE7stvDZxHJQcpATRAyha8rUxJNBPV3+6waDrARfgEqxOVlzIadm3/6sE/dPseXgQ==} + '@hono/zod-validator@0.4.1': + resolution: {integrity: sha512-I8LyfeJfvVmC5hPjZ2Iij7RjexlgSBT7QJudZ4JvNPLxn0JQ3sqclz2zydlwISAnw21D2n4LQ0nfZdoiv9fQQA==} peerDependencies: hono: '>=3.9.0' zod: ^3.19.1 @@ -6861,14 +6861,14 @@ snapshots: dependencies: hono: 4.6.10 - '@hono/zod-openapi@0.17.1(hono@4.6.10)(zod@3.23.8)': + '@hono/zod-openapi@0.18.0(hono@4.6.10)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.3.0(hono@4.6.10)(zod@3.23.8) + '@hono/zod-validator': 0.4.1(hono@4.6.10)(zod@3.23.8) hono: 4.6.10 zod: 3.23.8 - '@hono/zod-validator@0.3.0(hono@4.6.10)(zod@3.23.8)': + '@hono/zod-validator@0.4.1(hono@4.6.10)(zod@3.23.8)': dependencies: hono: 4.6.10 zod: 3.23.8 From 9c8e1a17875aafec9b89b1d4a5c5f2af661451ff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:09:10 +0800 Subject: [PATCH 534/740] chore(deps-dev): bump husky from 9.1.6 to 9.1.7 (#17624) Bumps [husky](https://github.com/typicode/husky) from 9.1.6 to 9.1.7. - [Release notes](https://github.com/typicode/husky/releases) - [Commits](https://github.com/typicode/husky/compare/v9.1.6...v9.1.7) --- updated-dependencies: - dependency-name: husky dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 8bd1f3e8c548952..70de7906225abc4 100644 --- a/package.json +++ b/package.json @@ -181,7 +181,7 @@ "fs-extra": "11.2.0", "globals": "15.12.0", "got": "14.4.4", - "husky": "9.1.6", + "husky": "9.1.7", "js-beautify": "1.15.1", "lint-staged": "15.2.10", "mockdate": "3.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1572bc7e500a2e8..c3cfac5ea0645f9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -400,8 +400,8 @@ importers: specifier: 14.4.4 version: 14.4.4 husky: - specifier: 9.1.6 - version: 9.1.6 + specifier: 9.1.7 + version: 9.1.7 js-beautify: specifier: 1.15.1 version: 1.15.1 @@ -3562,8 +3562,8 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} - husky@9.1.6: - resolution: {integrity: sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==} + husky@9.1.7: + resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} engines: {node: '>=18'} hasBin: true @@ -9413,7 +9413,7 @@ snapshots: human-signals@5.0.0: {} - husky@9.1.6: {} + husky@9.1.7: {} iconv-lite@0.4.24: dependencies: From 436b7e7062deed83c919e215864d84d86685329e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:09:34 +0800 Subject: [PATCH 535/740] chore(deps-dev): bump @typescript-eslint/parser from 8.14.0 to 8.15.0 (#17628) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.14.0 to 8.15.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.15.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 72 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 61 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 70de7906225abc4..061997967a5e2b0 100644 --- a/package.json +++ b/package.json @@ -167,7 +167,7 @@ "@types/title": "3.4.3", "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.14.0", - "@typescript-eslint/parser": "8.14.0", + "@typescript-eslint/parser": "8.15.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.105", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c3cfac5ea0645f9..b1ec54843b43f1f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -356,10 +356,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.14.0 - version: 8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) + version: 8.14.0(@typescript-eslint/parser@8.15.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/parser': - specifier: 8.14.0 - version: 8.14.0(eslint@9.14.0)(typescript@5.6.3) + specifier: 8.15.0 + version: 8.15.0(eslint@9.14.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.6 version: 0.27.6 @@ -1977,8 +1977,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.14.0': - resolution: {integrity: sha512-2p82Yn9juUJq0XynBXtFCyrBDb6/dJombnz6vbo6mgQEtWHfvHbQuEa9kAOVIt1c9YFwi7H6WxtPj1kg+80+RA==} + '@typescript-eslint/parser@8.15.0': + resolution: {integrity: sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -1995,6 +1995,10 @@ packages: resolution: {integrity: sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.15.0': + resolution: {integrity: sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.14.0': resolution: {integrity: sha512-Xcz9qOtZuGusVOH5Uk07NGs39wrKkf3AxlkK79RBK6aJC1l03CobXjJbwBPSidetAOV+5rEVuiT1VSBUOAsanQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2012,6 +2016,10 @@ packages: resolution: {integrity: sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.15.0': + resolution: {integrity: sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.12.2': resolution: {integrity: sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2030,6 +2038,15 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.15.0': + resolution: {integrity: sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@8.12.2': resolution: {integrity: sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2050,6 +2067,10 @@ packages: resolution: {integrity: sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.15.0': + resolution: {integrity: sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -7508,10 +7529,10 @@ snapshots: '@types/node': 22.9.0 optional: true - '@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.15.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.15.0(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.14.0 '@typescript-eslint/type-utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) @@ -7526,12 +7547,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.14.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.15.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.14.0 - '@typescript-eslint/types': 8.14.0 - '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.14.0 + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.15.0 debug: 4.3.7 eslint: 9.14.0 optionalDependencies: @@ -7549,6 +7570,11 @@ snapshots: '@typescript-eslint/types': 8.14.0 '@typescript-eslint/visitor-keys': 8.14.0 + '@typescript-eslint/scope-manager@8.15.0': + dependencies: + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/visitor-keys': 8.15.0 + '@typescript-eslint/type-utils@8.14.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) @@ -7565,6 +7591,8 @@ snapshots: '@typescript-eslint/types@8.14.0': {} + '@typescript-eslint/types@8.15.0': {} + '@typescript-eslint/typescript-estree@8.12.2(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.12.2 @@ -7595,6 +7623,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.15.0(typescript@5.6.3)': + dependencies: + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/visitor-keys': 8.15.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.12.2(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) @@ -7627,6 +7670,11 @@ snapshots: '@typescript-eslint/types': 8.14.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.15.0': + dependencies: + '@typescript-eslint/types': 8.15.0 + eslint-visitor-keys: 4.2.0 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.11': From b07054d12aec1b22a76f4c02f43ea5f290ccd1bd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:13:33 +0800 Subject: [PATCH 536/740] chore(deps): bump @opentelemetry/resources from 1.27.0 to 1.28.0 (#17627) Bumps [@opentelemetry/resources](https://github.com/open-telemetry/opentelemetry-js) from 1.27.0 to 1.28.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.27.0...v1.28.0) --- updated-dependencies: - dependency-name: "@opentelemetry/resources" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 27 +++++++++++++++++++++++++-- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 061997967a5e2b0..25734b38cea13bc 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.54.2", "@opentelemetry/exporter-trace-otlp-http": "0.54.2", - "@opentelemetry/resources": "1.27.0", + "@opentelemetry/resources": "1.28.0", "@opentelemetry/sdk-metrics": "1.27.0", "@opentelemetry/sdk-trace-base": "1.27.0", "@opentelemetry/semantic-conventions": "1.27.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b1ec54843b43f1f..e8abe10e91af979 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -36,8 +36,8 @@ importers: specifier: 0.54.2 version: 0.54.2(@opentelemetry/api@1.9.0) '@opentelemetry/resources': - specifier: 1.27.0 - version: 1.27.0(@opentelemetry/api@1.9.0) + specifier: 1.28.0 + version: 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': specifier: 1.27.0 version: 1.27.0(@opentelemetry/api@1.9.0) @@ -1513,6 +1513,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/core@1.28.0': + resolution: {integrity: sha512-ZLwRMV+fNDpVmF2WYUdBHlq0eOWtEaUJSusrzjGnBt7iSRvfjFE3RXYUZJrqou/wIDWV0DwQ5KIfYe9WXg9Xqw==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/exporter-prometheus@0.54.2': resolution: {integrity: sha512-U/XoupMPmrdEc3tzSxvMft+r/qK2O6SigZWewpC0183UF0cnGlQr1sPx/VxXo7RXJ6zMxDFHhO2Z1AWApXD1Pw==} engines: {node: '>=14'} @@ -1543,6 +1549,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/resources@1.28.0': + resolution: {integrity: sha512-cIyXSVJjGeTICENN40YSvLDAq4Y2502hGK3iN7tfdynQLKWb3XWZQEkPc+eSx47kiy11YeFAlYkEfXwR1w8kfw==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/sdk-logs@0.54.2': resolution: {integrity: sha512-yIbYqDLS/AtBbPjCjh6eSToGNRMqW2VR8RrKEy+G+J7dFG7pKoptTH5T+XlKPleP9NY8JZYIpgJBlI+Osi0rFw==} engines: {node: '>=14'} @@ -7060,6 +7072,11 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/core@1.28.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/exporter-prometheus@0.54.2(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -7099,6 +7116,12 @@ snapshots: '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/resources@1.28.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/sdk-logs@0.54.2(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 From 245f57c67378ab987001f3b14d95b0fae7269679 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:32:58 +0800 Subject: [PATCH 537/740] chore(deps-dev): bump @stylistic/eslint-plugin from 2.10.1 to 2.11.0 (#17629) Bumps [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin) from 2.10.1 to 2.11.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/v2.11.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@stylistic/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 77 ++++---------------------------------------------- 2 files changed, 7 insertions(+), 72 deletions(-) diff --git a/package.json b/package.json index 25734b38cea13bc..a97d78e055c65b7 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "@eslint/eslintrc": "3.2.0", "@eslint/js": "9.15.0", "@microsoft/eslint-formatter-sarif": "3.1.0", - "@stylistic/eslint-plugin": "2.10.1", + "@stylistic/eslint-plugin": "2.11.0", "@types/aes-js": "3.1.4", "@types/babel__preset-env": "7.9.7", "@types/crypto-js": "4.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e8abe10e91af979..e8444e9cba69202 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -286,8 +286,8 @@ importers: specifier: 3.1.0 version: 3.1.0 '@stylistic/eslint-plugin': - specifier: 2.10.1 - version: 2.10.1(eslint@9.14.0)(typescript@5.6.3) + specifier: 2.11.0 + version: 2.11.0(eslint@9.14.0)(typescript@5.6.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -1814,8 +1814,8 @@ packages: resolution: {integrity: sha512-QWLl2P+rsCJeofkDNIT3WFmb6NrRud1SUYW8dIhXK/46XFV8Q/g7Bsvib0Askb0reRLe+WYPeeE+l5cH7SlkuQ==} engines: {node: '>=18'} - '@stylistic/eslint-plugin@2.10.1': - resolution: {integrity: sha512-U+4yzNXElTf9q0kEfnloI9XbOyD4cnEQCxjUI94q0+W++0GAEQvJ/slwEj9lwjDHfGADRSr+Tco/z0XJvmDfCQ==} + '@stylistic/eslint-plugin@2.11.0': + resolution: {integrity: sha512-PNRHbydNG5EH8NK4c+izdJlxajIR6GxcUhzsYNRsn6Myep4dsZt0qFCz3rCPnkvgO5FYibDcMqgNHUT+zvjYZw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' @@ -1999,10 +1999,6 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.12.2': - resolution: {integrity: sha512-gPLpLtrj9aMHOvxJkSbDBmbRuYdtiEbnvO25bCMza3DhMjTQw0u7Y1M+YR5JPbMsXXnSPuCf5hfq0nEkQDL/JQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.14.0': resolution: {integrity: sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2020,10 +2016,6 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.12.2': - resolution: {integrity: sha512-VwDwMF1SZ7wPBUZwmMdnDJ6sIFk4K4s+ALKLP6aIQsISkPv8jhiw65sAK6SuWODN/ix+m+HgbYDkH+zLjrzvOA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.14.0': resolution: {integrity: sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2032,15 +2024,6 @@ packages: resolution: {integrity: sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.12.2': - resolution: {integrity: sha512-mME5MDwGe30Pq9zKPvyduyU86PH7aixwqYR2grTglAdB+AN8xXQ1vFGpYaUSJ5o5P/5znsSBeNcs5g5/2aQwow==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.14.0': resolution: {integrity: sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2059,22 +2042,12 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.12.2': - resolution: {integrity: sha512-UTTuDIX3fkfAz6iSVa5rTuSfWIYZ6ATtEocQ/umkRSyC9O919lbZ8dcH7mysshrCdrAM03skJOEYaBugxN+M6A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.14.0': resolution: {integrity: sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@8.12.2': - resolution: {integrity: sha512-PChz8UaKQAVNHghsHcPyx1OMHoFRUEA7rJSK/mDhdq85bk+PLsUHUBqTQTFt18VJZbmxBovM65fezlheQRsSDA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.14.0': resolution: {integrity: sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7380,9 +7353,9 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.10.1(eslint@9.14.0)(typescript@5.6.3)': + '@stylistic/eslint-plugin@2.11.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.12.2(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) eslint: 9.14.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 @@ -7583,11 +7556,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.12.2': - dependencies: - '@typescript-eslint/types': 8.12.2 - '@typescript-eslint/visitor-keys': 8.12.2 - '@typescript-eslint/scope-manager@8.14.0': dependencies: '@typescript-eslint/types': 8.14.0 @@ -7610,27 +7578,10 @@ snapshots: - eslint - supports-color - '@typescript-eslint/types@8.12.2': {} - '@typescript-eslint/types@8.14.0': {} '@typescript-eslint/types@8.15.0': {} - '@typescript-eslint/typescript-estree@8.12.2(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 8.12.2 - '@typescript-eslint/visitor-keys': 8.12.2 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.14.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.14.0 @@ -7661,17 +7612,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.12.2(eslint@9.14.0)(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) - '@typescript-eslint/scope-manager': 8.12.2 - '@typescript-eslint/types': 8.12.2 - '@typescript-eslint/typescript-estree': 8.12.2(typescript@5.6.3) - eslint: 9.14.0 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.14.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) @@ -7683,11 +7623,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/visitor-keys@8.12.2': - dependencies: - '@typescript-eslint/types': 8.12.2 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.14.0': dependencies: '@typescript-eslint/types': 8.14.0 From bc2decf3a07d8875de3e69f3937204a3bd7e587f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 17:49:04 +0800 Subject: [PATCH 538/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin (#17631) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.14.0 to 8.15.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.15.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 53 ++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index a97d78e055c65b7..47c8e266322c64b 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "@types/tiny-async-pool": "2.0.3", "@types/title": "3.4.3", "@types/uuid": "10.0.0", - "@typescript-eslint/eslint-plugin": "8.14.0", + "@typescript-eslint/eslint-plugin": "8.15.0", "@typescript-eslint/parser": "8.15.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e8444e9cba69202..f55d034ccfa4f01 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -355,8 +355,8 @@ importers: specifier: 10.0.0 version: 10.0.0 '@typescript-eslint/eslint-plugin': - specifier: 8.14.0 - version: 8.14.0(@typescript-eslint/parser@8.15.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) + specifier: 8.15.0 + version: 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.15.0 version: 8.15.0(eslint@9.14.0)(typescript@5.6.3) @@ -1978,8 +1978,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.14.0': - resolution: {integrity: sha512-tqp8H7UWFaZj0yNO6bycd5YjMwxa6wIHOLZvWPkidwbgLCsBMetQoGj7DPuAlWa2yGO3H48xmPwjhsSPPCGU5w==} + '@typescript-eslint/eslint-plugin@8.15.0': + resolution: {integrity: sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -2007,10 +2007,11 @@ packages: resolution: {integrity: sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.14.0': - resolution: {integrity: sha512-Xcz9qOtZuGusVOH5Uk07NGs39wrKkf3AxlkK79RBK6aJC1l03CobXjJbwBPSidetAOV+5rEVuiT1VSBUOAsanQ==} + '@typescript-eslint/type-utils@8.15.0': + resolution: {integrity: sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: + eslint: ^8.57.0 || ^9.0.0 typescript: '*' peerDependenciesMeta: typescript: @@ -2048,6 +2049,16 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/utils@8.15.0': + resolution: {integrity: sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/visitor-keys@8.14.0': resolution: {integrity: sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7525,14 +7536,14 @@ snapshots: '@types/node': 22.9.0 optional: true - '@typescript-eslint/eslint-plugin@8.14.0(@typescript-eslint/parser@8.15.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.15.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.14.0 - '@typescript-eslint/type-utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.14.0 + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/type-utils': 8.15.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.15.0 eslint: 9.14.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7566,16 +7577,16 @@ snapshots: '@typescript-eslint/types': 8.15.0 '@typescript-eslint/visitor-keys': 8.15.0 - '@typescript-eslint/type-utils@8.14.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.15.0(eslint@9.14.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.14.0)(typescript@5.6.3) debug: 4.3.7 + eslint: 9.14.0 ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: - - eslint - supports-color '@typescript-eslint/types@8.14.0': {} @@ -7623,6 +7634,18 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.15.0(eslint@9.14.0)(typescript@5.6.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@typescript-eslint/scope-manager': 8.15.0 + '@typescript-eslint/types': 8.15.0 + '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) + eslint: 9.14.0 + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/visitor-keys@8.14.0': dependencies: '@typescript-eslint/types': 8.14.0 From bf25fba756824fca03de5acfa7baa3e7aabc8fbd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 18:14:19 +0800 Subject: [PATCH 539/740] chore(deps): bump @opentelemetry/sdk-trace-base from 1.27.0 to 1.28.0 (#17623) Bumps [@opentelemetry/sdk-trace-base](https://github.com/open-telemetry/opentelemetry-js) from 1.27.0 to 1.28.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.27.0...v1.28.0) --- updated-dependencies: - dependency-name: "@opentelemetry/sdk-trace-base" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 47c8e266322c64b..b02321480b0a628 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "@opentelemetry/exporter-trace-otlp-http": "0.54.2", "@opentelemetry/resources": "1.28.0", "@opentelemetry/sdk-metrics": "1.27.0", - "@opentelemetry/sdk-trace-base": "1.27.0", + "@opentelemetry/sdk-trace-base": "1.28.0", "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.23", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f55d034ccfa4f01..79ba4435d1f2a05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,8 +42,8 @@ importers: specifier: 1.27.0 version: 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': - specifier: 1.27.0 - version: 1.27.0(@opentelemetry/api@1.9.0) + specifier: 1.28.0 + version: 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': specifier: 1.27.0 version: 1.27.0 @@ -1573,6 +1573,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/sdk-trace-base@1.28.0': + resolution: {integrity: sha512-ceUVWuCpIao7Y5xE02Xs3nQi0tOGmMea17ecBdwtCvdo9ekmO+ijc9RFDgfifMl7XCBf41zne/1POM3LqSTZDA==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/semantic-conventions@1.27.0': resolution: {integrity: sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==} engines: {node: '>=14'} @@ -7126,6 +7132,13 @@ snapshots: '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/sdk-trace-base@1.28.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/semantic-conventions@1.27.0': {} '@otplib/core@12.0.1': {} From cfa3ea5cfd85358b0304ce119076339d721dbd73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:11:20 +0800 Subject: [PATCH 540/740] chore(deps): bump @opentelemetry/exporter-trace-otlp-http (#17626) Bumps [@opentelemetry/exporter-trace-otlp-http](https://github.com/open-telemetry/opentelemetry-js) from 0.54.2 to 0.55.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/experimental/v0.54.2...experimental/v0.55.0) --- updated-dependencies: - dependency-name: "@opentelemetry/exporter-trace-otlp-http" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 79 +++++++++++++++++++++++++------------------------- 2 files changed, 40 insertions(+), 41 deletions(-) diff --git a/package.json b/package.json index b02321480b0a628..7e2c4e42b579cff 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.54.2", - "@opentelemetry/exporter-trace-otlp-http": "0.54.2", + "@opentelemetry/exporter-trace-otlp-http": "0.55.0", "@opentelemetry/resources": "1.28.0", "@opentelemetry/sdk-metrics": "1.27.0", "@opentelemetry/sdk-trace-base": "1.28.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 79ba4435d1f2a05..78ad2620b363fbb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -33,8 +33,8 @@ importers: specifier: 0.54.2 version: 0.54.2(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http': - specifier: 0.54.2 - version: 0.54.2(@opentelemetry/api@1.9.0) + specifier: 0.55.0 + version: 0.55.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': specifier: 1.28.0 version: 1.28.0(@opentelemetry/api@1.9.0) @@ -1499,8 +1499,8 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@opentelemetry/api-logs@0.54.2': - resolution: {integrity: sha512-4MTVwwmLgUh5QrJnZpYo6YRO5IBLAggf2h8gWDblwRagDStY13aEvt7gGk3jewrMaPlHiF83fENhIx0HO97/cQ==} + '@opentelemetry/api-logs@0.55.0': + resolution: {integrity: sha512-3cpa+qI45VHYcA5c0bHM6VHo9gicv3p5mlLHNG3rLyjQU8b7e0st1rWtrUn3JbZ3DwwCfhKop4eQ9UuYlC6Pkg==} engines: {node: '>=14'} '@opentelemetry/api@1.9.0': @@ -1525,20 +1525,20 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-trace-otlp-http@0.54.2': - resolution: {integrity: sha512-BgWKKyD/h2zpISdmYHN/sapwTjvt1P4p5yx4xeBV8XAEqh4OQUhOtSGFG80+nPQ1F8of3mKOT1DDoDbJp1u25w==} + '@opentelemetry/exporter-trace-otlp-http@0.55.0': + resolution: {integrity: sha512-lMiNic63EVHpW+eChmLD2CieDmwQBFi72+LFbh8+5hY0ShrDGrsGP/zuT5MRh7M/vM/UZYO/2A/FYd7CMQGR7A==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-exporter-base@0.54.2': - resolution: {integrity: sha512-NrNyxu6R/bGAwanhz1HI0aJWKR6xUED4TjCH4iWMlAfyRukGbI9Kt/Akd2sYLwRKNhfS+sKetKGCUQPMDyYYMA==} + '@opentelemetry/otlp-exporter-base@0.55.0': + resolution: {integrity: sha512-iHQI0Zzq3h1T6xUJTVFwmFl5Dt5y1es+fl4kM+k5T/3YvmVyeYkSiF+wHCg6oKrlUAJfk+t55kaAu3sYmt7ZYA==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-transformer@0.54.2': - resolution: {integrity: sha512-2tIjahJlMRRUz0A2SeE+qBkeBXBFkSjR0wqJ08kuOqaL8HNGan5iZf+A8cfrfmZzPUuMKCyY9I+okzFuFs6gKQ==} + '@opentelemetry/otlp-transformer@0.55.0': + resolution: {integrity: sha512-kVqEfxtp6mSN2Dhpy0REo1ghP4PYhC1kMHQJ2qVlO99Pc+aigELjZDfg7/YKmL71gR6wVGIeJfiql/eXL7sQPA==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 @@ -1555,8 +1555,8 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/sdk-logs@0.54.2': - resolution: {integrity: sha512-yIbYqDLS/AtBbPjCjh6eSToGNRMqW2VR8RrKEy+G+J7dFG7pKoptTH5T+XlKPleP9NY8JZYIpgJBlI+Osi0rFw==} + '@opentelemetry/sdk-logs@0.55.0': + resolution: {integrity: sha512-TSx+Yg/d48uWW6HtjS1AD5x6WPfLhDWLl/WxC7I2fMevaiBuKCuraxTB8MDXieCNnBI24bw9ytyXrDCswFfWgA==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': '>=1.4.0 <1.10.0' @@ -1567,11 +1567,11 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-trace-base@1.27.0': - resolution: {integrity: sha512-btz6XTQzwsyJjombpeqCX6LhiMQYpzt2pIYNPnw0IPO/3AhT6yjnf8Mnv3ZC2A4eRYOjqrg+bfaXg9XHDRJDWQ==} + '@opentelemetry/sdk-metrics@1.28.0': + resolution: {integrity: sha512-43tqMK/0BcKTyOvm15/WQ3HLr0Vu/ucAl/D84NO7iSlv6O4eOprxSHa3sUtmYkaZWHqdDJV0AHVz/R6u4JALVQ==} engines: {node: '>=14'} peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/api': '>=1.3.0 <1.10.0' '@opentelemetry/sdk-trace-base@1.28.0': resolution: {integrity: sha512-ceUVWuCpIao7Y5xE02Xs3nQi0tOGmMea17ecBdwtCvdo9ekmO+ijc9RFDgfifMl7XCBf41zne/1POM3LqSTZDA==} @@ -7051,7 +7051,7 @@ snapshots: '@open-draft/until@2.1.0': {} - '@opentelemetry/api-logs@0.54.2': + '@opentelemetry/api-logs@0.55.0': dependencies: '@opentelemetry/api': 1.9.0 @@ -7074,30 +7074,30 @@ snapshots: '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/exporter-trace-otlp-http@0.54.2(@opentelemetry/api@1.9.0)': + '@opentelemetry/exporter-trace-otlp-http@0.55.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base': 0.54.2(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.54.2(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-exporter-base': 0.55.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.55.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base@0.54.2(@opentelemetry/api@1.9.0)': + '@opentelemetry/otlp-exporter-base@0.55.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.54.2(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.55.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer@0.54.2(@opentelemetry/api@1.9.0)': + '@opentelemetry/otlp-transformer@0.55.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.54.2 - '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-logs': 0.54.2(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-metrics': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/api-logs': 0.55.0 + '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-logs': 0.55.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-metrics': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.28.0(@opentelemetry/api@1.9.0) protobufjs: 7.4.0 '@opentelemetry/resources@1.27.0(@opentelemetry/api@1.9.0)': @@ -7112,12 +7112,12 @@ snapshots: '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/sdk-logs@0.54.2(@opentelemetry/api@1.9.0)': + '@opentelemetry/sdk-logs@0.55.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.54.2 - '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/api-logs': 0.55.0 + '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics@1.27.0(@opentelemetry/api@1.9.0)': dependencies: @@ -7125,12 +7125,11 @@ snapshots: '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base@1.27.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/sdk-metrics@1.28.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base@1.28.0(@opentelemetry/api@1.9.0)': dependencies: From a6c84b232cd2b3dd951dea9caf25b3466eefe5f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:25:12 +0800 Subject: [PATCH 541/740] chore(deps): bump @opentelemetry/exporter-prometheus (#17622) Bumps [@opentelemetry/exporter-prometheus](https://github.com/open-telemetry/opentelemetry-js) from 0.54.2 to 0.55.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/experimental/v0.54.2...experimental/v0.55.0) --- updated-dependencies: - dependency-name: "@opentelemetry/exporter-prometheus" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 7e2c4e42b579cff..c28c3f1ebb1e2c8 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@hono/zod-openapi": "0.18.0", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-prometheus": "0.54.2", + "@opentelemetry/exporter-prometheus": "0.55.0", "@opentelemetry/exporter-trace-otlp-http": "0.55.0", "@opentelemetry/resources": "1.28.0", "@opentelemetry/sdk-metrics": "1.27.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 78ad2620b363fbb..7df3c89735fb1d3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,8 +30,8 @@ importers: specifier: 1.9.0 version: 1.9.0 '@opentelemetry/exporter-prometheus': - specifier: 0.54.2 - version: 0.54.2(@opentelemetry/api@1.9.0) + specifier: 0.55.0 + version: 0.55.0(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http': specifier: 0.55.0 version: 0.55.0(@opentelemetry/api@1.9.0) @@ -1519,8 +1519,8 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/exporter-prometheus@0.54.2': - resolution: {integrity: sha512-U/XoupMPmrdEc3tzSxvMft+r/qK2O6SigZWewpC0183UF0cnGlQr1sPx/VxXo7RXJ6zMxDFHhO2Z1AWApXD1Pw==} + '@opentelemetry/exporter-prometheus@0.55.0': + resolution: {integrity: sha512-huHo4Fw9W2jlMu67EKXTY1DMSzQepmEDTTElPBTJ/2qcdlrFFhuz+neJW9cQ7M7Db8qd7I5bpNdxObCn4ZEjnA==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 @@ -7067,12 +7067,12 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/exporter-prometheus@0.54.2(@opentelemetry/api@1.9.0)': + '@opentelemetry/exporter-prometheus@0.55.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-metrics': 1.27.0(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-metrics': 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http@0.55.0(@opentelemetry/api@1.9.0)': dependencies: From dde64d83af6d737b8709c28905bea99ebc0fb413 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:33:18 +0800 Subject: [PATCH 542/740] chore(deps): bump @opentelemetry/sdk-metrics from 1.27.0 to 1.28.0 (#17625) Bumps [@opentelemetry/sdk-metrics](https://github.com/open-telemetry/opentelemetry-js) from 1.27.0 to 1.28.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.27.0...v1.28.0) --- updated-dependencies: - dependency-name: "@opentelemetry/sdk-metrics" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 39 ++------------------------------------- 2 files changed, 3 insertions(+), 38 deletions(-) diff --git a/package.json b/package.json index c28c3f1ebb1e2c8..1dd0f7dc0ec21af 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@opentelemetry/exporter-prometheus": "0.55.0", "@opentelemetry/exporter-trace-otlp-http": "0.55.0", "@opentelemetry/resources": "1.28.0", - "@opentelemetry/sdk-metrics": "1.27.0", + "@opentelemetry/sdk-metrics": "1.28.0", "@opentelemetry/sdk-trace-base": "1.28.0", "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7df3c89735fb1d3..87796a72f460f8f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,8 +39,8 @@ importers: specifier: 1.28.0 version: 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': - specifier: 1.27.0 - version: 1.27.0(@opentelemetry/api@1.9.0) + specifier: 1.28.0 + version: 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': specifier: 1.28.0 version: 1.28.0(@opentelemetry/api@1.9.0) @@ -1507,12 +1507,6 @@ packages: resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==} engines: {node: '>=8.0.0'} - '@opentelemetry/core@1.27.0': - resolution: {integrity: sha512-yQPKnK5e+76XuiqUH/gKyS8wv/7qITd5ln56QkBTf3uggr0VkXOXfcaAuG330UfdYu83wsyoBwqwxigpIG+Jkg==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/core@1.28.0': resolution: {integrity: sha512-ZLwRMV+fNDpVmF2WYUdBHlq0eOWtEaUJSusrzjGnBt7iSRvfjFE3RXYUZJrqou/wIDWV0DwQ5KIfYe9WXg9Xqw==} engines: {node: '>=14'} @@ -1543,12 +1537,6 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/resources@1.27.0': - resolution: {integrity: sha512-jOwt2VJ/lUD5BLc+PMNymDrUCpm5PKi1E9oSVYAvz01U/VdndGmrtV3DU1pG4AwlYhJRHbHfOUIlpBeXCPw6QQ==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/resources@1.28.0': resolution: {integrity: sha512-cIyXSVJjGeTICENN40YSvLDAq4Y2502hGK3iN7tfdynQLKWb3XWZQEkPc+eSx47kiy11YeFAlYkEfXwR1w8kfw==} engines: {node: '>=14'} @@ -1561,12 +1549,6 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.4.0 <1.10.0' - '@opentelemetry/sdk-metrics@1.27.0': - resolution: {integrity: sha512-JzWgzlutoXCydhHWIbLg+r76m+m3ncqvkCcsswXAQ4gqKS+LOHKhq+t6fx1zNytvLuaOUBur7EvWxECc4jPQKg==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-metrics@1.28.0': resolution: {integrity: sha512-43tqMK/0BcKTyOvm15/WQ3HLr0Vu/ucAl/D84NO7iSlv6O4eOprxSHa3sUtmYkaZWHqdDJV0AHVz/R6u4JALVQ==} engines: {node: '>=14'} @@ -7057,11 +7039,6 @@ snapshots: '@opentelemetry/api@1.9.0': {} - '@opentelemetry/core@1.27.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/core@1.28.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -7100,12 +7077,6 @@ snapshots: '@opentelemetry/sdk-trace-base': 1.28.0(@opentelemetry/api@1.9.0) protobufjs: 7.4.0 - '@opentelemetry/resources@1.27.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/resources@1.28.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -7119,12 +7090,6 @@ snapshots: '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-metrics@1.27.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.27.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-metrics@1.28.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 From 877a3ec5e91a3154b4fae95043640392c3ea2b62 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 11:35:13 +0000 Subject: [PATCH 543/740] chore(deps-dev): bump eslint-plugin-unicorn from 56.0.0 to 56.0.1 (#17635) Bumps [eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn) from 56.0.0 to 56.0.1. - [Release notes](https://github.com/sindresorhus/eslint-plugin-unicorn/releases) - [Commits](https://github.com/sindresorhus/eslint-plugin-unicorn/compare/v56.0.0...v56.0.1) --- updated-dependencies: - dependency-name: eslint-plugin-unicorn dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 1dd0f7dc0ec21af..c471df5c23157cb 100644 --- a/package.json +++ b/package.json @@ -176,7 +176,7 @@ "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.13.2", "eslint-plugin-prettier": "5.2.1", - "eslint-plugin-unicorn": "56.0.0", + "eslint-plugin-unicorn": "56.0.1", "eslint-plugin-yml": "1.15.0", "fs-extra": "11.2.0", "globals": "15.12.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87796a72f460f8f..6508b03e500db3a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -385,8 +385,8 @@ importers: specifier: 5.2.1 version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3) eslint-plugin-unicorn: - specifier: 56.0.0 - version: 56.0.0(eslint@9.14.0) + specifier: 56.0.1 + version: 56.0.1(eslint@9.14.0) eslint-plugin-yml: specifier: 1.15.0 version: 1.15.0(eslint@9.14.0) @@ -3016,8 +3016,8 @@ packages: eslint-config-prettier: optional: true - eslint-plugin-unicorn@56.0.0: - resolution: {integrity: sha512-aXpddVz/PQMmd69uxO98PA4iidiVNvA0xOtbpUoz1WhBd4RxOQQYqN618v68drY0hmy5uU2jy1bheKEVWBjlPw==} + eslint-plugin-unicorn@56.0.1: + resolution: {integrity: sha512-FwVV0Uwf8XPfVnKSGpMg7NtlZh0G0gBarCaFcMUOoqPxXryxdYxTRRv4kH6B9TFCVIrjRXG+emcxIk2ayZilog==} engines: {node: '>=18.18'} peerDependencies: eslint: '>=8.56.0' @@ -8688,7 +8688,7 @@ snapshots: '@types/eslint': 9.6.1 eslint-config-prettier: 9.1.0(eslint@9.14.0) - eslint-plugin-unicorn@56.0.0(eslint@9.14.0): + eslint-plugin-unicorn@56.0.1(eslint@9.14.0): dependencies: '@babel/helper-validator-identifier': 7.25.9 '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) From 618cbbd56ea310e7e0b12f4cc81474180fd94bce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:42:18 +0800 Subject: [PATCH 544/740] chore(deps-dev): bump eslint from 9.14.0 to 9.15.0 (#17630) Bumps [eslint](https://github.com/eslint/eslint) from 9.14.0 to 9.15.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.14.0...v9.15.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 169 +++++++++++++++++++++++++------------------------ 2 files changed, 87 insertions(+), 84 deletions(-) diff --git a/package.json b/package.json index c471df5c23157cb..4f9537a57f1edad 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.105", - "eslint": "9.14.0", + "eslint": "9.15.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.13.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6508b03e500db3a..70997f662e2afc5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -287,7 +287,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 2.11.0 - version: 2.11.0(eslint@9.14.0)(typescript@5.6.3) + version: 2.11.0(eslint@9.15.0)(typescript@5.6.3) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -356,10 +356,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.15.0 - version: 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3) + version: 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.15.0 - version: 8.15.0(eslint@9.14.0)(typescript@5.6.3) + version: 8.15.0(eslint@9.15.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.6 version: 0.27.6 @@ -370,26 +370,26 @@ importers: specifier: 0.37.105 version: 0.37.105 eslint: - specifier: 9.14.0 - version: 9.14.0 + specifier: 9.15.0 + version: 9.15.0 eslint-config-prettier: specifier: 9.1.0 - version: 9.1.0(eslint@9.14.0) + version: 9.1.0(eslint@9.15.0) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.14.0) + version: 8.1.0(eslint@9.15.0) eslint-plugin-n: specifier: 17.13.2 - version: 17.13.2(eslint@9.14.0) + version: 17.13.2(eslint@9.15.0) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.3.3) eslint-plugin-unicorn: specifier: 56.0.1 - version: 56.0.1(eslint@9.14.0) + version: 56.0.1(eslint@9.15.0) eslint-plugin-yml: specifier: 1.15.0 - version: 1.15.0(eslint@9.14.0) + version: 1.15.0(eslint@9.15.0) fs-extra: specifier: 11.2.0 version: 11.2.0 @@ -1316,12 +1316,12 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.18.0': - resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} + '@eslint/config-array@0.19.0': + resolution: {integrity: sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/core@0.7.0': - resolution: {integrity: sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==} + '@eslint/core@0.9.0': + resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@eslint/eslintrc@2.1.4': @@ -1336,10 +1336,6 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.14.0': - resolution: {integrity: sha512-pFoEtFWCPyDOl+C6Ift+wC7Ro89otjigCf5vcuWqWgqNSQbRrpjSvdeE6ofLz4dHmyxD5f7gIdGT4+p36L6Twg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.15.0': resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -1396,8 +1392,8 @@ packages: resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} engines: {node: '>=18.18'} - '@humanwhocodes/retry@0.4.0': - resolution: {integrity: sha512-xnRgu9DxZbkWak/te3fcytNyp8MTbuiZIaueg2rgEvBuN55n04nwLYLU9TX/VVlusc9L2ZNXi99nUFNkHXtr5g==} + '@humanwhocodes/retry@0.4.1': + resolution: {integrity: sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==} engines: {node: '>=18.18'} '@ianvs/eslint-stats@2.0.0': @@ -2615,6 +2611,10 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + crypto-js@4.2.0: resolution: {integrity: sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==} @@ -3054,8 +3054,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.14.0: - resolution: {integrity: sha512-c2FHsVBr87lnUtjP4Yhvk4yEhKrQavGafRA/Se1ouse8PfbfC/Qh9Mxa00yWsZRlqeUB9raXip0aiiUZkgnr9g==} + eslint@9.15.0: + resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -6805,14 +6805,14 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.1(eslint@9.14.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0)': dependencies: - eslint: 9.14.0 + eslint: 9.15.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} - '@eslint/config-array@0.18.0': + '@eslint/config-array@0.19.0': dependencies: '@eslint/object-schema': 2.1.4 debug: 4.3.7 @@ -6820,7 +6820,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/core@0.7.0': {} + '@eslint/core@0.9.0': {} '@eslint/eslintrc@2.1.4': dependencies: @@ -6852,8 +6852,6 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.14.0': {} - '@eslint/js@9.15.0': {} '@eslint/object-schema@2.1.4': {} @@ -6899,7 +6897,7 @@ snapshots: '@humanwhocodes/retry@0.3.1': {} - '@humanwhocodes/retry@0.4.0': {} + '@humanwhocodes/retry@0.4.1': {} '@ianvs/eslint-stats@2.0.0': dependencies: @@ -7341,10 +7339,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.11.0(eslint@9.14.0)(typescript@5.6.3)': + '@stylistic/eslint-plugin@2.11.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/utils': 8.14.0(eslint@9.14.0)(typescript@5.6.3) - eslint: 9.14.0 + '@typescript-eslint/utils': 8.14.0(eslint@9.15.0)(typescript@5.6.3) + eslint: 9.15.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -7513,15 +7511,15 @@ snapshots: '@types/node': 22.9.0 optional: true - '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.14.0)(typescript@5.6.3))(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.15.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.15.0 - '@typescript-eslint/type-utils': 8.15.0(eslint@9.14.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.15.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.15.0 - eslint: 9.14.0 + eslint: 9.15.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -7531,14 +7529,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.15.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 8.15.0 '@typescript-eslint/types': 8.15.0 '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) '@typescript-eslint/visitor-keys': 8.15.0 debug: 4.3.7 - eslint: 9.14.0 + eslint: 9.15.0 optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -7554,12 +7552,12 @@ snapshots: '@typescript-eslint/types': 8.15.0 '@typescript-eslint/visitor-keys': 8.15.0 - '@typescript-eslint/type-utils@8.15.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.15.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.15.0(eslint@9.14.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) debug: 4.3.7 - eslint: 9.14.0 + eslint: 9.15.0 ts-api-utils: 1.4.0(typescript@5.6.3) optionalDependencies: typescript: 5.6.3 @@ -7600,24 +7598,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.14.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.14.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) '@typescript-eslint/scope-manager': 8.14.0 '@typescript-eslint/types': 8.14.0 '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) - eslint: 9.14.0 + eslint: 9.15.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.15.0(eslint@9.14.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.15.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) '@typescript-eslint/scope-manager': 8.15.0 '@typescript-eslint/types': 8.15.0 '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) - eslint: 9.14.0 + eslint: 9.15.0 optionalDependencies: typescript: 5.6.3 transitivePeerDependencies: @@ -8262,6 +8260,12 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + crypto-js@4.2.0: {} css-select@1.2.0: @@ -8626,18 +8630,18 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.14.0): + eslint-compat-utils@0.5.1(eslint@9.15.0): dependencies: - eslint: 9.14.0 + eslint: 9.15.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.14.0): + eslint-config-prettier@9.1.0(eslint@9.15.0): dependencies: - eslint: 9.14.0 + eslint: 9.15.0 - eslint-filtered-fix@0.3.0(eslint@9.14.0): + eslint-filtered-fix@0.3.0(eslint@9.15.0): dependencies: - eslint: 9.14.0 + eslint: 9.15.0 optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -8648,54 +8652,54 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.14.0): + eslint-nibble@8.1.0(eslint@9.15.0): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.14.0 - eslint-filtered-fix: 0.3.0(eslint@9.14.0) + eslint: 9.15.0 + eslint-filtered-fix: 0.3.0(eslint@9.15.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.14.0): + eslint-plugin-es-x@7.8.0(eslint@9.15.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) '@eslint-community/regexpp': 4.12.1 - eslint: 9.14.0 - eslint-compat-utils: 0.5.1(eslint@9.14.0) + eslint: 9.15.0 + eslint-compat-utils: 0.5.1(eslint@9.15.0) - eslint-plugin-n@17.13.2(eslint@9.14.0): + eslint-plugin-n@17.13.2(eslint@9.15.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) enhanced-resolve: 5.17.1 - eslint: 9.14.0 - eslint-plugin-es-x: 7.8.0(eslint@9.14.0) + eslint: 9.15.0 + eslint-plugin-es-x: 7.8.0(eslint@9.15.0) get-tsconfig: 4.8.1 globals: 15.12.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.14.0))(eslint@9.14.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.3.3): dependencies: - eslint: 9.14.0 + eslint: 9.15.0 prettier: 3.3.3 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 9.1.0(eslint@9.14.0) + eslint-config-prettier: 9.1.0(eslint@9.15.0) - eslint-plugin-unicorn@56.0.1(eslint@9.14.0): + eslint-plugin-unicorn@56.0.1(eslint@9.15.0): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.39.0 - eslint: 9.14.0 + eslint: 9.15.0 esquery: 1.6.0 globals: 15.12.0 indent-string: 4.0.0 @@ -8708,11 +8712,11 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-yml@1.15.0(eslint@9.14.0): + eslint-plugin-yml@1.15.0(eslint@9.15.0): dependencies: debug: 4.3.7 - eslint: 9.14.0 - eslint-compat-utils: 0.5.1(eslint@9.14.0) + eslint: 9.15.0 + eslint-compat-utils: 0.5.1(eslint@9.15.0) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.3 @@ -8781,23 +8785,23 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.14.0: + eslint@9.15.0: dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.14.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.18.0 - '@eslint/core': 0.7.0 + '@eslint/config-array': 0.19.0 + '@eslint/core': 0.9.0 '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.14.0 + '@eslint/js': 9.15.0 '@eslint/plugin-kit': 0.2.3 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 - '@humanwhocodes/retry': 0.4.0 + '@humanwhocodes/retry': 0.4.1 '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 debug: 4.3.7 escape-string-regexp: 4.0.0 eslint-scope: 8.2.0 @@ -8817,7 +8821,6 @@ snapshots: minimatch: 3.1.2 natural-compare: 1.4.0 optionator: 0.9.4 - text-table: 0.2.0 transitivePeerDependencies: - supports-color From a41cfc79ec93186793bf5b98a1c46cbd9a03edd3 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 19 Nov 2024 04:08:58 -0800 Subject: [PATCH 545/740] fix(youtube): handle empty channel (#17633) --- lib/routes/youtube/user.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/routes/youtube/user.ts b/lib/routes/youtube/user.ts index 3ff41c74035ba58..e8b4c0c62995c81 100644 --- a/lib/routes/youtube/user.ts +++ b/lib/routes/youtube/user.ts @@ -6,6 +6,7 @@ import { parseDate } from '@/utils/parse-date'; import ofetch from '@/utils/ofetch'; import * as cheerio from 'cheerio'; import ConfigNotFoundError from '@/errors/types/config-not-found'; +import NotFoundError from '@/errors/types/not-found'; export const route: Route = { path: '/user/:username/:embed?', @@ -73,14 +74,17 @@ async function handler(ctx) { } const playlistId = userHandleData?.playlistId || (await utils.getChannelWithUsername(username, 'contentDetails', cache)).data.items[0].contentDetails.relatedPlaylists.uploads; - const data = (await utils.getPlaylistItems(playlistId, 'snippet', cache)).data.items; + const playlistItems = await utils.getPlaylistItems(playlistId, 'snippet', cache); + if (!playlistItems) { + throw new NotFoundError("This channel doesn't have any content."); + } return { title: `${userHandleData?.channelName || username} - YouTube`, link: username.startsWith('@') ? `https://www.youtube.com/${username}` : `https://www.youtube.com/user/${username}`, description: userHandleData?.description || `YouTube user ${username}`, image: userHandleData?.image, - item: data + item: playlistItems.data.items .filter((d) => d.snippet.title !== 'Private video' && d.snippet.title !== 'Deleted video') .map((item) => { const snippet = item.snippet; From 63e4c925d7152f0f3130460bbd4095a4c9d46d2b Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Wed, 20 Nov 2024 08:08:43 +0800 Subject: [PATCH 546/740] fix(route/xiaohongshu): add current time as pubDate --- lib/routes/xiaohongshu/user.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/routes/xiaohongshu/user.ts b/lib/routes/xiaohongshu/user.ts index 1f0ae2470263157..ed595428d8be05c 100644 --- a/lib/routes/xiaohongshu/user.ts +++ b/lib/routes/xiaohongshu/user.ts @@ -2,6 +2,7 @@ import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import { getUser } from './util'; import InvalidParameterError from '@/errors/types/invalid-parameter'; +import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/user/:user_id/:category', @@ -57,6 +58,7 @@ async function handler(ctx) { description: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`, author: noteCard.user.nickname, upvotes: noteCard.interactInfo.likedCount, + pubDate: parseDate(new Date().toISOString()), })) ); const renderCollect = (collect) => { @@ -75,6 +77,7 @@ async function handler(ctx) { description: `<img src ="${item.cover.info_list.pop().url}"><br>${item.display_title}`, author: item.user.nickname, upvotes: item.interact_info.likedCount, + pubDate: parseDate(new Date().toISOString()), })); }; From 210f4d90d4fd895338ce23ba49cf3a2f07ddcdaf Mon Sep 17 00:00:00 2001 From: dandersch <59270379+dandersch@users.noreply.github.com> Date: Wed, 20 Nov 2024 04:26:09 +0100 Subject: [PATCH 547/740] feat(route/steam/search): add thumbnails to steam search items (#17638) Co-authored-by: dandersch <git@andersch.dev> --- lib/routes/steam/search.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/routes/steam/search.ts b/lib/routes/steam/search.ts index ed23b802877b347..8e6e13b680f37bf 100644 --- a/lib/routes/steam/search.ts +++ b/lib/routes/steam/search.ts @@ -34,6 +34,8 @@ 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) { const bundle = JSON.parse($el.attr('data-ds-bundle-data')); @@ -57,6 +59,11 @@ async function handler(ctx) { title: $el.find('span.title').text(), link: $el.attr('href'), description: desc.replaceAll('\n', '<br>'), + media: { + thumbnail: { + url: `https://shared.akamai.steamstatic.com/store_item_assets/steam/apps/${appID}/header.jpg`, + }, + }, }; }) .filter((it) => it.title), From 7e5502f1617d390efd3d4b338823313c5bc1bd9a Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 03:28:26 +0000 Subject: [PATCH 548/740] style: auto format --- lib/routes/steam/search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/steam/search.ts b/lib/routes/steam/search.ts index 8e6e13b680f37bf..88d20a28412b037 100644 --- a/lib/routes/steam/search.ts +++ b/lib/routes/steam/search.ts @@ -34,7 +34,7 @@ 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'); + const appID: string | undefined = $el.attr('data-ds-appid'); let desc = ''; if (isBundle) { From 6b6837567cb4255ed7d90e36be17c858df96b849 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 19 Nov 2024 22:52:02 -0800 Subject: [PATCH 549/740] fix: radar rules (#17639) - remove search parameters in source - maintain the same hostname in `source` of each radar rule --- lib/routes/asus/bios.ts | 1 - lib/routes/bing/daily-wallpaper.ts | 6 +- lib/routes/ccfa/index.ts | 22 ++++---- lib/routes/cpcaauto/index.ts | 44 +++++++-------- lib/routes/ecnu/jwc.ts | 6 +- lib/routes/gov/cbirc/index.ts | 70 ++++++++++++------------ lib/routes/hket/index.ts | 14 ++++- lib/routes/hunau/gfxy/index.ts | 2 +- lib/routes/hunau/ied.ts | 2 +- lib/routes/hunau/jwc.ts | 2 +- lib/routes/hunau/xky/index.ts | 2 +- lib/routes/joins/chinese.ts | 26 ++++----- lib/routes/stbu/jsjxy.ts | 5 +- lib/routes/yahoo/news/listid.ts | 5 +- lib/routes/yahoo/news/provider-helper.ts | 5 +- lib/routes/yahoo/news/provider.ts | 5 +- lib/routes/zjut/cs/index.ts | 2 +- 17 files changed, 125 insertions(+), 94 deletions(-) diff --git a/lib/routes/asus/bios.ts b/lib/routes/asus/bios.ts index adc9fd6c2700a08..2bd81a185d50129 100644 --- a/lib/routes/asus/bios.ts +++ b/lib/routes/asus/bios.ts @@ -91,7 +91,6 @@ export const route: Route = { 'www.asus.com/:region/laptops/:productLine/:series/:model', 'www.asus.com/:region/motherboards-components/:productLine/:series/:model', 'www.asus.com/:region/networking-iot-servers/:productLine/:series/:model', - 'asus.com.cn/', ], target: '/bios/:model', }, diff --git a/lib/routes/bing/daily-wallpaper.ts b/lib/routes/bing/daily-wallpaper.ts index 7d6051b78daef6c..4545b273ad67ee6 100644 --- a/lib/routes/bing/daily-wallpaper.ts +++ b/lib/routes/bing/daily-wallpaper.ts @@ -10,7 +10,11 @@ export const route: Route = { }, radar: [ { - source: ['www.bing.com/', 'cn.bing.com/'], + source: ['www.bing.com/'], + target: '', + }, + { + source: ['cn.bing.com/'], target: '', }, ], diff --git a/lib/routes/ccfa/index.ts b/lib/routes/ccfa/index.ts index 13b9ebab34f214e..f3f870eed38f1db 100644 --- a/lib/routes/ccfa/index.ts +++ b/lib/routes/ccfa/index.ts @@ -159,57 +159,57 @@ export const route: Route = { }, { title: '协会动态', - source: ['www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=1'], + source: ['www.ccfa.org.cn/portal/cn/xiehui_list.jsp'], target: '/1', }, { title: '行业动态', - source: ['www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=2'], + source: ['www.ccfa.org.cn/portal/cn/xiehui_list.jsp'], target: '/2', }, { title: '政策/报告/标准', - source: ['www.ccfa.org.cn/portal/cn/hybz_list.jsp?type=33'], + source: ['www.ccfa.org.cn/portal/cn/hybz_list.jsp'], target: '/33', }, { title: '行业统计', - source: ['www.ccfa.org.cn/portal/cn/lsbq.jsp?type=10003'], + source: ['www.ccfa.org.cn/portal/cn/lsbq.jsp'], target: '/10003', }, { title: '创新案例', - source: ['www.ccfa.org.cn/portal/cn/hybzs_list.jsp?type=10004'], + source: ['www.ccfa.org.cn/portal/cn/hybzs_list.jsp'], target: '/10004', }, { title: '党建工作', - source: ['www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=7'], + source: ['www.ccfa.org.cn/portal/cn/xiehui_list.jsp'], target: '/7', }, { title: '新消费论坛', - source: ['www.ccfa.org.cn/portal/cn/xiehui_list.jsp?type=10005'], + source: ['www.ccfa.org.cn/portal/cn/xiehui_list.jsp'], target: '/10005', }, { title: '政策/报告/标准 - 行业报告', - source: ['www.ccfa.org.cn/portal/cn/hybz_list.jsp?type=33'], + source: ['www.ccfa.org.cn/portal/cn/hybz_list.jsp'], target: '/33', }, { title: '政策/报告/标准 - 行业标准', - source: ['www.ccfa.org.cn/portal/cn/hybz_list.jsp?type=34'], + source: ['www.ccfa.org.cn/portal/cn/hybz_list.jsp'], target: '/34', }, { title: '政策/报告/标准 - 行业政策', - source: ['www.ccfa.org.cn/portal/cn/fangyizhuanqu_list.jsp?type=39'], + source: ['www.ccfa.org.cn/portal/cn/fangyizhuanqu_list.jsp'], target: '/39', }, { title: '政策/报告/标准 - 政策权威解读', - source: ['www.ccfa.org.cn/portal/cn/fangyizhuanqu_list.jsp?type=40'], + source: ['www.ccfa.org.cn/portal/cn/fangyizhuanqu_list.jsp'], target: '/40', }, ], diff --git a/lib/routes/cpcaauto/index.ts b/lib/routes/cpcaauto/index.ts index 357b14204dc0a4e..296999fade54bfc 100644 --- a/lib/routes/cpcaauto/index.ts +++ b/lib/routes/cpcaauto/index.ts @@ -143,112 +143,112 @@ export const route: Route = { }, { title: '行业新闻 - 国内乘用车', - source: ['cpcaauto.com/news.php?types=news&anid=10'], + source: ['cpcaauto.com/news.php'], target: '/news/news/10', }, { title: '行业新闻 - 进口及国外乘用车', - source: ['cpcaauto.com/news.php?types=news&anid=64'], + source: ['cpcaauto.com/news.php'], target: '/news/news/64', }, { title: '行业新闻 - 后市场', - source: ['cpcaauto.com/news.php?types=news&anid=44'], + source: ['cpcaauto.com/news.php'], target: '/news/news/44', }, { title: '行业新闻 - 商用车', - source: ['cpcaauto.com/news.php?types=news&anid=62'], + source: ['cpcaauto.com/news.php'], target: '/news/news/62', }, { title: '车市解读 - 周度', - source: ['cpcaauto.com/news.php?types=csjd&anid=128'], + source: ['cpcaauto.com/news.php'], target: '/news/csjd/128', }, { title: '车市解读 - 月度', - source: ['cpcaauto.com/news.php?types=csjd&anid=129'], + source: ['cpcaauto.com/news.php'], target: '/news/csjd/129', }, { title: '车市解读 - 指数', - source: ['cpcaauto.com/news.php?types=csjd&anid=130'], + source: ['cpcaauto.com/news.php'], target: '/news/csjd/130', }, { title: '车市解读 - 预测', - source: ['cpcaauto.com/news.php?types=csjd&anid=131'], + source: ['cpcaauto.com/news.php'], target: '/news/csjd/131', }, { title: '发布会报告 - 上海市场上牌数', - source: ['cpcaauto.com/news.php?types=bgzl&anid=119'], + source: ['cpcaauto.com/news.php'], target: '/news/bgzl/119', }, { title: '发布会报告 - 京城车市', - source: ['cpcaauto.com/news.php?types=bgzl&anid=122'], + source: ['cpcaauto.com/news.php'], target: '/news/bgzl/122', }, { title: '发布会报告 - 进口车市场分析', - source: ['cpcaauto.com/news.php?types=bgzl&anid=120'], + source: ['cpcaauto.com/news.php'], target: '/news/bgzl/120', }, { title: '发布会报告 - 二手车市场分析', - source: ['cpcaauto.com/news.php?types=bgzl&anid=121'], + source: ['cpcaauto.com/news.php'], target: '/news/bgzl/121', }, { title: '发布会报告 - 价格指数', - source: ['cpcaauto.com/news.php?types=bgzl&anid=124'], + source: ['cpcaauto.com/news.php'], target: '/news/bgzl/124', }, { title: '发布会报告 - 热点评述', - source: ['cpcaauto.com/news.php?types=bgzl&anid=125'], + source: ['cpcaauto.com/news.php'], target: '/news/bgzl/125', }, { title: '发布会报告 - 新能源月报', - source: ['cpcaauto.com/news.php?types=bgzl&anid=126'], + source: ['cpcaauto.com/news.php'], target: '/news/bgzl/126', }, { title: '发布会报告 - 商用车月报', - source: ['cpcaauto.com/news.php?types=bgzl&anid=127'], + source: ['cpcaauto.com/news.php'], target: '/news/bgzl/127', }, { title: '发布会报告 - 政策分析', - source: ['cpcaauto.com/news.php?types=bgzl&anid=123'], + source: ['cpcaauto.com/news.php'], target: '/news/bgzl/123', }, { title: '经济与政策 - 一周经济', - source: ['cpcaauto.com/news.php?types=meeting&anid=46'], + source: ['cpcaauto.com/news.php'], target: '/news/meeting/46', }, { title: '经济与政策 - 一周政策', - source: ['cpcaauto.com/news.php?types=meeting&anid=47'], + source: ['cpcaauto.com/news.php'], target: '/news/meeting/47', }, { title: '乘联会论坛 - 论坛文章', - source: ['cpcaauto.com/news.php?types=yjsy&anid=49'], + source: ['cpcaauto.com/news.php'], target: '/news/yjsy/49', }, { title: '乘联会论坛 - 两会', - source: ['cpcaauto.com/news.php?types=yjsy&anid=111'], + source: ['cpcaauto.com/news.php'], target: '/news/yjsy/111', }, { title: '乘联会论坛 - 车展看点', - source: ['cpcaauto.com/news.php?types=yjsy&anid=113'], + source: ['cpcaauto.com/news.php'], target: '/news/yjsy/113', }, ], diff --git a/lib/routes/ecnu/jwc.ts b/lib/routes/ecnu/jwc.ts index 2b9ceab017aa156..161f03085b9beff 100644 --- a/lib/routes/ecnu/jwc.ts +++ b/lib/routes/ecnu/jwc.ts @@ -13,7 +13,11 @@ export const route: Route = { example: '/ecnu/jwc', radar: [ { - source: ['www.jwc.ecnu.edu.cn', 'www.ecnu.edu.cn'], + source: ['www.jwc.ecnu.edu.cn'], + target: '/tzgg', + }, + { + source: ['www.ecnu.edu.cn'], target: '/tzgg', }, ], diff --git a/lib/routes/gov/cbirc/index.ts b/lib/routes/gov/cbirc/index.ts index e7ef41f0ea1bf85..2473896074ecded 100644 --- a/lib/routes/gov/cbirc/index.ts +++ b/lib/routes/gov/cbirc/index.ts @@ -110,7 +110,7 @@ export const route: Route = { description: `:::tip 若订阅 [监管动态](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=971&itemId=972&itemUrl=sss) | [法律声明](https://www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=971&itemId=4128&itemUrl=ItemListRightArticle.html) | @@ -194,67 +194,67 @@ export const route: Route = { }, { title: '首页 - 弹出公告', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=971&itemId=972&itemUrl=sss'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/972', }, { title: '首页 - 法律声明', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=971&itemId=4128&itemUrl=ItemListRightArticle.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/4128', }, { title: '机构概况 - 主要职责', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=901&itemUrl=ItemListRightArticle.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/901', }, { title: '机构概况 - 总局领导', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=902&itemUrl=jigougaikuang/huilingdao.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/902', }, { title: '机构概况 - 内设机构', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=911&itemUrl=jigougaikuang/neishejigou.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/911', }, { title: '机构概况 - 直属行政机构', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=4243&itemUrl=jigougaikuang/zhishuxingzhengjigou.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/4243', }, { title: '机构概况 - 派出机构', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=912&itemUrl=jigougaikuang/paichujigou.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/912', }, { title: '机构概况 - 联系方式', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=900&itemId=913&itemUrl=jigougaikuang/lianxifangshi.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/913', }, { title: '新闻资讯 - 监管动态', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=915&itemUrl=ItemListRightList.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/915', }, { title: '新闻资讯 - 政策解读', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=916&itemUrl=ItemListRightMore.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/916', }, { title: '新闻资讯 - 领导活动及讲话', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=919&itemUrl=ItemListRightList.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/919', }, { title: '新闻资讯 - 新闻发布会及访谈', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=920&itemUrl=xinwenzixun/xinwenfabu.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/920', }, { title: '新闻资讯 - 新闻发言人', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=914&itemId=921&itemUrl=xinwenzixun/xinwenfayan.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/921', }, { @@ -264,107 +264,107 @@ export const route: Route = { }, { title: '政务信息 - 公告通知', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=925&itemUrl=ItemListRightList.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/925', }, { title: '政务信息 - 政策法规', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=926&itemUrl=ItemListRightMore.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/926', }, { title: '政务信息 - 行政许可', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=930&itemUrl=zhengwuxinxi/xingzhengxuke.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/930', }, { title: '政务信息 - 行政处罚', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=931&itemUrl=zhengwuxinxi/xingzhengchufa.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/931', }, { title: '政务信息 - 行政监管措施', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=932&itemUrl=ItemListRightList.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/932', }, { title: '政务信息 - 人事信息', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=923&itemId=933&itemUrl=ItemListRightList.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/933', }, { title: '在线服务 - 行政许可办事服务指南', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=937&itemId=938&itemUrl=zaixianfuwu/banshifuwu.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/938', }, { title: '在线服务 - 查询服务', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=937&itemId=939&itemUrl=zaixianfuwu/chaxunfuwu.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/939', }, { title: '互动交流 - 政务咨询', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=945&itemId=946&itemUrl=tosubmenu:hudongjiaoliu/woyaozixun.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/946', }, { title: '互动交流 - 征集调查', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=945&itemId=950&itemUrl=ItemListRightMore.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/950', }, { title: '互动交流 - 国务院办公厅开通“国家政务服务投诉与建议”小程序', - source: ['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'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/952', }, { title: '统计数据 - 统计信息', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=953&itemId=954&itemUrl=ItemListRightList.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/954', }, { title: '统计数据 - 数据图表', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=953&itemId=955&itemUrl=tosubmenu:tongjishuju/zongzichan.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/955', }, { title: '专题专栏 - 推进普惠金融高质量发展', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4234&itemUrl=ItemListRightMore.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/4234', }, { title: '专题专栏 - 防范和处置非法集资', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=963&itemUrl=ItemListRightMore.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/963', }, { title: '专题专栏 - 消费者保护', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4097&itemUrl=ItemListRightMore.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/4097', }, { title: '专题专栏 - 法治宣传', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4106&itemUrl=ItemListRightMore.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/4106', }, { title: '专题专栏 - 政府网站年度报表', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=970&itemUrl=ItemListRightList.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/970', }, { title: '专题专栏 - 服务民营企业', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4171&itemUrl=ItemListRightList.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/4171', }, { title: '专题专栏 - 服务制造业发展', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4217&itemUrl=ItemListRightList.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/4217', }, { title: '专题专栏 - 学习贯彻习近平新时代中国特色社会主义思想主题教育', - source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html?itemPId=960&itemId=4229&itemUrl=ItemListRightMore.html'], + source: ['www.cbirc.gov.cn/cn/view/pages/ItemList.html'], target: '/cbirc/4229', }, ], diff --git a/lib/routes/hket/index.ts b/lib/routes/hket/index.ts index 39d751cf084658f..a44641bfb9f9bf6 100644 --- a/lib/routes/hket/index.ts +++ b/lib/routes/hket/index.ts @@ -40,7 +40,19 @@ export const route: Route = { }, radar: [ { - source: ['china.hket.com/:category/*', 'inews.hket.com/:category/*', 'topick.hket.com/:category/*', 'wealth.hket.com/:category/*'], + source: ['china.hket.com/:category/*'], + target: '/:category', + }, + { + source: ['inews.hket.com/:category/*'], + target: '/:category', + }, + { + source: ['topick.hket.com/:category/*'], + target: '/:category', + }, + { + source: ['wealth.hket.com/:category/*'], target: '/:category', }, { diff --git a/lib/routes/hunau/gfxy/index.ts b/lib/routes/hunau/gfxy/index.ts index 93477785ee2b4a6..d65aff853e7b380 100644 --- a/lib/routes/hunau/gfxy/index.ts +++ b/lib/routes/hunau/gfxy/index.ts @@ -16,7 +16,7 @@ export const route: Route = { }, radar: [ { - source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cntzgg_8472', 'xky.hunau.edu.cn/:category'], + source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cn/tzgg_8472', 'xky.hunau.edu.cn/:category'], target: '/:category', }, ], diff --git a/lib/routes/hunau/ied.ts b/lib/routes/hunau/ied.ts index 676e7779aeeeb01..f0887a380b60d4e 100644 --- a/lib/routes/hunau/ied.ts +++ b/lib/routes/hunau/ied.ts @@ -16,7 +16,7 @@ export const route: Route = { }, radar: [ { - source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cntzgg_8472', 'xky.hunau.edu.cn/:category'], + source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cn/tzgg_8472', 'xky.hunau.edu.cn/:category'], target: '/:category', }, ], diff --git a/lib/routes/hunau/jwc.ts b/lib/routes/hunau/jwc.ts index 939577a7d8ee8d3..0f01859e8292d76 100644 --- a/lib/routes/hunau/jwc.ts +++ b/lib/routes/hunau/jwc.ts @@ -16,7 +16,7 @@ export const route: Route = { }, radar: [ { - source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cntzgg_8472', 'xky.hunau.edu.cn/:category'], + source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cn/tzgg_8472', 'xky.hunau.edu.cn/:category'], target: '/:category', }, ], diff --git a/lib/routes/hunau/xky/index.ts b/lib/routes/hunau/xky/index.ts index c3b91012843b120..6ebd135f0bd404f 100644 --- a/lib/routes/hunau/xky/index.ts +++ b/lib/routes/hunau/xky/index.ts @@ -16,7 +16,7 @@ export const route: Route = { }, radar: [ { - source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cntzgg_8472', 'xky.hunau.edu.cn/:category'], + source: ['xky.hunau.edu.cn/', 'xky.hunau.edu.cn/tzgg_8472', 'xky.hunau.edu.cn/:category'], target: '/:category', }, ], diff --git a/lib/routes/joins/chinese.ts b/lib/routes/joins/chinese.ts index 7ff4002bfd7d9e2..3ca47ab99ae8b90 100644 --- a/lib/routes/joins/chinese.ts +++ b/lib/routes/joins/chinese.ts @@ -151,67 +151,67 @@ export const route: Route = { }, { title: '财经', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N1'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N1', }, { title: '国际', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N2'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N2', }, { title: '北韩', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N3'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N3', }, { title: '政治·社会', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N4'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N4', }, { title: '中国观察', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N5'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N5', }, { title: '社论', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N26'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N26', }, { title: '专栏·观点', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N11'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N11', }, { title: '军事·科技', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N6'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N6', }, { title: '娱乐体育', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N7'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N7', }, { title: '教育', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N8'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N8', }, { title: '旅游美食', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N9'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N9', }, { title: '时尚', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N10'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N10', }, { title: '图集', - source: ['chinese.joins.com/news/articleList.html?sc_section_code=S1N12'], + source: ['chinese.joins.com/news/articleList.html'], target: '/chinese/S1N12', }, ], diff --git a/lib/routes/stbu/jsjxy.ts b/lib/routes/stbu/jsjxy.ts index 2f4a8333f8187df..985b05cddae6c07 100644 --- a/lib/routes/stbu/jsjxy.ts +++ b/lib/routes/stbu/jsjxy.ts @@ -22,7 +22,10 @@ export const route: Route = { }, radar: [ { - source: ['jsjxy.stbu.edu.cn/news', 'jsjxy.stbu.edu.cn', 'stbu.edu.cn'], + source: ['jsjxy.stbu.edu.cn/news', 'jsjxy.stbu.edu.cn'], + }, + { + source: ['stbu.edu.cn'], }, ], name: '计算机学院 - 通知公告', diff --git a/lib/routes/yahoo/news/listid.ts b/lib/routes/yahoo/news/listid.ts index d2273142b304297..834287565787929 100644 --- a/lib/routes/yahoo/news/listid.ts +++ b/lib/routes/yahoo/news/listid.ts @@ -18,7 +18,10 @@ export const route: Route = { }, radar: [ { - source: ['hk.news.yahoo.com/', 'tw.news.yahoo.com/'], + source: ['hk.news.yahoo.com/'], + }, + { + source: ['tw.news.yahoo.com/'], }, ], name: '合作媒體', diff --git a/lib/routes/yahoo/news/provider-helper.ts b/lib/routes/yahoo/news/provider-helper.ts index 3ff3e0c4c4b69bb..505968c4e59f6e1 100644 --- a/lib/routes/yahoo/news/provider-helper.ts +++ b/lib/routes/yahoo/news/provider-helper.ts @@ -18,7 +18,10 @@ export const route: Route = { }, radar: [ { - source: ['hk.news.yahoo.com/', 'tw.news.yahoo.com/'], + source: ['hk.news.yahoo.com/'], + }, + { + source: ['tw.news.yahoo.com/'], }, ], name: '新聞來源列表', diff --git a/lib/routes/yahoo/news/provider.ts b/lib/routes/yahoo/news/provider.ts index bec0e7e060b6c0b..8b737387b555336 100644 --- a/lib/routes/yahoo/news/provider.ts +++ b/lib/routes/yahoo/news/provider.ts @@ -18,7 +18,10 @@ export const route: Route = { }, radar: [ { - source: ['hk.news.yahoo.com/', 'tw.news.yahoo.com/'], + source: ['hk.news.yahoo.com/'], + }, + { + source: ['tw.news.yahoo.com/'], }, ], name: '新聞來源', diff --git a/lib/routes/zjut/cs/index.ts b/lib/routes/zjut/cs/index.ts index 7ccdf383f8f427b..bc55eb701e1ac3d 100644 --- a/lib/routes/zjut/cs/index.ts +++ b/lib/routes/zjut/cs/index.ts @@ -27,7 +27,7 @@ export const route: Route = { handler, radar: [ { - source: ['cs.zjut.edu.cn/jsp/newsclass.jsp?wcId=:type'], + source: ['cs.zjut.edu.cn/jsp/newsclass.jsp'], target: '/cs/:type', }, ], From 6940c4abe6e1ad28a57863b5442ed7134f48988a Mon Sep 17 00:00:00 2001 From: Keo <keocheung@outlook.com> Date: Wed, 20 Nov 2024 15:24:32 +0800 Subject: [PATCH 550/740] feat(route): add idolmaster news (#17619) * feat(route): add idolmaster * fix toUpperCase * fix indent * Update lib/routes/idolmaster/news.ts * fix var name --------- --- lib/routes/idolmaster/namespace.ts | 7 ++ lib/routes/idolmaster/news.ts | 112 +++++++++++++++++++++++++++++ 2 files changed, 119 insertions(+) create mode 100644 lib/routes/idolmaster/namespace.ts create mode 100644 lib/routes/idolmaster/news.ts diff --git a/lib/routes/idolmaster/namespace.ts b/lib/routes/idolmaster/namespace.ts new file mode 100644 index 000000000000000..a96677ca3e42b1c --- /dev/null +++ b/lib/routes/idolmaster/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'アイドルマスター THE IDOLM@STER', + url: 'idolmaster-official.jp', + lang: 'ja', +}; diff --git a/lib/routes/idolmaster/news.ts b/lib/routes/idolmaster/news.ts new file mode 100644 index 000000000000000..a3c3d39affc6858 --- /dev/null +++ b/lib/routes/idolmaster/news.ts @@ -0,0 +1,112 @@ +import { Route, Data, DataItem } from '@/types'; +import type { Context } from 'hono'; +import got from '@/utils/got'; +import querystring from 'querystring'; +import timezone from '@/utils/timezone'; +import { parseDate } from '@/utils/parse-date'; +import cache from '@/utils/cache'; +import { load } from 'cheerio'; + +export const route: Route = { + url: 'idolmaster-official.jp/news', + path: '/news/:routeParams?', + categories: ['anime'], + example: '/idolmaster/news/brand=MILLIONLIVE&brand=SHINYCOLORS&category=GAME&category=ANIME', + parameters: { + routeParams: 'The `brand` and `category` params in the path. The available values are as follows.', + }, + description: `**Brand** +| THE IDOLM@STER | シンデレラガールズ | ミリオンライブ! | SideM | シャイニーカラーズ | 学園アイドルマスター | その他 | +| -------------- | --------------- | ------------- | ----- | --------------- | ----------------- | ----- | +| IDOLMASTER | CINDERELLAGIRLS | MILLIONLIVE | SIDEM | SHINYCOLORS | OTHER | + +**Category** +| ゲーム | ライブ・イベント | アニメ | 配信番組 | ラジオ | グッズ | コラボ・キャンペーン | ミュージック | ブック・コミック | メディア | その他 | +| ----- | ------------- | ----- | ------- | ----- | ----- | ----------------- | --------- | -------------- | ------ | ----- | +| GAME | LIVE-EVENT | ANIME | LIVESTREAM | RADIO | GOODS | COLLABO-CAMP | CD | BOOK | MEDIA | OTHER | + `, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['idolmaster-official.jp/news'], + target: '/news', + }, + ], + name: 'ニュース News', + maintainers: ['keocheung'], + handler, +}; + +const apiUrl = 'https://cmsapi-frontend.idolmaster-official.jp'; + +async function handler(ctx: Context): Promise<Data> { + const tokenUrl = `${apiUrl}/sitern/api/cmsbase/Token/get`; + const tokenRsp = await got(tokenUrl); + const token = tokenRsp.data.data.token; + + const options: { + category: string[]; + subcategory?: string | string[]; + brand?: string | string[]; + } = { + category: ['NEWS'], + }; + + const routeParams = ctx.req.param('routeParams'); + if (routeParams) { + const queries = querystring.parse(routeParams); + options.subcategory = toUpperCase(queries.category); + options.brand = toUpperCase(queries.brand); + } + + const limitParam = ctx.req.query('limit'); + let limit = limitParam ? Number.parseInt(limitParam) : 12; + if (limit > 30) { + limit = 30; + } + const listUrl = `${apiUrl}/sitern/api/idolmaster/Article/list?site=jp&ip=idolmaster&token=${token}&sort=desc&data=${JSON.stringify(options)}&limit=${limit}&start=0`; + const listnRsp = await got(listUrl); + const articleList = listnRsp.data.data.article_list; + + let items = articleList.map( + (article): DataItem => ({ + title: article.title, + link: article.url, + pubDate: timezone(parseDate(article.dspdate), +9), + category: article.categories.subcategory.map((cat) => cat.name), + }) + ); + + items = await Promise.all( + items.map((item: DataItem) => + cache.tryGet(item.link, async () => { + const rsp = await got(item.link); + const content = load(rsp.data); + const nextData = JSON.parse(content('script#__NEXT_DATA__').text()); + item.description = `<div lang="ja">${nextData.props.pageProps.data.content?.replaceAll('<img src="', `<img src="${apiUrl}/sitern/api/idolmaster/Image/get?path=`)}</div>`; + return item; + }) + ) + ); + + return { + title: 'NEWS | アイドルマスター', + link: 'https://idolmaster-official.jp/news', + item: items, + language: 'ja', + }; +} + +function toUpperCase(input: string | string[] | undefined): string | string[] | undefined { + if (!input) { + return input; + } + return typeof input === 'string' ? input.toUpperCase() : input.map((item) => item.toUpperCase()); +} From 1db3f63c08e4d4c0a50f70730b9c5db25d0b8efc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 08:25:18 +0000 Subject: [PATCH 551/740] chore(deps-dev): bump vite-tsconfig-paths from 5.1.2 to 5.1.3 (#17641) Bumps [vite-tsconfig-paths](https://github.com/aleclarson/vite-tsconfig-paths) from 5.1.2 to 5.1.3. - [Release notes](https://github.com/aleclarson/vite-tsconfig-paths/releases) - [Commits](https://github.com/aleclarson/vite-tsconfig-paths/compare/v5.1.2...v5.1.3) --- updated-dependencies: - dependency-name: vite-tsconfig-paths dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 4f9537a57f1edad..30d7f9b51803140 100644 --- a/package.json +++ b/package.json @@ -192,7 +192,7 @@ "supertest": "7.0.0", "typescript": "5.6.3", "unified": "11.0.5", - "vite-tsconfig-paths": "5.1.2", + "vite-tsconfig-paths": "5.1.3", "vitest": "2.0.5", "yaml-eslint-parser": "1.2.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70997f662e2afc5..3e219f96aa09468 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -433,8 +433,8 @@ importers: specifier: 11.0.5 version: 11.0.5 vite-tsconfig-paths: - specifier: 5.1.2 - version: 5.1.2(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)) + specifier: 5.1.3 + version: 5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)) vitest: specifier: 2.0.5 version: 2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -5628,8 +5628,8 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-tsconfig-paths@5.1.2: - resolution: {integrity: sha512-gEIbKfJzSEv0yR3XS2QEocKetONoWkbROj6hGx0FHM18qKUojhvcokQsxQx5nMkelZq2n37zbSGCJn+FSODSjA==} + vite-tsconfig-paths@5.1.3: + resolution: {integrity: sha512-0bz+PDlLpGfP2CigeSKL9NFTF1KtXkeHGZSSaGQSuPZH77GhoiQaA8IjYgOaynSuwlDTolSUEU0ErVvju3NURg==} peerDependencies: vite: '*' peerDependenciesMeta: @@ -11619,7 +11619,7 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.2(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)): + vite-tsconfig-paths@5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)): dependencies: debug: 4.3.7 globrex: 0.1.2 From 7abdf56f739e6bd440d5060a6b413b9980d41288 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 08:27:07 +0000 Subject: [PATCH 552/740] chore(deps): bump telegram from 2.26.6 to 2.26.8 (#17642) Bumps [telegram](https://github.com/gram-js/gramjs) from 2.26.6 to 2.26.8. - [Release notes](https://github.com/gram-js/gramjs/releases) - [Commits](https://github.com/gram-js/gramjs/commits) --- updated-dependencies: - dependency-name: telegram dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 30d7f9b51803140..0bd8a92a970d120 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "simplecc-wasm": "1.1.0", "socks-proxy-agent": "8.0.4", "source-map": "0.7.4", - "telegram": "2.26.6", + "telegram": "2.26.8", "tiny-async-pool": "2.1.0", "title": "3.5.3", "tldts": "6.1.61", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3e219f96aa09468..388c656822fe97c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -225,8 +225,8 @@ importers: specifier: 0.7.4 version: 0.7.4 telegram: - specifier: 2.26.6 - version: 2.26.6 + specifier: 2.26.8 + version: 2.26.8 tiny-async-pool: specifier: 2.1.0 version: 2.1.0 @@ -5284,8 +5284,8 @@ packages: resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} - telegram@2.26.6: - resolution: {integrity: sha512-2nZGL3ADRnEoWV0NMH4E+rhPFSD03HQ1ugTHJqpZR2l0iPz5m8TfD+fWoicfe8sltpCcj7nLmNsiEf5ExX/eGA==} + telegram@2.26.8: + resolution: {integrity: sha512-5sIb43Fd7HxjXQZqKWMhNTmdMOlG3QkuhR2xPleUA5B8BxOZl9IwrDwFdiC7aezGVTcD6oJ1d4cloUySjmCX/A==} test-exclude@7.0.1: resolution: {integrity: sha512-pFYqmTw68LXVjeWJMST4+borgQP2AyMNbg1BpZh9LbyhUeNkeaPF9gzfPGUAnSMV3qPYdWUwDIjjCLiSDOl7vg==} @@ -11303,7 +11303,7 @@ snapshots: mkdirp: 1.0.4 yallist: 4.0.0 - telegram@2.26.6: + telegram@2.26.8: dependencies: '@cryptography/aes': 0.1.1 async-mutex: 0.3.2 From be599db1054c5bd37ad79253914c147f9d0801f0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 08:27:09 +0000 Subject: [PATCH 553/740] chore(deps): bump re2js from 0.4.2 to 0.4.3 (#17643) Bumps [re2js](https://github.com/le0pard/re2js) from 0.4.2 to 0.4.3. - [Release notes](https://github.com/le0pard/re2js/releases) - [Commits](https://github.com/le0pard/re2js/compare/0.4.2...0.4.3) --- updated-dependencies: - dependency-name: re2js dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 0bd8a92a970d120..64e7aef29a9b608 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "puppeteer-extra-plugin-user-preferences": "2.4.1", "query-string": "9.1.1", "rate-limiter-flexible": "5.0.4", - "re2js": "0.4.2", + "re2js": "0.4.3", "rfc4648": "1.5.3", "rss-parser": "3.13.0", "sanitize-html": "2.13.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 388c656822fe97c..4ba9a34a1c5e917 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -204,8 +204,8 @@ importers: specifier: 5.0.4 version: 5.0.4 re2js: - specifier: 0.4.2 - version: 0.4.2 + specifier: 0.4.3 + version: 0.4.3 rfc4648: specifier: 1.5.3 version: 1.5.3 @@ -4808,8 +4808,8 @@ packages: rate-limiter-flexible@5.0.4: resolution: {integrity: sha512-ftYHrIfSqWYDIJZ4yPTrgOduByAp+86gUS9iklv0JoXVM8eQCAjTnydCj1hAT4MmhmkSw86NaFEJ28m/LC1pKA==} - re2js@0.4.2: - resolution: {integrity: sha512-wuv0p0BGbrVIkobV8zh82WjDurXko0QNCgaif6DdRAljgVm2iio4PVYCwjAxGaWen1/QZXWDM67dIslmz7AIbA==} + re2js@0.4.3: + resolution: {integrity: sha512-EuNmh7jurhHEE8Ge/lBo9JuMLb3qf866Xjjfyovw3wPc7+hlqDkZq4LwhrCQMEI+ARWfrKrHozEndzlpNT0WDg==} read-pkg-up@7.0.1: resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} @@ -10788,7 +10788,7 @@ snapshots: rate-limiter-flexible@5.0.4: {} - re2js@0.4.2: {} + re2js@0.4.3: {} read-pkg-up@7.0.1: dependencies: From 403bf3a95030abc90a2379b8a6b878252c0faf51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 08:27:19 +0000 Subject: [PATCH 554/740] chore(deps): bump hono from 4.6.10 to 4.6.11 (#17646) Bumps [hono](https://github.com/honojs/hono) from 4.6.10 to 4.6.11. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.10...v4.6.11) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 64e7aef29a9b608..1e705096619ab81 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.10", + "hono": "4.6.11", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4ba9a34a1c5e917..86df703d89d4631 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,10 +19,10 @@ importers: version: 4.1.1 '@hono/node-server': specifier: 1.13.7 - version: 1.13.7(hono@4.6.10) + version: 1.13.7(hono@4.6.11) '@hono/zod-openapi': specifier: 0.18.0 - version: 0.18.0(hono@4.6.10)(zod@3.23.8) + version: 0.18.0(hono@4.6.11)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -55,7 +55,7 @@ importers: version: 0.0.23 '@scalar/hono-api-reference': specifier: 0.5.159 - version: 0.5.159(hono@4.6.10) + version: 0.5.159(hono@4.6.11) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -114,8 +114,8 @@ importers: specifier: 144.0.0 version: 144.0.0 hono: - specifier: 4.6.10 - version: 4.6.10 + specifier: 4.6.11 + version: 4.6.11 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3488,8 +3488,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.10: - resolution: {integrity: sha512-IXXNfRAZEahFnWBhUUlqKEGF9upeE6hZoRZszvNkyAz/CYp+iVbxm3viMvStlagRJohjlBRGOQ7f4jfcV0XMGg==} + hono@4.6.11: + resolution: {integrity: sha512-f0LwJQFKdUUrCUAVowxSvNCjyzI7ZLt8XWYU/EApyeq5FfOvHFarBaE5rjU9HTNFk4RI0FkdB2edb3p/7xZjzQ==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6860,20 +6860,20 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.7(hono@4.6.10)': + '@hono/node-server@1.13.7(hono@4.6.11)': dependencies: - hono: 4.6.10 + hono: 4.6.11 - '@hono/zod-openapi@0.18.0(hono@4.6.10)(zod@3.23.8)': + '@hono/zod-openapi@0.18.0(hono@4.6.11)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.4.1(hono@4.6.10)(zod@3.23.8) - hono: 4.6.10 + '@hono/zod-validator': 0.4.1(hono@4.6.11)(zod@3.23.8) + hono: 4.6.11 zod: 3.23.8 - '@hono/zod-validator@0.4.1(hono@4.6.10)(zod@3.23.8)': + '@hono/zod-validator@0.4.1(hono@4.6.11)(zod@3.23.8)': dependencies: - hono: 4.6.10 + hono: 4.6.11 zod: 3.23.8 '@humanfs/core@0.19.1': {} @@ -7284,10 +7284,10 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.159(hono@4.6.10)': + '@scalar/hono-api-reference@0.5.159(hono@4.6.11)': dependencies: '@scalar/types': 0.0.19 - hono: 4.6.10 + hono: 4.6.11 '@scalar/openapi-types@0.1.5': {} @@ -9311,7 +9311,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.10: {} + hono@4.6.11: {} hookable@5.5.3: {} From c48361ae8f3cebd92b4df482fb413d6d785fe393 Mon Sep 17 00:00:00 2001 From: sicheng1806 <132180383+sicheng1806@users.noreply.github.com> Date: Wed, 20 Nov 2024 16:35:27 +0800 Subject: [PATCH 555/740] =?UTF-8?q?feat(route):=20add=20=E3=80=8CONE=20?= =?UTF-8?q?=C2=B7=20=E4=B8=80=E4=B8=AA=E3=80=8Dhttp://wufazhuce.com=20(#17?= =?UTF-8?q?637)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add my new route for http://wufazhuce.com * build it with got totally * use spread operator over Array#concat(...) * use namespace wufazhuce instead of one, and correcte some habits. * use .tab-content instead of #main-container * add category in item --- lib/routes/wufazhuce/namespace.ts | 7 +++ lib/routes/wufazhuce/one.ts | 90 +++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 lib/routes/wufazhuce/namespace.ts create mode 100644 lib/routes/wufazhuce/one.ts diff --git a/lib/routes/wufazhuce/namespace.ts b/lib/routes/wufazhuce/namespace.ts new file mode 100644 index 000000000000000..fdf8007ade98f99 --- /dev/null +++ b/lib/routes/wufazhuce/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '「ONE · 一个」', + url: 'wufazhuce.com', + lang: 'zh-CN', +}; diff --git a/lib/routes/wufazhuce/one.ts b/lib/routes/wufazhuce/one.ts new file mode 100644 index 000000000000000..72e4407ad21cd0a --- /dev/null +++ b/lib/routes/wufazhuce/one.ts @@ -0,0 +1,90 @@ +import { Route, Data, DataItem } from '@/types'; +import { load } from 'cheerio'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; + +const apiUrl = 'https://wufazhuce.com/'; +const NAME = '「ONE · 一个」'; + +export const route: Route = { + path: '/one', + categories: ['new-media'], + example: '/wufazhuce/one', + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['wufazhuce.com'], + target: '/one', + }, + ], + name: NAME, + maintainers: ['sicheng1806'], + handler, +}; + +async function handler(): Promise<Data> { + const resp = await got(apiUrl); + const $ = load(resp.body); + let items: DataItem[] = [ + ...$('#carousel-one div.item') + .toArray() + .map((item) => { + const a = $(item).find('.fp-one-cita a').first(); + return { + title: a.text(), + link: a.attr('href'), + description: '', + category: '摄影', + }; + }), + ...$('.fp-one-articulo a') + .toArray() + .map((item) => { + const a = $(item); + return { + title: a.text(), + link: a.attr('href'), + description: '', + category: '文章', + }; + }), + ...$('.fp-one-cuestion a') + .toArray() + .map((item) => { + const a = $(item); + return { + title: a.text(), + link: a.attr('href'), + description: '', + category: '问题', + }; + }), + ]; + + // 添加全文 + items = await Promise.all( + items.map((item: DataItem) => + cache.tryGet(item.link, async () => { + const rsp = await got(item.link); + const content = load(rsp.body); + item.description = content('.tab-content').html() || ''; + return item; + }) + ) + ); + + // 生成rss + return { + title: NAME, + link: apiUrl, + item: items, + description: '复杂世界里, 一个就够了. One is all.', + }; +} From 26b251eeaa8bc569df9f3302be845cdb878d5a33 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 08:38:39 +0000 Subject: [PATCH 556/740] chore(deps-dev): bump @types/node from 22.9.0 to 22.9.1 (#17644) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.9.0 to 22.9.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-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 1e705096619ab81..96623ce0c9b9684 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ "@types/mailparser": "3.4.5", "@types/markdown-it": "14.1.2", "@types/module-alias": "2.0.4", - "@types/node": "22.9.0", + "@types/node": "22.9.1", "@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 86df703d89d4631..2f9cfdae650bd5d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -337,8 +337,8 @@ importers: specifier: 2.0.4 version: 2.0.4 '@types/node': - specifier: 22.9.0 - version: 22.9.0 + specifier: 22.9.1 + version: 22.9.1 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -365,7 +365,7 @@ importers: version: 0.27.6 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.9.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.105 version: 0.37.105 @@ -434,10 +434,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.3 - version: 5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)) + version: 5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.1)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.9.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1914,8 +1914,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.9.0': - resolution: {integrity: sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==} + '@types/node@22.9.1': + resolution: {integrity: sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6914,7 +6914,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.9.0 + '@types/node': 22.9.1 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7388,12 +7388,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.9.0 + '@types/node': 22.9.1 '@types/html-to-text@9.0.4': {} @@ -7401,13 +7401,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7417,7 +7417,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 '@types/jsrsasign@10.5.13': {} @@ -7427,7 +7427,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7449,14 +7449,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 form-data: 4.0.1 - '@types/node@22.9.0': + '@types/node@22.9.1': dependencies: undici-types: 6.19.8 @@ -7470,7 +7470,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.9.0 + '@types/node': 22.9.1 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7484,7 +7484,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.9.0 + '@types/node': 22.9.1 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7508,7 +7508,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 optional: true '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': @@ -7656,7 +7656,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.9.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7670,7 +7670,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.9.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10641,7 +10641,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.9.0 + '@types/node': 22.9.1 long: 5.2.3 proxy-agent@6.4.0: @@ -11601,13 +11601,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.9.0): + vite-node@2.0.5(@types/node@22.9.1): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.9.0) + vite: 5.4.10(@types/node@22.9.1) transitivePeerDependencies: - '@types/node' - less @@ -11619,27 +11619,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.0)): + vite-tsconfig-paths@5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.1)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.10(@types/node@22.9.0) + vite: 5.4.10(@types/node@22.9.1) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.9.0): + vite@5.4.10(@types/node@22.9.1): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.4 optionalDependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.9.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.9.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11657,11 +11657,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.9.0) - vite-node: 2.0.5(@types/node@22.9.0) + vite: 5.4.10(@types/node@22.9.1) + vite-node: 2.0.5(@types/node@22.9.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.9.0 + '@types/node': 22.9.1 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 4ae91c578c04e68449a95a4de118e1685b028844 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 00:39:58 -0800 Subject: [PATCH 557/740] chore(deps): bump xxhash-wasm from 1.0.2 to 1.1.0 (#17647) Bumps [xxhash-wasm](https://github.com/jungomi/xxhash-wasm) from 1.0.2 to 1.1.0. - [Release notes](https://github.com/jungomi/xxhash-wasm/releases) - [Changelog](https://github.com/jungomi/xxhash-wasm/blob/main/CHANGELOG.md) - [Commits](https://github.com/jungomi/xxhash-wasm/compare/v1.0.2...v1.1.0) --- updated-dependencies: - dependency-name: xxhash-wasm dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 96623ce0c9b9684..2042e3e28546ac0 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "undici": "6.21.0", "uuid": "11.0.3", "winston": "3.17.0", - "xxhash-wasm": "1.0.2", + "xxhash-wasm": "1.1.0", "zod": "3.23.8" }, "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2f9cfdae650bd5d..0d3e7d76af5fd96 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -261,8 +261,8 @@ importers: specifier: 3.17.0 version: 3.17.0 xxhash-wasm: - specifier: 1.0.2 - version: 1.0.2 + specifier: 1.1.0 + version: 1.1.0 zod: specifier: 3.23.8 version: 3.23.8 @@ -5818,8 +5818,8 @@ packages: xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - xxhash-wasm@1.0.2: - resolution: {integrity: sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==} + xxhash-wasm@1.1.0: + resolution: {integrity: sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==} y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} @@ -11808,7 +11808,7 @@ snapshots: xmlchars@2.2.0: {} - xxhash-wasm@1.0.2: {} + xxhash-wasm@1.1.0: {} y18n@5.0.8: {} From 84e7a4ceb74e1395be5af28f48a50b5141b9cd6c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 08:41:10 +0000 Subject: [PATCH 558/740] chore(deps): bump @scalar/hono-api-reference from 0.5.159 to 0.5.160 (#17648) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.159 to 0.5.160. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 2042e3e28546ac0..b005da9e8e16386 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "@opentelemetry/semantic-conventions": "1.27.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.23", - "@scalar/hono-api-reference": "0.5.159", + "@scalar/hono-api-reference": "0.5.160", "@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 0d3e7d76af5fd96..70bf2011eab65e6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,8 +54,8 @@ importers: specifier: 0.0.23 version: 0.0.23 '@scalar/hono-api-reference': - specifier: 0.5.159 - version: 0.5.159(hono@4.6.11) + specifier: 0.5.160 + version: 0.5.160(hono@4.6.11) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1746,8 +1746,8 @@ packages: '@rss3/sdk@0.0.23': resolution: {integrity: sha512-1cF1AqLU0k6dMwqQ5Fch3rOAbh4UXJ4UZLtOwzp/RWyGoCvu3lUOUIdJF41omunuH/JJSP2z6rJTPj4S6a60eg==} - '@scalar/hono-api-reference@0.5.159': - resolution: {integrity: sha512-nUKaN0CKvytbXPj9b6taF/efKKRqEUwhVxlfLVjrJXN0eHNHDWxG9e/5Tyw1o2MXJo1cQpGZ4qTh48k/8u6ZjA==} + '@scalar/hono-api-reference@0.5.160': + resolution: {integrity: sha512-3NXXh4B+5sa9QEchtQNKH0me4pEB8soFfCSqOxsuB0d8agokDO574cP9Qq4l6vwSh6FMiqSdaGTv5459g8hTCg==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -1756,8 +1756,8 @@ packages: resolution: {integrity: sha512-6geH9ehvQ/sG/xUyy3e0lyOw3BaY5s6nn22wHjEJhcobdmWyFER0O6m7AU0ZN4QTjle/gYvFJOjj552l/rsNSw==} engines: {node: '>=18'} - '@scalar/types@0.0.19': - resolution: {integrity: sha512-wOxtXd35BS0DaVhBopQUB8c8hfLQ+/PKEr99GbOZW+4DWCrEB8JfWJgvpJyxHU6by7LHNVY4fvpFQR7Ezh1IIw==} + '@scalar/types@0.0.20': + resolution: {integrity: sha512-Sx7tqiuV9ZNp2XpIXKD/srzTjjb4I6aof0Y7+U5MgEuKPwrRnYS/BaocdNgWLnpCZisBIg5qp4YSqozxibabVg==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7284,14 +7284,14 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.159(hono@4.6.11)': + '@scalar/hono-api-reference@0.5.160(hono@4.6.11)': dependencies: - '@scalar/types': 0.0.19 + '@scalar/types': 0.0.20 hono: 4.6.11 '@scalar/openapi-types@0.1.5': {} - '@scalar/types@0.0.19': + '@scalar/types@0.0.20': dependencies: '@scalar/openapi-types': 0.1.5 '@unhead/schema': 1.11.11 From c06809665c55472fa1caa9eed9f07fae67a99053 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 01:12:05 -0800 Subject: [PATCH 559/740] chore(deps): bump title from 3.5.3 to 4.0.0 (#17645) Bumps [title](https://github.com/vercel/title) from 3.5.3 to 4.0.0. - [Release notes](https://github.com/vercel/title/releases) - [Commits](https://github.com/vercel/title/compare/3.5.3...4.0.0) --- updated-dependencies: - dependency-name: title dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 210 +++++++++++++------------------------------------ 2 files changed, 57 insertions(+), 155 deletions(-) diff --git a/package.json b/package.json index b005da9e8e16386..6387320104838a4 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "source-map": "0.7.4", "telegram": "2.26.8", "tiny-async-pool": "2.1.0", - "title": "3.5.3", + "title": "4.0.0", "tldts": "6.1.61", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 70bf2011eab65e6..a3bc7e24f494a41 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -231,8 +231,8 @@ importers: specifier: 2.1.0 version: 2.1.0 title: - specifier: 3.5.3 - version: 3.5.3 + specifier: 4.0.0 + version: 4.0.0 tldts: specifier: 6.1.61 version: 6.1.61 @@ -2172,16 +2172,13 @@ packages: aproba@2.0.0: resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} - arch@2.2.0: - resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} - are-we-there-yet@2.0.0: resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} engines: {node: '>=10'} deprecated: This package is no longer supported. - arg@1.0.0: - resolution: {integrity: sha512-Wk7TEzl1KqvTGs/uyhmHO/3XLd3t1UeU4IstvPXVzGPM522cTjqjNZ99esCkcL52sjqjo8e8CTBcWhkxvGzoAw==} + arg@5.0.2: + resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} @@ -2396,10 +2393,6 @@ packages: resolution: {integrity: sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==} engines: {node: '>=0.10.0'} - chalk@2.3.0: - resolution: {integrity: sha512-Az5zJR2CBujap2rqXGaJKaPHyJ0IrUimvYNX+ncCy8PJP4ltOGTrHUIo097ZaL2zMeKYpiCdqDvS6zdrTFok3Q==} - engines: {node: '>=4'} - chalk@2.4.2: resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} engines: {node: '>=4'} @@ -2491,9 +2484,9 @@ packages: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} - clipboardy@1.2.2: - resolution: {integrity: sha512-16KrBOV7bHmHdxcQiCvfUFYVFyEah4FI8vYT1Fr7CGSA4G+xBWMEfUEQJS1hxeHGtI9ju1Bzs9uXSbj5HZKArw==} - engines: {node: '>=4'} + clipboardy@4.0.0: + resolution: {integrity: sha512-5mOlNS0mhX0707P2I0aZ2V/cmHUEO/fL7VFLqszkhUsxt7RwnmrInf/eEQKlf5GzvYeHIjT+Ov1HRfNmymlG0w==} + engines: {node: '>=18'} cliui@8.0.1: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} @@ -2604,9 +2597,6 @@ packages: engines: {node: '>=10.14', npm: '>=6', yarn: '>=1'} hasBin: true - cross-spawn@5.1.0: - resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} - cross-spawn@7.0.3: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} @@ -3117,10 +3107,6 @@ packages: eventemitter3@5.0.1: resolution: {integrity: sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==} - execa@0.8.0: - resolution: {integrity: sha512-zDWS+Rb1E8BlqqhALSt9kUhss8Qq4nN3iof3gsOdyINksElaPyNBtKUMTR62qhvgVWR0CqCX7sdnKe4MnUbFEA==} - engines: {node: '>=4'} - execa@8.0.1: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} @@ -3326,10 +3312,6 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} - get-stream@3.0.0: - resolution: {integrity: sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ==} - engines: {node: '>=4'} - get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -3441,10 +3423,6 @@ packages: resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==} engines: {node: '>=0.10.0'} - has-flag@2.0.0: - resolution: {integrity: sha512-P+1n3MnwjR/Epg9BBo1KT8qbye2g2Ou4sFumihwt6I4tsUX7jnLcX4BTOSKg/B1ZrIYMN9FcEnG4x5a7NB8Eng==} - engines: {node: '>=0.10.0'} - has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} @@ -3675,6 +3653,11 @@ packages: engines: {node: '>=8'} hasBin: true + is-docker@3.0.0: + resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + hasBin: true + is-extendable@0.1.1: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} engines: {node: '>=0.10.0'} @@ -3699,6 +3682,11 @@ packages: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} + is-inside-container@1.0.0: + resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} + engines: {node: '>=14.16'} + hasBin: true + is-interactive@1.0.0: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} engines: {node: '>=8'} @@ -3733,10 +3721,6 @@ packages: is-potential-custom-element-name@1.0.1: resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - is-stream@1.1.0: - resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} - engines: {node: '>=0.10.0'} - is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} @@ -3760,6 +3744,14 @@ packages: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} + is-wsl@3.1.0: + resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} + engines: {node: '>=16'} + + is64bit@2.0.0: + resolution: {integrity: sha512-jv+8jaWCl0g2lSBkNSVXdzfBA0npK1HGC2KtWM9FumFRoGS94g3NbCCLVnCYHLjp4GrW2KZeeSTMo5ddtznmGw==} + engines: {node: '>=18'} + isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} @@ -4043,9 +4035,6 @@ packages: resolution: {integrity: sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==} engines: {node: 20 || >=22} - lru-cache@4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} - lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -4387,10 +4376,6 @@ packages: resolution: {integrity: sha512-Zaa2P1B9Rx99bevFYTGuUMYbbfdHn2G1AZMsytYGDWIJjr6Ie1qp/8CorpwVUh1qrquES/V2PkEREqCuTu1zKA==} engines: {node: '>=12'} - npm-run-path@2.0.2: - resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==} - engines: {node: '>=4'} - npm-run-path@5.3.0: resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -4490,10 +4475,6 @@ packages: resolution: {integrity: sha512-wBowNApzd45EIKdO1LaU+LrMBwAcjfPaYtVzV3lmfM3gf8Z4CHZsiIqlM8TZZ8okYvh5A1cP6gTfCRQtwUpaUg==} engines: {node: '>=14.16'} - p-finally@1.0.0: - resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} - engines: {node: '>=4'} - p-limit@2.3.0: resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} engines: {node: '>=6'} @@ -4565,10 +4546,6 @@ packages: resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} engines: {node: '>=0.10.0'} - path-key@2.0.1: - resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} - engines: {node: '>=4'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -4683,9 +4660,6 @@ packages: proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - pseudomap@1.0.2: - resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - psl@1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} @@ -5031,18 +5005,10 @@ packages: resolution: {integrity: sha512-J1zdXCky5GmNnuauESROVu31MQSnLoYvlyEn6j2Ztk6Q5EHFIhxkMhYcv6vuDzl2XEzoRr856QwzMgWM/TmZgw==} engines: {node: '>=0.10.0'} - shebang-command@1.2.0: - resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} - engines: {node: '>=0.10.0'} - shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} - shebang-regex@1.0.0: - resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} - engines: {node: '>=0.10.0'} - shebang-regex@3.0.0: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} @@ -5219,10 +5185,6 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} - strip-eof@1.0.0: - resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} - engines: {node: '>=0.10.0'} - strip-final-newline@3.0.0: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} @@ -5247,10 +5209,6 @@ packages: resolution: {integrity: sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==} engines: {node: '>=0.8.0'} - supports-color@4.5.0: - resolution: {integrity: sha512-ycQR/UbvI9xIlEdQT1TQqwoXtEldExbCEAJgRo5YXlmSKjv6ThHnP9/vwGa1gr19Gfw+LkFd7KqYMhzrRC5JYw==} - engines: {node: '>=4'} - supports-color@5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -5270,6 +5228,10 @@ packages: resolution: {integrity: sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==} engines: {node: ^14.18.0 || >=16.0.0} + system-architecture@0.1.0: + resolution: {integrity: sha512-ulAk51I9UVUyJgxlv9M6lFot2WP3e7t8Kz9+IS6D4rVba1tR9kON+Ey69f+1R4Q8cd45Lod6a4IcJIxnzGc/zA==} + engines: {node: '>=18'} + tapable@2.2.1: resolution: {integrity: sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==} engines: {node: '>=6'} @@ -5328,14 +5290,10 @@ packages: resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} - title@3.5.3: - resolution: {integrity: sha512-20JyowYglSEeCvZv3EZ0nZ046vLarO37prvV0mbtQV7C8DJPGgN967r8SJkqd3XK3K3lD3/Iyfp3avjfil8Q2Q==} + title@4.0.0: + resolution: {integrity: sha512-HtJL7yozZem9ufiWnwcftBpbNAO+phHMfao8CS4QLON7HzjyDRlf7qE9SXna6/749ZzpEsBZHy+MmY/GOS4i6g==} hasBin: true - titleize@1.0.0: - resolution: {integrity: sha512-TARUb7z1pGvlLxgPk++7wJ6aycXF3GJ0sNSBTAsTuJrQG5QuZlkUQP+zl+nbjAh4gMX9yDw9ZYklMd7vAfJKEw==} - engines: {node: '>=0.10.0'} - tlds@1.252.0: resolution: {integrity: sha512-GA16+8HXvqtfEnw/DTcwB0UU354QE1n3+wh08oFjr6Znl7ZLAeUgYzCcK+/CCrOyE0vnHR8/pu3XXG3vDijXpQ==} hasBin: true @@ -5725,10 +5683,6 @@ packages: whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} - which@1.3.1: - resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} - hasBin: true - which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -5829,9 +5783,6 @@ packages: resolution: {integrity: sha512-MvQa//+KcZCUkBTIC9blM+CU9J2GzuTytsOUwf2lidtvkx/6gnEp1QvJv34t9vdjhFmha/mUiNDbN0D0mJWdug==} engines: {node: '>=0.10.32'} - yallist@2.1.2: - resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} @@ -7778,14 +7729,12 @@ snapshots: aproba@2.0.0: {} - arch@2.2.0: {} - are-we-there-yet@2.0.0: dependencies: delegates: 1.0.0 readable-stream: 3.6.2 - arg@1.0.0: {} + arg@5.0.2: {} argparse@2.0.1: {} @@ -8027,12 +7976,6 @@ snapshots: strip-ansi: 3.0.1 supports-color: 2.0.0 - chalk@2.3.0: - dependencies: - ansi-styles: 3.2.1 - escape-string-regexp: 1.0.5 - supports-color: 4.5.0 - chalk@2.4.2: dependencies: ansi-styles: 3.2.1 @@ -8144,10 +8087,11 @@ snapshots: cli-width@4.1.0: {} - clipboardy@1.2.2: + clipboardy@4.0.0: dependencies: - arch: 2.2.0 - execa: 0.8.0 + execa: 8.0.1 + is-wsl: 3.1.0 + is64bit: 2.0.0 cliui@8.0.1: dependencies: @@ -8248,12 +8192,6 @@ snapshots: dependencies: cross-spawn: 7.0.3 - cross-spawn@5.1.0: - dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.3.1 - cross-spawn@7.0.3: dependencies: path-key: 3.1.1 @@ -8874,16 +8812,6 @@ snapshots: eventemitter3@5.0.1: {} - execa@0.8.0: - dependencies: - cross-spawn: 5.1.0 - get-stream: 3.0.0 - is-stream: 1.1.0 - npm-run-path: 2.0.2 - p-finally: 1.0.0 - signal-exit: 3.0.7 - strip-eof: 1.0.0 - execa@8.0.1: dependencies: cross-spawn: 7.0.3 @@ -9122,8 +9050,6 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.2 - get-stream@3.0.0: {} - get-stream@5.2.0: dependencies: pump: 3.0.2 @@ -9281,8 +9207,6 @@ snapshots: dependencies: ansi-regex: 2.1.1 - has-flag@2.0.0: {} - has-flag@3.0.0: {} has-flag@4.0.0: {} @@ -9557,6 +9481,8 @@ snapshots: is-docker@2.2.1: {} + is-docker@3.0.0: {} + is-extendable@0.1.1: {} is-extglob@2.1.1: {} @@ -9573,6 +9499,10 @@ snapshots: dependencies: is-extglob: 2.1.1 + is-inside-container@1.0.0: + dependencies: + is-docker: 3.0.0 + is-interactive@1.0.0: {} is-keyword-js@1.0.3: {} @@ -9593,8 +9523,6 @@ snapshots: is-potential-custom-element-name@1.0.1: {} - is-stream@1.1.0: {} - is-stream@2.0.1: {} is-stream@3.0.0: {} @@ -9609,6 +9537,14 @@ snapshots: dependencies: is-docker: 2.2.1 + is-wsl@3.1.0: + dependencies: + is-inside-container: 1.0.0 + + is64bit@2.0.0: + dependencies: + system-architecture: 0.1.0 + isexe@2.0.0: {} isobject@3.0.1: {} @@ -9913,11 +9849,6 @@ snapshots: lru-cache@11.0.2: {} - lru-cache@4.1.5: - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -10323,10 +10254,6 @@ snapshots: transitivePeerDependencies: - encoding - npm-run-path@2.0.2: - dependencies: - path-key: 2.0.1 - npm-run-path@5.3.0: dependencies: path-key: 4.0.0 @@ -10444,8 +10371,6 @@ snapshots: p-cancelable@4.0.1: {} - p-finally@1.0.0: {} - p-limit@2.3.0: dependencies: p-try: 2.2.0 @@ -10527,8 +10452,6 @@ snapshots: path-is-absolute@1.0.1: {} - path-key@2.0.1: {} - path-key@3.1.1: {} path-key@4.0.0: {} @@ -10667,8 +10590,6 @@ snapshots: proxy-from-env@1.1.0: {} - pseudomap@1.0.2: {} - psl@1.9.0: {} pump@3.0.2: @@ -11043,16 +10964,10 @@ snapshots: lazy-cache: 0.2.7 mixin-object: 2.0.1 - shebang-command@1.2.0: - dependencies: - shebang-regex: 1.0.0 - shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 - shebang-regex@1.0.0: {} - shebang-regex@3.0.0: {} side-channel@1.0.6: @@ -11224,8 +11139,6 @@ snapshots: dependencies: ansi-regex: 6.1.0 - strip-eof@1.0.0: {} - strip-final-newline@3.0.0: {} strip-indent@3.0.0: @@ -11257,10 +11170,6 @@ snapshots: supports-color@2.0.0: {} - supports-color@4.5.0: - dependencies: - has-flag: 2.0.0 - supports-color@5.5.0: dependencies: has-flag: 3.0.0 @@ -11278,6 +11187,8 @@ snapshots: '@pkgr/core': 0.1.1 tslib: 2.8.1 + system-architecture@0.1.0: {} + tapable@2.2.1: {} tar-fs@3.0.5: @@ -11355,14 +11266,11 @@ snapshots: tinyspy@3.0.2: {} - title@3.5.3: + title@4.0.0: dependencies: - arg: 1.0.0 - chalk: 2.3.0 - clipboardy: 1.2.2 - titleize: 1.0.0 - - titleize@1.0.0: {} + arg: 5.0.2 + chalk: 5.3.0 + clipboardy: 4.0.0 tlds@1.252.0: {} @@ -11712,10 +11620,6 @@ snapshots: tr46: 0.0.3 webidl-conversions: 3.0.1 - which@1.3.1: - dependencies: - isexe: 2.0.0 - which@2.0.2: dependencies: isexe: 2.0.0 @@ -11814,8 +11718,6 @@ snapshots: yaeti@0.0.6: {} - yallist@2.1.2: {} - yallist@3.1.1: {} yallist@4.0.0: {} From 7e17a500cbcb8b9e54e2bb0ed6cd5e8953f307d3 Mon Sep 17 00:00:00 2001 From: Keo <keocheung@outlook.com> Date: Wed, 20 Nov 2024 17:12:35 +0800 Subject: [PATCH 560/740] fix(route/idolmaster): fix doc (#17640) --- lib/routes/idolmaster/news.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/idolmaster/news.ts b/lib/routes/idolmaster/news.ts index a3c3d39affc6858..5df59d2929e631b 100644 --- a/lib/routes/idolmaster/news.ts +++ b/lib/routes/idolmaster/news.ts @@ -18,7 +18,7 @@ export const route: Route = { description: `**Brand** | THE IDOLM@STER | シンデレラガールズ | ミリオンライブ! | SideM | シャイニーカラーズ | 学園アイドルマスター | その他 | | -------------- | --------------- | ------------- | ----- | --------------- | ----------------- | ----- | -| IDOLMASTER | CINDERELLAGIRLS | MILLIONLIVE | SIDEM | SHINYCOLORS | OTHER | +| IDOLMASTER | CINDERELLAGIRLS | MILLIONLIVE | SIDEM | SHINYCOLORS | GAKUEN | OTHER | **Category** | ゲーム | ライブ・イベント | アニメ | 配信番組 | ラジオ | グッズ | コラボ・キャンペーン | ミュージック | ブック・コミック | メディア | その他 | From 2070264d57563c93296402aa5c156c1c7d5f7a16 Mon Sep 17 00:00:00 2001 From: karasu <karasu.shing@gmail.com> Date: Wed, 20 Nov 2024 23:58:39 +0800 Subject: [PATCH 561/740] =?UTF-8?q?feat(route):=20=E5=86=86=E8=B0=B7?= =?UTF-8?q?=E3=82=B9=E3=83=86=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=20(#1765?= =?UTF-8?q?0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): m-78 * add updated * fix error tips * Update lib/routes/m-78/news.ts --------- --- lib/routes/m-78/namespace.ts | 7 +++ lib/routes/m-78/news.ts | 115 +++++++++++++++++++++++++++++++++++ lib/routes/m-78/types.ts | 13 ++++ 3 files changed, 135 insertions(+) create mode 100644 lib/routes/m-78/namespace.ts create mode 100644 lib/routes/m-78/news.ts create mode 100644 lib/routes/m-78/types.ts diff --git a/lib/routes/m-78/namespace.ts b/lib/routes/m-78/namespace.ts new file mode 100644 index 000000000000000..1b1074074f5fcc6 --- /dev/null +++ b/lib/routes/m-78/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '円谷ステーション', + url: 'm-78.jp', + lang: 'ja', +}; diff --git a/lib/routes/m-78/news.ts b/lib/routes/m-78/news.ts new file mode 100644 index 000000000000000..5eed7b6b84f1d46 --- /dev/null +++ b/lib/routes/m-78/news.ts @@ -0,0 +1,115 @@ +import { type Data, type Route, ViewType } from '@/types'; +import ofetch from '@/utils/ofetch'; +import type { Context } from 'hono'; +import type { Post } from './types'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; + +export const route: Route = { + name: 'ニュース', + categories: ['anime'], + path: '/news/:category?', + example: '/m-78/news', + radar: [ + { + source: ['m-78.jp/news'], + target: '/news', + }, + { + source: ['m-78.jp/news/category/:category'], + target: '/news/:category', + }, + ], + parameters: { + category: { + description: 'news category', + default: 'news', + options: [ + { + value: 'news', + label: 'ニュース', + }, + { + value: 'streaming', + label: '動画配信', + }, + { + value: 'event', + label: 'イベント', + }, + { + value: 'onair', + label: '放送', + }, + { + value: 'broadcast', + label: '放送/配信', + }, + { + value: 'goods', + label: 'グッズ', + }, + { + value: 'ultraman-cardgame', + label: 'ウルトラマン カードゲーム', + }, + { + value: 'shop', + label: 'ショップ', + }, + { + value: 'blu-ray_dvd', + label: 'Blu-ray・DVD', + }, + { + value: 'digital', + label: 'デジタル', + }, + ], + }, + }, + handler, + maintainers: ['KarasuShin'], + features: { + supportRadar: true, + }, + view: ViewType.Articles, +}; + +async function handler(ctx: Context): Promise<Data> { + const rootUrl = 'https://m-78.jp'; + const cateAPIUrl = `${rootUrl}/wp-json/wp/v2/categories`; + const postsAPIUrl = `${rootUrl}/wp-json/wp/v2/posts`; + const category = ctx.req.param('category') ?? 'news'; + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')!, 10) : 20; + + const categories = await ofetch(`${cateAPIUrl}?slug=${category}`); + if (categories.length === 0) { + throw new InvalidParameterError('Category not found'); + } + + const { id: categoryId, link: categoryLink, name: categoryName } = categories[0]; + + const posts = await ofetch<Post[]>(`${postsAPIUrl}?categories=${categoryId}&per_page=${limit}`); + return { + title: `${categoryName} | ニュース`, + link: categoryLink, + item: posts.map((post) => { + const $ = load(post.content.rendered, null, false); + $('#ez-toc-container').remove(); + $('img').each((_, img) => { + if (/wp-content\/uploads/.test(img.attribs.src)) { + img.attribs.src = img.attribs.src.replace(/(-\d+x\d+)/, ''); + } + }); + return { + title: post.title.rendered, + link: post.link, + description: $.html(), + pubDate: parseDate(post.date_gmt), + updated: parseDate(post.modified_gmt), + }; + }), + }; +} diff --git a/lib/routes/m-78/types.ts b/lib/routes/m-78/types.ts new file mode 100644 index 000000000000000..ff84da8ae616837 --- /dev/null +++ b/lib/routes/m-78/types.ts @@ -0,0 +1,13 @@ +export interface Post { + id: number; + content: { + rendered: string; + }; + date_gmt: string; + modified_gmt: string; + link: string; + categories: number[]; + title: { + rendered: string; + }; +} From 9d7e28c4a2160694f31712a9b2fea82f33dab6c7 Mon Sep 17 00:00:00 2001 From: cnk <cscnk52@outlook.com> Date: Thu, 21 Nov 2024 15:14:58 +0800 Subject: [PATCH 562/740] =?UTF-8?q?fix(route):=20add=20radar=20rules=20for?= =?UTF-8?q?=20=E2=80=98=E5=93=88=E5=B0=94=E6=BB=A8=E7=90=86=E5=B7=A5?= =?UTF-8?q?=E5=A4=A7=E5=AD=A6=E6=95=99=E5=8A=A1=E5=85=AC=E5=91=8A=E2=80=99?= =?UTF-8?q?=20(#17657)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/hrbust/jwzx.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/routes/hrbust/jwzx.ts b/lib/routes/hrbust/jwzx.ts index 15c06b29ca1aa29..f7866d9cf8f8f31 100644 --- a/lib/routes/hrbust/jwzx.ts +++ b/lib/routes/hrbust/jwzx.ts @@ -37,6 +37,12 @@ export const route: Route = { description: `| 名师风采 | 热点新闻 | 教务公告 | 教学新闻 | | -------- | -------- | -------- | -------- | | 351 | 353 | 354 | 355 |`, + radar: [ + { + source: ['jwzx.hrbust.edu.cn/homepage/index.do'], + target: '/jwzx', + }, + ], }; async function handler(ctx) { From 0179806f52d04ee448850e38173afeadb939e3ad Mon Sep 17 00:00:00 2001 From: XU Ke <kexu567@gmail.com> Date: Thu, 21 Nov 2024 16:35:25 +0800 Subject: [PATCH 563/740] fix(/scu/scupi): optimize the layout (#17653) --- lib/routes/scu/scupi/_utils.ts | 3 +-- lib/routes/scu/scupi/notice.ts | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/scu/scupi/_utils.ts b/lib/routes/scu/scupi/_utils.ts index 4446cb9a96df956..295220cfc39554a 100644 --- a/lib/routes/scu/scupi/_utils.ts +++ b/lib/routes/scu/scupi/_utils.ts @@ -51,9 +51,8 @@ export async function getArticle(item) { const $ = load(html); const articleContentElement = $('body > div > main > section > div > div > div.post-content-contaier > div'); const content = articleContentElement.html(); - const modifiedContent = content?.replace(/\n/g, '<br>'); - item.description = modifiedContent; + item.description = content; return item; } catch { // console.error(error); diff --git a/lib/routes/scu/scupi/notice.ts b/lib/routes/scu/scupi/notice.ts index b7cc03bbd87459f..8457223004ff0f3 100644 --- a/lib/routes/scu/scupi/notice.ts +++ b/lib/routes/scu/scupi/notice.ts @@ -33,7 +33,8 @@ async function handler() { title: '四川大学匹兹堡学院', description: '四川大学匹兹堡学院官网通知', language: 'zh-cn', - image: 'https://scupi.scu.edu.cn/wp-content/themes/scupi/img/logo.png', + image: 'https://upload.wikimedia.org/wikipedia/zh/4/45/Sichuan_University_logo.svg', + logo: 'https://upload.wikimedia.org/wikipedia/zh/4/45/Sichuan_University_logo.svg', link: 'https://scupi.scu.edu.cn/', item: itemsWithContent, }; From 02501d50bcc1e0d9d565692a7e4ac7dd2906013e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:59:20 +0000 Subject: [PATCH 564/740] chore(deps): bump tldts from 6.1.61 to 6.1.62 (#17659) Bumps [tldts](https://github.com/remusao/tldts) from 6.1.61 to 6.1.62. - [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.61...v6.1.62) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 6387320104838a4..8757fd314ad9e4a 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "telegram": "2.26.8", "tiny-async-pool": "2.1.0", "title": "4.0.0", - "tldts": "6.1.61", + "tldts": "6.1.62", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a3bc7e24f494a41..723ca1f34185cd2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -234,8 +234,8 @@ importers: specifier: 4.0.0 version: 4.0.0 tldts: - specifier: 6.1.61 - version: 6.1.61 + specifier: 6.1.62 + version: 6.1.62 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5302,11 +5302,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.61: - resolution: {integrity: sha512-In7VffkDWUPgwa+c9picLUxvb0RltVwTkSgMNFgvlGSWveCzGBemBqTsgJCL4EDFWZ6WH0fKTsot6yNhzy3ZzQ==} + tldts-core@6.1.62: + resolution: {integrity: sha512-ohONqbfobpuaylhqFbtCzc0dFFeNz85FVKSesgT8DS9OV3a25Yj730pTj7/dDtCqmgoCgEj6gDiU9XxgHKQlBw==} - tldts@6.1.61: - resolution: {integrity: sha512-rv8LUyez4Ygkopqn+M6OLItAOT9FF3REpPQDkdMx5ix8w4qkuE7Vo2o/vw1nxKQYmJDV8JpAMJQr1b+lTKf0FA==} + tldts@6.1.62: + resolution: {integrity: sha512-TF+wo3MgTLbf37keEwQD0IxvOZO8UZxnpPJDg5iFGAASGxYzbX/Q0y944ATEjrfxG/pF1TWRHCPbFp49Mz1Y1w==} hasBin: true tmp@0.0.33: @@ -11276,11 +11276,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.61: {} + tldts-core@6.1.62: {} - tldts@6.1.61: + tldts@6.1.62: dependencies: - tldts-core: 6.1.61 + tldts-core: 6.1.62 tmp@0.0.33: dependencies: @@ -11316,7 +11316,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.61 + tldts: 6.1.62 tr46@0.0.3: {} From a8303de82e27a7bfd13e6c2620b00a2bff4a5271 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:03:31 +0000 Subject: [PATCH 565/740] chore(deps): bump title from 4.0.0 to 4.0.1 (#17660) Bumps [title](https://github.com/vercel/title) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/vercel/title/releases) - [Commits](https://github.com/vercel/title/compare/4.0.0...4.0.1) --- updated-dependencies: - dependency-name: title dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 8757fd314ad9e4a..c1655810fbd7ede 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "source-map": "0.7.4", "telegram": "2.26.8", "tiny-async-pool": "2.1.0", - "title": "4.0.0", + "title": "4.0.1", "tldts": "6.1.62", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 723ca1f34185cd2..b54be6fd78a2384 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -231,8 +231,8 @@ importers: specifier: 2.1.0 version: 2.1.0 title: - specifier: 4.0.0 - version: 4.0.0 + specifier: 4.0.1 + version: 4.0.1 tldts: specifier: 6.1.62 version: 6.1.62 @@ -5290,8 +5290,8 @@ packages: resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} engines: {node: '>=14.0.0'} - title@4.0.0: - resolution: {integrity: sha512-HtJL7yozZem9ufiWnwcftBpbNAO+phHMfao8CS4QLON7HzjyDRlf7qE9SXna6/749ZzpEsBZHy+MmY/GOS4i6g==} + title@4.0.1: + resolution: {integrity: sha512-xRnPkJx9nvE5MF6LkB5e8QJjE2FW8269wTu/LQdf7zZqBgPly0QJPf/CWAo7srj5so4yXfoLEdCFgurlpi47zg==} hasBin: true tlds@1.252.0: @@ -11266,7 +11266,7 @@ snapshots: tinyspy@3.0.2: {} - title@4.0.0: + title@4.0.1: dependencies: arg: 5.0.2 chalk: 5.3.0 From b017246c2b661bd6c264dcb4bc7c2045d1752818 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:09:07 +0800 Subject: [PATCH 566/740] chore(deps): bump @opentelemetry/semantic-conventions (#17658) Bumps [@opentelemetry/semantic-conventions](https://github.com/open-telemetry/opentelemetry-js) from 1.27.0 to 1.28.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.27.0...v1.28.0) --- updated-dependencies: - dependency-name: "@opentelemetry/semantic-conventions" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 c1655810fbd7ede..9ebf83f7e65cdab 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "@opentelemetry/resources": "1.28.0", "@opentelemetry/sdk-metrics": "1.28.0", "@opentelemetry/sdk-trace-base": "1.28.0", - "@opentelemetry/semantic-conventions": "1.27.0", + "@opentelemetry/semantic-conventions": "1.28.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.23", "@scalar/hono-api-reference": "0.5.160", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b54be6fd78a2384..862917bb45b787f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -45,8 +45,8 @@ importers: specifier: 1.28.0 version: 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': - specifier: 1.27.0 - version: 1.27.0 + specifier: 1.28.0 + version: 1.28.0 '@postlight/parser': specifier: 2.2.3 version: 2.2.3 @@ -1561,6 +1561,10 @@ packages: resolution: {integrity: sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==} engines: {node: '>=14'} + '@opentelemetry/semantic-conventions@1.28.0': + resolution: {integrity: sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==} + engines: {node: '>=14'} + '@otplib/core@12.0.1': resolution: {integrity: sha512-4sGntwbA/AC+SbPhbsziRiD+jNDdIzsZ3JUyfZwjtKyc/wufl1pnSIaG4Uqx8ymPagujub0o92kgBnB89cuAMA==} @@ -7054,6 +7058,8 @@ snapshots: '@opentelemetry/semantic-conventions@1.27.0': {} + '@opentelemetry/semantic-conventions@1.28.0': {} + '@otplib/core@12.0.1': {} '@otplib/plugin-crypto@12.0.1': From e7d732b3970287459d04b9dd1749527f477b6e48 Mon Sep 17 00:00:00 2001 From: XU Ke <kexu567@gmail.com> Date: Thu, 21 Nov 2024 18:41:08 +0800 Subject: [PATCH 567/740] fix(/tongji/sem): Add the correct icon (#17662) --- lib/routes/tongji/sem/notice.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/tongji/sem/notice.ts b/lib/routes/tongji/sem/notice.ts index 17f9863e0081b04..790e67ce159ba5d 100644 --- a/lib/routes/tongji/sem/notice.ts +++ b/lib/routes/tongji/sem/notice.ts @@ -49,7 +49,9 @@ async function handler(ctx) { return { title: '同济大学经济与管理学院', description: String(subType.has(type) ? subTypeName[type] : '学院通知'), - image: 'https://tongji.edu.cn/images/badge.png', + image: 'https://upload.wikimedia.org/wikipedia/zh/f/f8/Tongji_University_Emblem.svg', + icon: 'https://upload.wikimedia.org/wikipedia/zh/f/f8/Tongji_University_Emblem.svg', + logo: 'https://upload.wikimedia.org/wikipedia/zh/f/f8/Tongji_University_Emblem.svg', link: 'https://sem.tongji.edu.cn/semch', item: resultsWithContent, }; From 5d967b0de3c1957da6a998471f0c1348e8347802 Mon Sep 17 00:00:00 2001 From: Kawauso <92703641+KawausoJyou@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:42:13 +0800 Subject: [PATCH 568/740] revert(route/xiaohongshu): add current time as pubDate (#17665) Reason for revert: The change did not meet the expected behavior or caused issues. --- lib/routes/xiaohongshu/user.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/routes/xiaohongshu/user.ts b/lib/routes/xiaohongshu/user.ts index ed595428d8be05c..1f0ae2470263157 100644 --- a/lib/routes/xiaohongshu/user.ts +++ b/lib/routes/xiaohongshu/user.ts @@ -2,7 +2,6 @@ import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import { getUser } from './util'; import InvalidParameterError from '@/errors/types/invalid-parameter'; -import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/user/:user_id/:category', @@ -58,7 +57,6 @@ async function handler(ctx) { description: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`, author: noteCard.user.nickname, upvotes: noteCard.interactInfo.likedCount, - pubDate: parseDate(new Date().toISOString()), })) ); const renderCollect = (collect) => { @@ -77,7 +75,6 @@ async function handler(ctx) { description: `<img src ="${item.cover.info_list.pop().url}"><br>${item.display_title}`, author: item.user.nickname, upvotes: item.interact_info.likedCount, - pubDate: parseDate(new Date().toISOString()), })); }; From f9641b5aefe75a3f870f914eecf05943fbd1364e Mon Sep 17 00:00:00 2001 From: dddaniel1 <61337842+dddaniel1@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:53:37 +0800 Subject: [PATCH 569/740] fix(route): xiaohongshu fulltext add cookie authentication (#17228) * fix(route/xiaohongshu) add cookie authentication * fix(route/xiaohongshu) add cookie authentication * fix(route/xiaohongshu) add cookie authentication * fix(route/xiaohongshu) add method annotation --------- Co-authored-by: Tony <TonyRL@users.noreply.github.com> --- lib/config.ts | 6 ++ lib/routes/xiaohongshu/notes.ts | 150 +++++++++++++++++++++++++++++--- 2 files changed, 146 insertions(+), 10 deletions(-) diff --git a/lib/config.ts b/lib/config.ts index 9227906df8b1d90..87a526083c0f74d 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -351,6 +351,9 @@ export type Config = { device_id?: string; refresh_token?: string; }; + xiaohongshu: { + cookie?: string; + }; ximalaya: { token?: string; }; @@ -772,6 +775,9 @@ const calculateValue = () => { device_id: envs.XIAOYUZHOU_ID, refresh_token: envs.XIAOYUZHOU_TOKEN, }, + xiaohongshu: { + cookie: envs.XIAOHONGSHU_COOKIE, + }, ximalaya: { token: envs.XIMALAYA_TOKEN, }, diff --git a/lib/routes/xiaohongshu/notes.ts b/lib/routes/xiaohongshu/notes.ts index a4d85a5d563425f..18d028819f20499 100644 --- a/lib/routes/xiaohongshu/notes.ts +++ b/lib/routes/xiaohongshu/notes.ts @@ -1,9 +1,12 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import { getNotes, formatText, formatNote } from './util'; +import { formatNote, formatText, getNotes } from './util'; +import { config } from '@/config'; +import got from '@/utils/got'; +import { load } from 'cheerio'; export const route: Route = { - path: '/user/:user_id/notes/fulltext', + path: '/user/:user_id/notes/:fulltext', radar: [ { source: ['xiaohongshu.com/user/profile/:user_id'], @@ -17,23 +20,150 @@ export const route: Route = { features: { antiCrawler: true, requirePuppeteer: true, + requireConfig: [ + { + name: 'XIAOHONGSHU_COOKIE', + optional: true, + description: '小红书 cookie 值,可在网络里面看到。', + }, + ], }, parameters: { user_id: 'user id, length 24 characters', + fulltext: { + description: '是否获取全文', + default: '', + }, }, }; async function handler(ctx) { const userId = ctx.req.param('user_id'); const url = `https://www.xiaohongshu.com/user/profile/${userId}`; + const cookie = config.xiaohongshu.cookie; + // 获取详情需要cookie登录 + if (cookie && ctx.req.param('fulltext')) { + const urlNotePrefix = 'https://www.xiaohongshu.com/explore'; + // 获取用户的笔记信息 + const user = await getUser(url, cookie); + const notes = await renderNotesFulltext(user.notes, urlNotePrefix); + return { + title: `${user.userPageData.basicInfo.nickname} - 笔记 • 小红书 / RED`, + description: user.userPageData.basicInfo.desc, + image: user.userPageData.basicInfo.imageb || user.userPageData.basicInfo.images, + link: url, + item: notes, + }; + } else { + const { user, notes } = await getNotes(url, cache); + return { + title: `${user.nickname} - 笔记 • 小红书 / RED`, + description: formatText(user.desc), + image: user.imageb || user.images, + link: url, + item: notes.map((item) => formatNote(url, item)), + }; + } +} + +/** + * 获取所有笔记 + * @param notes 用户笔记信息 + * @param urlPrex 笔记详情前缀 + */ +async function renderNotesFulltext(notes, urlPrex) { + const data = []; + const promises = notes.flatMap((note) => + note.map(async ({ noteCard, id }) => { + const link = `${urlPrex}/${id}`; + const { title, description, pubDate } = await getFullNote(link); + return { + title, + link, + description, + author: noteCard.user.nickName, + guid: noteCard.noteId, + pubDate, + }; + }) + ); + data.push(...(await Promise.all(promises))); + return data; +} - const { user, notes } = await getNotes(url, cache); +/** + * 获取笔记全文 + * @param link + */ +async function getFullNote(link) { + const cookie = config.xiaohongshu.cookie; + const data = (await cache.tryGet(link, async () => { + const res = await got(link, { + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', + Cookie: cookie, + }, + }); + const $ = load(res.data); + let script = $('script') + .filter((i, script) => { + const text = script.children[0]?.data; + return text?.startsWith('window.__INITIAL_STATE__='); + }) + .text(); + script = script.slice('window.__INITIAL_STATE__='.length); + script = script.replaceAll('undefined', 'null'); + const state = JSON.parse(script); + const note = state.note.noteDetailMap[state.note.firstNoteId].note; + const images = note.imageList.map((image) => image.urlDefault); + const title = note.title; + let desc = note.desc; + desc = desc.replaceAll(/\[.*?\]/g, ''); + desc = desc.replaceAll(/#(.*?)#/g, '#$1'); + desc = desc.replaceAll('\n', '<br>'); + const pubDate = new Date(note.time); + const description = `${images.map((image) => `<img src="${image}">`).join('')}<br>${title}<br>${desc}`; + return { + title, + description, + pubDate, + }; + })) as Promise<{ title: string; description: string; pubDate: Date }>; + return data; +} - return { - title: `${user.nickname} - 笔记 • 小红书 / RED`, - description: formatText(user.desc), - image: user.imageb || user.images, - link: url, - item: notes.map((item) => formatNote(url, item)), - }; +/** + * 获取用户信息和笔记列表信息 + * @param url + * @param cookie + */ +async function getUser(url: string, cookie: string) { + const res = await got(url, { + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', + Cookie: cookie, + }, + }); + const $ = load(res.data); + // 取出dom里面的信息,防止反爬 + const paths = $('#userPostedFeeds > section > div > a.cover.ld.mask').map((i, item) => item.attributes[3].value); + let script = $('script') + .filter((i, script) => { + const text = script.children[0]?.data; + return text?.startsWith('window.__INITIAL_STATE__='); + }) + .text(); + script = script.slice('window.__INITIAL_STATE__='.length); + script = script.replaceAll('undefined', 'null'); + const state = JSON.parse(script); + let index = 0; + // 将 dom里面的随机后缀补到每个文章id后面,防止反爬 + for (const item of state.user.notes.flat()) { + const path = paths[index]; + if (path && path.includes('?')) { + item.id = item.id + path?.substring(path.indexOf('?')); + } + index = index + 1; + } + return state.user; } From 790ea65fa7f4f04d7c59722963220ec5b6affb91 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 21 Nov 2024 22:22:20 +0800 Subject: [PATCH 570/740] feat(route/xiaohongshu): merge notes route to user and enable cookie --- lib/routes/xiaohongshu/notes.ts | 169 ------------------------ lib/routes/xiaohongshu/user.ts | 219 +++++++++++++++++++++++++------- 2 files changed, 173 insertions(+), 215 deletions(-) delete mode 100644 lib/routes/xiaohongshu/notes.ts diff --git a/lib/routes/xiaohongshu/notes.ts b/lib/routes/xiaohongshu/notes.ts deleted file mode 100644 index 18d028819f20499..000000000000000 --- a/lib/routes/xiaohongshu/notes.ts +++ /dev/null @@ -1,169 +0,0 @@ -import { Route } from '@/types'; -import cache from '@/utils/cache'; -import { formatNote, formatText, getNotes } from './util'; -import { config } from '@/config'; -import got from '@/utils/got'; -import { load } from 'cheerio'; - -export const route: Route = { - path: '/user/:user_id/notes/:fulltext', - radar: [ - { - source: ['xiaohongshu.com/user/profile/:user_id'], - target: '/user/:user_id/notes', - }, - ], - name: '用户笔记 全文', - maintainers: ['howerhe'], - handler, - example: '/xiaohongshu/user/52d8c541b4c4d60e6c867480/notes/fulltext', - features: { - antiCrawler: true, - requirePuppeteer: true, - requireConfig: [ - { - name: 'XIAOHONGSHU_COOKIE', - optional: true, - description: '小红书 cookie 值,可在网络里面看到。', - }, - ], - }, - parameters: { - user_id: 'user id, length 24 characters', - fulltext: { - description: '是否获取全文', - default: '', - }, - }, -}; - -async function handler(ctx) { - const userId = ctx.req.param('user_id'); - const url = `https://www.xiaohongshu.com/user/profile/${userId}`; - const cookie = config.xiaohongshu.cookie; - // 获取详情需要cookie登录 - if (cookie && ctx.req.param('fulltext')) { - const urlNotePrefix = 'https://www.xiaohongshu.com/explore'; - // 获取用户的笔记信息 - const user = await getUser(url, cookie); - const notes = await renderNotesFulltext(user.notes, urlNotePrefix); - return { - title: `${user.userPageData.basicInfo.nickname} - 笔记 • 小红书 / RED`, - description: user.userPageData.basicInfo.desc, - image: user.userPageData.basicInfo.imageb || user.userPageData.basicInfo.images, - link: url, - item: notes, - }; - } else { - const { user, notes } = await getNotes(url, cache); - return { - title: `${user.nickname} - 笔记 • 小红书 / RED`, - description: formatText(user.desc), - image: user.imageb || user.images, - link: url, - item: notes.map((item) => formatNote(url, item)), - }; - } -} - -/** - * 获取所有笔记 - * @param notes 用户笔记信息 - * @param urlPrex 笔记详情前缀 - */ -async function renderNotesFulltext(notes, urlPrex) { - const data = []; - const promises = notes.flatMap((note) => - note.map(async ({ noteCard, id }) => { - const link = `${urlPrex}/${id}`; - const { title, description, pubDate } = await getFullNote(link); - return { - title, - link, - description, - author: noteCard.user.nickName, - guid: noteCard.noteId, - pubDate, - }; - }) - ); - data.push(...(await Promise.all(promises))); - return data; -} - -/** - * 获取笔记全文 - * @param link - */ -async function getFullNote(link) { - const cookie = config.xiaohongshu.cookie; - const data = (await cache.tryGet(link, async () => { - const res = await got(link, { - headers: { - 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', - Cookie: cookie, - }, - }); - const $ = load(res.data); - let script = $('script') - .filter((i, script) => { - const text = script.children[0]?.data; - return text?.startsWith('window.__INITIAL_STATE__='); - }) - .text(); - script = script.slice('window.__INITIAL_STATE__='.length); - script = script.replaceAll('undefined', 'null'); - const state = JSON.parse(script); - const note = state.note.noteDetailMap[state.note.firstNoteId].note; - const images = note.imageList.map((image) => image.urlDefault); - const title = note.title; - let desc = note.desc; - desc = desc.replaceAll(/\[.*?\]/g, ''); - desc = desc.replaceAll(/#(.*?)#/g, '#$1'); - desc = desc.replaceAll('\n', '<br>'); - const pubDate = new Date(note.time); - const description = `${images.map((image) => `<img src="${image}">`).join('')}<br>${title}<br>${desc}`; - return { - title, - description, - pubDate, - }; - })) as Promise<{ title: string; description: string; pubDate: Date }>; - return data; -} - -/** - * 获取用户信息和笔记列表信息 - * @param url - * @param cookie - */ -async function getUser(url: string, cookie: string) { - const res = await got(url, { - headers: { - 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', - Cookie: cookie, - }, - }); - const $ = load(res.data); - // 取出dom里面的信息,防止反爬 - const paths = $('#userPostedFeeds > section > div > a.cover.ld.mask').map((i, item) => item.attributes[3].value); - let script = $('script') - .filter((i, script) => { - const text = script.children[0]?.data; - return text?.startsWith('window.__INITIAL_STATE__='); - }) - .text(); - script = script.slice('window.__INITIAL_STATE__='.length); - script = script.replaceAll('undefined', 'null'); - const state = JSON.parse(script); - let index = 0; - // 将 dom里面的随机后缀补到每个文章id后面,防止反爬 - for (const item of state.user.notes.flat()) { - const path = paths[index]; - if (path && path.includes('?')) { - item.id = item.id + path?.substring(path.indexOf('?')); - } - index = index + 1; - } - return state.user; -} diff --git a/lib/routes/xiaohongshu/user.ts b/lib/routes/xiaohongshu/user.ts index 1f0ae2470263157..32184c4746a6f25 100644 --- a/lib/routes/xiaohongshu/user.ts +++ b/lib/routes/xiaohongshu/user.ts @@ -2,18 +2,34 @@ import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; import { getUser } from './util'; import InvalidParameterError from '@/errors/types/invalid-parameter'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import { config } from '@/config'; export const route: Route = { path: '/user/:user_id/:category', - name: '用户笔记', + name: '用户笔记/收藏', categories: ['social-media', 'popular'], view: ViewType.Articles, - maintainers: ['lotosbin'], + maintainers: ['lotosbin', 'howerhe', 'rien7', 'dddaniel1', 'pseudoyu'], handler, + radar: [ + { + source: ['xiaohongshu.com/user/profile/:user_id'], + target: '/user/:user_id/notes', + }, + ], example: '/xiaohongshu/user/593032945e87e77791e03696/notes', features: { antiCrawler: true, requirePuppeteer: true, + requireConfig: [ + { + name: 'XIAOHONGSHU_COOKIE', + optional: true, + description: '小红书 cookie 值,可在网络里面看到。', + }, + ], }, parameters: { user_id: 'user id, length 24 characters', @@ -37,52 +53,163 @@ async function handler(ctx) { const userId = ctx.req.param('user_id'); const category = ctx.req.param('category'); const url = `https://www.xiaohongshu.com/user/profile/${userId}`; + const cookie = config.xiaohongshu.cookie; - const { - userPageData: { basicInfo, interactions, tags }, - notes, - collect, - } = await getUser(url, cache); + if (cookie && category === 'notes') { + const urlNotePrefix = 'https://www.xiaohongshu.com/explore'; + const user = await getUserWithCookie(url, cookie); + const notes = await renderNotesFulltext(user.notes, urlNotePrefix); + return { + title: `${user.userPageData.basicInfo.nickname} - 笔记 • 小红书 / RED`, + description: user.userPageData.basicInfo.desc, + image: user.userPageData.basicInfo.imageb || user.userPageData.basicInfo.images, + link: url, + item: notes, + }; + } else { + const { + userPageData: { basicInfo, interactions, tags }, + notes, + collect, + } = await getUser(url, cache); - const title = `${basicInfo.nickname} - 小红书${category === 'notes' ? '笔记' : '收藏'}`; - const description = `${basicInfo.desc} ${tags.map((t) => t.name).join(' ')} ${interactions.map((i) => `${i.count} ${i.name}`).join(' ')}`; - const image = basicInfo.imageb || basicInfo.images; + const title = `${basicInfo.nickname} - 小红书${category === 'notes' ? '笔记' : '收藏'}`; + const description = `${basicInfo.desc} ${tags.map((t) => t.name).join(' ')} ${interactions.map((i) => `${i.count} ${i.name}`).join(' ')}`; + const image = basicInfo.imageb || basicInfo.images; - const renderNote = (notes) => - notes.flatMap((n) => - n.map(({ id, noteCard }) => ({ - title: noteCard.displayTitle, - link: `${url}/${noteCard.noteId || id}`, - guid: noteCard.noteId || id || noteCard.displayTitle, - description: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`, - author: noteCard.user.nickname, - upvotes: noteCard.interactInfo.likedCount, - })) - ); - const renderCollect = (collect) => { - if (!collect) { - throw new InvalidParameterError('该用户已设置收藏内容不可见'); - } - if (collect.code !== 0) { - throw new Error(JSON.stringify(collect)); - } - if (!collect.data.notes.length) { - throw new InvalidParameterError('该用户已设置收藏内容不可见'); - } - return collect.data.notes.map((item) => ({ - title: item.display_title, - link: `${url}/${item.note_id}`, - description: `<img src ="${item.cover.info_list.pop().url}"><br>${item.display_title}`, - author: item.user.nickname, - upvotes: item.interact_info.likedCount, - })); - }; + const renderNote = (notes) => + notes.flatMap((n) => + n.map(({ id, noteCard }) => ({ + title: noteCard.displayTitle, + link: `${url}/${noteCard.noteId || id}`, + guid: noteCard.noteId || id || noteCard.displayTitle, + description: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`, + author: noteCard.user.nickname, + upvotes: noteCard.interactInfo.likedCount, + })) + ); + const renderCollect = (collect) => { + if (!collect) { + throw new InvalidParameterError('该用户已设置收藏内容不可见'); + } + if (collect.code !== 0) { + throw new Error(JSON.stringify(collect)); + } + if (!collect.data.notes.length) { + throw new InvalidParameterError('该用户已设置收藏内容不可见'); + } + return collect.data.notes.map((item) => ({ + title: item.display_title, + link: `${url}/${item.note_id}`, + description: `<img src ="${item.cover.info_list.pop().url}"><br>${item.display_title}`, + author: item.user.nickname, + upvotes: item.interact_info.likedCount, + })); + }; + + return { + title, + description, + image, + link: url, + item: category === 'notes' ? renderNote(notes) : renderCollect(collect), + }; + } +} - return { - title, - description, - image, - link: url, - item: category === 'notes' ? renderNote(notes) : renderCollect(collect), - }; +async function renderNotesFulltext(notes, urlPrex) { + const data: Array<{ + title: string; + link: string; + description: string; + author: string; + guid: string; + pubDate: Date; + }> = []; + const promises = notes.flatMap((note) => + note.map(async ({ noteCard, id }) => { + const link = `${urlPrex}/${id}`; + const { title, description, pubDate } = await getFullNote(link); + return { + title, + link, + description, + author: noteCard.user.nickName, + guid: noteCard.noteId, + pubDate, + }; + }) + ); + data.push(...(await Promise.all(promises))); + return data; +} + +async function getFullNote(link) { + const cookie = config.xiaohongshu.cookie; + const data = (await cache.tryGet(link, async () => { + const res = await ofetch(link, { + headers: cookie + ? { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', + Cookie: cookie, + } + : { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', + }, + }); + const $ = load(res); + let script = $('script') + .filter((i, script) => { + const text = script.children[0]?.data; + return text?.startsWith('window.__INITIAL_STATE__='); + }) + .text(); + script = script.slice('window.__INITIAL_STATE__='.length); + script = script.replaceAll('undefined', 'null'); + const state = JSON.parse(script); + const note = state.note.noteDetailMap[state.note.firstNoteId].note; + const images = note.imageList.map((image) => image.urlDefault); + const title = note.title; + let desc = note.desc; + desc = desc.replaceAll(/\[.*?\]/g, ''); + desc = desc.replaceAll(/#(.*?)#/g, '#$1'); + desc = desc.replaceAll('\n', '<br>'); + const pubDate = new Date(note.time); + const description = `${images.map((image) => `<img src="${image}">`).join('')}<br>${title}<br>${desc}`; + return { + title, + description, + pubDate, + }; + })) as Promise<{ title: string; description: string; pubDate: Date }>; + return data; +} + +async function getUserWithCookie(url: string, cookie: string) { + const res = await ofetch(url, { + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', + Cookie: cookie, + }, + }); + const $ = load(res); + const paths = $('#userPostedFeeds > section > div > a.cover.ld.mask').map((i, item) => item.attributes[3].value); + let script = $('script') + .filter((i, script) => { + const text = script.children[0]?.data; + return text?.startsWith('window.__INITIAL_STATE__='); + }) + .text(); + script = script.slice('window.__INITIAL_STATE__='.length); + script = script.replaceAll('undefined', 'null'); + const state = JSON.parse(script); + let index = 0; + for (const item of state.user.notes.flat()) { + const path = paths[index]; + if (path && path.includes('?')) { + item.id = item.id + path?.substring(path.indexOf('?')); + } + index = index + 1; + } + return state.user; } From e286c779014a44c072efbd6d84aa38c83860f0e2 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 21 Nov 2024 23:06:11 +0800 Subject: [PATCH 571/740] feat(route/xiaohongshu): add fallback get notes logics --- lib/routes/xiaohongshu/user.ts | 119 ++++++++++++++++++--------------- 1 file changed, 64 insertions(+), 55 deletions(-) diff --git a/lib/routes/xiaohongshu/user.ts b/lib/routes/xiaohongshu/user.ts index 32184c4746a6f25..c9366886f60f5c9 100644 --- a/lib/routes/xiaohongshu/user.ts +++ b/lib/routes/xiaohongshu/user.ts @@ -56,65 +56,74 @@ async function handler(ctx) { const cookie = config.xiaohongshu.cookie; if (cookie && category === 'notes') { - const urlNotePrefix = 'https://www.xiaohongshu.com/explore'; - const user = await getUserWithCookie(url, cookie); - const notes = await renderNotesFulltext(user.notes, urlNotePrefix); - return { - title: `${user.userPageData.basicInfo.nickname} - 笔记 • 小红书 / RED`, - description: user.userPageData.basicInfo.desc, - image: user.userPageData.basicInfo.imageb || user.userPageData.basicInfo.images, - link: url, - item: notes, - }; + try { + const urlNotePrefix = 'https://www.xiaohongshu.com/explore'; + const user = await getUserWithCookie(url, cookie); + const notes = await renderNotesFulltext(user.notes, urlNotePrefix); + return { + title: `${user.userPageData.basicInfo.nickname} - 笔记 • 小红书 / RED`, + description: user.userPageData.basicInfo.desc, + image: user.userPageData.basicInfo.imageb || user.userPageData.basicInfo.images, + link: url, + item: notes, + }; + } catch { + // Fallback to normal logic if cookie method fails + return await getUserFeedWithoutCookie(url, category); + } } else { - const { - userPageData: { basicInfo, interactions, tags }, - notes, - collect, - } = await getUser(url, cache); + return await getUserFeedWithoutCookie(url, category); + } +} - const title = `${basicInfo.nickname} - 小红书${category === 'notes' ? '笔记' : '收藏'}`; - const description = `${basicInfo.desc} ${tags.map((t) => t.name).join(' ')} ${interactions.map((i) => `${i.count} ${i.name}`).join(' ')}`; - const image = basicInfo.imageb || basicInfo.images; +async function getUserFeedWithoutCookie(url: string, category: string) { + const { + userPageData: { basicInfo, interactions, tags }, + notes, + collect, + } = await getUser(url, cache); - const renderNote = (notes) => - notes.flatMap((n) => - n.map(({ id, noteCard }) => ({ - title: noteCard.displayTitle, - link: `${url}/${noteCard.noteId || id}`, - guid: noteCard.noteId || id || noteCard.displayTitle, - description: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`, - author: noteCard.user.nickname, - upvotes: noteCard.interactInfo.likedCount, - })) - ); - const renderCollect = (collect) => { - if (!collect) { - throw new InvalidParameterError('该用户已设置收藏内容不可见'); - } - if (collect.code !== 0) { - throw new Error(JSON.stringify(collect)); - } - if (!collect.data.notes.length) { - throw new InvalidParameterError('该用户已设置收藏内容不可见'); - } - return collect.data.notes.map((item) => ({ - title: item.display_title, - link: `${url}/${item.note_id}`, - description: `<img src ="${item.cover.info_list.pop().url}"><br>${item.display_title}`, - author: item.user.nickname, - upvotes: item.interact_info.likedCount, - })); - }; + const title = `${basicInfo.nickname} - 小红书${category === 'notes' ? '笔记' : '收藏'}`; + const description = `${basicInfo.desc} ${tags.map((t) => t.name).join(' ')} ${interactions.map((i) => `${i.count} ${i.name}`).join(' ')}`; + const image = basicInfo.imageb || basicInfo.images; - return { - title, - description, - image, - link: url, - item: category === 'notes' ? renderNote(notes) : renderCollect(collect), - }; - } + const renderNote = (notes) => + notes.flatMap((n) => + n.map(({ id, noteCard }) => ({ + title: noteCard.displayTitle, + link: `${url}/${noteCard.noteId || id}`, + guid: noteCard.noteId || id || noteCard.displayTitle, + description: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`, + author: noteCard.user.nickname, + upvotes: noteCard.interactInfo.likedCount, + })) + ); + const renderCollect = (collect) => { + if (!collect) { + throw new InvalidParameterError('该用户已设置收藏内容不可见'); + } + if (collect.code !== 0) { + throw new Error(JSON.stringify(collect)); + } + if (!collect.data.notes.length) { + throw new InvalidParameterError('该用户已设置收藏内容不可见'); + } + return collect.data.notes.map((item) => ({ + title: item.display_title, + link: `${url}/${item.note_id}`, + description: `<img src ="${item.cover.info_list.pop().url}"><br>${item.display_title}`, + author: item.user.nickname, + upvotes: item.interact_info.likedCount, + })); + }; + + return { + title, + description, + image, + link: url, + item: category === 'notes' ? renderNote(notes) : renderCollect(collect), + }; } async function renderNotesFulltext(notes, urlPrex) { From 7416065640de7c10dede8408fca517abdfedb9c0 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 21 Nov 2024 08:03:04 -0800 Subject: [PATCH 572/740] feat(route): thepaper user (#17666) --- lib/routes/thepaper/channel.ts | 2 +- lib/routes/thepaper/factpaper.ts | 2 +- lib/routes/thepaper/featured.ts | 2 +- lib/routes/thepaper/list.ts | 2 +- lib/routes/thepaper/user.ts | 174 +++++++++++++++++++++++++++++++ 5 files changed, 178 insertions(+), 4 deletions(-) create mode 100644 lib/routes/thepaper/user.ts diff --git a/lib/routes/thepaper/channel.ts b/lib/routes/thepaper/channel.ts index 96fccb26d01aa17..11d66cf2a7f2bd3 100644 --- a/lib/routes/thepaper/channel.ts +++ b/lib/routes/thepaper/channel.ts @@ -5,7 +5,7 @@ import got from '@/utils/got'; export const route: Route = { path: '/channel/:id', - categories: ['traditional-media'], + categories: ['new-media'], example: '/thepaper/channel/25950', parameters: { id: '频道 id,可在频道页 URL 中找到' }, features: { diff --git a/lib/routes/thepaper/factpaper.ts b/lib/routes/thepaper/factpaper.ts index 44639088b07e04d..c5623f23908f94e 100644 --- a/lib/routes/thepaper/factpaper.ts +++ b/lib/routes/thepaper/factpaper.ts @@ -11,7 +11,7 @@ import path from 'node:path'; export const route: Route = { path: '/factpaper/:status?', - categories: ['traditional-media'], + categories: ['new-media'], example: '/thepaper/factpaper', parameters: { status: '状态 id,可选 `1` 即 有定论 或 `0` 即 核查中,默认为 `1`' }, features: { diff --git a/lib/routes/thepaper/featured.ts b/lib/routes/thepaper/featured.ts index b660d38f4d62a71..1f4127e49b2ae17 100644 --- a/lib/routes/thepaper/featured.ts +++ b/lib/routes/thepaper/featured.ts @@ -5,7 +5,7 @@ import got from '@/utils/got'; export const route: Route = { path: '/featured', - categories: ['traditional-media'], + categories: ['new-media'], example: '/thepaper/featured', parameters: {}, features: { diff --git a/lib/routes/thepaper/list.ts b/lib/routes/thepaper/list.ts index 16dd6f749513193..26c0293925761b3 100644 --- a/lib/routes/thepaper/list.ts +++ b/lib/routes/thepaper/list.ts @@ -5,7 +5,7 @@ import got from '@/utils/got'; export const route: Route = { path: '/list/:id', - categories: ['traditional-media'], + categories: ['new-media'], example: '/thepaper/list/25457', parameters: { id: '栏目 id,可在栏目页 URL 中找到' }, features: { diff --git a/lib/routes/thepaper/user.ts b/lib/routes/thepaper/user.ts new file mode 100644 index 000000000000000..d072f002484ff88 --- /dev/null +++ b/lib/routes/thepaper/user.ts @@ -0,0 +1,174 @@ +import { Route } from '@/types'; +import * as cheerio from 'cheerio'; +import ofetch from '@/utils/ofetch'; +import cache from '@/utils/cache'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/user/:pphId', + categories: ['new-media'], + example: '/thepaper/user/4221423', + parameters: { pphId: '澎湃号 id,可在澎湃号页 URL 中找到' }, + name: '澎湃号', + maintainers: ['TonyRL'], + handler, +}; + +interface AuthorInfo { + userId: number; + sname: string; + pic: string; + isAuth: string; + userType: string; + perDesc: string; + mobile: null; + isOrder: string; + sex: string; + area: string; + attentionNum: string; + fansNum: string; + praiseNum: null; + pph: boolean; + normalUser: boolean; + mobForwardType: number; + authInfo: string; + mail: string; + pphImpactNum: string; + wonderfulCommentCount: string; + location: string; + lastLoginDate: null; +} + +interface PPHContentResponse { + code: number; + data: Data; + desc: string; + time: number; +} + +interface Data { + hasNext: boolean; + startTime: number; + list: ListItem[]; + nodeInfo: null; + tagInfo: null; + moreNodeInfo: null; + pageNum: null; + pageSize: null; + pages: null; + total: null; + prevPageNum: null; + nextPageNum: null; + excludeContIds: null; + contCont: null; + filterIds: null; + updateCount: null; +} + +interface ListItem { + contId: string; + isOutForword: string; + isOutForward: string; + forwardType: string; + mobForwardType: number; + interactionNum: string; + praiseTimes: string; + pic: string; + imgCardMode: number; + smallPic: string; + sharePic: string; + pubTime: string; + pubTimeNew: string; + name: string; + closePraise: string; + authorInfo: AuthorInfo; + nodeId: number; + contType: number; + pubTimeLong: number; + specialNodeId: number; + cardMode: string; + dataObjId: number; + closeFrontComment: boolean; + isSupInteraction: boolean; + hideVideoFlag: boolean; + praiseStyle: number; + isSustainedFly: number; + softLocType: number; + closeComment: boolean; + voiceInfo: VoiceInfo; + softAdTypeStr: string; +} + +interface VoiceInfo { + imgSrc: string; + isHaveVoice: string; +} + +async function handler(ctx) { + const { pphId } = ctx.req.param(); + + const mobileBuildId = (await cache.tryGet('thepaper:m:buildId', async () => { + const response = await ofetch('https://m.thepaper.cn'); + const $ = cheerio.load(response); + const nextData = JSON.parse($('script#__NEXT_DATA__').text()); + return nextData.buildId; + })) as string; + + const userInfo = (await cache.tryGet(`thepaper:user:${pphId}`, async () => { + const response = await ofetch(`https://api.thepaper.cn/userservice/user/homePage/${pphId}`, { + headers: { + 'Client-Type': '2', + Origin: 'https://m.thepaper.cn', + Referer: 'https://m.thepaper.cn/', + }, + }); + return response.userInfo; + })) as AuthorInfo; + + const response = await ofetch<PPHContentResponse>('https://api.thepaper.cn/contentapi/cont/pph/user', { + method: 'POST', + body: { + pageSize: 10, + pageNum: 1, + contType: 0, + excludeContIds: [], + pphId, + startTime: 0, + }, + }); + + const list = response.data.list.map((item) => ({ + title: item.name, + link: `https://www.thepaper.cn/newsDetail_forward_${item.contId}`, + pubDate: parseDate(item.pubTimeLong), + author: item.authorInfo.sname, + contId: item.contId, + image: item.pic, + })); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const response = await ofetch(`https://m.thepaper.cn/_next/data/${mobileBuildId}/detail/${item.contId}.json`, { + query: { + id: item.contId, + }, + }); + + item.description = response.pageProps.detailData.contentDetail.content; + item.updated = parseDate(response.pageProps.detailData.contentDetail.updateTime); + + return item; + }) + ) + ); + + return { + title: userInfo.sname, + description: userInfo.perDesc, + link: `https://www.thepaper.cn/user_${pphId}`, + item: items, + itunes_author: userInfo.sname, + image: userInfo.pic, + }; +} From d78a47ec7bb3dc512c2776a00919b69467ee8ad4 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 21 Nov 2024 09:41:11 -0800 Subject: [PATCH 573/740] fix(core/cache): update cache key generation to include query limit (#17674) --- lib/middleware/cache.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/middleware/cache.ts b/lib/middleware/cache.ts index 6c5596f5af6d1d5..d31a26a5b0b13b8 100644 --- a/lib/middleware/cache.ts +++ b/lib/middleware/cache.ts @@ -8,7 +8,7 @@ import { Data } from '@/types'; const bypassList = new Set(['/', '/robots.txt', '/logo.png', '/favicon.ico']); // only give cache string, as the `!` condition tricky -// md5 is used to shrink key size +// XXH64 is used to shrink key size // plz, write these tips in comments! const middleware: MiddlewareHandler = async (ctx, next) => { if (!cacheModule.status.available || bypassList.has(ctx.req.path)) { @@ -16,9 +16,11 @@ const middleware: MiddlewareHandler = async (ctx, next) => { return; } + const requestPath = ctx.req.path; + const limit = ctx.req.query('limit') ? `:${ctx.req.query('limit')}` : ''; const { h64ToString } = await xxhash(); - const key = 'rsshub:koa-redis-cache:' + h64ToString(ctx.req.path); - const controlKey = 'rsshub:path-requested:' + h64ToString(ctx.req.path); + const key = 'rsshub:koa-redis-cache:' + h64ToString(requestPath + limit); + const controlKey = 'rsshub:path-requested:' + h64ToString(requestPath + limit); const isRequesting = await cacheModule.globalCache.get(controlKey); From 1ec9ab9f068b999e44ff2e00365719c90844c2d9 Mon Sep 17 00:00:00 2001 From: Gnosnay <iamgnosnay@gmail.com> Date: Fri, 22 Nov 2024 11:15:00 +0800 Subject: [PATCH 574/740] fix(route/xueqiu): fix getting cookie logic (#17675) * fix(route/xueqiu): fix getting cookie logic * fix(route/xueqiu): fix according to review --- lib/routes/xueqiu/cookies.ts | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/lib/routes/xueqiu/cookies.ts b/lib/routes/xueqiu/cookies.ts index a5b8d940c5e9949..7e11d5218a3fa98 100644 --- a/lib/routes/xueqiu/cookies.ts +++ b/lib/routes/xueqiu/cookies.ts @@ -1,29 +1,24 @@ -import ofetch from '@/utils/ofetch'; import cache from '@/utils/cache'; import { config } from '@/config'; -import { getAcwScV2ByArg1 } from '@/routes/5eplay/utils'; +import puppeteer from '@/utils/puppeteer'; +import { getCookies } from '@/utils/puppeteer-utils'; export const parseToken = (link: string) => cache.tryGet( 'xueqiu:token', async () => { - const r = await ofetch(link); - - let acw_sc__v2 = ''; - const matches = r.match(/var arg1='(.*?)';/); - if (matches) { - acw_sc__v2 = getAcwScV2ByArg1(matches[1]); - } - const acw_sc__v2_cookie = `acw_sc__v2=${acw_sc__v2}`; - const res = await ofetch.raw(link, { - headers: { - Cookie: acw_sc__v2_cookie, - }, + const browser = await puppeteer({ stealth: true }); + const page = await browser.newPage(); + await page.setRequestInterception(true); + page.on('request', (request) => { + request.resourceType() === 'document' ? request.continue() : request.abort(); }); - const cookieArray = res.headers.getSetCookie(); - const xq_a_token_cookie = cookieArray.find((c) => c.startsWith('xq_a_token=')); - - return `${acw_sc__v2_cookie}; ${xq_a_token_cookie}`; + await page.goto(link, { + waitUntil: 'domcontentloaded', + }); + await page.evaluate(() => document.documentElement.innerHTML); + const cookies = await getCookies(page); + return cookies; }, config.cache.routeExpire, false From 63fae038ba3eb4003813d75298de3d49afc3c4b0 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 22 Nov 2024 14:19:19 +0800 Subject: [PATCH 575/740] refactor(route/xiaohongshu): merge helper methods to util --- lib/routes/xiaohongshu/user.ts | 107 +--------------- lib/routes/xiaohongshu/util.ts | 217 +++++++++++++++++---------------- 2 files changed, 116 insertions(+), 208 deletions(-) diff --git a/lib/routes/xiaohongshu/user.ts b/lib/routes/xiaohongshu/user.ts index c9366886f60f5c9..af1c94bd1964dc6 100644 --- a/lib/routes/xiaohongshu/user.ts +++ b/lib/routes/xiaohongshu/user.ts @@ -1,9 +1,7 @@ import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; -import { getUser } from './util'; +import { getUser, renderNotesFulltext, getUserWithCookie } from './util'; import InvalidParameterError from '@/errors/types/invalid-parameter'; -import ofetch from '@/utils/ofetch'; -import { load } from 'cheerio'; import { config } from '@/config'; export const route: Route = { @@ -69,14 +67,14 @@ async function handler(ctx) { }; } catch { // Fallback to normal logic if cookie method fails - return await getUserFeedWithoutCookie(url, category); + return await getUserFeeds(url, category); } } else { - return await getUserFeedWithoutCookie(url, category); + return await getUserFeeds(url, category); } } -async function getUserFeedWithoutCookie(url: string, category: string) { +async function getUserFeeds(url: string, category: string) { const { userPageData: { basicInfo, interactions, tags }, notes, @@ -125,100 +123,3 @@ async function getUserFeedWithoutCookie(url: string, category: string) { item: category === 'notes' ? renderNote(notes) : renderCollect(collect), }; } - -async function renderNotesFulltext(notes, urlPrex) { - const data: Array<{ - title: string; - link: string; - description: string; - author: string; - guid: string; - pubDate: Date; - }> = []; - const promises = notes.flatMap((note) => - note.map(async ({ noteCard, id }) => { - const link = `${urlPrex}/${id}`; - const { title, description, pubDate } = await getFullNote(link); - return { - title, - link, - description, - author: noteCard.user.nickName, - guid: noteCard.noteId, - pubDate, - }; - }) - ); - data.push(...(await Promise.all(promises))); - return data; -} - -async function getFullNote(link) { - const cookie = config.xiaohongshu.cookie; - const data = (await cache.tryGet(link, async () => { - const res = await ofetch(link, { - headers: cookie - ? { - 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', - Cookie: cookie, - } - : { - 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', - }, - }); - const $ = load(res); - let script = $('script') - .filter((i, script) => { - const text = script.children[0]?.data; - return text?.startsWith('window.__INITIAL_STATE__='); - }) - .text(); - script = script.slice('window.__INITIAL_STATE__='.length); - script = script.replaceAll('undefined', 'null'); - const state = JSON.parse(script); - const note = state.note.noteDetailMap[state.note.firstNoteId].note; - const images = note.imageList.map((image) => image.urlDefault); - const title = note.title; - let desc = note.desc; - desc = desc.replaceAll(/\[.*?\]/g, ''); - desc = desc.replaceAll(/#(.*?)#/g, '#$1'); - desc = desc.replaceAll('\n', '<br>'); - const pubDate = new Date(note.time); - const description = `${images.map((image) => `<img src="${image}">`).join('')}<br>${title}<br>${desc}`; - return { - title, - description, - pubDate, - }; - })) as Promise<{ title: string; description: string; pubDate: Date }>; - return data; -} - -async function getUserWithCookie(url: string, cookie: string) { - const res = await ofetch(url, { - headers: { - 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', - Cookie: cookie, - }, - }); - const $ = load(res); - const paths = $('#userPostedFeeds > section > div > a.cover.ld.mask').map((i, item) => item.attributes[3].value); - let script = $('script') - .filter((i, script) => { - const text = script.children[0]?.data; - return text?.startsWith('window.__INITIAL_STATE__='); - }) - .text(); - script = script.slice('window.__INITIAL_STATE__='.length); - script = script.replaceAll('undefined', 'null'); - const state = JSON.parse(script); - let index = 0; - for (const item of state.user.notes.flat()) { - const path = paths[index]; - if (path && path.includes('?')) { - item.id = item.id + path?.substring(path.indexOf('?')); - } - index = index + 1; - } - return state.user; -} diff --git a/lib/routes/xiaohongshu/util.ts b/lib/routes/xiaohongshu/util.ts index 7859ecf8866af9a..42947aa67fcdabb 100644 --- a/lib/routes/xiaohongshu/util.ts +++ b/lib/routes/xiaohongshu/util.ts @@ -2,6 +2,30 @@ import { config } from '@/config'; import logger from '@/utils/logger'; import { parseDate } from '@/utils/parse-date'; import puppeteer from '@/utils/puppeteer'; +import { ofetch } from 'ofetch'; +import { load } from 'cheerio'; +import cache from '@/utils/cache'; + +// Common headers for requests +const getHeaders = (cookie?: string) => ({ + Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7', + 'Accept-Encoding': 'gzip, deflate, br', + 'Accept-Language': 'en-US,en;q=0.9', + 'Cache-Control': 'no-cache', + Connection: 'keep-alive', + Host: 'www.xiaohongshu.com', + Pragma: 'no-cache', + 'Sec-Ch-Ua': '"Chromium";v="122", "Not(A:Brand";v="24", "Google Chrome";v="122"', + 'Sec-Ch-Ua-Mobile': '?0', + 'Sec-Ch-Ua-Platform': '"Windows"', + 'Sec-Fetch-Dest': 'document', + 'Sec-Fetch-Mode': 'navigate', + 'Sec-Fetch-Site': 'none', + 'Sec-Fetch-User': '?1', + 'Upgrade-Insecure-Requests': '1', + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36', + ...(cookie ? { Cookie: cookie } : {}), +}); const getUser = (url, cache) => cache.tryGet( @@ -23,7 +47,7 @@ const getUser = (url, cache) => }); await page.waitForSelector('div.reds-tab-item:nth-child(2)'); - const initialState = await page.evaluate(() => window.__INITIAL_STATE__); + const initialState = await page.evaluate(() => (window as any).__INITIAL_STATE__); if (!(await page.$('.lock-icon'))) { await page.click('div.reds-tab-item:nth-child(2)'); @@ -68,7 +92,7 @@ const getBoard = (url, cache) => logger.http(`Requesting ${url}`); await page.goto(url); await page.waitForSelector('.pc-container'); - const initialSsrState = await page.evaluate(() => window.__INITIAL_SSR_STATE__); + const initialSsrState = await page.evaluate(() => (window as any).__INITIAL_SSR_STATE__); return initialSsrState.Main; } finally { browser.close(); @@ -78,108 +102,6 @@ const getBoard = (url, cache) => false ); -const setPageFilter = async (page) => { - await page.setRequestInterception(true); - page.on('request', (req) => { - req.resourceType() === 'document' || req.resourceType() === 'script' || req.resourceType() === 'xhr' || req.resourceType() === 'other' ? req.continue() : req.abort(); - }); -}; - -const getNotes = (url, cache) => - cache.tryGet( - url + '/notes', // To avoid mixing with the cache for `user.js` - async () => { - let user = ''; - let notes = []; - - const browser = await puppeteer({ stealth: true }); - try { - const page = await browser.newPage(); - await setPageFilter(page); - - logger.http(`Requesting ${url}`); - await page.goto(url); - - let otherInfo = {}; - let userPosted = {}; - try { - [otherInfo, userPosted] = await Promise.all( - ['/api/sns/web/v1/user/otherinfo', '/api/sns/web/v1/user_posted'].map((p) => - page - .waitForResponse((res) => { - const req = res.request(); - return req.url().includes(p) && req.method() === 'GET'; - }) - .then((r) => r.json()) - ) - ); - } catch (error) { - throw new Error(`Could not get user information and note list\n${error}`); - } - - await page.close(); - - // Get full text for each note - const notesPromise = userPosted.data.notes.map((n) => { - const noteUrl = url + '/' + n.note_id; - - return cache.tryGet(noteUrl, async () => { - const notePage = await browser.newPage(); - await setPageFilter(notePage); - - logger.http(`Requesting ${noteUrl}`); - await notePage.goto(noteUrl); - - let feed = {}; - try { - feed = await notePage.evaluate(() => window.__INITIAL_STATE__); - - // Sometimes the page is not server-side rendered - if (feed?.note?.note === undefined || JSON.stringify(feed?.note?.note) === '{}') { - const res = await notePage.waitForResponse((res) => { - const req = res.request(); - return req.url().includes('/api/sns/web/v1/feed') && req.method() === 'POST'; - }); - - const json = await res.json(); - const note_card = json.data.items[0].note_card; - feed.note.note = { - title: note_card.title, - noteId: note_card.id, - desc: note_card.desc, - tagList: note_card.tag_list, - imageList: note_card.image_list, - user: note_card.user, - time: note_card.time, - lastUpdateTime: note_card.last_update_time, - }; - } - } catch (error) { - throw new Error(`Could not get note ${n.note_id}\n${error}`); - } - - await notePage.close(); - - if (feed?.note?.note !== undefined && JSON.stringify(feed?.note?.note) !== '{}') { - return feed.note.note; - } else { - throw new Error(`Could not get note ${n.note_id}`); - } - }); - }); - - user = otherInfo.data.basic_info; - notes = await Promise.all(notesPromise); - } finally { - await browser.close(); - } - - return { user, notes }; - }, - config.cache.routeExpire, - false - ); - const formatText = (text) => text.replaceAll(/(\r\n|\r|\n)/g, '<br>').replaceAll('\t', ' '); // tag_list.id has nothing to do with its url @@ -196,4 +118,89 @@ const formatNote = (url, note) => ({ updated: parseDate(note.lastUpdateTime, 'x'), }); -export { getUser, getBoard, getNotes, formatText, formatNote }; +async function renderNotesFulltext(notes, urlPrex) { + const data: Array<{ + title: string; + link: string; + description: string; + author: string; + guid: string; + pubDate: Date; + }> = []; + const promises = notes.flatMap((note) => + note.map(async ({ noteCard, id }) => { + const link = `${urlPrex}/${id}`; + const { title, description, pubDate } = await getFullNote(link); + return { + title, + link, + description, + author: noteCard.user.nickName, + guid: noteCard.noteId, + pubDate, + }; + }) + ); + data.push(...(await Promise.all(promises))); + return data; +} + +async function getFullNote(link) { + const data = (await cache.tryGet(link, async () => { + const res = await ofetch(link, { + headers: getHeaders(config.xiaohongshu.cookie), + }); + const $ = load(res); + const script = extractInitialState($); + const state = JSON.parse(script); + const note = state.note.noteDetailMap[state.note.firstNoteId].note; + const images = note.imageList.map((image) => image.urlDefault); + const title = note.title; + let desc = note.desc; + desc = desc.replaceAll(/\[.*?\]/g, ''); + desc = desc.replaceAll(/#(.*?)#/g, '#$1'); + desc = desc.replaceAll('\n', '<br>'); + const pubDate = new Date(note.time); + const description = `${images.map((image) => `<img src="${image}">`).join('')}<br>${title}<br>${desc}`; + return { + title, + description, + pubDate, + }; + })) as Promise<{ title: string; description: string; pubDate: Date }>; + return data; +} + +async function getUserWithCookie(url: string, cookie: string) { + const res = await ofetch(url, { + headers: getHeaders(cookie), + }); + const $ = load(res); + const paths = $('#userPostedFeeds > section > div > a.cover.ld.mask').map((i, item) => item.attributes[3].value); + const script = extractInitialState($); + const state = JSON.parse(script); + let index = 0; + for (const item of state.user.notes.flat()) { + const path = paths[index]; + if (path && path.includes('?')) { + item.id = item.id + path?.substring(path.indexOf('?')); + } + index = index + 1; + } + return state.user; +} + +// Add helper function to extract initial state +function extractInitialState($) { + let script = $('script') + .filter((i, script) => { + const text = script.children[0]?.data; + return text?.startsWith('window.__INITIAL_STATE__='); + }) + .text(); + script = script.slice('window.__INITIAL_STATE__='.length); + script = script.replaceAll('undefined', 'null'); + return script; +} + +export { getUser, getBoard, formatText, formatNote, renderNotesFulltext, getFullNote, getUserWithCookie }; From cc18b944f41579001a2bbfbf818b34615b4f7c6b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 08:40:59 +0000 Subject: [PATCH 576/740] chore(deps): bump tldts from 6.1.62 to 6.1.63 (#17679) Bumps [tldts](https://github.com/remusao/tldts) from 6.1.62 to 6.1.63. - [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.62...v6.1.63) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 9ebf83f7e65cdab..03ae51197ffd425 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "telegram": "2.26.8", "tiny-async-pool": "2.1.0", "title": "4.0.1", - "tldts": "6.1.62", + "tldts": "6.1.63", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 862917bb45b787f..dd9677be033f216 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -234,8 +234,8 @@ importers: specifier: 4.0.1 version: 4.0.1 tldts: - specifier: 6.1.62 - version: 6.1.62 + specifier: 6.1.63 + version: 6.1.63 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5306,11 +5306,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.62: - resolution: {integrity: sha512-ohONqbfobpuaylhqFbtCzc0dFFeNz85FVKSesgT8DS9OV3a25Yj730pTj7/dDtCqmgoCgEj6gDiU9XxgHKQlBw==} + tldts-core@6.1.63: + resolution: {integrity: sha512-H1XCt54xY+QPbwhTgmxLkepX0MVHu3USfMmejiCOdkMbRcP22Pn2FVF127r/GWXVDmXTRezyF3Ckvhn4Fs6j7Q==} - tldts@6.1.62: - resolution: {integrity: sha512-TF+wo3MgTLbf37keEwQD0IxvOZO8UZxnpPJDg5iFGAASGxYzbX/Q0y944ATEjrfxG/pF1TWRHCPbFp49Mz1Y1w==} + tldts@6.1.63: + resolution: {integrity: sha512-YWwhsjyn9sB/1rOkSRYxvkN/wl5LFM1QDv6F2pVR+pb/jFne4EOBxHfkKVWvDIBEAw9iGOwwubHtQTm0WRT5sQ==} hasBin: true tmp@0.0.33: @@ -11282,11 +11282,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.62: {} + tldts-core@6.1.63: {} - tldts@6.1.62: + tldts@6.1.63: dependencies: - tldts-core: 6.1.62 + tldts-core: 6.1.63 tmp@0.0.33: dependencies: @@ -11322,7 +11322,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.62 + tldts: 6.1.63 tr46@0.0.3: {} From 436bb11bc863569c1c487071d406e9eab8a863c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 08:42:46 +0000 Subject: [PATCH 577/740] chore(deps-dev): bump discord-api-types from 0.37.105 to 0.37.107 (#17680) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.105 to 0.37.107. - [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.105...0.37.107) --- updated-dependencies: - dependency-name: discord-api-types dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 03ae51197ffd425..e88d81419e4a933 100644 --- a/package.json +++ b/package.json @@ -170,7 +170,7 @@ "@typescript-eslint/parser": "8.15.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", - "discord-api-types": "0.37.105", + "discord-api-types": "0.37.107", "eslint": "9.15.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd9677be033f216..a1361a4d3c50a2c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -367,8 +367,8 @@ importers: specifier: 2.0.5 version: 2.0.5(vitest@2.0.5(@types/node@22.9.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: - specifier: 0.37.105 - version: 0.37.105 + specifier: 0.37.107 + version: 0.37.107 eslint: specifier: 9.15.0 version: 9.15.0 @@ -2772,8 +2772,8 @@ packages: resolution: {integrity: sha512-d9paCbverdqmuwR+B40phSqiHhgPKiP8dpsMz5WT9U6ug2VVQ3tqXNCedpa6iGHg6mgv9lHaoq5DJUu2IXMjsQ==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.105: - resolution: {integrity: sha512-TSNlLF5Q9vFLMeHjYskhmDj/zCQ4dFA+OLxQrHUypGW48gt8ttGaB+opCD9w3Zkq1otyoBoetrwaoDFZAFuGng==} + discord-api-types@0.37.107: + resolution: {integrity: sha512-XOxmxnhtYIRH55kLTrc/JS3nJV1l3wfBtTptFiRGdGDOe2qdCT4DltpxSgskasfDrKfw71Z5quG4tYqTxyPJ7g==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -8343,7 +8343,7 @@ snapshots: directory-import@3.3.1: {} - discord-api-types@0.37.105: {} + discord-api-types@0.37.107: {} doctrine@3.0.0: dependencies: From ffb0c9081b8e2674832cb90386dd3132e46176a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 02:46:49 -0800 Subject: [PATCH 578/740] chore(deps-dev): bump eslint-plugin-n from 17.13.2 to 17.14.0 (#17678) Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 17.13.2 to 17.14.0. - [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases) - [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/v17.13.2...v17.14.0) --- updated-dependencies: - dependency-name: eslint-plugin-n dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 e88d81419e4a933..360a21e08137b35 100644 --- a/package.json +++ b/package.json @@ -174,7 +174,7 @@ "eslint": "9.15.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", - "eslint-plugin-n": "17.13.2", + "eslint-plugin-n": "17.14.0", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-unicorn": "56.0.1", "eslint-plugin-yml": "1.15.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1361a4d3c50a2c..54e7c08d0fb09c6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -379,8 +379,8 @@ importers: specifier: 8.1.0 version: 8.1.0(eslint@9.15.0) eslint-plugin-n: - specifier: 17.13.2 - version: 17.13.2(eslint@9.15.0) + specifier: 17.14.0 + version: 17.14.0(eslint@9.15.0) eslint-plugin-prettier: specifier: 5.2.1 version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.3.3) @@ -2990,8 +2990,8 @@ packages: peerDependencies: eslint: '>=8' - eslint-plugin-n@17.13.2: - resolution: {integrity: sha512-MhBAKkT01h8cOXcTBTlpuR7bxH5OBUNpUXefsvwSVEy46cY4m/Kzr2osUCQvA3zJFD6KuCeNNDv0+HDuWk/OcA==} + eslint-plugin-n@17.14.0: + resolution: {integrity: sha512-maxPLMEA0rPmRpoOlxEclKng4UpDe+N5BJS4t24I3UKnN109Qcivnfs37KMy84G0af3bxjog5lKctP5ObsvcTA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' @@ -8614,7 +8614,7 @@ snapshots: eslint: 9.15.0 eslint-compat-utils: 0.5.1(eslint@9.15.0) - eslint-plugin-n@17.13.2(eslint@9.15.0): + eslint-plugin-n@17.14.0(eslint@9.15.0): dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) enhanced-resolve: 5.17.1 From 7c4d3cc5f741fd59d1039b62b7e7643e4e4a1441 Mon Sep 17 00:00:00 2001 From: Yoki Wong <webyoki@gmail.com> Date: Fri, 22 Nov 2024 20:48:26 +0800 Subject: [PATCH 579/740] feat(route): add route for social science journals (#17656) * Sociology Studies Jounal * Sociology Stuides Journal * delete error description * fix category name --------- Co-authored-by: CNYoki <i@yokii.cn> --- lib/routes/ajcass/namespace.ts | 11 +++++ lib/routes/ajcass/shxyj.ts | 73 ++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 lib/routes/ajcass/namespace.ts create mode 100644 lib/routes/ajcass/shxyj.ts diff --git a/lib/routes/ajcass/namespace.ts b/lib/routes/ajcass/namespace.ts new file mode 100644 index 000000000000000..f471eed914ee469 --- /dev/null +++ b/lib/routes/ajcass/namespace.ts @@ -0,0 +1,11 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '社科期刊网', + url: 'ajcass.com', + description: '中国社会科学院学术期刊方阵', + lang: 'zh-CN', + zh: { + name: '社科期刊网', + }, +}; diff --git a/lib/routes/ajcass/shxyj.ts b/lib/routes/ajcass/shxyj.ts new file mode 100644 index 000000000000000..e4324927d16a2bc --- /dev/null +++ b/lib/routes/ajcass/shxyj.ts @@ -0,0 +1,73 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/shxyj/:year?/:issue?', + categories: ['journal'], + example: '/ajcass/shxyj/2024/1', + parameters: { year: 'Year of the issue, `null` for the lastest', issue: 'Issue number, `null` for the lastest' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '社会学研究', + maintainers: ['CNYoki'], + handler, +}; + +async function handler(ctx) { + let { year, issue } = ctx.req.param(); + + if (!year) { + const response = await got('https://shxyj.ajcass.com/'); + const $ = load(response.body); + const latestIssueText = $('p.hod.pop').first().text(); + + const match = latestIssueText.match(/(\d{4}) Vol\.(\d+):/); + if (match) { + year = match[1]; + issue = match[2]; + } else { + throw new Error('无法获取最新的 year 和 issue'); + } + } + + const url = `https://shxyj.ajcass.com/Magazine/?Year=${year}&Issue=${issue}`; + const response = await got(url); + const $ = load(response.body); + + const items = $('#tab tr') + .toArray() + .map((item) => { + const $item = $(item); + const articleTitle = $item.find('a').first().text().trim(); + const articleLink = $item.find('a').first().attr('href'); + const summary = $item.find('li').eq(1).text().replace('[摘要]', '').trim(); + const authors = $item.find('li').eq(2).text().replace('作者:', '').trim(); + const pubDate = parseDate(`${year}-${Number.parseInt(issue) * 2}`); + + if (articleTitle && articleLink) { + return { + title: articleTitle, + link: `https://shxyj.ajcass.com${articleLink}`, + description: summary, + author: authors, + pubDate, + }; + } + return null; + }) + .filter((item) => item !== null); + + return { + title: `社会学研究 ${year}年第${issue}期`, + link: url, + item: items, + }; +} From cc23a80bb0643d0cbbb48f191b7faf18a2d87890 Mon Sep 17 00:00:00 2001 From: Keo <keocheung@outlook.com> Date: Fri, 22 Nov 2024 21:10:31 +0800 Subject: [PATCH 580/740] feat(route/pixiv): add language attributes for novels (#17667) * feat(route/pixiv): add language tags for novels * rm redundant elements --- lib/routes/pixiv/novel-api/content/common.ts | 12 ++++++++++++ lib/routes/pixiv/novel-api/content/nsfw.ts | 5 +++++ lib/routes/pixiv/novel-api/content/sfw.ts | 5 +++++ lib/routes/pixiv/novel-api/content/types.ts | 2 ++ lib/routes/pixiv/novel-api/series/nsfw.ts | 8 +++----- lib/routes/pixiv/novel-api/series/sfw.ts | 8 +++----- lib/routes/pixiv/novel-api/user-novels/nsfw.ts | 10 ++++------ lib/routes/pixiv/novel-api/user-novels/sfw.ts | 9 ++++----- 8 files changed, 38 insertions(+), 21 deletions(-) create mode 100644 lib/routes/pixiv/novel-api/content/common.ts diff --git a/lib/routes/pixiv/novel-api/content/common.ts b/lib/routes/pixiv/novel-api/content/common.ts new file mode 100644 index 000000000000000..af536fed34af583 --- /dev/null +++ b/lib/routes/pixiv/novel-api/content/common.ts @@ -0,0 +1,12 @@ +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; + +export async function getNovelLanguage(novelId: string): Promise<string> { + return (await cache.tryGet(`https://www.pixiv.net/novel/show.php?id=${novelId}`, async () => { + const rsp = await got(`https://www.pixiv.net/novel/show.php?id=${novelId}`); + const $ = load(rsp.data); + const data = JSON.parse($('#meta-preload-data').attr('content')); + return data?.novel[novelId].language; + })) as string; +} diff --git a/lib/routes/pixiv/novel-api/content/nsfw.ts b/lib/routes/pixiv/novel-api/content/nsfw.ts index 86eab24e670f0fd..68a85c5558f9ae7 100644 --- a/lib/routes/pixiv/novel-api/content/nsfw.ts +++ b/lib/routes/pixiv/novel-api/content/nsfw.ts @@ -6,6 +6,7 @@ import queryString from 'query-string'; import { parseNovelContent } from './utils'; import type { NovelContent, NSFWNovelDetail } from './types'; import { parseDate } from '@/utils/parse-date'; +import { getNovelLanguage } from './common'; export async function getNSFWNovelContent(novelId: string, token: string): Promise<NovelContent> { return (await cache.tryGet(`https://app-api.pixiv.net/webview/v2/novel:${novelId}`, async () => { @@ -43,6 +44,8 @@ export async function getNSFWNovelContent(novelId: string, token: string): Promi const parsedContent = await parseNovelContent(novelDetail.text, images, token); + const language = await getNovelLanguage(novelId); + return { id: novelDetail.id, title: novelDetail.title, @@ -68,6 +71,8 @@ export async function getNSFWNovelContent(novelId: string, token: string): Promi seriesId: novelDetail.seriesId || null, seriesTitle: novelDetail.seriesTitle || null, + + language, }; })) as NovelContent; } diff --git a/lib/routes/pixiv/novel-api/content/sfw.ts b/lib/routes/pixiv/novel-api/content/sfw.ts index c58d2489d9a4e73..704ae746b221a07 100644 --- a/lib/routes/pixiv/novel-api/content/sfw.ts +++ b/lib/routes/pixiv/novel-api/content/sfw.ts @@ -4,6 +4,7 @@ import pixivUtils from '../../utils'; import { parseNovelContent } from './utils'; import { NovelContent, SFWNovelDetail } from './types'; import { parseDate } from '@/utils/parse-date'; +import { getNovelLanguage } from './common'; const baseUrl = 'https://www.pixiv.net'; @@ -33,6 +34,8 @@ export async function getSFWNovelContent(novelId: string): Promise<NovelContent> const parsedContent = await parseNovelContent(novelDetail.body.content, images); + const language = await getNovelLanguage(novelId); + return { id: body.id, title: body.title, @@ -58,6 +61,8 @@ export async function getSFWNovelContent(novelId: string): Promise<NovelContent> seriesId: body.seriesNavData?.seriesId?.toString() || null, seriesTitle: body.seriesNavData?.title || null, + + language, }; })) as NovelContent; } diff --git a/lib/routes/pixiv/novel-api/content/types.ts b/lib/routes/pixiv/novel-api/content/types.ts index 752878c73a40a37..735522f91106d92 100644 --- a/lib/routes/pixiv/novel-api/content/types.ts +++ b/lib/routes/pixiv/novel-api/content/types.ts @@ -21,6 +21,8 @@ export interface NovelContent { seriesId: string | null; seriesTitle: string | null; + + language: string | null; } export interface SFWNovelDetail { diff --git a/lib/routes/pixiv/novel-api/series/nsfw.ts b/lib/routes/pixiv/novel-api/series/nsfw.ts index f0bf067369253b2..5ed3c69c7313005 100644 --- a/lib/routes/pixiv/novel-api/series/nsfw.ts +++ b/lib/routes/pixiv/novel-api/series/nsfw.ts @@ -57,13 +57,11 @@ export async function getNSFWSeriesNovels(seriesId: string, limit: number = 10): title: `#${chapterStartNum + index} ${novelContent.title}`, description: ` <img src="${pixivUtils.getProxiedImageUrl(novelContent.coverUrl)}" /> + <div lang="${novelContent.language}"> <p>${novelContent.description}</p> - <p> - 收藏數:${novelContent.bookmarkCount}<br> - 閱覧數:${novelContent.viewCount}<br> - 喜歡數:${novelContent.likeCount}<br> - </p><hr> + <hr> ${novelContent.content} + </div> `, link: `${baseUrl}/novel/show.php?id=${novelContent.id}`, pubDate: novelContent.createDate, diff --git a/lib/routes/pixiv/novel-api/series/sfw.ts b/lib/routes/pixiv/novel-api/series/sfw.ts index f39cbeb8f4842b6..5cc4c10a31078c7 100644 --- a/lib/routes/pixiv/novel-api/series/sfw.ts +++ b/lib/routes/pixiv/novel-api/series/sfw.ts @@ -45,13 +45,11 @@ export async function getSFWSeriesNovels(seriesId: string, limit: number = 10): title: `#${chapterStartNum + index} ${novelContent.title}`, description: ` <img src="${pixivUtils.getProxiedImageUrl(novelContent.coverUrl)}" /> + <div lang="${novelContent.language}"> <p>${novelContent.description}</p> - <p> - 收藏數:${novelContent.bookmarkCount}<br> - 閱覧數:${novelContent.viewCount}<br> - 喜歡數:${novelContent.likeCount}<br> - </p><hr> + <hr> ${novelContent.content} + </div> `, link: `${baseUrl}/novel/show.php?id=${novelContent.id}`, pubDate: novelContent.createDate, diff --git a/lib/routes/pixiv/novel-api/user-novels/nsfw.ts b/lib/routes/pixiv/novel-api/user-novels/nsfw.ts index 203e4660aecf0e3..8047a8494efdb6c 100644 --- a/lib/routes/pixiv/novel-api/user-novels/nsfw.ts +++ b/lib/routes/pixiv/novel-api/user-novels/nsfw.ts @@ -11,6 +11,7 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; import cache from '@/utils/cache'; import { getToken } from '../../token'; import InvalidParameterError from '@/errors/types/invalid-parameter'; +import { getNovelLanguage } from '../content/common'; function getNovels(user_id: string, token: string): Promise<NSFWNovelsResponse> { return got('https://app-api.pixiv.net/v1/user/novels', { @@ -46,17 +47,14 @@ export async function getNSFWUserNovels(id: string, fullContent: boolean = false const items = await Promise.all( novels.map(async (novel) => { + const language = await getNovelLanguage(novel.id); const baseItem = { title: novel.series?.title ? `${novel.series.title} - ${novel.title}` : novel.title, description: ` <img src="${pixivUtils.getProxiedImageUrl(novel.image_urls.large)}" /> + <div lang="${language}"> <p>${convertPixivProtocolExtended(novel.caption)}</p> - <p> - 字數:${novel.text_length}<br> - 閱覽數:${novel.total_view}<br> - 收藏數:${novel.total_bookmarks}<br> - 評論數:${novel.total_comments}<br> - </p>`, + </div>`, author: novel.user.name, pubDate: parseDate(novel.create_date), link: `https://www.pixiv.net/novel/show.php?id=${novel.id}`, diff --git a/lib/routes/pixiv/novel-api/user-novels/sfw.ts b/lib/routes/pixiv/novel-api/user-novels/sfw.ts index 40c46a6885388e5..86c2e5d2768074e 100644 --- a/lib/routes/pixiv/novel-api/user-novels/sfw.ts +++ b/lib/routes/pixiv/novel-api/user-novels/sfw.ts @@ -3,6 +3,7 @@ import { parseDate } from '@/utils/parse-date'; import pixivUtils from '../../utils'; import { getSFWNovelContent } from '../content/sfw'; import type { SFWNovelsResponse, NovelList } from './types'; +import { getNovelLanguage } from '../content/common'; const baseUrl = 'https://www.pixiv.net'; @@ -36,16 +37,14 @@ export async function getSFWUserNovels(id: string, fullContent: boolean = false, const items = await Promise.all( Object.values(data.body.works).map(async (item) => { + const language = await getNovelLanguage(item.id); const baseItem = { title: item.title, description: ` <img src=${pixivUtils.getProxiedImageUrl(item.url)} /> + <div lang="${language}"> <p>${item.description}</p> - <p> - 字數:${item.textCount}<br> - 閱讀時間:${item.readingTime} 分鐘<br> - 收藏數:${item.bookmarkCount}<br> - </p> + </div> `, link: `${baseUrl}/novel/show.php?id=${item.id}`, author: item.userName, From f1b270d7fffce2de8732d001c7de3800c16063a9 Mon Sep 17 00:00:00 2001 From: karasu <karasu.shing@gmail.com> Date: Fri, 22 Nov 2024 21:15:19 +0800 Subject: [PATCH 581/740] feat(route): cybersecurityventures (#17677) * feat(route): cybersecurityventures * update feeds title --- lib/routes/cybersecurityventures/namespace.ts | 7 + lib/routes/cybersecurityventures/news.ts | 121 ++++++++++++++++++ lib/routes/cybersecurityventures/types.ts | 17 +++ 3 files changed, 145 insertions(+) create mode 100644 lib/routes/cybersecurityventures/namespace.ts create mode 100644 lib/routes/cybersecurityventures/news.ts create mode 100644 lib/routes/cybersecurityventures/types.ts diff --git a/lib/routes/cybersecurityventures/namespace.ts b/lib/routes/cybersecurityventures/namespace.ts new file mode 100644 index 000000000000000..f960a613b2b7c68 --- /dev/null +++ b/lib/routes/cybersecurityventures/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Cybercrime Magazine', + url: 'cybersecurityventures.com', + lang: 'en', +}; diff --git a/lib/routes/cybersecurityventures/news.ts b/lib/routes/cybersecurityventures/news.ts new file mode 100644 index 000000000000000..5eeaaed9bb31559 --- /dev/null +++ b/lib/routes/cybersecurityventures/news.ts @@ -0,0 +1,121 @@ +import { type Data, type DataItem, type Route, ViewType } from '@/types'; +import ofetch from '@/utils/ofetch'; +import type { Context } from 'hono'; +import { parseDate } from '@/utils/parse-date'; +import { load } from 'cheerio'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; +import type { RawRecord } from './types'; + +const categories: Record< + string, + { + label: string; + scene: number; + view: number; + } +> = { + today: { + label: "Today's News", + scene: 12, + view: 14, + }, + 'intrusion-daily-cyber-threat-alert': { + label: 'Cyberattacks', + scene: 13, + view: 15, + }, + 'ransomware-minute': { + label: 'Ransomware', + scene: 16, + view: 18, + }, + cryptocrime: { + label: 'Cryptocrime', + scene: 18, + view: 20, + }, + 'hack-blotter': { + label: 'Hack Blotter', + scene: 19, + view: 21, + }, + 'cybersecurity-venture-capital-vc-deals': { + label: 'VC Deal Flow', + scene: 3, + view: 3, + }, + 'mergers-and-acquisitions-report': { + label: 'M&A Tracker', + scene: 11, + view: 13, + }, +}; + +export const route: Route = { + name: 'News', + categories: ['programming'], + path: '/news/:category?', + example: '/cybersecurityventures/news', + radar: Object.keys(categories).map((key) => ({ + source: [`cybersecurityventures.com/${key}`], + target: `/news/${key}`, + title: categories[key].label, + })), + parameters: { + category: { + description: 'news category', + default: 'today', + options: Object.keys(categories).map((key) => ({ + value: key, + label: categories[key].label, + })), + }, + }, + handler, + maintainers: ['KarasuShin'], + features: { + supportRadar: true, + }, + view: ViewType.Articles, +}; + +async function handler(ctx: Context): Promise<Data> { + const rootUrl = 'https://cybersecurityventures.com/'; + const apiUrl = 'https://us-east-1-renderer-read.knack.com/v1'; + const category = ctx.req.param('category') ?? 'today'; + const limit = ctx.req.query('limit') ?? 20; + + if (!(category in categories)) { + throw new InvalidParameterError('Invalid category'); + } + + const { scene, view, label } = categories[category]; + + const data = await ofetch<{ + records: RawRecord[]; + }>(`${apiUrl}/scenes/scene_${scene}/views/view_${view}/records?format=raw&page=1&rows_per_page=${limit}&sort_field=field_2&sort_order=desc`, { + headers: { + 'X-Knack-Application-Id': '6013171b60be8f001cb27363', + 'X-Knack-Rest-Api-Key': 'renderer', + }, + }); + + return { + title: `${label} - Cybercrime Magazine`, + link: `${rootUrl}/${category}`, + item: data.records.map((item) => { + const $ = load(item.field_3, null, false); + const link = $('a').attr('href'); + const source = item.field_4; + const description = `<p>${source}</p><br>${$.html()}`; + + return { + title: item.field_5, + description, + pubDate: parseDate(item.field_2.iso_timestamp), + link, + guid: `cybersecurityventures:${item.id}`, + } as DataItem; + }), + }; +} diff --git a/lib/routes/cybersecurityventures/types.ts b/lib/routes/cybersecurityventures/types.ts new file mode 100644 index 000000000000000..8440b8849464613 --- /dev/null +++ b/lib/routes/cybersecurityventures/types.ts @@ -0,0 +1,17 @@ +export interface RawRecord { + id: string; + field_2: { + date: string; + date_formatted: string; + hours: string; + minutes: string; + am_pm: string; + unix_timestamp: number; + iso_timestamp: string; + timestamp: string; + time: number; + }; + field_3: string; + field_4: string; + field_5: string; +} From 6dc521e38c6a678ce50d8cff91e6eff1f73fff20 Mon Sep 17 00:00:00 2001 From: Rick Lahaye <6962786+ricklahaye@users.noreply.github.com> Date: Fri, 22 Nov 2024 16:50:05 +0100 Subject: [PATCH 582/740] fix(twitter): set title to author (#17673) --- lib/routes/twitter/namespace.ts | 1 + lib/routes/twitter/utils.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/lib/routes/twitter/namespace.ts b/lib/routes/twitter/namespace.ts index 9c1cf533e702fc7..e3a3ee2a089eeec 100644 --- a/lib/routes/twitter/namespace.ts +++ b/lib/routes/twitter/namespace.ts @@ -10,6 +10,7 @@ export const namespace: Namespace = { | \`readable\` | Enable readable layout | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | | \`authorNameBold\` | Display author name in bold | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | | \`showAuthorInTitle\` | Show author name in title | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` (\`true\` in \`/twitter/followings\`) | +| \`showAuthorAsTitleOnly\` | Show only author name as title | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | | \`showAuthorInDesc\` | Show author name in description (RSS body) | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` (\`true\` in \`/twitter/followings\`) | | \`showQuotedAuthorAvatarInDesc\` | Show avatar of quoted Tweet's author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | | \`showAuthorAvatarInDesc\` | Show avatar of author in description (RSS body) (Not recommended if your RSS reader extracts images from description) | \`0\`/\`1\`/\`true\`/\`false\` | \`false\` | diff --git a/lib/routes/twitter/utils.ts b/lib/routes/twitter/utils.ts index f78534875bb124a..fd206ea424d7d02 100644 --- a/lib/routes/twitter/utils.ts +++ b/lib/routes/twitter/utils.ts @@ -52,6 +52,7 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => { readable: fallback(params.readable, queryToBoolean(routeParams.get('readable')), false), authorNameBold: fallback(params.authorNameBold, queryToBoolean(routeParams.get('authorNameBold')), false), showAuthorInTitle: fallback(params.showAuthorInTitle, queryToBoolean(routeParams.get('showAuthorInTitle')), false), + showAuthorAsTitleOnly: fallback(params.showAuthorAsTitleOnly, queryToBoolean(routeParams.get('showAuthorAsTitleOnly')), false), showAuthorInDesc: fallback(params.showAuthorInDesc, queryToBoolean(routeParams.get('showAuthorInDesc')), false), showQuotedAuthorAvatarInDesc: fallback(params.showQuotedAuthorAvatarInDesc, queryToBoolean(routeParams.get('showQuotedAuthorAvatarInDesc')), false), showAuthorAvatarInDesc: fallback(params.showAuthorAvatarInDesc, queryToBoolean(routeParams.get('showAuthorAvatarInDesc')), false), @@ -74,6 +75,7 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => { readable, authorNameBold, showAuthorInTitle, + showAuthorAsTitleOnly, showAuthorInDesc, showQuotedAuthorAvatarInDesc, showAuthorAvatarInDesc, @@ -292,6 +294,10 @@ const ProcessFeed = (ctx, { data = [] }, params = {}) => { title += quoteInTitle; } + if (showAuthorAsTitleOnly) { + title = originalItem.user.name; + } + // Make description let description = ''; if (showAuthorInDesc && showAuthorAvatarInDesc) { From 5cb34379c3c29264a5fc5cf4fb6d73048b86c771 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Sat, 23 Nov 2024 00:09:33 +0800 Subject: [PATCH 583/740] feat(route): fix syosetu & add more routes (#17500) * fix(route): syosetu * feat: add search route & narou package * chore: cleanup * feat: cache search & art template * fix: __dirname * chore: cleanup * feat: add dev route * chore: cleanup * refactor: improve syosetu route params and search handling * feat: add ranking routes * feat: add radar items for syosetu rankings - Add BEST5 radar items for rankings - Standardize title format - Improve params naming * chore: add space * chore: cleanup * chore: add ranking options type hint & cleanup * refactor: change route parameters from path params to query strings - Change optional parameters from path params (/:params) to query strings (?limit=N) - Remove unnecessary cache - Extract ranking-related types and constants to separate files - Extract isekai ranking handling to a separate file - Enhance code structure and readability * feat: improve usability and short novel update handling - Add chapter display support - Fix chapter route radar - Optimize ranking and search limits - Use novelupdated_at as pubDate for short novels * fix: request more items to handle tensei/tenni duplicates * fix: limit ranking items to maximum of 300 --- lib/routes/syosetu/chapter.ts | 87 ------ lib/routes/syosetu/dev.ts | 66 +++++ lib/routes/syosetu/index.ts | 85 ++++++ lib/routes/syosetu/namespace.ts | 2 +- lib/routes/syosetu/ranking-isekai.ts | 93 ++++++ lib/routes/syosetu/ranking-r18.ts | 188 ++++++++++++ lib/routes/syosetu/ranking.ts | 274 ++++++++++++++++++ lib/routes/syosetu/search.ts | 286 +++++++++++++++++++ lib/routes/syosetu/templates/description.art | 73 +++++ lib/routes/syosetu/types/ranking-r18.ts | 60 ++++ lib/routes/syosetu/types/ranking.ts | 67 +++++ lib/routes/syosetu/utils.ts | 50 ++++ package.json | 1 + pnpm-lock.yaml | 16 ++ 14 files changed, 1260 insertions(+), 88 deletions(-) delete mode 100644 lib/routes/syosetu/chapter.ts create mode 100644 lib/routes/syosetu/dev.ts create mode 100644 lib/routes/syosetu/index.ts create mode 100644 lib/routes/syosetu/ranking-isekai.ts create mode 100644 lib/routes/syosetu/ranking-r18.ts create mode 100644 lib/routes/syosetu/ranking.ts create mode 100644 lib/routes/syosetu/search.ts create mode 100644 lib/routes/syosetu/templates/description.art create mode 100644 lib/routes/syosetu/types/ranking-r18.ts create mode 100644 lib/routes/syosetu/types/ranking.ts create mode 100644 lib/routes/syosetu/utils.ts diff --git a/lib/routes/syosetu/chapter.ts b/lib/routes/syosetu/chapter.ts deleted file mode 100644 index 21bf0a34a0b2c2c..000000000000000 --- a/lib/routes/syosetu/chapter.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { 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 { CookieJar } from 'tough-cookie'; - -const cookieJar = new CookieJar(); -cookieJar.setCookieSync('over18=yes', 'https://novel18.syosetu.com/'); - -export const route: Route = { - path: '/chapter/:id', - categories: ['reading'], - example: '/syosetu/chapter/n1976ey', - parameters: { id: 'Novel id, can be found in URL' }, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - radar: [ - { - source: ['novel18.syosetu.com/:id'], - }, - ], - name: 'chapter', - maintainers: ['huangliangshusheng'], - handler, - description: `Eg: \`https://ncode.syosetu.com/n1976ey/\``, -}; - -async function handler(ctx) { - const id = ctx.req.param('id'); - const limit = Number.parseInt(ctx.req.query('limit')) || 5; - const link = `https://ncode.syosetu.com/${id}`; - const $ = load(await get(link)); - - const title = $('p.novel_title').text(); - const description = $('#novel_ex').html(); - - const chapter_list = $('dl.novel_sublist2') - .toArray() - .map((chapter) => { - const $_chapter = $(chapter); - const chapter_link = $_chapter.find('a'); - return { - title: chapter_link.text(), - link: chapter_link.attr('href'), - pubDate: timezone(parseDate($_chapter.find('dt').text(), 'YYYY/MM/DD HH:mm'), +9), - }; - }) - .sort((a, b) => (a.pubDate <= b.pubDate ? 1 : -1)) - .slice(0, limit); - - const item_list = await Promise.all( - chapter_list.map((chapter) => - cache.tryGet(chapter.link, async () => { - chapter.link = `https://ncode.syosetu.com${chapter.link}`; - const content = load(await get(chapter.link)); - chapter.description = content('#novel_honbun').html(); - return chapter; - }) - ) - ); - - return { - title, - description, - link, - language: 'ja', - item: item_list, - }; -} - -const get = async (url) => { - const response = await got({ - method: 'get', - url, - cookieJar, - }); - - return response.data; -}; diff --git a/lib/routes/syosetu/dev.ts b/lib/routes/syosetu/dev.ts new file mode 100644 index 000000000000000..07499eb14cebda7 --- /dev/null +++ b/lib/routes/syosetu/dev.ts @@ -0,0 +1,66 @@ +import { Data, Route } from '@/types'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/dev', + categories: ['program-update'], + example: '/syosetu/dev', + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'なろう小説 API の更新履歴', + maintainers: ['SnowAgar25'], + handler, + radar: [ + { + title: 'なろう小説 API の更新履歴', + source: ['dev.syosetu.com'], + target: '/dev', + }, + ], +}; + +async function handler(): Promise<Data> { + const url = 'https://dev.syosetu.com'; + + const data = await ofetch(url); + const $ = load(data); + + const logContainer = $('.c-log'); + + const dates = logContainer + .find('dt') + .toArray() + .map((element) => $(element).text().trim()); + + const contents = logContainer + .find('dd') + .toArray() + .map((element) => $(element).text().trim()); + + const updates = dates + .map((date, index) => ({ + date, + content: contents[index]?.replace(/\n/g, '<br>') ?? '', + })) + .filter((update) => update.content); + + return { + title: 'なろうデベロッパー - なろう小説 API の更新履歴', + link: url, + language: 'ja', + item: updates.map((update) => ({ + title: update.date, + description: update.content, + pubDate: parseDate(update.date.replace('/', '-')), + guid: `syosetu:dev:${update.date}`, + })), + }; +} diff --git a/lib/routes/syosetu/index.ts b/lib/routes/syosetu/index.ts new file mode 100644 index 000000000000000..0779793e3f376a0 --- /dev/null +++ b/lib/routes/syosetu/index.ts @@ -0,0 +1,85 @@ +import { Route, Data, DataItem } from '@/types'; +import { fetchNovelInfo, fetchChapterContent } from './utils'; +import { Context } from 'hono'; +import { NovelType } from 'narou'; + +export const route: Route = { + path: '/:ncode', + categories: ['reading'], + example: '/syosetu/n9292ii', + parameters: { + ncode: 'Novel code, can be found in URL', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Novel Updates', + maintainers: ['eternasuno', 'SnowAgar25'], + handler, + radar: [ + { + title: 'Novel Updates', + source: ['ncode.syosetu.com/:ncode', 'ncode.syosetu.com/:ncode/:chapter'], + target: '/:ncode', + }, + { + title: 'Novel Updates', + source: ['novel18.syosetu.com/:ncode', 'novel18.syosetu.com/:ncode/:chapter'], + target: '/:ncode', + }, + ], +}; + +async function handler(ctx: Context): Promise<Data> { + const { ncode } = ctx.req.param(); + const limit = Math.min(Number(ctx.req.query('limit') ?? 5), 20); + + const { baseUrl, novel } = await fetchNovelInfo(ncode); + novel.story = novel.story.replaceAll('\n', '<br>') || ''; + + // Tanpen = Short + if (novel.noveltype === NovelType.Tanpen) { + const chapterUrl = `${baseUrl}/${ncode}`; + const item = await fetchChapterContent(chapterUrl); + + // Shorts are updated rather than having new chapters + // Use novelupdated_at as pubDate since RSS 2.0 doesn't have updated field + item.pubDate = novel.novelupdated_at; + + return { + title: novel.title, + description: novel.story, + link: chapterUrl, + item: [item] as DataItem[], + language: 'ja', + }; + } + + // Rensai = Series + // if (novel.noveltype === NovelType.Rensai) + const totalChapters = novel.general_all_no ?? 1; + const startChapter = Math.max(totalChapters - limit + 1, 1); + + const items = await Promise.all( + Array.from({ length: Math.min(limit, totalChapters) }, async (_, index) => { + const chapterNumber = startChapter + index; + const chapterUrl = `${baseUrl}/${ncode}/${chapterNumber}`; + + const item = await fetchChapterContent(chapterUrl, chapterNumber); + return item; + }).reverse() + ); + + return { + title: novel.title, + description: novel.story, + link: `${baseUrl}/${ncode}`, + item: items as DataItem[], + language: 'ja', + }; +} diff --git a/lib/routes/syosetu/namespace.ts b/lib/routes/syosetu/namespace.ts index 1e44403f3b5987a..5bea89105b2418f 100644 --- a/lib/routes/syosetu/namespace.ts +++ b/lib/routes/syosetu/namespace.ts @@ -2,6 +2,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'syosetu', - url: 'ncode.syosetu.com', + url: 'syosetu.com', lang: 'ja', }; diff --git a/lib/routes/syosetu/ranking-isekai.ts b/lib/routes/syosetu/ranking-isekai.ts new file mode 100644 index 000000000000000..09f05cd51bed472 --- /dev/null +++ b/lib/routes/syosetu/ranking-isekai.ts @@ -0,0 +1,93 @@ +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('_'); + + const period = periodStr as RankingPeriod; + const category = categoryStr as IsekaiCategory; + const novelType = novelTypeStr as NovelType; + + const isValid = [Object.values(RankingPeriod).includes(period), Object.values(IsekaiCategory).includes(category), Object.values(NovelType).includes(novelType)].every(Boolean); + + if (!isValid) { + throw new InvalidParameterError(`Invalid isekai ranking type: ${type}`); + } + + return { period, category, novelType }; +} + +function getIsekaiSearchParams(period, category, novelType, limit): SearchParams { + const searchParams: SearchParams = { + order: periodToOrder[period], + gzip: 5, + // Request 20% more items to compensate for potential duplicates between tensei/tenni + lim: Math.ceil((limit / 2) * 1.2), + }; + + if (novelType !== NovelType.TOTAL) { + searchParams.type = novelType; + } + + switch (category) { + case IsekaiCategory.RENAI: + searchParams.biggenre = BigGenre.Renai; + break; + case IsekaiCategory.FANTASY: + searchParams.biggenre = BigGenre.Fantasy; + break; + case IsekaiCategory.OTHER: + searchParams.biggenre = `${BigGenre.Bungei}-${BigGenre.Sf}-${BigGenre.Sonota}` as Join<BigGenre>; + break; + default: + throw new InvalidParameterError(`Invalid Isekai category: ${category}`); + } + + return searchParams; +} + +export async function handleIsekaiRanking(type: string, limit: number): Promise<Data> { + const { period, category, novelType } = parseIsekaiRankingType(type); + const rankingUrl = `https://yomou.syosetu.com/rank/isekailist/type/${type}`; + const rankingTitle = `[${periodToJapanese[period]}] 異世界転生/転移${isekaiCategoryToJapanese[category]}ランキング - ${novelTypeToJapanese[novelType]} BEST${limit}`; + + const searchParams = getIsekaiSearchParams(period, category, novelType, limit); + const api = new NarouNovelFetch(); + + const [tenseiResult, tenniResult] = await Promise.all([new SearchBuilder({ ...searchParams, istensei: 1 }, api).execute(), new SearchBuilder({ ...searchParams, istenni: 1 }, api).execute()]); + + const combinedNovels = [...tenseiResult.values, ...tenniResult.values]; + const uniqueNovels = [...new Map(combinedNovels.map((novel) => [novel.ncode, novel])).values()]; + + const pointField = periodToPointField[period]; + if (!pointField) { + throw new InvalidParameterError(`Invalid period: ${period}`); + } + + const items = uniqueNovels + .sort((a, b) => (b[pointField] || 0) - (a[pointField] || 0)) + .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'), { + novel, + }), + author: novel.writer, + category: novel.keyword.split(/[\s/\uFF0F]/).filter(Boolean), + })); + + return { + title: `小説家になろう - ${rankingTitle}`, + link: rankingUrl, + item: items.slice(0, limit) as DataItem[], + language: 'ja', + }; +} diff --git a/lib/routes/syosetu/ranking-r18.ts b/lib/routes/syosetu/ranking-r18.ts new file mode 100644 index 000000000000000..fdc58e53bb91a96 --- /dev/null +++ b/lib/routes/syosetu/ranking-r18.ts @@ -0,0 +1,188 @@ +import { Route, Data, DataItem } from '@/types'; +import { art } from '@/utils/render'; +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 + * + * While "Syosetu" only provides ranking API for "Syosetu o yomou" (general audience), + * equivalent ranking functionality can be achieved using the point-based sorting in the search API. + * + * This implementation utilizes the 'order' parameter (e.g., dailypoint, weeklypoint) + * of the search API to replicate ranking functionality across all Syosetu subsidiary sites. + */ + +const getParameters = () => { + // Generate options for sub parameter + const subOptions = Object.entries(SyosetuSub).map(([, value]) => ({ + value, + label: syosetuSubToJapanese[value], + })); + + // Generate period options + const periodOptions = Object.entries(RankingPeriod).map(([key, value]) => ({ + value, + label: `${periodToJapanese[value]} (${key})`, + })); + + // Generate novel type options + const novelTypeOptions = Object.entries(NovelType).map(([key, value]) => ({ + value, + label: `${novelTypeToJapanese[value]} (${key})`, + })); + + return { + sub: { + description: 'Target site for R18 rankings', + options: subOptions, + }, + type: { + description: 'Detailed ranking type (format: period_noveltype)', + options: periodOptions.flatMap((period) => + novelTypeOptions.map((type) => ({ + value: `${period.value}_${type.value}`, + label: `${period.label} ${type.label}`, + })) + ), + }, + }; +}; + +const getBest5RadarItems = () => + Object.entries(SyosetuSub).flatMap(([, domain]) => + Object.values(RankingPeriod).map((period) => ({ + title: `${syosetuSubToJapanese[domain]} ${periodToJapanese[period]}ランキング BEST5`, + source: [`${domain === SyosetuSub.MOONLIGHT_BL ? SyosetuSub.MOONLIGHT : domain}.syosetu.com/rank/${domain === SyosetuSub.MOONLIGHT_BL ? 'bltop' : 'top'}`], + target: `/rankingr18/${domain}/${period}_${NovelType.TOTAL}?limit=5`, + })) + ); + +export const route: Route = { + path: '/rankingr18/:sub/:type', + categories: ['reading'], + example: '/syosetu/rankingr18/noc/daily_total?limit=50', + parameters: getParameters(), + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'R18 Rankings', + maintainers: ['SnowAgar25'], + handler, + description: ` +| Period | Description | 説明 | +| --- | --- | --- | +| daily | Daily Ranking | 日間ランキング | +| weekly | Weekly Ranking | 週間ランキング | +| monthly | Monthly Ranking | 月間ランキング | +| quarter | Quarterly Ranking | 四半期ランキング | +| yearly | Yearly Ranking | 年間ランキング | + +| Novel Type | Description | 説明 | +| --- | --- | --- | --- | +| total | All Works | 総合 | +| t | Short Stories | 短編 | +| r | Ongoing Series | 連載中 | +| er | Completed Series | 完結済 | + +Note: Combine Period and Novel Type with \`_\`. For example: \`daily_total\`, \`weekly_r\`, \`monthly_er\``, + radar: [ + { + source: ['noc.syosetu.com/rank/list/type/:type'], + target: '/rankingr18/noc/:type', + }, + { + source: ['mid.syosetu.com/rank/list/type/:type'], + target: '/rankingr18/mid/:type', + }, + { + source: ['mnlt.syosetu.com/rank/list/type/:type'], + target: '/rankingr18/mnlt/:type', + }, + { + source: ['mnlt.syosetu.com/rank/bllist/type/:type'], + target: '/rankingr18/mnlt-bl/:type', + }, + ...getBest5RadarItems(), + ], +}; + +function parseRankingType(type: string): { period: RankingPeriod; novelType: NovelType } { + const [periodStr, novelTypeStr] = type.split('_'); + + const period = periodStr as RankingPeriod; + const novelType = novelTypeStr as NovelType; + + const isValid = [Object.values(RankingPeriod).includes(period), Object.values(NovelType).includes(novelType)].every(Boolean); + + if (!isValid) { + throw new InvalidParameterError(`Invalid ranking type: ${type}`); + } + + return { + period: periodStr as RankingPeriod, + novelType: novelTypeStr as NovelType, + }; +} + +function getRankingTitle(type: string, limit: number): string { + const { period, novelType } = parseRankingType(type); + return `${periodToJapanese[period]}${novelTypeToJapanese[novelType]}ランキング BEST${limit}`; +} + +async function handler(ctx: Context): Promise<Data> { + const { sub, type } = ctx.req.param(); + const baseUrl = `https://${sub === SyosetuSub.MOONLIGHT_BL ? SyosetuSub.MOONLIGHT : sub}.syosetu.com`; + const rankingUrl = `${baseUrl}/rank/list/type/${type}`; + const api = new NarouNovelFetch(); + + const limit = Math.min(Number(ctx.req.query('limit') ?? 300), 300); + const { period, novelType } = parseRankingType(type); + + const searchParams: SearchParams = { + gzip: 5, + lim: limit, + order: periodToOrder[period], + }; + + // TOTAL: Skip type filter to get all types combined + if (novelType !== NovelType.TOTAL) { + searchParams.type = novelType; + } + + if (!(sub in syosetuSubToNocgenre)) { + throw new InvalidParameterError(`Invalid subsite: ${sub}`); + } + const nocgenre = syosetuSubToNocgenre[sub]; + + const builder = new SearchBuilderR18(searchParams, api).r18Site(nocgenre); + const result = await builder.execute(); + + 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'), { + novel, + }), + author: novel.writer, + category: novel.keyword.split(/[\s/\uFF0F]/).filter(Boolean), + })); + + return { + title: `小説家になろう (${sub}) - ${getRankingTitle(type, limit)}`, + link: rankingUrl, + item: items as DataItem[], + language: 'ja', + }; +} diff --git a/lib/routes/syosetu/ranking.ts b/lib/routes/syosetu/ranking.ts new file mode 100644 index 000000000000000..32ac1fbe1b7d43a --- /dev/null +++ b/lib/routes/syosetu/ranking.ts @@ -0,0 +1,274 @@ +import { Route, Data, DataItem } from '@/types'; +import { art } from '@/utils/render'; +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 = [ + { value: RankingType.LIST, label: '総合ランキング (General Ranking)' }, + { value: RankingType.GENRE, label: 'ジャンル別ランキング (Genre Ranking)' }, + { value: RankingType.ISEKAI, label: '異世界転生/転移ランキング (Isekai Ranking)' }, + ]; + + // Generate period options + const periodOptions = Object.entries(RankingPeriod).map(([key, value]) => ({ + value, + label: `${periodToJapanese[value]} (${key})`, + })); + + // Generate novel type options + const novelTypeOptions = Object.entries(NovelType).map(([key, value]) => ({ + value, + label: `${novelTypeToJapanese[value]} (${key})`, + })); + + // Generate genre options + const genreOptions = Object.entries(Genre) + .filter(([, value]) => typeof value === 'number') // Filter out reverse mappings + .map(([key, value]) => ({ + value: value.toString(), + label: key, + })); + + // Generate isekai category options + const isekaiOptions = Object.entries(IsekaiCategory).map(([key, value]) => ({ + value, + label: `${isekaiCategoryToJapanese[value]} (${key})`, + })); + + return { + listType: { + description: 'Ranking type', + options: rankingTypeOptions, + }, + type: { + description: 'Detailed ranking type, can be found in Syosetu ranking URLs', + options: [ + // General ranking options + ...periodOptions.flatMap((period) => + novelTypeOptions.map((novelType) => ({ + value: `${period.value}_${novelType.value}`, + label: `${RankingType.LIST}: [${periodToJapanese[period.value]}] 総合ランキング - ${novelTypeToJapanese[novelType.value]}`, + })) + ), + // Genre ranking options + ...periodOptions.flatMap((period) => + genreOptions.flatMap((genre) => + novelTypeOptions.map((novelType) => ({ + value: `${period.value}_${genre.value}_${novelType.value}`, + label: `${RankingType.GENRE}: [${periodToJapanese[period.value]}] ${GenreNotation[genre.value]}ランキング - ${novelTypeToJapanese[novelType.value]}`, + })) + ) + ), + // Isekai ranking options + ...periodOptions.flatMap((period) => + isekaiOptions.flatMap((category) => + novelTypeOptions.map((novelType) => ({ + value: `${period.value}_${category.value}_${novelType.value}`, + label: `${RankingType.ISEKAI}: [${periodToJapanese[period.value]}] 異世界転生/転移${isekaiCategoryToJapanese[category.value]}ランキング - ${novelTypeToJapanese[novelType.value]}`, + })) + ) + ), + ], + }, + }; +}; + +const getBest5RadarItems = () => { + // List + const periodRankings = Object.values(RankingPeriod).map((period) => ({ + title: `${periodToJapanese[period]}ランキング BEST5`, + source: ['yomou.syosetu.com/rank/top/'], + target: `/ranking/list/${period}_total?limit=5`, + })); + + // Genre + const genreRankings = Object.entries(Genre) + .filter(([, value]) => typeof value === 'number' && value !== Genre.SonotaReplay && value !== Genre.NonGenre) + .map(([, value]) => ({ + title: `[${periodToJapanese.daily}] ${GenreNotation[value]}ランキング BEST5`, + source: ['yomou.syosetu.com/rank/top/'], + target: `/ranking/genre/daily_${value}_total?limit=5`, + })); + + // Isekai + const isekaiRankings = Object.values(IsekaiCategory).map((category) => ({ + title: `[${periodToJapanese.daily}] 異世界転生/転移${isekaiCategoryToJapanese[category]}ランキング BEST5`, + source: ['yomou.syosetu.com/rank/top/'], + target: `/ranking/isekai/daily_${category}_total?limit=5`, + })); + + return [...periodRankings, ...genreRankings, ...isekaiRankings]; +}; + +export const route: Route = { + path: '/ranking/:listType/:type', + categories: ['reading'], + example: '/syosetu/ranking/list/daily_total?limit=50', + parameters: getParameters(), + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Rankings', + maintainers: ['SnowAgar25'], + handler, + description: ` +Support various ranking types: +1. 総合ランキング \`list\` +2. ジャンル別ランキング \`genre\` +3. 異世界転生/転移ランキング \`isekai\` + +Note: The "注目度ランキング" (Attention Ranking) is not supported as syosetu does not provide a public API for this feature and the results cannot be replicated through the search API. +注意事項:「注目度ランキング」については、API が非公開で検索 API でも同様の結果を得ることができないため、本 Route ではサポートしておりません。 + +Period options: +| Period | Description | +| --- | --- | +| daily | Daily Ranking | +| weekly | Weekly Ranking | +| monthly | Monthly Ranking | +| quarter | Quarterly Ranking | +| yearly | Yearly Ranking | + +Novel type options (not all available for every ranking): +| Type | Description | +| --- | --- | +| total | All Works | +| t | Short Stories | +| r | Ongoing Series | +| er | Completed Series | + +For \`isekai\` ranking type: +When multiple works have the same points, their order may differ from syosetu's ranking as syosetu randomizes the order for works with identical points. +異世界転生/転移ランキングについて: +集計の結果、同じポイントの作品が複数存在する場合、Syosetu ではランダムで順位が決定されるため、本 Route の順位と異なる場合があります。 +`, + radar: [ + { + source: ['yomou.syosetu.com/rank/list/type/:type'], + target: '/ranking/list/:type', + }, + { + source: ['yomou.syosetu.com/rank/genrelist/type/:type'], + target: '/ranking/genre/:type', + }, + { + source: ['yomou.syosetu.com/rank/isekailist/type/:type'], + target: '/ranking/isekai/:type', + }, + ...getBest5RadarItems(), + ], +}; + +function parseGeneralRankingType(type: string): { period: RankingPeriod; novelType: NovelType } { + const [periodStr, novelTypeStr] = type.split('_'); + + const period = periodStr as RankingPeriod; + const novelType = novelTypeStr as NovelType; + + const isValid = [Object.values(RankingPeriod).includes(period), Object.values(NovelType).includes(novelType)].every(Boolean); + + if (!isValid) { + throw new InvalidParameterError(`Invalid general ranking type: ${type}`); + } + + return { period, novelType }; +} + +function parseGenreRankingType(type: string): { period: RankingPeriod; genre: number; novelType: NovelType } { + const [periodStr, genreStr, novelTypeStr = NovelType.TOTAL] = type.split('_'); + + const period = periodStr as RankingPeriod; + const genre = Number(genreStr) as Genre; + const novelType = novelTypeStr as NovelType; + + const isValid = [Object.values(RankingPeriod).includes(period), Object.values(Genre).includes(genre), Object.values(NovelType).includes(novelType), genre !== Genre.SonotaReplay, genre !== Genre.NonGenre].every(Boolean); + + if (!isValid) { + throw new InvalidParameterError(`Invalid genre ranking type: ${type}`); + } + + return { period, genre, novelType }; +} + +async function handler(ctx: Context): Promise<Data> { + const { listType, type } = ctx.req.param(); + const rankingType = listType as RankingType; + const limit = Math.min(Number(ctx.req.query('limit') ?? 300), 300); + + const api = new NarouNovelFetch(); + const searchParams: SearchParams = { + gzip: 5, + lim: limit, + }; + + let rankingUrl: string; + let rankingTitle: string; + + // Build search parameters and titles based on ranking type + switch (rankingType) { + case RankingType.LIST: { + const { period, novelType } = parseGeneralRankingType(type); + rankingUrl = `https://yomou.syosetu.com/rank/list/type/${type}`; + rankingTitle = `[${periodToJapanese[period]}] 総合ランキング - ${novelTypeToJapanese[novelType]} BEST${limit}`; + + searchParams.order = periodToOrder[period]; + if (novelType !== NovelType.TOTAL) { + searchParams.type = novelType; + } + break; + } + + case RankingType.GENRE: { + const { period, genre, novelType } = parseGenreRankingType(type); + rankingUrl = `https://yomou.syosetu.com/rank/genrelist/type/${type}`; + rankingTitle = `[${periodToJapanese[period]}] ${GenreNotation[genre]}ランキング - ${novelTypeToJapanese[novelType]} BEST${limit}`; + + searchParams.order = periodToOrder[period]; + searchParams.genre = genre as Genre; + if (novelType !== NovelType.TOTAL) { + searchParams.type = novelType; + } + break; + } + + case RankingType.ISEKAI: + return handleIsekaiRanking(type, limit); + + default: + throw new InvalidParameterError(`Invalid ranking type: ${type}`); + } + + const builder = new SearchBuilder(searchParams, api); + const result = await builder.execute(); + + 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'), { + novel, + }), + author: novel.writer, + category: novel.keyword.split(/[\s/\uFF0F]/).filter(Boolean), + })); + + return { + title: `小説家になろう - ${rankingTitle}`, + link: rankingUrl, + item: items as DataItem[], + language: 'ja', + }; +} diff --git a/lib/routes/syosetu/search.ts b/lib/routes/syosetu/search.ts new file mode 100644 index 000000000000000..08c0bc7aaa73f0d --- /dev/null +++ b/lib/routes/syosetu/search.ts @@ -0,0 +1,286 @@ +import { Route, Data } from '@/types'; +import { art } from '@/utils/render'; +import path from 'node:path'; +import { Context } from 'hono'; +import { Genre, GenreNotation, NarouNovelFetch, NovelTypeParam, Order, R18Site, SearchBuilder, SearchBuilderR18, SearchParams } from 'narou'; +import queryString from 'query-string'; +import { Join } from 'narou/util/type'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; + +import { getCurrentPath } from '@/utils/helpers'; +const __dirname = getCurrentPath(import.meta.url); + +interface NarouSearchParams { + /** + * 作品種別の絞り込み Work Type Filter + * + * t 短編 Short + * r 連載中 Ongoing Series + * er 完結済連載作品 Completed Series + * re すべての連載作品 (連載中および完結済) Series and Completed Series + * ter 短編と完結済連載作品 Completed Works (Including Short and Series) + * + * tr 短編と連載中小説 Short and Ongoing Series + * all 全ての種別 (Default) All Types + * + * Note: While the official documentation describes 5 values, all 7 values above are functional. + */ + type?: 't' | 'r' | 'er' | 're' | 'ter' | 'tr' | 'all'; + + /** 検索ワード Search Keywords */ + word?: string; + + /** 除外ワード Excluded Keywords */ + notword?: string; + + /** + * 検索範囲指定 Search Range Specifications + * + * - 読了時間 Reading Time + * - 文字数 Character Count + * - 総合ポイント Total Points + * - 最新掲載日(年月日)Latest Update Date (Year/Month/Day) + * - 初回掲載日(年月日)First Publication Date (Year/Month/Day) + */ + mintime?: number; + maxtime?: number; + minlen?: number; + maxlen?: number; + min_globalpoint?: number; + max_globalpoint?: number; + minlastup?: string; + maxlastup?: string; + minfirstup?: string; + maxfirstup?: string; + + /** + * 抽出条件の指定 Extraction Conditions + * + * - 挿絵のある作品 Works with Illustrations + * - 小説 PickUp!対象作品 Featured Novels + * + * 作品に含まれる要素:Elements Included in Works: + * - 残酷な描写あり Contains Cruel Content + * - ボーイズラブ Boys' Love + * - ガールズラブ Girls' Love + * - 異世界転生 Reincarnation in Another World + * - 異世界転移 Transportation to Another World + */ + sasie?: string; + ispickup?: boolean; + iszankoku?: boolean; + isbl?: boolean; + isgl?: boolean; + istensei?: boolean; + istenni?: boolean; + + /** + * 除外条件の指定 Exclusion Conditions + * + * - 長期連載停止中の作品 Works on Long-term Hiatus + * + * 作品に含まれる要素:Elements to Exclude: + * - 残酷な描写あり Cruel Content + * - ボーイズラブ Boys' Love + * - ガールズラブ Girls' Love + * - 異世界転生 Reincarnation in Another World + * - 異世界転移 Transportation to Another World + */ + stop?: boolean; + notzankoku?: boolean; + notbl?: boolean; + notgl?: boolean; + nottensei?: boolean; + nottenni?: boolean; + + /** + * ワード検索範囲指定 Word Search Scope + * すべてのチェックを解除した場合、すべての項目がワード検索の対象となります。 + * If all boxes are unchecked, all items will become targets for word search. + * + * 作品タイトル Work Title + * あらすじ Synopsis + * キーワード Keywords + * 作者名 Author Name + */ + title?: boolean; + ex?: boolean; + keyword?: boolean; + wname?: boolean; + + /** + * 並び順 Sort Order + * - new: 新着更新順 (Default) Latest Updates + * - weekly: 週間ユニークアクセスが多い順 Most Weekly Unique Access + * - favnovelcnt: ブックマーク登録の多い順 Most Bookmarks + * - reviewcnt: レビューの多い順 Most Reviews + * - hyoka: 総合ポイントの高い順 Highest Total Points + * - dailypoint: 日間ポイントの高い順 Highest Daily Points + * - weeklypoint: 週間ポイントの高い順 Highest Weekly Points + * - monthlypoint: 月間ポイントの高い順 Highest Monthly Points + * - quarterpoint: 四半期ポイントの高い順 Highest Quarterly Points + * - yearlypoint: 年間ポイントの高い順 Highest Yearly Points + * - hyokacnt: 評価者数の多い順 Most Ratings + * - lengthdesc: 文字数の多い順 Most Characters + * - generalfirstup: 初回掲載順 First Publication Order + * - ncodedesc: N コード降順 Ncode Descending + * - old: 更新が古い順 Oldest Updates + */ + order?: 'new' | 'weekly' | 'favnovelcnt' | 'reviewcnt' | 'hyoka' | 'dailypoint' | 'weeklypoint' | 'monthlypoint' | 'quarterpoint' | 'yearlypoint' | 'hyokacnt' | 'lengthdesc' | 'generalfirstup' | 'ncodedesc' | 'old'; + + /** ジャンル Genre */ + genre?: string; + + /** 掲載サイト指定 Site */ + nocgenre?: number; +} + +export const route: Route = { + path: '/search/:sub/:query', + categories: ['reading'], + example: '/syosetu/search/noc/word=ハーレム¬word=&type=r&mintime=&maxtime=&minlen=30000&maxlen=&min_globalpoint=&max_globalpoint=&minlastup=&maxlastup=&minfirstup=&maxfirstup=&isgl=1¬bl=1&order=new', + parameters: { + sub: 'The target Syosetu subsite (yomou/noc/mnlt/mid).', + query: 'Search parameters in Syosetu format.', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: 'Search', + maintainers: ['SnowAgar25'], + handler, +}; + +const setIfExists = (value) => value ?? undefined; + +/** + * This function converts query string generated by Syosetu website into API-compatible format. + * It is not intended for users to freely adjust values. + * + * @see https://deflis.github.io/node-narou/index.html + * @see https://dev.syosetu.com/man/api/ + */ +function mapToSearchParams(query: string, limit: number): SearchParams { + const params = queryString.parse(query) as NarouSearchParams; + + const searchParams: SearchParams = { + gzip: 5, + lim: limit, + }; + + searchParams.word = setIfExists(params.word); + searchParams.notword = setIfExists(params.notword); + + searchParams.title = setIfExists(params.title); + searchParams.ex = setIfExists(params.ex); + searchParams.keyword = setIfExists(params.keyword); + searchParams.wname = setIfExists(params.wname); + + searchParams.sasie = setIfExists(params.sasie); + searchParams.iszankoku = setIfExists(params.iszankoku); + searchParams.isbl = setIfExists(params.isbl); + searchParams.isgl = setIfExists(params.isgl); + searchParams.istensei = setIfExists(params.istensei); + searchParams.istenni = setIfExists(params.istenni); + + searchParams.stop = setIfExists(params.stop); + searchParams.notzankoku = setIfExists(params.notzankoku); + searchParams.notbl = setIfExists(params.notbl); + searchParams.notgl = setIfExists(params.notgl); + searchParams.nottensei = setIfExists(params.nottensei); + searchParams.nottenni = setIfExists(params.nottenni); + + searchParams.minlen = setIfExists(params.minlen); + searchParams.maxlen = setIfExists(params.maxlen); + + searchParams.type = setIfExists(params.type as NovelTypeParam); + searchParams.order = setIfExists(params.order as Order); + searchParams.genre = setIfExists(params.genre as Join<Genre> | Genre); + searchParams.nocgenre = setIfExists(params.nocgenre as Join<R18Site> | R18Site); + + if (params.mintime || params.maxtime) { + searchParams.time = `${params.mintime || ''}-${params.maxtime || ''}`; + } + + return searchParams; +} + +enum SyosetuSub { + YOMOU = 'yomou', + NOCTURNE = 'noc', + MOONLIGHT = 'mnlt', + MIDNIGHT = 'mid', +} + +const isGeneral = (sub: string): boolean => sub === SyosetuSub.YOMOU; + +function createNovelSearchBuilder(sub: string, searchParams: SearchParams) { + if (isGeneral(sub)) { + return new SearchBuilder(searchParams, new NarouNovelFetch()); + } + + const r18Params = { ...searchParams }; + + switch (sub) { + case SyosetuSub.NOCTURNE: + r18Params.nocgenre = R18Site.Nocturne; + break; + case SyosetuSub.MOONLIGHT: + // If either 女性向け/BL is chosen, nocgenre will be in query string + // If no specific genre selected, include both + if (!r18Params.nocgenre) { + r18Params.nocgenre = [R18Site.MoonLight, R18Site.MoonLightBL].join('-') as Join<R18Site>; + } + break; + case SyosetuSub.MIDNIGHT: + r18Params.nocgenre = R18Site.Midnight; + break; + default: + throw new InvalidParameterError('Invalid Syosetu subsite.\nValid subsites are: yomou, noc, mnlt, mid'); + } + + return new SearchBuilderR18(r18Params, new NarouNovelFetch()); +} + +async function handler(ctx: Context): Promise<Data> { + const { sub, query } = ctx.req.param(); + const searchUrl = `https://${sub}.syosetu.com/search/search/search.php?${query}`; + + const limit = Math.min(Number(ctx.req.query('limit') ?? 40), 40); + const searchParams = mapToSearchParams(query, limit); + const builder = createNovelSearchBuilder(sub, searchParams); + const result = await builder.execute(); + + 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'), { + novel, + genreText: GenreNotation[novel.genre], + }), + // Skip pubDate - search results prioritize search sequence over timestamps + // pubDate: novel.general_lastup, + author: novel.writer, + // Split by whitespace characters(\s), slash(/), full-width slash(/) + category: novel.keyword.split(/[\s/\uFF0F]/).filter(Boolean), + })); + + const searchTerms: string[] = []; + if (searchParams.word) { + searchTerms.push(searchParams.word); + } + if (searchParams.notword) { + searchTerms.push(`-${searchParams.notword}`); + } + + return { + title: searchTerms.length > 0 ? `Syosetu Search: ${searchTerms.join(' ')}` : 'Syosetu Search', + link: searchUrl, + item: items, + }; +} diff --git a/lib/routes/syosetu/templates/description.art b/lib/routes/syosetu/templates/description.art new file mode 100644 index 000000000000000..34fa61c6a1cd8ba --- /dev/null +++ b/lib/routes/syosetu/templates/description.art @@ -0,0 +1,73 @@ +{{ if novel.story }} +<p>{{ novel.story.replaceAll('\n', '<br>') }}</p> +{{ /if }} + +<h2>作品情報</h2> +<table> + <tr> + <td>状態</td> + <td> + {{ if novel.novel_type === 2 }} + 短編 + {{ else }} + {{ if novel.end === 0 }} + 完結済 + {{ else }} + 連載中 + {{ /if }} + (全{{ novel.general_all_no }}エピソード) + {{ /if }} + </td> + </tr> + {{ if genreText }} + <tr> + <td>ジャンル</td> + <td>{{ genreText }}</td> + </tr> + {{ /if }} + <tr> + <td>キーワード</td> + <td>{{ novel.keyword }}</td> + </tr> + <tr> + <td>最終掲載</td> + <td>{{ novel.general_lastup }}</td> + </tr> + <tr> + <td>Nコード</td> + <td>{{ novel.ncode }}</td> + </tr> + <tr> + <td>読了時間</td> + <td>約{{ novel.time }}分({{ novel.length }}文字)</td> + </tr> +</table> +<br> +<table> + {{ if novel.weekly_unique }} + <tr> + <td>週別ユニークユーザ</td> + <td>{{ novel.weekly_unique < 100 ? '100未満' : novel.weekly_unique }}</td> + </tr> + {{ /if }} + <tr> + <td>総合ポイント</td> + <td>{{ novel.global_point }} pt</td> + </tr> + <tr> + <td>評価人数</td> + <td>{{ novel.all_hyoka_cnt }} 人</td> + </tr> + <tr> + <td>評価ポイント</td> + <td>{{ novel.all_point }} pt</td> + </tr> + <tr> + <td>ブックマーク</td> + <td>{{ novel.fav_novel_cnt }} 件</td> + </tr> +</table> + +{{ if novel.sasie_cnt > 0 }} +<p>挿絵数:{{ novel.sasie_cnt }}枚</p> +{{ /if }} diff --git a/lib/routes/syosetu/types/ranking-r18.ts b/lib/routes/syosetu/types/ranking-r18.ts new file mode 100644 index 000000000000000..d22cf65507d28a2 --- /dev/null +++ b/lib/routes/syosetu/types/ranking-r18.ts @@ -0,0 +1,60 @@ +import { R18Site } from 'narou'; + +export enum SyosetuSub { + NOCTURNE = 'noc', + MOONLIGHT = 'mnlt', + MIDNIGHT = 'mid', + MOONLIGHT_BL = 'mnlt-bl', +} + +export enum RankingPeriod { + DAILY = 'daily', + WEEKLY = 'weekly', + MONTHLY = 'monthly', + QUARTER = 'quarter', + YEARLY = 'yearly', +} + +export enum NovelType { + TOTAL = 'total', + SHORT = 't', + ONGOING = 'r', + COMPLETE = 'er', +} + +export const syosetuSubToNocgenre = { + [SyosetuSub.NOCTURNE]: R18Site.Nocturne, + [SyosetuSub.MOONLIGHT]: R18Site.MoonLight, + [SyosetuSub.MOONLIGHT_BL]: R18Site.MoonLightBL, + [SyosetuSub.MIDNIGHT]: R18Site.Midnight, +} as const; + +export const syosetuSubToJapanese = { + [SyosetuSub.NOCTURNE]: 'ノクターン', + [SyosetuSub.MOONLIGHT]: 'ムーンライト', + [SyosetuSub.MOONLIGHT_BL]: 'ムーンライト BL', + [SyosetuSub.MIDNIGHT]: 'ミッドナイト', +} as const; + +export const periodToOrder = { + [RankingPeriod.DAILY]: 'dailypoint', + [RankingPeriod.WEEKLY]: 'weeklypoint', + [RankingPeriod.MONTHLY]: 'monthlypoint', + [RankingPeriod.QUARTER]: 'quarterpoint', + [RankingPeriod.YEARLY]: 'yearlypoint', +} as const; + +export const periodToJapanese = { + [RankingPeriod.DAILY]: '日間', + [RankingPeriod.WEEKLY]: '週間', + [RankingPeriod.MONTHLY]: '月間', + [RankingPeriod.QUARTER]: '四半期', + [RankingPeriod.YEARLY]: '年間', +} as const; + +export const novelTypeToJapanese = { + [NovelType.TOTAL]: '総合', + [NovelType.SHORT]: '短編', + [NovelType.ONGOING]: '連載中', + [NovelType.COMPLETE]: '完結済', +} as const; diff --git a/lib/routes/syosetu/types/ranking.ts b/lib/routes/syosetu/types/ranking.ts new file mode 100644 index 000000000000000..558bfd151e0c0ef --- /dev/null +++ b/lib/routes/syosetu/types/ranking.ts @@ -0,0 +1,67 @@ +export enum RankingPeriod { + DAILY = 'daily', + WEEKLY = 'weekly', + MONTHLY = 'monthly', + QUARTER = 'quarter', + YEARLY = 'yearly', + TOTAL = 'total', +} + +export enum NovelType { + TOTAL = 'total', + SHORT = 't', + ONGOING = 'r', + COMPLETE = 'er', +} + +export enum RankingType { + LIST = 'list', + GENRE = 'genre', + ISEKAI = 'isekai', +} + +export const periodToOrder = { + [RankingPeriod.DAILY]: 'dailypoint', + [RankingPeriod.WEEKLY]: 'weeklypoint', + [RankingPeriod.MONTHLY]: 'monthlypoint', + [RankingPeriod.QUARTER]: 'quarterpoint', + [RankingPeriod.YEARLY]: 'yearlypoint', + [RankingPeriod.TOTAL]: 'hyoka', +} as const; + +export const periodToPointField = { + [RankingPeriod.DAILY]: 'pt', + [RankingPeriod.WEEKLY]: 'weekly_point', + [RankingPeriod.MONTHLY]: 'monthly_point', + [RankingPeriod.QUARTER]: 'quarter_point', + [RankingPeriod.YEARLY]: 'yearly_point', + [RankingPeriod.TOTAL]: 'global_point', +} as const; + +export const periodToJapanese = { + [RankingPeriod.DAILY]: '日間', + [RankingPeriod.WEEKLY]: '週間', + [RankingPeriod.MONTHLY]: '月間', + [RankingPeriod.QUARTER]: '四半期', + [RankingPeriod.YEARLY]: '年間', + [RankingPeriod.TOTAL]: '累計', +} as const; + +export const novelTypeToJapanese = { + [NovelType.TOTAL]: 'すべて', + [NovelType.SHORT]: '短編', + [NovelType.ONGOING]: '連載中', + [NovelType.COMPLETE]: '完結済', +} as const; + +export enum IsekaiCategory { + RENAI = '1', + FANTASY = '2', + OTHER = 'o', +} + +export const isekaiCategoryToJapanese = { + [IsekaiCategory.RENAI]: '〔恋愛〕', + [IsekaiCategory.FANTASY]: '〔ファンタジー〕', + [IsekaiCategory.OTHER]: '〔文芸・SF・その他〕', +} as const; diff --git a/lib/routes/syosetu/utils.ts b/lib/routes/syosetu/utils.ts new file mode 100644 index 000000000000000..9970c6dc3d91da8 --- /dev/null +++ b/lib/routes/syosetu/utils.ts @@ -0,0 +1,50 @@ +import { DataItem } from '@/types'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; +import { config } from '@/config'; +import { NarouNovelFetch, NarouSearchResult, SearchBuilder, SearchBuilderR18 } from 'narou'; + +export async function fetchNovelInfo(ncode: string): Promise<{ baseUrl: string; novel: NarouSearchResult }> { + const api = new NarouNovelFetch(); + const [generalRes, r18Res] = await Promise.all([new SearchBuilder({ gzip: 5, of: 't-s-k-ga-nt-nu' }, api).ncode(ncode).execute(), new SearchBuilderR18({ gzip: 5, of: 't-s-k-ga-nt-nu' }, api).ncode(ncode).execute()]); + + const isGeneral = generalRes.allcount !== 0; + const novelData = isGeneral ? generalRes : r18Res; + const baseUrl = isGeneral ? 'https://ncode.syosetu.com' : 'https://novel18.syosetu.com'; + + if (novelData.allcount === 0) { + throw new InvalidParameterError('Novel not found in both APIs'); + } + + return { + baseUrl, + novel: novelData.values[0] as NarouSearchResult, + }; +} + +export async function fetchChapterContent(chapterUrl: string, chapter?: number): Promise<DataItem> { + return (await cache.tryGet(chapterUrl, async () => { + const response = await ofetch(chapterUrl, { + headers: { + Cookie: 'over18=yes', + 'User-Agent': config.ua, + }, + }); + + const $ = load(response); + + const title = `${chapter ? `#${chapter} ` : ''}${$('.p-novel__title').html() || ''}`; + const description = $('.p-novel__body').html() || ''; + const pubDate = $('meta[name=WWWC]').attr('content'); + + return { + title, + description, + link: chapterUrl, + pubDate, + language: 'ja', + }; + })) as DataItem; +} diff --git a/package.json b/package.json index 360a21e08137b35..7674c6b3c96c138 100644 --- a/package.json +++ b/package.json @@ -101,6 +101,7 @@ "mailparser": "3.7.1", "markdown-it": "14.1.0", "module-alias": "2.2.3", + "narou": "1.0.0", "notion-to-md": "3.1.1", "oauth-1.0a": "2.2.6", "ofetch": "1.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 54e7c08d0fb09c6..5717c69e583db3e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -164,6 +164,9 @@ importers: module-alias: specifier: 2.2.3 version: 2.2.3 + narou: + specifier: 1.0.0 + version: 1.0.0 notion-to-md: specifier: 3.1.1 version: 3.1.1 @@ -2648,6 +2651,9 @@ packages: resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} engines: {node: '>=18'} + date-fns@3.6.0: + resolution: {integrity: sha512-fRHTG8g/Gif+kSh50gaGEdToemgfj74aRX3swtiouboip5JDLAyDE9F11nHMIcvOaXeOC6D7SpNhi7uFyB7Uww==} + dayjs@1.11.8: resolution: {integrity: sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ==} @@ -4310,6 +4316,10 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true + narou@1.0.0: + resolution: {integrity: sha512-+rlk2kT6+Tdse8E2Z57xR7uLuEDjJ7EgZFRL7F7hMEPRCgU+KV/V2twg+3dcUy0OYHq79RLxuUzKv2kDKTsNRQ==} + engines: {node: '>=16.0.0', pnpm: '>=8'} + natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} @@ -8253,6 +8263,8 @@ snapshots: whatwg-mimetype: 4.0.0 whatwg-url: 14.0.0 + date-fns@3.6.0: {} + dayjs@1.11.8: {} debug@2.6.9: @@ -10198,6 +10210,10 @@ snapshots: nanoid@3.3.7: {} + narou@1.0.0: + dependencies: + date-fns: 3.6.0 + natural-compare@1.4.0: {} netmask@2.0.2: {} From 14d49eea386fc1571e80b88c46dde9cd5113344c Mon Sep 17 00:00:00 2001 From: karasu <karasu.shing@gmail.com> Date: Sat, 23 Nov 2024 00:29:14 +0800 Subject: [PATCH 584/740] fix(route): linkresearcher (#17681) * fix(route): linkresearcher * Update lib/routes/linkresearcher/index.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/linkresearcher/index.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/linkresearcher/index.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/linkresearcher/namespace.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * feat: bilingual support * feat: add author and doi --------- --- lib/routes/linkresearcher/index.ts | 154 ++++++++++++------ lib/routes/linkresearcher/namespace.ts | 10 +- .../linkresearcher/templates/bilingual.art | 7 + lib/routes/linkresearcher/types.ts | 103 ++++++++++++ 4 files changed, 226 insertions(+), 48 deletions(-) create mode 100644 lib/routes/linkresearcher/templates/bilingual.art create mode 100644 lib/routes/linkresearcher/types.ts diff --git a/lib/routes/linkresearcher/index.ts b/lib/routes/linkresearcher/index.ts index 2f28096de2bad4f..65da513d2f3c712 100644 --- a/lib/routes/linkresearcher/index.ts +++ b/lib/routes/linkresearcher/index.ts @@ -1,76 +1,138 @@ -import { Route } from '@/types'; -import got from '@/utils/got'; -import qs from 'query-string'; +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 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'; +const apiURL = `${baseURL}/api`; export const route: Route = { + name: 'Articles', path: '/:params', - name: 'Unknown', - maintainers: ['y9c'], + example: '/linkresearcher/category=theses&columns=Nature%20导读&subject=生物', + maintainers: ['y9c', 'KarasuShin'], handler, + view: ViewType.Articles, + categories: ['journal'], + parameters: { + params: { + description: 'search parameters, support `category`, `subject`, `columns`, `query`', + }, + }, + zh: { + name: '文章', + }, + 'zh-TW': { + name: '文章', + }, }; -async function handler(ctx) { - // parse params +async function handler(ctx: Context): Promise<Data> { + const categoryMap = { theses: '论文', information: '新闻', careers: '职业' } as const; const params = ctx.req.param('params'); - const query = qs.parse(params); - - const categoryMap = { theses: '论文', information: '新闻', careers: '职业' }; - const category = query.category; - let title = categoryMap[category]; - - // get XSRF token from main page - const metaURL = `${baseURL}/${category}`; - const metaResponse = await got(metaURL); - const xsrfToken = metaResponse.headers['set-cookie'][0].split(';')[0].split('=')[1]; - - let data = { filters: { status: false } }; - if (query.subject !== undefined && query.columns !== undefined) { - data = { filters: { status: true, subject: query.subject, columns: query.columns } }; - title = `${title}「${query.subject} & ${query.columns}」`; - } else if (query.subject !== undefined && query.columns === undefined) { - data = { filters: { status: true, subject: query.subject } }; - title = `${title}「${query.subject}」`; - } else if (query.subject === undefined && query.columns !== undefined) { - data = { filters: { status: true, columns: query.columns } }; - title = `${title}「${query.columns}」`; + const filters = new URLSearchParams(params); + + const subject = filters.get('subject'); + const columns = filters.get('columns'); + const query = filters.get('query') ?? ''; + const category = filters.get('category') ?? ('theses' as keyof typeof categoryMap); + + if (!(category in categoryMap)) { + throw new InvalidParameterError('Invalid category'); + } + let title = categoryMap[category] as string; + + const token = crypto.randomUUID(); + + const data: { + filters: { + status: boolean; + subject?: string; + columns?: string; + }; + } = { filters: { status: true } }; + + if (subject) { + data.filters.subject = subject; + title = `${title}「${subject}」`; } - data.query = query.query; + + if (columns) { + data.filters.columns = columns; + title = `${title}「${columns}」`; + } + const dataURL = `${baseURL}/api/${category === 'careers' ? 'articles' : category}/search`; - const pageResponse = await got.post(dataURL, { + const pageResponse = await ofetch<{ + hits: SearchResultItem[]; + }>(dataURL, { + method: 'POST', headers: { 'content-type': 'application/json; charset=UTF-8', - 'x-xsrf-token': xsrfToken, - cookie: `XSRF-TOKEN=${xsrfToken}`, + 'x-xsrf-token': token, + cookie: `XSRF-TOKEN=${token}`, }, - searchParams: { + params: { from: 0, size: 20, type: category === 'careers' ? 'CAREER' : 'SEARCH', }, - json: data, + body: { + ...data, + query, + }, }); - const list = pageResponse.data.hits; + const items = await Promise.all( + pageResponse.hits.map((item) => { + const link = `${baseURL}/${category}/${item.id}`; + return cache.tryGet(link, async () => { + const response = await ofetch<DetailResponse>(`${apiURL}/${category === 'theses' ? 'theses' : 'information'}/${item.id}`, { + responseType: 'json', + }); + + const dataItem: DataItem = { + title: response.title, + pubDate: parseDate(response.onlineTime), + link, + image: response.cover, + }; + + dataItem.description = + 'zhTextList' in response && 'enTextList' in response + ? art(templatePath, { + zh: response.zhTextList, + en: response.enTextList, + }) + : response.content; + + if ('paperList' in response) { + const { doi, authors } = response.paperList[0]; + dataItem.doi = doi; + dataItem.author = authors.map((author) => ({ name: author })); + } - const out = list.map((item) => ({ - title: item.title, - description: item.content, - pubDate: parseDate(item.createdAt, 'x'), - link: `${metaURL}/${item.id}`, - guid: `${metaURL}/${item.id}`, - doi: item.identCode === undefined ? '' : item.identCode, - author: item.authors === undefined ? '' : item.authors.join(', '), - })); + return dataItem; + }) as unknown as DataItem; + }) + ); return { title: `领研 | ${title}`, description: '领研是链接华人学者的人才及成果平台。领研为国内外高校、科研机构及科技企业提供科研人才招聘服务,也是青年研究者的职业发展指导及线上培训平台;研究者还可将自己的研究论文上传至领研,与超过五十万华人学者分享工作的最新进展。', - image: 'https://www.linkresearcher.com/assets/images/logo-app.png', + image: `${baseURL}/assets/images/logo-app.png`, link: baseURL, - item: out, + item: items, }; } diff --git a/lib/routes/linkresearcher/namespace.ts b/lib/routes/linkresearcher/namespace.ts index 2fde7fa0853d7a4..dd99889536c07aa 100644 --- a/lib/routes/linkresearcher/namespace.ts +++ b/lib/routes/linkresearcher/namespace.ts @@ -2,6 +2,12 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Link Research', - url: 'linkresearcher', - lang: 'en', + url: 'www.linkresearcher.com', + lang: 'zh-CN', + zh: { + name: '领研', + }, + 'zh-TW': { + name: '領研', + }, }; diff --git a/lib/routes/linkresearcher/templates/bilingual.art b/lib/routes/linkresearcher/templates/bilingual.art new file mode 100644 index 000000000000000..be7d6c1ba93f73e --- /dev/null +++ b/lib/routes/linkresearcher/templates/bilingual.art @@ -0,0 +1,7 @@ +{{ each en }} +{{ if $index !== 0 }} +<br> +{{ /if }} +<p>{{ $value }}</p> +<p>{{ zh[$index] }}</p> +{{ /each }} diff --git a/lib/routes/linkresearcher/types.ts b/lib/routes/linkresearcher/types.ts new file mode 100644 index 000000000000000..f93aa153a42a406 --- /dev/null +++ b/lib/routes/linkresearcher/types.ts @@ -0,0 +1,103 @@ +interface BaseItem { + id: string; + title: string; + tags: string[]; + onlineTime: number; + cover: string; +} + +export interface InformationItem extends BaseItem { + summary: string; +} + +export interface ThesesItem extends BaseItem { + authors: string[]; + content: string; + journals: string[]; + publishDate: string; + source: { + sourceType: string; + }; + subject: string; + thesisTitle: string; +} + +export interface ArticleItem extends BaseItem { + columns: string[]; + source: { + logo: string; + sourceId: string; + sourceName: string; + sourceType: string; + }; + summary: string; + type: string; +} + +export type SearchResultItem = InformationItem | ThesesItem | ArticleItem; + +export interface ThesesDetailResponse { + columns: string[]; + content: string; + cover: string; + enTextList: string[]; + id: string; + journals: string[]; + link: string; + onlineTime: number; + original: boolean; + paperList: { + authors: string[]; + checkname: string; + doi: string; + id: string; + journal: string; + link: string; + publishDate: string; + subjects: string[]; + summary: string; + title: string; + translateSummary: string; + type: string; + }[]; + relevant: { + timestamp: number; + type: string; + }[]; + source: { + sourceId: string; + sourceName: string; + }; + sourceKey: string; + sourceType: string; + tags: string[]; + template: boolean; + title: string; + userType: number; + zhTextList?: string[]; +} + +export interface InformationDetailResponse { + columns: string[]; + content: string; + cover: string; + id: string; + onlineTime: number; + original: boolean; + relevant: { + timestamp: number; + type: string; + }[]; + source: { + sourceId: string; + sourceName: string; + }; + sourceKey: string; + subject: string; + summary: string; + tags: string[]; + title: string; + type: string; +} + +export type DetailResponse = ThesesDetailResponse | InformationDetailResponse; From 407658b9de7c6be1b4566edcba8041b7e93e968f Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Sat, 23 Nov 2024 02:34:12 +0800 Subject: [PATCH 585/740] docs(route/syosetu): add URLs and improve ranking docs (#17686) * docs: add URLs and improve ranking docs * docs: capitalize Syosetu namespace --- lib/routes/syosetu/dev.ts | 1 + lib/routes/syosetu/namespace.ts | 2 +- lib/routes/syosetu/ranking-r18.ts | 8 +++++-- lib/routes/syosetu/ranking.ts | 39 ++++++++++++++++++++----------- 4 files changed, 33 insertions(+), 17 deletions(-) diff --git a/lib/routes/syosetu/dev.ts b/lib/routes/syosetu/dev.ts index 07499eb14cebda7..64dd139c7db1dc0 100644 --- a/lib/routes/syosetu/dev.ts +++ b/lib/routes/syosetu/dev.ts @@ -16,6 +16,7 @@ export const route: Route = { supportScihub: false, }, name: 'なろう小説 API の更新履歴', + url: 'dev.syosetu.com', maintainers: ['SnowAgar25'], handler, radar: [ diff --git a/lib/routes/syosetu/namespace.ts b/lib/routes/syosetu/namespace.ts index 5bea89105b2418f..704df0a4304a0b9 100644 --- a/lib/routes/syosetu/namespace.ts +++ b/lib/routes/syosetu/namespace.ts @@ -1,7 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'syosetu', + name: 'Syosetu', url: 'syosetu.com', lang: 'ja', }; diff --git a/lib/routes/syosetu/ranking-r18.ts b/lib/routes/syosetu/ranking-r18.ts index fdc58e53bb91a96..5b9fc3171ef42cf 100644 --- a/lib/routes/syosetu/ranking-r18.ts +++ b/lib/routes/syosetu/ranking-r18.ts @@ -78,6 +78,7 @@ export const route: Route = { supportScihub: false, }, name: 'R18 Rankings', + url: 'syosetu.com/site/group', maintainers: ['SnowAgar25'], handler, description: ` @@ -90,13 +91,16 @@ export const route: Route = { | yearly | Yearly Ranking | 年間ランキング | | Novel Type | Description | 説明 | -| --- | --- | --- | --- | +| --- | --- | --- | | total | All Works | 総合 | | t | Short Stories | 短編 | | r | Ongoing Series | 連載中 | | er | Completed Series | 完結済 | -Note: Combine Period and Novel Type with \`_\`. For example: \`daily_total\`, \`weekly_r\`, \`monthly_er\``, +:::tip +Combine Period and Novel Type with \`_\`. +For example: \`daily_total\`, \`weekly_r\`, \`monthly_er\` +:::`, radar: [ { source: ['noc.syosetu.com/rank/list/type/:type'], diff --git a/lib/routes/syosetu/ranking.ts b/lib/routes/syosetu/ranking.ts index 32ac1fbe1b7d43a..0ca3481f7222af8 100644 --- a/lib/routes/syosetu/ranking.ts +++ b/lib/routes/syosetu/ranking.ts @@ -56,7 +56,7 @@ const getParameters = () => { ...periodOptions.flatMap((period) => novelTypeOptions.map((novelType) => ({ value: `${period.value}_${novelType.value}`, - label: `${RankingType.LIST}: [${periodToJapanese[period.value]}] 総合ランキング - ${novelTypeToJapanese[novelType.value]}`, + label: `${RankingType.LIST} - [${periodToJapanese[period.value]}] 総合ランキング - ${novelTypeToJapanese[novelType.value]}`, })) ), // Genre ranking options @@ -64,7 +64,7 @@ const getParameters = () => { genreOptions.flatMap((genre) => novelTypeOptions.map((novelType) => ({ value: `${period.value}_${genre.value}_${novelType.value}`, - label: `${RankingType.GENRE}: [${periodToJapanese[period.value]}] ${GenreNotation[genre.value]}ランキング - ${novelTypeToJapanese[novelType.value]}`, + label: `${RankingType.GENRE} - [${periodToJapanese[period.value]}] ${GenreNotation[genre.value]}ランキング - ${novelTypeToJapanese[novelType.value]}`, })) ) ), @@ -73,7 +73,7 @@ const getParameters = () => { isekaiOptions.flatMap((category) => novelTypeOptions.map((novelType) => ({ value: `${period.value}_${category.value}_${novelType.value}`, - label: `${RankingType.ISEKAI}: [${periodToJapanese[period.value]}] 異世界転生/転移${isekaiCategoryToJapanese[category.value]}ランキング - ${novelTypeToJapanese[novelType.value]}`, + label: `${RankingType.ISEKAI} - [${periodToJapanese[period.value]}] 異世界転生/転移${isekaiCategoryToJapanese[category.value]}ランキング - ${novelTypeToJapanese[novelType.value]}`, })) ) ), @@ -123,18 +123,16 @@ export const route: Route = { supportScihub: false, }, name: 'Rankings', + url: 'yomou.syosetu.com/rank/top', maintainers: ['SnowAgar25'], handler, description: ` -Support various ranking types: -1. 総合ランキング \`list\` -2. ジャンル別ランキング \`genre\` -3. 異世界転生/転移ランキング \`isekai\` +| Keyword | Description | 説明 | +| --- | --- | --- | +| list | Overall Ranking | 総合ランキング | +| genre | Genre Ranking | ジャンル別ランキング | +| isekai | Isekai/Reincarnation/Transfer Ranking | 異世界転生/転移ランキング | -Note: The "注目度ランキング" (Attention Ranking) is not supported as syosetu does not provide a public API for this feature and the results cannot be replicated through the search API. -注意事項:「注目度ランキング」については、API が非公開で検索 API でも同様の結果を得ることができないため、本 Route ではサポートしておりません。 - -Period options: | Period | Description | | --- | --- | | daily | Daily Ranking | @@ -143,7 +141,7 @@ Period options: | quarter | Quarterly Ranking | | yearly | Yearly Ranking | -Novel type options (not all available for every ranking): + | Type | Description | | --- | --- | | total | All Works | @@ -151,10 +149,23 @@ Novel type options (not all available for every ranking): | r | Ongoing Series | | er | Completed Series | -For \`isekai\` ranking type: +:::warning +Please note that novel type options may vary depending on the ranking category. + +ランキングの種類によって、小説タイプが異なる場合がございますのでご注意ください。 +::: + +:::danger 注意事項 +The "注目度ランキング" (Attention Ranking) is not supported as syosetu does not provide a public API for this feature and the results cannot be replicated through the search API. + +「注目度ランキング」については、API が非公開で検索 API でも同様の結果を得ることができないため、本 Route ではサポートしておりません。 +::: + +:::tip 異世界転生/転移ランキングについて (Isekai) When multiple works have the same points, their order may differ from syosetu's ranking as syosetu randomizes the order for works with identical points. -異世界転生/転移ランキングについて: + 集計の結果、同じポイントの作品が複数存在する場合、Syosetu ではランダムで順位が決定されるため、本 Route の順位と異なる場合があります。 +::: `, radar: [ { From 8e9229f2264d2236074887c4a61e53d62416fe76 Mon Sep 17 00:00:00 2001 From: Asuka Minato <i@asukaminato.eu.org> Date: Sat, 23 Nov 2024 13:38:16 +0900 Subject: [PATCH 586/740] chore: use some lighter dependencies (#17685) * nolyfill * pin overrides version * pnpm install --no-frozen-lockfile --- package.json | 6 +- pnpm-lock.yaml | 197 +++++++++++-------------------------------------- 2 files changed, 50 insertions(+), 153 deletions(-) diff --git a/package.json b/package.json index 7674c6b3c96c138..ab6773b9f02724b 100644 --- a/package.json +++ b/package.json @@ -203,7 +203,11 @@ }, "pnpm": { "overrides": { - "difflib": "https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed" + "difflib": "https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed", + "is-core-module": "npm:@nolyfill/is-core-module@1.0.39", + "safe-buffer": "npm:@nolyfill/safe-buffer@1.0.41", + "safer-buffer": "npm:@nolyfill/safer-buffer@1.0.41", + "side-channel": "npm:@nolyfill/side-channel@1.0.29" } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5717c69e583db3e..20e62ae0dd6095c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,6 +6,10 @@ settings: overrides: difflib: https://codeload.github.com/postlight/difflib.js/tar.gz/32e8e38c7fcd935241b9baab71bb432fd9b166ed + is-core-module: npm:@nolyfill/is-core-module@1.0.39 + safe-buffer: npm:@nolyfill/safe-buffer@1.0.41 + safer-buffer: npm:@nolyfill/safer-buffer@1.0.41 + side-channel: npm:@nolyfill/side-channel@1.0.29 importers: @@ -1482,6 +1486,22 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} + '@nolyfill/is-core-module@1.0.39': + resolution: {integrity: sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==} + engines: {node: '>=12.4.0'} + + '@nolyfill/safe-buffer@1.0.41': + resolution: {integrity: sha512-QUutoN6a0Rf49n6kYVSppQpfraXfrtrUaxTU/GhcxIhz+3GHp+SrBVnTKE3ASB7AzgZJ7XrxhaBgwrF+hSmeKg==} + engines: {node: '>=12.4.0'} + + '@nolyfill/safer-buffer@1.0.41': + resolution: {integrity: sha512-RieuhcNjFpL2NObzKlsNGM5rCan1y2PH3KUUJ01Yhxqj4gTB20WplufPmQRSrLdI9BWf8cBrxvXuRtjvMRKzxQ==} + engines: {node: '>=12.4.0'} + + '@nolyfill/side-channel@1.0.29': + resolution: {integrity: sha512-nqk0vlqUL0wmmoPrm2HqDi0KXGy+jTNHlH/oSx7jsrh2rEApSy1mactsSUGWnhuz2ZsngJSrVHWZIaJKi3WUNA==} + engines: {node: '>=12.4.0'} + '@notionhq/client@2.2.15': resolution: {integrity: sha512-XhdSY/4B1D34tSco/GION+23GMjaS9S2zszcqYkMHo8RcWInymF6L1x+Gk7EmHdrSxNFva2WM8orhC4BwQCwgw==} engines: {node: '>=12'} @@ -2363,10 +2383,6 @@ packages: resolution: {integrity: sha512-Yo9wGIQUaAfIbk+qY0X4cDQgCosecfBe3V9NSyeY4qPC2SAkbCS4Xj79VP8WOzitpJUZKc/wsRCYF5ariDIwkg==} engines: {node: '>=18'} - call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} - engines: {node: '>= 0.4'} - callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -2727,10 +2743,6 @@ packages: resolution: {integrity: sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==} engines: {node: '>=10'} - define-data-property@1.1.4: - resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} - engines: {node: '>= 0.4'} - define-lazy-prop@2.0.0: resolution: {integrity: sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==} engines: {node: '>=8'} @@ -2910,14 +2922,6 @@ packages: error-ex@1.3.2: resolution: {integrity: sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==} - es-define-property@1.0.0: - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} - engines: {node: '>= 0.4'} - - es-errors@1.3.0: - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} - es5-ext@0.10.64: resolution: {integrity: sha512-p2snDhiLaXe6dahss1LddxqEm+SkuDvV8dnIQG0MWjyHpcMNfXKPE+/Cc0y+PhxJX3A4xGNeFCj5oc0BUh6deg==} engines: {node: '>=0.10'} @@ -3290,9 +3294,6 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - function-bind@1.1.2: - resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} - gauge@3.0.2: resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} engines: {node: '>=10'} @@ -3318,10 +3319,6 @@ packages: resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} engines: {node: '>=18'} - get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} - engines: {node: '>= 0.4'} - get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -3395,9 +3392,6 @@ packages: resolution: {integrity: sha512-ELcWOXtJxjPX4vsKMh+7V+jZvgPwYMlEhQFiu2sa9Qmt5veX8nwXPksOWGGN6Zk4xCiLygUyaz7xGtcMO+Onxw==} engines: {node: '>=14.0.0'} - gopd@1.0.1: - resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} - got@12.6.1: resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==} engines: {node: '>=14.16'} @@ -3441,24 +3435,9 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - has-property-descriptors@1.0.2: - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} - - has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} - engines: {node: '>= 0.4'} - - has-symbols@1.0.3: - resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} - engines: {node: '>= 0.4'} - has-unicode@2.0.1: resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} - engines: {node: '>= 0.4'} - he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true @@ -3654,10 +3633,6 @@ packages: resolution: {integrity: sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==} engines: {node: '>=6'} - is-core-module@2.15.1: - resolution: {integrity: sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==} - engines: {node: '>= 0.4'} - is-docker@2.2.1: resolution: {integrity: sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==} engines: {node: '>=8'} @@ -4417,10 +4392,6 @@ packages: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - object-inspect@1.13.2: - resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} - engines: {node: '>= 0.4'} - ofetch@1.4.1: resolution: {integrity: sha512-QZj2DfGplQAr2oj9KzceK9Hwz6Whxazmn85yYeVuS3u9XTMOGMRx0kO95MQ+vLsj/S/NwBDMMLU5hpxvI6Tklw==} @@ -4967,16 +4938,10 @@ packages: rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - safe-stable-stringify@2.5.0: resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} engines: {node: '>=10'} - safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - sanitize-html@2.13.1: resolution: {integrity: sha512-ZXtKq89oue4RP7abL9wp/9URJcqQNABB5GGJ2acW1sdO8JTVl92f4ygD7Yc9Ze09VAZhnt2zegeU0tbNsdcLYg==} @@ -5011,10 +4976,6 @@ packages: set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - set-function-length@1.2.2: - resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} - engines: {node: '>= 0.4'} - shallow-clone@0.1.2: resolution: {integrity: sha512-J1zdXCky5GmNnuauESROVu31MQSnLoYvlyEn6j2Ztk6Q5EHFIhxkMhYcv6vuDzl2XEzoRr856QwzMgWM/TmZgw==} engines: {node: '>=0.10.0'} @@ -5027,10 +4988,6 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - side-channel@1.0.6: - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} - engines: {node: '>= 0.4'} - siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -6978,6 +6935,14 @@ snapshots: '@nodelib/fs.scandir': 2.1.5 fastq: 1.17.1 + '@nolyfill/is-core-module@1.0.39': {} + + '@nolyfill/safe-buffer@1.0.41': {} + + '@nolyfill/safer-buffer@1.0.41': {} + + '@nolyfill/side-channel@1.0.29': {} + '@notionhq/client@2.2.15': dependencies: '@types/node-fetch': 2.6.11 @@ -7139,7 +7104,7 @@ snapshots: '@postman/tunnel-agent@0.6.4': dependencies: - safe-buffer: 5.2.1 + safe-buffer: '@nolyfill/safe-buffer@1.0.41' '@protobufjs/aspromise@1.1.2': {} @@ -7771,7 +7736,7 @@ snapshots: asn1@0.2.6: dependencies: - safer-buffer: 2.1.2 + safer-buffer: '@nolyfill/safer-buffer@1.0.41' assert-plus@1.0.0: {} @@ -7946,14 +7911,6 @@ snapshots: normalize-url: 8.0.1 responselike: 3.0.0 - call-bind@1.0.7: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - set-function-length: 1.2.2 - callsites@3.1.0: {} camel-case@3.0.0: @@ -8312,12 +8269,6 @@ snapshots: defer-to-connect@2.0.1: {} - define-data-property@1.1.4: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - gopd: 1.0.1 - define-lazy-prop@2.0.0: {} degenerator@5.0.1: @@ -8425,11 +8376,11 @@ snapshots: ecc-jsbn@0.1.2: dependencies: jsbn: 0.1.1 - safer-buffer: 2.1.2 + safer-buffer: '@nolyfill/safer-buffer@1.0.41' ecdsa-sig-formatter@1.0.11: dependencies: - safe-buffer: 5.2.1 + safe-buffer: '@nolyfill/safe-buffer@1.0.41' editorconfig@1.0.4: dependencies: @@ -8486,12 +8437,6 @@ snapshots: dependencies: is-arrayish: 0.2.1 - es-define-property@1.0.0: - dependencies: - get-intrinsic: 1.2.4 - - es-errors@1.3.0: {} - es5-ext@0.10.64: dependencies: es6-iterator: 2.0.3 @@ -8986,7 +8931,7 @@ snapshots: asynckit: 0.4.0 combined-stream: 1.0.8 mime-types: 2.1.35 - safe-buffer: 5.2.1 + safe-buffer: '@nolyfill/safe-buffer@1.0.41' form-data@4.0.1: dependencies: @@ -9021,8 +8966,6 @@ snapshots: fsevents@2.3.3: optional: true - function-bind@1.1.2: {} - gauge@3.0.2: dependencies: aproba: 2.0.0 @@ -9060,14 +9003,6 @@ snapshots: get-east-asian-width@1.3.0: {} - get-intrinsic@1.2.4: - dependencies: - es-errors: 1.3.0 - function-bind: 1.1.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - get-stream@5.2.0: dependencies: pump: 3.0.2 @@ -9168,10 +9103,6 @@ snapshots: - encoding - supports-color - gopd@1.0.1: - dependencies: - get-intrinsic: 1.2.4 - got@12.6.1: dependencies: '@sindresorhus/is': 5.6.0 @@ -9229,20 +9160,8 @@ snapshots: has-flag@4.0.0: {} - has-property-descriptors@1.0.2: - dependencies: - es-define-property: 1.0.0 - - has-proto@1.0.3: {} - - has-symbols@1.0.3: {} - has-unicode@2.0.1: {} - hasown@2.0.2: - dependencies: - function-bind: 1.1.2 - he@1.2.0: {} headers-polyfill@4.0.3: {} @@ -9368,15 +9287,15 @@ snapshots: iconv-lite@0.4.24: dependencies: - safer-buffer: 2.1.2 + safer-buffer: '@nolyfill/safer-buffer@1.0.41' iconv-lite@0.5.0: dependencies: - safer-buffer: 2.1.2 + safer-buffer: '@nolyfill/safer-buffer@1.0.41' iconv-lite@0.6.3: dependencies: - safer-buffer: 2.1.2 + safer-buffer: '@nolyfill/safer-buffer@1.0.41' ieee754@1.2.1: {} @@ -9493,10 +9412,6 @@ snapshots: dependencies: builtin-modules: 3.3.0 - is-core-module@2.15.1: - dependencies: - hasown: 2.0.2 - is-docker@2.2.1: {} is-docker@3.0.0: {} @@ -9696,12 +9611,12 @@ snapshots: dependencies: buffer-equal-constant-time: 1.0.1 ecdsa-sig-formatter: 1.0.11 - safe-buffer: 5.2.1 + safe-buffer: '@nolyfill/safe-buffer@1.0.41' jws@4.0.0: dependencies: jwa: 2.0.0 - safe-buffer: 5.2.1 + safe-buffer: '@nolyfill/safe-buffer@1.0.41' keyv@4.5.4: dependencies: @@ -10303,8 +10218,6 @@ snapshots: object-assign@4.1.1: {} - object-inspect@1.13.2: {} - ofetch@1.4.1: dependencies: destr: 2.0.3 @@ -10554,7 +10467,7 @@ snapshots: oauth-sign: 0.9.0 performance-now: 2.1.0 qs: 6.5.3 - safe-buffer: 5.2.1 + safe-buffer: '@nolyfill/safe-buffer@1.0.41' stream-length: 1.0.2 uuid: 8.3.2 @@ -10702,7 +10615,7 @@ snapshots: qs@6.13.0: dependencies: - side-channel: 1.0.6 + side-channel: '@nolyfill/side-channel@1.0.29' qs@6.5.3: {} @@ -10841,7 +10754,7 @@ snapshots: oauth-sign: 0.9.0 performance-now: 2.1.0 qs: 6.5.3 - safe-buffer: 5.2.1 + safe-buffer: '@nolyfill/safe-buffer@1.0.41' tough-cookie: 2.5.0 tunnel-agent: 0.6.0 uuid: 3.4.0 @@ -10860,7 +10773,7 @@ snapshots: resolve@1.22.8: dependencies: - is-core-module: 2.15.1 + is-core-module: '@nolyfill/is-core-module@1.0.39' path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -10933,12 +10846,8 @@ snapshots: dependencies: tslib: 2.8.1 - safe-buffer@5.2.1: {} - safe-stable-stringify@2.5.0: {} - safer-buffer@2.1.2: {} - sanitize-html@2.13.1: dependencies: deepmerge: 4.3.1 @@ -10970,15 +10879,6 @@ snapshots: set-blocking@2.0.0: {} - set-function-length@1.2.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - shallow-clone@0.1.2: dependencies: is-extendable: 0.1.1 @@ -10992,13 +10892,6 @@ snapshots: shebang-regex@3.0.0: {} - side-channel@1.0.6: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - object-inspect: 1.13.2 - siginfo@2.0.0: {} signal-exit@3.0.7: {} @@ -11086,7 +10979,7 @@ snapshots: ecc-jsbn: 0.1.2 getpass: 0.1.7 jsbn: 0.1.1 - safer-buffer: 2.1.2 + safer-buffer: '@nolyfill/safer-buffer@1.0.41' tweetnacl: 0.14.5 stack-trace@0.0.10: {} @@ -11143,7 +11036,7 @@ snapshots: string_decoder@1.3.0: dependencies: - safe-buffer: 5.2.1 + safe-buffer: '@nolyfill/safe-buffer@1.0.41' strip-ansi@3.0.1: dependencies: @@ -11379,7 +11272,7 @@ snapshots: tunnel-agent@0.6.0: dependencies: - safe-buffer: 5.2.1 + safe-buffer: '@nolyfill/safe-buffer@1.0.41' turndown@7.2.0: dependencies: From 6cdaa3f2afa6b33345b1dec5c0acccbbefa1e6cf Mon Sep 17 00:00:00 2001 From: Derek <mg.wang.now@gmail.com> Date: Sat, 23 Nov 2024 15:03:46 +0800 Subject: [PATCH 587/740] fix(cnki): deprecate author articles with `:code`, now use `:name` and `:company` instead (#17682) * router: fix author * format * Update lib/routes/cnki/author.ts * update --------- --- lib/routes/cnki/author.ts | 168 +++++++++++++++++++++++++++----------- lib/routes/cnki/utils.ts | 8 +- 2 files changed, 124 insertions(+), 52 deletions(-) diff --git a/lib/routes/cnki/author.ts b/lib/routes/cnki/author.ts index b3391d60acde9d4..8bcbd5e46cb5331 100644 --- a/lib/routes/cnki/author.ts +++ b/lib/routes/cnki/author.ts @@ -1,16 +1,16 @@ 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 { ProcessItem } from './utils'; -const rootUrl = 'https://kns.cnki.net'; - export const route: Route = { - path: '/author/:code', + name: '作者', + maintainers: ['Derekmini', 'harveyqiu'], categories: ['journal'], - example: '/cnki/author/000042423923', - parameters: { code: '作者对应code,可以在网址中得到' }, + path: '/author/:name/:company', + parameters: { name: '作者姓名', company: '作者单位' }, features: { requireConfig: false, requirePuppeteer: false, @@ -19,62 +19,134 @@ export const route: Route = { supportPodcast: false, supportScihub: false, }, - name: '作者期刊文献', + example: '/cnki/author/丁晓东/中国人民大学', description: `:::tip 可能仅限中国大陆服务器访问,以实际情况为准。 :::`, - maintainers: ['harveyqiu', 'Derekmini'], handler, }; async function handler(ctx) { - const code = ctx.req.param('code'); + const name = ctx.req.param('name'); + const company = ctx.req.param('company'); + const host = 'https://kns.cnki.net'; + const link = `${host}/kns8s/AdvSearch?classid=WD0FTY92`; - const authorInfoUrl = `${rootUrl}/kcms/detail/knetsearch.aspx?sfield=au&code=${code}`; - const res = await got(authorInfoUrl); - const $ = load(res.data); - const authorName = $('#showname').text(); - const companyName = $('body > div.wrapper > div.main > div.container.full-screen > div > div:nth-child(3) > h3:nth-child(2) > span > a').text(); + const params = new URLSearchParams(); + params.append('boolSearch', 'true'); + params.append( + 'QueryJson', + JSON.stringify({ + Platform: '', + Resource: 'CROSSDB', + Classid: 'WD0FTY92', + Products: '', + QNode: { + QGroup: [ + { + Key: 'Subject', + Title: '', + Logic: 0, + Items: [], + ChildItems: [ + { + Key: 'input[data-tipid=gradetxt-1]', + Title: '作者', + Logic: 0, + Items: [ + { + Key: 'input[data-tipid=gradetxt-1]', + Title: '作者', + Logic: 0, + Field: 'AU', + Operator: 'DEFAULT', + Value: name, + Value2: '', + }, + ], + ChildItems: [], + }, + { + Key: 'input[data-tipid=gradetxt-2]', + Title: '作者单位', + Logic: 0, + Items: [ + { + Key: 'input[data-tipid=gradetxt-2]', + Title: '作者单位', + Logic: 0, + Field: 'AF', + Operator: 'FUZZY', + Value: company, + Value2: '', + }, + ], + ChildItems: [], + }, + ], + }, + { + Key: 'ControlGroup', + Title: '', + Logic: 0, + Items: [], + ChildItems: [], + }, + ], + }, + ExScope: '0', + SearchType: 3, + Rlang: 'CHINESE', + KuaKuCode: 'YSTT4HG0,LSTPFY1C,JUP3MUPD,MPMFIG1A,EMRPGLPA,WQ0UVIAA,BLZOG7CK,PWFIRAGL,NN3FJMUV,NLBO1Z6R', + }) + ); + params.append('pageNum', '1'); + params.append('pageSize', '20'); + params.append('sortField', 'PT'); + params.append('sortType', 'desc'); + params.append('dstyle', 'listmode'); + params.append('productStr', 'YSTT4HG0,LSTPFY1C,RMJLXHZ3,JQIRZIYA,JUP3MUPD,1UR4K4HZ,BPBAFJ5S,R79MZMCB,MPMFIG1A,EMRPGLPA,J708GVCE,ML4DRIDX,WQ0UVIAA,NB3BWEHK,XVLO76FD,HR1YT1Z9,BLZOG7CK,PWFIRAGL,NN3FJMUV,NLBO1Z6R,'); + params.append('aside', `(作者:${name}(精确))AND(作者单位:${company}(模糊))`); + params.append('searchFrom', '资源范围:总库; 时间范围:更新时间:不限;'); + params.append('CurPage', '1'); - const res2 = await got(`${rootUrl}/kns8/Detail`, { - searchParams: { - sdb: 'CAPJ', - sfield: '作者', - skey: authorName, - scode: code, - acode: code, + const response = await ofetch(`${host}/kns8s/brief/grid`, { + method: 'POST', + headers: { + 'content-type': 'application/x-www-form-urlencoded;charset=utf-8', + referer: `${host}/kns8s/AdvSearch?classid=WD0FTY92`, }, - followRedirect: false, - }); - const authorPageUrl = res2.headers.location; - - const regex = /v=([^&]+)/; - const code2 = authorPageUrl.match(regex)[1]; - - const url = `${rootUrl}/restapi/knowledge-api/v1/experts/relations/resources?v=${code2}&sequence=PT&size=10&sort=desc&start=1&resource=CJFD`; - - const res3 = await got(url, { headers: { Referer: authorPageUrl } }); - const publications = res3.data.data.data; - - const list = publications.map((publication) => { - const metadata = publication.metadata; - const { value: title = '' } = metadata.find((md) => md.name === 'TI') || {}; - const { value: date = '' } = metadata.find((md) => md.name === 'PT') || {}; - const { value: filename = '' } = metadata.find((md) => md.name === 'FN') || {}; - - return { - title, - link: `https://cnki.net/kcms/detail/detail.aspx?filename=${filename}&dbcode=CJFD`, - author: authorName, - pubDate: date, - }; + body: params.toString(), }); + const $ = load(response); + const list = $('tr') + .toArray() + .slice(1) + .map((item) => { + const title = $(item).find('a.fz14').text(); + const filename = $(item).find('a.icon-collect').attr('data-filename'); + const link = `https://cnki.net/kcms/detail/detail.aspx?filename=${filename}&dbcode=CJFD`; + const pubDate = parseDate($(item).find('td.date').text(), 'YYYY-MM-DD'); + return { + title, + link, + pubDate, + }; + }); const items = await Promise.all(list.map((item) => cache.tryGet(item.link, () => ProcessItem(item)))); + const processedItems = items + .filter((item): item is Record<string, any> => item !== null && typeof item === 'object') + .map((item) => ({ + title: item.title || '', + link: item.link, + pubDate: item.pubDate, + })); + return { - title: `知网 ${authorName} ${companyName}`, - link: authorInfoUrl, - item: items, + title: `知网 ${name} ${company}`, + link, + item: processedItems, }; } diff --git a/lib/routes/cnki/utils.ts b/lib/routes/cnki/utils.ts index 5b3f044d557da95..62c6df3a9bf4df4 100644 --- a/lib/routes/cnki/utils.ts +++ b/lib/routes/cnki/utils.ts @@ -11,12 +11,12 @@ const ProcessItem = async (item) => { 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(), }); From 3db53f5d5f6b2cafa55b76c1c33538ca7903b994 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Sat, 23 Nov 2024 09:56:56 -0800 Subject: [PATCH 588/740] chore: remove thunder client from devcontainer and gitpod configurations (#17692) --- .devcontainer/devcontainer.json | 2 +- .gitpod.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5a3ccf02dd99ffa..77026d75ece61fb 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -16,9 +16,9 @@ "EditorConfig.EditorConfig", "esbenp.prettier-vscode", "deepscan.vscode-deepscan", - "rangav.vscode-thunder-client", "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 0afafdad37c9c32..0ee2c93f22e2c0a 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -32,7 +32,7 @@ vscode: - EditorConfig.EditorConfig - esbenp.prettier-vscode - deepscan.vscode-deepscan - - rangav.vscode-thunder-client - sonarsource.sonarlint-vscode + # - VASubasRaj.flashpost not available on Open VSX, Thunder Client is paywalled in WSL/Codespaces/SSH > 2.30.0 - unifiedjs.vscode-mdx # - ZihanLi.at-helper not available on Open VSX From 0ea051c2fed803387fb5781ad7d34c9bdbb53f4b Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Sun, 24 Nov 2024 18:25:04 +0800 Subject: [PATCH 589/740] =?UTF-8?q?feat(dockerhub):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=20DockerHub=20=E4=BB=93=E5=BA=93=E8=B7=AF=E7=94=B1=20(#17691)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(dockerhub): 添加 DockerHub 仓库路由 - 新增 DockerHub 仓库路由,支持获取指定用户的仓库列表 - 支持分页获取仓库信息,默认每页10条记录 * feat(dockerhub): add description for DockerHub repositories route - 添加 DockerHub 仓库路由的描述信息 * refactor(dockerhub): 优化 DockerHub 仓库路由配置 - 修改路由名称和示例路径以提高可读性 - 将 owner 参数转换为小写以确保一致性 - 从查询参数中解析 limit 并设置默认值为 10 --- lib/routes/dockerhub/repositories.ts | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 lib/routes/dockerhub/repositories.ts diff --git a/lib/routes/dockerhub/repositories.ts b/lib/routes/dockerhub/repositories.ts new file mode 100644 index 000000000000000..dbdf3093c60dac5 --- /dev/null +++ b/lib/routes/dockerhub/repositories.ts @@ -0,0 +1,42 @@ +import { Route, ViewType } from '@/types'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; +import { Context } from 'hono'; + +export const route: Route = { + name: 'Owner Repositories', + description: 'List of repositories for an image owner', + maintainers: ['CaoMeiYouRen'], + path: '/repositories/:owner', + categories: ['program-update'], + view: ViewType.Notifications, + example: '/dockerhub/repositories/diygod', + parameters: { owner: 'Image owner' }, + handler, +}; + +async function handler(ctx: Context) { + const owner = ctx.req.param('owner').toLowerCase(); + const limit = Number.parseInt(ctx.req.query('limit') || '10'); + const link = `https://hub.docker.com/r/${owner}`; + const url = `https://hub.docker.com/v2/repositories/${owner}`; + const response = await got(url, { + searchParams: { + page_size: limit, + }, + }); + const item = response.data.results.map((repo) => ({ + title: repo.name, + description: `${repo.description}<br>status: ${repo.status_description}<br>stars: ${repo.star_count}<br>pulls: ${repo.pull_count}`, + link: `https://hub.docker.com/r/${owner}/${repo.name}`, + author: owner, + pubDate: parseDate(repo.last_updated), + guid: `${owner}/${repo.name}`, + })); + return { + title: `${owner} repositories`, + description: `List of repositories for ${owner}`, + link, + item, + }; +} From a9f4b384b9a42ad019bed535e060cd88ba6135e4 Mon Sep 17 00:00:00 2001 From: dddaniel1 <61337842+dddaniel1@users.noreply.github.com> Date: Sun, 24 Nov 2024 19:05:35 +0800 Subject: [PATCH 590/740] fix(route) ikea/cn/low-price (#17697) --- lib/routes/ikea/cn/low-price.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/ikea/cn/low-price.ts b/lib/routes/ikea/cn/low-price.ts index d1c5d1a56d71df7..994466f348258a1 100644 --- a/lib/routes/ikea/cn/low-price.ts +++ b/lib/routes/ikea/cn/low-price.ts @@ -32,7 +32,7 @@ async function handler() { headers: generateRequestHeaders(), searchParams: { processOutOfStock: 'SORT', - groupId: 'cms_低价好物_cms-商品列表-_0', + groupId: 'cms_product_cn--zh--8b08af400ac511ec909ec36c6e99b004_0_0', page: 1, size: 200, }, @@ -42,6 +42,7 @@ async function handler() { title: 'IKEA 宜家 - 低价优选', link: 'https://www.ikea.cn/cn/zh/campaigns/wo3-men2-de-chao1-zhi2-di1-jia4-pub8b08af40', description: '低价优选', + allowEmpty: true, item: response.data.products.map((element) => generateProductItem(element)), }; } From 334a197179e777f8f11d542c8bfc6c90fa78e710 Mon Sep 17 00:00:00 2001 From: Harvey Qiu <qiushimao@hotmail.com> Date: Sun, 24 Nov 2024 22:42:53 +0800 Subject: [PATCH 591/740] fix: fix dataguidance news feed (#17695) * update dataguidance feed * fix link * Apply suggestions from code review --------- --- lib/routes/dataguidance/index.ts | 49 +++++++++++++------------------- 1 file changed, 19 insertions(+), 30 deletions(-) diff --git a/lib/routes/dataguidance/index.ts b/lib/routes/dataguidance/index.ts index 3529706f465d88b..74a40c31f5d1cd5 100644 --- a/lib/routes/dataguidance/index.ts +++ b/lib/routes/dataguidance/index.ts @@ -1,7 +1,7 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; -import got from '@/utils/got'; -import { load } from 'cheerio'; +import ofetch from '@/utils/ofetch'; + import { parseDate } from '@/utils/parse-date'; export const route: Route = { @@ -10,49 +10,38 @@ export const route: Route = { path: '/news', radar: [ { - source: ['dataguidance.com/search/news'], + source: ['www.dataguidance.com/info'], }, ], maintainers: ['harveyqiu'], handler, - url: 'dataguidance.com/news', + url: 'https://www.dataguidance.com/info?article_type=news_post', }; async function handler() { const rootUrl = 'https://www.dataguidance.com'; - const currentUrl = `${rootUrl}/search/news/`; - - const response = await got({ - method: 'get', - url: currentUrl, - }); - - const $ = load(response.data); + const url = 'https://dgcb20-ca-northeurope-dglive.yellowground-c1f17366.northeurope.azurecontainerapps.io/api/v1/content/articles?order=DESC_publishedOn&limit=25&article_types=news_post'; - let items = $('.field-name-title') - .toArray() - .map((item) => { - item = $(item); - const a = item.find('a').first(); + const response = await ofetch(url); - return { - title: a.text(), - link: `${rootUrl}${a.attr('href')}`, - }; - }); + const data = response.data; + let items = data.map((item) => ({ + title: item.title.en, + link: `${rootUrl}${item.url}`, + url: item.url, + pubDate: parseDate(item.publishedOn), + })); + const baseUrl = 'https://dgcb20-ca-northeurope-dglive.yellowground-c1f17366.northeurope.azurecontainerapps.io/api/v1/content/articles/by_path?path='; items = await Promise.all( items.map((item) => cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); + const detailUrl = `${baseUrl}${item.url}`; - const content = load(detailResponse.data); - item.pubDate = parseDate(content('.field-name-post-date').text()); - item.description = content('.field-name-body').html(); + const detailResponse = await ofetch(detailUrl); + item.description = detailResponse.contentBody?.html.en.replaceAll('\n', '<br>'); + delete item.url; return item; }) ) @@ -60,7 +49,7 @@ async function handler() { return { title: 'Data Guidance News', - link: currentUrl, + link: 'https://www.dataguidance.com/info?article_type=news_post', item: items, }; } From ab5b9677ea7fa20199d9984fb7c923181b465f62 Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Mon, 25 Nov 2024 01:38:33 +0800 Subject: [PATCH 592/740] fix(route/kcna): Remove juche date parsing (#17694) * fix(route/kcna): Remove juche date parsing * Update news.ts * Update news.ts * Update news.ts --- lib/routes/kcna/news.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/routes/kcna/news.ts b/lib/routes/kcna/news.ts index 66bc4493974e796..53aa7edb78fbe43 100644 --- a/lib/routes/kcna/news.ts +++ b/lib/routes/kcna/news.ts @@ -7,9 +7,11 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import asyncPool from 'tiny-async-pool'; import { art } from '@/utils/render'; -import { parseJucheDate, fixDesc, fetchPhoto, fetchVideo } from './utils'; +import { fixDesc, fetchPhoto, fetchVideo } from './utils'; import path from 'node:path'; import sanitizeHtml from 'sanitize-html'; +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; export const route: Route = { path: '/:lang/:category?', @@ -66,12 +68,12 @@ async function handler(ctx) { .map((_, item) => { item = $(item); const dateElem = item.find('.publish-time'); - const dateString = dateElem.text(); + const dateString = dateElem.text().match(/\d+\.\d+\.\d+/); dateElem.remove(); return { title: item.text(), link: rootUrl + item.attr('href'), - pubDate: parseJucheDate(dateString), + pubDate: timezone(parseDate(dateString[0]), +9), }; }) .get(); @@ -87,9 +89,9 @@ async function handler(ctx) { item.title = $('article-main-title').text() || item.title; const dateElem = $('.publish-time'); - const dateString = dateElem.text(); + const dateString = dateElem.text().match(/\d+\.\d+\.\d+/); dateElem.remove(); - item.pubDate = parseJucheDate(dateString) || item.pubDate; + item.pubDate = dateString ? timezone(parseDate(dateString[0]), +9) : item.pubDate; const description = fixDesc($, $('.article-content-body .content-wrapper')); From eb3c9b810a5a9683afc04fa1fbea69dc73185f39 Mon Sep 17 00:00:00 2001 From: Derek <mg.wang.now@gmail.com> Date: Mon, 25 Nov 2024 10:53:24 +0800 Subject: [PATCH 593/740] fix(ieee): Restore author.ts (#17688) * fix(ieee): Restore author.ts * change function * I have addressed and implemented all suggestions and recommendations. * docs * Update lib/routes/ieee/author.ts --- lib/router.js | 3 - lib/routes-deprecated/ieee/author.js | 30 --------- lib/routes/ieee/author.ts | 95 ++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 33 deletions(-) delete mode 100644 lib/routes-deprecated/ieee/author.js create mode 100644 lib/routes/ieee/author.ts diff --git a/lib/router.js b/lib/router.js index 0e19dd05f23e2c6..d97f9b49a78c848 100644 --- a/lib/router.js +++ b/lib/router.js @@ -874,9 +874,6 @@ router.get('/guet/xwzx/:type?', lazyloadRouteHandler('./routes/guet/news')); // はてな匿名ダイアリー router.get('/hatena/anonymous_diary/archive', lazyloadRouteHandler('./routes/hatena/anonymous_diary/archive')); -// IEEE Xplore [Sci Journal] -router.get('/ieee/author/:aid/:sortType/:count?', lazyloadRouteHandler('./routes/ieee/author')); - // PNAS [Sci Journal] // router.get('/pnas/:topic?', lazyloadRouteHandler('./routes/pnas/index')); diff --git a/lib/routes-deprecated/ieee/author.js b/lib/routes-deprecated/ieee/author.js deleted file mode 100644 index cb2653005083402..000000000000000 --- a/lib/routes-deprecated/ieee/author.js +++ /dev/null @@ -1,30 +0,0 @@ -const got = require('@/utils/got'); - -module.exports = async (ctx) => { - const { aid, sortType, count = 10 } = ctx.params; - - const response = await got(`https://ieeexplore.ieee.org/rest/author/${aid}`); - const author = response.data[0]; - - const { data: papers } = await got.post('https://ieeexplore.ieee.org/rest/search', { - json: { - rowsPerPage: count, - searchWithin: [`"Author Ids": ${aid}`], - sortType, - }, - }); - - ctx.state.data = { - title: `${author.preferredName} on IEEE Xplore`, - link: `https://ieeexplore.ieee.org/author/${aid}`, - description: author.bioParagraphs.join('<br/>'), - item: papers.records.map((item) => ({ - title: item.articleTitle, - author: item.authors.map((author) => author.preferredName).join(', '), - category: item.articleContentType, - description: item.abstract, - pubDate: item.publicationDate, - link: `https://ieeexplore.ieee.org${item.documentLink}`, - })), - }; -}; diff --git a/lib/routes/ieee/author.ts b/lib/routes/ieee/author.ts new file mode 100644 index 000000000000000..78f1a8001bee693 --- /dev/null +++ b/lib/routes/ieee/author.ts @@ -0,0 +1,95 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +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', + maintainers: ['Derekmini'], + categories: ['journal'], + path: '/author/:aid/:sortType', + parameters: { + aid: 'Author ID', + sortType: 'Sort Type of papers', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: true, + }, + example: '/ieee/author/37264968900/newest', + handler, +}; + +async function handler(ctx) { + const { aid, sortType } = ctx.req.param(); + const count = ctx.req.query('limit') || 10; + const host = 'https://ieeexplore.ieee.org'; + + const res = await ofetch(`${host}/rest/author/${aid}`); + const author = res[0]; + const title = `${author.preferredName} on IEEE Xplore`; + const link = `${host}/author/${aid}`; + const description = author.bioParagraphs.join(' '); + const image = `${host}${author.photoUrl}`; + + const response = await ofetch(`${host}/rest/search`, { + method: 'POST', + body: { + rowsPerPage: count, + searchWithin: [`"Author Ids": ${aid}`], + sortType, + }, + }); + + const list = response.records.map((item) => ({ + title: item.articleTitle, + link: item.htmlLink, + doi: item.doi, + authors: 'authors' in item ? item.authors.map((itemAuth) => itemAuth.preferredName).join('; ') : 'Do not have author', + abstract: 'abstract' in item ? item.abstract : '', + })); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + if (item.abstract !== '') { + const res = await ofetch(`${host}${item.link}`, { + parseResponse: (txt) => txt, + }); + const $ = load(res); + const metadataMatch = $.html().match(/metadata=(.*);/); + const metadata = metadataMatch ? JSON.parse(metadataMatch[1]) : null; + item.pubDate = metadata?.insertDate ? parseDate(metadata.insertDate) : undefined; + item.abstract = load(metadata?.abstract || '').text(); + } + return { + ...item, + description: renderDescription(item), + }; + }) + ) + ); + + return { + title, + link, + description, + item: items, + image, + }; +} + +function renderDescription(item: { title: string; authors: string; abstract: string; doi: string }) { + return art(path.join(__dirname, 'templates/description.art'), { + item, + }); +} From 5f5eb88b7b8ec33147dbdb6913079cb044c7b20d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:44:12 +0000 Subject: [PATCH 594/740] chore(deps-dev): bump got from 14.4.4 to 14.4.5 (#17700) Bumps [got](https://github.com/sindresorhus/got) from 14.4.4 to 14.4.5. - [Release notes](https://github.com/sindresorhus/got/releases) - [Commits](https://github.com/sindresorhus/got/compare/v14.4.4...v14.4.5) --- updated-dependencies: - dependency-name: got dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 ab6773b9f02724b..d5eaae1b7189982 100644 --- a/package.json +++ b/package.json @@ -181,7 +181,7 @@ "eslint-plugin-yml": "1.15.0", "fs-extra": "11.2.0", "globals": "15.12.0", - "got": "14.4.4", + "got": "14.4.5", "husky": "9.1.7", "js-beautify": "1.15.1", "lint-staged": "15.2.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 20e62ae0dd6095c..3c62c675dc7304c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -404,8 +404,8 @@ importers: specifier: 15.12.0 version: 15.12.0 got: - specifier: 14.4.4 - version: 14.4.4 + specifier: 14.4.5 + version: 14.4.5 husky: specifier: 9.1.7 version: 9.1.7 @@ -3396,8 +3396,8 @@ packages: resolution: {integrity: sha512-mThBblvlAF1d4O5oqyvN+ZxLAYwIJK7bpMxgYqPD9okW0C3qm5FFn7k811QrcuEBwaogR3ngOFoCfs6mRv7teQ==} engines: {node: '>=14.16'} - got@14.4.4: - resolution: {integrity: sha512-tqiF7eSgTBwQkxb1LxsEpva8TaMYVisbhplrFVmw9GQE3855Z+MH/mnsXLLOkDxR6hZJRFMj5VTAZ8lmTF8ZOA==} + got@14.4.5: + resolution: {integrity: sha512-sq+uET8TnNKRNnjEOPJzMcxeI0irT8BBNmf+GtZcJpmhYsQM1DSKmCROUjPWKsXZ5HzwD5Cf5/RV+QD9BSTxJg==} engines: {node: '>=20'} graceful-fs@4.2.11: @@ -9117,7 +9117,7 @@ snapshots: p-cancelable: 3.0.0 responselike: 3.0.0 - got@14.4.4: + got@14.4.5: dependencies: '@sindresorhus/is': 7.0.1 '@szmarczak/http-timer': 5.0.1 From a5e3eb6ad3f6b10b0f0274ce73a075edab1686e2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:45:59 +0000 Subject: [PATCH 595/740] chore(deps-dev): bump @types/node from 22.9.1 to 22.9.3 (#17702) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.9.1 to 22.9.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-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 d5eaae1b7189982..2d71f680fb869d1 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.9.1", + "@types/node": "22.9.3", "@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 3c62c675dc7304c..da5f4b38f6fecbe 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.9.1 - version: 22.9.1 + specifier: 22.9.3 + version: 22.9.3 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -372,7 +372,7 @@ importers: version: 0.27.6 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.9.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.9.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.107 version: 0.37.107 @@ -441,10 +441,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.3 - version: 5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.1)) + version: 5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.3)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.9.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.9.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1941,8 +1941,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.9.1': - resolution: {integrity: sha512-p8Yy/8sw1caA8CdRIQBG5tiLHmxtQKObCijiAa9Ez+d4+PRffM4054xbju0msf+cvhJpnFEeNjxmVT/0ipktrg==} + '@types/node@22.9.3': + resolution: {integrity: sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6836,7 +6836,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.9.1 + '@types/node': 22.9.3 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7320,12 +7320,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.9.1 + '@types/node': 22.9.3 '@types/html-to-text@9.0.4': {} @@ -7333,13 +7333,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7349,7 +7349,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 '@types/jsrsasign@10.5.13': {} @@ -7359,7 +7359,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7381,14 +7381,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 form-data: 4.0.1 - '@types/node@22.9.1': + '@types/node@22.9.3': dependencies: undici-types: 6.19.8 @@ -7402,7 +7402,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.9.1 + '@types/node': 22.9.3 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7416,7 +7416,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.9.1 + '@types/node': 22.9.3 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7440,7 +7440,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 optional: true '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': @@ -7588,7 +7588,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.9.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.9.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7602,7 +7602,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.9.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.9.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10499,7 +10499,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.9.1 + '@types/node': 22.9.3 long: 5.2.3 proxy-agent@6.4.0: @@ -11424,13 +11424,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.9.1): + vite-node@2.0.5(@types/node@22.9.3): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.9.1) + vite: 5.4.10(@types/node@22.9.3) transitivePeerDependencies: - '@types/node' - less @@ -11442,27 +11442,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.1)): + vite-tsconfig-paths@5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.3)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.10(@types/node@22.9.1) + vite: 5.4.10(@types/node@22.9.3) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.9.1): + vite@5.4.10(@types/node@22.9.3): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.4 optionalDependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.9.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.9.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11480,11 +11480,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.9.1) - vite-node: 2.0.5(@types/node@22.9.1) + vite: 5.4.10(@types/node@22.9.3) + vite-node: 2.0.5(@types/node@22.9.3) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.9.1 + '@types/node': 22.9.3 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From ebbc4b08454b2bde872a8af7ebdd4e33ab305c4d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:46:24 +0000 Subject: [PATCH 596/740] chore(deps): bump tldts from 6.1.63 to 6.1.64 (#17704) Bumps [tldts](https://github.com/remusao/tldts) from 6.1.63 to 6.1.64. - [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.63...v6.1.64) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 2d71f680fb869d1..ed0e034929537da 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "telegram": "2.26.8", "tiny-async-pool": "2.1.0", "title": "4.0.1", - "tldts": "6.1.63", + "tldts": "6.1.64", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da5f4b38f6fecbe..bb22352165e4033 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.63 - version: 6.1.63 + specifier: 6.1.64 + version: 6.1.64 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5273,11 +5273,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.63: - resolution: {integrity: sha512-H1XCt54xY+QPbwhTgmxLkepX0MVHu3USfMmejiCOdkMbRcP22Pn2FVF127r/GWXVDmXTRezyF3Ckvhn4Fs6j7Q==} + tldts-core@6.1.64: + resolution: {integrity: sha512-uqnl8vGV16KsyflHOzqrYjjArjfXaU6rMPXYy2/ZWoRKCkXtghgB4VwTDXUG+t0OTGeSewNAG31/x1gCTfLt+Q==} - tldts@6.1.63: - resolution: {integrity: sha512-YWwhsjyn9sB/1rOkSRYxvkN/wl5LFM1QDv6F2pVR+pb/jFne4EOBxHfkKVWvDIBEAw9iGOwwubHtQTm0WRT5sQ==} + tldts@6.1.64: + resolution: {integrity: sha512-ph4AE5BXWIOsSy9stpoeo7bYe/Cy7VfpciIH4RhVZUPItCJmhqWCN0EVzxd8BOHiyNb42vuJc6NWTjJkg91Tuw==} hasBin: true tmp@0.0.33: @@ -11191,11 +11191,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.63: {} + tldts-core@6.1.64: {} - tldts@6.1.63: + tldts@6.1.64: dependencies: - tldts-core: 6.1.63 + tldts-core: 6.1.64 tmp@0.0.33: dependencies: @@ -11231,7 +11231,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.63 + tldts: 6.1.64 tr46@0.0.3: {} From 92475ce622c0816a36997baf49df101f7ed8753f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:46:37 +0000 Subject: [PATCH 597/740] chore(deps): bump @scalar/hono-api-reference from 0.5.160 to 0.5.161 (#17706) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.160 to 0.5.161. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 ed0e034929537da..51f5477ac2e177a 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.23", - "@scalar/hono-api-reference": "0.5.160", + "@scalar/hono-api-reference": "0.5.161", "@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 bb22352165e4033..3ea22c6baf81fd1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,8 +58,8 @@ importers: specifier: 0.0.23 version: 0.0.23 '@scalar/hono-api-reference': - specifier: 0.5.160 - version: 0.5.160(hono@4.6.11) + specifier: 0.5.161 + version: 0.5.161(hono@4.6.11) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1773,8 +1773,8 @@ packages: '@rss3/sdk@0.0.23': resolution: {integrity: sha512-1cF1AqLU0k6dMwqQ5Fch3rOAbh4UXJ4UZLtOwzp/RWyGoCvu3lUOUIdJF41omunuH/JJSP2z6rJTPj4S6a60eg==} - '@scalar/hono-api-reference@0.5.160': - resolution: {integrity: sha512-3NXXh4B+5sa9QEchtQNKH0me4pEB8soFfCSqOxsuB0d8agokDO574cP9Qq4l6vwSh6FMiqSdaGTv5459g8hTCg==} + '@scalar/hono-api-reference@0.5.161': + resolution: {integrity: sha512-n30VVZrl9z/IcRbyNZZLGx4RMUUH1Zk12ryR1zPG/tdkzNG7ODP6D+rhasn5cSaCg/0BvdCcHEaANEwVJUEjqw==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -1783,8 +1783,8 @@ packages: resolution: {integrity: sha512-6geH9ehvQ/sG/xUyy3e0lyOw3BaY5s6nn22wHjEJhcobdmWyFER0O6m7AU0ZN4QTjle/gYvFJOjj552l/rsNSw==} engines: {node: '>=18'} - '@scalar/types@0.0.20': - resolution: {integrity: sha512-Sx7tqiuV9ZNp2XpIXKD/srzTjjb4I6aof0Y7+U5MgEuKPwrRnYS/BaocdNgWLnpCZisBIg5qp4YSqozxibabVg==} + '@scalar/types@0.0.21': + resolution: {integrity: sha512-HR8KeV5zjdVDQdfs7ONhpIRbAzrMS1KIu2sbNgVXtFSaj+1/6WN5gM/yY1DKoaC3oyvpqwd/HyL9rLTqrOkrRw==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7216,14 +7216,14 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.160(hono@4.6.11)': + '@scalar/hono-api-reference@0.5.161(hono@4.6.11)': dependencies: - '@scalar/types': 0.0.20 + '@scalar/types': 0.0.21 hono: 4.6.11 '@scalar/openapi-types@0.1.5': {} - '@scalar/types@0.0.20': + '@scalar/types@0.0.21': dependencies: '@scalar/openapi-types': 0.1.5 '@unhead/schema': 1.11.11 From d17b40b53931892fcdf986a1e14e67759f7ed558 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 08:58:21 +0000 Subject: [PATCH 598/740] chore(deps): bump hono from 4.6.11 to 4.6.12 (#17705) Bumps [hono](https://github.com/honojs/hono) from 4.6.11 to 4.6.12. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.11...v4.6.12) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 51f5477ac2e177a..c560d7fd6543930 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.11", + "hono": "4.6.12", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3ea22c6baf81fd1..87cbc4dc32ddfb1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -23,10 +23,10 @@ importers: version: 4.1.1 '@hono/node-server': specifier: 1.13.7 - version: 1.13.7(hono@4.6.11) + version: 1.13.7(hono@4.6.12) '@hono/zod-openapi': specifier: 0.18.0 - version: 0.18.0(hono@4.6.11)(zod@3.23.8) + version: 0.18.0(hono@4.6.12)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -59,7 +59,7 @@ importers: version: 0.0.23 '@scalar/hono-api-reference': specifier: 0.5.161 - version: 0.5.161(hono@4.6.11) + version: 0.5.161(hono@4.6.12) '@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.11 - version: 4.6.11 + specifier: 4.6.12 + version: 4.6.12 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3455,8 +3455,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.11: - resolution: {integrity: sha512-f0LwJQFKdUUrCUAVowxSvNCjyzI7ZLt8XWYU/EApyeq5FfOvHFarBaE5rjU9HTNFk4RI0FkdB2edb3p/7xZjzQ==} + hono@4.6.12: + resolution: {integrity: sha512-eHtf4kSDNw6VVrdbd5IQi16r22m3s7mWPLd7xOMhg1a/Yyb1A0qpUFq8xYMX4FMuDe1nTKeMX5rTx7Nmw+a+Ag==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6782,20 +6782,20 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.7(hono@4.6.11)': + '@hono/node-server@1.13.7(hono@4.6.12)': dependencies: - hono: 4.6.11 + hono: 4.6.12 - '@hono/zod-openapi@0.18.0(hono@4.6.11)(zod@3.23.8)': + '@hono/zod-openapi@0.18.0(hono@4.6.12)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.4.1(hono@4.6.11)(zod@3.23.8) - hono: 4.6.11 + '@hono/zod-validator': 0.4.1(hono@4.6.12)(zod@3.23.8) + hono: 4.6.12 zod: 3.23.8 - '@hono/zod-validator@0.4.1(hono@4.6.11)(zod@3.23.8)': + '@hono/zod-validator@0.4.1(hono@4.6.12)(zod@3.23.8)': dependencies: - hono: 4.6.11 + hono: 4.6.12 zod: 3.23.8 '@humanfs/core@0.19.1': {} @@ -7216,10 +7216,10 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.161(hono@4.6.11)': + '@scalar/hono-api-reference@0.5.161(hono@4.6.12)': dependencies: '@scalar/types': 0.0.21 - hono: 4.6.11 + hono: 4.6.12 '@scalar/openapi-types@0.1.5': {} @@ -9172,7 +9172,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.11: {} + hono@4.6.12: {} hookable@5.5.3: {} From c0c0d11c5ab24f71287daa7835035e9caf66d9f7 Mon Sep 17 00:00:00 2001 From: Keo <keocheung@outlook.com> Date: Tue, 26 Nov 2024 01:27:51 +0800 Subject: [PATCH 599/740] =?UTF-8?q?feat(route/pixiv):=20add=20more=20preci?= =?UTF-8?q?se=20datetime=20and=20author=20name=20for=20NSFW=E2=80=A6=20(#1?= =?UTF-8?q?7698)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route/pixiv): add more precise datetime and author name for NSFW novels * refactor code * add maintainer * update types * refactor code * fix!: revert #17667 This reduce the no. of HTTP requests by half. HTTP requests should be spent on fetching the most essential data like title and description. Doubling the no. of HTTP requests to serve one minor property is not elegant. --------- --- lib/routes/pixiv/novel-api/content/common.ts | 12 ---- lib/routes/pixiv/novel-api/content/nsfw.ts | 5 -- lib/routes/pixiv/novel-api/content/sfw.ts | 5 -- lib/routes/pixiv/novel-api/content/types.ts | 2 - lib/routes/pixiv/novel-api/series/nsfw.ts | 63 ++++++++++--------- lib/routes/pixiv/novel-api/series/sfw.ts | 2 +- lib/routes/pixiv/novel-api/series/types.ts | 26 ++++++++ .../pixiv/novel-api/user-novels/nsfw.ts | 4 +- lib/routes/pixiv/novel-api/user-novels/sfw.ts | 4 +- lib/routes/pixiv/novel-series.ts | 2 +- 10 files changed, 63 insertions(+), 62 deletions(-) delete mode 100644 lib/routes/pixiv/novel-api/content/common.ts diff --git a/lib/routes/pixiv/novel-api/content/common.ts b/lib/routes/pixiv/novel-api/content/common.ts deleted file mode 100644 index af536fed34af583..000000000000000 --- a/lib/routes/pixiv/novel-api/content/common.ts +++ /dev/null @@ -1,12 +0,0 @@ -import cache from '@/utils/cache'; -import got from '@/utils/got'; -import { load } from 'cheerio'; - -export async function getNovelLanguage(novelId: string): Promise<string> { - return (await cache.tryGet(`https://www.pixiv.net/novel/show.php?id=${novelId}`, async () => { - const rsp = await got(`https://www.pixiv.net/novel/show.php?id=${novelId}`); - const $ = load(rsp.data); - const data = JSON.parse($('#meta-preload-data').attr('content')); - return data?.novel[novelId].language; - })) as string; -} diff --git a/lib/routes/pixiv/novel-api/content/nsfw.ts b/lib/routes/pixiv/novel-api/content/nsfw.ts index 68a85c5558f9ae7..86eab24e670f0fd 100644 --- a/lib/routes/pixiv/novel-api/content/nsfw.ts +++ b/lib/routes/pixiv/novel-api/content/nsfw.ts @@ -6,7 +6,6 @@ import queryString from 'query-string'; import { parseNovelContent } from './utils'; import type { NovelContent, NSFWNovelDetail } from './types'; import { parseDate } from '@/utils/parse-date'; -import { getNovelLanguage } from './common'; export async function getNSFWNovelContent(novelId: string, token: string): Promise<NovelContent> { return (await cache.tryGet(`https://app-api.pixiv.net/webview/v2/novel:${novelId}`, async () => { @@ -44,8 +43,6 @@ export async function getNSFWNovelContent(novelId: string, token: string): Promi const parsedContent = await parseNovelContent(novelDetail.text, images, token); - const language = await getNovelLanguage(novelId); - return { id: novelDetail.id, title: novelDetail.title, @@ -71,8 +68,6 @@ export async function getNSFWNovelContent(novelId: string, token: string): Promi seriesId: novelDetail.seriesId || null, seriesTitle: novelDetail.seriesTitle || null, - - language, }; })) as NovelContent; } diff --git a/lib/routes/pixiv/novel-api/content/sfw.ts b/lib/routes/pixiv/novel-api/content/sfw.ts index 704ae746b221a07..c58d2489d9a4e73 100644 --- a/lib/routes/pixiv/novel-api/content/sfw.ts +++ b/lib/routes/pixiv/novel-api/content/sfw.ts @@ -4,7 +4,6 @@ import pixivUtils from '../../utils'; import { parseNovelContent } from './utils'; import { NovelContent, SFWNovelDetail } from './types'; import { parseDate } from '@/utils/parse-date'; -import { getNovelLanguage } from './common'; const baseUrl = 'https://www.pixiv.net'; @@ -34,8 +33,6 @@ export async function getSFWNovelContent(novelId: string): Promise<NovelContent> const parsedContent = await parseNovelContent(novelDetail.body.content, images); - const language = await getNovelLanguage(novelId); - return { id: body.id, title: body.title, @@ -61,8 +58,6 @@ export async function getSFWNovelContent(novelId: string): Promise<NovelContent> seriesId: body.seriesNavData?.seriesId?.toString() || null, seriesTitle: body.seriesNavData?.title || null, - - language, }; })) as NovelContent; } diff --git a/lib/routes/pixiv/novel-api/content/types.ts b/lib/routes/pixiv/novel-api/content/types.ts index 735522f91106d92..752878c73a40a37 100644 --- a/lib/routes/pixiv/novel-api/content/types.ts +++ b/lib/routes/pixiv/novel-api/content/types.ts @@ -21,8 +21,6 @@ export interface NovelContent { seriesId: string | null; seriesTitle: string | null; - - language: string | null; } export interface SFWNovelDetail { diff --git a/lib/routes/pixiv/novel-api/series/nsfw.ts b/lib/routes/pixiv/novel-api/series/nsfw.ts index 5ed3c69c7313005..bb230fe19c65167 100644 --- a/lib/routes/pixiv/novel-api/series/nsfw.ts +++ b/lib/routes/pixiv/novel-api/series/nsfw.ts @@ -2,15 +2,34 @@ import got from '../../pixiv-got'; import { maskHeader } from '../../constants'; import { getNSFWNovelContent } from '../content/nsfw'; import pixivUtils from '../../utils'; -import { SeriesContentResponse, SeriesDetail, SeriesFeed } from './types'; +import { AppNovelSeries, SeriesDetail, SeriesFeed } from './types'; import ConfigNotFoundError from '@/errors/types/config-not-found'; import { getToken } from '../../token'; import { config } from '@/config'; import cache from '@/utils/cache'; +import queryString from 'query-string'; const baseUrl = 'https://www.pixiv.net'; +async function getNovelSeries(seriesId: string, offset: number, token: string): Promise<AppNovelSeries> { + const rsp = await got('https://app-api.pixiv.net/v2/novel/series', { + headers: { + ...maskHeader, + Authorization: 'Bearer ' + token, + }, + searchParams: queryString.stringify({ + series_id: seriesId, + last_order: offset, + }), + }); + return rsp.data as AppNovelSeries; +} + export async function getNSFWSeriesNovels(seriesId: string, limit: number = 10): Promise<SeriesFeed> { + if (limit > 30) { + limit = 30; + } + if (!config.pixiv || !config.pixiv.refreshToken) { throw new ConfigNotFoundError('This user is an R18 creator, PIXIV_REFRESHTOKEN is required.\npixiv RSS is disabled due to the lack of relevant config.\n該用戶爲 R18 創作者,需要 PIXIV_REFRESHTOKEN。'); } @@ -26,54 +45,38 @@ export async function getNSFWSeriesNovels(seriesId: string, limit: number = 10): Authorization: 'Bearer ' + token, }, }); - const seriesData = seriesResponse.data as SeriesDetail; - if (seriesData.error) { - throw new Error(seriesData.message || 'Failed to get series detail'); + let offset = seriesData.body.total - limit; + if (offset < 0) { + offset = 0; } - - // Get chapters - const chaptersResponse = await got(`${baseUrl}/ajax/novel/series/${seriesId}/content_titles`, { - headers: { - ...maskHeader, - Authorization: 'Bearer ' + token, - }, - }); - - const data = chaptersResponse.data as SeriesContentResponse; - - if (data.error) { - throw new Error(data.message || 'Failed to get series data'); - } - - const chapters = data.body.slice(-Math.abs(limit)); - const chapterStartNum = Math.max(data.body.length - limit + 1, 1); + const appSeriesData = await getNovelSeries(seriesId, offset, token); const items = await Promise.all( - chapters.map(async (chapter, index) => { - const novelContent = await getNSFWNovelContent(chapter.id, token); + appSeriesData.novels.map(async (novel) => { + const novelContent = await getNSFWNovelContent(novel.id, token); return { - title: `#${chapterStartNum + index} ${novelContent.title}`, + title: novel.title, description: ` <img src="${pixivUtils.getProxiedImageUrl(novelContent.coverUrl)}" /> - <div lang="${novelContent.language}"> + <div> <p>${novelContent.description}</p> <hr> ${novelContent.content} </div> `, - link: `${baseUrl}/novel/show.php?id=${novelContent.id}`, - pubDate: novelContent.createDate, - author: novelContent.userName || `User ID: ${novelContent.userId}`, + link: `${baseUrl}/novel/show.php?id=${novel.id}`, + pubDate: novel.create_date, + author: novel.user.name, category: novelContent.tags, }; }) ); return { - title: seriesData.body.title, - description: seriesData.body.caption, + title: appSeriesData.novel_series_detail.title, + description: appSeriesData.novel_series_detail.caption, link: `${baseUrl}/novel/series/${seriesId}`, image: pixivUtils.getProxiedImageUrl(seriesData.body.cover.urls.original), item: items, diff --git a/lib/routes/pixiv/novel-api/series/sfw.ts b/lib/routes/pixiv/novel-api/series/sfw.ts index 5cc4c10a31078c7..d9db33df495b420 100644 --- a/lib/routes/pixiv/novel-api/series/sfw.ts +++ b/lib/routes/pixiv/novel-api/series/sfw.ts @@ -45,7 +45,7 @@ export async function getSFWSeriesNovels(seriesId: string, limit: number = 10): title: `#${chapterStartNum + index} ${novelContent.title}`, description: ` <img src="${pixivUtils.getProxiedImageUrl(novelContent.coverUrl)}" /> - <div lang="${novelContent.language}"> + <div> <p>${novelContent.description}</p> <hr> ${novelContent.content} diff --git a/lib/routes/pixiv/novel-api/series/types.ts b/lib/routes/pixiv/novel-api/series/types.ts index 13f9c189b851b9d..de946d0556e0656 100644 --- a/lib/routes/pixiv/novel-api/series/types.ts +++ b/lib/routes/pixiv/novel-api/series/types.ts @@ -28,6 +28,7 @@ export interface SeriesDetail { latestNovelId: string; xRestrict: number; isOriginal: boolean; + total: number; cover: { urls: { original: string; @@ -66,3 +67,28 @@ export interface SeriesFeed { category?: string[]; }>; } + +export interface AppUser { + id: number; + name: string; +} + +export interface AppNovelSeriesDetail { + id: string; + title: string; + caption: string; + content_count: number; + is_concluded: boolean; + is_original: boolean; + user: AppUser; +} + +export interface AppNovelSeries { + novel_series_detail: AppNovelSeriesDetail; + novels: { + id: string; + title: string; + create_date: Date; + user: AppUser; + }[]; +} diff --git a/lib/routes/pixiv/novel-api/user-novels/nsfw.ts b/lib/routes/pixiv/novel-api/user-novels/nsfw.ts index 8047a8494efdb6c..b55f188e004e754 100644 --- a/lib/routes/pixiv/novel-api/user-novels/nsfw.ts +++ b/lib/routes/pixiv/novel-api/user-novels/nsfw.ts @@ -11,7 +11,6 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; import cache from '@/utils/cache'; import { getToken } from '../../token'; import InvalidParameterError from '@/errors/types/invalid-parameter'; -import { getNovelLanguage } from '../content/common'; function getNovels(user_id: string, token: string): Promise<NSFWNovelsResponse> { return got('https://app-api.pixiv.net/v1/user/novels', { @@ -47,12 +46,11 @@ export async function getNSFWUserNovels(id: string, fullContent: boolean = false const items = await Promise.all( novels.map(async (novel) => { - const language = await getNovelLanguage(novel.id); const baseItem = { title: novel.series?.title ? `${novel.series.title} - ${novel.title}` : novel.title, description: ` <img src="${pixivUtils.getProxiedImageUrl(novel.image_urls.large)}" /> - <div lang="${language}"> + <div> <p>${convertPixivProtocolExtended(novel.caption)}</p> </div>`, author: novel.user.name, diff --git a/lib/routes/pixiv/novel-api/user-novels/sfw.ts b/lib/routes/pixiv/novel-api/user-novels/sfw.ts index 86c2e5d2768074e..8b60cac8e92b681 100644 --- a/lib/routes/pixiv/novel-api/user-novels/sfw.ts +++ b/lib/routes/pixiv/novel-api/user-novels/sfw.ts @@ -3,7 +3,6 @@ import { parseDate } from '@/utils/parse-date'; import pixivUtils from '../../utils'; import { getSFWNovelContent } from '../content/sfw'; import type { SFWNovelsResponse, NovelList } from './types'; -import { getNovelLanguage } from '../content/common'; const baseUrl = 'https://www.pixiv.net'; @@ -37,12 +36,11 @@ export async function getSFWUserNovels(id: string, fullContent: boolean = false, const items = await Promise.all( Object.values(data.body.works).map(async (item) => { - const language = await getNovelLanguage(item.id); const baseItem = { title: item.title, description: ` <img src=${pixivUtils.getProxiedImageUrl(item.url)} /> - <div lang="${language}"> + <div> <p>${item.description}</p> </div> `, diff --git a/lib/routes/pixiv/novel-series.ts b/lib/routes/pixiv/novel-series.ts index 7f41c8586167cee..6db9b3928689adf 100644 --- a/lib/routes/pixiv/novel-series.ts +++ b/lib/routes/pixiv/novel-series.ts @@ -28,7 +28,7 @@ Pixiv 登錄後的 refresh_token,用於獲取 R18 小說 supportScihub: false, }, name: 'Novel Series', - maintainers: ['SnowAgar25'], + maintainers: ['SnowAgar25', 'keocheung'], handler, radar: [ { From 4c3dffa63f2195cd630bf44578ed2187486a4a69 Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+SnowAgar25@users.noreply.github.com> Date: Tue, 26 Nov 2024 02:01:46 +0800 Subject: [PATCH 600/740] fix(route/syosetu): HTML escaping in novel description & some minor changes (#17710) --- lib/routes/syosetu/search.ts | 143 ++----------------- lib/routes/syosetu/templates/description.art | 4 +- lib/routes/syosetu/types/search.ts | 138 ++++++++++++++++++ 3 files changed, 149 insertions(+), 136 deletions(-) create mode 100644 lib/routes/syosetu/types/search.ts diff --git a/lib/routes/syosetu/search.ts b/lib/routes/syosetu/search.ts index 08c0bc7aaa73f0d..676c601057d1718 100644 --- a/lib/routes/syosetu/search.ts +++ b/lib/routes/syosetu/search.ts @@ -6,141 +6,23 @@ import { Genre, GenreNotation, NarouNovelFetch, NovelTypeParam, Order, R18Site, import queryString from 'query-string'; 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); -interface NarouSearchParams { - /** - * 作品種別の絞り込み Work Type Filter - * - * t 短編 Short - * r 連載中 Ongoing Series - * er 完結済連載作品 Completed Series - * re すべての連載作品 (連載中および完結済) Series and Completed Series - * ter 短編と完結済連載作品 Completed Works (Including Short and Series) - * - * tr 短編と連載中小説 Short and Ongoing Series - * all 全ての種別 (Default) All Types - * - * Note: While the official documentation describes 5 values, all 7 values above are functional. - */ - type?: 't' | 'r' | 'er' | 're' | 'ter' | 'tr' | 'all'; - - /** 検索ワード Search Keywords */ - word?: string; - - /** 除外ワード Excluded Keywords */ - notword?: string; - - /** - * 検索範囲指定 Search Range Specifications - * - * - 読了時間 Reading Time - * - 文字数 Character Count - * - 総合ポイント Total Points - * - 最新掲載日(年月日)Latest Update Date (Year/Month/Day) - * - 初回掲載日(年月日)First Publication Date (Year/Month/Day) - */ - mintime?: number; - maxtime?: number; - minlen?: number; - maxlen?: number; - min_globalpoint?: number; - max_globalpoint?: number; - minlastup?: string; - maxlastup?: string; - minfirstup?: string; - maxfirstup?: string; - - /** - * 抽出条件の指定 Extraction Conditions - * - * - 挿絵のある作品 Works with Illustrations - * - 小説 PickUp!対象作品 Featured Novels - * - * 作品に含まれる要素:Elements Included in Works: - * - 残酷な描写あり Contains Cruel Content - * - ボーイズラブ Boys' Love - * - ガールズラブ Girls' Love - * - 異世界転生 Reincarnation in Another World - * - 異世界転移 Transportation to Another World - */ - sasie?: string; - ispickup?: boolean; - iszankoku?: boolean; - isbl?: boolean; - isgl?: boolean; - istensei?: boolean; - istenni?: boolean; - - /** - * 除外条件の指定 Exclusion Conditions - * - * - 長期連載停止中の作品 Works on Long-term Hiatus - * - * 作品に含まれる要素:Elements to Exclude: - * - 残酷な描写あり Cruel Content - * - ボーイズラブ Boys' Love - * - ガールズラブ Girls' Love - * - 異世界転生 Reincarnation in Another World - * - 異世界転移 Transportation to Another World - */ - stop?: boolean; - notzankoku?: boolean; - notbl?: boolean; - notgl?: boolean; - nottensei?: boolean; - nottenni?: boolean; - - /** - * ワード検索範囲指定 Word Search Scope - * すべてのチェックを解除した場合、すべての項目がワード検索の対象となります。 - * If all boxes are unchecked, all items will become targets for word search. - * - * 作品タイトル Work Title - * あらすじ Synopsis - * キーワード Keywords - * 作者名 Author Name - */ - title?: boolean; - ex?: boolean; - keyword?: boolean; - wname?: boolean; - - /** - * 並び順 Sort Order - * - new: 新着更新順 (Default) Latest Updates - * - weekly: 週間ユニークアクセスが多い順 Most Weekly Unique Access - * - favnovelcnt: ブックマーク登録の多い順 Most Bookmarks - * - reviewcnt: レビューの多い順 Most Reviews - * - hyoka: 総合ポイントの高い順 Highest Total Points - * - dailypoint: 日間ポイントの高い順 Highest Daily Points - * - weeklypoint: 週間ポイントの高い順 Highest Weekly Points - * - monthlypoint: 月間ポイントの高い順 Highest Monthly Points - * - quarterpoint: 四半期ポイントの高い順 Highest Quarterly Points - * - yearlypoint: 年間ポイントの高い順 Highest Yearly Points - * - hyokacnt: 評価者数の多い順 Most Ratings - * - lengthdesc: 文字数の多い順 Most Characters - * - generalfirstup: 初回掲載順 First Publication Order - * - ncodedesc: N コード降順 Ncode Descending - * - old: 更新が古い順 Oldest Updates - */ - order?: 'new' | 'weekly' | 'favnovelcnt' | 'reviewcnt' | 'hyoka' | 'dailypoint' | 'weeklypoint' | 'monthlypoint' | 'quarterpoint' | 'yearlypoint' | 'hyokacnt' | 'lengthdesc' | 'generalfirstup' | 'ncodedesc' | 'old'; - - /** ジャンル Genre */ - genre?: string; - - /** 掲載サイト指定 Site */ - nocgenre?: number; -} - export const route: Route = { path: '/search/:sub/:query', categories: ['reading'], - example: '/syosetu/search/noc/word=ハーレム¬word=&type=r&mintime=&maxtime=&minlen=30000&maxlen=&min_globalpoint=&max_globalpoint=&minlastup=&maxlastup=&minfirstup=&maxfirstup=&isgl=1¬bl=1&order=new', + example: '/syosetu/search/noc/word=ハーレム¬word=&type=r&mintime=&maxtime=&minlen=30000&maxlen=&min_globalpoint=&max_globalpoint=&minlastup=&maxlastup=&minfirstup=&maxfirstup=&isgl=1¬bl=1&order=new?limit=5', parameters: { - sub: 'The target Syosetu subsite (yomou/noc/mnlt/mid).', + sub: { + description: 'The target Syosetu subsite.', + options: Object.entries(SyosetuSub).map(([, value]) => ({ + value, + label: syosetuSubToJapanese[value], + })), + }, query: 'Search parameters in Syosetu format.', }, features: { @@ -210,13 +92,6 @@ function mapToSearchParams(query: string, limit: number): SearchParams { return searchParams; } -enum SyosetuSub { - YOMOU = 'yomou', - NOCTURNE = 'noc', - MOONLIGHT = 'mnlt', - MIDNIGHT = 'mid', -} - const isGeneral = (sub: string): boolean => sub === SyosetuSub.YOMOU; function createNovelSearchBuilder(sub: string, searchParams: SearchParams) { diff --git a/lib/routes/syosetu/templates/description.art b/lib/routes/syosetu/templates/description.art index 34fa61c6a1cd8ba..7da2927b78ce7fb 100644 --- a/lib/routes/syosetu/templates/description.art +++ b/lib/routes/syosetu/templates/description.art @@ -1,5 +1,5 @@ {{ if novel.story }} -<p>{{ novel.story.replaceAll('\n', '<br>') }}</p> +<p>{{@ novel.story.replaceAll('\n', '<br>') }}</p> {{ /if }} <h2>作品情報</h2> @@ -27,7 +27,7 @@ {{ /if }} <tr> <td>キーワード</td> - <td>{{ novel.keyword }}</td> + <td>{{ novel.keyword.replaceAll(' ', '、') }}</td> </tr> <tr> <td>最終掲載</td> diff --git a/lib/routes/syosetu/types/search.ts b/lib/routes/syosetu/types/search.ts new file mode 100644 index 000000000000000..130d1a8d93f3dec --- /dev/null +++ b/lib/routes/syosetu/types/search.ts @@ -0,0 +1,138 @@ +export enum SyosetuSub { + YOMOU = 'yomou', + NOCTURNE = 'noc', + MOONLIGHT = 'mnlt', + MIDNIGHT = 'mid', +} + +export const syosetuSubToJapanese = { + [SyosetuSub.YOMOU]: '小説を読もう', + [SyosetuSub.NOCTURNE]: 'ノクターン', + [SyosetuSub.MOONLIGHT]: 'ムーンライト', + [SyosetuSub.MIDNIGHT]: 'ミッドナイト', +} as const; + +export interface NarouSearchParams { + /** + * 作品種別の絞り込み Work Type Filter + * + * t 短編 Short + * r 連載中 Ongoing Series + * er 完結済連載作品 Completed Series + * re すべての連載作品 (連載中および完結済) Series and Completed Series + * ter 短編と完結済連載作品 Completed Works (Including Short and Series) + * + * tr 短編と連載中小説 Short and Ongoing Series + * all 全ての種別 (Default) All Types + * + * Note: While the official documentation describes 5 values, all 7 values above are functional. + */ + type?: 't' | 'r' | 'er' | 're' | 'ter' | 'tr' | 'all'; + + /** 検索ワード Search Keywords */ + word?: string; + + /** 除外ワード Excluded Keywords */ + notword?: string; + + /** + * 検索範囲指定 Search Range Specifications + * + * - 読了時間 Reading Time + * - 文字数 Character Count + * - 総合ポイント Total Points + * - 最新掲載日(年月日)Latest Update Date (Year/Month/Day) + * - 初回掲載日(年月日)First Publication Date (Year/Month/Day) + */ + mintime?: number; + maxtime?: number; + minlen?: number; + maxlen?: number; + min_globalpoint?: number; + max_globalpoint?: number; + minlastup?: string; + maxlastup?: string; + minfirstup?: string; + maxfirstup?: string; + + /** + * 抽出条件の指定 Extraction Conditions + * + * - 挿絵のある作品 Works with Illustrations + * - 小説 PickUp!対象作品 Featured Novels + * + * 作品に含まれる要素:Elements Included in Works: + * - 残酷な描写あり Contains Cruel Content + * - ボーイズラブ Boys' Love + * - ガールズラブ Girls' Love + * - 異世界転生 Reincarnation in Another World + * - 異世界転移 Transportation to Another World + */ + sasie?: string; + ispickup?: boolean; + iszankoku?: boolean; + isbl?: boolean; + isgl?: boolean; + istensei?: boolean; + istenni?: boolean; + + /** + * 除外条件の指定 Exclusion Conditions + * + * - 長期連載停止中の作品 Works on Long-term Hiatus + * + * 作品に含まれる要素:Elements to Exclude: + * - 残酷な描写あり Cruel Content + * - ボーイズラブ Boys' Love + * - ガールズラブ Girls' Love + * - 異世界転生 Reincarnation in Another World + * - 異世界転移 Transportation to Another World + */ + stop?: boolean; + notzankoku?: boolean; + notbl?: boolean; + notgl?: boolean; + nottensei?: boolean; + nottenni?: boolean; + + /** + * ワード検索範囲指定 Word Search Scope + * すべてのチェックを解除した場合、すべての項目がワード検索の対象となります。 + * If all boxes are unchecked, all items will become targets for word search. + * + * 作品タイトル Work Title + * あらすじ Synopsis + * キーワード Keywords + * 作者名 Author Name + */ + title?: boolean; + ex?: boolean; + keyword?: boolean; + wname?: boolean; + + /** + * 並び順 Sort Order + * - new: 新着更新順 (Default) Latest Updates + * - weekly: 週間ユニークアクセスが多い順 Most Weekly Unique Access + * - favnovelcnt: ブックマーク登録の多い順 Most Bookmarks + * - reviewcnt: レビューの多い順 Most Reviews + * - hyoka: 総合ポイントの高い順 Highest Total Points + * - dailypoint: 日間ポイントの高い順 Highest Daily Points + * - weeklypoint: 週間ポイントの高い順 Highest Weekly Points + * - monthlypoint: 月間ポイントの高い順 Highest Monthly Points + * - quarterpoint: 四半期ポイントの高い順 Highest Quarterly Points + * - yearlypoint: 年間ポイントの高い順 Highest Yearly Points + * - hyokacnt: 評価者数の多い順 Most Ratings + * - lengthdesc: 文字数の多い順 Most Characters + * - generalfirstup: 初回掲載順 First Publication Order + * - ncodedesc: N コード降順 Ncode Descending + * - old: 更新が古い順 Oldest Updates + */ + order?: 'new' | 'weekly' | 'favnovelcnt' | 'reviewcnt' | 'hyoka' | 'dailypoint' | 'weeklypoint' | 'monthlypoint' | 'quarterpoint' | 'yearlypoint' | 'hyokacnt' | 'lengthdesc' | 'generalfirstup' | 'ncodedesc' | 'old'; + + /** ジャンル Genre */ + genre?: string; + + /** 掲載サイト指定 Site */ + nocgenre?: number; +} From f9c5ccbce5a5e3cdcf74da96c48131cabfe71244 Mon Sep 17 00:00:00 2001 From: Chih-Hsuan Yen <1937689+yan12125@users.noreply.github.com> Date: Tue, 26 Nov 2024 10:21:08 +0800 Subject: [PATCH 601/740] fix(route/bilibili): fix manga updates (#17711) Closes https://github.com/DIYgod/RSSHub/issues/17690 --- lib/routes/bilibili/manga-update.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/routes/bilibili/manga-update.ts b/lib/routes/bilibili/manga-update.ts index 2b100dcea479046..183f56ec72143e3 100644 --- a/lib/routes/bilibili/manga-update.ts +++ b/lib/routes/bilibili/manga-update.ts @@ -28,6 +28,8 @@ 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 response = await got({ method: 'POST', url: `https://manga.bilibili.com/twirp/comic.v2.Comic/ComicDetail?device=pc&platform=web`, @@ -36,6 +38,7 @@ async function handler(ctx) { }, headers: { Referer: link, + Cookie: `buvid3=${spi_response.data.data.b_3}; buvid4=${spi_response.data.data.b_4}`, }, }); const data = response.data.data; From fa1dcc56b5e37a75b0321195c380c3b708271e8c Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 26 Nov 2024 12:06:40 +0800 Subject: [PATCH 602/740] chore(route): add more popular routes --- lib/routes/36kr/hot-list.ts | 2 +- lib/routes/36kr/index.ts | 2 +- lib/routes/aeon/category.ts | 2 +- lib/routes/aeon/type.ts | 2 +- lib/routes/aibase/discover.ts | 2 +- lib/routes/aibase/news.ts | 2 +- lib/routes/aibase/topic.ts | 2 +- lib/routes/appleinsider/index.ts | 2 +- lib/routes/cara/likes.ts | 2 +- lib/routes/cara/portfolio.ts | 2 +- lib/routes/cara/timeline.ts | 2 +- lib/routes/chub/characters.ts | 2 +- lib/routes/cnbeta/namespace.ts | 2 +- lib/routes/dcfever/news.ts | 2 +- lib/routes/dcfever/reviews.ts | 2 +- lib/routes/dcfever/trading-search.ts | 2 +- lib/routes/dcfever/trading.ts | 2 +- lib/routes/deepmind/blog.ts | 2 +- lib/routes/digitalcameraworld/news.ts | 2 +- lib/routes/dn/news.ts | 2 +- lib/routes/fashionnetwork/namespace.ts | 2 +- lib/routes/foresightnews/article.ts | 2 +- lib/routes/foresightnews/column.ts | 2 +- lib/routes/foresightnews/index.ts | 4 +++- lib/routes/foresightnews/news.ts | 2 +- lib/routes/ftm/index.ts | 2 +- lib/routes/furaffinity/browse.ts | 2 +- lib/routes/furaffinity/home.ts | 2 +- lib/routes/furaffinity/journals.ts | 2 +- lib/routes/furaffinity/search.ts | 2 +- lib/routes/furaffinity/shouts.ts | 2 +- lib/routes/furaffinity/status.ts | 2 +- lib/routes/keep/user.ts | 2 +- lib/routes/lofter/collection.ts | 2 +- lib/routes/lofter/tag.ts | 2 +- lib/routes/plurk/anonymous.ts | 2 +- lib/routes/plurk/hotlinks.ts | 2 +- lib/routes/plurk/news.ts | 2 +- lib/routes/plurk/search.ts | 2 +- lib/routes/telegram/stickerpack.ts | 2 +- lib/routes/vocus/publication.ts | 2 +- lib/routes/vocus/user.ts | 2 +- 42 files changed, 44 insertions(+), 42 deletions(-) diff --git a/lib/routes/36kr/hot-list.ts b/lib/routes/36kr/hot-list.ts index 640cdd74f848cfb..46b072ddd9e2fed 100644 --- a/lib/routes/36kr/hot-list.ts +++ b/lib/routes/36kr/hot-list.ts @@ -26,7 +26,7 @@ const categories = { export const route: Route = { path: '/hot-list/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/36kr/hot-list', parameters: { category: '分类,默认为24小时热榜' }, features: { diff --git a/lib/routes/36kr/index.ts b/lib/routes/36kr/index.ts index c026c55916db1a0..82b64f29bb82ef8 100644 --- a/lib/routes/36kr/index.ts +++ b/lib/routes/36kr/index.ts @@ -18,7 +18,7 @@ const shortcuts = { export const route: Route = { path: '/:category/:subCategory?/:keyword?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/36kr/newsflashes', parameters: { category: '分类,必填项', diff --git a/lib/routes/aeon/category.ts b/lib/routes/aeon/category.ts index b2a707211592a58..adb68f0a3e6fbc6 100644 --- a/lib/routes/aeon/category.ts +++ b/lib/routes/aeon/category.ts @@ -5,7 +5,7 @@ import { getData } from './utils'; export const route: Route = { path: '/category/:category', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/aeon/category/philosophy', parameters: { category: 'Category' }, features: { diff --git a/lib/routes/aeon/type.ts b/lib/routes/aeon/type.ts index 02dc0e277be952a..8b78bfc4334d7e2 100644 --- a/lib/routes/aeon/type.ts +++ b/lib/routes/aeon/type.ts @@ -5,7 +5,7 @@ import { getData } from './utils'; export const route: Route = { path: '/:type', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/aeon/essays', parameters: { type: 'Type' }, features: { diff --git a/lib/routes/aibase/discover.ts b/lib/routes/aibase/discover.ts index 2728f54374ed48b..ac70b06cfb35670 100644 --- a/lib/routes/aibase/discover.ts +++ b/lib/routes/aibase/discover.ts @@ -189,7 +189,7 @@ export const route: Route = { | [法律](https://top.aibase.com/discover/138-139) | [138-139](https://rsshub.app/aibase/discover/138-139) | </details> `, - categories: ['new-media'], + categories: ['new-media', 'popular'], features: { requireConfig: false, diff --git a/lib/routes/aibase/news.ts b/lib/routes/aibase/news.ts index cdc173d01fb48a5..0115423b69b2aa9 100644 --- a/lib/routes/aibase/news.ts +++ b/lib/routes/aibase/news.ts @@ -58,7 +58,7 @@ export const route: Route = { }, example: '/aibase/news', description: '获取 AI 资讯列表', - categories: ['new-media'], + categories: ['new-media', 'popular'], features: { requireConfig: false, requirePuppeteer: false, diff --git a/lib/routes/aibase/topic.ts b/lib/routes/aibase/topic.ts index 78e0fe11ddfb11d..1921ba2577c7630 100644 --- a/lib/routes/aibase/topic.ts +++ b/lib/routes/aibase/topic.ts @@ -90,7 +90,7 @@ export const route: Route = { | [娱乐](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) | </details> `, - categories: ['new-media'], + categories: ['new-media', 'popular'], features: { requireConfig: false, diff --git a/lib/routes/appleinsider/index.ts b/lib/routes/appleinsider/index.ts index e61c774cda0bba4..bcafb0e3b69f459 100644 --- a/lib/routes/appleinsider/index.ts +++ b/lib/routes/appleinsider/index.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/appleinsider', parameters: { category: 'Category, see below, News by default' }, features: { diff --git a/lib/routes/cara/likes.ts b/lib/routes/cara/likes.ts index 52f800b2709874e..bee254f5a6730d3 100644 --- a/lib/routes/cara/likes.ts +++ b/lib/routes/cara/likes.ts @@ -11,7 +11,7 @@ const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: ['/likes/:user'], - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/cara/likes/fengz', parameters: { user: 'username' }, name: 'Likes', diff --git a/lib/routes/cara/portfolio.ts b/lib/routes/cara/portfolio.ts index bfbc41b5d0084a2..2151d66328662c9 100644 --- a/lib/routes/cara/portfolio.ts +++ b/lib/routes/cara/portfolio.ts @@ -6,7 +6,7 @@ import cache from '@/utils/cache'; export const route: Route = { path: ['/portfolio/:user'], - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/cara/portfolio/fengz', parameters: { user: 'username' }, name: 'Portfolio', diff --git a/lib/routes/cara/timeline.ts b/lib/routes/cara/timeline.ts index 3b05cf2a93a2bc2..ebdd485801bbf52 100644 --- a/lib/routes/cara/timeline.ts +++ b/lib/routes/cara/timeline.ts @@ -11,7 +11,7 @@ const __dirname = getCurrentPath(import.meta.url); export const route: Route = { path: ['/timeline/:user'], - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/cara/timeline/fengz', parameters: { user: 'username' }, name: 'Timeline', diff --git a/lib/routes/chub/characters.ts b/lib/routes/chub/characters.ts index 0f34350658848c0..473eb5f53282c51 100644 --- a/lib/routes/chub/characters.ts +++ b/lib/routes/chub/characters.ts @@ -4,7 +4,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/characters', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/chub/characters', name: 'Characters', maintainers: ['flameleaf'], diff --git a/lib/routes/cnbeta/namespace.ts b/lib/routes/cnbeta/namespace.ts index 3d69cd68d94729a..d703fd32ee9c3a7 100644 --- a/lib/routes/cnbeta/namespace.ts +++ b/lib/routes/cnbeta/namespace.ts @@ -3,6 +3,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'cnBeta.COM', url: 'cnbeta.com.tw', - categories: ['new-media'], + categories: ['new-media', 'popular'], lang: 'zh-TW', }; diff --git a/lib/routes/dcfever/news.ts b/lib/routes/dcfever/news.ts index e9364c9cf40d10a..ff2235fb428dfa4 100644 --- a/lib/routes/dcfever/news.ts +++ b/lib/routes/dcfever/news.ts @@ -5,7 +5,7 @@ import { baseUrl, parseItem } from './utils'; export const route: Route = { path: '/news/:type?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dcfever/news', parameters: { type: '分類,預設為所有新聞' }, name: '新聞中心', diff --git a/lib/routes/dcfever/reviews.ts b/lib/routes/dcfever/reviews.ts index f7ba620d79ab23c..61e58354fb43bea 100644 --- a/lib/routes/dcfever/reviews.ts +++ b/lib/routes/dcfever/reviews.ts @@ -5,7 +5,7 @@ import { baseUrl, parseItem } from './utils'; export const route: Route = { path: '/reviews/:type?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dcfever/reviews/cameras', parameters: { type: '分類,預設為 `cameras`' }, radar: [ diff --git a/lib/routes/dcfever/trading-search.ts b/lib/routes/dcfever/trading-search.ts index b5d85a60a4ba6f1..f812a3010391869 100644 --- a/lib/routes/dcfever/trading-search.ts +++ b/lib/routes/dcfever/trading-search.ts @@ -6,7 +6,7 @@ import { baseUrl, parseTradeItem } from './utils'; export const route: Route = { path: '/trading/search/:keyword/:mainCat?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dcfever/trading/search/Sony', parameters: { keyword: '關鍵字', mainCat: '主要分類 ID,見上表' }, name: '二手市集 - 物品搜尋', diff --git a/lib/routes/dcfever/trading.ts b/lib/routes/dcfever/trading.ts index daf1cc4e9b227c8..6c994e910f50e3f 100644 --- a/lib/routes/dcfever/trading.ts +++ b/lib/routes/dcfever/trading.ts @@ -6,7 +6,7 @@ import { baseUrl, parseTradeItem } from './utils'; export const route: Route = { path: '/trading/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dcfever/trading/1', parameters: { id: '分類 ID,見下表' }, name: '二手市集', diff --git a/lib/routes/deepmind/blog.ts b/lib/routes/deepmind/blog.ts index 3697e645e440301..88fe1bcc8a948bf 100644 --- a/lib/routes/deepmind/blog.ts +++ b/lib/routes/deepmind/blog.ts @@ -6,7 +6,7 @@ import parser from '@/utils/rss-parser'; export const route: Route = { path: '/blog', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/deepmind/blog', parameters: {}, features: { diff --git a/lib/routes/digitalcameraworld/news.ts b/lib/routes/digitalcameraworld/news.ts index df2d55786137245..a29699bc2caac7f 100644 --- a/lib/routes/digitalcameraworld/news.ts +++ b/lib/routes/digitalcameraworld/news.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; const host = 'https://www.digitalcameraworld.com'; export const route: Route = { path: '/news', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/digitalcameraworld/news', parameters: {}, features: { diff --git a/lib/routes/dn/news.ts b/lib/routes/dn/news.ts index 92fb012705bbdcb..1f5015c6695fd54 100644 --- a/lib/routes/dn/news.ts +++ b/lib/routes/dn/news.ts @@ -12,7 +12,7 @@ import path from 'node:path'; export const route: Route = { path: '/:language/news/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dn/en-us/news', parameters: { language: 'Language, see below', category: 'Category, see below, The Latest by default' }, features: { diff --git a/lib/routes/fashionnetwork/namespace.ts b/lib/routes/fashionnetwork/namespace.ts index d5d9caae9359b68..da4463661b20bcd 100644 --- a/lib/routes/fashionnetwork/namespace.ts +++ b/lib/routes/fashionnetwork/namespace.ts @@ -3,7 +3,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'FashionNetwork', url: 'fashionnetwork.cn', - categories: ['new-media'], + categories: ['new-media', 'popular'], description: '', lang: 'zh-CN', }; diff --git a/lib/routes/foresightnews/article.ts b/lib/routes/foresightnews/article.ts index d9798ab3922469c..2c16a16e5f594fd 100644 --- a/lib/routes/foresightnews/article.ts +++ b/lib/routes/foresightnews/article.ts @@ -3,7 +3,7 @@ import { rootUrl, apiRootUrl, processItems, icon, image } from './util'; export const route: Route = { path: '/article', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/foresightnews/article', parameters: {}, features: { diff --git a/lib/routes/foresightnews/column.ts b/lib/routes/foresightnews/column.ts index 04074ccfae82144..1d9f4fce501344d 100644 --- a/lib/routes/foresightnews/column.ts +++ b/lib/routes/foresightnews/column.ts @@ -3,7 +3,7 @@ import { rootUrl, apiRootUrl, processItems, icon, image } from './util'; export const route: Route = { path: '/column/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/foresightnews/column/1', parameters: { id: '专栏 id, 可在对应专栏页 URL 中找到' }, features: { diff --git a/lib/routes/foresightnews/index.ts b/lib/routes/foresightnews/index.ts index e93dc01415fb0bc..dfb742240d4ced5 100644 --- a/lib/routes/foresightnews/index.ts +++ b/lib/routes/foresightnews/index.ts @@ -3,13 +3,15 @@ import { rootUrl, apiRootUrl, processItems, icon, image } from './util'; export const route: Route = { path: '/', + categories: ['new-media', 'popular'], + example: '/foresightnews', radar: [ { source: ['foresightnews.pro/'], target: '', }, ], - name: 'Unknown', + name: '精选资讯', maintainers: ['nczitzk'], handler, url: 'foresightnews.pro/', diff --git a/lib/routes/foresightnews/news.ts b/lib/routes/foresightnews/news.ts index e5587f0327e6d28..c78db44f0d9572a 100644 --- a/lib/routes/foresightnews/news.ts +++ b/lib/routes/foresightnews/news.ts @@ -3,7 +3,7 @@ import { rootUrl, apiRootUrl, processItems, icon, image } from './util'; export const route: Route = { path: '/news', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/foresightnews/news', parameters: {}, features: { diff --git a/lib/routes/ftm/index.ts b/lib/routes/ftm/index.ts index c840337892a5e62..3b10b1c649b4b9a 100644 --- a/lib/routes/ftm/index.ts +++ b/lib/routes/ftm/index.ts @@ -7,7 +7,7 @@ import ofetch from '@/utils/ofetch'; export const route: Route = { path: '/', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/ftm', parameters: {}, name: '文章', diff --git a/lib/routes/furaffinity/browse.ts b/lib/routes/furaffinity/browse.ts index eb423cbf490c451..6f51098c13c49f2 100644 --- a/lib/routes/furaffinity/browse.ts +++ b/lib/routes/furaffinity/browse.ts @@ -5,7 +5,7 @@ export const route: Route = { path: '/browse/:mode?', name: 'Browse', url: 'furaffinity.net', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/furaffinity/browse/nsfw', maintainers: ['TigerCubDen', 'SkyNetX007'], parameters: { mode: 'R18 content toggle, default value is sfw, options are sfw, nsfw' }, diff --git a/lib/routes/furaffinity/home.ts b/lib/routes/furaffinity/home.ts index 383b79e92e51d99..5db61ad3aedd8e6 100644 --- a/lib/routes/furaffinity/home.ts +++ b/lib/routes/furaffinity/home.ts @@ -5,7 +5,7 @@ export const route: Route = { path: '/home/:category/:mode?', name: 'Home', url: 'furaffinity.net', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/furaffinity/home/nsfw', maintainers: ['TigerCubDen', 'SkyNetX007'], parameters: { diff --git a/lib/routes/furaffinity/journals.ts b/lib/routes/furaffinity/journals.ts index df13b826215f783..f630c23c505480d 100644 --- a/lib/routes/furaffinity/journals.ts +++ b/lib/routes/furaffinity/journals.ts @@ -5,7 +5,7 @@ export const route: Route = { path: '/journals/:username', name: 'Journals', url: 'furaffinity.net', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/furaffinity/journals/fender', maintainers: ['TigerCubDen', 'SkyNetX007'], parameters: { username: 'Username, can find in userpage' }, diff --git a/lib/routes/furaffinity/search.ts b/lib/routes/furaffinity/search.ts index 1f9d9eda2028194..88855f4e1da0e71 100644 --- a/lib/routes/furaffinity/search.ts +++ b/lib/routes/furaffinity/search.ts @@ -5,7 +5,7 @@ export const route: Route = { path: '/search/:query/:mode?/:routeParams?', name: 'Search', url: 'furaffinity.net', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/furaffinity/search/protogen/nsfw', maintainers: ['TigerCubDen', 'SkyNetX007'], parameters: { diff --git a/lib/routes/furaffinity/shouts.ts b/lib/routes/furaffinity/shouts.ts index 94e5c071a0caf28..0d20a2faf86a9a5 100644 --- a/lib/routes/furaffinity/shouts.ts +++ b/lib/routes/furaffinity/shouts.ts @@ -5,7 +5,7 @@ export const route: Route = { path: '/shouts/:username', name: 'Shouts', url: 'furaffinity.net', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/furaffinity/shouts/fender', maintainers: ['TigerCubDen', 'SkyNetX007'], parameters: { username: 'Username, can find in userpage' }, diff --git a/lib/routes/furaffinity/status.ts b/lib/routes/furaffinity/status.ts index 5c4201558b8aea7..038d155a9f16611 100644 --- a/lib/routes/furaffinity/status.ts +++ b/lib/routes/furaffinity/status.ts @@ -5,7 +5,7 @@ export const route: Route = { path: '/status', name: 'Status', url: 'furaffinity.net', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/furaffinity/status', maintainers: ['TigerCubDen', 'SkyNetX007'], parameters: {}, diff --git a/lib/routes/keep/user.ts b/lib/routes/keep/user.ts index fa2fc31efb6e994..0b4a82f0ef26c37 100644 --- a/lib/routes/keep/user.ts +++ b/lib/routes/keep/user.ts @@ -8,7 +8,7 @@ import path from 'node:path'; export const route: Route = { path: '/user/:id', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/keep/user/556b02c1ab59390afea671ea', parameters: { id: 'Keep 用户 id' }, features: { diff --git a/lib/routes/lofter/collection.ts b/lib/routes/lofter/collection.ts index 7ec2784d807e43d..fb4bb596c7c5b67 100644 --- a/lib/routes/lofter/collection.ts +++ b/lib/routes/lofter/collection.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/collection/:collectionID', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/lofter/collection/552041', parameters: { collectionID: 'Lofter collection ID, can be found in the share URL' }, features: { diff --git a/lib/routes/lofter/tag.ts b/lib/routes/lofter/tag.ts index 4257c5c822e7e7f..45759d093c7bd81 100644 --- a/lib/routes/lofter/tag.ts +++ b/lib/routes/lofter/tag.ts @@ -6,7 +6,7 @@ import { JSDOM } from 'jsdom'; export const route: Route = { path: '/tag/:name?/:type?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/lofter/tag/cosplay/date', parameters: { name: 'tag name, such as `名侦探柯南`, `摄影` by default', type: 'ranking type, see below, new by default' }, features: { diff --git a/lib/routes/plurk/anonymous.ts b/lib/routes/plurk/anonymous.ts index 453e768671b73e0..25f2cb72d682f1a 100644 --- a/lib/routes/plurk/anonymous.ts +++ b/lib/routes/plurk/anonymous.ts @@ -5,7 +5,7 @@ import { baseUrl, getPlurk } from './utils'; export const route: Route = { path: '/anonymous', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/plurk/anonymous', parameters: {}, features: { diff --git a/lib/routes/plurk/hotlinks.ts b/lib/routes/plurk/hotlinks.ts index 503ef59a6adff43..2c45a216de8a240 100644 --- a/lib/routes/plurk/hotlinks.ts +++ b/lib/routes/plurk/hotlinks.ts @@ -5,7 +5,7 @@ import { baseUrl, getPlurk } from './utils'; export const route: Route = { path: '/hotlinks', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/plurk/hotlinks', parameters: {}, features: { diff --git a/lib/routes/plurk/news.ts b/lib/routes/plurk/news.ts index 29a9a1c1dda8788..831c9afb972f4e7 100644 --- a/lib/routes/plurk/news.ts +++ b/lib/routes/plurk/news.ts @@ -5,7 +5,7 @@ import { baseUrl, fetchFriends, getPlurk } from './utils'; export const route: Route = { path: '/news/:lang?', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/plurk/news/:lang?', parameters: { lang: 'Language, see the table above, `en` by default' }, features: { diff --git a/lib/routes/plurk/search.ts b/lib/routes/plurk/search.ts index 58764cb4048f60a..ae6ad44a1cdfa5f 100644 --- a/lib/routes/plurk/search.ts +++ b/lib/routes/plurk/search.ts @@ -6,7 +6,7 @@ import { baseUrl, getPlurk } from './utils'; export const route: Route = { path: '/search/:keyword', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/plurk/search/FGO', parameters: { keyword: 'Search keyword' }, features: { diff --git a/lib/routes/telegram/stickerpack.ts b/lib/routes/telegram/stickerpack.ts index 2c9e2eb91a7147d..524887cd8ba09be 100644 --- a/lib/routes/telegram/stickerpack.ts +++ b/lib/routes/telegram/stickerpack.ts @@ -5,7 +5,7 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; export const route: Route = { path: '/stickerpack/:name', - categories: ['social-media', 'popular'], + categories: ['social-media'], view: ViewType.Pictures, example: '/telegram/stickerpack/DIYgod', parameters: { name: 'Sticker Pack name, available in the sharing URL' }, diff --git a/lib/routes/vocus/publication.ts b/lib/routes/vocus/publication.ts index e144d1003e84e6c..fc8299020284318 100644 --- a/lib/routes/vocus/publication.ts +++ b/lib/routes/vocus/publication.ts @@ -5,7 +5,7 @@ import { processList, ProcessFeed, baseUrl, apiUrl } from './utils'; export const route: Route = { path: '/publication/:id', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/vocus/publication/bass', parameters: { id: '出版專題 id,可在出版專題主页的 URL 找到' }, features: { diff --git a/lib/routes/vocus/user.ts b/lib/routes/vocus/user.ts index 95263d1d2679346..fd4e9d623765b3f 100644 --- a/lib/routes/vocus/user.ts +++ b/lib/routes/vocus/user.ts @@ -5,7 +5,7 @@ import { processList, ProcessFeed, baseUrl, apiUrl } from './utils'; export const route: Route = { path: '/user/:id', - categories: ['social-media'], + categories: ['social-media', 'popular'], example: '/vocus/user/tsetyan', parameters: { id: '用户 id,可在用户主页的 URL 找到' }, features: { From 755a732ed142848c603d6164925ad426ccb5288e Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 26 Nov 2024 12:53:57 +0800 Subject: [PATCH 603/740] chore(route): add more social media popular routes --- lib/routes/google/news.ts | 2 +- lib/routes/grist/featured.ts | 2 +- lib/routes/grist/index.ts | 5 ++++- lib/routes/grist/series.ts | 2 +- lib/routes/grist/topic.ts | 2 +- lib/routes/harvard/health/blog.ts | 2 +- lib/routes/hkepc/index.ts | 2 +- lib/routes/infoq/presentations.ts | 2 +- lib/routes/infoq/recommend.ts | 2 +- lib/routes/infoq/topic.ts | 2 +- lib/routes/informedainews/docs.ts | 2 +- 11 files changed, 14 insertions(+), 11 deletions(-) diff --git a/lib/routes/google/news.ts b/lib/routes/google/news.ts index 025da3e1bf1e543..457b9e0881abd34 100644 --- a/lib/routes/google/news.ts +++ b/lib/routes/google/news.ts @@ -13,7 +13,7 @@ const baseUrl = 'https://news.google.com'; export const route: Route = { path: '/news/:category/:locale', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/google/news/Top stories/hl=en-US&gl=US&ceid=US:en', parameters: { category: 'Category Title', locale: 'locales, could be found behind `?`, including `hl`, `gl`, and `ceid` as parameters' }, features: { diff --git a/lib/routes/grist/featured.ts b/lib/routes/grist/featured.ts index dcc6f306e7bc954..826dd07a4bef319 100644 --- a/lib/routes/grist/featured.ts +++ b/lib/routes/grist/featured.ts @@ -6,7 +6,7 @@ import { load } from 'cheerio'; export const route: Route = { path: '/featured', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/grist/featured', parameters: {}, features: { diff --git a/lib/routes/grist/index.ts b/lib/routes/grist/index.ts index f7e92bc65b21a17..d207b6402e214ca 100644 --- a/lib/routes/grist/index.ts +++ b/lib/routes/grist/index.ts @@ -8,8 +8,11 @@ export const route: Route = { source: ['grist.org/articles/'], }, ], - name: 'Unknown', + name: 'Latest Articles', maintainers: ['Rjnishant530'], + categories: ['new-media', 'popular'], + example: '/grist', + parameters: {}, handler, url: 'grist.org/articles/', }; diff --git a/lib/routes/grist/series.ts b/lib/routes/grist/series.ts index 0425502e06671b6..0241b127a3ec9a6 100644 --- a/lib/routes/grist/series.ts +++ b/lib/routes/grist/series.ts @@ -3,7 +3,7 @@ import { getData, getList } from './utils'; export const route: Route = { path: '/series/:series', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/grist/series/best-of-grist', parameters: { series: 'Find in the URL which has /series/' }, features: { diff --git a/lib/routes/grist/topic.ts b/lib/routes/grist/topic.ts index bc073aeb0ef0ac9..59984b09f34138d 100644 --- a/lib/routes/grist/topic.ts +++ b/lib/routes/grist/topic.ts @@ -3,7 +3,7 @@ import { getData, getList } from './utils'; export const route: Route = { path: '/topic/:topic', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/grist/topic/extreme-heat', parameters: { topic: 'Any Topic from Table below' }, features: { diff --git a/lib/routes/harvard/health/blog.ts b/lib/routes/harvard/health/blog.ts index 17cfb3b24f9058e..fa551104b569f6b 100644 --- a/lib/routes/harvard/health/blog.ts +++ b/lib/routes/harvard/health/blog.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/health/blog', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/harvard/health/blog', parameters: {}, features: { diff --git a/lib/routes/hkepc/index.ts b/lib/routes/hkepc/index.ts index f64bed5c9c9bf0d..d76e39ca409f62f 100644 --- a/lib/routes/hkepc/index.ts +++ b/lib/routes/hkepc/index.ts @@ -8,7 +8,7 @@ import { baseUrl, categoryMap } from './data'; export const route: Route = { path: '/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/hkepc/news', parameters: { category: '分类,见下表,默认为最新消息' }, features: { diff --git a/lib/routes/infoq/presentations.ts b/lib/routes/infoq/presentations.ts index bb328de14e3719e..cf65ee228501b25 100644 --- a/lib/routes/infoq/presentations.ts +++ b/lib/routes/infoq/presentations.ts @@ -179,7 +179,7 @@ export const route: Route = { If you subscribe to [InfoQ Live Jan 2024](https://www.infoq.com/infoq-live-jan-2024/presentations/),where the URL is \`https://www.infoq.com/infoq-live-jan-2024/presentations/\`, extract the part \`https://www.infoq.com/\` to the end, which is \`/presentations/\`, and use it as the parameter to fill in. Therefore, the route will be [\`/infoq/presentations/infoq-live-jan-2024\`](https://rsshub.app/infoq/presentations/infoq-live-jan-2024). ::: `, - categories: ['programming'], + categories: ['programming', 'popular'], features: { requireConfig: false, diff --git a/lib/routes/infoq/recommend.ts b/lib/routes/infoq/recommend.ts index b2ec6aa303f1930..4ed3acd83ebf7bc 100644 --- a/lib/routes/infoq/recommend.ts +++ b/lib/routes/infoq/recommend.ts @@ -5,7 +5,7 @@ import utils from './utils'; export const route: Route = { path: '/recommend', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/infoq/recommend', parameters: {}, features: { diff --git a/lib/routes/infoq/topic.ts b/lib/routes/infoq/topic.ts index 7915b18bddfb0d4..77d41671963171a 100644 --- a/lib/routes/infoq/topic.ts +++ b/lib/routes/infoq/topic.ts @@ -5,7 +5,7 @@ import utils from './utils'; export const route: Route = { path: '/topic/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/infoq/topic/1', parameters: { id: '话题id,可在 [InfoQ全部话题](https://www.infoq.cn/topics) 页面找到URL里的话题id' }, features: { diff --git a/lib/routes/informedainews/docs.ts b/lib/routes/informedainews/docs.ts index 4838ee5f9aa617a..12ac700693803b0 100644 --- a/lib/routes/informedainews/docs.ts +++ b/lib/routes/informedainews/docs.ts @@ -6,7 +6,7 @@ import cache from '@/utils/cache'; export const route: Route = { path: '/zh-Hans/docs/:type', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/informedainews/zh-Hans/docs/world-news-daily', parameters: { type: 'world-news-daily|tech-enthusiast-weekly|ai-enthusiast-daily' }, features: { From fdfd7e056184e326bf6a785d2f25fcb2fc8a3449 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 26 Nov 2024 13:00:27 +0800 Subject: [PATCH 604/740] chore(route): add more new media routes --- lib/routes/line/publisher.ts | 2 +- lib/routes/line/today.ts | 2 +- lib/routes/liveuamap/index.ts | 2 +- lib/routes/macfilos/blog.ts | 2 +- lib/routes/matters/namespace.ts | 2 +- lib/routes/mirror/index.ts | 2 +- lib/routes/mygopen/index.ts | 2 +- lib/routes/nautil/topics.ts | 2 +- lib/routes/odaily/activity.ts | 2 +- lib/routes/odaily/newsflash.ts | 2 +- lib/routes/odaily/post.ts | 2 +- lib/routes/odaily/search-news.ts | 2 +- lib/routes/odaily/user.ts | 2 +- lib/routes/panewslab/author.ts | 2 +- lib/routes/panewslab/news.ts | 2 +- lib/routes/panewslab/profundity.ts | 2 +- lib/routes/panewslab/topic.ts | 2 +- lib/routes/phoronix/index.ts | 2 +- lib/routes/psyche/topic.ts | 2 +- lib/routes/questmobile/report.ts | 2 +- lib/routes/readhub/daily.ts | 2 +- lib/routes/readhub/index.ts | 2 +- lib/routes/rebase/geekdaily.ts | 2 +- lib/routes/thepetcity/index.ts | 2 +- 24 files changed, 24 insertions(+), 24 deletions(-) diff --git a/lib/routes/line/publisher.ts b/lib/routes/line/publisher.ts index 9307d761d1b0f99..ba673fb6bd045d5 100644 --- a/lib/routes/line/publisher.ts +++ b/lib/routes/line/publisher.ts @@ -4,7 +4,7 @@ import { baseUrl, parseList, parseItems } from './utils'; export const route: Route = { path: '/today/:edition/publisher/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/line/today/th/publisher/101048', parameters: { edition: 'Edition, see table above', id: 'Channel ID, can be found in URL' }, radar: [ diff --git a/lib/routes/line/today.ts b/lib/routes/line/today.ts index da835e7fc4fe7ef..5cb9e88d4833416 100644 --- a/lib/routes/line/today.ts +++ b/lib/routes/line/today.ts @@ -4,7 +4,7 @@ import { baseUrl as rootUrl, parseList, parseItems } from './utils'; export const route: Route = { path: '/today/:edition?/:tab?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/line/today', parameters: { edition: 'Edition, see below, Taiwan by default', tab: 'Tag, can be found in URL, `top` by default' }, radar: [ diff --git a/lib/routes/liveuamap/index.ts b/lib/routes/liveuamap/index.ts index cfa1ea48bdcd7b4..d79b3d75220462b 100644 --- a/lib/routes/liveuamap/index.ts +++ b/lib/routes/liveuamap/index.ts @@ -6,7 +6,7 @@ import InvalidParameterError from '@/errors/types/invalid-parameter'; export const route: Route = { path: '/:region?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/liveuamap', parameters: { region: 'region 热点地区,默认为`ukraine`,其他选项见liveuamap.com的三级域名' }, features: { diff --git a/lib/routes/macfilos/blog.ts b/lib/routes/macfilos/blog.ts index f79c4e530652d76..f1391f72104387f 100644 --- a/lib/routes/macfilos/blog.ts +++ b/lib/routes/macfilos/blog.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/blog', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/macfilos/blog', parameters: {}, features: { diff --git a/lib/routes/matters/namespace.ts b/lib/routes/matters/namespace.ts index dd1b255a940ba36..1fd32ba4d7c6134 100644 --- a/lib/routes/matters/namespace.ts +++ b/lib/routes/matters/namespace.ts @@ -3,6 +3,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'Matters', url: 'matters.town', - categories: ['new-media'], + categories: ['new-media', 'popular'], lang: 'en', }; diff --git a/lib/routes/mirror/index.ts b/lib/routes/mirror/index.ts index 9025647795a5779..e477c12d819c685 100644 --- a/lib/routes/mirror/index.ts +++ b/lib/routes/mirror/index.ts @@ -11,7 +11,7 @@ import InvalidParameterError from '@/errors/types/invalid-parameter'; export const route: Route = { path: '/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/mirror/tingfei.eth', parameters: { id: 'user id' }, features: { diff --git a/lib/routes/mygopen/index.ts b/lib/routes/mygopen/index.ts index 8271f187b53057c..f318c5f462b983b 100644 --- a/lib/routes/mygopen/index.ts +++ b/lib/routes/mygopen/index.ts @@ -4,7 +4,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:label?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/mygopen', parameters: { label: '分類,见下表,默认为首页' }, features: { diff --git a/lib/routes/nautil/topics.ts b/lib/routes/nautil/topics.ts index 116ee9c1add915f..82cecd704ef8ae8 100644 --- a/lib/routes/nautil/topics.ts +++ b/lib/routes/nautil/topics.ts @@ -12,7 +12,7 @@ const baseUrl = 'https://nautil.us'; export const route: Route = { path: '/topic/:tid', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/nautil/topic/arts', parameters: { tid: 'topic' }, features: { diff --git a/lib/routes/odaily/activity.ts b/lib/routes/odaily/activity.ts index 806061c6fcefc40..41f99b570529aad 100644 --- a/lib/routes/odaily/activity.ts +++ b/lib/routes/odaily/activity.ts @@ -8,7 +8,7 @@ import { rootUrl } from './utils'; export const route: Route = { path: '/activity', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/odaily/activity', parameters: {}, features: { diff --git a/lib/routes/odaily/newsflash.ts b/lib/routes/odaily/newsflash.ts index a1834f3d7939739..20dcfa1ce783666 100644 --- a/lib/routes/odaily/newsflash.ts +++ b/lib/routes/odaily/newsflash.ts @@ -6,7 +6,7 @@ import { rootUrl } from './utils'; export const route: Route = { path: '/newsflash', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/odaily/newsflash', parameters: {}, features: { diff --git a/lib/routes/odaily/post.ts b/lib/routes/odaily/post.ts index 53e0db4c48653d5..c7c85814cc48fb5 100644 --- a/lib/routes/odaily/post.ts +++ b/lib/routes/odaily/post.ts @@ -19,7 +19,7 @@ const titles = { export const route: Route = { path: '/:id?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/odaily', parameters: { id: 'id,见下表,默认为最新' }, features: { diff --git a/lib/routes/odaily/search-news.ts b/lib/routes/odaily/search-news.ts index 8a9e3159c20b31c..13108ca21d334e4 100644 --- a/lib/routes/odaily/search-news.ts +++ b/lib/routes/odaily/search-news.ts @@ -6,7 +6,7 @@ import { rootUrl } from './utils'; export const route: Route = { path: '/search/news/:keyword', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/odaily/search/news/RSS3', parameters: { keyword: '搜索关键字' }, features: { diff --git a/lib/routes/odaily/user.ts b/lib/routes/odaily/user.ts index 84704c8ce413121..3f0cdf92c13e3ae 100644 --- a/lib/routes/odaily/user.ts +++ b/lib/routes/odaily/user.ts @@ -8,7 +8,7 @@ import { rootUrl } from './utils'; export const route: Route = { path: '/user/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/odaily/user/2147486902', parameters: { id: '用户 id,可在用户页地址栏中找到' }, features: { diff --git a/lib/routes/panewslab/author.ts b/lib/routes/panewslab/author.ts index d4c66eb323cc494..d8a8c539027fd55 100644 --- a/lib/routes/panewslab/author.ts +++ b/lib/routes/panewslab/author.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: ['/author/:id', '/column/:id'], - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/panewslab/author/166', parameters: { id: '专栏 id,可在地址栏 URL 中找到' }, features: { diff --git a/lib/routes/panewslab/news.ts b/lib/routes/panewslab/news.ts index 23ae5f5db8214ad..cbc24f45aaa0ba0 100644 --- a/lib/routes/panewslab/news.ts +++ b/lib/routes/panewslab/news.ts @@ -4,7 +4,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/news', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/panewslab/news', radar: [ { diff --git a/lib/routes/panewslab/profundity.ts b/lib/routes/panewslab/profundity.ts index 18703bce39177ba..f2cdac8c793e982 100644 --- a/lib/routes/panewslab/profundity.ts +++ b/lib/routes/panewslab/profundity.ts @@ -21,7 +21,7 @@ const categories = { export const route: Route = { path: '/profundity/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/panewslab/profundity', parameters: { category: '分类,见下表,默认为精选' }, radar: [ diff --git a/lib/routes/panewslab/topic.ts b/lib/routes/panewslab/topic.ts index 46909c8d8f4d173..4ccf701e414fa6e 100644 --- a/lib/routes/panewslab/topic.ts +++ b/lib/routes/panewslab/topic.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/topic/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/panewslab/topic/1629365774078402', parameters: { id: '专题 id,可在地址栏 URL 中找到' }, features: { diff --git a/lib/routes/phoronix/index.ts b/lib/routes/phoronix/index.ts index e4413fd4b96eec5..2893cd06de771af 100644 --- a/lib/routes/phoronix/index.ts +++ b/lib/routes/phoronix/index.ts @@ -114,7 +114,7 @@ const tryFetch = async (category, topic) => { export const route: Route = { path: '/:category?/:topic?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/phoronix/linux/KDE', parameters: { category: 'Category', diff --git a/lib/routes/psyche/topic.ts b/lib/routes/psyche/topic.ts index 5c603469748ff3b..d3ad02d4c2d3d45 100644 --- a/lib/routes/psyche/topic.ts +++ b/lib/routes/psyche/topic.ts @@ -5,7 +5,7 @@ import { getData } from './utils'; export const route: Route = { path: '/topic/:topic', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/psyche/topic/therapeia', parameters: { topic: 'Topic' }, radar: [ diff --git a/lib/routes/questmobile/report.ts b/lib/routes/questmobile/report.ts index 75f07bb97f8491c..60fe5a3f464f506 100644 --- a/lib/routes/questmobile/report.ts +++ b/lib/routes/questmobile/report.ts @@ -31,7 +31,7 @@ const parseTree = (tree, result = []) => { export const route: Route = { path: '/report/:industry?/:label?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/questmobile/report', parameters: { industry: '行业,见下表,默认为 `-1`,即全部行业', label: '标签,见下表,默认为 `-1`,即全部标签' }, features: { diff --git a/lib/routes/readhub/daily.ts b/lib/routes/readhub/daily.ts index 5ddcbfa5ff815ac..2e36c2ed9954994 100644 --- a/lib/routes/readhub/daily.ts +++ b/lib/routes/readhub/daily.ts @@ -7,7 +7,7 @@ import { rootUrl, apiRootUrl, processItems } from './util'; export const route: Route = { path: '/daily', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/readhub/daily', parameters: {}, features: { diff --git a/lib/routes/readhub/index.ts b/lib/routes/readhub/index.ts index f78073e546b5a0c..4016532f800836f 100644 --- a/lib/routes/readhub/index.ts +++ b/lib/routes/readhub/index.ts @@ -12,7 +12,7 @@ import { rootUrl, apiTopicUrl, art, processItems } from './util'; export const route: Route = { path: '/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/readhub', parameters: { category: '分类,见下表,默认为热门话题' }, features: { diff --git a/lib/routes/rebase/geekdaily.ts b/lib/routes/rebase/geekdaily.ts index 7ac9e4a7ea64caa..dee8ccbae0db340 100644 --- a/lib/routes/rebase/geekdaily.ts +++ b/lib/routes/rebase/geekdaily.ts @@ -4,7 +4,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/geekdaily', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/rebase/geekdaily', radar: [ { diff --git a/lib/routes/thepetcity/index.ts b/lib/routes/thepetcity/index.ts index 6801b02e003b93f..3783102579b7243 100644 --- a/lib/routes/thepetcity/index.ts +++ b/lib/routes/thepetcity/index.ts @@ -8,7 +8,7 @@ const baseUrl = 'https://thepetcity.co'; export const route: Route = { path: '/:term?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/thepetcity', parameters: { term: '見下表,留空為全部文章' }, radar: Object.entries(termsMap).map(([key, value]) => ({ From 8a9a3b3598dd16e2bdbb4e26451c3f54a1ebfbca Mon Sep 17 00:00:00 2001 From: MurphyYi <zy84338719@hotmail.com> Date: Tue, 26 Nov 2024 13:49:07 +0800 Subject: [PATCH 605/740] =?UTF-8?q?fix(route):=20daily.ts=20=E9=AA=A8?= =?UTF-8?q?=E6=9C=B5=E6=97=A5=E6=A6=9C=E4=BF=AE=E5=A4=8D=20(#17652)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update daily.ts fix guduo data * Update daily.ts * Update lib/routes/guduodata/daily.ts 原地址已经被官方废弃,新地址是可以正常被访问的 --- lib/routes/guduodata/daily.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/routes/guduodata/daily.ts b/lib/routes/guduodata/daily.ts index 86d4fbedee3e657..f8dc6986c269b38 100644 --- a/lib/routes/guduodata/daily.ts +++ b/lib/routes/guduodata/daily.ts @@ -8,7 +8,7 @@ import dayjs from 'dayjs'; import { art } from '@/utils/render'; import path from 'node:path'; -const host = 'http://data.guduodata.com'; +const host = 'http://d.guduodata.com'; const types = { collect: { @@ -46,13 +46,13 @@ export const route: Route = { }, radar: [ { - source: ['data.guduodata.com/'], + source: ['guduodata.com/'], }, ], name: '日榜', maintainers: ['Gem1ni'], handler, - url: 'data.guduodata.com/', + url: 'guduodata.com/', }; async function handler() { @@ -65,7 +65,7 @@ async function handler() { type: key, name: `[${yestoday}] ${types[key].name} - ${types[key].categories[category]}`, category: category.toUpperCase(), - url: `${host}/show/datalist?type=DAILY&category=${category.toUpperCase()}&date=${yestoday}`, + url: `${host}/m/v3/billboard/list?type=DAILY&category=${category.toUpperCase()}&date=${yestoday}`, })) ); return { @@ -76,7 +76,7 @@ async function handler() { items.map((item) => cache.tryGet(item.url, async () => { const response = await got.get(`${item.url}&t=${now}`, { - headers: { Referer: `http://data.guduodata.com/` }, + headers: { Referer: `http://guduodata.com/` }, }); const data = response.data.data; return { From 3471d7b11177c94a261c723f348f3d50bd9062b2 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 26 Nov 2024 14:58:54 +0800 Subject: [PATCH 606/740] chore(route): add more new media routes --- lib/routes/agirls/index.ts | 2 +- lib/routes/agirls/topic-list.ts | 2 +- lib/routes/agirls/topic.ts | 2 +- lib/routes/aliresearch/information.ts | 2 +- lib/routes/chaping/banner.ts | 2 +- lib/routes/chaping/news.ts | 2 +- lib/routes/chaping/newsflash.ts | 2 +- lib/routes/cuilingmag/index.ts | 1 + lib/routes/cyzone/author.ts | 2 +- lib/routes/cyzone/label.ts | 2 +- lib/routes/dedao/index.ts | 10 ++++++++-- lib/routes/dedao/knowledge.ts | 2 +- lib/routes/dedao/list.ts | 2 +- lib/routes/dedao/user.ts | 2 +- lib/routes/diandong/news.ts | 2 +- lib/routes/dongqiudi/daily.ts | 2 +- lib/routes/dongqiudi/player-news.ts | 2 +- lib/routes/dongqiudi/result.ts | 2 +- lib/routes/dongqiudi/special.ts | 2 +- lib/routes/dongqiudi/team-news.ts | 2 +- lib/routes/dongqiudi/top-news.ts | 2 +- lib/routes/dx2025/index.ts | 2 +- lib/routes/gcores/category.ts | 2 +- lib/routes/gcores/collection.ts | 2 +- lib/routes/gcores/radio.ts | 2 +- lib/routes/gcores/tag.ts | 2 +- lib/routes/geekpark/index.ts | 4 ++-- lib/routes/guokr/channel.ts | 2 +- lib/routes/guokr/scientific.ts | 2 +- lib/routes/hellobtc/information.ts | 2 +- lib/routes/hellobtc/kepu.ts | 2 +- lib/routes/hellobtc/news.ts | 2 +- lib/routes/huxiu/brief-column.ts | 2 +- lib/routes/huxiu/channel.ts | 2 +- lib/routes/huxiu/club.ts | 5 ++++- lib/routes/huxiu/collection.ts | 2 +- lib/routes/huxiu/member.ts | 7 +++++-- lib/routes/huxiu/moment.ts | 2 +- lib/routes/huxiu/search.ts | 2 +- lib/routes/huxiu/tag.ts | 2 +- lib/routes/medsci/index.ts | 2 +- lib/routes/mittrchina/index.ts | 2 +- lib/routes/pconline/focus.ts | 2 +- lib/routes/pingwest/status.ts | 2 +- lib/routes/pingwest/tag.ts | 2 +- lib/routes/pingwest/user.ts | 2 +- lib/routes/qbitai/category.ts | 2 +- lib/routes/qbitai/tag.ts | 2 +- lib/routes/simpleinfo/index.ts | 2 +- lib/routes/sina/sports.ts | 5 ++++- lib/routes/slowmist/slowmist.ts | 2 +- lib/routes/sohu/mp.ts | 2 +- lib/routes/sspai/activity.ts | 2 +- lib/routes/sspai/author.ts | 2 +- lib/routes/sspai/bookmarks.ts | 2 +- lib/routes/sspai/column.ts | 2 +- lib/routes/sspai/matrix.ts | 2 +- lib/routes/sspai/series-update.ts | 2 +- lib/routes/sspai/series.ts | 2 +- lib/routes/sspai/shortcuts-gallery.ts | 2 +- lib/routes/sspai/tag.ts | 2 +- lib/routes/sspai/topic.ts | 2 +- lib/routes/sspai/topics.ts | 2 +- lib/routes/startuplatte/index.ts | 2 +- lib/routes/theinitium/app.ts | 2 +- lib/routes/theinitium/author.ts | 2 +- lib/routes/theinitium/channel.ts | 2 +- lib/routes/theinitium/tags.ts | 2 +- lib/routes/thepaper/839studio/category.ts | 2 +- lib/routes/thepaper/839studio/studio.ts | 2 +- lib/routes/thepaper/channel.ts | 2 +- lib/routes/thepaper/factpaper.ts | 2 +- lib/routes/thepaper/featured.ts | 2 +- lib/routes/thepaper/list.ts | 2 +- lib/routes/thepaper/sidebar.ts | 5 ++++- lib/routes/thepaper/user.ts | 2 +- lib/routes/timednews/news.ts | 2 +- lib/routes/tophub/index.ts | 2 +- lib/routes/tophub/list.ts | 2 +- lib/routes/twreporter/category.ts | 2 +- lib/routes/twreporter/newest.ts | 2 +- lib/routes/utgd/category.ts | 2 +- lib/routes/utgd/timeline.ts | 2 +- lib/routes/utgd/topic.ts | 2 +- lib/routes/vertikal/latest.ts | 2 +- lib/routes/yahoo/news/index.ts | 2 +- lib/routes/yahoo/news/listid.ts | 2 +- lib/routes/yahoo/news/provider-helper.ts | 2 +- lib/routes/yahoo/news/provider.ts | 2 +- 89 files changed, 110 insertions(+), 91 deletions(-) diff --git a/lib/routes/agirls/index.ts b/lib/routes/agirls/index.ts index 1d6f0a8109b8848..71a9d2aaeb125ae 100644 --- a/lib/routes/agirls/index.ts +++ b/lib/routes/agirls/index.ts @@ -6,7 +6,7 @@ import { baseUrl, parseArticle } from './utils'; export const route: Route = { path: '/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/agirls/app', parameters: { category: '分类,默认为最新文章,可在对应主题页的 URL 中找到,下表仅列出部分' }, features: { diff --git a/lib/routes/agirls/topic-list.ts b/lib/routes/agirls/topic-list.ts index ceaecbc35ff8321..4827ed103fe9c7c 100644 --- a/lib/routes/agirls/topic-list.ts +++ b/lib/routes/agirls/topic-list.ts @@ -5,7 +5,7 @@ import { baseUrl } from './utils'; export const route: Route = { path: '/topic_list', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/agirls/topic_list', parameters: {}, features: { diff --git a/lib/routes/agirls/topic.ts b/lib/routes/agirls/topic.ts index ee288eacb323260..c27d3669149094b 100644 --- a/lib/routes/agirls/topic.ts +++ b/lib/routes/agirls/topic.ts @@ -6,7 +6,7 @@ import { baseUrl, parseArticle } from './utils'; export const route: Route = { path: '/topic/:topic', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/agirls/topic/AppleWatch', parameters: { topic: '精选主题,可通过下方精选主题列表获得' }, features: { diff --git a/lib/routes/aliresearch/information.ts b/lib/routes/aliresearch/information.ts index 2ee2597b067e2e5..a98eb99d788bc66 100644 --- a/lib/routes/aliresearch/information.ts +++ b/lib/routes/aliresearch/information.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/information/:type?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/aliresearch/information', parameters: { type: '类型,见下表,默认为新闻' }, features: { diff --git a/lib/routes/chaping/banner.ts b/lib/routes/chaping/banner.ts index 359f30701dd4472..5cf19fce6b1bbea 100644 --- a/lib/routes/chaping/banner.ts +++ b/lib/routes/chaping/banner.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/banner', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/chaping/banner', parameters: {}, features: { diff --git a/lib/routes/chaping/news.ts b/lib/routes/chaping/news.ts index 8dcbc3d5694411d..7977b387300ae43 100644 --- a/lib/routes/chaping/news.ts +++ b/lib/routes/chaping/news.ts @@ -17,7 +17,7 @@ const titles = { export const route: Route = { path: '/news/:caty?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/chaping/news/15', parameters: { caty: '分类,默认为全部资讯' }, features: { diff --git a/lib/routes/chaping/newsflash.ts b/lib/routes/chaping/newsflash.ts index 8f77d108083d825..2f45d044f2698f5 100644 --- a/lib/routes/chaping/newsflash.ts +++ b/lib/routes/chaping/newsflash.ts @@ -6,7 +6,7 @@ const host = 'https://chaping.cn'; export const route: Route = { path: '/newsflash', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/chaping/newsflash', parameters: {}, features: { diff --git a/lib/routes/cuilingmag/index.ts b/lib/routes/cuilingmag/index.ts index 88eca49be8c4eb1..042cd9030176e6c 100644 --- a/lib/routes/cuilingmag/index.ts +++ b/lib/routes/cuilingmag/index.ts @@ -135,6 +135,7 @@ export const route: Route = { path: '/:category?', name: '分类', url: 'cuilingmag.com', + categories: ['new-media', 'popular'], maintainers: ['nczitzk'], handler, example: '/cuilingmag', diff --git a/lib/routes/cyzone/author.ts b/lib/routes/cyzone/author.ts index 1c75e31bfda4113..dfa0254fe1ed357 100644 --- a/lib/routes/cyzone/author.ts +++ b/lib/routes/cyzone/author.ts @@ -4,7 +4,7 @@ import { rootUrl, apiRootUrl, processItems, getInfo } from './util'; export const route: Route = { path: '/author/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/cyzone/author/1225562', parameters: { id: '作者 id,可在对应作者页 URL 中找到' }, features: { diff --git a/lib/routes/cyzone/label.ts b/lib/routes/cyzone/label.ts index 9defe810e88adaf..7259e5e83d05e00 100644 --- a/lib/routes/cyzone/label.ts +++ b/lib/routes/cyzone/label.ts @@ -4,7 +4,7 @@ import { rootUrl, apiRootUrl, processItems, getInfo } from './util'; export const route: Route = { path: '/label/:name', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/cyzone/label/创业邦周报', parameters: { name: '标签名称,可在对应标签页 URL 中找到' }, features: { diff --git a/lib/routes/dedao/index.ts b/lib/routes/dedao/index.ts index d2b6150f6ec5936..bd713c36e01870e 100644 --- a/lib/routes/dedao/index.ts +++ b/lib/routes/dedao/index.ts @@ -6,8 +6,14 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:category?', - name: 'Unknown', - maintainers: [], + name: '文章', + maintainers: ['nczitzk', 'pseudoyu'], + categories: ['new-media', 'popular'], + example: '/dedao', + parameters: { category: '分类,见下表,默认为`news`' }, + description: `| 新闻 | 人物故事 | 视频 | + | ---- | ---- | ---- | + | news | figure | video |`, handler, }; diff --git a/lib/routes/dedao/knowledge.ts b/lib/routes/dedao/knowledge.ts index 68ad5bae13a1a45..d6c6ca4accc6460 100644 --- a/lib/routes/dedao/knowledge.ts +++ b/lib/routes/dedao/knowledge.ts @@ -9,7 +9,7 @@ import path from 'node:path'; export const route: Route = { path: '/knowledge/:topic?/:type?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dedao/knowledge', parameters: { topic: '话题 id,可在对应话题页 URL 中找到', type: '分享类型,`true` 指精选,`false` 指最新,默认为精选' }, features: { diff --git a/lib/routes/dedao/list.ts b/lib/routes/dedao/list.ts index 28e11dd69f4fd37..cca1c51fba7c53f 100644 --- a/lib/routes/dedao/list.ts +++ b/lib/routes/dedao/list.ts @@ -5,7 +5,7 @@ import { load } from 'cheerio'; export const route: Route = { path: '/list/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dedao/list/年度日更', parameters: { category: '分类名,默认为年度日更' }, features: { diff --git a/lib/routes/dedao/user.ts b/lib/routes/dedao/user.ts index 7e8a41bee4ecf24..e679ab52143113c 100644 --- a/lib/routes/dedao/user.ts +++ b/lib/routes/dedao/user.ts @@ -15,7 +15,7 @@ const types = { export const route: Route = { path: '/user/:id/:type?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dedao/user/VkA5OqLX4RyGxmZRNBMlwBrDaJQ9og', parameters: { id: '用户 id,可在对应用户主页 URL 中找到', type: '类型,见下表,默认为`0`,即动态' }, features: { diff --git a/lib/routes/diandong/news.ts b/lib/routes/diandong/news.ts index 8441c68159eff86..2bbd4dde55d2df8 100644 --- a/lib/routes/diandong/news.ts +++ b/lib/routes/diandong/news.ts @@ -19,7 +19,7 @@ const titleMap = { export const route: Route = { path: '/news/:cate?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/diandong/news', parameters: { cate: '分类,见下表,默认为推荐' }, features: { diff --git a/lib/routes/dongqiudi/daily.ts b/lib/routes/dongqiudi/daily.ts index c5ec38e677026ec..4a75032abdfe49f 100644 --- a/lib/routes/dongqiudi/daily.ts +++ b/lib/routes/dongqiudi/daily.ts @@ -1,7 +1,7 @@ import { Route } from '@/types'; export const route: Route = { path: '/daily', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dongqiudi/daily', radar: [ { diff --git a/lib/routes/dongqiudi/player-news.ts b/lib/routes/dongqiudi/player-news.ts index a3f8038c9ac1d78..0fb69d25c34c4ef 100644 --- a/lib/routes/dongqiudi/player-news.ts +++ b/lib/routes/dongqiudi/player-news.ts @@ -3,7 +3,7 @@ import utils from './utils'; export const route: Route = { path: '/player_news/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dongqiudi/player_news/50000339', parameters: { id: '球员 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中通过其队伍找到' }, radar: [ diff --git a/lib/routes/dongqiudi/result.ts b/lib/routes/dongqiudi/result.ts index ca3855e03d80e53..5ea324163e8451e 100644 --- a/lib/routes/dongqiudi/result.ts +++ b/lib/routes/dongqiudi/result.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/result/:team', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dongqiudi/result/50001755', parameters: { team: '球队 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中找到' }, radar: [ diff --git a/lib/routes/dongqiudi/special.ts b/lib/routes/dongqiudi/special.ts index f0b82bb99eb76d8..3fc0bae8d3eb8d7 100644 --- a/lib/routes/dongqiudi/special.ts +++ b/lib/routes/dongqiudi/special.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/special/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dongqiudi/special/41', parameters: { id: '专题 id, 可自行通过 https://www.dongqiudi.com/special/+数字匹配' }, radar: [ diff --git a/lib/routes/dongqiudi/team-news.ts b/lib/routes/dongqiudi/team-news.ts index aad780a642775c7..663d5817a4c368d 100644 --- a/lib/routes/dongqiudi/team-news.ts +++ b/lib/routes/dongqiudi/team-news.ts @@ -3,7 +3,7 @@ import utils from './utils'; export const route: Route = { path: '/team_news/:team', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dongqiudi/team_news/50001755', parameters: { team: '球队 id, 可在[懂球帝数据](https://www.dongqiudi.com/data)中找到' }, radar: [ diff --git a/lib/routes/dongqiudi/top-news.ts b/lib/routes/dongqiudi/top-news.ts index ff625baba3616c7..58b6f5c648dc276 100644 --- a/lib/routes/dongqiudi/top-news.ts +++ b/lib/routes/dongqiudi/top-news.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/top_news/:id?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dongqiudi/top_news/1', parameters: { id: '类别 id,不填默认头条新闻' }, features: { diff --git a/lib/routes/dx2025/index.ts b/lib/routes/dx2025/index.ts index c22be76c8cd5cc8..8ec00dc76bb23c7 100644 --- a/lib/routes/dx2025/index.ts +++ b/lib/routes/dx2025/index.ts @@ -5,7 +5,7 @@ import { load } from 'cheerio'; export const route: Route = { path: '/:type?/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/dx2025', parameters: { type: '内容类别,见下表,默认为空', category: '行业分类,见下表,默认为空' }, features: { diff --git a/lib/routes/gcores/category.ts b/lib/routes/gcores/category.ts index ef1813025b58dd4..064ae9d7f0cdce6 100644 --- a/lib/routes/gcores/category.ts +++ b/lib/routes/gcores/category.ts @@ -6,7 +6,7 @@ import { load } from 'cheerio'; export const route: Route = { path: '/category/:category', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/gcores/category/news', parameters: { category: '分类名' }, features: { diff --git a/lib/routes/gcores/collection.ts b/lib/routes/gcores/collection.ts index ba2b1e1229878e6..f6455e2498abec2 100644 --- a/lib/routes/gcores/collection.ts +++ b/lib/routes/gcores/collection.ts @@ -5,7 +5,7 @@ import got from '@/utils/got'; export const route: Route = { path: '/collections/:collection', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/gcores/collections/64', parameters: { collection: '专题id,可在专题页面的 URL 中找到,如 游戏开发设计心得分享 -- 64' }, features: { diff --git a/lib/routes/gcores/radio.ts b/lib/routes/gcores/radio.ts index 88a6eee013aac25..82f00763b840467 100644 --- a/lib/routes/gcores/radio.ts +++ b/lib/routes/gcores/radio.ts @@ -11,7 +11,7 @@ import path from 'node:path'; export const route: Route = { path: '/radios/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/gcores/radios/45', parameters: { category: '分类名,默认为全部,可在分类页面的 URL 中找到,如 Gadio News -- 45' }, features: { diff --git a/lib/routes/gcores/tag.ts b/lib/routes/gcores/tag.ts index d32c63351e0a68a..8d0d8acb4f6f6c2 100644 --- a/lib/routes/gcores/tag.ts +++ b/lib/routes/gcores/tag.ts @@ -6,7 +6,7 @@ import { load } from 'cheerio'; export const route: Route = { path: '/tag/:tag/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/gcores/tag/42/articles', parameters: { tag: '标签名,可在选定标签分类页面的 URL 中找到,如视觉动物——42', category: '分类名' }, features: { diff --git a/lib/routes/geekpark/index.ts b/lib/routes/geekpark/index.ts index 7fd077b92e3af26..d8f76da210e6e51 100644 --- a/lib/routes/geekpark/index.ts +++ b/lib/routes/geekpark/index.ts @@ -139,7 +139,7 @@ export const route: Route = { description: `:::tip 若订阅 [综合报道](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) | @@ -151,7 +151,7 @@ export const route: Route = { | [心科技](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'], + categories: ['new-media', 'popular'], features: { requireConfig: false, diff --git a/lib/routes/guokr/channel.ts b/lib/routes/guokr/channel.ts index 1d7c962bbf2749d..87e95d63cbf59d3 100644 --- a/lib/routes/guokr/channel.ts +++ b/lib/routes/guokr/channel.ts @@ -12,7 +12,7 @@ const channelMap = { export const route: Route = { path: '/column/:channel', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/guokr/column/calendar', parameters: { channel: '专栏类别' }, radar: [ diff --git a/lib/routes/guokr/scientific.ts b/lib/routes/guokr/scientific.ts index 691f1cc4fbb051b..bf3398e5ce29db9 100644 --- a/lib/routes/guokr/scientific.ts +++ b/lib/routes/guokr/scientific.ts @@ -4,7 +4,7 @@ import { parseList, parseItem } from './utils'; export const route: Route = { path: '/scientific', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/guokr/scientific', radar: [ { diff --git a/lib/routes/hellobtc/information.ts b/lib/routes/hellobtc/information.ts index dc3c7dfde9f3af3..50b424ba3333108 100644 --- a/lib/routes/hellobtc/information.ts +++ b/lib/routes/hellobtc/information.ts @@ -19,7 +19,7 @@ const titleMap = { export const route: Route = { path: '/information/:channel?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/hellobtc/information/latest', parameters: { channel: '类型,可填 `latest` 和 `application` 及最新和应用,默认为最新' }, features: { diff --git a/lib/routes/hellobtc/kepu.ts b/lib/routes/hellobtc/kepu.ts index 7d8cf7728f25f11..62dc96884d63962 100644 --- a/lib/routes/hellobtc/kepu.ts +++ b/lib/routes/hellobtc/kepu.ts @@ -31,7 +31,7 @@ const titleMap = { export const route: Route = { path: '/kepu/:channel?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/hellobtc/kepu/latest', parameters: { channel: '类型,见下表,默认为最新' }, features: { diff --git a/lib/routes/hellobtc/news.ts b/lib/routes/hellobtc/news.ts index be0b1b68dc602e1..4e7d0646eb3bdfe 100644 --- a/lib/routes/hellobtc/news.ts +++ b/lib/routes/hellobtc/news.ts @@ -8,7 +8,7 @@ const rootUrl = 'https://www.hellobtc.com'; export const route: Route = { path: '/news', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/hellobtc/news', parameters: {}, features: { diff --git a/lib/routes/huxiu/brief-column.ts b/lib/routes/huxiu/brief-column.ts index ffbca49210c4732..5648db7a0df7e56 100644 --- a/lib/routes/huxiu/brief-column.ts +++ b/lib/routes/huxiu/brief-column.ts @@ -6,7 +6,7 @@ import { apiBriefRootUrl, processItems, fetchBriefColumnData } from './util'; export const route: Route = { path: '/briefcolumn/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/huxiu/briefcolumn/1', parameters: { id: '简报 id,可在对应简报页 URL 中找到' }, features: { diff --git a/lib/routes/huxiu/channel.ts b/lib/routes/huxiu/channel.ts index aed26052443299c..47e2415810fd68b 100644 --- a/lib/routes/huxiu/channel.ts +++ b/lib/routes/huxiu/channel.ts @@ -6,7 +6,7 @@ import { rootUrl, apiArticleRootUrl, processItems, fetchData } from './util'; export const route: Route = { path: ['/article', '/channel/:id?'], - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/huxiu/article', parameters: {}, features: { diff --git a/lib/routes/huxiu/club.ts b/lib/routes/huxiu/club.ts index 3714685fa8e53f8..fad41f0f44b1b07 100644 --- a/lib/routes/huxiu/club.ts +++ b/lib/routes/huxiu/club.ts @@ -6,7 +6,10 @@ import { apiBriefRootUrl, processItems, fetchClubData } from './util'; export const route: Route = { path: '/club/:id', - name: 'Unknown', + name: '源流', + categories: ['new-media', 'popular'], + example: '/huxiu/club/2029', + parameters: { id: '俱乐部 id,可在对应俱乐部页 URL 中找到' }, maintainers: ['nczitzk'], handler, }; diff --git a/lib/routes/huxiu/collection.ts b/lib/routes/huxiu/collection.ts index 0112c44a59f9a00..2af03e2efd2e046 100644 --- a/lib/routes/huxiu/collection.ts +++ b/lib/routes/huxiu/collection.ts @@ -6,7 +6,7 @@ import { rootUrl, apiArticleRootUrl, processItems, fetchData } from './util'; export const route: Route = { path: '/collection/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/huxiu/collection/212', parameters: { id: '文集 id,可在对应文集页 URL 中找到' }, features: { diff --git a/lib/routes/huxiu/member.ts b/lib/routes/huxiu/member.ts index 1fca5316e428471..4ef6fd42af35148 100644 --- a/lib/routes/huxiu/member.ts +++ b/lib/routes/huxiu/member.ts @@ -6,8 +6,11 @@ import { rootUrl, apiMemberRootUrl, processItems, fetchData } from './util'; export const route: Route = { path: ['/author/:id/:type?', '/member/:id/:type?'], - name: 'Unknown', - maintainers: [], + name: '用户', + example: '/huxiu/member/2313050', + categories: ['new-media', 'popular'], + parameters: { id: '用户 id,可在对应用户页 URL 中找到' }, + maintainers: ['nczitzk'], handler, description: `| TA 的文章 | TA 的 24 小时 | | --------- | ------------- | diff --git a/lib/routes/huxiu/moment.ts b/lib/routes/huxiu/moment.ts index 01336d063b2b795..2a883a709d12a48 100644 --- a/lib/routes/huxiu/moment.ts +++ b/lib/routes/huxiu/moment.ts @@ -6,7 +6,7 @@ import { rootUrl, apiMomentRootUrl, processItems, fetchData } from './util'; export const route: Route = { path: '/moment', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/huxiu/moment', parameters: {}, features: { diff --git a/lib/routes/huxiu/search.ts b/lib/routes/huxiu/search.ts index dc7be05140cfa1c..84a97f492f5e677 100644 --- a/lib/routes/huxiu/search.ts +++ b/lib/routes/huxiu/search.ts @@ -6,7 +6,7 @@ import { rootUrl, apiSearchRootUrl, generateSignature, processItems, fetchData } export const route: Route = { path: '/search/:keyword', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/huxiu/search/生活', parameters: { keyword: '关键字' }, features: { diff --git a/lib/routes/huxiu/tag.ts b/lib/routes/huxiu/tag.ts index 16e32a306ae9967..8da32d5b57ffb8d 100644 --- a/lib/routes/huxiu/tag.ts +++ b/lib/routes/huxiu/tag.ts @@ -6,7 +6,7 @@ import { rootUrl, processItems, fetchData } from './util'; export const route: Route = { path: '/tag/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/huxiu/tag/291', parameters: { id: '标签 id,可在对应标签页 URL 中找到' }, features: { diff --git a/lib/routes/medsci/index.ts b/lib/routes/medsci/index.ts index 4695fd9e7344df0..c6d63117eeb8f67 100644 --- a/lib/routes/medsci/index.ts +++ b/lib/routes/medsci/index.ts @@ -6,7 +6,7 @@ import { parseDate, parseRelativeDate } from '@/utils/parse-date'; export const route: Route = { path: '/:sid?/:tid?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/medsci', parameters: { sid: '科室,见下表,默认为推荐', tid: '亚专业,可在对应科室页 URL 中找到,默认为该科室的全部' }, features: { diff --git a/lib/routes/mittrchina/index.ts b/lib/routes/mittrchina/index.ts index fa2d8d14d1c7a4a..d9e30b68604cfbe 100644 --- a/lib/routes/mittrchina/index.ts +++ b/lib/routes/mittrchina/index.ts @@ -10,7 +10,7 @@ import path from 'node:path'; export const route: Route = { path: '/:type?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/mittrchina/index', parameters: { type: '类型,见下表,默认为首页资讯' }, features: { diff --git a/lib/routes/pconline/focus.ts b/lib/routes/pconline/focus.ts index e818ff34bb759ff..a9a3a4c2e8f5e28 100644 --- a/lib/routes/pconline/focus.ts +++ b/lib/routes/pconline/focus.ts @@ -110,7 +110,7 @@ export const handler = async (ctx) => { export const route: Route = { path: '/focus/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/pconline/focus', parameters: { category: { diff --git a/lib/routes/pingwest/status.ts b/lib/routes/pingwest/status.ts index 9031f3895c26bea..c40ead2d7414134 100644 --- a/lib/routes/pingwest/status.ts +++ b/lib/routes/pingwest/status.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/status', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/pingwest/status', parameters: {}, features: { diff --git a/lib/routes/pingwest/tag.ts b/lib/routes/pingwest/tag.ts index 60e1807b08bedc7..e99e5bcc900c3ea 100644 --- a/lib/routes/pingwest/tag.ts +++ b/lib/routes/pingwest/tag.ts @@ -6,7 +6,7 @@ import utils from './utils'; export const route: Route = { path: '/tag/:tag/:type/:option?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/pingwest/tag/ChinaJoy/1', parameters: { tag: '话题名或话题id, 可从话题页url中得到', type: '内容类型', option: '参数, 默认无' }, features: { diff --git a/lib/routes/pingwest/user.ts b/lib/routes/pingwest/user.ts index 6f57f22453f810c..9b815d8d27931f8 100644 --- a/lib/routes/pingwest/user.ts +++ b/lib/routes/pingwest/user.ts @@ -6,7 +6,7 @@ import utils from './utils'; export const route: Route = { path: '/user/:uid/:type?/:option?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/pingwest/user/7781550877/article', parameters: { uid: '用户id, 可从用户主页中得到', type: '内容类型, 默认为`article`', option: '参数' }, features: { diff --git a/lib/routes/qbitai/category.ts b/lib/routes/qbitai/category.ts index 5b710bcb50e2510..55aad3c152657c1 100644 --- a/lib/routes/qbitai/category.ts +++ b/lib/routes/qbitai/category.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/category/:category', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/qbitai/category/资讯', parameters: { category: '分类名,见下表' }, features: { diff --git a/lib/routes/qbitai/tag.ts b/lib/routes/qbitai/tag.ts index edea512d1d5e749..34177b101f19972 100644 --- a/lib/routes/qbitai/tag.ts +++ b/lib/routes/qbitai/tag.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/tag/:tag', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/qbitai/tag/大语言模型', parameters: { tag: '标签名' }, features: { diff --git a/lib/routes/simpleinfo/index.ts b/lib/routes/simpleinfo/index.ts index 265ad771fefc4ee..12ee8fd7d050b1f 100644 --- a/lib/routes/simpleinfo/index.ts +++ b/lib/routes/simpleinfo/index.ts @@ -12,7 +12,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/simpleinfo', parameters: { category: '分类名' }, features: { diff --git a/lib/routes/sina/sports.ts b/lib/routes/sina/sports.ts index 637c8418b71cf5d..d8915d40050b54a 100644 --- a/lib/routes/sina/sports.ts +++ b/lib/routes/sina/sports.ts @@ -6,7 +6,10 @@ import { parseArticle } from './utils'; export const route: Route = { path: '/sports/:type?', - name: 'Unknown', + name: '新浪体育', + categories: ['new-media'], + example: '/sports', + parameters: { type: '类别' }, maintainers: ['nczitzk'], handler, }; diff --git a/lib/routes/slowmist/slowmist.ts b/lib/routes/slowmist/slowmist.ts index 3ca828b792de05c..86275a8c27caf5f 100644 --- a/lib/routes/slowmist/slowmist.ts +++ b/lib/routes/slowmist/slowmist.ts @@ -6,7 +6,7 @@ import { finishArticleItem } from '@/utils/wechat-mp'; export const route: Route = { path: '/:type?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/slowmist/research', parameters: { type: '分类,见下表,默认为公司新闻' }, features: { diff --git a/lib/routes/sohu/mp.ts b/lib/routes/sohu/mp.ts index b822b5f7f6eff3b..92bd976515d4920 100644 --- a/lib/routes/sohu/mp.ts +++ b/lib/routes/sohu/mp.ts @@ -11,7 +11,7 @@ import { art } from '@/utils/render'; export const route: Route = { path: '/mp/:xpt', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sohu/mp/c29odXptdGhnbjZ3NEBzb2h1LmNvbQ==', parameters: { xpt: '搜狐号 xpt ,可在URL中找到或搜狐号 ID' }, radar: [ diff --git a/lib/routes/sspai/activity.ts b/lib/routes/sspai/activity.ts index bb1855d5ac42925..8e8e816a0928621 100644 --- a/lib/routes/sspai/activity.ts +++ b/lib/routes/sspai/activity.ts @@ -4,7 +4,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/activity/:slug', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sspai/activity/urfp0d9i', parameters: { slug: '作者 slug,可在作者主页URL中找到' }, features: { diff --git a/lib/routes/sspai/author.ts b/lib/routes/sspai/author.ts index 48f13bcf4501fb4..2d24ed2b920a9c3 100644 --- a/lib/routes/sspai/author.ts +++ b/lib/routes/sspai/author.ts @@ -22,7 +22,7 @@ async function getUserId(slug) { export const route: Route = { path: '/author/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sspai/author/796518', parameters: { id: '作者 slug 或 id,slug 可在作者主页URL中找到,id 不易查找,仅作兼容' }, features: { diff --git a/lib/routes/sspai/bookmarks.ts b/lib/routes/sspai/bookmarks.ts index 5fba4ec04a3344f..095d16945a470b7 100644 --- a/lib/routes/sspai/bookmarks.ts +++ b/lib/routes/sspai/bookmarks.ts @@ -4,7 +4,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/bookmarks/:slug', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sspai/bookmarks/urfp0d9i', parameters: { slug: '用户 slug,可在个人主页URL中找到' }, features: { diff --git a/lib/routes/sspai/column.ts b/lib/routes/sspai/column.ts index e16eaea84a878b5..97ea30c84f05fd5 100644 --- a/lib/routes/sspai/column.ts +++ b/lib/routes/sspai/column.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/column/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sspai/column/262', parameters: { id: '专栏 id' }, features: { diff --git a/lib/routes/sspai/matrix.ts b/lib/routes/sspai/matrix.ts index a222d27aaaac6a8..f6e6451582045c1 100644 --- a/lib/routes/sspai/matrix.ts +++ b/lib/routes/sspai/matrix.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/matrix', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sspai/matrix', parameters: {}, features: { diff --git a/lib/routes/sspai/series-update.ts b/lib/routes/sspai/series-update.ts index 52d03b8cc4282e6..448578c02749206 100644 --- a/lib/routes/sspai/series-update.ts +++ b/lib/routes/sspai/series-update.ts @@ -4,7 +4,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/series/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sspai/series/77', parameters: { id: '专栏 id' }, features: { diff --git a/lib/routes/sspai/series.ts b/lib/routes/sspai/series.ts index 0c930f77fb11e7e..ef1f208a943ed21 100644 --- a/lib/routes/sspai/series.ts +++ b/lib/routes/sspai/series.ts @@ -5,7 +5,7 @@ import { load } from 'cheerio'; export const route: Route = { path: '/series', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sspai/series', parameters: {}, features: { diff --git a/lib/routes/sspai/shortcuts-gallery.ts b/lib/routes/sspai/shortcuts-gallery.ts index 751fde0dee28c12..eafe47a9d58fd95 100644 --- a/lib/routes/sspai/shortcuts-gallery.ts +++ b/lib/routes/sspai/shortcuts-gallery.ts @@ -4,7 +4,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/shortcuts', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sspai/shortcuts', parameters: {}, features: { diff --git a/lib/routes/sspai/tag.ts b/lib/routes/sspai/tag.ts index 2734268a7c81a86..aff876c94b9226a 100644 --- a/lib/routes/sspai/tag.ts +++ b/lib/routes/sspai/tag.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/tag/:keyword', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sspai/tag/apple', parameters: { keyword: '关键词' }, features: { diff --git a/lib/routes/sspai/topic.ts b/lib/routes/sspai/topic.ts index 5a53383a7023708..292cd51e51f2036 100644 --- a/lib/routes/sspai/topic.ts +++ b/lib/routes/sspai/topic.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/topic/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sspai/topic/250', parameters: { id: '专题 id,可在专题主页URL中找到' }, features: { diff --git a/lib/routes/sspai/topics.ts b/lib/routes/sspai/topics.ts index 90d7ecfd7db717c..5bdd6a9101874dc 100644 --- a/lib/routes/sspai/topics.ts +++ b/lib/routes/sspai/topics.ts @@ -5,7 +5,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/topics', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/sspai/topics', parameters: {}, features: { diff --git a/lib/routes/startuplatte/index.ts b/lib/routes/startuplatte/index.ts index 731db7e491f9885..3fac1cb4508e977 100644 --- a/lib/routes/startuplatte/index.ts +++ b/lib/routes/startuplatte/index.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/startuplatte', parameters: { category: '分类,见下表,默认为首頁' }, features: { diff --git a/lib/routes/theinitium/app.ts b/lib/routes/theinitium/app.ts index 5789a78ecc36d6c..bc401993ab92f2c 100644 --- a/lib/routes/theinitium/app.ts +++ b/lib/routes/theinitium/app.ts @@ -9,7 +9,7 @@ import { getCurrentPath } from '@/utils/helpers'; export const route: Route = { path: '/app/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/theinitium/app', parameters: { category: 'Category, see below, latest_sc by default', diff --git a/lib/routes/theinitium/author.ts b/lib/routes/theinitium/author.ts index a1d5dbc60055b71..c395397903c8860 100644 --- a/lib/routes/theinitium/author.ts +++ b/lib/routes/theinitium/author.ts @@ -19,5 +19,5 @@ export const route: Route = { ], handler, example: '/theinitium/author/ninghuilulu/zh-hans', - categories: ['new-media'], + categories: ['new-media', 'popular'], }; diff --git a/lib/routes/theinitium/channel.ts b/lib/routes/theinitium/channel.ts index 762446b685f21bc..1d51f1ab9c5bef0 100644 --- a/lib/routes/theinitium/channel.ts +++ b/lib/routes/theinitium/channel.ts @@ -19,7 +19,7 @@ export const route: Route = { ], handler, example: '/theinitium/channel/latest/zh-hans', - categories: ['new-media'], + categories: ['new-media', 'popular'], description: `Type 栏目: | 最新 | 深度 | What’s New | 广场 | 科技 | 风物 | 特约 | ... | diff --git a/lib/routes/theinitium/tags.ts b/lib/routes/theinitium/tags.ts index fd0beb1a284fe36..386c75d8b5f0d71 100644 --- a/lib/routes/theinitium/tags.ts +++ b/lib/routes/theinitium/tags.ts @@ -19,5 +19,5 @@ export const route: Route = { ], handler, example: '/theinitium/tags/2019_10/zh-hans', - categories: ['new-media'], + categories: ['new-media', 'popular'], }; diff --git a/lib/routes/thepaper/839studio/category.ts b/lib/routes/thepaper/839studio/category.ts index d742b93b819e628..5ac38f41122dd41 100644 --- a/lib/routes/thepaper/839studio/category.ts +++ b/lib/routes/thepaper/839studio/category.ts @@ -9,7 +9,7 @@ export const route: Route = { source: ['thepaper.cn/'], }, ], - name: 'Unknown', + name: '澎湃美数课作品集 - 分类', maintainers: ['umm233'], handler, url: 'thepaper.cn/', diff --git a/lib/routes/thepaper/839studio/studio.ts b/lib/routes/thepaper/839studio/studio.ts index eba04c4450add7b..9cab082d4d57bcd 100644 --- a/lib/routes/thepaper/839studio/studio.ts +++ b/lib/routes/thepaper/839studio/studio.ts @@ -4,7 +4,7 @@ import { load } from 'cheerio'; export const route: Route = { path: '/839studio', - name: 'Unknown', + name: '澎湃美数课作品集', maintainers: ['umm233'], handler, }; diff --git a/lib/routes/thepaper/channel.ts b/lib/routes/thepaper/channel.ts index 11d66cf2a7f2bd3..e723146afa223e6 100644 --- a/lib/routes/thepaper/channel.ts +++ b/lib/routes/thepaper/channel.ts @@ -5,7 +5,7 @@ import got from '@/utils/got'; export const route: Route = { path: '/channel/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/thepaper/channel/25950', parameters: { id: '频道 id,可在频道页 URL 中找到' }, features: { diff --git a/lib/routes/thepaper/factpaper.ts b/lib/routes/thepaper/factpaper.ts index c5623f23908f94e..e2d59e34f44bade 100644 --- a/lib/routes/thepaper/factpaper.ts +++ b/lib/routes/thepaper/factpaper.ts @@ -11,7 +11,7 @@ import path from 'node:path'; export const route: Route = { path: '/factpaper/:status?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/thepaper/factpaper', parameters: { status: '状态 id,可选 `1` 即 有定论 或 `0` 即 核查中,默认为 `1`' }, features: { diff --git a/lib/routes/thepaper/featured.ts b/lib/routes/thepaper/featured.ts index 1f4127e49b2ae17..1dc10211619d0a7 100644 --- a/lib/routes/thepaper/featured.ts +++ b/lib/routes/thepaper/featured.ts @@ -5,7 +5,7 @@ import got from '@/utils/got'; export const route: Route = { path: '/featured', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/thepaper/featured', parameters: {}, features: { diff --git a/lib/routes/thepaper/list.ts b/lib/routes/thepaper/list.ts index 26c0293925761b3..e8d1dc1f66d27f5 100644 --- a/lib/routes/thepaper/list.ts +++ b/lib/routes/thepaper/list.ts @@ -5,7 +5,7 @@ import got from '@/utils/got'; export const route: Route = { path: '/list/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/thepaper/list/25457', parameters: { id: '栏目 id,可在栏目页 URL 中找到' }, features: { diff --git a/lib/routes/thepaper/sidebar.ts b/lib/routes/thepaper/sidebar.ts index 9a82e8e8ee28ecc..ffe3bf554a23a44 100644 --- a/lib/routes/thepaper/sidebar.ts +++ b/lib/routes/thepaper/sidebar.ts @@ -16,7 +16,10 @@ export const route: Route = { target: '/sidebar', }, ], - name: 'Unknown', + name: '侧边栏', + categories: ['new-media', 'popular'], + example: '/thepaper/sidebar', + parameters: { sec: '侧边栏 id,可选 `hotNews` 即 澎湃热榜、`financialInformationNews` 即 澎湃财讯、`morningEveningNews` 即 早晚报,默认为 `hotNews`' }, maintainers: ['bigfei'], handler, url: 'thepaper.cn/', diff --git a/lib/routes/thepaper/user.ts b/lib/routes/thepaper/user.ts index d072f002484ff88..18e3a5d30080345 100644 --- a/lib/routes/thepaper/user.ts +++ b/lib/routes/thepaper/user.ts @@ -6,7 +6,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/user/:pphId', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/thepaper/user/4221423', parameters: { pphId: '澎湃号 id,可在澎湃号页 URL 中找到' }, name: '澎湃号', diff --git a/lib/routes/timednews/news.ts b/lib/routes/timednews/news.ts index 2ad750eb78a65a8..33c7b86a064d424 100644 --- a/lib/routes/timednews/news.ts +++ b/lib/routes/timednews/news.ts @@ -55,7 +55,7 @@ const PATH_LIST = { export const route: Route = { path: '/news/:type?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/timednews/news', parameters: { type: '子分类,见下表,默认为全部' }, features: { diff --git a/lib/routes/tophub/index.ts b/lib/routes/tophub/index.ts index e98709d68b778c7..05afc6f9b6b6bb4 100644 --- a/lib/routes/tophub/index.ts +++ b/lib/routes/tophub/index.ts @@ -5,7 +5,7 @@ import { config } from '@/config'; export const route: Route = { path: '/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/tophub/Om4ejxvxEN', parameters: { id: '榜单id,可在 URL 中找到' }, features: { diff --git a/lib/routes/tophub/list.ts b/lib/routes/tophub/list.ts index 975c21e79333aa3..1fbc853b3113fb4 100644 --- a/lib/routes/tophub/list.ts +++ b/lib/routes/tophub/list.ts @@ -10,7 +10,7 @@ import { art } from '@/utils/render'; export const route: Route = { path: '/list/:id', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/tophub/list/Om4ejxvxEN', parameters: { id: '榜单id,可在 URL 中找到' }, features: { diff --git a/lib/routes/twreporter/category.ts b/lib/routes/twreporter/category.ts index cf5f6bc597c901f..16aee8e321bdf93 100644 --- a/lib/routes/twreporter/category.ts +++ b/lib/routes/twreporter/category.ts @@ -6,7 +6,7 @@ import fetch from './fetch-article'; export const route: Route = { path: '/category/:category', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/twreporter/category/world', parameters: { category: 'Category' }, features: { diff --git a/lib/routes/twreporter/newest.ts b/lib/routes/twreporter/newest.ts index 017ed06054d9b74..1f746b61a64e57f 100644 --- a/lib/routes/twreporter/newest.ts +++ b/lib/routes/twreporter/newest.ts @@ -6,7 +6,7 @@ import fetch from './fetch-article'; export const route: Route = { path: '/newest', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/twreporter/newest', parameters: {}, features: { diff --git a/lib/routes/utgd/category.ts b/lib/routes/utgd/category.ts index 376fe5207821b8b..8229bbcf3b74b2a 100644 --- a/lib/routes/utgd/category.ts +++ b/lib/routes/utgd/category.ts @@ -5,7 +5,7 @@ import { rootUrl, apiRootUrl, parseResult, parseArticle } from './utils'; export const route: Route = { path: '/category/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/utgd/category/method', parameters: { category: '分类,可在对应分类页的 URL 中找到,默认为方法' }, features: { diff --git a/lib/routes/utgd/timeline.ts b/lib/routes/utgd/timeline.ts index 1b23fcec6e5a71b..d3573166239b561 100644 --- a/lib/routes/utgd/timeline.ts +++ b/lib/routes/utgd/timeline.ts @@ -5,7 +5,7 @@ import { rootUrl, apiRootUrl, parseResult, parseArticle } from './utils'; export const route: Route = { path: '/timeline', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/utgd/timeline', parameters: {}, features: { diff --git a/lib/routes/utgd/topic.ts b/lib/routes/utgd/topic.ts index 15642c88b98ac0f..ff97c9b9a2251b7 100644 --- a/lib/routes/utgd/topic.ts +++ b/lib/routes/utgd/topic.ts @@ -6,7 +6,7 @@ import { rootUrl, apiRootUrl, parseResult, parseArticle } from './utils'; export const route: Route = { path: '/topic/:topic?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/utgd/topic/在线阅读专栏', parameters: { topic: '专题,默认为在线阅读专栏' }, features: { diff --git a/lib/routes/vertikal/latest.ts b/lib/routes/vertikal/latest.ts index d7e765147a48149..831ed1242504a0d 100644 --- a/lib/routes/vertikal/latest.ts +++ b/lib/routes/vertikal/latest.ts @@ -6,7 +6,7 @@ import cache from '@/utils/cache'; export const route: Route = { path: '/latest', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/vertikal/latest', radar: [ { diff --git a/lib/routes/yahoo/news/index.ts b/lib/routes/yahoo/news/index.ts index c93b5cd26507b72..b04bc31545d6480 100644 --- a/lib/routes/yahoo/news/index.ts +++ b/lib/routes/yahoo/news/index.ts @@ -6,7 +6,7 @@ import InvalidParameterError from '@/errors/types/invalid-parameter'; export const route: Route = { path: '/news/:region/:category?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/yahoo/news/hk/world', parameters: { region: 'Region, `hk/tw/au/ca/fr/malaysia/nz/sg/uk/en(us)`, the part represented by the asterisk (*) in *.news.yahoo.com', diff --git a/lib/routes/yahoo/news/listid.ts b/lib/routes/yahoo/news/listid.ts index 834287565787929..76b44923807902b 100644 --- a/lib/routes/yahoo/news/listid.ts +++ b/lib/routes/yahoo/news/listid.ts @@ -5,7 +5,7 @@ import InvalidParameterError from '@/errors/types/invalid-parameter'; export const route: Route = { path: '/news/list/:region/:listId', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/yahoo/news/list/hk/09fcf7b0-0ab2-11e8-bf1f-4d52d4f79454', parameters: { region: '`hk`, `tw`', listId: '見下表' }, features: { diff --git a/lib/routes/yahoo/news/provider-helper.ts b/lib/routes/yahoo/news/provider-helper.ts index 505968c4e59f6e1..467a35d72bebb33 100644 --- a/lib/routes/yahoo/news/provider-helper.ts +++ b/lib/routes/yahoo/news/provider-helper.ts @@ -5,7 +5,7 @@ import InvalidParameterError from '@/errors/types/invalid-parameter'; export const route: Route = { path: '/news/providers/:region/list', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/yahoo/news/providers/tw/list', parameters: { region: '地区, 同路由"新闻来源"中的支持地区, 即 hk 或 tw' }, features: { diff --git a/lib/routes/yahoo/news/provider.ts b/lib/routes/yahoo/news/provider.ts index 8b737387b555336..cb0a4aa3e688445 100644 --- a/lib/routes/yahoo/news/provider.ts +++ b/lib/routes/yahoo/news/provider.ts @@ -5,7 +5,7 @@ import InvalidParameterError from '@/errors/types/invalid-parameter'; export const route: Route = { path: '/news/provider/:region/:providerId', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/yahoo/news/provider/tw/yahoo_tech_tw_942', parameters: { region: '地區, hk 或 tw, 分别表示香港雅虎和台湾雅虎', providerId: '新聞來源 ID, 可透過路由"新聞來源列表"獲得' }, features: { From 1b277b309e5f57a3d789eaa4d4b7c1d862caad13 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 26 Nov 2024 16:15:19 +0800 Subject: [PATCH 607/740] fix(route): aeon and bjp url --- lib/routes/aeon/namespace.ts | 2 +- lib/routes/bjp/namespace.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/aeon/namespace.ts b/lib/routes/aeon/namespace.ts index df6c32c061221bf..16fc79f2faa96bd 100644 --- a/lib/routes/aeon/namespace.ts +++ b/lib/routes/aeon/namespace.ts @@ -2,6 +2,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'AEON', - url: 'aeon.aeon.co', + url: 'aeon.co', lang: 'en', }; diff --git a/lib/routes/bjp/namespace.ts b/lib/routes/bjp/namespace.ts index ad115fadbacad14..3a5e74689f2fdcf 100644 --- a/lib/routes/bjp/namespace.ts +++ b/lib/routes/bjp/namespace.ts @@ -2,6 +2,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '北京天文馆', - url: 'bjp.org.cn', + url: 'www.bjp.org.cn', lang: 'zh-CN', }; From 80b0dfcd1e6d87bd477d020ff9df14c13f7308d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 08:25:01 +0000 Subject: [PATCH 608/740] chore(deps-dev): bump discord-api-types from 0.37.107 to 0.37.108 (#17713) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.107 to 0.37.108. - [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.107...0.37.108) --- updated-dependencies: - dependency-name: discord-api-types dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 c560d7fd6543930..dbeaa9426541d47 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "@typescript-eslint/parser": "8.15.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", - "discord-api-types": "0.37.107", + "discord-api-types": "0.37.108", "eslint": "9.15.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 87cbc4dc32ddfb1..7ccf0fc71bac355 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.9.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: - specifier: 0.37.107 - version: 0.37.107 + specifier: 0.37.108 + version: 0.37.108 eslint: specifier: 9.15.0 version: 9.15.0 @@ -2790,8 +2790,8 @@ packages: resolution: {integrity: sha512-d9paCbverdqmuwR+B40phSqiHhgPKiP8dpsMz5WT9U6ug2VVQ3tqXNCedpa6iGHg6mgv9lHaoq5DJUu2IXMjsQ==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.107: - resolution: {integrity: sha512-XOxmxnhtYIRH55kLTrc/JS3nJV1l3wfBtTptFiRGdGDOe2qdCT4DltpxSgskasfDrKfw71Z5quG4tYqTxyPJ7g==} + discord-api-types@0.37.108: + resolution: {integrity: sha512-WVdewWLnz2BvRv8r8wYLoLwL0xPycUCvN+6OirAKoHXkn+hubR2bwAFoSPfaAMDEE2QkKGAE90mUNkwGYBlIlQ==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -8306,7 +8306,7 @@ snapshots: directory-import@3.3.1: {} - discord-api-types@0.37.107: {} + discord-api-types@0.37.108: {} doctrine@3.0.0: dependencies: From f764bdefcc8c0a282424b0c9db01737da897306a Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 26 Nov 2024 16:45:44 +0800 Subject: [PATCH 609/740] chore(route/xiaohongshu): set note as default type --- lib/routes/xiaohongshu/user.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/routes/xiaohongshu/user.ts b/lib/routes/xiaohongshu/user.ts index af1c94bd1964dc6..89b82a97289f73f 100644 --- a/lib/routes/xiaohongshu/user.ts +++ b/lib/routes/xiaohongshu/user.ts @@ -43,6 +43,7 @@ export const route: Route = { label: 'collect', }, ], + default: 'notes', }, }, }; From 6f8f776e21d0e2da3e6ee864f9055aa3ac814a7b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 01:28:02 -0800 Subject: [PATCH 610/740] chore(deps-dev): bump @types/node from 22.9.3 to 22.10.0 (#17717) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.9.3 to 22.10.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 74 +++++++++++++++++++++++++------------------------- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/package.json b/package.json index dbeaa9426541d47..70eafdf9ba80a83 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.9.3", + "@types/node": "22.10.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 7ccf0fc71bac355..5b826f27f8b1916 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.9.3 - version: 22.9.3 + specifier: 22.10.0 + version: 22.10.0 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -372,7 +372,7 @@ importers: version: 0.27.6 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.9.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.10.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.108 version: 0.37.108 @@ -441,10 +441,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.3 - version: 5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.3)) + version: 5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.10.0)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.9.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.10.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1941,8 +1941,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.9.3': - resolution: {integrity: sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==} + '@types/node@22.10.0': + resolution: {integrity: sha512-XC70cRZVElFHfIUB40FgZOBbgJYFKKMa5nb9lxcwYstFG/Mi+/Y0bGS+rs6Dmhmkpq4pnNiLiuZAbc02YCOnmA==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -5438,8 +5438,8 @@ packages: unbzip2-stream@1.4.3: resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + undici-types@6.20.0: + resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==} undici@6.21.0: resolution: {integrity: sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==} @@ -6836,7 +6836,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.9.3 + '@types/node': 22.10.0 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7320,12 +7320,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.9.3 + '@types/node': 22.10.0 '@types/html-to-text@9.0.4': {} @@ -7333,13 +7333,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7349,7 +7349,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 '@types/jsrsasign@10.5.13': {} @@ -7359,7 +7359,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7381,16 +7381,16 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 form-data: 4.0.1 - '@types/node@22.9.3': + '@types/node@22.10.0': dependencies: - undici-types: 6.19.8 + undici-types: 6.20.0 '@types/normalize-package-data@2.4.4': {} @@ -7402,7 +7402,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.9.3 + '@types/node': 22.10.0 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7416,7 +7416,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.9.3 + '@types/node': 22.10.0 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7440,7 +7440,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 optional: true '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': @@ -7588,7 +7588,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.9.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.10.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7602,7 +7602,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.9.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.10.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10499,7 +10499,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.9.3 + '@types/node': 22.10.0 long: 5.2.3 proxy-agent@6.4.0: @@ -11324,7 +11324,7 @@ snapshots: buffer: 5.7.1 through: 2.3.8 - undici-types@6.19.8: {} + undici-types@6.20.0: {} undici@6.21.0: {} @@ -11424,13 +11424,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.9.3): + vite-node@2.0.5(@types/node@22.10.0): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.9.3) + vite: 5.4.10(@types/node@22.10.0) transitivePeerDependencies: - '@types/node' - less @@ -11442,27 +11442,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.9.3)): + vite-tsconfig-paths@5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.10.0)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.6.3) optionalDependencies: - vite: 5.4.10(@types/node@22.9.3) + vite: 5.4.10(@types/node@22.10.0) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.9.3): + vite@5.4.10(@types/node@22.10.0): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.4 optionalDependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.9.3)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.10.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11480,11 +11480,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.9.3) - vite-node: 2.0.5(@types/node@22.9.3) + vite: 5.4.10(@types/node@22.10.0) + vite-node: 2.0.5(@types/node@22.10.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.9.3 + '@types/node': 22.10.0 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 33148c8f5e51edafdcc648bdd4893f2a34ed9910 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 01:41:16 -0800 Subject: [PATCH 611/740] chore(deps-dev): bump @typescript-eslint/parser from 8.15.0 to 8.16.0 (#17714) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.15.0 to 8.16.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.16.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 72 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 61 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 70eafdf9ba80a83..6704ceb9c06d084 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.15.0", - "@typescript-eslint/parser": "8.15.0", + "@typescript-eslint/parser": "8.16.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.108", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5b826f27f8b1916..94594ab99333848 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -363,10 +363,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.15.0 - version: 8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3) + version: 8.15.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3) '@typescript-eslint/parser': - specifier: 8.15.0 - version: 8.15.0(eslint@9.15.0)(typescript@5.6.3) + specifier: 8.16.0 + version: 8.16.0(eslint@9.15.0)(typescript@5.6.3) '@vercel/nft': specifier: 0.27.6 version: 0.27.6 @@ -2000,8 +2000,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.15.0': - resolution: {integrity: sha512-7n59qFpghG4uazrF9qtGKBZXn7Oz4sOMm8dwNWDQY96Xlm2oX67eipqcblDj+oY1lLCbf1oltMZFpUso66Kl1A==} + '@typescript-eslint/parser@8.16.0': + resolution: {integrity: sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2018,6 +2018,10 @@ packages: resolution: {integrity: sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.16.0': + resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.15.0': resolution: {integrity: sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2036,6 +2040,10 @@ packages: resolution: {integrity: sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.16.0': + resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.14.0': resolution: {integrity: sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2054,6 +2062,15 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.16.0': + resolution: {integrity: sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@8.14.0': resolution: {integrity: sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2078,6 +2095,10 @@ packages: resolution: {integrity: sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.16.0': + resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -7443,10 +7464,10 @@ snapshots: '@types/node': 22.10.0 optional: true - '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.15.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.16.0(eslint@9.15.0)(typescript@5.6.3) '@typescript-eslint/scope-manager': 8.15.0 '@typescript-eslint/type-utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) @@ -7461,12 +7482,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.15.0(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/scope-manager': 8.15.0 - '@typescript-eslint/types': 8.15.0 - '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.15.0 + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.16.0 debug: 4.3.7 eslint: 9.15.0 optionalDependencies: @@ -7484,6 +7505,11 @@ snapshots: '@typescript-eslint/types': 8.15.0 '@typescript-eslint/visitor-keys': 8.15.0 + '@typescript-eslint/scope-manager@8.16.0': + dependencies: + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/visitor-keys': 8.16.0 + '@typescript-eslint/type-utils@8.15.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) @@ -7500,6 +7526,8 @@ snapshots: '@typescript-eslint/types@8.15.0': {} + '@typescript-eslint/types@8.16.0': {} + '@typescript-eslint/typescript-estree@8.14.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.14.0 @@ -7530,6 +7558,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.16.0(typescript@5.6.3)': + dependencies: + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/visitor-keys': 8.16.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.0(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.14.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) @@ -7563,6 +7606,11 @@ snapshots: '@typescript-eslint/types': 8.15.0 eslint-visitor-keys: 4.2.0 + '@typescript-eslint/visitor-keys@8.16.0': + dependencies: + '@typescript-eslint/types': 8.16.0 + eslint-visitor-keys: 4.2.0 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.11': From 386e2f1a57c004b24cb92494d017844b1dc1d7a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 01:47:02 -0800 Subject: [PATCH 612/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin (#17715) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.15.0 to 8.16.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.16.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 88 ++++++++++++-------------------------------------- 2 files changed, 21 insertions(+), 69 deletions(-) diff --git a/package.json b/package.json index 6704ceb9c06d084..d1fd9cae2923609 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.15.0", + "@typescript-eslint/eslint-plugin": "8.16.0", "@typescript-eslint/parser": "8.16.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 94594ab99333848..e0f3cc3f3d88121 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.15.0 - version: 8.15.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3) + specifier: 8.16.0 + version: 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3) '@typescript-eslint/parser': specifier: 8.16.0 version: 8.16.0(eslint@9.15.0)(typescript@5.6.3) @@ -1989,8 +1989,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.15.0': - resolution: {integrity: sha512-+zkm9AR1Ds9uLWN3fkoeXgFppaQ+uEVtfOV62dDmsy9QCNqlRHWNEck4yarvRNrvRcHQLGfqBNui3cimoz8XAg==} + '@typescript-eslint/eslint-plugin@8.16.0': + resolution: {integrity: sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -2014,16 +2014,12 @@ packages: resolution: {integrity: sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.15.0': - resolution: {integrity: sha512-QRGy8ADi4J7ii95xz4UoiymmmMd/zuy9azCaamnZ3FM8T5fZcex8UfJcjkiEZjJSztKfEBe3dZ5T/5RHAmw2mA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.16.0': resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.15.0': - resolution: {integrity: sha512-UU6uwXDoI3JGSXmcdnP5d8Fffa2KayOhUUqr/AiBnG1Gl7+7ut/oyagVeSkh7bxQ0zSXV9ptRh/4N15nkCqnpw==} + '@typescript-eslint/type-utils@8.16.0': + resolution: {integrity: sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2036,10 +2032,6 @@ packages: resolution: {integrity: sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.15.0': - resolution: {integrity: sha512-n3Gt8Y/KyJNe0S3yDCD2RVKrHBC4gTUcLTebVBXacPy091E6tNspFLKRXlk3hwT4G55nfr1n2AdFqi/XMxzmPQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.16.0': resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2053,15 +2045,6 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.15.0': - resolution: {integrity: sha512-1eMp2JgNec/niZsR7ioFBlsh/Fk0oJbhaqO0jRyQBMgkz7RrFfkqF9lYYmBoGBaSiLnu8TAPQTwoTUiSTUW9dg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.16.0': resolution: {integrity: sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2077,8 +2060,8 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.15.0': - resolution: {integrity: sha512-k82RI9yGhr0QM3Dnq+egEpz9qB6Un+WLYhmoNcvl8ltMEededhh7otBVVIDDsEEttauwdY/hQoSsOv13lxrFzQ==} + '@typescript-eslint/utils@8.16.0': + resolution: {integrity: sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2091,10 +2074,6 @@ packages: resolution: {integrity: sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.15.0': - resolution: {integrity: sha512-h8vYOulWec9LhpwfAdZf2bjr8xIp0KNKnpgqSz0qqYYKAW/QZKw3ktRndbiAtUz4acH4QLQavwZBYCc0wulA/Q==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.16.0': resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7464,14 +7443,14 @@ snapshots: '@types/node': 22.10.0 optional: true - '@typescript-eslint/eslint-plugin@8.15.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.16.0(eslint@9.15.0)(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.15.0 - '@typescript-eslint/type-utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.15.0 + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/type-utils': 8.16.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.16.0 eslint: 9.15.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7500,20 +7479,15 @@ snapshots: '@typescript-eslint/types': 8.14.0 '@typescript-eslint/visitor-keys': 8.14.0 - '@typescript-eslint/scope-manager@8.15.0': - dependencies: - '@typescript-eslint/types': 8.15.0 - '@typescript-eslint/visitor-keys': 8.15.0 - '@typescript-eslint/scope-manager@8.16.0': dependencies: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 - '@typescript-eslint/type-utils@8.15.0(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.16.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: - '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.15.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.6.3) debug: 4.3.7 eslint: 9.15.0 ts-api-utils: 1.4.0(typescript@5.6.3) @@ -7524,8 +7498,6 @@ snapshots: '@typescript-eslint/types@8.14.0': {} - '@typescript-eslint/types@8.15.0': {} - '@typescript-eslint/types@8.16.0': {} '@typescript-eslint/typescript-estree@8.14.0(typescript@5.6.3)': @@ -7543,21 +7515,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.15.0(typescript@5.6.3)': - dependencies: - '@typescript-eslint/types': 8.15.0 - '@typescript-eslint/visitor-keys': 8.15.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.16.0(typescript@5.6.3)': dependencies: '@typescript-eslint/types': 8.16.0 @@ -7584,12 +7541,12 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.15.0(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.16.0(eslint@9.15.0)(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) - '@typescript-eslint/scope-manager': 8.15.0 - '@typescript-eslint/types': 8.15.0 - '@typescript-eslint/typescript-estree': 8.15.0(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.16.0 + '@typescript-eslint/types': 8.16.0 + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) eslint: 9.15.0 optionalDependencies: typescript: 5.6.3 @@ -7601,11 +7558,6 @@ snapshots: '@typescript-eslint/types': 8.14.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.15.0': - dependencies: - '@typescript-eslint/types': 8.15.0 - eslint-visitor-keys: 4.2.0 - '@typescript-eslint/visitor-keys@8.16.0': dependencies: '@typescript-eslint/types': 8.16.0 From 4ee77c7204dd300cdbd437663a700d8177665bb1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 02:01:04 -0800 Subject: [PATCH 613/740] chore(deps-dev): bump typescript from 5.6.3 to 5.7.2 (#17701) Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.6.3 to 5.7.2. - [Release notes](https://github.com/microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/microsoft/TypeScript/compare/v5.6.3...v5.7.2) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 138 ++++++++++++++++++++++++------------------------- 2 files changed, 70 insertions(+), 70 deletions(-) diff --git a/package.json b/package.json index d1fd9cae2923609..daf5a863f952530 100644 --- a/package.json +++ b/package.json @@ -191,7 +191,7 @@ "prettier": "3.3.3", "remark-parse": "11.0.0", "supertest": "7.0.0", - "typescript": "5.6.3", + "typescript": "5.7.2", "unified": "11.0.5", "vite-tsconfig-paths": "5.1.3", "vitest": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e0f3cc3f3d88121..e354fcfe0b87b67 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -191,19 +191,19 @@ importers: version: 2.5.5 puppeteer: specifier: 22.6.2 - version: 22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) + version: 22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) puppeteer-extra: specifier: 3.3.6 - version: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)) + version: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10))) + version: 2.11.2(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10))) + version: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10))) + version: 2.4.1(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))) query-string: specifier: 9.1.1 version: 9.1.1 @@ -294,7 +294,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 2.11.0 - version: 2.11.0(eslint@9.15.0)(typescript@5.6.3) + version: 2.11.0(eslint@9.15.0)(typescript@5.7.2) '@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.16.0 - version: 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3) + version: 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2))(eslint@9.15.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: 8.16.0 - version: 8.16.0(eslint@9.15.0)(typescript@5.6.3) + version: 8.16.0(eslint@9.15.0)(typescript@5.7.2) '@vercel/nft': specifier: 0.27.6 version: 0.27.6 @@ -420,7 +420,7 @@ importers: version: 3.0.5 msw: specifier: 2.4.3 - version: 2.4.3(typescript@5.6.3) + version: 2.4.3(typescript@5.7.2) node-network-devtools: specifier: 1.0.22 version: 1.0.22(bufferutil@4.0.8)(undici@6.21.0)(utf-8-validate@5.0.10) @@ -434,14 +434,14 @@ importers: specifier: 7.0.0 version: 7.0.0 typescript: - specifier: 5.6.3 - version: 5.6.3 + specifier: 5.7.2 + version: 5.7.2 unified: specifier: 11.0.5 version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.3 - version: 5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.10.0)) + version: 5.1.3(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.0)) vitest: specifier: 2.0.5 version: 2.0.5(@types/node@22.10.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -5419,8 +5419,8 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typescript@5.6.3: - resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} + typescript@5.7.2: + resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} engines: {node: '>=14.17'} hasBin: true @@ -7271,9 +7271,9 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.11.0(eslint@9.15.0)(typescript@5.6.3)': + '@stylistic/eslint-plugin@2.11.0(eslint@9.15.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/utils': 8.14.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/utils': 8.14.0(eslint@9.15.0)(typescript@5.7.2) eslint: 9.15.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 @@ -7443,34 +7443,34 @@ snapshots: '@types/node': 22.10.0 optional: true - '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.6.3))(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2))(eslint@9.15.0)(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.16.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/parser': 8.16.0(eslint@9.15.0)(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/type-utils': 8.16.0(eslint@9.15.0)(typescript@5.6.3) - '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/type-utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.16.0 eslint: 9.15.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 - ts-api-utils: 1.4.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2)': dependencies: '@typescript-eslint/scope-manager': 8.16.0 '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.16.0 debug: 4.3.7 eslint: 9.15.0 optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -7484,15 +7484,15 @@ snapshots: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 - '@typescript-eslint/type-utils@8.16.0(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/type-utils@8.16.0(eslint@9.15.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) debug: 4.3.7 eslint: 9.15.0 - ts-api-utils: 1.4.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -7500,7 +7500,7 @@ snapshots: '@typescript-eslint/types@8.16.0': {} - '@typescript-eslint/typescript-estree@8.14.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@8.14.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 8.14.0 '@typescript-eslint/visitor-keys': 8.14.0 @@ -7509,13 +7509,13 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.16.0(typescript@5.6.3)': + '@typescript-eslint/typescript-estree@8.16.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 @@ -7524,32 +7524,32 @@ snapshots: is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.6.3) + ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.14.0(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.14.0(eslint@9.15.0)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) '@typescript-eslint/scope-manager': 8.14.0 '@typescript-eslint/types': 8.14.0 - '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.7.2) eslint: 9.15.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.16.0(eslint@9.15.0)(typescript@5.6.3)': + '@typescript-eslint/utils@8.16.0(eslint@9.15.0)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) '@typescript-eslint/scope-manager': 8.16.0 '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) + '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) eslint: 9.15.0 optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -8152,14 +8152,14 @@ snapshots: core-util-is@1.0.2: {} - cosmiconfig@9.0.0(typescript@5.6.3): + cosmiconfig@9.0.0(typescript@5.7.2): dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 cross-env@7.0.3: dependencies: @@ -10097,7 +10097,7 @@ snapshots: ms@2.1.3: {} - msw@2.4.3(typescript@5.6.3): + msw@2.4.3(typescript@5.7.2): dependencies: '@bundled-es-modules/cookie': 2.0.0 '@bundled-es-modules/statuses': 1.0.1 @@ -10117,7 +10117,7 @@ snapshots: type-fest: 4.26.1 yargs: 17.7.2 optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 mute-stream@0.0.8: {} @@ -10548,63 +10548,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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))): dependencies: debug: 4.3.7 - puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))) optionalDependencies: - puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))): dependencies: debug: 4.3.7 fs-extra: 10.1.0 - puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))) rimraf: 3.0.2 optionalDependencies: - puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))): dependencies: debug: 4.3.7 deepmerge: 4.3.1 - puppeteer-extra-plugin: 3.2.3(puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))) optionalDependencies: - puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(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.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10))): dependencies: '@types/debug': 4.1.12 debug: 4.3.7 merge-deep: 3.0.3 optionalDependencies: - puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)) + puppeteer-extra: 3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color - puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10)): + puppeteer-extra@3.3.6(puppeteer-core@22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10))(puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10)): dependencies: '@types/debug': 4.1.12 debug: 4.3.7 deepmerge: 4.3.1 optionalDependencies: - puppeteer: 22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10) + puppeteer: 22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) puppeteer-core: 22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - supports-color - puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.6.3)(utf-8-validate@5.0.10): + puppeteer@22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10): dependencies: '@puppeteer/browsers': 2.2.0 - cosmiconfig: 9.0.0(typescript@5.6.3) + cosmiconfig: 9.0.0(typescript@5.7.2) devtools-protocol: 0.0.1262051 puppeteer-core: 22.6.2(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: @@ -11243,9 +11243,9 @@ snapshots: trough@2.2.0: {} - ts-api-utils@1.4.0(typescript@5.6.3): + ts-api-utils@1.4.0(typescript@5.7.2): dependencies: - typescript: 5.6.3 + typescript: 5.7.2 ts-case-convert@2.1.0: {} @@ -11255,9 +11255,9 @@ snapshots: ts-xor@1.3.0: {} - tsconfck@3.1.4(typescript@5.6.3): + tsconfck@3.1.4(typescript@5.7.2): optionalDependencies: - typescript: 5.6.3 + typescript: 5.7.2 tslib@1.14.1: {} @@ -11308,7 +11308,7 @@ snapshots: dependencies: is-typedarray: 1.0.0 - typescript@5.6.3: {} + typescript@5.7.2: {} uc.micro@2.1.0: {} @@ -11442,11 +11442,11 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.3(typescript@5.6.3)(vite@5.4.10(@types/node@22.10.0)): + vite-tsconfig-paths@5.1.3(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.0)): dependencies: debug: 4.3.7 globrex: 0.1.2 - tsconfck: 3.1.4(typescript@5.6.3) + tsconfck: 3.1.4(typescript@5.7.2) optionalDependencies: vite: 5.4.10(@types/node@22.10.0) transitivePeerDependencies: From 3e2d8b414f783cf59e09845e6ca1299686f9c865 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Nov 2024 02:25:11 -0800 Subject: [PATCH 614/740] chore(deps-dev): bump prettier from 3.3.3 to 3.4.0 (#17716) Bumps [prettier](https://github.com/prettier/prettier) from 3.3.3 to 3.4.0. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.3.3...3.4.0) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 daf5a863f952530..a00b37b228672d3 100644 --- a/package.json +++ b/package.json @@ -188,7 +188,7 @@ "mockdate": "3.0.5", "msw": "2.4.3", "node-network-devtools": "1.0.22", - "prettier": "3.3.3", + "prettier": "3.4.0", "remark-parse": "11.0.0", "supertest": "7.0.0", "typescript": "5.7.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e354fcfe0b87b67..276f5d960c1df44 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -390,7 +390,7 @@ importers: version: 17.14.0(eslint@9.15.0) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.3.3) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.4.0) eslint-plugin-unicorn: specifier: 56.0.1 version: 56.0.1(eslint@9.15.0) @@ -425,8 +425,8 @@ importers: specifier: 1.0.22 version: 1.0.22(bufferutil@4.0.8)(undici@6.21.0)(utf-8-validate@5.0.10) prettier: - specifier: 3.3.3 - version: 3.3.3 + specifier: 3.4.0 + version: 3.4.0 remark-parse: specifier: 11.0.0 version: 11.0.0 @@ -4615,8 +4615,8 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + prettier@3.4.0: + resolution: {integrity: sha512-/OXNZcLyWkfo13ofOW5M7SLh+k5pnIs07owXK2teFpnfaOEcycnSy7HQxldaVX1ZP/7Q8oO1eDuQJNwbomQq5Q==} engines: {node: '>=14'} hasBin: true @@ -8583,10 +8583,10 @@ snapshots: minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.3.3): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.4.0): dependencies: eslint: 9.15.0 - prettier: 3.3.3 + prettier: 3.4.0 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: @@ -10479,7 +10479,7 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier@3.3.3: {} + prettier@3.4.0: {} process-warning@4.0.0: {} From 771f9fc91b76d0527ca0a63720c48c7cfb111797 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Tue, 26 Nov 2024 20:47:01 +0800 Subject: [PATCH 615/740] fix(route): mwm namespace close #14590 --- lib/routes/{mvm => mwm}/index.ts | 2 +- lib/routes/{mvm => mwm}/namespace.ts | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename lib/routes/{mvm => mwm}/index.ts (99%) rename lib/routes/{mvm => mwm}/namespace.ts (100%) diff --git a/lib/routes/mvm/index.ts b/lib/routes/mwm/index.ts similarity index 99% rename from lib/routes/mvm/index.ts rename to lib/routes/mwm/index.ts index 3a62b8925fe6a26..9f6ed7077e5040b 100644 --- a/lib/routes/mvm/index.ts +++ b/lib/routes/mwm/index.ts @@ -7,7 +7,7 @@ import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:category?', categories: ['journal'], - example: '/mvm', + example: '/mwm', parameters: { category: '分类,见下表,默认为本期要目' }, features: { requireConfig: false, diff --git a/lib/routes/mvm/namespace.ts b/lib/routes/mwm/namespace.ts similarity index 100% rename from lib/routes/mvm/namespace.ts rename to lib/routes/mwm/namespace.ts From b8e63d68595797e9407d6e7a663709edf115057f Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 26 Nov 2024 22:14:33 +0800 Subject: [PATCH 616/740] fix(route/dockerhub): new tag route --- lib/routes/dockerhub/tag.ts | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/lib/routes/dockerhub/tag.ts b/lib/routes/dockerhub/tag.ts index bcb448f2ab86cd3..3bcb297fcd06389 100644 --- a/lib/routes/dockerhub/tag.ts +++ b/lib/routes/dockerhub/tag.ts @@ -17,7 +17,7 @@ export const route: Route = { supportScihub: false, }, name: 'Image New Tag', - maintainers: [], + maintainers: ['pseudoyu'], handler, description: `:::warning Use \`library\` as the \`owner\` for official images, such as [https://rsshub.app/dockerhub/tag/library/mysql](https://rsshub.app/dockerhub/tag/library/mysql) @@ -42,14 +42,20 @@ async function handler(ctx) { description: metadata.data.description, link, language: 'en', - item: tags.map((item) => ({ - title: `${namespace}:${item.name} was updated`, - description: `${namespace}:${item.name} was updated, supporting the architectures of ${item.images.map((img) => `${img.os}/${img.architecture}`).join(', ')}`, - link: `https://hub.docker.com/layers/${owner === 'library' ? `${image}/` : ''}${namespace}/${item.name}/images/${item.images[0].digest.replace(':', '-')}`, - author: owner, - pubDate: parseDate(item.tag_last_pushed), - // check for (1) different tag names and (2) different image hashes, considering varients of all arches - guid: `${namespace}:${item.name}@${hash(item.images)}`, - })), + item: tags.map((item) => { + const architectures = item.images?.length ? item.images.map((img) => `${img.os}/${img.architecture}`).join(', ') : 'unknown architectures'; + + const imageDigest = item.digest?.replace(':', '-') || ''; + const layerLink = `https://hub.docker.com/layers/${owner === 'library' ? `${image}/` : ''}${namespace}/${item.name}/images/${imageDigest}`; + + return { + title: `${namespace}:${item.name} was updated`, + description: `${namespace}:${item.name} was updated, supporting the ${architectures}`, + link: layerLink, + author: owner, + pubDate: parseDate(item.tag_last_pushed), + guid: `${namespace}:${item.name}@${hash(item.images || [])}`, + }; + }), }; } From d042b63ca82727f6d8f80f7d6edba3dc01f33fa0 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 26 Nov 2024 23:08:57 +0800 Subject: [PATCH 617/740] fix(api): rss3 network format --- lib/views/rss3.test.ts | 2 +- lib/views/rss3.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/views/rss3.test.ts b/lib/views/rss3.test.ts index de8cb65b972b7df..52518b99e69472c 100644 --- a/lib/views/rss3.test.ts +++ b/lib/views/rss3.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest'; import rss3 from './rss3'; -const NETWORK = 'RSS'; +const NETWORK = 'rsshub'; const TAG = 'RSS'; const TYPE = 'feed'; diff --git a/lib/views/rss3.ts b/lib/views/rss3.ts index eb5c27613b72c68..0e7c9734f09d6ae 100644 --- a/lib/views/rss3.ts +++ b/lib/views/rss3.ts @@ -6,7 +6,7 @@ import dayjs from 'dayjs'; * @returns `JSON.stringify`-ed [UMS Result](https://docs.rss3.io/docs/unified-metadata-schemas) */ -const NETWORK = 'RSS'; +const NETWORK = 'rsshub'; const TAG = 'RSS'; const TYPE = 'feed'; From a28cdc214c715b1f400e2180b43e4119fa25d9a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 09:05:12 +0000 Subject: [PATCH 618/740] chore(deps-dev): bump prettier from 3.4.0 to 3.4.1 (#17724) Bumps [prettier](https://github.com/prettier/prettier) from 3.4.0 to 3.4.1. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.4.0...3.4.1) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 a00b37b228672d3..ede83b0c710c090 100644 --- a/package.json +++ b/package.json @@ -188,7 +188,7 @@ "mockdate": "3.0.5", "msw": "2.4.3", "node-network-devtools": "1.0.22", - "prettier": "3.4.0", + "prettier": "3.4.1", "remark-parse": "11.0.0", "supertest": "7.0.0", "typescript": "5.7.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 276f5d960c1df44..239835bcee15bec 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -390,7 +390,7 @@ importers: version: 17.14.0(eslint@9.15.0) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.4.0) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.4.1) eslint-plugin-unicorn: specifier: 56.0.1 version: 56.0.1(eslint@9.15.0) @@ -425,8 +425,8 @@ importers: specifier: 1.0.22 version: 1.0.22(bufferutil@4.0.8)(undici@6.21.0)(utf-8-validate@5.0.10) prettier: - specifier: 3.4.0 - version: 3.4.0 + specifier: 3.4.1 + version: 3.4.1 remark-parse: specifier: 11.0.0 version: 11.0.0 @@ -4615,8 +4615,8 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier@3.4.0: - resolution: {integrity: sha512-/OXNZcLyWkfo13ofOW5M7SLh+k5pnIs07owXK2teFpnfaOEcycnSy7HQxldaVX1ZP/7Q8oO1eDuQJNwbomQq5Q==} + prettier@3.4.1: + resolution: {integrity: sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==} engines: {node: '>=14'} hasBin: true @@ -8583,10 +8583,10 @@ snapshots: minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.4.0): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.4.1): dependencies: eslint: 9.15.0 - prettier: 3.4.0 + prettier: 3.4.1 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: @@ -10479,7 +10479,7 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier@3.4.0: {} + prettier@3.4.1: {} process-warning@4.0.0: {} From b496e166e372bd906e6dcb90f267c804d7c61078 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 02:06:45 -0800 Subject: [PATCH 619/740] chore(deps-dev): bump discord-api-types from 0.37.108 to 0.37.109 (#17728) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.108 to 0.37.109. - [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.108...0.37.109) --- updated-dependencies: - dependency-name: discord-api-types dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 ede83b0c710c090..d438756e8de735e 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "@typescript-eslint/parser": "8.16.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", - "discord-api-types": "0.37.108", + "discord-api-types": "0.37.109", "eslint": "9.15.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 239835bcee15bec..b3408545f38ff73 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.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: - specifier: 0.37.108 - version: 0.37.108 + specifier: 0.37.109 + version: 0.37.109 eslint: specifier: 9.15.0 version: 9.15.0 @@ -2790,8 +2790,8 @@ packages: resolution: {integrity: sha512-d9paCbverdqmuwR+B40phSqiHhgPKiP8dpsMz5WT9U6ug2VVQ3tqXNCedpa6iGHg6mgv9lHaoq5DJUu2IXMjsQ==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.108: - resolution: {integrity: sha512-WVdewWLnz2BvRv8r8wYLoLwL0xPycUCvN+6OirAKoHXkn+hubR2bwAFoSPfaAMDEE2QkKGAE90mUNkwGYBlIlQ==} + discord-api-types@0.37.109: + resolution: {integrity: sha512-B4W/ao8vempNVCS4/K4CeeCGhiabTcU7ekgqJy4/RytEsgkJP9hWS0MWZMcRP3wWzU/FXi6QqqvArZTJUfc6Iw==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -8306,7 +8306,7 @@ snapshots: directory-import@3.3.1: {} - discord-api-types@0.37.108: {} + discord-api-types@0.37.109: {} doctrine@3.0.0: dependencies: From 18c6f26a8a66b9be5af609757bd5267f7c0c705a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 02:14:24 -0800 Subject: [PATCH 620/740] chore(deps-dev): bump @bbob/types from 4.1.1 to 4.2.0 (#17726) Bumps [@bbob/types](https://github.com/JiLiZART/bbob) from 4.1.1 to 4.2.0. - [Release notes](https://github.com/JiLiZART/bbob/releases) - [Changelog](https://github.com/JiLiZART/BBob/blob/master/CHANGELOG.md) - [Commits](https://github.com/JiLiZART/bbob/commits) --- updated-dependencies: - dependency-name: "@bbob/types" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index d438756e8de735e..3984c744a7a4e09 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "devDependencies": { "@babel/preset-env": "7.26.0", "@babel/preset-typescript": "7.26.0", - "@bbob/types": "4.1.1", + "@bbob/types": "4.2.0", "@eslint/eslintrc": "3.2.0", "@eslint/js": "9.15.0", "@microsoft/eslint-formatter-sarif": "3.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b3408545f38ff73..b1aea3d9b2f623b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -281,8 +281,8 @@ importers: specifier: 7.26.0 version: 7.26.0(@babel/core@7.26.0) '@bbob/types': - specifier: 4.1.1 - version: 4.1.1 + specifier: 4.2.0 + version: 4.2.0 '@eslint/eslintrc': specifier: 3.2.0 version: 3.2.0 @@ -1006,8 +1006,8 @@ packages: '@bbob/preset@4.1.1': resolution: {integrity: sha512-Qas/hd1jOoZiux9LyPDStxxbSM/qVyts3ZJmFFHa3uzT0d7mKrnHjnI7qahHdo7Ry8CyrvGDDD8qL2A4bIfMqA==} - '@bbob/types@4.1.1': - resolution: {integrity: sha512-QnA0S8YpnEUFBV8KbU5DnqydDJaIFyxp656sWGLtvHqkxNGOOSRWc1m1YqFqfrHM7tmphr4AQybFeHqE1a2/2w==} + '@bbob/types@4.2.0': + resolution: {integrity: sha512-bSCZnNg0VrPosBBUVkjBDYVKNEqwT0jTNuzvAuNrZkuILgUKtLYI9GHuT8rY4lZecCb7UqGDsHsYt0YJO36eJg==} '@bcoe/v8-coverage@0.2.3': resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} @@ -6526,35 +6526,35 @@ snapshots: dependencies: '@bbob/parser': 4.1.1 '@bbob/plugin-helper': 4.1.1 - '@bbob/types': 4.1.1 + '@bbob/types': 4.2.0 '@bbob/html@4.1.1': dependencies: '@bbob/core': 4.1.1 '@bbob/plugin-helper': 4.1.1 - '@bbob/types': 4.1.1 + '@bbob/types': 4.2.0 '@bbob/parser@4.1.1': dependencies: '@bbob/plugin-helper': 4.1.1 - '@bbob/types': 4.1.1 + '@bbob/types': 4.2.0 '@bbob/plugin-helper@4.1.1': dependencies: - '@bbob/types': 4.1.1 + '@bbob/types': 4.2.0 '@bbob/preset-html5@4.1.1': dependencies: '@bbob/plugin-helper': 4.1.1 '@bbob/preset': 4.1.1 - '@bbob/types': 4.1.1 + '@bbob/types': 4.2.0 '@bbob/preset@4.1.1': dependencies: '@bbob/plugin-helper': 4.1.1 - '@bbob/types': 4.1.1 + '@bbob/types': 4.2.0 - '@bbob/types@4.1.1': {} + '@bbob/types@4.2.0': {} '@bcoe/v8-coverage@0.2.3': {} From 5bdf9401b6e30d2a4dd00fb86aaa23363747b713 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 02:43:26 -0800 Subject: [PATCH 621/740] chore(deps): bump @bbob/preset-html5 from 4.1.1 to 4.2.0 (#17727) Bumps [@bbob/preset-html5](https://github.com/JiLiZART/bbob) from 4.1.1 to 4.2.0. - [Release notes](https://github.com/JiLiZART/bbob/releases) - [Changelog](https://github.com/JiLiZART/BBob/blob/master/CHANGELOG.md) - [Commits](https://github.com/JiLiZART/bbob/commits) --- updated-dependencies: - dependency-name: "@bbob/preset-html5" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 3984c744a7a4e09..b37fb63ca2acfcc 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ }, "dependencies": { "@bbob/html": "4.1.1", - "@bbob/preset-html5": "4.1.1", + "@bbob/preset-html5": "4.2.0", "@hono/node-server": "1.13.7", "@hono/zod-openapi": "0.18.0", "@notionhq/client": "2.2.15", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b1aea3d9b2f623b..a746bc1aa58227d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,8 +19,8 @@ importers: specifier: 4.1.1 version: 4.1.1 '@bbob/preset-html5': - specifier: 4.1.1 - version: 4.1.1 + specifier: 4.2.0 + version: 4.2.0 '@hono/node-server': specifier: 1.13.7 version: 1.13.7(hono@4.6.12) @@ -1000,8 +1000,8 @@ packages: '@bbob/plugin-helper@4.1.1': resolution: {integrity: sha512-Ew7V2Yym+Os6wtiR4Se1irudFY5wLSTZGRNy8CSPq3QqBMk1LDi7phQvj8SFfqFCElG/UDciQb07lE7KQpiqbA==} - '@bbob/preset-html5@4.1.1': - resolution: {integrity: sha512-9dgO0Jui2qYshObGezso9AU30dtFYGg0AfvxDONATkL+1lBpIvwUrL3Xj+gDUotAdRw6QHCaU0x+rplxa0CLnA==} + '@bbob/preset-html5@4.2.0': + resolution: {integrity: sha512-X2EIeb2vqTz/n34KWQXEL5IC0SuB6i2/ltRpEaMTyK7IoDEs0XGIWcqVpenb7Z2d4eNA3gTWhkoUUkKlZmfQRQ==} '@bbob/preset@4.1.1': resolution: {integrity: sha512-Qas/hd1jOoZiux9LyPDStxxbSM/qVyts3ZJmFFHa3uzT0d7mKrnHjnI7qahHdo7Ry8CyrvGDDD8qL2A4bIfMqA==} @@ -6543,7 +6543,7 @@ snapshots: dependencies: '@bbob/types': 4.2.0 - '@bbob/preset-html5@4.1.1': + '@bbob/preset-html5@4.2.0': dependencies: '@bbob/plugin-helper': 4.1.1 '@bbob/preset': 4.1.1 From fce3dd977dd903e64dc319bb378e950b216d2f82 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:57:29 +0000 Subject: [PATCH 622/740] chore(deps): bump @bbob/html from 4.1.1 to 4.2.0 (#17725) Bumps [@bbob/html](https://github.com/JiLiZART/bbob) from 4.1.1 to 4.2.0. - [Release notes](https://github.com/JiLiZART/bbob/releases) - [Changelog](https://github.com/JiLiZART/BBob/blob/master/CHANGELOG.md) - [Commits](https://github.com/JiLiZART/bbob/commits) --- updated-dependencies: - dependency-name: "@bbob/html" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 b37fb63ca2acfcc..ccdb0d655cd82ad 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "*.yml": "eslint --cache --fix" }, "dependencies": { - "@bbob/html": "4.1.1", + "@bbob/html": "4.2.0", "@bbob/preset-html5": "4.2.0", "@hono/node-server": "1.13.7", "@hono/zod-openapi": "0.18.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a746bc1aa58227d..a1cbee32bbbeba4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,8 +16,8 @@ importers: .: dependencies: '@bbob/html': - specifier: 4.1.1 - version: 4.1.1 + specifier: 4.2.0 + version: 4.2.0 '@bbob/preset-html5': specifier: 4.2.0 version: 4.2.0 @@ -991,8 +991,8 @@ packages: '@bbob/core@4.1.1': resolution: {integrity: sha512-cH2Fi+K1R0lKlEcUk+vQbOWP3Lny+A/jyYvrN1pRL71TEdamvbvlb5vTT8dwtOs5hWKFxMsDOcIVchjVaZmiFg==} - '@bbob/html@4.1.1': - resolution: {integrity: sha512-u1PsKlsM9os+TI9zqB2jh3CdGuZrNcGCAII/ZocgoW/asu49OXWQrcGHheJqBbeZLRagXMHYTWJ+W/DvDEgZ3g==} + '@bbob/html@4.2.0': + resolution: {integrity: sha512-mZG7MmE/YluH1/FNCr2Jv/Vz3Mq5stZ5tFAjBmYpVVN6Ndus4+FA84vKoHFdUHDiuU1p/e2/o/VUrwsWwLdoIA==} '@bbob/parser@4.1.1': resolution: {integrity: sha512-pNSx4WWp9qBpUf8pgfINEAxtN0E829IPNdDioP8JNf2N3enFFrDWdkVq3TnEy2QWyTBhEA+n5ARMM+lSId1w5A==} @@ -6528,7 +6528,7 @@ snapshots: '@bbob/plugin-helper': 4.1.1 '@bbob/types': 4.2.0 - '@bbob/html@4.1.1': + '@bbob/html@4.2.0': dependencies: '@bbob/core': 4.1.1 '@bbob/plugin-helper': 4.1.1 From b6956b2314ad9ab9f298a5fde1d723a6c9d8bd6d Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Wed, 27 Nov 2024 06:16:30 -0800 Subject: [PATCH 623/740] fix(route): agirls topic list (#17731) --- lib/routes/agirls/{index.ts => z-index.ts} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename lib/routes/agirls/{index.ts => z-index.ts} (100%) diff --git a/lib/routes/agirls/index.ts b/lib/routes/agirls/z-index.ts similarity index 100% rename from lib/routes/agirls/index.ts rename to lib/routes/agirls/z-index.ts From f59d7dae2bc120dec4e4c949401c1634387f1b87 Mon Sep 17 00:00:00 2001 From: GhhG123 <100225935+GhhG123@users.noreply.github.com> Date: Thu, 28 Nov 2024 01:30:00 +0800 Subject: [PATCH 624/740] feat(routes/shu): add routes for SHU's Int'l Dept, Grad School, and Campus Highlights. (#17730) * feat(routes/shu): add routes for SHU's Int'l Dept, Grad School, and Campus Highlights - Corrected the root URL in `index.ts`. - Added routes for: - SHU's International Department (Int'l Dept). - Graduate School (Grad School). - Campus Highlights. - Noted the unavailability of the policy in `jwb.ts` with a comment in `index.ts`. * Update lib/routes/shu/index.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/shu/jwb.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Apply camelCase to variable names across the project. * Refactor: change to use detailed request format for GET request. * feat: refine content extraction and fix gs.shu.edu.cn issues - Refactored content extraction to focus on specific descriptions. - Added exception handling for inaccessible gs1.shu.edu.cn links. - Fixed bug where gs.shu.edu.cn content could not be retrieved. - Fixed Code scanning/ESLint warning: replaced disallowed syntax with .toArray(). * fix: Resolve ESLint warnings and errors * Update lib/routes/shu/xykd.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * fix: Resolve ESLint warnings and errors again * fix: Resolve ESLint warnings and errors --------- --- lib/routes/shu/global.ts | 94 ++++++++++++++++++++++++++++++++ lib/routes/shu/gs.ts | 106 ++++++++++++++++++++++++++++++++++++ lib/routes/shu/index.ts | 99 +++++++++++++++++++-------------- lib/routes/shu/jwb.ts | 14 ++--- lib/routes/shu/namespace.ts | 3 +- lib/routes/shu/xykd.ts | 98 +++++++++++++++++++++++++++++++++ 6 files changed, 365 insertions(+), 49 deletions(-) create mode 100644 lib/routes/shu/global.ts create mode 100644 lib/routes/shu/gs.ts create mode 100644 lib/routes/shu/xykd.ts diff --git a/lib/routes/shu/global.ts b/lib/routes/shu/global.ts new file mode 100644 index 000000000000000..b4e91d37b1857e4 --- /dev/null +++ b/lib/routes/shu/global.ts @@ -0,0 +1,94 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; // cheerio@1.0.0 +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +const noticeType = { + tzgg: { title: '上海大学国际部港澳台-通知公告', url: 'https://global.shu.edu.cn/cd/tzgg/3.htm' }, +}; + +export const route: Route = { + path: '/global/:type?', + categories: ['university'], + example: '/shu/global/tzgg', + parameters: { type: '分类,默认为通知公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['global.shu.edu.cn/'], + target: '/global', + }, + ], + name: '国际部港澳台办公室', + maintainers: ['GhhG123'], + handler, + url: 'global.shu.edu.cn/', + description: `| 通知公告 | + | -------- | + | tzgg |`, +}; + +async function handler(ctx) { + const type = ctx.req.param('type') ?? 'tzgg'; + const rootUrl = 'https://global.shu.edu.cn'; + + // 发起 HTTP GET 请求 + const response = await got({ + method: 'get', + + /* headers: { + 'user-agent': UA, + cookie: await getCookie(ctx), + }, */ + url: noticeType[type].url, + }); + + const $ = load(response.data); + + const list = $('div.only-list1 ul li') // 定位到HTML结构中的li元素 + .toArray() + .map((el) => { + const item = $(el); // 使用Cheerio包装每个li元素 + const rawLink = item.find('a').attr('href'); + const pubDate = item.find('span').text().trim(); // 提取日期 + + return { + title: item.find('a').text().trim(), // 获取标题 + link: rawLink ? new URL(rawLink, rootUrl).href : rootUrl, // 生成完整链接 + pubDate: timezone(parseDate(pubDate, 'YYYY年MM月DD日'), +8), // 解析并转换日期 + description: '', // 没有提供简要描述,设为空字符串 + }; + }); + + 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); // 使用cheerio解析内容 + + item.description = content('#vsb_content_2 .v_news_content').html() || '内容无法提取';// 提取内容区详情 + + return item; // 返回完整的item + }) + ) + ); + + return { + title: noticeType[type].title, + description: noticeType[type].title, + link: noticeType[type].url, + item: items, + }; +} diff --git a/lib/routes/shu/gs.ts b/lib/routes/shu/gs.ts new file mode 100644 index 000000000000000..adf7a97eae76d8d --- /dev/null +++ b/lib/routes/shu/gs.ts @@ -0,0 +1,106 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; // cheerio@1.0.0 +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +const noticeType = { + zhxw: { title: '上海大学研究生院-综合新闻', url: 'https://gs.shu.edu.cn/xwlb/zh.htm' }, // 综合新闻 + pygl: { title: '上海大学研究生院-培养管理', url: 'https://gs.shu.edu.cn/xwlb/py.htm' }, // local //BUG error: Request https://gs1.shu.edu.cn:8080/py/KCBInfo.asp fail: TypeError: fetch failed + gjjl: { title: '上海大学研究生院-国际交流', url: 'https://gs.shu.edu.cn/xwlb/gjjl.htm' }, +}; + +export const route: Route = { + path: '/gs/:type?', + categories: ['university'], + example: '/shu/gs/zhxw', + parameters: { type: '分类,默认为学术公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['gs.shu.edu.cn/'], + target: '/gs', + }, + ], + name: '研究生院', + maintainers: ['GhhG123'], + handler, + url: 'gs.shu.edu.cn/', + description: `| 综合新闻 | 培养管理 | 国际交流 | + | -------- | --------- | --------- | + | zhxw | pygl | gjjl |`, +}; + +async function handler(ctx) { + const type = ctx.req.param('type') ?? 'zhxw'; + const rootUrl = 'https://gs.shu.edu.cn'; + + // 发起 HTTP GET 请求 + const response = await got({ + method: 'get', + + /* headers: { + 'user-agent': UA, + cookie: await getCookie(ctx), + }, */ + url: noticeType[type].url, + }); + + const $ = load(response.data); + + const list = $('tr[id^="line_u17_"]') // 定位到每个包含新闻的<tr>元素 + .toArray() + .map((el) => { + const item = $(el); // 使用Cheerio包装每个<tr>元素 + const rawLink = item.find('a').attr('href'); // 获取链接 + const title = item.find('a').text().trim(); // 获取标题 + const dateParts = item.find('td').eq(1).text().trim(); // 获取日期 + + return { + title, // 获取标题 + link: rawLink ? new URL(rawLink, rootUrl).href : rootUrl, // 生成完整链接 + pubDate: timezone(parseDate(dateParts, 'YYYY/MM/DD HH:mm:ss'), +8), // 解析日期 + description: item.find('td').eq(2).text().trim(), // 提取访问次数或其他信息 + }; + }); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const url = new URL(item.link); // 创建 URL 对象以验证链接 + // 确保链接是以正确的域名开头,并且不为空 + if (url.hostname === 'gs1.shu.edu.cn') { // 需校内访问 + // Skip or handle differently for URLs with gs1.shu.edu.cn domain + item.description = 'gs1.shu.edu.cn, 无法直接获取'; + return item; + } + + const detailResponse = await got({ + method: 'get', + url: item.link + }); // 获取详情页内容 + const content = load(detailResponse.data); // 使用cheerio解析内容 + + item.description = content('#vsb_content .v_news_content').html() || item.description; + + + return item; // 返回完整的item + }) + ) + ); + + return { + title: noticeType[type].title, + description: noticeType[type].title, + link: noticeType[type].url, + item: items, + }; +} diff --git a/lib/routes/shu/index.ts b/lib/routes/shu/index.ts index 33dabbd888d754e..2a07078226a06d1 100644 --- a/lib/routes/shu/index.ts +++ b/lib/routes/shu/index.ts @@ -1,23 +1,20 @@ import { Route } from '@/types'; import cache from '@/utils/cache'; import got from '@/utils/got'; -import { load } from 'cheerio'; +import { load } from 'cheerio'; // cheerio@1.0.0 import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; -const host = 'https://www.shu.edu.cn/'; -const alias = new Map([ - ['news', 'zhxw'], // 综合新闻 - ['research', 'kydt1'], // 科研动态 - ['kydt', 'kydt1'], // 科研动态 - ['notice', 'tzgg'], // 通知公告 - ['important', 'zyxw'], // 重要新闻 -]); +const noticeType = { + tzgg: { title: '上海大学 - 通知公告', url: 'https://www.shu.edu.cn/tzgg.htm' }, + zyxw: { title: '上海大学 - 重要新闻', url: 'https://www.shu.edu.cn/zyxw.htm' }, +}; export const route: Route = { - path: '/:type?', + path: '/news/:type?', categories: ['university'], - example: '/shu/news', - parameters: { type: '消息类型,默认为`news`' }, + example: '/shu/news/tzgg', + parameters: { type: '分类,默认为通知公告' }, features: { requireConfig: false, requirePuppeteer: false, @@ -28,50 +25,70 @@ export const route: Route = { }, radar: [ { - source: ['www.shu.edu.cn/:type'], - target: '/:type', + source: ['www.shu.edu.cn/'], + target: '/news', }, ], - name: '官网信息', - maintainers: ['lonelyion'], + name: '官网通知公告', + maintainers: ['lonelyion', 'GhhG123'], handler, - description: `| 综合新闻 | 科研动态 | 通知公告 | 重要新闻 | - | -------- | -------- | -------- | --------- | - | news | research | notice | important |`, + url: 'www.shu.edu.cn/', + description: `| 通知公告 | 重要新闻 | + | -------- | --------- | + | tzgg | zyxw |`, }; async function handler(ctx) { - const type = ctx.req.param('type') || 'news'; - const link = `https://www.shu.edu.cn/${alias.get(type) || type}.htm`; - const respond = await got.get(link); - const $ = load(respond.data); - const title = $('title').text(); - const list = $('.ej_main .list') - .find('li') - .slice(0, 5) + const type = ctx.req.param('type') ?? 'tzgg'; + const rootUrl = 'https://www.shu.edu.cn'; + + // 发起 HTTP GET 请求 + const response = await got({ + method: 'get', + + /* headers: { + 'user-agent': UA, + cookie: await getCookie(ctx), + }, */ + url: noticeType[type].url, + }); + + const $ = load(response.data); + + const list = $('div.list ul li') // 以下获取信息需要根据网页结构定制 + // For cheerio 1.x.x . The item parameter in the .map callback is now explicitly typed as a Cheerio<Element>, not just Element. --fixed .toArray() - .map((ele) => ({ - title: $(ele).find('.bt').text(), - link: new URL($(ele).find('a').attr('href'), host).href, - date: $(ele).find('.sj').text(), - })); + .map((el) => { + const item = $(el); // Wrap `el` in a Cheerio object + const rawLink = item.find('a').attr('href'); + return { + title: item.find('p.bt').text().trim(), + link: rawLink ? new URL(rawLink, rootUrl).href : rootUrl, + pubDate: timezone(parseDate(item.find('p.sj').text().trim(), 'YYYY.MM.DD'), +8), + description: item.find('p.zy').text().trim(), + }; + }); - const all = await Promise.all( + const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { - const response = await got.get(item.link); - const $ = load(response.data); - item.author = $('.xx>:nth-child(2)').text().trim().slice(3); // 投稿:xxx - item.pubDate = parseDate(item.date, 'YYYY.MM.DD'); - item.description = $('.v_news_content').html() || item.title; + const detailResponse = await got({ + method: 'get', + url: item.link + }); + const content = load(detailResponse.data); + + item.description = content('#vsb_content .v_news_content').html() || item.description; + return item; }) ) ); return { - title, - link, - item: all, + title: noticeType[type].title, + description: noticeType[type].title, + link: noticeType[type].url, + item: items, }; } diff --git a/lib/routes/shu/jwb.ts b/lib/routes/shu/jwb.ts index 6870cf345e19072..cc5d00a145b52bb 100644 --- a/lib/routes/shu/jwb.ts +++ b/lib/routes/shu/jwb.ts @@ -8,21 +8,21 @@ const host = 'https://jwb.shu.edu.cn/'; const alias = new Map([ ['notice', 'tzgg'], // 通知公告 ['news', 'xw'], // 新闻动态 - ['policy', 'zcwj'], // 政策文件 + /* ['policy', 'zcwj'], 政策文件 //BUG */ ]); export const route: Route = { - path: ['/jwc/:type?', '/jwb/:type?'], + path: ['/jwb/:type?'], radar: [ { - source: ['www.shu.edu.cn/:type'], - target: '/:type', + source: ['www.shu.edu.cn/index'], + target: '/:type?', }, ], - name: 'Unknown', - maintainers: [], + name: '教务部', + maintainers: ['tuxinghuan', 'GhhG123'], handler, - description: `| 通知通告 | 新闻 | 政策文件 | + description: `| 通知通告 | 新闻 | 政策文件(bug) | | -------- | ---- | -------- | | notice | news | policy |`, }; diff --git a/lib/routes/shu/namespace.ts b/lib/routes/shu/namespace.ts index 2422221655cd7e9..35930c2a2167590 100644 --- a/lib/routes/shu/namespace.ts +++ b/lib/routes/shu/namespace.ts @@ -2,6 +2,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: '上海大学', - url: 'jwb.shu.edu.cn', + url: 'www.shu.edu.cn', + description: '上海大学相关网网站', lang: 'zh-CN', }; diff --git a/lib/routes/shu/xykd.ts b/lib/routes/shu/xykd.ts new file mode 100644 index 000000000000000..8dd2aca955108d2 --- /dev/null +++ b/lib/routes/shu/xykd.ts @@ -0,0 +1,98 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import got from '@/utils/got'; +import { load } from 'cheerio'; // cheerio@1.0.0 +import { parseDate } from '@/utils/parse-date'; +import timezone from '@/utils/timezone'; + +const noticeType = { + whxx: { title: '上海大学 - 文化信息', url: 'https://www.shu.edu.cn/xnrc/whxx.htm' }, + xsbg: { title: '上海大学 - 学术报告', url: 'https://www.shu.edu.cn/xnrc/xsbg.htm' }, +}; + +export const route: Route = { + path: '/xykd/:type?', + categories: ['university'], + example: '/shu/xykd/xsbg', + parameters: { type: '分类,默认为学术公告' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.shu.edu.cn/'], + target: '/xykd', + }, + ], + name: '校园看点', + maintainers: ['GhhG123'], + handler, + url: 'www.shu.edu.cn/', + description: `| 文化信息 | 学术报告 | + | -------- | --------- | + | whxx | xsbg |`, +}; + +async function handler(ctx) { + const type = ctx.req.param('type') ?? 'xsbg'; + const rootUrl = 'https://www.shu.edu.cn'; + + // 发起 HTTP GET 请求 + const response = await got({ + method: 'get', + + /* headers: { + 'user-agent': UA, + cookie: await getCookie(ctx), + }, */ + url: noticeType[type].url, + }); + + const $ = load(response.data); + + const list = $('div.xsbg_list ul li') // 定位到HTML结构中的li元素 + .toArray() + .map((el) => { + const item = $(el); // 使用Cheerio包装每个li元素 + const rawLink = item.find('a').attr('href'); + const dateParts = item + .find('div.sj p') + .toArray() + .map((p) => $(p).text().trim()); // 提取日期部分 + + return { + title: item.find('p.bt').text().trim(), // 获取标题 + link: rawLink ? new URL(rawLink, rootUrl).href : rootUrl, // 生成完整链接 + pubDate: timezone(parseDate(`${dateParts[1]}-${dateParts[0]}`, 'MM-DD'), +8), // 拼接并解析日期 + description: item.find('div.zy').text().trim(), // 提取简要描述 + }; + }); + + 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); // 使用cheerio解析内容 + + item.description = content('#vsb_content_500 .v_news_content').html() || item.description; // 提取内容区详情 + + return item; // 返回完整的item + }) + ) + ); + + return { + title: noticeType[type].title, + description: noticeType[type].title, + link: noticeType[type].url, + item: items, + }; +} From cc7062d69706f9bbf55d88679fd43c0d7f0378ee Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 17:31:58 +0000 Subject: [PATCH 625/740] style: auto format --- lib/routes/shu/global.ts | 4 ++-- lib/routes/shu/gs.ts | 6 +++--- lib/routes/shu/index.ts | 2 +- lib/routes/shu/xykd.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/routes/shu/global.ts b/lib/routes/shu/global.ts index b4e91d37b1857e4..df8325799d10668 100644 --- a/lib/routes/shu/global.ts +++ b/lib/routes/shu/global.ts @@ -74,11 +74,11 @@ async function handler(ctx) { cache.tryGet(item.link, async () => { const detailResponse = await got({ method: 'get', - url: item.link + url: item.link, }); // 获取详情页内容 const content = load(detailResponse.data); // 使用cheerio解析内容 - item.description = content('#vsb_content_2 .v_news_content').html() || '内容无法提取';// 提取内容区详情 + item.description = content('#vsb_content_2 .v_news_content').html() || '内容无法提取'; // 提取内容区详情 return item; // 返回完整的item }) diff --git a/lib/routes/shu/gs.ts b/lib/routes/shu/gs.ts index adf7a97eae76d8d..0d999d47549746d 100644 --- a/lib/routes/shu/gs.ts +++ b/lib/routes/shu/gs.ts @@ -77,7 +77,8 @@ async function handler(ctx) { cache.tryGet(item.link, async () => { const url = new URL(item.link); // 创建 URL 对象以验证链接 // 确保链接是以正确的域名开头,并且不为空 - if (url.hostname === 'gs1.shu.edu.cn') { // 需校内访问 + if (url.hostname === 'gs1.shu.edu.cn') { + // 需校内访问 // Skip or handle differently for URLs with gs1.shu.edu.cn domain item.description = 'gs1.shu.edu.cn, 无法直接获取'; return item; @@ -85,13 +86,12 @@ async function handler(ctx) { const detailResponse = await got({ method: 'get', - url: item.link + url: item.link, }); // 获取详情页内容 const content = load(detailResponse.data); // 使用cheerio解析内容 item.description = content('#vsb_content .v_news_content').html() || item.description; - return item; // 返回完整的item }) ) diff --git a/lib/routes/shu/index.ts b/lib/routes/shu/index.ts index 2a07078226a06d1..b14b3697338e13a 100644 --- a/lib/routes/shu/index.ts +++ b/lib/routes/shu/index.ts @@ -74,7 +74,7 @@ async function handler(ctx) { cache.tryGet(item.link, async () => { const detailResponse = await got({ method: 'get', - url: item.link + url: item.link, }); const content = load(detailResponse.data); diff --git a/lib/routes/shu/xykd.ts b/lib/routes/shu/xykd.ts index 8dd2aca955108d2..be6b7966bcd4991 100644 --- a/lib/routes/shu/xykd.ts +++ b/lib/routes/shu/xykd.ts @@ -78,7 +78,7 @@ async function handler(ctx) { cache.tryGet(item.link, async () => { const detailResponse = await got({ method: 'get', - url: item.link + url: item.link, }); // 获取详情页内容 const content = load(detailResponse.data); // 使用cheerio解析内容 From 4b64e22c0fec58ec4819b9292a06e1c7bcf7edb7 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Wed, 27 Nov 2024 13:03:03 -0800 Subject: [PATCH 626/740] fix(route): taptap (#17732) * fix(route): taptap * fix(route): correct language code formatting in TapTap routes --- lib/routes/taptap/changelog-cn.ts | 29 ++ lib/routes/taptap/changelog-intl.ts | 34 ++ lib/routes/taptap/changelog.ts | 71 ----- lib/routes/taptap/common/changelog.ts | 40 +++ lib/routes/taptap/common/review.ts | 126 ++++++++ lib/routes/taptap/namespace.ts | 4 +- lib/routes/taptap/review-cn.ts | 33 ++ lib/routes/taptap/review-intl.ts | 41 +++ lib/routes/taptap/review.ts | 166 ---------- lib/routes/taptap/templates/videoPost.art | 1 - lib/routes/taptap/topic.ts | 64 ++-- lib/routes/taptap/types.ts | 363 ++++++++++++++++++++++ lib/routes/taptap/utils.ts | 40 +-- 13 files changed, 722 insertions(+), 290 deletions(-) create mode 100644 lib/routes/taptap/changelog-cn.ts create mode 100644 lib/routes/taptap/changelog-intl.ts delete mode 100644 lib/routes/taptap/changelog.ts create mode 100644 lib/routes/taptap/common/changelog.ts create mode 100644 lib/routes/taptap/common/review.ts create mode 100644 lib/routes/taptap/review-cn.ts create mode 100644 lib/routes/taptap/review-intl.ts delete mode 100644 lib/routes/taptap/review.ts create mode 100644 lib/routes/taptap/types.ts diff --git a/lib/routes/taptap/changelog-cn.ts b/lib/routes/taptap/changelog-cn.ts new file mode 100644 index 000000000000000..52c9574b0347b5f --- /dev/null +++ b/lib/routes/taptap/changelog-cn.ts @@ -0,0 +1,29 @@ +import { Route } from '@/types'; +import { handler } from './common/changelog'; + +export const route: Route = { + path: '/changelog/:id/:lang?', + categories: ['game'], + example: '/taptap/changelog/60809/en_US', + parameters: { + id: '游戏 ID,游戏主页 URL 中获取', + lang: '语言,默认使用 `zh_CN`,亦可使用 `en_US`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.taptap.cn/app/:id'], + target: '/changelog/:id', + }, + ], + name: '游戏更新', + maintainers: ['hoilc', 'ETiV'], + handler, +}; diff --git a/lib/routes/taptap/changelog-intl.ts b/lib/routes/taptap/changelog-intl.ts new file mode 100644 index 000000000000000..e16f5fefa89b90b --- /dev/null +++ b/lib/routes/taptap/changelog-intl.ts @@ -0,0 +1,34 @@ +import { Route } from '@/types'; +import { handler } from './common/changelog'; + +export const route: Route = { + path: '/intl/changelog/:id/:lang?', + categories: ['game'], + example: '/taptap/intl/changelog/191001/zh_TW', + parameters: { + id: "Game's App ID, you may find it from the URL of the Game", + lang: 'Language, checkout the table below for possible values, default is `en_US`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.taptap.io/app/:id'], + target: '/intl/changelog/:id', + }, + ], + name: "Game's Changelog", + maintainers: ['hoilc', 'ETiV'], + handler, + description: `Language Code + + | English (US) | 繁體中文 | 한국어 | 日本語 | + | ------------ | -------- | ------ | ------ | + | en_US | zh_TW | ko_KR | ja_JP |`, +}; diff --git a/lib/routes/taptap/changelog.ts b/lib/routes/taptap/changelog.ts deleted file mode 100644 index 7f7d124da3c5f12..000000000000000 --- a/lib/routes/taptap/changelog.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { Route } from '@/types'; -import got from '@/utils/got'; -import { parseDate } from '@/utils/parse-date'; -import { getRootUrl, appDetail, X_UA } from './utils'; - -export const route: Route = { - path: ['/changelog/:id/:lang?', '/intl/changelog/:id/:lang?'], - categories: ['game'], - example: '/taptap/changelog/60809/en_US', - parameters: { id: '游戏 ID,游戏主页 URL 中获取', lang: '语言,默认使用 `zh_CN`,亦可使用 `en_US`' }, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - radar: [ - { - source: ['taptap.com/app/:id'], - target: '/changelog/:id', - }, - ], - name: '游戏更新', - maintainers: ['hoilc', 'ETiV'], - handler, - description: `#### 语言代码 - - | English (US) | 繁體中文 | 한국어 | 日本語 | - | ------------ | -------- | ------ | ------ | - | en\_US | zh\_TW | ko\_KR | ja\_JP |`, -}; - -async function handler(ctx) { - const is_intl = ctx.req.url.indexOf('/intl/') === 0; - const id = ctx.req.param('id'); - const lang = ctx.req.param('lang') ?? (is_intl ? 'en_US' : 'zh_CN'); - - const url = `${getRootUrl(is_intl)}/app/${id}`; - - const app_detail = await appDetail(id, lang, is_intl); - - const app_img = app_detail.app.icon.original_url; - const app_name = app_detail.app.title; - const app_description = `${app_name} by ${app_detail.app.developers.map((item) => item.name).join(' & ')}`; - - const response = await got({ - method: 'get', - url: `${getRootUrl(is_intl)}/webapiv2/apk/v1/list-by-app?app_id=${id}&from=0&limit=10&${X_UA(lang)}`, - headers: { - Referer: url, - }, - }); - - const list = response.data.data.list; - - return { - title: `TapTap 更新记录 ${app_name}`, - description: app_description, - link: url, - image: app_img, - item: list.map((item) => ({ - title: `${app_name} / ${item.version_label}`, - description: item.whatsnew.text, - pubDate: parseDate(item.update_date * 1000), - link: url, - guid: item.version_label, - })), - }; -} diff --git a/lib/routes/taptap/common/changelog.ts b/lib/routes/taptap/common/changelog.ts new file mode 100644 index 000000000000000..fd320e3a0a35bca --- /dev/null +++ b/lib/routes/taptap/common/changelog.ts @@ -0,0 +1,40 @@ +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import { getRootUrl, appDetail, X_UA } from '../utils'; + +export async function handler(ctx) { + const requestPath = ctx.req.path.replace('/taptap', ''); + const isIntl = requestPath.startsWith('/intl/'); + const id = ctx.req.param('id'); + const lang = ctx.req.param('lang') ?? (isIntl ? 'en_US' : 'zh_CN'); + + const url = `${getRootUrl(isIntl)}/app/${id}`; + + const detail = await appDetail(id, lang, isIntl); + + const appImg = detail.app.icon.original_url; + const appName = detail.app.title; + const appDescription = `${appName}${detail.app.developers ? ' by' + detail.app.developers.map((item) => item.name).join(' & ') : ''}`; + + const response = await ofetch(`${getRootUrl(isIntl)}/webapiv2/apk/v1/list-by-app?app_id=${id}&from=0&limit=10&${X_UA(lang)}`, { + headers: { + Referer: url, + }, + }); + + const list = response.data.list; + + return { + title: `TapTap 更新记录 ${appName}`, + description: appDescription, + link: url, + image: appImg, + item: list.map((item) => ({ + title: `${appName} / ${item.version_label}`, + description: item.whatsnew.text, + pubDate: parseDate(item.update_date, 'X'), + link: url, + guid: item.version_label, + })), + }; +} diff --git a/lib/routes/taptap/common/review.ts b/lib/routes/taptap/common/review.ts new file mode 100644 index 000000000000000..80bb0602e6e9940 --- /dev/null +++ b/lib/routes/taptap/common/review.ts @@ -0,0 +1,126 @@ +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import { getRootUrl, appDetail, X_UA } from '../utils'; + +/* +const sortMap = { + default: { + en_US: 'Default', + zh_CN: '预设', + zh_TW: '預設', + }, + recent: { + en_US: 'Latest', + zh_CN: '最新', + zh_TW: '最新', + }, + hot: { + en_US: 'Popular', + zh_CN: '热门', + zh_TW: '熱門', + }, + spent: { + en_US: 'Play Time', + zh_CN: '游戏时长', + zh_TW: '遊戲時長', + }, +}; + +const intlSortMap = { + helpful: { + en_US: 'Most Helpful', + zh_TW: '最有幫助', + ja_JP: '最も役立つ', + ko_KR: '가장 도움이 된', + }, + recent: { + en_US: 'Most Recent', + zh_TW: '最新', + ja_JP: '最も最近', + ko_KR: '최근순', + }, +}; +*/ + +const makeSortParam = (isIntl: boolean, order: string) => { + if (isIntl) { + if (order === 'helpful' || order === 'recent') { + return `type=${order}`; + } + return 'type=helpful'; + } else { + if (order === 'new' || order === 'hot') { + return `sort=${order}`; + } + return 'sort=hot'; + } +}; + +const fetchMainlandItems = async (params) => { + const id = params.id; + const order = params.order ?? 'hot'; + const lang = params.lang ?? 'zh_CN'; + + let url = `${getRootUrl(false)}/webapiv2/review/v2/list-by-app?app_id=${id}&limit=10`; + url += `&${makeSortParam(false, order)}`; + url += `&${X_UA(lang)}`; + + const reviewListResponse = await ofetch(url); + + return reviewListResponse.data.list.map((review) => { + const author = review.moment.author.user.name; + const score = review.moment.review.score; + return { + title: `${author} - ${score}星`, + author, + description: review.moment.review.contents.text + (review.moment.review.contents.images ? review.moment.review.contents.images.map((img) => `<img src="${img.original_url}">`).join('') : ''), + link: `${getRootUrl(false)}/review/${review.moment.review.id}`, + pubDate: parseDate(review.moment.publish_time, 'X'), + }; + }); +}; + +const fetchIntlItems = async (params) => { + const id = params.id; + const order = params.order ?? 'helpful'; + const lang = params.lang ?? 'en_US'; + + let url = `${getRootUrl(true)}/webapiv2/feeds/v3/by-app?app_id=${id}&limit=10`; + url += `&${makeSortParam(true, order)}`; + url += `&${X_UA(lang)}`; + + const reviewListResponse = await ofetch(url); + + return reviewListResponse.data.list.map((review) => { + const author = review.post.user.name; + const score = review.post.list_fields.app_ratings[id].score; + return { + title: `${author} - ${'★'.repeat(score)}`, + author, + description: review.post.list_fields.summary || review.post.list_fields.title, + link: `${getRootUrl(true)}/post/${review.post.id_str}`, + pubDate: parseDate(review.post.published_time, 'X'), + }; + }); +}; + +export async function handler(ctx) { + const requestPath = ctx.req.path.replace('/taptap', ''); + const isIntl = requestPath.startsWith('/intl/'); + const id = ctx.req.param('id'); + const order = ctx.req.param('order') ?? 'default'; + const lang = ctx.req.param('lang') ?? (isIntl ? 'en_US' : 'zh_CN'); + + const detail = await appDetail(id, lang, isIntl); + const appImg = detail.app.icon.original_url; + const appName = detail.app.title; + + const items = isIntl ? await fetchIntlItems({ id, order, lang }) : await fetchMainlandItems({ id, order, lang }); + + return { + title: `TapTap 评价 ${appName}`, + link: `${getRootUrl(isIntl)}/app/${id}/review?${makeSortParam(isIntl, order)}`, + image: appImg, + item: items, + }; +} diff --git a/lib/routes/taptap/namespace.ts b/lib/routes/taptap/namespace.ts index c13466ece33949d..6af928b840b5faf 100644 --- a/lib/routes/taptap/namespace.ts +++ b/lib/routes/taptap/namespace.ts @@ -1,8 +1,8 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: 'TapTap 中国', - url: 'taptap.com', + name: 'TapTap', + url: 'www.taptap.io', description: `:::warning 由于区域限制,需要在有国内 IP 的机器上自建才能正常获取 RSS。\ 而对于《TapTap 国际版》则需要部署在具有海外出口的 IP 上才可正常获取 RSS。 diff --git a/lib/routes/taptap/review-cn.ts b/lib/routes/taptap/review-cn.ts new file mode 100644 index 000000000000000..dc38b771a21d1cf --- /dev/null +++ b/lib/routes/taptap/review-cn.ts @@ -0,0 +1,33 @@ +import { Route } from '@/types'; +import { handler } from './common/review'; + +export const route: Route = { + path: '/review/:id/:order?/:lang?', + categories: ['game'], + example: '/taptap/review/142793/hot', + parameters: { + id: '游戏 ID,游戏主页 URL 中获取', + order: '排序方式,空为综合,可选如下', + lang: '语言,`zh-CN` 或 `zh-TW`,默认为 `zh-CN`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.taptap.cn/app/:id/review', 'www.taptap.cn/app/:id'], + target: '/review/:id', + }, + ], + name: '游戏评价', + maintainers: ['hoilc', 'TonyRL'], + handler, + description: `| 最新 | 综合 | +| --- | --- | +| new | hot |`, +}; diff --git a/lib/routes/taptap/review-intl.ts b/lib/routes/taptap/review-intl.ts new file mode 100644 index 000000000000000..88936dec4a63a13 --- /dev/null +++ b/lib/routes/taptap/review-intl.ts @@ -0,0 +1,41 @@ +import { Route } from '@/types'; +import { handler } from './common/review'; + +export const route: Route = { + path: '/intl/review/:id/:order?/:lang?', + categories: ['game'], + example: '/taptap/intl/review/82354/recent', + parameters: { + id: "Game's App ID, you may find it from the URL of the Game", + order: 'Sort Method, default is `helpful`, checkout the table below for possible values', + lang: 'Language, checkout the table below for possible values, default is `en_US`', + }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.taptap.io/app/:id/review', 'www.taptap.io/app/:id'], + target: '/intl/review/:id', + }, + ], + name: 'Ratings & Reviews', + maintainers: ['hoilc', 'TonyRL', 'ETiV'], + handler, + description: `Sort Method + +| Most Helpful | Most Recent | +| ------------ | ----------- | +| helpful | recent | + +Language Code + +| English (US) | 繁體中文 | 한국어 | 日本語 | +| ------------ | -------- | ------ | ------ | +| en_US | zh_TW | ko_KR | ja_JP |`, +}; diff --git a/lib/routes/taptap/review.ts b/lib/routes/taptap/review.ts deleted file mode 100644 index ac3568e4ba65893..000000000000000 --- a/lib/routes/taptap/review.ts +++ /dev/null @@ -1,166 +0,0 @@ -import { Route } from '@/types'; -import got from '@/utils/got'; -import { parseDate } from '@/utils/parse-date'; -import { getRootUrl, appDetail, X_UA } from './utils'; - -const sortMap = { - default: { - en_US: 'Default', - zh_CN: '预设', - zh_TW: '預設', - }, - new: { - en_US: 'Latest', - zh_CN: '最新', - zh_TW: '最新', - }, - hot: { - en_US: 'Popular', - zh_CN: '热门', - zh_TW: '熱門', - }, - spent: { - en_US: 'Play Time', - zh_CN: '游戏时长', - zh_TW: '遊戲時長', - }, -}; - -const intlSortMap = { - default: { - en_US: 'Most Relevant', - zh_TW: '最相關', - ja_JP: '関連性が高い', - ko_KR: '관련도순', - }, - new: { - en_US: 'Most Recent', - zh_TW: '最新', - ja_JP: '最も最近', - ko_KR: '최근순', - }, -}; - -const makeSortParam = (isIntl, order) => { - if (isIntl) { - if (order === 'new') { - return `sort=${order}`; - } - } else { - if (order === 'new' || order === 'hot' || order === 'spent') { - return `sort=${order}`; - } - } - return ''; -}; - -const fetchMainlandItems = async (params) => { - const id = params.id; - const order = params.order ?? 'default'; - const lang = params.lang ?? 'zh_CN'; - - let url = `${getRootUrl(false)}/webapiv2/review/v2/by-app?app_id=${id}&limit=10`; - url += `&${makeSortParam(false, order)}`; - url += `&${X_UA(lang)}`; - - const reviews_list_response = await got(url); - const reviews_list = reviews_list_response.data.data.list; - - return reviews_list.map((review) => { - const author = review.moment.author.user.name; - const score = review.moment.extended_entities.reviews[0].score; - return { - title: `${author} - ${score}星`, - author, - description: review.moment.extended_entities.reviews[0].contents.text, - link: `${getRootUrl(false)}/review/${review.moment.extended_entities.reviews[0].id}`, - pubDate: parseDate(review.moment.extended_entities.reviews[0].created_time * 1000), - }; - }); -}; - -const fetchIntlItems = async (params) => { - const id = params.id; - const order = params.order ?? 'default'; - const lang = params.lang ?? 'en_US'; - - let url = `${getRootUrl(true)}/webapiv2/feeds/v1/app-ratings?app_id=${id}&limit=10`; - url += `&${makeSortParam(true, order)}`; - url += `&${X_UA(lang)}`; - - const reviews_list_response = await got(url); - const reviews_list = reviews_list_response.data.data.list; - - return reviews_list.map((review) => { - const author = review.post.user.name; - const score = review.post.list_fields.app_ratings[id].score; - return { - title: `${author} - ${score}星`, - author, - description: review.post.list_fields.summary || review.post.list_fields.title, - link: `${getRootUrl(true)}/post/${review.post.id_str}`, - pubDate: parseDate(review.post.published_time * 1000), - }; - }); -}; - -async function handler(ctx) { - const is_intl = ctx.req.url.indexOf('/intl/') === 0; - const id = ctx.req.param('id'); - const order = ctx.req.param('order') ?? 'default'; - const lang = ctx.req.param('lang') ?? (is_intl ? 'en_US' : 'zh_CN'); - - const app_detail = await appDetail(id, lang, is_intl); - const app_img = app_detail.app.icon.original_url; - const app_name = app_detail.app.title; - - const items = is_intl ? await fetchIntlItems(ctx.params) : await fetchMainlandItems(ctx.params); - - const ret = { - title: `TapTap 评价 ${app_name} - ${(is_intl ? intlSortMap : sortMap)[order][lang]}排序`, - link: `${getRootUrl(is_intl)}/app/${id}/review?${makeSortParam(is_intl, order)}`, - image: app_img, - item: items, - }; - - ctx.set('json', ret); - return ret; -} - -export const route: Route = { - path: ['/review/:id/:order?/:lang?', '/intl/review/:id/:order?/:lang?'], - categories: ['game'], - example: '/taptap/review/142793/hot', - parameters: { id: '游戏 ID,游戏主页 URL 中获取', order: '排序方式,空为默认排序,可选如下', lang: '语言,`zh-CN`或`zh-TW`,默认为`zh-CN`' }, - features: { - requireConfig: false, - requirePuppeteer: false, - antiCrawler: false, - supportBT: false, - supportPodcast: false, - supportScihub: false, - }, - radar: [ - { - source: ['taptap.com/app/:id/review', 'taptap.com/app/:id'], - target: '/review/:id', - }, - ], - name: '游戏评价', - maintainers: ['hoilc', 'TonyRL'], - handler, - description: `#### 排序方式 - - | 最相关 | 最新 | - | ------- | ---- | - | default | new | - - #### 语言代码 - - | English (US) | 繁體中文 | 한국어 | 日本語 | - | ------------ | -------- | ------ | ------ | - | en\_US | zh\_TW | ko\_KR | ja\_JP |`, - description: `| 最新 | 最热 | 游戏时长 | 默认排序 | - | ------ | ---- | -------- | -------- | - | update | hot | spent | default |`, -}; diff --git a/lib/routes/taptap/templates/videoPost.art b/lib/routes/taptap/templates/videoPost.art index 184bcecb2bebf23..89d092cdf86487e 100644 --- a/lib/routes/taptap/templates/videoPost.art +++ b/lib/routes/taptap/templates/videoPost.art @@ -1,3 +1,2 @@ -{{ if intro }}{{@ intro }}{{ /if }} <p>Preview</p> <p><img src="{{@ previewUrl }}" /></p> diff --git a/lib/routes/taptap/topic.ts b/lib/routes/taptap/topic.ts index 5df3417e78e0b40..f99216b3870b1db 100644 --- a/lib/routes/taptap/topic.ts +++ b/lib/routes/taptap/topic.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 { parseDate } from '@/utils/parse-date'; import { getRootUrl, X_UA, appDetail, imagePost, topicPost, videoPost } from './utils'; @@ -27,7 +27,12 @@ export const route: Route = { path: '/topic/:id/:type?/:sort?/:lang?', categories: ['game'], example: '/taptap/topic/142793/official', - parameters: { id: '游戏 ID,游戏主页 URL 中获取', type: '论坛版块,默认显示所有帖子,论坛版块 URL 中 `type` 参数,见下表,默认为 `feed`', sort: '排序,见下表,默认为 `created`', lang: '语言,`zh-CN`或`zh-TW`,默认为`zh-CN`' }, + parameters: { + id: '游戏 ID,游戏主页 URL 中获取', + type: '论坛版块,默认显示所有帖子,论坛版块 URL 中 `type` 参数,见下表,默认为 `feed`', + sort: '排序,见下表,默认为 `created`', + lang: '语言,`zh-CN`或`zh-TW`,默认为`zh-CN`', + }, features: { requireConfig: false, requirePuppeteer: false, @@ -38,7 +43,7 @@ export const route: Route = { }, radar: [ { - source: ['taptap.com/app/:id/topic', 'taptap.com/app/:id'], + source: ['taptap.cn/app/:id/topic', 'taptap.cn/app/:id'], target: '/topic/:id', }, ], @@ -46,12 +51,12 @@ export const route: Route = { maintainers: ['hoilc', 'TonyRL'], handler, description: `| 全部 | 精华 | 官方 | 影片 | - | ---- | ----- | -------- | ----- | - | feed | elite | official | video | +| ---- | ----- | -------- | ----- | +| feed | elite | official | video | - | 发布时间 | 回复时间 | - | -------- | --------- | - | created | commented |`, +| 发布时间 | 回复时间 | 默认排序 | +| -------- | --------- | ------- | +| created | commented | default |`, }; async function handler(ctx) { @@ -61,31 +66,30 @@ async function handler(ctx) { const type = ctx.req.param('type') ?? 'feed'; const sort = ctx.req.param('sort') ?? 'created'; const groupId = appData.group.id; - const app_img = appData.app.icon.original_url || appData.app.icon.url; - const app_name = appData.app.title; - const url = `${getRootUrl(false)}/webapiv2/feed/v6/by-group?group_id=${groupId}&type=${type}&sort=${sort}&${X_UA(lang)}`; + const appImg = appData.app.icon.original_url || appData.app.icon.url; + const appName = appData.app.title; + const url = `${getRootUrl(false)}/webapiv2/feed/v7/by-group?group_id=${groupId}&type=${type}&sort=${sort}&${X_UA(lang)}`; - const topics_list_response = await got(url); - const topics_list = topics_list_response.data; + const topicsList = await ofetch(url); + const list = topicsList.data.list; const out = await Promise.all( - topics_list.data.list.map((list) => { - const link = list.moment.sharing?.url || list.moment.extended_entities?.topics?.[0].sharing.url || list.moment.extended_entities?.videos?.[0].sharing.url; + list.map(({ moment }) => { + const link = moment.sharing.url; return cache.tryGet(link, async () => { - const author = list.moment.author.user.name; - const topicId = list.moment.extended_entities?.topics?.[0].id; + const author = moment.author.user.name; + const topicId = moment.topic.id_str; // raw_text sometimes is "" so || is better than ?? - const title = list.moment.contents?.raw_text || list.moment.extended_entities?.topics?.[0].title || list.moment.extended_entities?.videos?.[0].title; - const createdTime = list.moment.created_time; - let description = ''; - if (topicId) { - description = await topicPost(appId, topicId, lang); - } else { - description = list.moment.extended_entities?.topics?.[0].summary || list.moment.contents?.raw_text || videoPost(list.moment.extended_entities?.videos?.[0]); - if (list.moment.extended_entities?.images) { - description += imagePost(list.moment.extended_entities.images); + const title = moment.topic.title || moment.topic.summary.split(' ')[0]; + let description = moment.topic.summary || ''; + if (moment.topic.pin_video) { + description += videoPost(moment.topic.pin_video); + if (moment.topic.footer_images?.images) { + description += imagePost(moment.topic.footer_images.images); } + } else { + description = await topicPost(appId, topicId, lang); } return { @@ -93,16 +97,16 @@ async function handler(ctx) { description, author, link, - pubDate: parseDate(createdTime, 'X'), + pubDate: parseDate(moment.created_time, 'X'), }; }); }) ); const ret = { - title: `${app_name} - ${typeMap[type][lang]} - TapTap 论坛`, + title: `${appName} - ${typeMap[type][lang]} - TapTap 论坛`, link: `${getRootUrl(false)}/app/${appId}/topic?type=${type}&sort=${sort}`, - image: app_img, + image: appImg, item: out.filter((item) => item !== ''), }; @@ -110,7 +114,7 @@ async function handler(ctx) { ...ret, appId, groupId, - topics_list, + topicsList, }); return ret; } diff --git a/lib/routes/taptap/types.ts b/lib/routes/taptap/types.ts new file mode 100644 index 000000000000000..d8f35e3c4e7e55c --- /dev/null +++ b/lib/routes/taptap/types.ts @@ -0,0 +1,363 @@ +export interface Detail { + group: Group; + app: App; +} + +interface Group { + id: number; + app_id: number; + title: string; + intro: string; + has_treasure: boolean; + has_official: boolean; + icon: Icon; + banner: Banner; + moderators: Moderator[]; + log: Log; + event_log: EventLog; + stat: Stat; + web_url: string; + style_info: StyleInfo; + terms: Term[]; + sharing: Sharing; + new_rec_list: NewRecListItem[]; + actions: Actions; + title_labels: TitleLabel[]; +} + +interface Icon { + url: string; + medium_url: string; + small_url: string; + original_url: string; + original_format: string; + width: number; + height: number; + color: string; + original_size: number; +} + +interface Banner { + url: string; + medium_url: string; + small_url: string; + original_url: string; + original_format: string; + width: number; + height: number; + color: string; + original_size: number; +} + +interface Moderator { + id: number; + name: string; + avatar: string; + medium_avatar: string; + avatar_pendant: string; + badges: Badge[]; + verified: Verified; +} + +interface Badge { + id: number; + title: string; + description: string; + is_wear: boolean; + icon: BadgeIcon; + style: BadgeStyle; + time: number; + unlock_tips: string; + level: number; + status: number; +} + +interface BadgeIcon { + small: string; + middle: string; + large: string; + small_border: string; +} + +interface BadgeStyle { + background_image: string; + background_color: string; + font_color: string; + border_background_color: string; +} + +interface Verified { + type: string; + reason: string; + url: string; +} + +interface Log { + follow: Follow; + unfollow: Follow; +} + +interface Follow { + uri: string; + params: FollowParams; +} + +interface FollowParams { + type: string; + APIVersion: string; + paramId: string; + paramType: string; +} + +interface EventLog { + paramType: string; + paramId: string; +} + +interface Stat { + favorite_count: number; + topic_count: number; + elite_topic_count: number; + recent_topic_count: number; + official_topic_count: number; + top_topic_count: number; + video_count: number; + user_moment_count: number; + app_moment_count: number; + image_moment_count: number; + treasure_count: number; + topic_page_view: number; + feed_count: number; + topic_pv_total: number; +} + +interface StyleInfo { + background_color: string; + font_color: string; +} + +interface Term { + label: string; + type: string; + index: string; + params: TermParams; + sort: TermSort[]; + log: TermLog; + position: string; + referer_ext: string; + log_keyword: string; + top_params: TermParams; + sub_terms: SubTerm[]; +} + +interface TermParams { + type: string; +} + +interface TermSort { + label: string; + params: SortParams; + icon_type: string; +} + +interface SortParams { + sort: string; +} + +interface TermLog { + page_view: PageView; +} + +interface PageView { + uri: string; + params: PageViewParams; +} + +interface PageViewParams { + type: string; + APIVersion: string; + paramId: string; + paramType: string; + position: string; +} + +interface SubTerm { + label: string; + type: string; + index: string; + params: SubTermParams; + top_params: SubTermTopParams; + sort: SubTermSort[]; + log: SubTermLog; + referer_ext: string; + log_keyword: string; + uri: string; + web_url: string; +} + +interface SubTermParams { + group_label_id: string; + type: string; +} + +interface SubTermTopParams { + group_label_id: string; + is_top: string; + type: string; +} + +interface SubTermSort { + label: string; + params: SortParams; + icon_type: string; +} + +interface SubTermLog { + page_view: PageView; +} + +interface Sharing { + url: string; + title: string; + description: string; + image: Icon; +} + +interface NewRecListItem { + icon: Icon; + uri: string; + url: string; + web_url: string; + label: string; +} + +interface Actions { + publish_contents: boolean; +} + +interface TitleLabel { + label: string; + icon: Icon; +} + +interface App { + id: number; + identifier: string; + title: string; + title_labels: string[]; + icon: Icon; + price: Price; + uri: Uri; + can_view: boolean; + released_time: number; + button_flag: number; + style: number; + hidden_button: boolean; + is_deny_minors: boolean; + stat: AppStat; + ad_banner: Icon; + top_banner: Icon; + banner: Icon; + tags: Tag[]; + log: AppLog; + event_log: EventLog; + can_buy_redeem_code: CanBuyRedeemCode; + show_module: ShowModule[]; + complaint: Complaint; + serial_number: SerialNumber; + rec_text: string; + readable_id: string; + m_button_map: object; + description: Description; + title_labels_v2: TitleLabel[]; + stat_key: string; + include_app_product_type_complete: boolean; + is_console_game: boolean; +} + +interface Price { + taptap_current: string; + discount_rate: number; +} + +interface Uri { + google: string; + google_play: string; + apple: string; + download_site: string; +} + +interface AppStat { + rating: Rating; + vote_info: VoteInfo; + hits_total: number; + play_total: number; + bought_count: number; + feed_count: number; + reserve_count: number; + recent_sandbox_played_count: number; + album_count: number; + review_count: number; + topic_count: number; + video_count: number; + official_topic_count: number; + official_video_count: number; + official_album_count: number; + fans_count: number; +} + +interface Rating { + score: string; + max: number; + latest_score: string; + latest_version_score: string; +} + +interface VoteInfo { + 1: number; + 2: number; + 3: number; + 4: number; + 5: number; +} + +interface Tag { + id: number; + value: string; + uri: string; + web_url: string; +} + +interface AppLog { + follow: Follow; + open: Follow; + page_view: Follow; + play: Follow; + reserve: Follow; + unfollow: Follow; + unreserved: Follow; +} + +interface CanBuyRedeemCode { + flag: boolean; +} + +interface ShowModule { + key: string; + value: boolean; +} + +interface Complaint { + uri: string; + web_url: string; + url: string; +} + +interface SerialNumber { + number_exists: boolean; + button_action: number; +} + +interface Description { + text: string; +} diff --git a/lib/routes/taptap/utils.ts b/lib/routes/taptap/utils.ts index 9c7ff36f88471db..602e91963ada63a 100644 --- a/lib/routes/taptap/utils.ts +++ b/lib/routes/taptap/utils.ts @@ -1,24 +1,26 @@ import { getCurrentPath } from '@/utils/helpers'; const __dirname = getCurrentPath(import.meta.url); -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import path from 'node:path'; import { art } from '@/utils/render'; +import cache from '@/utils/cache'; +import { Detail } from './types'; -// Please do not change %26 to & -const X_UA = (lang = 'zh_CN') => `X-UA=V=1%26PN=WebApp%26VN=0.1.0%26LANG=${lang}%26PLT=PC`; +const X_UA = (lang = 'zh_CN') => `X-UA=${encodeURIComponent(`V=1&PN=WebApp&VN=0.1.0&LANG=${lang}&PLT=PC`)}`; -const getRootUrl = (isIntl = false) => (isIntl ? 'https://www.taptap.io' : 'https://www.taptap.com'); +const getRootUrl = (isIntl = false) => (isIntl ? 'https://www.taptap.io' : 'https://www.taptap.cn'); -const appDetail = async (appId, lang = 'zh_CN', isIntl = false) => { - const { data } = await got(`${getRootUrl(isIntl)}/webapiv2/group/v1/detail?app_id=${appId}&${X_UA(lang)}`, { - headers: { - Referer: `${getRootUrl(isIntl)}/app/${appId}`, - }, - }); - return data.data; -}; +const appDetail = (appId, lang = 'zh_CN', isIntl = false) => + cache.tryGet(`taptap:appDetail:${appId}:${lang}:${isIntl}`, async () => { + const data = await ofetch(`${getRootUrl(isIntl)}/webapiv2/group/v1/detail?app_id=${appId}&${X_UA(lang)}`, { + headers: { + Referer: `${getRootUrl(isIntl)}/app/${appId}`, + }, + }); + return data.data; + }) as Promise<Detail>; const imagePost = (images) => art(path.join(__dirname, 'templates/imagePost.art'), { @@ -26,25 +28,23 @@ const imagePost = (images) => }); const topicPost = async (appId, topicId, lang = 'zh_CN') => { - const res = await got(`${getRootUrl(false)}/webapiv2/topic/v1/detail?id=${topicId}&${X_UA(lang)}`, { + const res = await ofetch(`${getRootUrl(false)}/webapiv2/topic/v1/detail?id=${topicId}&${X_UA(lang)}`, { headers: { Referer: `${getRootUrl(false)}/app/${appId}`, }, }); - const $ = load(res.data.data.first_post.contents.text, null, false); + const $ = load(res.data.first_post.contents.text, null, false); $('img').each((_, e) => { - e = $(e); - e.attr('src', e.attr('data-origin-url')); - e.attr('referrerpolicy', 'no-referrer'); - e.removeAttr('data-origin-url'); + const $e = $(e); + $e.attr('src', $e.attr('data-origin-url')); + $e.removeAttr('data-origin-url'); }); return $.html(); }; const videoPost = (video) => art(path.join(__dirname, 'templates/videoPost.art'), { - intro: video?.intro?.text, - previewUrl: video?.video_resource.preview_animation.original_url, + previewUrl: video.thumbnail.original_url || video.thumbnail.url, }); export { getRootUrl, X_UA, appDetail, imagePost, topicPost, videoPost }; From 6110b9c708955983dc495a8458aeaa1b08cad924 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 28 Nov 2024 08:05:21 +0800 Subject: [PATCH 627/740] chore(route/thepetcity): update namespace language --- lib/routes/thepetcity/namespace.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/thepetcity/namespace.ts b/lib/routes/thepetcity/namespace.ts index 7c7a989cfea5e54..16789d207a60556 100644 --- a/lib/routes/thepetcity/namespace.ts +++ b/lib/routes/thepetcity/namespace.ts @@ -2,6 +2,6 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'PetCity 毛孩日常', - url: 'thepetcity.com', - lang: 'en', + url: 'thepetcity.co', + lang: 'zh-TW', }; From aef6aa84ba5b4748b91671cb9d5e02fea78355c2 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 28 Nov 2024 15:37:09 +0800 Subject: [PATCH 628/740] chore(route/theverge): add popular new media routes --- lib/routes/theverge/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/theverge/index.ts b/lib/routes/theverge/index.ts index a659a25aebaf577..18c66c70a168e93 100644 --- a/lib/routes/theverge/index.ts +++ b/lib/routes/theverge/index.ts @@ -6,7 +6,7 @@ import { load } from 'cheerio'; export const route: Route = { path: '/:hub?', - categories: ['new-media'], + categories: ['new-media', 'popular'], example: '/theverge', parameters: { hub: 'Hub, see below, All Posts by default' }, features: { From ddd7098c5252bbef98c926cb850ecffcb13d6a9a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:43:41 +0000 Subject: [PATCH 629/740] chore(deps): bump @hono/zod-openapi from 0.18.0 to 0.18.1 (#17737) Bumps [@hono/zod-openapi](https://github.com/honojs/middleware) from 0.18.0 to 0.18.1. - [Release notes](https://github.com/honojs/middleware/releases) - [Commits](https://github.com/honojs/middleware/compare/@hono/zod-openapi@0.18.0...@hono/zod-openapi@0.18.1) --- updated-dependencies: - dependency-name: "@hono/zod-openapi" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 ccdb0d655cd82ad..508ce8a823ebaf9 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.13.7", - "@hono/zod-openapi": "0.18.0", + "@hono/zod-openapi": "0.18.1", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.55.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a1cbee32bbbeba4..4112ffb059d8f77 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,8 +25,8 @@ importers: specifier: 1.13.7 version: 1.13.7(hono@4.6.12) '@hono/zod-openapi': - specifier: 0.18.0 - version: 0.18.0(hono@4.6.12)(zod@3.23.8) + specifier: 0.18.1 + version: 0.18.1(hono@4.6.12)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -1361,8 +1361,8 @@ packages: peerDependencies: hono: ^4 - '@hono/zod-openapi@0.18.0': - resolution: {integrity: sha512-MNdFSbACkEq1txteKsBrVB0Mnil0zd5urOrP8eti6kUDI95CKVws+vjHQWNddRqmqlBHa5kFAcVXSInHFmcYGQ==} + '@hono/zod-openapi@0.18.1': + resolution: {integrity: sha512-9P/xTbFHvHqjdv2Z/oxHwf+u6QPes4Nkls0LBANTVbnVeSVQSUsPDnkPlNey2ETyJ3So9NL3bC72tVwd6dYGNA==} engines: {node: '>=16.0.0'} peerDependencies: hono: '>=4.3.6' @@ -6786,7 +6786,7 @@ snapshots: dependencies: hono: 4.6.12 - '@hono/zod-openapi@0.18.0(hono@4.6.12)(zod@3.23.8)': + '@hono/zod-openapi@0.18.1(hono@4.6.12)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) '@hono/zod-validator': 0.4.1(hono@4.6.12)(zod@3.23.8) From e08ad948dad9a11364937f679a5539d2ec8d8803 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 08:45:39 +0000 Subject: [PATCH 630/740] chore(deps): bump @scalar/hono-api-reference from 0.5.161 to 0.5.162 (#17739) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.161 to 0.5.162. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 508ce8a823ebaf9..7c09615be363f59 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.23", - "@scalar/hono-api-reference": "0.5.161", + "@scalar/hono-api-reference": "0.5.162", "@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 4112ffb059d8f77..7c3850af4d37497 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,8 +58,8 @@ importers: specifier: 0.0.23 version: 0.0.23 '@scalar/hono-api-reference': - specifier: 0.5.161 - version: 0.5.161(hono@4.6.12) + specifier: 0.5.162 + version: 0.5.162(hono@4.6.12) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1773,8 +1773,8 @@ packages: '@rss3/sdk@0.0.23': resolution: {integrity: sha512-1cF1AqLU0k6dMwqQ5Fch3rOAbh4UXJ4UZLtOwzp/RWyGoCvu3lUOUIdJF41omunuH/JJSP2z6rJTPj4S6a60eg==} - '@scalar/hono-api-reference@0.5.161': - resolution: {integrity: sha512-n30VVZrl9z/IcRbyNZZLGx4RMUUH1Zk12ryR1zPG/tdkzNG7ODP6D+rhasn5cSaCg/0BvdCcHEaANEwVJUEjqw==} + '@scalar/hono-api-reference@0.5.162': + resolution: {integrity: sha512-WoC6lLXLYSB6OxDuybtYe+5/EdU0M33DPsknjRsOImp+L6Qn64OZvKwyf7033rEHWvqqpwvEB9r+2zZ4F6KhoQ==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -1783,8 +1783,8 @@ packages: resolution: {integrity: sha512-6geH9ehvQ/sG/xUyy3e0lyOw3BaY5s6nn22wHjEJhcobdmWyFER0O6m7AU0ZN4QTjle/gYvFJOjj552l/rsNSw==} engines: {node: '>=18'} - '@scalar/types@0.0.21': - resolution: {integrity: sha512-HR8KeV5zjdVDQdfs7ONhpIRbAzrMS1KIu2sbNgVXtFSaj+1/6WN5gM/yY1DKoaC3oyvpqwd/HyL9rLTqrOkrRw==} + '@scalar/types@0.0.22': + resolution: {integrity: sha512-+S1flivP58p2uiHM4dU5ZaAb20wbVcP0nV39KWoVjijvHDx1HWtAGg+PaDXRCRj2zM4QzBeg4olaso20Tm26fQ==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7216,14 +7216,14 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.161(hono@4.6.12)': + '@scalar/hono-api-reference@0.5.162(hono@4.6.12)': dependencies: - '@scalar/types': 0.0.21 + '@scalar/types': 0.0.22 hono: 4.6.12 '@scalar/openapi-types@0.1.5': {} - '@scalar/types@0.0.21': + '@scalar/types@0.0.22': dependencies: '@scalar/openapi-types': 0.1.5 '@unhead/schema': 1.11.11 From bcc2a05e0b18fe1b39d039efb3b72bd63487acd1 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 28 Nov 2024 17:13:56 +0800 Subject: [PATCH 631/740] feat(api/rss3): change platform to RSSHub --- lib/views/rss3.test.ts | 5 +++-- lib/views/rss3.ts | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/views/rss3.test.ts b/lib/views/rss3.test.ts index 52518b99e69472c..c226cd2a980c20d 100644 --- a/lib/views/rss3.test.ts +++ b/lib/views/rss3.test.ts @@ -4,6 +4,7 @@ import rss3 from './rss3'; const NETWORK = 'rsshub'; const TAG = 'RSS'; const TYPE = 'feed'; +const PLATFORM = 'RSSHub'; describe('rss3', () => { it('should return UMS Result', () => { @@ -48,7 +49,7 @@ describe('rss3', () => { { tag: TAG, type: TYPE, - platform: 'example.com', + platform: PLATFORM, from: 'example.com', to: 'example.com', metadata: { @@ -77,7 +78,7 @@ describe('rss3', () => { { tag: TAG, type: TYPE, - platform: 'example.com', + platform: PLATFORM, from: 'example.com', to: 'example.com', metadata: { diff --git a/lib/views/rss3.ts b/lib/views/rss3.ts index 0e7c9734f09d6ae..3b0a26840b4ec6e 100644 --- a/lib/views/rss3.ts +++ b/lib/views/rss3.ts @@ -9,6 +9,7 @@ import dayjs from 'dayjs'; const NETWORK = 'rsshub'; const TAG = 'RSS'; const TYPE = 'feed'; +const PLATFORM = 'RSSHub'; const rss3 = (data) => { const currentUnixTsp = dayjs().unix(); @@ -29,7 +30,7 @@ const rss3 = (data) => { { tag: TAG, type: TYPE, - platform: owner, + platform: PLATFORM, from: owner, to: owner, metadata: { From 99f77b18ebe8e482e0feb21ca567365a8bb1b4f6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 02:37:00 -0800 Subject: [PATCH 632/740] chore(deps-dev): bump @types/node from 22.10.0 to 22.10.1 (#17738) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.10.0 to 22.10.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-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 7c09615be363f59..37af913ae467381 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.0", + "@types/node": "22.10.1", "@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 7c3850af4d37497..32713914258a475 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.0 - version: 22.10.0 + specifier: 22.10.1 + version: 22.10.1 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -372,7 +372,7 @@ importers: version: 0.27.6 '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.10.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.109 version: 0.37.109 @@ -441,10 +441,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.3 - version: 5.1.3(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.0)) + version: 5.1.3(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.1)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.10.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1941,8 +1941,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.10.0': - resolution: {integrity: sha512-XC70cRZVElFHfIUB40FgZOBbgJYFKKMa5nb9lxcwYstFG/Mi+/Y0bGS+rs6Dmhmkpq4pnNiLiuZAbc02YCOnmA==} + '@types/node@22.10.1': + resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6836,7 +6836,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7320,12 +7320,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/html-to-text@9.0.4': {} @@ -7333,13 +7333,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7349,7 +7349,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/jsrsasign@10.5.13': {} @@ -7359,7 +7359,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7381,14 +7381,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 form-data: 4.0.1 - '@types/node@22.10.0': + '@types/node@22.10.1': dependencies: undici-types: 6.20.0 @@ -7402,7 +7402,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.10.0 + '@types/node': 22.10.1 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7416,7 +7416,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.10.0 + '@types/node': 22.10.1 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7440,7 +7440,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 optional: true '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2))(eslint@9.15.0)(typescript@5.7.2)': @@ -7588,7 +7588,7 @@ snapshots: - encoding - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.10.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7602,7 +7602,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.10.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10499,7 +10499,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.10.0 + '@types/node': 22.10.1 long: 5.2.3 proxy-agent@6.4.0: @@ -11424,13 +11424,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.10.0): + vite-node@2.0.5(@types/node@22.10.1): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.10.0) + vite: 5.4.10(@types/node@22.10.1) transitivePeerDependencies: - '@types/node' - less @@ -11442,27 +11442,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.3(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.0)): + vite-tsconfig-paths@5.1.3(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.1)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.7.2) optionalDependencies: - vite: 5.4.10(@types/node@22.10.0) + vite: 5.4.10(@types/node@22.10.1) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.10.0): + vite@5.4.10(@types/node@22.10.1): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.4 optionalDependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.10.0)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11480,11 +11480,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.10.0) - vite-node: 2.0.5(@types/node@22.10.0) + vite: 5.4.10(@types/node@22.10.1) + vite-node: 2.0.5(@types/node@22.10.1) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.0 + '@types/node': 22.10.1 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 899bd05defb2710fd00c59fde9e725a4ad662cdc Mon Sep 17 00:00:00 2001 From: lidashuang <li.dashuang@icloud.com> Date: Thu, 28 Nov 2024 21:11:22 +0800 Subject: [PATCH 633/740] fix(wallstreetcn): crash when article delete (#17734) * fix(wallstreetcn): crash when article delete TypeError: Cannot read properties of undefined (reading 'display_name') * fix(style): camelCase --- lib/routes/wallstreetcn/news.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/routes/wallstreetcn/news.ts b/lib/routes/wallstreetcn/news.ts index f7674c75f957b38..84320dc8ff78cb9 100644 --- a/lib/routes/wallstreetcn/news.ts +++ b/lib/routes/wallstreetcn/news.ts @@ -74,7 +74,14 @@ async function handler(ctx) { url: `${apiRootUrl}/apiv1/content/${item.type === 'live' ? `lives/${item.guid}` : `articles/${item.guid}?extract=0`}`, }); - const data = detailResponse.data.data; + const responseData = detailResponse.data; + + // 处理 { code: 60301, message: '内容不存在或已被删除', data: {} } + if (responseData.code !== 20000) { + return null; + } + + const data = responseData.data; item.title = data.title || data.content_text; item.author = data.source_name ?? data.author.display_name; @@ -95,6 +102,8 @@ async function handler(ctx) { ) ); + items = items.filter((item) => item !== null); + return { title: `华尔街见闻 - 资讯 - ${titles[category]}`, link: currentUrl, From 35589cab81bcb5a8007d83eab9fbbae5e83bb4b4 Mon Sep 17 00:00:00 2001 From: shunwork <128399189+shunwork@users.noreply.github.com> Date: Thu, 28 Nov 2024 23:59:19 +0900 Subject: [PATCH 634/740] feat(route/apple/podcast): add optional region parameter (#17741) * feat(route/apple/podcast): add optional region parameter * fix(route/apple/podcast): fix lint --- lib/routes/apple/podcast.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/routes/apple/podcast.ts b/lib/routes/apple/podcast.ts index 11980e09200a8ab..6eb313987ec0065 100644 --- a/lib/routes/apple/podcast.ts +++ b/lib/routes/apple/podcast.ts @@ -4,10 +4,13 @@ import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { - path: '/podcast/:id', + path: '/podcast/:id/:region?', categories: ['multimedia'], - example: '/apple/podcast/id1559695855', - parameters: { id: '播客id,可以在 Apple 播客app 内分享的播客的 URL 中找到' }, + example: '/apple/podcast/id1559695855/cn', + parameters: { + id: '播客id,可以在 Apple 播客app 内分享的播客的 URL 中找到', + region: '地區代碼,例如 cn、us、jp,預設為 cn', + }, features: { requireConfig: false, requirePuppeteer: false, @@ -18,17 +21,18 @@ export const route: Route = { }, radar: [ { - source: ['podcasts.apple.com/cn/podcast/:id'], + source: ['podcasts.apple.com/:region/podcast/:id'], }, ], name: '播客', maintainers: ['Acring'], handler, - url: 'www.apple.com.cn/apple-podcasts/', + url: 'www.apple.com/apple-podcasts/', }; async function handler(ctx) { - const link = `https://podcasts.apple.com/cn/podcast/${ctx.req.param('id')}`; + const { id, region } = ctx.req.param(); + const link = `https://podcasts.apple.com/${region || `cn`}/podcast/${id}`; const response = await got({ method: 'get', url: link, From 13696b98e4948a17ef1434e24d9687a9551c05ac Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 28 Nov 2024 07:46:44 -0800 Subject: [PATCH 635/740] feat(aeon): enhance category and type routes with detailed parameters and improved data fetching (#17745) --- lib/routes/aeon/category.ts | 51 +++++++++++++++-------- lib/routes/aeon/templates/essay.art | 10 ++++- lib/routes/aeon/templates/video.art | 8 ++-- lib/routes/aeon/type.ts | 45 ++++++++++++-------- lib/routes/aeon/utils.ts | 64 +++++++++++++++++++++-------- 5 files changed, 121 insertions(+), 57 deletions(-) diff --git a/lib/routes/aeon/category.ts b/lib/routes/aeon/category.ts index adb68f0a3e6fbc6..7e4a87ecdec6780 100644 --- a/lib/routes/aeon/category.ts +++ b/lib/routes/aeon/category.ts @@ -1,13 +1,24 @@ import { Route } from '@/types'; -import { load } from 'cheerio'; -import got from '@/utils/got'; -import { getData } from './utils'; +import ofetch from '@/utils/ofetch'; +import { getBuildId, getData } from './utils'; +import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/category/:category', categories: ['new-media', 'popular'], example: '/aeon/category/philosophy', - parameters: { category: 'Category' }, + parameters: { + category: { + description: 'Category', + options: [ + { value: 'philosophy', label: 'Philosophy' }, + { value: 'science', label: 'Science' }, + { value: 'psychology', label: 'Psychology' }, + { value: 'society', label: 'Society' }, + { value: 'culture', label: 'Culture' }, + ], + }, + }, features: { requireConfig: false, requirePuppeteer: false, @@ -18,34 +29,40 @@ export const route: Route = { }, radar: [ { - source: ['aeon.aeon.co/:category'], + source: ['aeon.co/:category'], }, ], name: 'Categories', maintainers: ['emdoe'], handler, - description: `Supported categories: Philosophy, Science, Psychology, Society, and Culture.`, }; async function handler(ctx) { - const url = `https://aeon.co/${ctx.req.param('category')}`; - const { data: response } = await got(url); - const $ = load(response); + const category = ctx.req.param('category').toLowerCase(); + const url = `https://aeon.co/category/${category}`; + const buildId = await getBuildId(); + const response = await ofetch(`https://aeon.co/_next/data/${buildId}/${category}.json`); - const data = JSON.parse($('script#__NEXT_DATA__').text()); + const section = response.pageProps.section; - const list = data.props.pageProps.section.articles.edges.map((item) => ({ - title: item.node.title, - author: item.node.authors.map((author) => author.displayName).join(', '), - link: `https://aeon.co/${item.node.type.toLowerCase()}s/${item.node.slug}`, + const list = section.articles.edges.map(({ node }) => ({ + title: node.title, + description: node.standfirstLong, + author: node.authors.map((author) => author.displayName).join(', '), + link: `https://aeon.co/${node.type}s/${node.slug}`, + pubDate: parseDate(node.createdAt), + category: [node.section.title, ...node.topics.map((topic) => topic.title)], + image: node.image.url, + type: node.type, + slug: node.slug, })); - const items = await getData(ctx, list); + const items = await getData(list); return { - title: `AEON | ${data.props.pageProps.section.title}`, + title: `AEON | ${section.title}`, link: url, - description: data.props.pageProps.section.metaDescription, + description: section.metaDescription, item: items, }; } diff --git a/lib/routes/aeon/templates/essay.art b/lib/routes/aeon/templates/essay.art index 5a2fab892134eb3..8fed51cad667f4f 100644 --- a/lib/routes/aeon/templates/essay.art +++ b/lib/routes/aeon/templates/essay.art @@ -1,3 +1,9 @@ -<img src="{{ banner }}" alt=""> +{{ if banner.url }} +<figure> + <img src="{{ banner.url }}" alt="{{ banner.alt }}"> + {{ if banner.caption }} + <figcaption>{{ banner.caption }}</figcaption> + {{ /if }} +{{ /if }} {{@ authorsBio }} -{{@ content}} \ No newline at end of file +{{@ content }} diff --git a/lib/routes/aeon/templates/video.art b/lib/routes/aeon/templates/video.art index d1f546c3981a3fe..c3d67356151f6b4 100644 --- a/lib/routes/aeon/templates/video.art +++ b/lib/routes/aeon/templates/video.art @@ -1,10 +1,10 @@ {{ 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://player.vimeo.com/video/" + video + "?dnt=1" }} +{{ else if article.hoster === 'youtube' }} {{ set video = "https://www.youtube-nocookie.com/embed/" + video }} {{ /if }} <iframe width="672" height="377" src="{{ video }}" frameborder="0" allowfullscreen></iframe> -{{@ article.credits}} -{{@ article.description}} +{{@ article.credits }} +{{@ article.description }} diff --git a/lib/routes/aeon/type.ts b/lib/routes/aeon/type.ts index 8b78bfc4334d7e2..2994f7f0909f484 100644 --- a/lib/routes/aeon/type.ts +++ b/lib/routes/aeon/type.ts @@ -1,13 +1,22 @@ import { Route } from '@/types'; -import { load } from 'cheerio'; -import got from '@/utils/got'; -import { getData } from './utils'; +import ofetch from '@/utils/ofetch'; +import { getBuildId, getData } from './utils'; +import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/:type', categories: ['new-media', 'popular'], example: '/aeon/essays', - parameters: { type: 'Type' }, + parameters: { + type: { + description: 'Type', + options: [ + { value: 'essays', label: 'Essays' }, + { value: 'videos', label: 'Videos' }, + { value: 'audio', label: 'Audio' }, + ], + }, + }, features: { requireConfig: false, requirePuppeteer: false, @@ -18,7 +27,7 @@ export const route: Route = { }, radar: [ { - source: ['aeon.aeon.co/:type'], + source: ['aeon.co/:type'], }, ], name: 'Types', @@ -26,28 +35,30 @@ export const route: Route = { handler, description: `Supported types: Essays, Videos, and Audio. - Compared to the official one, the RSS feed generated by RSSHub not only has more fine-grained options, but also eliminates pull quotes, which can't be easily distinguished from other paragraphs by any RSS reader, but only disrupt the reading flow. This feed also provides users with a bio of the author at the top. - - However, The content generated under \`audio\` does not contain links to audio files.`, + Compared to the official one, the RSS feed generated by RSSHub not only has more fine-grained options, but also eliminates pull quotes, which can't be easily distinguished from other paragraphs by any RSS reader, but only disrupt the reading flow. This feed also provides users with a bio of the author at the top.`, }; async function handler(ctx) { const type = ctx.req.param('type'); - const binaryType = type === 'videos' ? 'videos' : 'essays'; const capitalizedType = type.charAt(0).toUpperCase() + type.slice(1); + const buildId = await getBuildId(); const url = `https://aeon.co/${type}`; - const { data: response } = await got(url); - const $ = load(response); - - const data = JSON.parse($('script#__NEXT_DATA__').text()); + const response = await ofetch(`https://aeon.co/_next/data/${buildId}/${type}.json`); - const list = data.props.pageProps.articles.map((item) => ({ - title: item.title, - link: `https://aeon.co/${binaryType}/${item.slug}`, + const list = response.pageProps.articles.map((node) => ({ + title: node.title, + description: node.standfirstLong, + author: node.authors.map((author) => author.displayName).join(', '), + link: `https://aeon.co/${node.type}s/${node.slug}`, + pubDate: parseDate(node.createdAt), + category: [node.section.title, ...node.topics.map((topic) => topic.title)], + image: node.image.url, + type: node.type, + slug: node.slug, })); - const items = await getData(ctx, list); + const items = await getData(list); return { title: `AEON | ${capitalizedType}`, diff --git a/lib/routes/aeon/utils.ts b/lib/routes/aeon/utils.ts index 1cd3a9eee3e2b3b..e18421579cd4850 100644 --- a/lib/routes/aeon/utils.ts +++ b/lib/routes/aeon/utils.ts @@ -3,28 +3,61 @@ const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { art } from '@/utils/render'; import path from 'node:path'; +import { config } from '@/config'; +import { parseDate } from '@/utils/parse-date'; -const getData = async (ctx, list) => { +export const getBuildId = () => + cache.tryGet( + 'aeon:buildId', + async () => { + const response = await ofetch('https://aeon.co'); + const $ = load(response); + const nextData = JSON.parse($('script#__NEXT_DATA__').text()); + return nextData.buildId; + }, + config.cache.routeExpire, + false + ); + +const getData = async (list) => { const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { - const { data: response } = await got(item.link); - const $ = load(response); + const buildId = await getBuildId(); + const response = await ofetch(`https://aeon.co/_next/data/${buildId}/${item.type}s/${item.slug}.json?id=${item.slug}`); - const data = JSON.parse($('script#__NEXT_DATA__').text()); - const type = data.props.pageProps.article.type.toLowerCase(); + const data = response.pageProps.article; + const type = data.type.toLowerCase(); - item.pubDate = new Date(data.props.pageProps.article.publishedAt).toUTCString(); + item.pubDate = parseDate(data.publishedAt); if (type === 'video') { - item.description = art(path.join(__dirname, 'templates/video.art'), { article: data.props.pageProps.article }); + item.description = art(path.join(__dirname, 'templates/video.art'), { article: data }); } else { - // Essay or Audio - // But unfortunately, the method based on __NEXT_DATA__ - // does not include the information of the audio link. + if (data.audio?.id) { + const response = await ofetch('https://api.aeonmedia.co/graphql', { + method: 'POST', + body: { + query: `query getAudio($audioId: ID!) { + audio(id: $audioId) { + id + streamUrl + } + }`, + variables: { + audioId: data.audio.id, + }, + operationName: 'getAudio', + }, + }); + + delete item.image; + item.enclosure_url = response.data.audio.streamUrl; + item.enclosure_type = 'audio/mpeg'; + } // Besides, it seems that the method based on __NEXT_DATA__ // does not include the information of the two-column @@ -32,14 +65,11 @@ const getData = async (ctx, list) => { // e.g. https://aeon.co/essays/how-to-mourn-a-forest-a-lesson-from-west-papua . // But that's very rare. - item.author = data.props.pageProps.article.authors.map((author) => author.name).join(', '); - - const article = data.props.pageProps.article; - const capture = load(article.body); - const banner = article.image?.url; + const capture = load(data.body, null, false); + const banner = data.image; capture('p.pullquote').remove(); - const authorsBio = article.authors.map((author) => '<p>' + author.name + author.authorBio.replaceAll(/^<p>/g, ' ')).join(''); + const authorsBio = data.authors.map((author) => '<p>' + author.name + author.authorBio.replaceAll(/^<p>/g, ' ')).join(''); item.description = art(path.join(__dirname, 'templates/essay.art'), { banner, authorsBio, content: capture.html() }); } From 71af316730ba89de58d63d5c93603b5e55491df7 Mon Sep 17 00:00:00 2001 From: Cat_yyy <zongyejian@gmail.com> Date: Fri, 29 Nov 2024 01:04:54 +0900 Subject: [PATCH 636/740] feat: Added <category> for Isct news. (#17744) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 新增category * fix: follow camelCase fix: /isct/news/en --- lib/routes/isct/namespace.ts | 6 +++++- lib/routes/isct/news.ts | 27 +++++++++++++++++++++------ 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/lib/routes/isct/namespace.ts b/lib/routes/isct/namespace.ts index 8a765050b3f1aed..2dbb6fcf8387ae4 100644 --- a/lib/routes/isct/namespace.ts +++ b/lib/routes/isct/namespace.ts @@ -4,7 +4,11 @@ export const namespace: Namespace = { name: 'Institute of Science Tokyo', url: 'isct.ac.jp', lang: 'ja', - + description: ` +:::tip + 支持通过category参数筛选新闻类别。详情请查看[指南](https://docs.rsshub.app/zh/guide/parameters#%E5%86%85%E5%AE%B9%E8%BF%87%E6%BB%A4)。 + You can filter news by category through the category parameter. For more information, please refer to the [guide](https://docs.rsshub.app/guide/parameters#filtering). +:::`, ja: { name: '東京科学大学', }, diff --git a/lib/routes/isct/news.ts b/lib/routes/isct/news.ts index aedb93f10dc0409..9d0e8677357d3af 100644 --- a/lib/routes/isct/news.ts +++ b/lib/routes/isct/news.ts @@ -3,12 +3,18 @@ import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { decode } from 'entities'; -interface NewsItem { +interface MediaItem { ID: string; TITLE: string; PUBLISH_DATE: string; META_DESCRIPTION: string; MEDIA_CD: string; + MEDIA_TYPES: string; +} + +interface TagItem { + TAG_ID: string; + TAG_NAME: string; } export const route: Route = { @@ -34,11 +40,20 @@ export const route: Route = { maintainers: ['catyyy'], handler: async (ctx) => { const { lang = 'ja' } = ctx.req.param(); - const response = await ofetch(`https://www.isct.ac.jp/expansion/get_media_list_json.php?lang_cd=${lang}`); + const mediaResponse = await ofetch(`https://www.isct.ac.jp/expansion/get_media_list_json.php?lang_cd=${lang}`); + const tagResponse = await ofetch(`https://www.isct.ac.jp/expansion/get_tag_list_json.php?lang_cd=${lang}`); + + const mediaData = JSON.parse(decode(mediaResponse)); + const tagData = JSON.parse(decode(tagResponse)); + + const itemsArray: MediaItem[] = Object.values(mediaData); + const tagArray: TagItem[] = Object.values(tagData); + + const tagIdNameMapping: { [key: string]: string } = {}; - const decodedResponse = decode(response); - const data = JSON.parse(decodedResponse); - const itemsArray: NewsItem[] = Object.values(data); + for (const item of Object.values(tagArray)) { + tagIdNameMapping[item.TAG_ID] = item.TAG_NAME; + } const items = itemsArray.map((item) => ({ // 文章标题 @@ -52,7 +67,7 @@ export const route: Route = { // 如果有的话,文章作者 // author: item.user.login, // 如果有的话,文章分类 - // category: item.labels.map((label) => label.name), + category: item.MEDIA_TYPES ? [tagIdNameMapping[Number.parseInt(item.MEDIA_TYPES.replaceAll('"', ''), 10)]] : [], })); return { // 源标题 From 52c8c8f955db2d18aa0f12b3a6006f8aad484287 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 28 Nov 2024 11:51:17 -0800 Subject: [PATCH 637/740] feat(pinterest): add pinterest (#17747) * feat(pinterest): add Pinterest * Update lib/routes/pinterest/user.ts * Update lib/routes/pinterest/types.ts --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- lib/routes/pinterest/namespace.ts | 7 + lib/routes/pinterest/types.ts | 330 ++++++++++++++++++++++++++++++ lib/routes/pinterest/user.ts | 104 ++++++++++ 3 files changed, 441 insertions(+) create mode 100644 lib/routes/pinterest/namespace.ts create mode 100644 lib/routes/pinterest/types.ts create mode 100644 lib/routes/pinterest/user.ts diff --git a/lib/routes/pinterest/namespace.ts b/lib/routes/pinterest/namespace.ts new file mode 100644 index 000000000000000..b115b7fac4be399 --- /dev/null +++ b/lib/routes/pinterest/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Pinterest', + url: 'www.pinterest.com', + lang: 'en', +}; diff --git a/lib/routes/pinterest/types.ts b/lib/routes/pinterest/types.ts new file mode 100644 index 000000000000000..ca3b8c8885a5c78 --- /dev/null +++ b/lib/routes/pinterest/types.ts @@ -0,0 +1,330 @@ +export interface BoardsFeedResource { + node_id: string; + name: string; + created_at: string; + section_count: number; + images: BoardImages; + image_cover_hd_url: string; + archived_by_me_at: null; + access: any[]; + image_cover_url: string; + follower_count: number; + event_date: null; + should_show_shop_feed: boolean; + should_show_board_collaborators: boolean; + collaborator_requests_enabled: boolean; + is_temporarily_disabled: boolean; + collaborating_users: any[]; + followed_by_me: boolean; + viewer_collaborator_join_requested: boolean; + cover_pin: CoverPin; + place_saves_count: number; + board_order_modified_at: string; + owner: Owner; + allow_homefeed_recommendations: boolean; + pin_count: number; + collaborator_count: number; + has_custom_cover: boolean; + privacy: string; + should_show_more_ideas: boolean; + event_start_date: null; + url: string; + collaborated_by_me: boolean; + is_collaborative: boolean; + cover_images: CoverImages; + is_ads_only: boolean; + type: string; + description: string; +} + +interface BoardImages { + '170x': ImageItem[]; +} + +interface Images { + orig: ImageItem; + [x: string]: ImageItem; +} + +interface ImageItem { + url: string; + width: number; + height: number; + dominant_color: string; +} + +interface CoverPin { + pin_id: string; + timestamp: number; + image_signature: string; + crop?: number[]; + size?: number[]; + scale?: number; + image_url?: string; + custom_cover?: boolean; + image_size?: number[] | null; +} + +interface Owner { + node_id: string; + explicitly_followed_by_me: boolean; + is_partner: boolean; + is_ads_only_profile: boolean; + is_private_profile: boolean; + ads_only_profile_site: null; + domain_verified: boolean; + type: string; + image_medium_url: string; + is_default_image: boolean; + id: string; + full_name: string; + username: string; + is_verified_merchant: boolean; + verified_identity: object; +} + +interface Pinner extends Owner { + image_large_url: string; + image_small_url: string; +} + +interface CoverImages { + '200x150': ImageItem; + '222x': ImageItem; +} + +export interface UserActivityPinsResource { + node_id: string; + is_stale_product: boolean; + attribution: null; + access: any[]; + images: Images; + comment_count: number; + digital_media_source_type: null; + promoted_is_removable: boolean; + is_eligible_for_pdp: boolean; + sponsorship: null; + story_pin_data_id: string; + description_html: string; + shopping_flags: any[]; + is_uploaded: boolean; + campaign_id: null; + is_playable: boolean; + manual_interest_tags: null; + video_status: null; + seo_url: string; + image_signature: string; + is_eligible_for_web_closeup: boolean; + ad_match_reason: number; + is_oos_product: boolean; + dominant_color: string; + aggregated_pin_data: AggregatedPinData; + creator_analytics: null; + is_repin: boolean; + done_by_me: boolean; + board: Board; + view_tags: any[]; + video_status_message: null; + description: string; + domain: string; + is_downstream_promotion: boolean; + is_video: boolean; + promoter: null; + embed: null; + comments: Comments; + collection_pin: null; + is_promoted: boolean; + grid_title: string; + is_whitelisted_for_tried_it: boolean; + promoted_is_lead_ad: boolean; + debug_info_html: null; + link: null; + is_native: boolean; + id: string; + promoted_lead_form: null; + type: string; + rich_summary: null; + title: string; + alt_text: null; + created_at: string; + is_quick_promotable: boolean; + pinner: Pinner; + image_crop: ImageCrop; + reaction_counts: object; + tracking_params: string; + is_eligible_for_related_products: boolean; + product_pin_data: null; + privacy: string; + price_currency: string; + has_required_attribution_provider: boolean; + seo_title: string; + price_value: number; + insertion_id: null; + seo_noindex_reason: null; + carousel_data: null; + videos: null; + story_pin_data: StoryPinData; + grid_description: string; + repin_count: number; + native_creator: Owner; + should_open_in_stream: boolean; + additional_hide_reasons: any[]; + method: string; +} + +interface AggregatedPinData { + node_id: string; + is_shop_the_look: boolean; + aggregated_stats: AggregatedStats; + did_it_data: DidItData; + creator_analytics: null; + has_xy_tags: boolean; + id: string; +} + +interface AggregatedStats { + saves: number; + done: number; +} + +interface DidItData { + type: string; + details_count: number; + recommend_scores: RecommendScore[]; + rating: number; + tags: any[]; + user_count: number; + videos_count: number; + images_count: number; + recommended_count: number; + responses_count: number; +} + +interface RecommendScore { + score: number; + count: number; +} + +interface Board { + node_id: string; + layout: string; + type: string; + privacy: string; + followed_by_me: boolean; + image_thumbnail_url: string; + name: string; + collaborated_by_me: boolean; + owner: Owner; + is_collaborative: boolean; + url: string; + id: string; +} + +interface Comments { + uri: string; + data: any[]; + bookmark: null; +} + +interface ImageCrop { + min_y: number; + max_y: number; +} + +interface StoryPinData { + node_id: string; + page_count: number; + type: string; + has_affiliate_products: boolean; + static_page_count: number; + pages: Page[]; + metadata: Metadata; + is_deleted: boolean; + total_video_duration: number; + pages_preview: PagePreview[]; + has_product_pins: boolean; + id: string; + last_edited: null; +} + +interface Page { + blocks: Block[]; +} + +interface Block { + type: string; + block_type: number; + text: string; + block_style: BlockStyle; + image_signature: string; + image: null; + tracking_id: string; +} + +interface BlockStyle { + x_coord: number; + corner_radius: number; + rotation: number; + height: number; + width: number; + y_coord: number; +} + +interface Metadata { + basics: null; + is_compatible: boolean; + root_user_id: string; + canvas_aspect_ratio: number; + diy_data: null; + compatible_version: string; + is_editable: boolean; + root_pin_id: string; + pin_title: string | null; + template_type: null; + showreel_data: null; + recipe_data: null; + is_promotable: boolean; + version: string; + pin_image_signature: string; +} + +interface PagePreview { + blocks: Block[]; +} + +export interface UserProfile extends Owner { + image_xlarge_url: string; + impressum_url: null; + seo_canonical_domain: string; + following_count: number; + last_pin_save_time: string; + first_name: string; + eligible_profile_tabs: EligibleProfileTab[]; + seo_noindex_reason: null; + board_count: number; + instagram_data: null; + profile_cover: ProfileCover; + seo_description: string; + follower_count: number; + interest_following_count: null; + is_inspirational_merchant: boolean; + about: string; + partner: null; + website_url: null; + domain_url: null; + seo_title: string; + indexed: boolean; + is_primary_website_verified: boolean; +} + +interface EligibleProfileTab { + id: string; + type: string; + tab_type: number; + name: string; + is_default: boolean; +} + +interface ProfileCover { + id: string; +} diff --git a/lib/routes/pinterest/user.ts b/lib/routes/pinterest/user.ts new file mode 100644 index 000000000000000..731133336ee59bd --- /dev/null +++ b/lib/routes/pinterest/user.ts @@ -0,0 +1,104 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import { BoardsFeedResource, UserActivityPinsResource, UserProfile } from './types'; + +export const route: Route = { + path: '/user/:username/:type?', + categories: ['picture'], + example: '/pinterest/user/howieserious', + parameters: { + username: 'Username', + type: { + description: 'Type, default to `_created`', + default: '_created', + options: [ + { value: '_created', label: 'Created' }, + { value: '_saved', label: 'Saved' }, + ], + }, + }, + radar: [ + { + source: ['www.pinterest.com/:id/:type?', 'www.pinterest.com/:id'], + target: '/user/:id/:type?', + }, + ], + name: 'User', + maintainers: ['TonyRL'], + handler, +}; + +const baseUrl = 'https://www.pinterest.com'; + +async function handler(ctx) { + const { username, type = '_created' } = ctx.req.param(); + + const profile = await getUserResource(username); + const response = type === '_created' ? await getUserActivityPinsResource(username, profile.id) : await getBoardsFeedResource(username); + + const items = + type === '_created' + ? (response as UserActivityPinsResource[]).map((item) => ({ + title: item.title || item.seo_title, + description: `${item.grid_description}<br><img src="${item.images.orig.url}">`, + link: `${baseUrl}${item.seo_url}`, + author: item.pinner.full_name, + pubDate: parseDate(item.created_at), + image: item.images.orig.url, + })) + : (response as BoardsFeedResource[]).map((item) => ({ + title: item.name, + description: item.description + (item.images?.['170x'] ? '<br>' + item.images['170x'].map((img) => `<img src="${img.url}">`).join('') : ''), + link: `${baseUrl}${item.url}`, + author: item.owner.full_name, + pubDate: parseDate(item.created_at), + image: item.image_cover_hd_url, + })); + + return { + title: profile.seo_title, + description: profile.seo_description, + image: profile.image_xlarge_url ?? profile.image_medium_url, + link: `${baseUrl}/${username}/`, + item: items, + }; +} + +const getUserResource = (username: string) => + cache.tryGet(`pinterest:user:${username}`, async () => { + const response = await ofetch(`${baseUrl}/resource/UserResource/get/`, { + query: { + source_url: `/${username}/_created`, + data: JSON.stringify({ options: { username, field_set_key: 'unauth_profile' }, context: {} }), + _: Date.now(), + }, + }); + + return response.resource_response.data; + }) as Promise<UserProfile>; + +const getUserActivityPinsResource = async (username: string, userId: string) => { + const response = await ofetch(`${baseUrl}/resource/UserActivityPinsResource/get/`, { + query: { + source_url: `/${username}/_created`, + data: JSON.stringify({ options: { exclude_add_pin_rep: true, field_set_key: 'grid_item', is_own_profile_pins: false, user_id: userId, username }, context: {} }), + _: Date.now(), + }, + }); + + return response.resource_response.data as UserActivityPinsResource[]; +}; + +const getBoardsFeedResource = async (username: string) => { + const response = await ofetch(`${baseUrl}/resource/BoardsFeedResource/get/`, { + query: { + source_url: `/${username}/_saved`, + data: JSON.stringify({ options: { field_set_key: 'profile_grid_item', filter_stories: false, sort: 'last_pinned_to', username }, context: {} }), + _: Date.now(), + }, + }); + + return (response.resource_response.data as BoardsFeedResource[]).filter((item) => item.node_id); +}; From 3f12f922bf62dbb3cfec95f3e67f82a909ed4974 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 29 Nov 2024 13:49:27 +0800 Subject: [PATCH 638/740] feat(route/twitter): add third-party twitter api support --- lib/config.ts | 2 + lib/routes/twitter/api/web-api/api.ts | 55 +++++++++++---------- lib/routes/twitter/api/web-api/constants.ts | 6 ++- lib/routes/twitter/user.ts | 5 ++ 4 files changed, 40 insertions(+), 28 deletions(-) diff --git a/lib/config.ts b/lib/config.ts index 87a526083c0f74d..5967249cbe93407 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -330,6 +330,7 @@ export type Config = { authenticationSecret?: string[]; phoneOrEmail?: string[]; authToken?: string[]; + thirdPartyApi?: string; }; uestc: { bbsCookie?: string; @@ -754,6 +755,7 @@ const calculateValue = () => { authenticationSecret: envs.TWITTER_AUTHENTICATION_SECRET?.split(','), phoneOrEmail: envs.TWITTER_PHONE_OR_EMAIL?.split(','), authToken: envs.TWITTER_AUTH_TOKEN?.split(','), + thirdPartyApi: envs.TWITTER_THIRD_PARTY_API, }, uestc: { bbsCookie: envs.UESTC_BBS_COOKIE, diff --git a/lib/routes/twitter/api/web-api/api.ts b/lib/routes/twitter/api/web-api/api.ts index 2d03d6476f6ae9a..3e58fa363b0f086 100644 --- a/lib/routes/twitter/api/web-api/api.ts +++ b/lib/routes/twitter/api/web-api/api.ts @@ -1,39 +1,40 @@ -import { baseUrl, gqlMap, gqlFeatures } from './constants'; +import { baseUrl, gqlMap, gqlFeatures, gqlMapThirdParty } from './constants'; import { config } from '@/config'; import cache from '@/utils/cache'; import { twitterGot, paginationTweets, gatherLegacyFromData } from './utils'; import InvalidParameterError from '@/errors/types/invalid-parameter'; +import ofetch from '@/utils/ofetch'; const getUserData = (id) => cache.tryGet(`twitter-userdata-${id}`, () => { - if (id.startsWith('+')) { - return twitterGot(`${baseUrl}${gqlMap.UserByRestId}`, { - variables: JSON.stringify({ - userId: id.slice(1), - withSafetyModeUserFields: true, - }), - features: JSON.stringify(gqlFeatures.UserByRestId), - fieldToggles: JSON.stringify({ - withAuxiliaryUserLabels: false, - }), + const params = { + variables: id.startsWith('+') + ? JSON.stringify({ + userId: id.slice(1), + withSafetyModeUserFields: true, + }) + : JSON.stringify({ + screen_name: id, + withSafetyModeUserFields: true, + }), + features: JSON.stringify(id.startsWith('+') ? gqlFeatures.UserByRestId : gqlFeatures.UserByScreenName), + fieldToggles: JSON.stringify({ + withAuxiliaryUserLabels: false, + }), + }; + + if (config.twitter.thirdPartyApi) { + const endpoint = id.startsWith('+') ? gqlMapThirdParty.UserByRestId : gqlMapThirdParty.UserByScreenName; + + return ofetch(`${config.twitter.thirdPartyApi}${endpoint}`, { + method: 'GET', + params, }); } - return twitterGot( - `${baseUrl}${gqlMap.UserByScreenName}`, - { - variables: JSON.stringify({ - screen_name: id, - withSafetyModeUserFields: true, - }), - features: JSON.stringify(gqlFeatures.UserByScreenName), - fieldToggles: JSON.stringify({ - withAuxiliaryUserLabels: false, - }), - }, - { - allowNoAuth: true, - } - ); + + return twitterGot(`${baseUrl}${id.startsWith('+') ? gqlMap.UserByRestId : gqlMap.UserByScreenName}`, params, { + allowNoAuth: !id.startsWith('+'), + }); }); const cacheTryGet = async (_id, params, func) => { diff --git a/lib/routes/twitter/api/web-api/constants.ts b/lib/routes/twitter/api/web-api/constants.ts index 059dc0f85de4963..8906ce759abc9d2 100644 --- a/lib/routes/twitter/api/web-api/constants.ts +++ b/lib/routes/twitter/api/web-api/constants.ts @@ -15,6 +15,10 @@ const graphQLEndpointsPlain = [ const gqlMap = Object.fromEntries(graphQLEndpointsPlain.map((endpoint) => [endpoint.split('/')[3].replace(/V2$|Query$|QueryV2$/, ''), endpoint])); +const graphQLEndpointsThirdParty = ['/graphql/xxxxxxx/UserByScreenName', '/graphql/xxxxxxx/UserByRestId']; + +const gqlMapThirdParty = Object.fromEntries(graphQLEndpointsThirdParty.map((endpoint) => [endpoint.split('/')[3].replace(/V2$|Query$|QueryV2$/, ''), endpoint])); + const gqlFeatureUser = { hidden_profile_subscriptions_enabled: true, rweb_tipjar_consumption_enabled: true, @@ -112,4 +116,4 @@ const timelineParams = { const bearerToken = 'Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA'; -export { baseUrl, gqlMap, gqlFeatures, timelineParams, bearerToken }; +export { baseUrl, gqlMap, gqlMapThirdParty, gqlFeatures, timelineParams, bearerToken }; diff --git a/lib/routes/twitter/user.ts b/lib/routes/twitter/user.ts index c4b20fc584c648d..277ba339b6f0566 100644 --- a/lib/routes/twitter/user.ts +++ b/lib/routes/twitter/user.ts @@ -32,6 +32,11 @@ export const route: Route = { name: 'TWITTER_AUTH_TOKEN', description: 'Please see above for details.', }, + { + name: 'TWITTER_THIRD_PARTY_API', + description: 'Use third-party API to query twitter data', + optional: true, + }, ], requirePuppeteer: false, antiCrawler: false, From 3e102d5a53ff45569592c65856381a5afeaccdae Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 29 Nov 2024 14:18:20 +0800 Subject: [PATCH 639/740] refactor(route/twitter): keep twitter graphql endpoints consistent --- lib/routes/twitter/api/web-api/api.ts | 4 ++-- lib/routes/twitter/api/web-api/constants.ts | 6 +----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/routes/twitter/api/web-api/api.ts b/lib/routes/twitter/api/web-api/api.ts index 3e58fa363b0f086..6d331a2049b48b4 100644 --- a/lib/routes/twitter/api/web-api/api.ts +++ b/lib/routes/twitter/api/web-api/api.ts @@ -1,4 +1,4 @@ -import { baseUrl, gqlMap, gqlFeatures, gqlMapThirdParty } from './constants'; +import { baseUrl, gqlMap, gqlFeatures } from './constants'; import { config } from '@/config'; import cache from '@/utils/cache'; import { twitterGot, paginationTweets, gatherLegacyFromData } from './utils'; @@ -24,7 +24,7 @@ const getUserData = (id) => }; if (config.twitter.thirdPartyApi) { - const endpoint = id.startsWith('+') ? gqlMapThirdParty.UserByRestId : gqlMapThirdParty.UserByScreenName; + const endpoint = id.startsWith('+') ? gqlMap.UserByRestId : gqlMap.UserByScreenName; return ofetch(`${config.twitter.thirdPartyApi}${endpoint}`, { method: 'GET', diff --git a/lib/routes/twitter/api/web-api/constants.ts b/lib/routes/twitter/api/web-api/constants.ts index 8906ce759abc9d2..059dc0f85de4963 100644 --- a/lib/routes/twitter/api/web-api/constants.ts +++ b/lib/routes/twitter/api/web-api/constants.ts @@ -15,10 +15,6 @@ const graphQLEndpointsPlain = [ const gqlMap = Object.fromEntries(graphQLEndpointsPlain.map((endpoint) => [endpoint.split('/')[3].replace(/V2$|Query$|QueryV2$/, ''), endpoint])); -const graphQLEndpointsThirdParty = ['/graphql/xxxxxxx/UserByScreenName', '/graphql/xxxxxxx/UserByRestId']; - -const gqlMapThirdParty = Object.fromEntries(graphQLEndpointsThirdParty.map((endpoint) => [endpoint.split('/')[3].replace(/V2$|Query$|QueryV2$/, ''), endpoint])); - const gqlFeatureUser = { hidden_profile_subscriptions_enabled: true, rweb_tipjar_consumption_enabled: true, @@ -116,4 +112,4 @@ const timelineParams = { const bearerToken = 'Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA'; -export { baseUrl, gqlMap, gqlMapThirdParty, gqlFeatures, timelineParams, bearerToken }; +export { baseUrl, gqlMap, gqlFeatures, timelineParams, bearerToken }; From b32c5ca07e4e906d0ade863fe1617403712ef1b4 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 29 Nov 2024 14:59:44 +0800 Subject: [PATCH 640/740] fix(route/twitter): add enable thirdparty api switcher --- lib/routes/twitter/api/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/routes/twitter/api/index.ts b/lib/routes/twitter/api/index.ts index a8389eb69e0e142..9f17ad751730508 100644 --- a/lib/routes/twitter/api/index.ts +++ b/lib/routes/twitter/api/index.ts @@ -3,6 +3,7 @@ import mobileApi from './mobile-api/api'; import webApi from './web-api/api'; import { config } from '@/config'; +const enableThirdPartyApi = config.twitter.thirdPartyApi; const enableMobileApi = config.twitter.username && config.twitter.password; const enableWebApi = config.twitter.authToken; @@ -35,7 +36,9 @@ let api: { getHomeLatestTimeline: () => null, }; -if (enableWebApi) { +if (enableThirdPartyApi) { + api = webApi; +} else if (enableWebApi) { api = webApi; } else if (enableMobileApi) { api = mobileApi; From ad7d5c3c263a1997d8bfcb2fdc7ffa5a51a6a893 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 08:41:31 +0000 Subject: [PATCH 641/740] chore(deps-dev): bump discord-api-types from 0.37.109 to 0.37.110 (#17752) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.109 to 0.37.110. - [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.109...0.37.110) --- updated-dependencies: - dependency-name: discord-api-types dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 37af913ae467381..042e89f51485590 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "@typescript-eslint/parser": "8.16.0", "@vercel/nft": "0.27.6", "@vitest/coverage-v8": "2.0.5", - "discord-api-types": "0.37.109", + "discord-api-types": "0.37.110", "eslint": "9.15.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 32713914258a475..d632dd12ab46648 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.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: - specifier: 0.37.109 - version: 0.37.109 + specifier: 0.37.110 + version: 0.37.110 eslint: specifier: 9.15.0 version: 9.15.0 @@ -2790,8 +2790,8 @@ packages: resolution: {integrity: sha512-d9paCbverdqmuwR+B40phSqiHhgPKiP8dpsMz5WT9U6ug2VVQ3tqXNCedpa6iGHg6mgv9lHaoq5DJUu2IXMjsQ==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.109: - resolution: {integrity: sha512-B4W/ao8vempNVCS4/K4CeeCGhiabTcU7ekgqJy4/RytEsgkJP9hWS0MWZMcRP3wWzU/FXi6QqqvArZTJUfc6Iw==} + discord-api-types@0.37.110: + resolution: {integrity: sha512-wVaAJkrSgNRo8nd523qKYPqkClTNHhjKOk/g6265rzHuc7TNS6Ivz06DPW4iZvnhFobbH95hKlgsRf6jcAbtlA==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -8306,7 +8306,7 @@ snapshots: directory-import@3.3.1: {} - discord-api-types@0.37.109: {} + discord-api-types@0.37.110: {} doctrine@3.0.0: dependencies: From cbdbec8c90c6abc14e1bc1e24d9c03d86f1322ad Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Nov 2024 08:43:54 +0000 Subject: [PATCH 642/740] chore(deps): bump @hono/zod-openapi from 0.18.1 to 0.18.2 (#17753) Bumps [@hono/zod-openapi](https://github.com/honojs/middleware) from 0.18.1 to 0.18.2. - [Release notes](https://github.com/honojs/middleware/releases) - [Commits](https://github.com/honojs/middleware/compare/@hono/zod-openapi@0.18.1...@hono/zod-openapi@0.18.2) --- updated-dependencies: - dependency-name: "@hono/zod-openapi" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 042e89f51485590..7587b194cc0c403 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.13.7", - "@hono/zod-openapi": "0.18.1", + "@hono/zod-openapi": "0.18.2", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.55.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d632dd12ab46648..6008fe98158860b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,8 +25,8 @@ importers: specifier: 1.13.7 version: 1.13.7(hono@4.6.12) '@hono/zod-openapi': - specifier: 0.18.1 - version: 0.18.1(hono@4.6.12)(zod@3.23.8) + specifier: 0.18.2 + version: 0.18.2(hono@4.6.12)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -1361,8 +1361,8 @@ packages: peerDependencies: hono: ^4 - '@hono/zod-openapi@0.18.1': - resolution: {integrity: sha512-9P/xTbFHvHqjdv2Z/oxHwf+u6QPes4Nkls0LBANTVbnVeSVQSUsPDnkPlNey2ETyJ3So9NL3bC72tVwd6dYGNA==} + '@hono/zod-openapi@0.18.2': + resolution: {integrity: sha512-CW4HkkW5Uq9YWweYWgi5UIAmlUlDQaRl642QFX7QKto9uv7ZDD15cvzOclGD55fL9yiKh5bk3dymDVSlwz8dEg==} engines: {node: '>=16.0.0'} peerDependencies: hono: '>=4.3.6' @@ -6786,7 +6786,7 @@ snapshots: dependencies: hono: 4.6.12 - '@hono/zod-openapi@0.18.1(hono@4.6.12)(zod@3.23.8)': + '@hono/zod-openapi@0.18.2(hono@4.6.12)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) '@hono/zod-validator': 0.4.1(hono@4.6.12)(zod@3.23.8) From 39e3493dd3bfa2382d996864d1737a5db3297432 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Fri, 29 Nov 2024 17:57:53 +0800 Subject: [PATCH 643/740] feat(route): add UK Parliament Petitions (#17746) * feat(route): add UK Parliament Petitions * fix typo --- lib/routes/parliament.uk/namespace.ts | 2 + lib/routes/parliament.uk/petitions.ts | 191 ++++++++++++++++++ .../parliament.uk/templates/description.art | 7 + 3 files changed, 200 insertions(+) create mode 100644 lib/routes/parliament.uk/petitions.ts create mode 100644 lib/routes/parliament.uk/templates/description.art diff --git a/lib/routes/parliament.uk/namespace.ts b/lib/routes/parliament.uk/namespace.ts index 18d9ae467c3459a..5817bd6ba50d754 100644 --- a/lib/routes/parliament.uk/namespace.ts +++ b/lib/routes/parliament.uk/namespace.ts @@ -3,5 +3,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { name: 'UK Parliament', url: 'parliament.uk', + categories: ['government'], + description: 'The UK Parliament has two Houses that work on behalf of UK citizens to check and challenge the work of Government, make and shape effective laws, and debate/make decisions on the big issues of the day.', lang: 'en', }; diff --git a/lib/routes/parliament.uk/petitions.ts b/lib/routes/parliament.uk/petitions.ts new file mode 100644 index 000000000000000..1700598b579b7d8 --- /dev/null +++ b/lib/routes/parliament.uk/petitions.ts @@ -0,0 +1,191 @@ +import path from 'node:path'; + +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<Data> => { + const { state = 'all' } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '50', 10); + + const rootUrl: string = 'https://petition.parliament.uk'; + const targetUrl: string = new URL(`petitions?state=${state}`, rootUrl).href; + const jsonUrl: string = new URL('petitions.json', rootUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language: string = $('html').prop('lang') ?? 'en'; + + const jsonResponse = await ofetch(jsonUrl, { + query: { + page: 1, + state, + }, + }); + + const items = jsonResponse.data.slice(0, limit).map((item): DataItem => { + 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 guid = `parliament.uk-petition-${item.id}`; + + const author: DataItem['author'] = attributes.creator_name; + + const extraLinks = attributes.departments?.map((link) => ({ + url: link.url, + type: 'related', + content_html: link.name, + })); + + return { + title, + description, + pubDate: parseDate(attributes.created_at), + link: new URL(`petitions/${item.id}`, rootUrl).href, + category: [...new Set([...(attributes.topics ?? []), ...(attributes.departments?.map((d) => d.name) ?? [])])].filter(Boolean), + author, + guid, + id: guid, + content: { + html: description, + text: attributes.background, + }, + updated: parseDate(attributes.updated_at), + language, + _extra: { + links: extraLinks?.length ? extraLinks : undefined, + }, + }; + }); + + const feedImage = $('meta[property="og:image"]').prop('content'); + + return { + title: $('h1.page-title').text(), + description: $('meta[property="twitter:description"]').prop('content'), + link: targetUrl, + item: items, + allowEmpty: true, + image: feedImage, + author: $('meta[name="msapplication-tooltip"]').prop('content'), + language, + id: $('meta[property="og:url"]').prop('content'), + }; +}; + +export const route: Route = { + path: '/petitions/:state?', + name: 'Petitions', + url: 'petition.parliament.uk', + maintainers: ['nczitzk'], + handler, + example: '/parliament.uk/petitions/all', + parameters: { + state: 'State, `all` by default, see below', + }, + description: `:::tip +If you subscribe to [Recent petitions](https://petition.parliament.uk/petitions?state=recent),where the URL is \`https://petition.parliament.uk/petitions?state=recent\`, use the value of \`state\` as the parameter to fill in. Therefore, the route will be [\`/parliament.uk/petitions/recent\`](https://rsshub.app/parliament.uk/petitions/recent). +::: + +<details> + <summary>More states</summary> + +| Name | ID | +| ------------------------------- | ----------------- | +| All petitions | all | +| Open petitions | open | +| Recent petitions | recent | +| Closed petitions | closed | +| Rejected petitions | rejected | +| Awaiting government response | awaiting_response | +| Government responses | with_response | +| Awaiting a debate in Parliament | awaiting_debate | +| Debated in Parliament | debated | +| Not debated in Parliament | not_debated | + +</details> + `, + categories: ['government'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['petition.parliament.uk/petitions'], + target: (_, url) => { + const urlObj = new URL(url); + const state = urlObj.searchParams.get('state'); + + return `/parliament.uk/petitions${state ? `/${state}` : ''}`; + }, + }, + { + title: 'All petitions', + source: ['petition.parliament.uk/petitions'], + target: '/petitions/all', + }, + { + title: 'Open petitions', + source: ['petition.parliament.uk/petitions'], + target: '/petitions/open', + }, + { + title: 'Recent petitions', + source: ['petition.parliament.uk/petitions'], + target: '/petitions/recent', + }, + { + title: 'Closed petitions', + source: ['petition.parliament.uk/petitions'], + target: '/petitions/closed', + }, + { + title: 'Rejected petitions', + source: ['petition.parliament.uk/petitions'], + target: '/petitions/rejected', + }, + { + title: 'Awaiting government response', + source: ['petition.parliament.uk/petitions'], + target: '/petitions/awaiting_response', + }, + { + title: 'Government responses', + source: ['petition.parliament.uk/petitions'], + target: '/petitions/with_response', + }, + { + title: 'Awaiting a debate in Parliament', + source: ['petition.parliament.uk/petitions'], + target: '/petitions/awaiting_debate', + }, + { + title: 'Debated in Parliament', + source: ['petition.parliament.uk/petitions'], + target: '/petitions/debated', + }, + { + title: 'Not debated in Parliament', + source: ['petition.parliament.uk/petitions'], + target: '/petitions/not_debated', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/parliament.uk/templates/description.art b/lib/routes/parliament.uk/templates/description.art new file mode 100644 index 000000000000000..eee77a054258305 --- /dev/null +++ b/lib/routes/parliament.uk/templates/description.art @@ -0,0 +1,7 @@ +{{ if intro }} + <blockquote>{{ intro }}</blockquote> +{{ /if }} + +{{ if description }} + <p>{{ description }}<p> +{{ /if }} \ No newline at end of file From 3380b564888715c9af6c8f8b039d610ead6d2129 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 29 Nov 2024 19:24:47 +0800 Subject: [PATCH 644/740] fix(route/newrank): wechat route error --- lib/routes/newrank/wechat.ts | 7 ++++++- lib/utils/wechat-mp.ts | 28 +++++++++++++++------------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/lib/routes/newrank/wechat.ts b/lib/routes/newrank/wechat.ts index dd7db0c947f52d5..a87822aef724c79 100644 --- a/lib/routes/newrank/wechat.ts +++ b/lib/routes/newrank/wechat.ts @@ -25,7 +25,7 @@ export const route: Route = { supportScihub: false, }, name: '微信公众号', - maintainers: ['lessmoe'], + maintainers: ['lessmoe', 'pseudoyu'], handler, }; @@ -70,16 +70,21 @@ async function handler(ctx) { xyz: utils.decrypt_wechat_detail_xyz(uid, nonce), }, }); + const name = response.data.value.user.name; const realTimeArticles = utils.flatten(response.data.value.realTimeArticles); const articles = utils.flatten(response.data.value.articles); const newArticles = [...realTimeArticles, ...articles]; + const items = newArticles.map((item) => ({ + id: item.id, title: item.title, description: '', link: item.url, pubDate: item.publicTime, })); + + // TODO: link is empty await Promise.all(items.map((item) => finishArticleItem(item))); return { diff --git a/lib/utils/wechat-mp.ts b/lib/utils/wechat-mp.ts index 4aaa238de0634ce..24537c33f2db1d7 100644 --- a/lib/utils/wechat-mp.ts +++ b/lib/utils/wechat-mp.ts @@ -623,19 +623,21 @@ const fetchArticle = (url: string, bypassHostCheck: boolean = false) => { * @return {Promise<object>} - The incoming `item` object, with the article and its metadata filled in. */ const finishArticleItem = async (item, setMpNameAsAuthor = false, skipLink = false) => { - const fetchedItem = await fetchArticle(item.link); - for (const key in fetchedItem) { - switch (key) { - case 'author': - item.author = setMpNameAsAuthor - ? fetchedItem.mpName || item.author // the Official Account itself. if your route return articles from different accounts, you may want to use this - : fetchedItem.author || item.author; // the real author of the article. if your route return articles from a certain account, use this - break; - case 'link': - item.link = skipLink ? item.link : fetchedItem.link || item.link; - break; - default: - item[key] = item[key] || fetchedItem[key]; + if (item.link) { + const fetchedItem = await fetchArticle(item.link); + for (const key in fetchedItem) { + switch (key) { + case 'author': + item.author = setMpNameAsAuthor + ? fetchedItem.mpName || item.author // the Official Account itself. if your route return articles from different accounts, you may want to use this + : fetchedItem.author || item.author; // the real author of the article. if your route return articles from a certain account, use this + break; + case 'link': + item.link = skipLink ? item.link : fetchedItem.link || item.link; + break; + default: + item[key] = item[key] || fetchedItem[key]; + } } } return item; From c85ecdc03c1278c99665545b3218a912862e3325 Mon Sep 17 00:00:00 2001 From: X <xiangzy8@gmail.com> Date: Fri, 29 Nov 2024 22:09:04 +0800 Subject: [PATCH 645/740] fix(route): bluesky allow empty (#17751) --- lib/routes/bsky/posts.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts index 20c15a7bed58bca..8beb29b1c460f32 100644 --- a/lib/routes/bsky/posts.ts +++ b/lib/routes/bsky/posts.ts @@ -85,5 +85,6 @@ async function handler(ctx) { icon: profile.avatar, logo: profile.avatar, item: items, + allowEmpty: true, }; } From c106c5f214f2854ac58769156ead47e169f6210d Mon Sep 17 00:00:00 2001 From: Geraldxm <115340172+Geraldxm@users.noreply.github.com> Date: Fri, 29 Nov 2024 22:39:38 +0800 Subject: [PATCH 646/740] feat: Feature/foodtalks (#17718) * 24/11/28 fix: remove uncessary files * 24/11/28 fix: return promise * 24/11/28 refactor: return promises * 24/11/28 refactor: remove await in the function * 24/11/29 fix: pass Promises to items? --- lib/routes/foodtalks/index.ts | 78 +++++++++++++++++++++++++++++++ lib/routes/foodtalks/namespace.ts | 9 ++++ 2 files changed, 87 insertions(+) create mode 100644 lib/routes/foodtalks/index.ts create mode 100644 lib/routes/foodtalks/namespace.ts diff --git a/lib/routes/foodtalks/index.ts b/lib/routes/foodtalks/index.ts new file mode 100644 index 000000000000000..4633cc1ac12b24b --- /dev/null +++ b/lib/routes/foodtalks/index.ts @@ -0,0 +1,78 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import cache from '@/utils/cache'; +import { namespace } from './namespace'; +import logger from '@/utils/logger'; + +export const route: Route = { + path: '/', + categories: namespace.categories, + example: '/foodtalks', + radar: [ + { + source: ['www.foodtalks.cn'], + }, + ], + name: 'FoodTalks global food information network', + maintainers: ['Geraldxm'], + handler, + url: 'www.foodtalks.cn', +}; + +function processItems(list: any[], fullTextApi: string) { + return Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + try { + const response = await ofetch(fullTextApi.replace('{id}', item.id), { + headers: { + referrer: 'https://www.foodtalks.cn/', + method: 'GET', + }, + }); + item.description = response.data.content; + return item; + } catch (error) { + // Log the error for debugging, but don't rethrow to avoid halting the entire batch. + // Consider adding a fallback description or other handling here. + logger.error(`Error fetching full text for ${item.link}:`, error); + return item; // Return the original item, even without the description + } + }) + ) + ); +} + +async function handler() { + const url = 'https://api-we.foodtalks.cn/news/news/page?current=1&size=15&isLatest=1&language=ZH'; + const response = await ofetch(url, { + headers: { + referrer: 'https://www.foodtalks.cn/', + method: 'GET', + }, + }); + const records = response.data.records; + + const list = records.map((item) => ({ + title: item.title, + pubDate: new Date(item.publishTime), + link: `https://www.foodtalks.cn/news/${item.id}`, + category: item.parentTagCode === 'category' ? item.tagCode : item.parentTagCode, + author: item.author === null ? item.sourceName : item.author, + id: item.id, + image: item.coverImg, + })); + + const fullTextApi = 'https://api-we.foodtalks.cn/news/news/{id}?language=ZH'; + + // Assign the result of processItems to the items variable + const items = await processItems(list, fullTextApi); + + return { + title: namespace.name, + description: namespace.description, + link: 'https://' + namespace.url, + item: items, // Use the processed items here + image: 'https://www.foodtalks.cn/static/img/news-site-logo.7aaa5463.svg', + }; +} diff --git a/lib/routes/foodtalks/namespace.ts b/lib/routes/foodtalks/namespace.ts new file mode 100644 index 000000000000000..1f98d28b8ae7558 --- /dev/null +++ b/lib/routes/foodtalks/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'FoodTalks全球食品资讯网', + url: 'www.foodtalks.cn', + categories: ['new-media'], + lang: 'zh-CN', + description: 'FoodTalks全球食品资讯网是一个提供食品饮料行业新闻、资讯、分析和商业资源的领先在线平台。它涵盖行业趋势、市场动态、产品创新、投融资信息以及企业新闻,连接行业内的专业人士、企业和消费者。', +}; From bc89b3dc36685dbd9b8de0a63e096f92b7c52adb Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Fri, 29 Nov 2024 08:04:28 -0800 Subject: [PATCH 647/740] feat(picnob): cache user metadata & video playback in img_multi (#17756) --- lib/routes/picnob/templates/desc.art | 11 +++- lib/routes/picnob/user.ts | 87 +++++++++++++++++----------- 2 files changed, 61 insertions(+), 37 deletions(-) diff --git a/lib/routes/picnob/templates/desc.art b/lib/routes/picnob/templates/desc.art index 9140d9f63fe728e..4910d642370204f 100644 --- a/lib/routes/picnob/templates/desc.art +++ b/lib/routes/picnob/templates/desc.art @@ -1,10 +1,17 @@ {{ if item.type === 'video' }} - <video poster="{{ item.pic }}" controls> + <video poster="{{ item.pic }}" controls preload="metadata"> <source src="{{ item.video }}" type="video/mp4"> </video> {{ else if item.type === 'img_multi' }} {{ each item.images i }} - <img src="{{ i.url }}"> + {{ if i.isVideo }} + <video poster="{{ i.url }}" controls preload="metadata"> + <source src="{{ i.ori }}" type="video/mp4"> + </video> + {{ else }} + <img src="{{ i.url }}"> + {{ /if }} + <br> {{ /each }} {{ else if item.type === 'img_sig' }} <img src="{{ item.pic }}"> diff --git a/lib/routes/picnob/user.ts b/lib/routes/picnob/user.ts index 6176284318e6ee2..6cdff080b7b2881 100644 --- a/lib/routes/picnob/user.ts +++ b/lib/routes/picnob/user.ts @@ -3,13 +3,14 @@ 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 { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; import { puppeteerGet } from './utils'; import puppeteer from '@/utils/puppeteer'; +import sanitizeHtml from 'sanitize-html'; export const route: Route = { path: '/user/:id', @@ -26,7 +27,7 @@ export const route: Route = { }, radar: [ { - source: ['picnob.com/profile/:id/*'], + source: ['piokok.com/profile/:id/*'], target: '/user/:id', }, ], @@ -37,44 +38,60 @@ 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 'piokok' eventually + const baseUrl = 'https://www.piokok.com'; const id = ctx.req.param('id'); const url = `${baseUrl}/profile/${id}/`; const browser = await puppeteer(); // TODO: can't bypass cloudflare 403 error without puppeteer - let html; - let usePuppeteer = false; - try { - const { data } = await got(url, { - headers: { - accept: 'text/html', - referer: 'https://www.google.com/', - }, - }); - html = data; - } catch (error: any) { - if (error.message.includes('403')) { - html = await puppeteerGet(url, browser); - usePuppeteer = true; + const profile = (await cache.tryGet(`picnob:user:${id}`, async () => { + let html; + let usePuppeteer = false; + try { + const data = await ofetch(url, { + headers: { + accept: 'text/html', + referer: 'https://www.google.com/', + }, + }); + html = data; + } catch (error: any) { + if (error.message.includes('403')) { + html = await puppeteerGet(url, browser); + usePuppeteer = true; + } } - } - const $ = load(html); - const profileName = $('h1.fullname').text(); - const userId = $('input[name=userid]').attr('value'); + const $ = load(html); + const name = $('h1.fullname').text(); + const userId = $('input[name=userid]').attr('value'); + + return { + name, + userId, + description: $('.info .sum').text(), + image: $('.ava .pic img').attr('src'), + usePuppeteer, + }; + })) as { + name: string; + userId: string; + description: string; + image: string; + usePuppeteer: boolean; + }; let posts; - if (usePuppeteer) { - const data = await puppeteerGet(`${baseUrl}/api/posts?userid=${userId}`, browser); + if (profile.usePuppeteer) { + const data = await puppeteerGet(`${baseUrl}/api/posts?userid=${profile.userId}`, browser); posts = data.posts; } else { - const { data } = await got(`${baseUrl}/api/posts`, { + const data = await ofetch(`${baseUrl}/api/posts`, { headers: { accept: 'application/json', }, - searchParams: { - userid: userId, + query: { + userid: profile.userId, }, }); posts = data.posts; @@ -82,16 +99,16 @@ async function handler(ctx) { const list = await Promise.all( posts.items.map(async (item) => { - const { shortcode, sum, type, time } = item; + const { shortcode, sum, sum_pure, type, time } = item; const link = `${baseUrl}/post/${shortcode}/`; if (type === 'img_multi') { item.images = await cache.tryGet(link, async () => { let html; - if (usePuppeteer) { + if (profile.usePuppeteer) { html = await puppeteerGet(link, browser); } else { - const { data } = await got(link); + const data = await ofetch(link); html = data; } const $ = load(html); @@ -104,6 +121,7 @@ async function handler(ctx) { return { ori: a.attr('href'), url: a.find('img').attr('data-src'), + isVideo: !!a.find('.icon_play').length, }; }) ), @@ -112,8 +130,7 @@ async function handler(ctx) { } return { - // sum_pure lacks linebreaks/spaces between lines - title: load(sum, null, false).text().replaceAll('\n', ' '), + title: sanitizeHtml(sum.split('\n')[0], { allowedTags: [], allowedAttributes: {} }) || sum_pure, description: art(path.join(__dirname, 'templates/desc.art'), { item: { ...item, @@ -129,10 +146,10 @@ async function handler(ctx) { await browser.close(); return { - title: `${profileName} (@${id}) - Picnob`, - description: $('.info .sum').text(), + title: `${profile.name} (@${id}) - Picnob`, + description: profile.description, link: url, - image: $('.ava .pic img').attr('src'), + image: profile.image, item: list, }; } From 6f551949ea04c3c434c43f483fc8314f5d8236c5 Mon Sep 17 00:00:00 2001 From: Geraldxm <115340172+Geraldxm@users.noreply.github.com> Date: Sat, 30 Nov 2024 02:45:01 +0800 Subject: [PATCH 648/740] feat: add param :limit? to set article numbers (#17755) * 24/11/28 fix: remove uncessary files * 24/11/28 fix: return promise * 24/11/28 refactor: return promises * 24/11/28 refactor: remove await in the function * 24/11/29 fix: pass Promises to items? * 24/11/29 feature: page size 15 -> 30; add source authentication code * feat: add param :limit? * fix: change description * 24/11/30 feat: use ctx.req.query('limit') * Update lib/routes/foodtalks/index.ts --------- --- lib/routes/foodtalks/index.ts | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/routes/foodtalks/index.ts b/lib/routes/foodtalks/index.ts index 4633cc1ac12b24b..9a9454286ee30b8 100644 --- a/lib/routes/foodtalks/index.ts +++ b/lib/routes/foodtalks/index.ts @@ -33,18 +33,17 @@ function processItems(list: any[], fullTextApi: string) { item.description = response.data.content; return item; } catch (error) { - // Log the error for debugging, but don't rethrow to avoid halting the entire batch. - // Consider adding a fallback description or other handling here. logger.error(`Error fetching full text for ${item.link}:`, error); - return item; // Return the original item, even without the description + return item; } }) ) ); } -async function handler() { - const url = 'https://api-we.foodtalks.cn/news/news/page?current=1&size=15&isLatest=1&language=ZH'; +async function handler(ctx) { + const limit = ctx.req.query('limit') || 15; + const url = `https://api-we.foodtalks.cn/news/news/page?current=1&size=${limit}&isLatest=1&language=ZH`; const response = await ofetch(url, { headers: { referrer: 'https://www.foodtalks.cn/', @@ -64,15 +63,13 @@ async function handler() { })); const fullTextApi = 'https://api-we.foodtalks.cn/news/news/{id}?language=ZH'; - - // Assign the result of processItems to the items variable const items = await processItems(list, fullTextApi); return { title: namespace.name, description: namespace.description, link: 'https://' + namespace.url, - item: items, // Use the processed items here + item: items, image: 'https://www.foodtalks.cn/static/img/news-site-logo.7aaa5463.svg', }; } From 5cd238205725f00a8c8830bf824aa2b06427b8c6 Mon Sep 17 00:00:00 2001 From: lidashuang <ldshuang@gmail.com> Date: Sat, 30 Nov 2024 23:37:27 +0800 Subject: [PATCH 649/740] fix(latepost): TypeError: Cannot read properties of undefined (reading 'title') (#17759) TypeError: Cannot read properties of undefined (reading 'title') --- lib/routes/latepost/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/latepost/index.ts b/lib/routes/latepost/index.ts index 39e5b262c581c7e..4662150213a893b 100644 --- a/lib/routes/latepost/index.ts +++ b/lib/routes/latepost/index.ts @@ -72,7 +72,7 @@ async function handler(ctx) { let items = response.data.slice(0, limit).map((item) => ({ title: item.title, link: new URL(item.detail_url, rootUrl).href, - category: [item.is_dj ? exclusiveCategory : undefined, item.programa ? columns[item.programa].title : undefined, ...item.label.map((c) => c.label)], + category: [item.is_dj ? exclusiveCategory : undefined, item.programa ? columns[item.programa]?.title : undefined, ...item.label.map((c) => c.label)], guid: item.id, pubDate: parseDate(item.release_time, ['MM月DD日', 'YYYY年MM月DD日']), })); From 4dc5ae9b5e2d3f4a36d6701adf0caa604832fa5a Mon Sep 17 00:00:00 2001 From: Andvari <31068367+dzx-dzx@users.noreply.github.com> Date: Mon, 2 Dec 2024 06:48:29 +0800 Subject: [PATCH 650/740] fix(route/fastbull): Use another site (#17765) * Update news.ts * fix(fastbull): update domain --------- --- lib/routes/fastbull/express-news.ts | 8 ++++---- lib/routes/fastbull/namespace.ts | 6 +++--- lib/routes/fastbull/news.ts | 12 ++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/routes/fastbull/express-news.ts b/lib/routes/fastbull/express-news.ts index 732105595ce2573..6ca3ee928f2d065 100644 --- a/lib/routes/fastbull/express-news.ts +++ b/lib/routes/fastbull/express-news.ts @@ -19,17 +19,17 @@ export const route: Route = { }, radar: [ { - source: ['fastbull.cn/express-news', 'fastbull.cn/'], + source: ['fastbull.com/express-news', 'fastbull.com/'], }, ], - name: '快讯', + name: 'News Flash', maintainers: ['nczitzk'], handler, - url: 'fastbull.cn/express-news', + url: 'fastbull.com/express-news', }; async function handler() { - const rootUrl = 'https://www.fastbull.cn'; + const rootUrl = 'https://www.fastbull.com'; const currentUrl = `${rootUrl}/express-news`; const response = await got({ diff --git a/lib/routes/fastbull/namespace.ts b/lib/routes/fastbull/namespace.ts index a925e44f92c8faa..f35155677fd84cb 100644 --- a/lib/routes/fastbull/namespace.ts +++ b/lib/routes/fastbull/namespace.ts @@ -1,7 +1,7 @@ import type { Namespace } from '@/types'; export const namespace: Namespace = { - name: '法布财经', - url: 'fastbull.cn', - lang: 'zh-CN', + name: 'FastBull', + url: 'fastbull.com', + lang: 'en', }; diff --git a/lib/routes/fastbull/news.ts b/lib/routes/fastbull/news.ts index 1711b3bfb95bd0d..d13d24036fd18d2 100644 --- a/lib/routes/fastbull/news.ts +++ b/lib/routes/fastbull/news.ts @@ -10,7 +10,7 @@ import { art } from '@/utils/render'; import path from 'node:path'; export const route: Route = { - path: ['/news', '/'], + path: '/news', categories: ['finance', 'popular'], view: ViewType.Articles, example: '/fastbull/news', @@ -25,18 +25,18 @@ export const route: Route = { }, radar: [ { - source: ['fastbull.cn/news', 'fastbull.cn/'], + source: ['fastbull.com/cn/news', 'fastbull.com/cn'], }, ], - name: '新闻', + name: 'News', maintainers: ['nczitzk'], handler, - url: 'fastbull.cn/news', + url: 'fastbull.com/news', }; async function handler() { - const rootUrl = 'https://www.fastbull.cn'; - const currentUrl = `${rootUrl}/news`; + const rootUrl = 'https://www.fastbull.com'; + const currentUrl = `${rootUrl}/cn/news`; const response = await got({ method: 'get', From 310515b969fb0f0f4e9d6ddeff42eab2292e75b7 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Mon, 2 Dec 2024 07:28:51 +0800 Subject: [PATCH 651/740] =?UTF-8?q?feat(route):=20add=20=E8=B6=A3=E9=9B=86?= =?UTF-8?q?=E7=9B=90=E9=80=89=E6=95=85=E4=BA=8B=20(#17761)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/ifun/n/category.ts | 102 ++++++++++++++++++++++++++++++++++ lib/routes/ifun/n/search.ts | 73 ++++++++++++++++++++++++ lib/routes/ifun/n/tag.ts | 76 +++++++++++++++++++++++++ lib/routes/ifun/n/util.ts | 34 ++++++++++++ lib/routes/ifun/namespace.ts | 9 +++ 5 files changed, 294 insertions(+) create mode 100644 lib/routes/ifun/n/category.ts create mode 100644 lib/routes/ifun/n/search.ts create mode 100644 lib/routes/ifun/n/tag.ts create mode 100644 lib/routes/ifun/n/util.ts create mode 100644 lib/routes/ifun/namespace.ts diff --git a/lib/routes/ifun/n/category.ts b/lib/routes/ifun/n/category.ts new file mode 100644 index 000000000000000..b7f78de1fabeaaa --- /dev/null +++ b/lib/routes/ifun/n/category.ts @@ -0,0 +1,102 @@ +import { type Context } from 'hono'; + +import { type DataItem, type Route, type Data, ViewType } from '@/types'; + +import ofetch from '@/utils/ofetch'; + +import { author, language, rootUrl, processItems } from './util'; + +export const handler = async (ctx: Context): Promise<Data> => { + const { id } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const targetUrl: string = rootUrl; + const apiUrl: string = new URL(`api/articles/${id ? 'categoryId' : 'all'}`, rootUrl).href; + const apiCategoryUrl: string = new URL('api/categories/all', rootUrl).href; + + const apiResponse = await ofetch(apiUrl, { + query: { + datasrc: id ? 'categoriesall' : 'articles', + current: 1, + size: limit, + categoryId: id, + }, + }); + + const apiCategoryResponse = await ofetch(apiCategoryUrl, { + query: { + datasrc: 'categories', + }, + }); + + const categoryName: string = apiCategoryResponse.data.find((item) => item.categoryid === id)?.category; + + const items: DataItem[] = processItems(apiResponse.data.records, limit); + + return { + title: `${author}${categoryName ? ` - ${categoryName}` : ''}`, + description: categoryName, + link: targetUrl, + item: items, + allowEmpty: true, + author, + language, + }; +}; + +export const route: Route = { + path: '/n/category/:id?', + name: '盐选故事分类', + url: 'n.ifun.cool', + maintainers: ['nczitzk'], + handler, + example: '/ifun/n/category', + parameters: { + id: '分类 id,默认为空,即全部,见下表', + }, + description: ` +| 名称 | ID | +| -------- | --- | +| 全部 | | +| 通告 | 1 | +| 故事盐选 | 2 | +| 趣集精选 | 3 | + `, + categories: ['new-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['n.ifun.cool'], + target: '/n/category/:id?', + }, + { + title: '全部', + source: ['n.ifun.cool'], + target: '/n/category', + }, + { + title: '通告', + source: ['n.ifun.cool'], + target: '/n/category/1', + }, + { + title: '盐选故事', + source: ['n.ifun.cool'], + target: '/n/category/2', + }, + { + title: '趣集精选', + source: ['n.ifun.cool'], + target: '/n/category/3', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/ifun/n/search.ts b/lib/routes/ifun/n/search.ts new file mode 100644 index 000000000000000..035855c2aa8a6d0 --- /dev/null +++ b/lib/routes/ifun/n/search.ts @@ -0,0 +1,73 @@ +import { type Context } from 'hono'; + +import { type DataItem, type Route, type Data, ViewType } from '@/types'; + +import ofetch from '@/utils/ofetch'; + +import { author, language, rootUrl, processItems } from './util'; + +export const handler = async (ctx: Context): Promise<Data> => { + const { keywords } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const targetUrl: string = new URL(`search-result/?s=${keywords}`, rootUrl).href; + const apiUrl: string = new URL('api/articles/searchkeywords', rootUrl).href; + + const apiResponse = await ofetch(apiUrl, { + query: { + keywords, + current: 1, + size: limit, + }, + }); + + const items: DataItem[] = processItems(apiResponse.data.records, limit); + + return { + title: `${author} - ${keywords}`, + description: keywords, + link: targetUrl, + item: items, + allowEmpty: true, + author, + language, + }; +}; + +export const route: Route = { + path: '/n/search/:keywords', + name: '盐选故事搜索', + url: 'n.ifun.cool', + maintainers: ['nczitzk'], + handler, + example: '/ifun/n/search/NPC', + parameters: { + keywords: '搜索关键字', + }, + description: `:::tip +若订阅 [关键词:NPC](https://n.ifun.cool/search-result/?s=NPC),网址为 \`https://n.ifun.cool/search-result/?s=NPC\`,请截取 \`s\` 的值 \`NPC\` 作为 \`keywords\` 参数填入,此时目标路由为 [\`/ifun/n/search/NPC\`](https://rsshub.app/ifun/n/search/NPC)。 +::: + `, + categories: ['new-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['n.ifun.cool/search-result'], + target: (_, url) => { + const urlObj = new URL(url); + const keywords = urlObj.searchParams.get('s'); + + return `/ifun/n/search/${keywords}`; + }, + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/ifun/n/tag.ts b/lib/routes/ifun/n/tag.ts new file mode 100644 index 000000000000000..122cc34ce21d4f8 --- /dev/null +++ b/lib/routes/ifun/n/tag.ts @@ -0,0 +1,76 @@ +import { type Context } from 'hono'; + +import { type DataItem, type Route, type Data, ViewType } from '@/types'; + +import ofetch from '@/utils/ofetch'; + +import { author, language, rootUrl, processItems } from './util'; + +export const handler = async (ctx: Context): Promise<Data> => { + const { name } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const targetUrl: string = new URL(`article-list/1?tagName=${name}`, rootUrl).href; + const apiUrl: string = new URL('api/articles/tagId', rootUrl).href; + + const apiResponse = await ofetch(apiUrl, { + query: { + datasrc: 'tagid', + tagname: name, + current: 1, + size: limit, + }, + }); + + const items: DataItem[] = processItems(apiResponse.data.records, limit); + + return { + title: `${author} - ${name}`, + description: name, + link: targetUrl, + item: items, + allowEmpty: true, + author, + language, + }; +}; + +export const route: Route = { + path: '/n/tag/:name', + name: '盐选故事专栏', + url: 'n.ifun.cool', + maintainers: ['nczitzk'], + handler, + example: '/ifun/n/tag/zhihu', + parameters: { + name: '专栏 id,可在对应专栏页 URL 中找到', + }, + description: `:::tip +若订阅 [zhihu](https://n.ifun.cool/article-list/2?tagName=zhihu),网址为 \`https://n.ifun.cool/article-list/2?tagName=zhihu\`,请截取 \`tagName\` 的值 \`zhihu\` 作为 \`name\` 参数填入,此时目标路由为 [\`/ifun/n/tag/zhihu\`](https://rsshub.app/ifun/n/tag/zhihu)。 + +更多专栏请见 [盐选故事专栏](https://n.ifun.cool/tags)。 +::: + `, + categories: ['new-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['n.ifun.cool/article-list/1'], + target: (_, url) => { + const urlObj = new URL(url); + const name = urlObj.searchParams.get('tagName'); + + return `/ifun/n/tag/${name}`; + }, + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/ifun/n/util.ts b/lib/routes/ifun/n/util.ts new file mode 100644 index 000000000000000..5f1bfa14d859133 --- /dev/null +++ b/lib/routes/ifun/n/util.ts @@ -0,0 +1,34 @@ +import { type DataItem } from '@/types'; + +import { parseDate } from '@/utils/parse-date'; + +const author: string = '趣集'; +const language: string = 'zh-CN'; +const rootUrl: string = 'https://n.ifun.cool'; + +const processItems: (items: any[], limit: number) => DataItem[] = (items: any[], limit: number) => + items.slice(0, limit).map((item): DataItem => { + const title: string = item.title; + const description: string = item.content; + const guid: string = `ifun-n-${item.id}`; + + const author: DataItem['author'] = item.author; + + return { + title, + description, + pubDate: parseDate(item.createtime), + link: item.id ? new URL(`articles/${item.id}`, rootUrl).href : undefined, + category: [...new Set([item.category, item.tag].filter(Boolean))], + author, + guid, + id: guid, + content: { + html: description, + text: description, + }, + language, + }; + }); + +export { author, language, rootUrl, processItems }; diff --git a/lib/routes/ifun/namespace.ts b/lib/routes/ifun/namespace.ts new file mode 100644 index 000000000000000..2fa5dca071e641a --- /dev/null +++ b/lib/routes/ifun/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '趣集', + url: 'ifun.cool', + categories: ['new-media'], + description: '全面的找书、学习资源导航平台,它整合了电子书和科研文档的搜索功能,方便用户进行学习资料的检索和分享,为用户提供一站式的读书学习体验。', + lang: 'zh-CN', +}; From 4c0925157f97b662999a5ba80b8e6c3dfd3596ce Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Mon, 2 Dec 2024 11:33:35 +0800 Subject: [PATCH 652/740] feat(route/qingting): return first page program instead of 10 --- lib/routes/qingting/channel.ts | 18 ++++++++--------- lib/routes/qingting/podcast.ts | 36 ++++++++++++---------------------- 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/lib/routes/qingting/channel.ts b/lib/routes/qingting/channel.ts index 27c08b96c768af3..8833715da67f22b 100644 --- a/lib/routes/qingting/channel.ts +++ b/lib/routes/qingting/channel.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 timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; @@ -18,18 +18,18 @@ export const route: Route = { supportScihub: false, }, name: '专辑', - maintainers: ['nczitzk'], + maintainers: ['nczitzk', 'pseudoyu'], handler, }; async function handler(ctx) { const channelUrl = `https://i.qingting.fm/capi/v3/channel/${ctx.req.param('id')}`; - let response = await got(channelUrl); - const title = response.data.data.title; - const programUrl = `https://i.qingting.fm/capi/channel/${ctx.req.param('id')}/programs/${response.data.data.v}?curpage=1&pagesize=10&order=asc`; - response = await got(programUrl); + let response = await ofetch(channelUrl); + const title = response.data.title; + const programUrl = `https://i.qingting.fm/capi/channel/${ctx.req.param('id')}/programs/${response.data.v}?curpage=1&order=asc`; + response = await ofetch(programUrl); - const items = response.data.data.programs.map((item) => ({ + const items = response.data.programs.map((item) => ({ title: item.title, link: `https://www.qingting.fm/channels/${ctx.req.param('id')}/programs/${item.id}/`, pubDate: timezone(parseDate(item.update_time), +8), @@ -41,8 +41,8 @@ async function handler(ctx) { item: await Promise.all( items.map((item) => cache.tryGet(item.link, async () => { - response = await got(item.link); - const data = JSON.parse(response.data.match(/},"program":(.*?),"plist":/)[1]); + response = await ofetch(item.link); + const data = JSON.parse(response.match(/},"program":(.*?),"plist":/)[1]); item.description = data.richtext; return item; }) diff --git a/lib/routes/qingting/podcast.ts b/lib/routes/qingting/podcast.ts index 17d1c6b4bab23a8..5df881379fcd6d2 100644 --- a/lib/routes/qingting/podcast.ts +++ b/lib/routes/qingting/podcast.ts @@ -1,7 +1,7 @@ import type { DataItem, Route } from '@/types'; import cache from '@/utils/cache'; import crypto from 'crypto'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import timezone from '@/utils/timezone'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; @@ -29,7 +29,7 @@ export const route: Route = { }, ], name: '播客', - maintainers: ['RookieZoe', 'huyyi'], + maintainers: ['RookieZoe', 'huyyi', 'pseudoyu'], handler, description: `获取的播放 URL 有效期只有 1 天,需要开启播客 APP 的自动下载功能。`, }; @@ -44,35 +44,27 @@ async function handler(ctx) { const channelId = ctx.req.param('id'); const channelUrl = `https://i.qingting.fm/capi/v3/channel/${channelId}`; - const response = await got({ - method: 'get', - url: channelUrl, + const response = await ofetch(channelUrl, { headers: { Referer: 'https://www.qingting.fm/', }, }); - const title = response.data.data.title; - const channel_img = response.data.data.thumbs['400_thumb']; - const authors = response.data.data.podcasters.map((author) => author.nick_name).join(','); - const desc = response.data.data.description; - const programUrl = `https://i.qingting.fm/capi/channel/${channelId}/programs/${response.data.data.v}?curpage=1&pagesize=10&order=asc`; + const title = response.data.title; + const channel_img = response.data.thumbs['400_thumb']; + const authors = response.data.podcasters.map((author) => author.nick_name).join(','); + const desc = response.data.description; + const programUrl = `https://i.qingting.fm/capi/channel/${channelId}/programs/${response.data.v}?curpage=1&pagesize=10&order=asc`; const { - data: { - data: { programs }, - }, - } = await got({ - method: 'get', - url: programUrl, + data: { programs }, + } = await ofetch(programUrl, { headers: { Referer: 'https://www.qingting.fm/', }, }); - const { - data: { data: channelInfo }, - } = await got(`https://i.qingting.fm/capi/v3/channel/${channelId}?user_id=${qingtingId}`); + const { data: channelInfo } = await ofetch(`https://i.qingting.fm/capi/v3/channel/${channelId}?user_id=${qingtingId}`); const isCharged = channelInfo.purchase?.item_type !== 0; @@ -83,15 +75,13 @@ async function handler(ctx) { const data = (await cache.tryGet(`qingting:podcast:${channelId}:${item.id}`, async () => { const link = `https://www.qingting.fm/channels/${channelId}/programs/${item.id}/`; - const detailRes = await got({ - method: 'get', - url: link, + const detailRes = await ofetch(link, { headers: { Referer: 'https://www.qingting.fm/', }, }); - const detail = JSON.parse(detailRes.data.match(/},"program":(.*?),"plist":/)[1]); + const detail = JSON.parse(detailRes.match(/},"program":(.*?),"plist":/)[1]); const rssItem = { title: item.title, From 784c69f555c8ec3527b5677ff8517e182f45272a Mon Sep 17 00:00:00 2001 From: ddddd993 <190154613+ddddd993@users.noreply.github.com> Date: Mon, 2 Dec 2024 15:09:07 +0800 Subject: [PATCH 653/740] =?UTF-8?q?feat(route):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=B0=8F=E7=BA=A2=E4=B9=A6=20LivePhoto=20=E8=A7=86=E9=A2=91?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20(#17760)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/xiaohongshu/user.ts | 13 +++++-- lib/routes/xiaohongshu/util.ts | 70 +++++++++++++++++++++++++++++++--- 2 files changed, 75 insertions(+), 8 deletions(-) diff --git a/lib/routes/xiaohongshu/user.ts b/lib/routes/xiaohongshu/user.ts index 89b82a97289f73f..e97a226757883cc 100644 --- a/lib/routes/xiaohongshu/user.ts +++ b/lib/routes/xiaohongshu/user.ts @@ -1,11 +1,12 @@ import { Route, ViewType } from '@/types'; import cache from '@/utils/cache'; +import querystring from 'querystring'; import { getUser, renderNotesFulltext, getUserWithCookie } from './util'; import InvalidParameterError from '@/errors/types/invalid-parameter'; import { config } from '@/config'; - +import { fallback, queryToBoolean } from '@/utils/readable-social'; export const route: Route = { - path: '/user/:user_id/:category', + path: '/user/:user_id/:category/:routeParams?', name: '用户笔记/收藏', categories: ['social-media', 'popular'], view: ViewType.Articles, @@ -45,12 +46,18 @@ export const route: Route = { ], default: 'notes', }, + routeParams: { + description: 'displayLivePhoto,`/user/:user_id/notes/displayLivePhoto=0`,不限时LivePhoto显示为图片,`/user/:user_id/notes/displayLivePhoto=1`,取值不为0时LivePhoto显示为视频', + default: '0', + }, }, }; async function handler(ctx) { const userId = ctx.req.param('user_id'); const category = ctx.req.param('category'); + const routeParams = querystring.parse(ctx.req.param('routeParams')); + const displayLivePhoto = !!fallback(undefined, queryToBoolean(routeParams.displayLivePhoto), false); const url = `https://www.xiaohongshu.com/user/profile/${userId}`; const cookie = config.xiaohongshu.cookie; @@ -58,7 +65,7 @@ async function handler(ctx) { try { const urlNotePrefix = 'https://www.xiaohongshu.com/explore'; const user = await getUserWithCookie(url, cookie); - const notes = await renderNotesFulltext(user.notes, urlNotePrefix); + const notes = await renderNotesFulltext(user.notes, urlNotePrefix, displayLivePhoto); return { title: `${user.userPageData.basicInfo.nickname} - 笔记 • 小红书 / RED`, description: user.userPageData.basicInfo.desc, diff --git a/lib/routes/xiaohongshu/util.ts b/lib/routes/xiaohongshu/util.ts index 42947aa67fcdabb..50bd213822ea84d 100644 --- a/lib/routes/xiaohongshu/util.ts +++ b/lib/routes/xiaohongshu/util.ts @@ -118,7 +118,7 @@ const formatNote = (url, note) => ({ updated: parseDate(note.lastUpdateTime, 'x'), }); -async function renderNotesFulltext(notes, urlPrex) { +async function renderNotesFulltext(notes, urlPrex, displayLivePhoto) { const data: Array<{ title: string; link: string; @@ -130,7 +130,7 @@ async function renderNotesFulltext(notes, urlPrex) { const promises = notes.flatMap((note) => note.map(async ({ noteCard, id }) => { const link = `${urlPrex}/${id}`; - const { title, description, pubDate } = await getFullNote(link); + const { title, description, pubDate } = await getFullNote(link, displayLivePhoto); return { title, link, @@ -145,7 +145,7 @@ async function renderNotesFulltext(notes, urlPrex) { return data; } -async function getFullNote(link) { +async function getFullNote(link, displayLivePhoto) { const data = (await cache.tryGet(link, async () => { const res = await ofetch(link, { headers: getHeaders(config.xiaohongshu.cookie), @@ -154,14 +154,74 @@ async function getFullNote(link) { const script = extractInitialState($); const state = JSON.parse(script); const note = state.note.noteDetailMap[state.note.firstNoteId].note; - const images = note.imageList.map((image) => image.urlDefault); const title = note.title; let desc = note.desc; desc = desc.replaceAll(/\[.*?\]/g, ''); desc = desc.replaceAll(/#(.*?)#/g, '#$1'); desc = desc.replaceAll('\n', '<br>'); const pubDate = new Date(note.time); - const description = `${images.map((image) => `<img src="${image}">`).join('')}<br>${title}<br>${desc}`; + + let mediaContent = ''; + if (note.type === 'video') { + const originVideoKey = note.video?.consumer?.originVideoKey; + const videoUrls: string[] = []; + + if (originVideoKey) { + videoUrls.push(`http://sns-video-al.xhscdn.com/${originVideoKey}`); + } + + const streamTypes = ['av1', 'h264', 'h265', 'h266']; + for (const type of streamTypes) { + const streams = note.video?.media?.stream?.[type]; + if (streams?.length > 0) { + const stream = streams[0]; + if (stream.masterUrl) { + videoUrls.push(stream.masterUrl); + } + if (stream.backupUrls?.length) { + videoUrls.push(...stream.backupUrls); + } + } + } + + const posterUrl = note.imageList?.[0]?.urlDefault; + + if (videoUrls.length > 0) { + mediaContent = `<video controls ${posterUrl ? `poster="${posterUrl}"` : ''}> + ${videoUrls.map((url) => `<source src="${url}" type="video/mp4">`).join('\n')} + </video><br>`; + } + } else { + mediaContent = note.imageList + .map((image) => { + if (image.livePhoto && displayLivePhoto) { + const videoUrls: string[] = []; + + const streamTypes = ['av1', 'h264', 'h265', 'h266']; + for (const type of streamTypes) { + const streams = image.stream?.[type]; + if (streams?.length > 0) { + if (streams[0].masterUrl) { + videoUrls.push(streams[0].masterUrl); + } + if (streams[0].backupUrls?.length) { + videoUrls.push(...streams[0].backupUrls); + } + } + } + + if (videoUrls.length > 0) { + return `<video controls poster="${image.urlDefault}"> + ${videoUrls.map((url) => `<source src="${url}" type="video/mp4">`).join('\n')} + </video>`; + } + } + return `<img src="${image.urlDefault}">`; + }) + .join('<br>'); + } + + const description = `${mediaContent}<br>${title}<br>${desc}`; return { title, description, From 85647f688d5e1baa65e5e62f6a77b5cb4dd7adce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 08:34:18 +0000 Subject: [PATCH 654/740] chore(deps): bump mailparser from 3.7.1 to 3.7.2 (#17769) Bumps [mailparser](https://github.com/nodemailer/mailparser) from 3.7.1 to 3.7.2. - [Release notes](https://github.com/nodemailer/mailparser/releases) - [Changelog](https://github.com/nodemailer/mailparser/blob/master/CHANGELOG.md) - [Commits](https://github.com/nodemailer/mailparser/compare/v3.7.1...v3.7.2) --- updated-dependencies: - dependency-name: mailparser dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 56 ++++++++++++++++++++++++++++++-------------------- 2 files changed, 35 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 7587b194cc0c403..e69ff4c6fbd2f6d 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "jsrsasign": "10.9.0", "lru-cache": "11.0.2", "lz-string": "1.5.0", - "mailparser": "3.7.1", + "mailparser": "3.7.2", "markdown-it": "14.1.0", "module-alias": "2.2.3", "narou": "1.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6008fe98158860b..293c28d0c338834 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -160,8 +160,8 @@ importers: specifier: 1.5.0 version: 1.5.0 mailparser: - specifier: 3.7.1 - version: 3.7.1 + specifier: 3.7.2 + version: 3.7.2 markdown-it: specifier: 14.1.0 version: 14.1.0 @@ -3904,12 +3904,18 @@ packages: libmime@5.3.5: resolution: {integrity: sha512-nSlR1yRZ43L3cZCiWEw7ali3jY29Hz9CQQ96Oy+sSspYnIP5N54ucOPHqooBsXzwrX1pwn13VUE05q4WmzfaLg==} + libmime@5.3.6: + resolution: {integrity: sha512-j9mBC7eiqi6fgBPAGvKCXJKJSIASanYF4EeA4iBzSG0HxQxmXnR3KbyWqTn4CwsKSebqCv2f5XZfAO6sKzgvwA==} + libqp@2.0.1: resolution: {integrity: sha512-Ka0eC5LkF3IPNQHJmYBWljJsw0UvM6j+QdKRbWyCdTmYwvIDE6a7bCm0UkTAL/K+3KXK5qXT/ClcInU01OpdLg==} libqp@2.1.0: resolution: {integrity: sha512-O6O6/fsG5jiUVbvdgT7YX3xY3uIadR6wEZ7+vy9u7PKHAlSEB6blvC1o5pHBjgsi95Uo0aiBBdkyFecj6jtb7A==} + libqp@2.1.1: + resolution: {integrity: sha512-0Wd+GPz1O134cP62YU2GTOPNA7Qgl09XwCqM5zpBv87ERCXdfDtyKXvV7c9U22yWJh44QZqBocFnXN11K96qow==} + lie@3.1.1: resolution: {integrity: sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==} @@ -4044,12 +4050,15 @@ packages: magicast@0.3.5: resolution: {integrity: sha512-L0WhttDl+2BOsybvEOLK7fW3UA0OQ0IQ2d6Zl2x/a6vVRs3bAY0ECOSHHeL5jD+SbOpOCUEi0y1DgHEn9Qn1AQ==} - mailparser@3.7.1: - resolution: {integrity: sha512-RCnBhy5q8XtB3mXzxcAfT1huNqN93HTYYyL6XawlIKycfxM/rXPg9tXoZ7D46+SgCS1zxKzw+BayDQSvncSTTw==} + mailparser@3.7.2: + resolution: {integrity: sha512-iI0p2TCcIodR1qGiRoDBBwboSSff50vQAWytM5JRggLfABa4hHYCf3YVujtuzV454xrOP352VsAPIzviqMTo4Q==} mailsplit@5.4.0: resolution: {integrity: sha512-wnYxX5D5qymGIPYLwnp6h8n1+6P6vz/MJn5AzGjZ8pwICWssL+CCQjWBIToOVHASmATot4ktvlLo6CyLfOXWYA==} + mailsplit@5.4.2: + resolution: {integrity: sha512-4cczG/3Iu3pyl8JgQ76dKkisurZTmxMrA4dj/e8d2jKYcFTZ7MxOzg1gTioTDMPuFXwTrVuN/gxhkrO7wLg7qA==} + make-dir@3.1.0: resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} engines: {node: '>=8'} @@ -4336,10 +4345,6 @@ packages: node-releases@2.0.18: resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} - nodemailer@6.9.13: - resolution: {integrity: sha512-7o38Yogx6krdoBf3jCAqnIN4oSQFx+fMa0I7dK1D+me9kBxx12D+/33wSb+fhOCtIxvYJ+4x4IMEhmhCKfAiOA==} - engines: {node: '>=6.0.0'} - nodemailer@6.9.16: resolution: {integrity: sha512-psAuZdTIRN08HKVd/E8ObdV6NO7NTBY3KsC30F7M4H1OnmLCUNaS56FpYxyb26zWLSyYF9Ozch9KYHhHegsiOQ==} engines: {node: '>=6.0.0'} @@ -5265,10 +5270,6 @@ packages: resolution: {integrity: sha512-xRnPkJx9nvE5MF6LkB5e8QJjE2FW8269wTu/LQdf7zZqBgPly0QJPf/CWAo7srj5so4yXfoLEdCFgurlpi47zg==} hasBin: true - tlds@1.252.0: - resolution: {integrity: sha512-GA16+8HXvqtfEnw/DTcwB0UU354QE1n3+wh08oFjr6Znl7ZLAeUgYzCcK+/CCrOyE0vnHR8/pu3XXG3vDijXpQ==} - hasBin: true - tlds@1.255.0: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true @@ -9666,10 +9667,19 @@ snapshots: libbase64: 1.3.0 libqp: 2.1.0 + libmime@5.3.6: + dependencies: + encoding-japanese: 2.2.0 + iconv-lite: 0.6.3 + libbase64: 1.3.0 + libqp: 2.1.1 + libqp@2.0.1: {} libqp@2.1.0: {} + libqp@2.1.1: {} + lie@3.1.1: dependencies: immediate: 3.0.6 @@ -9806,18 +9816,18 @@ snapshots: '@babel/types': 7.26.0 source-map-js: 1.2.1 - mailparser@3.7.1: + mailparser@3.7.2: dependencies: - encoding-japanese: 2.1.0 + encoding-japanese: 2.2.0 he: 1.2.0 html-to-text: 9.0.5 iconv-lite: 0.6.3 - libmime: 5.3.5 + libmime: 5.3.6 linkify-it: 5.0.0 - mailsplit: 5.4.0 - nodemailer: 6.9.13 + mailsplit: 5.4.2 + nodemailer: 6.9.16 punycode.js: 2.3.1 - tlds: 1.252.0 + tlds: 1.255.0 mailsplit@5.4.0: dependencies: @@ -9825,6 +9835,12 @@ snapshots: libmime: 5.2.0 libqp: 2.0.1 + mailsplit@5.4.2: + dependencies: + libbase64: 1.3.0 + libmime: 5.3.6 + libqp: 2.1.1 + make-dir@3.1.0: dependencies: semver: 6.3.1 @@ -10163,8 +10179,6 @@ snapshots: node-releases@2.0.18: {} - nodemailer@6.9.13: {} - nodemailer@6.9.16: {} nopt@5.0.0: @@ -11187,8 +11201,6 @@ snapshots: chalk: 5.3.0 clipboardy: 4.0.0 - tlds@1.252.0: {} - tlds@1.255.0: {} tldts-core@6.1.64: {} From 95fb9f1100657b31aa0237df7e0ce442ee6fc771 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 08:36:21 +0000 Subject: [PATCH 655/740] chore(deps-dev): bump @vercel/nft from 0.27.6 to 0.27.7 (#17775) Bumps [@vercel/nft](https://github.com/vercel/nft) from 0.27.6 to 0.27.7. - [Release notes](https://github.com/vercel/nft/releases) - [Commits](https://github.com/vercel/nft/compare/0.27.6...0.27.7) --- updated-dependencies: - dependency-name: "@vercel/nft" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 31 ++++++++++++++++++++----------- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index e69ff4c6fbd2f6d..e21a33acbe1ded4 100644 --- a/package.json +++ b/package.json @@ -169,7 +169,7 @@ "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.16.0", "@typescript-eslint/parser": "8.16.0", - "@vercel/nft": "0.27.6", + "@vercel/nft": "0.27.7", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.110", "eslint": "9.15.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 293c28d0c338834..fe9e292dbf51cb3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -368,8 +368,8 @@ importers: specifier: 8.16.0 version: 8.16.0(eslint@9.15.0)(typescript@5.7.2) '@vercel/nft': - specifier: 0.27.6 - version: 0.27.6 + specifier: 0.27.7 + version: 0.27.7(rollup@4.24.4) '@vitest/coverage-v8': specifier: 2.0.5 version: 2.0.5(vitest@2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) @@ -1670,9 +1670,14 @@ packages: engines: {node: '>=18'} hasBin: true - '@rollup/pluginutils@4.2.1': - resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==} - engines: {node: '>= 8.0.0'} + '@rollup/pluginutils@5.1.3': + resolution: {integrity: sha512-Pnsb6f32CD2W3uCaLZIzDmeFyQ2b8UWMFI7xtwUezpcGBDVDW6y9XgAWIlARiGAo6eNF5FK5aQTr0LFyNyqq5A==} + engines: {node: '>=14.0.0'} + peerDependencies: + rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 + peerDependenciesMeta: + rollup: + optional: true '@rollup/rollup-android-arm-eabi@4.24.4': resolution: {integrity: sha512-jfUJrFct/hTA0XDM5p/htWKoNNTbDLY0KRwEt6pyOA6k2fmk0WVwl65PdUdJZgzGEHWx+49LilkcSaumQRyNQw==} @@ -2084,8 +2089,8 @@ packages: '@unhead/schema@1.11.11': resolution: {integrity: sha512-xSGsWHPBYcMV/ckQeImbrVu6ddeRnrdDCgXUKv3xIjGBY+ob/96V80lGX8FKWh8GwdFSwhblISObKlDAt5K9ZQ==} - '@vercel/nft@0.27.6': - resolution: {integrity: sha512-mwuyUxskdcV8dd7N7JnxBgvFEz1D9UOePI/WyLLzktv6HSCwgPNQGit/UJ2IykAWGlypKw4pBQjOKWvIbXITSg==} + '@vercel/nft@0.27.7': + resolution: {integrity: sha512-FG6H5YkP4bdw9Ll1qhmbxuE8KwW2E/g8fJpM183fWQLeVDGqzeywMIeJ9h2txdWZ03psgWMn6QymTxaDLmdwUg==} engines: {node: '>=16'} hasBin: true @@ -7143,10 +7148,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@rollup/pluginutils@4.2.1': + '@rollup/pluginutils@5.1.3(rollup@4.24.4)': dependencies: + '@types/estree': 1.0.6 estree-walker: 2.0.2 - picomatch: 2.3.1 + picomatch: 4.0.2 + optionalDependencies: + rollup: 4.24.4 '@rollup/rollup-android-arm-eabi@4.24.4': optional: true @@ -7571,10 +7579,10 @@ snapshots: hookable: 5.5.3 zhead: 2.2.4 - '@vercel/nft@0.27.6': + '@vercel/nft@0.27.7(rollup@4.24.4)': dependencies: '@mapbox/node-pre-gyp': 1.0.11 - '@rollup/pluginutils': 4.2.1 + '@rollup/pluginutils': 5.1.3(rollup@4.24.4) acorn: 8.14.0 acorn-import-attributes: 1.9.5(acorn@8.14.0) async-sema: 3.1.1 @@ -7587,6 +7595,7 @@ snapshots: resolve-from: 5.0.0 transitivePeerDependencies: - encoding + - rollup - supports-color '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': From 0e98940fcb8f00d84e4fc0345182ac8927bcfb9a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 04:28:55 -0800 Subject: [PATCH 656/740] chore(deps-dev): bump eslint-plugin-yml from 1.15.0 to 1.16.0 (#17768) Bumps [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) from 1.15.0 to 1.16.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.15.0...v1.16.0) --- updated-dependencies: - dependency-name: eslint-plugin-yml dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 23 +++++++++++++++++------ 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index e21a33acbe1ded4..30b5ced3d3046ea 100644 --- a/package.json +++ b/package.json @@ -178,7 +178,7 @@ "eslint-plugin-n": "17.14.0", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-unicorn": "56.0.1", - "eslint-plugin-yml": "1.15.0", + "eslint-plugin-yml": "1.16.0", "fs-extra": "11.2.0", "globals": "15.12.0", "got": "14.4.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fe9e292dbf51cb3..52e7838cc0999f0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -395,8 +395,8 @@ importers: specifier: 56.0.1 version: 56.0.1(eslint@9.15.0) eslint-plugin-yml: - specifier: 1.15.0 - version: 1.15.0(eslint@9.15.0) + specifier: 1.16.0 + version: 1.16.0(eslint@9.15.0) fs-extra: specifier: 11.2.0 version: 11.2.0 @@ -2976,6 +2976,12 @@ packages: peerDependencies: eslint: '>=6.0.0' + eslint-compat-utils@0.6.4: + resolution: {integrity: sha512-/u+GQt8NMfXO8w17QendT4gvO5acfxQsAKirAt0LVxDnr2N8YLCVbregaNc/Yhp7NM128DwCaRvr8PLDfeNkQw==} + engines: {node: '>=12'} + peerDependencies: + eslint: '>=6.0.0' + eslint-config-prettier@9.1.0: resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} hasBin: true @@ -3031,8 +3037,8 @@ packages: peerDependencies: eslint: '>=8.56.0' - eslint-plugin-yml@1.15.0: - resolution: {integrity: sha512-leC8APYVOsKyWUlvRwVhewytK5wS70BfMqIaUplFstRfzCoVp0YoEroV4cUEvQrBj93tQ3M9LcjO/ewr6D4kjA==} + eslint-plugin-yml@1.16.0: + resolution: {integrity: sha512-t4MNCetPjTn18/fUDlQ/wKkcYjnuLYKChBrZ0qUaNqRigVqChHWzTP8SrfFi5s4keX3vdlkWRSu8zHJMdKwxWQ==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' @@ -8546,6 +8552,11 @@ snapshots: eslint: 9.15.0 semver: 7.6.3 + eslint-compat-utils@0.6.4(eslint@9.15.0): + dependencies: + eslint: 9.15.0 + semver: 7.6.3 + eslint-config-prettier@9.1.0(eslint@9.15.0): dependencies: eslint: 9.15.0 @@ -8623,11 +8634,11 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-yml@1.15.0(eslint@9.15.0): + eslint-plugin-yml@1.16.0(eslint@9.15.0): dependencies: debug: 4.3.7 eslint: 9.15.0 - eslint-compat-utils: 0.5.1(eslint@9.15.0) + eslint-compat-utils: 0.6.4(eslint@9.15.0) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.3 From d3d81c889b7957577095b94cc47794c1e94f22ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 04:30:49 -0800 Subject: [PATCH 657/740] chore(deps): bump dawidd6/action-download-artifact from 6 to 7 (#17776) Bumps [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact) from 6 to 7. - [Release notes](https://github.com/dawidd6/action-download-artifact/releases) - [Commits](https://github.com/dawidd6/action-download-artifact/compare/v6...v7) --- updated-dependencies: - dependency-name: dawidd6/action-download-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/docker-test-cont.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-test-cont.yml b/.github/workflows/docker-test-cont.yml index 761706042c0d47a..be3c207be45aa41 100644 --- a/.github/workflows/docker-test-cont.yml +++ b/.github/workflows/docker-test-cont.yml @@ -51,7 +51,7 @@ jobs: - name: Fetch Docker image if: (env.TEST_CONTINUE) - uses: dawidd6/action-download-artifact@v6 + uses: dawidd6/action-download-artifact@v7 with: workflow: ${{ github.event.workflow_run.workflow_id }} run_id: ${{ github.event.workflow_run.id }} From f8af6cdaace20e42a4fdf0a08356b5b72fdbf837 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 06:04:00 -0800 Subject: [PATCH 658/740] chore(deps): bump @hono/zod-openapi from 0.18.2 to 0.18.3 (#17773) Bumps [@hono/zod-openapi](https://github.com/honojs/middleware) from 0.18.2 to 0.18.3. - [Release notes](https://github.com/honojs/middleware/releases) - [Commits](https://github.com/honojs/middleware/compare/@hono/zod-openapi@0.18.2...@hono/zod-openapi@0.18.3) --- updated-dependencies: - dependency-name: "@hono/zod-openapi" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 30b5ced3d3046ea..64a767452c8b4bd 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.13.7", - "@hono/zod-openapi": "0.18.2", + "@hono/zod-openapi": "0.18.3", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.55.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 52e7838cc0999f0..fc6cc32c048bcfb 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,8 +25,8 @@ importers: specifier: 1.13.7 version: 1.13.7(hono@4.6.12) '@hono/zod-openapi': - specifier: 0.18.2 - version: 0.18.2(hono@4.6.12)(zod@3.23.8) + specifier: 0.18.3 + version: 0.18.3(hono@4.6.12)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -1361,8 +1361,8 @@ packages: peerDependencies: hono: ^4 - '@hono/zod-openapi@0.18.2': - resolution: {integrity: sha512-CW4HkkW5Uq9YWweYWgi5UIAmlUlDQaRl642QFX7QKto9uv7ZDD15cvzOclGD55fL9yiKh5bk3dymDVSlwz8dEg==} + '@hono/zod-openapi@0.18.3': + resolution: {integrity: sha512-bNlRDODnp7P9Fs13ZPajEOt13G0XwXKfKRHMEFCphQsFiD1Y+twzHaglpNAhNcflzR1DQwHY92ZS06b4LTPbIQ==} engines: {node: '>=16.0.0'} peerDependencies: hono: '>=4.3.6' @@ -6798,7 +6798,7 @@ snapshots: dependencies: hono: 4.6.12 - '@hono/zod-openapi@0.18.2(hono@4.6.12)(zod@3.23.8)': + '@hono/zod-openapi@0.18.3(hono@4.6.12)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) '@hono/zod-validator': 0.4.1(hono@4.6.12)(zod@3.23.8) From 63d5743030cb33220931d646b3a0116feaf68d4a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 06:04:54 -0800 Subject: [PATCH 659/740] chore(deps-dev): bump globals from 15.12.0 to 15.13.0 (#17774) Bumps [globals](https://github.com/sindresorhus/globals) from 15.12.0 to 15.13.0. - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v15.12.0...v15.13.0) --- updated-dependencies: - dependency-name: globals dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 64a767452c8b4bd..e9c8488046b8e74 100644 --- a/package.json +++ b/package.json @@ -180,7 +180,7 @@ "eslint-plugin-unicorn": "56.0.1", "eslint-plugin-yml": "1.16.0", "fs-extra": "11.2.0", - "globals": "15.12.0", + "globals": "15.13.0", "got": "14.4.5", "husky": "9.1.7", "js-beautify": "1.15.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fc6cc32c048bcfb..46005b9899d195f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -401,8 +401,8 @@ importers: specifier: 11.2.0 version: 11.2.0 globals: - specifier: 15.12.0 - version: 15.12.0 + specifier: 15.13.0 + version: 15.13.0 got: specifier: 14.4.5 version: 14.4.5 @@ -3384,8 +3384,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.12.0: - resolution: {integrity: sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==} + globals@15.13.0: + resolution: {integrity: sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g==} engines: {node: '>=18'} globrex@0.1.2: @@ -8599,7 +8599,7 @@ snapshots: eslint: 9.15.0 eslint-plugin-es-x: 7.8.0(eslint@9.15.0) get-tsconfig: 4.8.1 - globals: 15.12.0 + globals: 15.13.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 @@ -8623,7 +8623,7 @@ snapshots: core-js-compat: 3.39.0 eslint: 9.15.0 esquery: 1.6.0 - globals: 15.12.0 + globals: 15.13.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 jsesc: 3.0.2 @@ -9088,7 +9088,7 @@ snapshots: globals@14.0.0: {} - globals@15.12.0: {} + globals@15.13.0: {} globrex@0.1.2: {} From 2119248d9020328c5645e5a888448aeaef28de30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:13:33 +0800 Subject: [PATCH 660/740] chore(deps): bump tldts from 6.1.64 to 6.1.65 (#17772) Bumps [tldts](https://github.com/remusao/tldts) from 6.1.64 to 6.1.65. - [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.64...v6.1.65) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 e9c8488046b8e74..35e02830f1e0653 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "telegram": "2.26.8", "tiny-async-pool": "2.1.0", "title": "4.0.1", - "tldts": "6.1.64", + "tldts": "6.1.65", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 46005b9899d195f..9d526e65d914ab0 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.64 - version: 6.1.64 + specifier: 6.1.65 + version: 6.1.65 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5285,11 +5285,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.64: - resolution: {integrity: sha512-uqnl8vGV16KsyflHOzqrYjjArjfXaU6rMPXYy2/ZWoRKCkXtghgB4VwTDXUG+t0OTGeSewNAG31/x1gCTfLt+Q==} + tldts-core@6.1.65: + resolution: {integrity: sha512-Uq5t0N0Oj4nQSbU8wFN1YYENvMthvwU13MQrMJRspYCGLSAZjAfoBOJki5IQpnBM/WFskxxC/gIOTwaedmHaSg==} - tldts@6.1.64: - resolution: {integrity: sha512-ph4AE5BXWIOsSy9stpoeo7bYe/Cy7VfpciIH4RhVZUPItCJmhqWCN0EVzxd8BOHiyNb42vuJc6NWTjJkg91Tuw==} + tldts@6.1.65: + resolution: {integrity: sha512-xU9gLTfAGsADQ2PcWee6Hg8RFAv0DnjMGVJmDnUmI8a9+nYmapMQix4afwrdaCtT+AqP4MaxEzu7cCrYmBPbzQ==} hasBin: true tmp@0.0.33: @@ -11223,11 +11223,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.64: {} + tldts-core@6.1.65: {} - tldts@6.1.64: + tldts@6.1.65: dependencies: - tldts-core: 6.1.64 + tldts-core: 6.1.65 tmp@0.0.33: dependencies: @@ -11263,7 +11263,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.64 + tldts: 6.1.65 tr46@0.0.3: {} From 7fbe0ca45f9d8eee1fd85d7949ac52c104ba1180 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:14:02 +0800 Subject: [PATCH 661/740] chore(deps-dev): bump @eslint/js from 9.15.0 to 9.16.0 (#17771) Bumps [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) from 9.15.0 to 9.16.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.16.0/packages/js) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 35e02830f1e0653..93ecf72b1004882 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.15.0", + "@eslint/js": "9.16.0", "@microsoft/eslint-formatter-sarif": "3.1.0", "@stylistic/eslint-plugin": "2.11.0", "@types/aes-js": "3.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d526e65d914ab0..a0abab62fe35645 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.15.0 - version: 9.15.0 + specifier: 9.16.0 + version: 9.16.0 '@microsoft/eslint-formatter-sarif': specifier: 3.1.0 version: 3.1.0 @@ -1347,6 +1347,10 @@ packages: resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.16.0': + resolution: {integrity: sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==} + 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} @@ -6788,6 +6792,8 @@ snapshots: '@eslint/js@9.15.0': {} + '@eslint/js@9.16.0': {} + '@eslint/object-schema@2.1.4': {} '@eslint/plugin-kit@0.2.3': From 5a188a3c5c949dc66802529fcad0291d7ef34550 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 22:45:32 +0800 Subject: [PATCH 662/740] chore(deps-dev): bump eslint from 9.15.0 to 9.16.0 (#17770) Bumps [eslint](https://github.com/eslint/eslint) from 9.15.0 to 9.16.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.15.0...v9.16.0) --- updated-dependencies: - dependency-name: eslint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 142 +++++++++++++++++++++++-------------------------- 2 files changed, 69 insertions(+), 75 deletions(-) diff --git a/package.json b/package.json index 93ecf72b1004882..710702cf143f3a4 100644 --- a/package.json +++ b/package.json @@ -172,7 +172,7 @@ "@vercel/nft": "0.27.7", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.110", - "eslint": "9.15.0", + "eslint": "9.16.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", "eslint-plugin-n": "17.14.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a0abab62fe35645..0aa8ffa35cb7a63 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -294,7 +294,7 @@ importers: version: 3.1.0 '@stylistic/eslint-plugin': specifier: 2.11.0 - version: 2.11.0(eslint@9.15.0)(typescript@5.7.2) + version: 2.11.0(eslint@9.16.0)(typescript@5.7.2) '@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.16.0 - version: 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2))(eslint@9.15.0)(typescript@5.7.2) + version: 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: 8.16.0 - version: 8.16.0(eslint@9.15.0)(typescript@5.7.2) + version: 8.16.0(eslint@9.16.0)(typescript@5.7.2) '@vercel/nft': specifier: 0.27.7 version: 0.27.7(rollup@4.24.4) @@ -377,26 +377,26 @@ importers: specifier: 0.37.110 version: 0.37.110 eslint: - specifier: 9.15.0 - version: 9.15.0 + specifier: 9.16.0 + version: 9.16.0 eslint-config-prettier: specifier: 9.1.0 - version: 9.1.0(eslint@9.15.0) + version: 9.1.0(eslint@9.16.0) eslint-nibble: specifier: 8.1.0 - version: 8.1.0(eslint@9.15.0) + version: 8.1.0(eslint@9.16.0) eslint-plugin-n: specifier: 17.14.0 - version: 17.14.0(eslint@9.15.0) + version: 17.14.0(eslint@9.16.0) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.4.1) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.16.0))(eslint@9.16.0)(prettier@3.4.1) eslint-plugin-unicorn: specifier: 56.0.1 - version: 56.0.1(eslint@9.15.0) + version: 56.0.1(eslint@9.16.0) eslint-plugin-yml: specifier: 1.16.0 - version: 1.16.0(eslint@9.15.0) + version: 1.16.0(eslint@9.16.0) fs-extra: specifier: 11.2.0 version: 11.2.0 @@ -1343,10 +1343,6 @@ packages: resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@9.15.0': - resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@eslint/js@9.16.0': resolution: {integrity: sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -3073,8 +3069,8 @@ packages: deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true - eslint@9.15.0: - resolution: {integrity: sha512-7CrWySmIibCgT1Os28lUU6upBshZ+GxybLOrmRzi08kS8MBuO8QA7pXEgYgY5W8vK3e74xv0lpjo9DbaGU9Rkw==} + eslint@9.16.0: + resolution: {integrity: sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} hasBin: true peerDependencies: @@ -6743,9 +6739,9 @@ snapshots: eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/eslint-utils@4.4.1(eslint@9.15.0)': + '@eslint-community/eslint-utils@4.4.1(eslint@9.16.0)': dependencies: - eslint: 9.15.0 + eslint: 9.16.0 eslint-visitor-keys: 3.4.3 '@eslint-community/regexpp@4.12.1': {} @@ -6790,8 +6786,6 @@ snapshots: '@eslint/js@8.57.1': {} - '@eslint/js@9.15.0': {} - '@eslint/js@9.16.0': {} '@eslint/object-schema@2.1.4': {} @@ -7292,10 +7286,10 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.11.0(eslint@9.15.0)(typescript@5.7.2)': + '@stylistic/eslint-plugin@2.11.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/utils': 8.14.0(eslint@9.15.0)(typescript@5.7.2) - eslint: 9.15.0 + '@typescript-eslint/utils': 8.14.0(eslint@9.16.0)(typescript@5.7.2) + eslint: 9.16.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 estraverse: 5.3.0 @@ -7464,15 +7458,15 @@ snapshots: '@types/node': 22.10.1 optional: true - '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2))(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.16.0(eslint@9.15.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/type-utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) + '@typescript-eslint/type-utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.16.0 - eslint: 9.15.0 + eslint: 9.16.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 @@ -7482,14 +7476,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.16.0(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@typescript-eslint/scope-manager': 8.16.0 '@typescript-eslint/types': 8.16.0 '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) '@typescript-eslint/visitor-keys': 8.16.0 debug: 4.3.7 - eslint: 9.15.0 + eslint: 9.16.0 optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -7505,12 +7499,12 @@ snapshots: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 - '@typescript-eslint/type-utils@8.16.0(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/type-utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.15.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) debug: 4.3.7 - eslint: 9.15.0 + eslint: 9.16.0 ts-api-utils: 1.4.0(typescript@5.7.2) optionalDependencies: typescript: 5.7.2 @@ -7551,24 +7545,24 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.14.0(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/utils@8.14.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) '@typescript-eslint/scope-manager': 8.14.0 '@typescript-eslint/types': 8.14.0 '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.7.2) - eslint: 9.15.0 + eslint: 9.16.0 transitivePeerDependencies: - supports-color - typescript - '@typescript-eslint/utils@8.16.0(eslint@9.15.0)(typescript@5.7.2)': + '@typescript-eslint/utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) '@typescript-eslint/scope-manager': 8.16.0 '@typescript-eslint/types': 8.16.0 '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - eslint: 9.15.0 + eslint: 9.16.0 optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: @@ -8553,23 +8547,23 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-compat-utils@0.5.1(eslint@9.15.0): + eslint-compat-utils@0.5.1(eslint@9.16.0): dependencies: - eslint: 9.15.0 + eslint: 9.16.0 semver: 7.6.3 - eslint-compat-utils@0.6.4(eslint@9.15.0): + eslint-compat-utils@0.6.4(eslint@9.16.0): dependencies: - eslint: 9.15.0 + eslint: 9.16.0 semver: 7.6.3 - eslint-config-prettier@9.1.0(eslint@9.15.0): + eslint-config-prettier@9.1.0(eslint@9.16.0): dependencies: - eslint: 9.15.0 + eslint: 9.16.0 - eslint-filtered-fix@0.3.0(eslint@9.15.0): + eslint-filtered-fix@0.3.0(eslint@9.16.0): dependencies: - eslint: 9.15.0 + eslint: 9.16.0 optionator: 0.9.4 eslint-formatter-friendly@7.0.0: @@ -8580,54 +8574,54 @@ snapshots: strip-ansi: 5.2.0 text-table: 0.2.0 - eslint-nibble@8.1.0(eslint@9.15.0): + eslint-nibble@8.1.0(eslint@9.16.0): dependencies: '@ianvs/eslint-stats': 2.0.0 chalk: 4.1.2 - eslint: 9.15.0 - eslint-filtered-fix: 0.3.0(eslint@9.15.0) + eslint: 9.16.0 + eslint-filtered-fix: 0.3.0(eslint@9.16.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.15.0): + eslint-plugin-es-x@7.8.0(eslint@9.16.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) '@eslint-community/regexpp': 4.12.1 - eslint: 9.15.0 - eslint-compat-utils: 0.5.1(eslint@9.15.0) + eslint: 9.16.0 + eslint-compat-utils: 0.5.1(eslint@9.16.0) - eslint-plugin-n@17.14.0(eslint@9.15.0): + eslint-plugin-n@17.14.0(eslint@9.16.0): dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) enhanced-resolve: 5.17.1 - eslint: 9.15.0 - eslint-plugin-es-x: 7.8.0(eslint@9.15.0) + eslint: 9.16.0 + eslint-plugin-es-x: 7.8.0(eslint@9.16.0) get-tsconfig: 4.8.1 globals: 15.13.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.15.0))(eslint@9.15.0)(prettier@3.4.1): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.16.0))(eslint@9.16.0)(prettier@3.4.1): dependencies: - eslint: 9.15.0 + eslint: 9.16.0 prettier: 3.4.1 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: '@types/eslint': 9.6.1 - eslint-config-prettier: 9.1.0(eslint@9.15.0) + eslint-config-prettier: 9.1.0(eslint@9.16.0) - eslint-plugin-unicorn@56.0.1(eslint@9.15.0): + eslint-plugin-unicorn@56.0.1(eslint@9.16.0): dependencies: '@babel/helper-validator-identifier': 7.25.9 - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) ci-info: 4.0.0 clean-regexp: 1.0.0 core-js-compat: 3.39.0 - eslint: 9.15.0 + eslint: 9.16.0 esquery: 1.6.0 globals: 15.13.0 indent-string: 4.0.0 @@ -8640,11 +8634,11 @@ snapshots: semver: 7.6.3 strip-indent: 3.0.0 - eslint-plugin-yml@1.16.0(eslint@9.15.0): + eslint-plugin-yml@1.16.0(eslint@9.16.0): dependencies: debug: 4.3.7 - eslint: 9.15.0 - eslint-compat-utils: 0.6.4(eslint@9.15.0) + eslint: 9.16.0 + eslint-compat-utils: 0.6.4(eslint@9.16.0) lodash: 4.17.21 natural-compare: 1.4.0 yaml-eslint-parser: 1.2.3 @@ -8682,7 +8676,7 @@ snapshots: '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 debug: 4.3.7 doctrine: 3.0.0 escape-string-regexp: 4.0.0 @@ -8713,14 +8707,14 @@ snapshots: transitivePeerDependencies: - supports-color - eslint@9.15.0: + eslint@9.16.0: dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.15.0) + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) '@eslint-community/regexpp': 4.12.1 '@eslint/config-array': 0.19.0 '@eslint/core': 0.9.0 '@eslint/eslintrc': 3.2.0 - '@eslint/js': 9.15.0 + '@eslint/js': 9.16.0 '@eslint/plugin-kit': 0.2.3 '@humanfs/node': 0.16.6 '@humanwhocodes/module-importer': 1.0.1 @@ -8804,7 +8798,7 @@ snapshots: execa@8.0.1: dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 get-stream: 8.0.1 human-signals: 5.0.0 is-stream: 3.0.0 @@ -8938,7 +8932,7 @@ snapshots: foreground-child@3.3.0: dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 signal-exit: 4.1.0 forever-agent@0.6.1: {} From 84a66f9806b1136b9ccd38ce625aacc7823afd9a Mon Sep 17 00:00:00 2001 From: Tsuyumi <40047364+Tsuyumi25@users.noreply.github.com> Date: Tue, 3 Dec 2024 00:17:19 +0800 Subject: [PATCH 663/740] feat(route): add taiwanmobile rate-plans (#17766) * feat(route): add taiwanmobile rate-plans * fix: remove title and date labels * fix: use .toArray() before .map() * Update lib/routes/taiwanmobile/rate-plans.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/taiwanmobile/rate-plans.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * Update lib/routes/taiwanmobile/rate-plans.ts Co-authored-by: Tony <TonyRL@users.noreply.github.com> * fix: typo --------- --- lib/routes/taiwanmobile/namespace.ts | 7 +++ lib/routes/taiwanmobile/rate-plans.ts | 63 +++++++++++++++++++++++++++ 2 files changed, 70 insertions(+) create mode 100644 lib/routes/taiwanmobile/namespace.ts create mode 100644 lib/routes/taiwanmobile/rate-plans.ts diff --git a/lib/routes/taiwanmobile/namespace.ts b/lib/routes/taiwanmobile/namespace.ts new file mode 100644 index 000000000000000..0b7182d2082af2c --- /dev/null +++ b/lib/routes/taiwanmobile/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '台灣大哥大', + url: 'www.taiwanmobile.com', + lang: 'zh-TW', +}; diff --git a/lib/routes/taiwanmobile/rate-plans.ts b/lib/routes/taiwanmobile/rate-plans.ts new file mode 100644 index 000000000000000..56795774fbd0dc1 --- /dev/null +++ b/lib/routes/taiwanmobile/rate-plans.ts @@ -0,0 +1,63 @@ +import { DataItem, Route } from '@/types'; +import { parseDate } from '@/utils/parse-date'; +import ofetch from '@/utils/ofetch'; +import { load } from 'cheerio'; +import cache from '@/utils/cache'; + +export const route: Route = { + path: '/rate-plans', + categories: ['other'], + example: '/taiwanmobile/rate-plans', + radar: [ + { + source: ['taiwanmobile.com/cs/public/servAnn/queryList.htm'], + }, + ], + name: '資費公告', + maintainers: ['Tsuyumi25'], + handler, + url: 'www.taiwanmobile.com/cs/public/servAnn/queryList.htm?type=1', +}; + +async function handler() { + const baseUrl = 'https://www.taiwanmobile.com'; + const listUrl = `${baseUrl}/cs/public/servAnn/queryList.htm?type=1`; + const response = await ofetch(listUrl); + + const $ = load(response); + + const list = $('.pagination_data') + .toArray() + .map((item) => { + const element = $(item); + const title = element.find('a').text().trim(); + const link = new URL(element.find('a').attr('href') ?? '', baseUrl).href; + const pubDate = parseDate(element.find('td').first().text(), 'YYYY/MM/DD'); + + return { + title, + link, + pubDate, + }; + }).slice(0, 20); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const detailResponse = await ofetch(item.link); + const content = load(detailResponse); + + return { + ...item, + description: content('.v2-page-change__current').find('.v2-uikit__typography-text.-h3, .v2-m-faq-card__description.gray.pad_btm1').remove().end().html() || '暫無內容', + }; + }) + ) + ); + + return { + title: '台灣大哥大 - 資費公告', + link: listUrl, + item: items as DataItem[], + }; +} From 4080d7c4529043a01c6eba07394676488b26f5ec Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:20:15 +0000 Subject: [PATCH 664/740] style: auto format --- lib/routes/taiwanmobile/rate-plans.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/routes/taiwanmobile/rate-plans.ts b/lib/routes/taiwanmobile/rate-plans.ts index 56795774fbd0dc1..2eda102ce77c2ed 100644 --- a/lib/routes/taiwanmobile/rate-plans.ts +++ b/lib/routes/taiwanmobile/rate-plans.ts @@ -39,7 +39,8 @@ async function handler() { link, pubDate, }; - }).slice(0, 20); + }) + .slice(0, 20); const items = await Promise.all( list.map((item) => From 44e0622b5bfe2c65784b9c518755f3406bdcd1cb Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Mon, 2 Dec 2024 09:15:09 -0800 Subject: [PATCH 665/740] feat(route): dingshao (#17778) --- lib/routes/dingshao/namespace.ts | 7 ++++ lib/routes/dingshao/share.ts | 53 ++++++++++++++++++++++++++ lib/routes/dingshao/types.ts | 64 ++++++++++++++++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 lib/routes/dingshao/namespace.ts create mode 100644 lib/routes/dingshao/share.ts create mode 100644 lib/routes/dingshao/types.ts diff --git a/lib/routes/dingshao/namespace.ts b/lib/routes/dingshao/namespace.ts new file mode 100644 index 000000000000000..76efa9916dfa86f --- /dev/null +++ b/lib/routes/dingshao/namespace.ts @@ -0,0 +1,7 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '盯梢', + url: 'www.dingshao.cn', + lang: 'zh-CN', +}; diff --git a/lib/routes/dingshao/share.ts b/lib/routes/dingshao/share.ts new file mode 100644 index 000000000000000..371edb20c9ad5be --- /dev/null +++ b/lib/routes/dingshao/share.ts @@ -0,0 +1,53 @@ +import { Route } from '@/types'; +import ofetch from '@/utils/ofetch'; +import { parseDate } from '@/utils/parse-date'; +import type { Context } from 'hono'; +import { Value } from './types'; + +export const route: Route = { + path: '/share/:shortId', + categories: ['other'], + example: '/dingshao/share/FzFypN', + parameters: { + shortId: '频道 ID', + }, + radar: [ + { + source: ['www.dingshao.cn/share/:shortId'], + }, + ], + name: '频道', + maintainers: ['TonyRL'], + handler, +}; + +const baseUrl = 'https://www.dingshao.cn'; + +async function handler(ctx: Context) { + const { shortId } = ctx.req.param(); + + const response = await ofetch<Value>(`${baseUrl}/api/v2/channel/get-channel-and-recent-messages-by-short-id`, { + method: 'POST', + body: { + shortId, + }, + }); + + const items = response.value.bundle.channelMessages.map((message) => ({ + title: message.excerpt.split('\n')[0], + description: message.content, + pubDate: parseDate(message.publishedAt), + category: message.tags, + link: `${baseUrl}/channel/${response.value.channel}/${message.id}`, + })); + + const channelProfile = response.value.bundle.channels.find((channel) => channel.id === response.value.channel)?.profile; + + return { + title: channelProfile?.name, + description: channelProfile?.description, + link: `${baseUrl}/share/${shortId}`, + image: channelProfile?.image, + item: items, + }; +} diff --git a/lib/routes/dingshao/types.ts b/lib/routes/dingshao/types.ts new file mode 100644 index 000000000000000..df0b92780d7f1af --- /dev/null +++ b/lib/routes/dingshao/types.ts @@ -0,0 +1,64 @@ +export interface Value { + value: { + channel: string; + recentMessages: string[]; + bundle: Bundle; + }; +} + +interface Bundle { + channels: Channel[]; + users: User[]; + channelMessages: ChannelMessage[]; + channelMessageInteractions: any[]; +} + +interface Channel { + id: string; + owner: string; + profile: Profile; + tags: string[]; + script: Script; + private: boolean; + stats: Stats; + sharable: boolean; + lastPublishedAt: string; +} + +interface Profile { + name: string; + description: string; + image: string; +} + +interface Script { + homepage: string; +} + +interface Stats { + subscribers: number; +} + +interface User { + id: string; + profile: UserProfile; +} + +interface UserProfile { + name: string; + image: string; +} + +interface ChannelMessage { + id: string; + channel: string; + author: string; + tags: string[]; + excerpt: string; + content: string; + likes: number; + private: boolean; + sharable: boolean; + script: boolean; + publishedAt: string; +} From 122cc76814aae7d6d13dfbb5fcc1c678c01fb791 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 08:44:13 +0000 Subject: [PATCH 666/740] chore(deps-dev): bump node-network-devtools from 1.0.22 to 1.0.23 (#17782) Bumps [node-network-devtools](https://github.com/GrinZero/node-network-devtools) from 1.0.22 to 1.0.23. - [Release notes](https://github.com/GrinZero/node-network-devtools/releases) - [Commits](https://github.com/GrinZero/node-network-devtools/compare/v1.0.22...v1.0.23) --- updated-dependencies: - dependency-name: node-network-devtools dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 710702cf143f3a4..17a0f202b0eaa74 100644 --- a/package.json +++ b/package.json @@ -187,7 +187,7 @@ "lint-staged": "15.2.10", "mockdate": "3.0.5", "msw": "2.4.3", - "node-network-devtools": "1.0.22", + "node-network-devtools": "1.0.23", "prettier": "3.4.1", "remark-parse": "11.0.0", "supertest": "7.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0aa8ffa35cb7a63..643d34aab545f32 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -422,8 +422,8 @@ importers: specifier: 2.4.3 version: 2.4.3(typescript@5.7.2) node-network-devtools: - specifier: 1.0.22 - version: 1.0.22(bufferutil@4.0.8)(undici@6.21.0)(utf-8-validate@5.0.10) + specifier: 1.0.23 + version: 1.0.23(bufferutil@4.0.8)(undici@6.21.0)(utf-8-validate@5.0.10) prettier: specifier: 3.4.1 version: 3.4.1 @@ -4348,8 +4348,8 @@ packages: resolution: {integrity: sha512-vv8fJuOUCCvSPjDjBLlMqYMHob4aGjkmrkaE42/mZr0VT+ZAU10jRF8oTnX9+pgU9/vYJ8P7YT3Vd6ajkmzSCw==} engines: {node: '>=0.12'} - node-network-devtools@1.0.22: - resolution: {integrity: sha512-frZ+j3UNvtxdo2YNEAZIKxAHcMuiCUkkm6rP3bYSfnBKfAybidNVOLae1dlirv2mv1THfPBKp9+sVq/5mEfOCw==} + node-network-devtools@1.0.23: + resolution: {integrity: sha512-MZEePOs0A/4qExGupv8qcv8XEsXbDWDKwujKcUs7lvAdb9BfRiR0bZgA+oS8vo6qpEtuVrHr9MtWcK3iOgoUQQ==} peerDependencies: undici: ^6 @@ -10187,7 +10187,7 @@ snapshots: dependencies: write-file-atomic: 1.3.4 - node-network-devtools@1.0.22(bufferutil@4.0.8)(undici@6.21.0)(utf-8-validate@5.0.10): + node-network-devtools@1.0.23(bufferutil@4.0.8)(undici@6.21.0)(utf-8-validate@5.0.10): dependencies: iconv-lite: 0.6.3 open: 8.4.2 From df3edf3496be8a0e91f1d99c9abf8b7ccb0ba745 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 03:05:52 -0800 Subject: [PATCH 667/740] chore(deps-dev): bump @typescript-eslint/parser from 8.16.0 to 8.17.0 (#17781) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.16.0 to 8.17.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.17.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 72 +++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 61 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 17a0f202b0eaa74..89e9722c69828e1 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.16.0", - "@typescript-eslint/parser": "8.16.0", + "@typescript-eslint/parser": "8.17.0", "@vercel/nft": "0.27.7", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.110", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 643d34aab545f32..4fb86454c7b8b3a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -363,10 +363,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.16.0 - version: 8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) + version: 8.16.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/parser': - specifier: 8.16.0 - version: 8.16.0(eslint@9.16.0)(typescript@5.7.2) + specifier: 8.17.0 + version: 8.17.0(eslint@9.16.0)(typescript@5.7.2) '@vercel/nft': specifier: 0.27.7 version: 0.27.7(rollup@4.24.4) @@ -2005,8 +2005,8 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.16.0': - resolution: {integrity: sha512-D7DbgGFtsqIPIFMPJwCad9Gfi/hC0PWErRRHFnaCWoEDYi5tQUDiJCTmGUbBiLzjqAck4KcXt9Ayj0CNlIrF+w==} + '@typescript-eslint/parser@8.17.0': + resolution: {integrity: sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2023,6 +2023,10 @@ packages: resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.17.0': + resolution: {integrity: sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.16.0': resolution: {integrity: sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2041,6 +2045,10 @@ packages: resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.17.0': + resolution: {integrity: sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.14.0': resolution: {integrity: sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2059,6 +2067,15 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.17.0': + resolution: {integrity: sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/utils@8.14.0': resolution: {integrity: sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2083,6 +2100,10 @@ packages: resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.17.0': + resolution: {integrity: sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -7458,10 +7479,10 @@ snapshots: '@types/node': 22.10.1 optional: true - '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.17.0(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.16.0 '@typescript-eslint/type-utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) @@ -7476,12 +7497,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.16.0(eslint@9.16.0)(typescript@5.7.2)': + '@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.16.0 + '@typescript-eslint/scope-manager': 8.17.0 + '@typescript-eslint/types': 8.17.0 + '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.17.0 debug: 4.3.7 eslint: 9.16.0 optionalDependencies: @@ -7499,6 +7520,11 @@ snapshots: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 + '@typescript-eslint/scope-manager@8.17.0': + dependencies: + '@typescript-eslint/types': 8.17.0 + '@typescript-eslint/visitor-keys': 8.17.0 + '@typescript-eslint/type-utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) @@ -7515,6 +7541,8 @@ snapshots: '@typescript-eslint/types@8.16.0': {} + '@typescript-eslint/types@8.17.0': {} + '@typescript-eslint/typescript-estree@8.14.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 8.14.0 @@ -7545,6 +7573,21 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.17.0(typescript@5.7.2)': + dependencies: + '@typescript-eslint/types': 8.17.0 + '@typescript-eslint/visitor-keys': 8.17.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.0(typescript@5.7.2) + optionalDependencies: + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.14.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) @@ -7578,6 +7621,11 @@ snapshots: '@typescript-eslint/types': 8.16.0 eslint-visitor-keys: 4.2.0 + '@typescript-eslint/visitor-keys@8.17.0': + dependencies: + '@typescript-eslint/types': 8.17.0 + eslint-visitor-keys: 4.2.0 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.11': From f3844a3b9922674367bbd38d74288ca8740f5009 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 03:16:44 -0800 Subject: [PATCH 668/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin (#17784) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.16.0 to 8.17.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.17.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 88 ++++++++++++-------------------------------------- 2 files changed, 21 insertions(+), 69 deletions(-) diff --git a/package.json b/package.json index 89e9722c69828e1..62bbc562d39dbf6 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.16.0", + "@typescript-eslint/eslint-plugin": "8.17.0", "@typescript-eslint/parser": "8.17.0", "@vercel/nft": "0.27.7", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4fb86454c7b8b3a..bc954947836b932 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.16.0 - version: 8.16.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) + specifier: 8.17.0 + version: 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: 8.17.0 version: 8.17.0(eslint@9.16.0)(typescript@5.7.2) @@ -1994,8 +1994,8 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.16.0': - resolution: {integrity: sha512-5YTHKV8MYlyMI6BaEG7crQ9BhSc8RxzshOReKwZwRWN0+XvvTOm+L/UYLCYxFpfwYuAAqhxiq4yae0CMFwbL7Q==} + '@typescript-eslint/eslint-plugin@8.17.0': + resolution: {integrity: sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 @@ -2019,16 +2019,12 @@ packages: resolution: {integrity: sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.16.0': - resolution: {integrity: sha512-mwsZWubQvBki2t5565uxF0EYvG+FwdFb8bMtDuGQLdCCnGPrDEDvm1gtfynuKlnpzeBRqdFCkMf9jg1fnAK8sg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.17.0': resolution: {integrity: sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.16.0': - resolution: {integrity: sha512-IqZHGG+g1XCWX9NyqnI/0CX5LL8/18awQqmkZSl2ynn8F76j579dByc0jhfVSnSnhf7zv76mKBQv9HQFKvDCgg==} + '@typescript-eslint/type-utils@8.17.0': + resolution: {integrity: sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2041,10 +2037,6 @@ packages: resolution: {integrity: sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.16.0': - resolution: {integrity: sha512-NzrHj6thBAOSE4d9bsuRNMvk+BvaQvmY4dDglgkgGC0EW/tB3Kelnp3tAKH87GEwzoxgeQn9fNGRyFJM/xd+GQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.17.0': resolution: {integrity: sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2058,15 +2050,6 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.16.0': - resolution: {integrity: sha512-E2+9IzzXMc1iaBy9zmo+UYvluE3TW7bCGWSF41hVWUE01o8nzr1rvOQYSxelxr6StUvRcTMe633eY8mXASMaNw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.17.0': resolution: {integrity: sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2082,8 +2065,8 @@ packages: peerDependencies: eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.16.0': - resolution: {integrity: sha512-C1zRy/mOL8Pj157GiX4kaw7iyRLKfJXBR3L82hk5kS/GyHcOFmy4YUq/zfZti72I9wnuQtA/+xzft4wCC8PJdA==} + '@typescript-eslint/utils@8.17.0': + resolution: {integrity: sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -2096,10 +2079,6 @@ packages: resolution: {integrity: sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.16.0': - resolution: {integrity: sha512-pq19gbaMOmFE3CbL0ZB8J8BFCo2ckfHBfaIsaOZgBIF4EoISJIdLX5xRhd0FGB0LlHReNRuzoJoMGpTjq8F2CQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.17.0': resolution: {integrity: sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7479,14 +7458,14 @@ snapshots: '@types/node': 22.10.1 optional: true - '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.17.0(eslint@9.16.0)(typescript@5.7.2) - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/type-utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.16.0 + '@typescript-eslint/scope-manager': 8.17.0 + '@typescript-eslint/type-utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.17.0 eslint: 9.16.0 graphemer: 1.4.0 ignore: 5.3.2 @@ -7515,20 +7494,15 @@ snapshots: '@typescript-eslint/types': 8.14.0 '@typescript-eslint/visitor-keys': 8.14.0 - '@typescript-eslint/scope-manager@8.16.0': - dependencies: - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/visitor-keys': 8.16.0 - '@typescript-eslint/scope-manager@8.17.0': dependencies: '@typescript-eslint/types': 8.17.0 '@typescript-eslint/visitor-keys': 8.17.0 - '@typescript-eslint/type-utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)': + '@typescript-eslint/type-utils@8.17.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) - '@typescript-eslint/utils': 8.16.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2) debug: 4.3.7 eslint: 9.16.0 ts-api-utils: 1.4.0(typescript@5.7.2) @@ -7539,8 +7513,6 @@ snapshots: '@typescript-eslint/types@8.14.0': {} - '@typescript-eslint/types@8.16.0': {} - '@typescript-eslint/types@8.17.0': {} '@typescript-eslint/typescript-estree@8.14.0(typescript@5.7.2)': @@ -7558,21 +7530,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.16.0(typescript@5.7.2)': - dependencies: - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/visitor-keys': 8.16.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.7.2) - optionalDependencies: - typescript: 5.7.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.17.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 8.17.0 @@ -7599,12 +7556,12 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.16.0(eslint@9.16.0)(typescript@5.7.2)': + '@typescript-eslint/utils@8.17.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.2) + '@typescript-eslint/scope-manager': 8.17.0 + '@typescript-eslint/types': 8.17.0 + '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2) eslint: 9.16.0 optionalDependencies: typescript: 5.7.2 @@ -7616,11 +7573,6 @@ snapshots: '@typescript-eslint/types': 8.14.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.16.0': - dependencies: - '@typescript-eslint/types': 8.16.0 - eslint-visitor-keys: 4.2.0 - '@typescript-eslint/visitor-keys@8.17.0': dependencies: '@typescript-eslint/types': 8.17.0 From 3e87b79bae12e74a00a6a736fdf12b8937a29c1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 21:16:43 +0800 Subject: [PATCH 669/740] chore(deps): bump dotenv from 16.4.5 to 16.4.6 (#17780) * chore(deps): bump dotenv from 16.4.5 to 16.4.6 Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.4.5 to 16.4.6. - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v16.4.5...v16.4.6) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * chore(deps): update packageManager to pnpm@9.14.4 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 4 ++-- pnpm-lock.yaml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 62bbc562d39dbf6..f486d5dd367d880 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "dayjs": "1.11.8", "destr": "2.0.3", "directory-import": "3.3.1", - "dotenv": "16.4.5", + "dotenv": "16.4.6", "entities": "5.0.0", "etag": "1.8.1", "fanfou-sdk": "5.0.0", @@ -197,7 +197,7 @@ "vitest": "2.0.5", "yaml-eslint-parser": "1.2.3" }, - "packageManager": "pnpm@9.12.3", + "packageManager": "pnpm@9.14.4", "engines": { "node": ">=22" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bc954947836b932..dddaf3ac3550a47 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -100,8 +100,8 @@ importers: specifier: 3.3.1 version: 3.3.1 dotenv: - specifier: 16.4.5 - version: 16.4.5 + specifier: 16.4.6 + version: 16.4.6 entities: specifier: 5.0.0 version: 5.0.0 @@ -2840,8 +2840,8 @@ packages: domutils@3.1.0: resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} - dotenv@16.4.5: - resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + dotenv@16.4.6: + resolution: {integrity: sha512-JhcR/+KIjkkjiU8yEpaB/USlzVi3i5whwOjpIRNGi9svKEXZSe+Qp6IWAjFjv+2GViAoDRCUv/QLNziQxsLqDg==} engines: {node: '>=12'} dotenv@6.2.0: @@ -8383,7 +8383,7 @@ snapshots: domelementtype: 2.3.0 domhandler: 5.0.3 - dotenv@16.4.5: {} + dotenv@16.4.6: {} dotenv@6.2.0: {} From 2ee154c2d8c7b431834873db0e768b1091cff70c Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Tue, 3 Dec 2024 22:11:15 +0800 Subject: [PATCH 670/740] =?UTF-8?q?feat(hellogithub):=20hellogithub=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=87=E7=AB=A0=E8=B7=AF=E7=94=B1=20(#1777?= =?UTF-8?q?9)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(hellogithub): hellogithub 添加文章路由 * fix(hellogithub): 修复文章排序链接错误 - 修正文章排序链接中的路径错误,从根路径改为文章路径 * refactor(hellogithub): simplify route path definitions --------- --- lib/routes/hellogithub/article.ts | 62 +++++++++++++++++++++++++++++++ lib/routes/hellogithub/index.ts | 4 +- lib/routes/hellogithub/report.ts | 2 +- lib/routes/hellogithub/volume.ts | 2 +- 4 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 lib/routes/hellogithub/article.ts diff --git a/lib/routes/hellogithub/article.ts b/lib/routes/hellogithub/article.ts new file mode 100644 index 000000000000000..7d2f09ec6efb744 --- /dev/null +++ b/lib/routes/hellogithub/article.ts @@ -0,0 +1,62 @@ +import { Route } from '@/types'; + +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; + +const sorts = { + hot: '热门', + last: '最近', +}; + +export const route: Route = { + path: '/article/:sort?', + categories: ['programming'], + example: '/hellogithub/article', + parameters: { sort: '排序方式,见下表,默认为 `last`,即最近' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + name: '文章', + maintainers: ['moke8', 'nczitzk', 'CaoMeiYouRen'], + handler, + description: `| 热门 | 最近 | + | ---- | ---- | + | hot | last |`, +}; + +async function handler(ctx) { + const sort = ctx.req.param('sort') ?? 'last'; + const limit = ctx.req.query('limit') ? Number.parseInt(ctx.req.query('limit')) : 20; + + const rootUrl = 'https://hellogithub.com'; + const apiRootUrl = 'https://api.hellogithub.com/v1/article/'; + const currentUrl = `${rootUrl}/article/?sort_by=${sort}`; + const apiUrl = `${apiRootUrl}?sort_by=${sort}&page=1`; + + const response = await got({ + method: 'get', + url: apiUrl, + }); + + const items = response.data.data.slice(0, limit).map((item) => ({ + title: item.title, + description: `<figure> + <img src="${item.head_image}"> +</figure><br>${item.desc}`, + link: `${rootUrl}/article/${item.aid}`, + author: item.author, + guid: item.aid, + pubDate: parseDate(item.publish_at), + })); + + return { + title: `HelloGithub - ${sorts[sort]}文章`, + link: currentUrl, + item: items, + }; +} diff --git a/lib/routes/hellogithub/index.ts b/lib/routes/hellogithub/index.ts index 877a9e37c402713..0e4790760ebc76c 100644 --- a/lib/routes/hellogithub/index.ts +++ b/lib/routes/hellogithub/index.ts @@ -10,7 +10,7 @@ const sorts = { }; export const route: Route = { - path: ['/home/:sort?/:id?'], + path: '/home/:sort?/:id?', categories: ['programming'], example: '/hellogithub/home', parameters: { sort: '排序方式,见下表,默认为 `featured`,即精选', id: '标签 id,可在对应标签页 URL 中找到,默认为全部标签' }, @@ -23,7 +23,7 @@ export const route: Route = { supportScihub: false, }, name: '开源项目', - maintainers: ['moke8', 'nczitzk'], + maintainers: ['moke8', 'nczitzk', 'CaoMeiYouRen'], handler, description: `| 精选 | 全部 | | ---- | ---- | diff --git a/lib/routes/hellogithub/report.ts b/lib/routes/hellogithub/report.ts index 96a5f4ac9181193..dcf3f97eb05f938 100644 --- a/lib/routes/hellogithub/report.ts +++ b/lib/routes/hellogithub/report.ts @@ -14,7 +14,7 @@ const types = { }; export const route: Route = { - path: ['/ranking/:type?', '/report/:type?'], + path: '/ranking/:type?', example: '/hellogithub/ranking', name: '榜单报告', maintainers: ['moke8', 'nczitzk'], diff --git a/lib/routes/hellogithub/volume.ts b/lib/routes/hellogithub/volume.ts index 1282068fba2676e..5e1f41b9b174cb4 100644 --- a/lib/routes/hellogithub/volume.ts +++ b/lib/routes/hellogithub/volume.ts @@ -19,7 +19,7 @@ art.defaults.imports.render = function (string) { }; export const route: Route = { - path: ['/month', '/volume'], + path: '/volume', example: '/hellogithub/volume', name: '月刊', maintainers: ['moke8', 'nczitzk', 'CaoMeiYouRen'], From 32e2fea89aaafc0eaeead93f254e617809e8672d Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 4 Dec 2024 04:44:36 +0800 Subject: [PATCH 671/740] feat(route): add Jones Lang LaSalle Trends & Insights (#17788) --- lib/routes/joneslanglasalle/index.ts | 310 ++++++++++++++++++ lib/routes/joneslanglasalle/namespace.ts | 13 + .../templates/description.art | 21 ++ 3 files changed, 344 insertions(+) create mode 100644 lib/routes/joneslanglasalle/index.ts create mode 100644 lib/routes/joneslanglasalle/namespace.ts create mode 100644 lib/routes/joneslanglasalle/templates/description.art diff --git a/lib/routes/joneslanglasalle/index.ts b/lib/routes/joneslanglasalle/index.ts new file mode 100644 index 000000000000000..d58af1c910e62fd --- /dev/null +++ b/lib/routes/joneslanglasalle/index.ts @@ -0,0 +1,310 @@ +import path from 'node:path'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; + +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); + + $('div.informationbox').remove(); + $('div.contributors').remove(); + + $('*') + .not(preservedTags.join(', ')) + .contents() + .filter((_, el) => el.type === 'text') + .remove(); + + $('*') + .not(preservedTags.join(', ')) + .filter((_, el) => $(el).children().length === 0) + .remove(); + + return $.html() || ''; +}; + +export const handler = async (ctx: Context): Promise<Data> => { + const { language: lang = 'zh', category = 'trends-and-insights' } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '3', 10); + + const rootUrl: string = 'https://www.joneslanglasalle.com.cn'; + const targetUrl: string = new URL(`${lang}/${category}`, rootUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language: string = $('html').prop('lang') ?? 'en'; + + let items: DataItem[] = $('div.ti-title') + .slice(0, limit) + .toArray() + .map((item): DataItem => { + const $item: Cheerio<Element> = $(item); + const aEl = $item.closest('a'); + + const title: string = $item.text(); + const link: string | undefined = aEl.prop('href'); + + const description: string = art(path.join(__dirname, 'templates/description.art'), { + intro: aEl.find('p.ti-teaser').text(), + }); + + const image: string | undefined = aEl.find('div.ti-image-container img').prop('src') ? new URL(aEl.find('div.ti-image-container img').prop('src') as string, rootUrl).href : undefined; + + return { + title, + description, + pubDate: parseDate(aEl.find('span.ti-date').text(), ['MM月DD日', 'MMMM DD']), + link: link ? new URL(link, rootUrl).href : undefined, + category: [aEl.find('span.ti-type').text()].filter(Boolean), + content: { + html: description, + text: aEl.find('p.ti-teaser').text(), + }, + image, + banner: image, + language, + }; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link && typeof item.link !== 'string') { + return item; + } + + return cache.tryGet(item.link, async (): Promise<DataItem> => { + try { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + const title: string = $$('meta[property="og:title"]').prop('content'); + const guid: string = $$('meta[property="og:url"]').prop('content'); + const image: string | undefined = $$('meta[property="og:image"]').prop('content'); + + const pubDate: Date = parseDate($$('div.publicationdate').text().trim(), ['YYYY 年MM 月DD 日', 'MMMMDD,YYYY']); + + const author: DataItem['author'] = $$('div.contributors ul li') + .toArray() + .map((el) => ({ + name: $$(el).text(), + })); + + const media: Record<string, Record<string, string>> = {}; + + $$('picture').each((_, el) => { + const $$el = $$(el); + + const src = $$el.find('source').last().prop('srcset') ? new URL($$el.find('source').last().prop('srcset') as string, rootUrl).href : undefined; + + if (src) { + $$el.replaceWith( + art(path.join(__dirname, 'templates/description.art'), { + images: [ + { + src, + }, + ], + }) + ); + + const mediaType: string | undefined = src.split(/\./).pop(); + + if (mediaType) { + media[mediaType] = { url: src }; + } + } + }); + + const extraLinks = $$('div.related-content a.content-card') + .toArray() + .map((el) => { + const $$el: Cheerio<Element> = $$(el); + + return { + url: new URL($$el.prop('href') as string, rootUrl).href, + type: 'related', + content_html: $$el.find('div.content-card__body').html(), + }; + }) + .filter((link): link is { url: string; type: string; content_html: string } => true); + + const description: string = art(path.join(__dirname, 'templates/description.art'), { + 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']), + }); + + return { + title, + description, + pubDate, + category: $$('meta[property="article:tag"]').prop('content').split(/,\s/), + author, + guid, + id: guid, + content: { + html: description, + text: description, + }, + image, + banner: image, + language, + media: Object.keys(media).length > 0 ? media : undefined, + _extra: { + links: extraLinks.length > 0 ? extraLinks : undefined, + }, + }; + } catch { + return item; + } + }); + }) + ) + ).filter((_): _ is DataItem => true); + + const title = $('title').text(); + const feedImage = $('img.logo').prop('src') ? new URL($('img.logo').prop('src') as string, rootUrl).href : undefined; + + return { + title, + description: $('meta[property="og:description"]').prop('content'), + link: targetUrl, + item: items, + allowEmpty: true, + image: feedImage, + author: title.split(/\|/).pop(), + language, + id: $('meta[property="og:url"]').prop('content'), + }; +}; + +export const route: Route = { + path: '/:language?/:category{.+}?', + name: 'Trends & Insights', + url: 'joneslanglasalle.com.cn', + maintainers: ['nczitzk'], + handler, + example: '/joneslanglasalle/en/trends-and-insights', + parameters: { + language: 'Language, `zh` by default', + category: 'Category, `trends-and-insights` by default', + }, + description: `:::tip +If you subscribe to [Trends & Insights](https://www.joneslanglasalle.com.cn/en/trends-and-insights),where the URL is \`https://www.joneslanglasalle.com.cn/en/trends-and-insights\`, extract the part \`https://joneslanglasalle.com.cn/\` to the end. Use \`zh\` and \`trends-and-insights\` as the parameters to fill in. Therefore, the route will be [\`/joneslanglasalle/trends-and-insights/en/trends-and-insights\`](https://rsshub.app/joneslanglasalle/trends-and-insights/en/trends-and-insights). +::: + +| Category | ID | +| --------- | ----------------------------- | +| Latest | trends-and-insights | +| Workplace | trends-and-insights/workplace | +| Investor | trends-and-insights/investor | +| Cities | trends-and-insights/cities | +| Research | trends-and-insights/research | +`, + categories: ['new-media'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['joneslanglasalle.com.cn/:language/:category'], + target: (params) => { + const language = params.language; + const category = params.category; + + return language ? `/${language}${category ? `/${category}` : ''}` : ''; + }, + }, + { + title: 'Latest', + source: ['joneslanglasalle.com.cn/en/trends-and-insights'], + target: '/en/trends-and-insights', + }, + { + title: 'Workplace', + source: ['joneslanglasalle.com.cn/en/trends-and-insights/workplace'], + target: '/en/trends-and-insights/workplace', + }, + { + title: 'Investor', + source: ['joneslanglasalle.com.cn/en/trends-and-insights/investor'], + target: '/en/trends-and-insights/investor', + }, + { + title: 'Cities', + source: ['joneslanglasalle.com.cn/en/trends-and-insights/cities'], + target: '/en/trends-and-insights/cities', + }, + { + title: 'Research', + source: ['joneslanglasalle.com.cn/en/trends-and-insights/research'], + target: '/en/trends-and-insights/research', + }, + { + title: '房地产趋势与洞察', + source: ['joneslanglasalle.com.cn/zh/trends-and-insights'], + target: '/zh/trends-and-insights', + }, + { + title: '办公空间', + source: ['joneslanglasalle.com.cn/zh/trends-and-insights/workplace'], + target: '/zh/trends-and-insights/workplace', + }, + { + title: '投资者', + source: ['joneslanglasalle.com.cn/zh/trends-and-insights/investor'], + target: '/zh/trends-and-insights/investor', + }, + { + title: '城市', + source: ['joneslanglasalle.com.cn/zh/trends-and-insights/cities'], + target: '/zh/trends-and-insights/cities', + }, + { + title: '研究报告', + source: ['joneslanglasalle.com.cn/zh/trends-and-insights/research'], + target: '/zh/trends-and-insights/research', + }, + ], + view: ViewType.Articles, + + zh: { + path: '/:language?/:category{.+}?', + name: '房地产趋势与洞察', + url: 'joneslanglasalle.com.cn', + maintainers: ['nczitzk'], + handler, + example: '/joneslanglasalle/zh/trends-and-insights', + parameters: { + language: '语言,默认为 `zh`,可在对应分类页 URL 中找到', + category: '分类,默认为 `trends-and-insights`,可在对应分类页 URL 中找到', + }, + description: `:::tip +若订阅 [房地产趋势与洞察](https://www.joneslanglasalle.com.cn/zh/trends-and-insights),网址为 \`https://www.joneslanglasalle.com.cn/zh/trends-and-insights\`,请截取 \`https://joneslanglasalle.com.cn/\` 到末尾的部分 \`zh\` 和 \`trends-and-insights\` 作为 \`language\` 和 \`category\` 参数填入,此时目标路由为 [\`/joneslanglasalle/zh/trends-and-insights\`](https://rsshub.app/joneslanglasalle/zh/trends-and-insights)。 +::: + +| 分类名称 | 分类 ID | +| ---------- | ----------------------------- | +| 趋势及洞察 | trends-and-insights | +| 办公空间 | trends-and-insights/workplace | +| 投资者 | trends-and-insights/investor | +| 城市 | trends-and-insights/cities | +| 研究报告 | trends-and-insights/research | +`, + }, +}; diff --git a/lib/routes/joneslanglasalle/namespace.ts b/lib/routes/joneslanglasalle/namespace.ts new file mode 100644 index 000000000000000..2167344f3b2f3a6 --- /dev/null +++ b/lib/routes/joneslanglasalle/namespace.ts @@ -0,0 +1,13 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Jones Lang LaSalle', + url: 'joneslanglasalle.com.cn', + categories: ['new-media'], + description: 'JLL is a global real estate services firm in commercial property and investment management, providing services for real estate owners, occupiers and investors.', + lang: 'zh-CN', + zh: { + name: '仲量联行JLL', + description: '仲量联行JLL是全球领先的房地产专业服务和投资管理公司,为企业、房地产业主、投资者及政府提供各类资产的施工、租赁、管理、投资咨询服务。仲量联行也致力于高质量城市发展、打造理想空间、提供可持续的房地产解决方案。', + }, +}; diff --git a/lib/routes/joneslanglasalle/templates/description.art b/lib/routes/joneslanglasalle/templates/description.art new file mode 100644 index 000000000000000..aced21ab986b46b --- /dev/null +++ b/lib/routes/joneslanglasalle/templates/description.art @@ -0,0 +1,21 @@ +{{ if images }} + {{ each images image }} + {{ if !videos?.[0]?.src && image?.src }} + <figure> + <img + {{ if image.alt }} + alt="{{ image.alt }}" + {{ /if }} + src="{{ image.src }}"> + </figure> + {{ /if }} + {{ /each }} +{{ /if }} + +{{ if intro }} + <blockquote>{{ intro }}</blockquote> +{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file From 70b5cb4bbb6783e749e91d73a8bc9b9697e7e429 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Wed, 4 Dec 2024 14:49:20 +0800 Subject: [PATCH 672/740] chore(route/bilibili): add m.bilibili domain --- lib/routes/bilibili/hot-search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/bilibili/hot-search.ts b/lib/routes/bilibili/hot-search.ts index 305ecd254ce0b13..647159f696e8070 100644 --- a/lib/routes/bilibili/hot-search.ts +++ b/lib/routes/bilibili/hot-search.ts @@ -18,7 +18,7 @@ export const route: Route = { }, radar: [ { - source: ['www.bilibili.com/'], + source: ['www.bilibili.com/', 'm.bilibili.com/'], }, ], name: '热搜', From f4d5a324fccf117c9b13fe9d69bb9154232bbfa8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 08:41:43 +0000 Subject: [PATCH 673/740] chore(deps): bump dotenv from 16.4.6 to 16.4.7 (#17793) Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.4.6 to 16.4.7. - [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md) - [Commits](https://github.com/motdotla/dotenv/compare/v16.4.6...v16.4.7) --- updated-dependencies: - dependency-name: dotenv dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 f486d5dd367d880..126e004061b742f 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "dayjs": "1.11.8", "destr": "2.0.3", "directory-import": "3.3.1", - "dotenv": "16.4.6", + "dotenv": "16.4.7", "entities": "5.0.0", "etag": "1.8.1", "fanfou-sdk": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dddaf3ac3550a47..8fbecf9f487bb05 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -100,8 +100,8 @@ importers: specifier: 3.3.1 version: 3.3.1 dotenv: - specifier: 16.4.6 - version: 16.4.6 + specifier: 16.4.7 + version: 16.4.7 entities: specifier: 5.0.0 version: 5.0.0 @@ -2840,8 +2840,8 @@ packages: domutils@3.1.0: resolution: {integrity: sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==} - dotenv@16.4.6: - resolution: {integrity: sha512-JhcR/+KIjkkjiU8yEpaB/USlzVi3i5whwOjpIRNGi9svKEXZSe+Qp6IWAjFjv+2GViAoDRCUv/QLNziQxsLqDg==} + dotenv@16.4.7: + resolution: {integrity: sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==} engines: {node: '>=12'} dotenv@6.2.0: @@ -8383,7 +8383,7 @@ snapshots: domelementtype: 2.3.0 domhandler: 5.0.3 - dotenv@16.4.6: {} + dotenv@16.4.7: {} dotenv@6.2.0: {} From 5baa8470892b1d4ea34adf2778e8017ab3bcbb26 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 08:42:44 +0000 Subject: [PATCH 674/740] chore(deps): bump proxy-chain from 2.5.5 to 2.5.6 (#17795) Bumps [proxy-chain](https://github.com/apify/proxy-chain) from 2.5.5 to 2.5.6. - [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.5...v2.5.6) --- updated-dependencies: - dependency-name: proxy-chain dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 126e004061b742f..709ea156f1344bd 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "ofetch": "1.4.1", "otplib": "12.0.1", "pac-proxy-agent": "7.0.2", - "proxy-chain": "2.5.5", + "proxy-chain": "2.5.6", "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 8fbecf9f487bb05..d503afc8adde591 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -187,8 +187,8 @@ importers: specifier: 7.0.2 version: 7.0.2 proxy-chain: - specifier: 2.5.5 - version: 2.5.5 + specifier: 2.5.6 + version: 2.5.6 puppeteer: specifier: 22.6.2 version: 22.6.2(bufferutil@4.0.8)(typescript@5.7.2)(utf-8-validate@5.0.10) @@ -4654,8 +4654,8 @@ packages: resolution: {integrity: sha512-u0piLU+nCOHMgGjRbimiXmA9kM/L9EHh3zL81xCdp7m+Y2pHIsnmbdDoEDoAz5geaonNR6q6+yOPQs6n4T6sBQ==} engines: {node: '>= 14'} - proxy-chain@2.5.5: - resolution: {integrity: sha512-CPZEmY9FKU3veQQbsrimaXUu5d/FXLfkQj0tCJ8DSJpzQYeDlISbTaf70bjcBQWlXR1FDBOtpFOuB66js+Ik7g==} + proxy-chain@2.5.6: + resolution: {integrity: sha512-vC57FECgv2WKCVoaRrztJ86NBER7ZJCjSGvOnpMlgfi9vroMCoCwexQ+69He4YWUPE88D5jZizytiLbPjLv6/A==} engines: {node: '>=14'} proxy-from-env@1.1.0: @@ -10549,7 +10549,7 @@ snapshots: transitivePeerDependencies: - supports-color - proxy-chain@2.5.5: + proxy-chain@2.5.6: dependencies: socks: 2.8.3 socks-proxy-agent: 8.0.4 From 39b5eace6070e0aca5b9edb118e06b07f800ada1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 08:43:59 +0000 Subject: [PATCH 675/740] chore(deps-dev): bump prettier from 3.4.1 to 3.4.2 (#17796) Bumps [prettier](https://github.com/prettier/prettier) from 3.4.1 to 3.4.2. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.4.1...3.4.2) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 709ea156f1344bd..2bd46e1e5d28c41 100644 --- a/package.json +++ b/package.json @@ -188,7 +188,7 @@ "mockdate": "3.0.5", "msw": "2.4.3", "node-network-devtools": "1.0.23", - "prettier": "3.4.1", + "prettier": "3.4.2", "remark-parse": "11.0.0", "supertest": "7.0.0", "typescript": "5.7.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d503afc8adde591..37bb1b365183f0a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -390,7 +390,7 @@ importers: version: 17.14.0(eslint@9.16.0) eslint-plugin-prettier: specifier: 5.2.1 - version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.16.0))(eslint@9.16.0)(prettier@3.4.1) + version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.16.0))(eslint@9.16.0)(prettier@3.4.2) eslint-plugin-unicorn: specifier: 56.0.1 version: 56.0.1(eslint@9.16.0) @@ -425,8 +425,8 @@ importers: specifier: 1.0.23 version: 1.0.23(bufferutil@4.0.8)(undici@6.21.0)(utf-8-validate@5.0.10) prettier: - specifier: 3.4.1 - version: 3.4.1 + specifier: 3.4.2 + version: 3.4.2 remark-parse: specifier: 11.0.0 version: 11.0.0 @@ -4631,8 +4631,8 @@ packages: resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} engines: {node: '>=6.0.0'} - prettier@3.4.1: - resolution: {integrity: sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==} + prettier@3.4.2: + resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} engines: {node: '>=14'} hasBin: true @@ -8604,10 +8604,10 @@ snapshots: minimatch: 9.0.5 semver: 7.6.3 - eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.16.0))(eslint@9.16.0)(prettier@3.4.1): + eslint-plugin-prettier@5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.16.0))(eslint@9.16.0)(prettier@3.4.2): dependencies: eslint: 9.16.0 - prettier: 3.4.1 + prettier: 3.4.2 prettier-linter-helpers: 1.0.0 synckit: 0.9.2 optionalDependencies: @@ -10513,7 +10513,7 @@ snapshots: dependencies: fast-diff: 1.3.0 - prettier@3.4.1: {} + prettier@3.4.2: {} process-warning@4.0.0: {} From 147964c20df6d8e6f9b1248eb9ea3f0bd5e50491 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Wed, 4 Dec 2024 18:34:53 +0800 Subject: [PATCH 676/740] fix(route): Jones Lang LaSalle (#17797) --- lib/routes/joneslanglasalle/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/routes/joneslanglasalle/index.ts b/lib/routes/joneslanglasalle/index.ts index d58af1c910e62fd..7eaba49260d1de0 100644 --- a/lib/routes/joneslanglasalle/index.ts +++ b/lib/routes/joneslanglasalle/index.ts @@ -35,7 +35,7 @@ const cleanHtml = (html: string, preservedTags: string[]): string => { export const handler = async (ctx: Context): Promise<Data> => { const { language: lang = 'zh', category = 'trends-and-insights' } = ctx.req.param(); - const limit: number = Number.parseInt(ctx.req.query('limit') ?? '3', 10); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '10', 10); const rootUrl: string = 'https://www.joneslanglasalle.com.cn'; const targetUrl: string = new URL(`${lang}/${category}`, rootUrl).href; @@ -92,7 +92,7 @@ export const handler = async (ctx: Context): Promise<Data> => { const guid: string = $$('meta[property="og:url"]').prop('content'); const image: string | undefined = $$('meta[property="og:image"]').prop('content'); - const pubDate: Date = parseDate($$('div.publicationdate').text().trim(), ['YYYY 年MM 月DD 日', 'MMMMDD,YYYY']); + const pubDate: Date = parseDate($$('div.publicationdate').text().trim(), ['YYYY 年MM 月DD 日', 'MMMM DD, YYYY']); const author: DataItem['author'] = $$('div.contributors ul li') .toArray() @@ -199,7 +199,7 @@ export const route: Route = { category: 'Category, `trends-and-insights` by default', }, description: `:::tip -If you subscribe to [Trends & Insights](https://www.joneslanglasalle.com.cn/en/trends-and-insights),where the URL is \`https://www.joneslanglasalle.com.cn/en/trends-and-insights\`, extract the part \`https://joneslanglasalle.com.cn/\` to the end. Use \`zh\` and \`trends-and-insights\` as the parameters to fill in. Therefore, the route will be [\`/joneslanglasalle/trends-and-insights/en/trends-and-insights\`](https://rsshub.app/joneslanglasalle/trends-and-insights/en/trends-and-insights). +If you subscribe to [Trends & Insights](https://www.joneslanglasalle.com.cn/en/trends-and-insights),where the URL is \`https://www.joneslanglasalle.com.cn/en/trends-and-insights\`, extract the part \`https://joneslanglasalle.com.cn/\` to the end. Use \`zh\` and \`trends-and-insights\` as the parameters to fill in. Therefore, the route will be [\`/joneslanglasalle/en/trends-and-insights\`](https://rsshub.app/joneslanglasalle/en/trends-and-insights). ::: | Category | ID | From 4f0a740d02b060448a30177400a72a14cc64846c Mon Sep 17 00:00:00 2001 From: lidashuang <li.dashuang@icloud.com> Date: Wed, 4 Dec 2024 20:04:23 +0800 Subject: [PATCH 677/740] feat(route): add amz123.com (#17799) --- lib/routes/amz123/kx.ts | 65 ++++++++++++++++++++++++++++++++++ lib/routes/amz123/namespace.ts | 9 +++++ 2 files changed, 74 insertions(+) create mode 100644 lib/routes/amz123/kx.ts create mode 100644 lib/routes/amz123/namespace.ts diff --git a/lib/routes/amz123/kx.ts b/lib/routes/amz123/kx.ts new file mode 100644 index 000000000000000..329b764b3fd7ed8 --- /dev/null +++ b/lib/routes/amz123/kx.ts @@ -0,0 +1,65 @@ +import { Route, ViewType } from '@/types'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/kx', + categories: ['new-media'], + example: '/amz123/kx', + parameters: {}, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['amz123.com/kx'], + target: '/kx', + }, + ], + name: 'AMZ123 快讯', + maintainers: ['defp'], + handler, + url: 'amz123.com/kx', + view: ViewType.Articles, +}; + +async function handler() { + const limit = 12; + const apiRootUrl = 'https://api.amz123.com'; + const rootUrl = 'https://www.amz123.com'; + + const { data: response } = await got.post(`${apiRootUrl}/ugc/v1/user_content/forum_list`, { + json: { + page: 1, + page_size: limit, + tag_id: 0, + fid: 4, + ban: 0, + is_new: 1, + }, + headers: { + 'content-type': 'application/json', + }, + }); + + const items = response.data.rows.map((item) => ({ + title: item.title, + description: item.description, + pubDate: parseDate(item.published_at * 1000), + link: `${rootUrl}/kx/${item.id}`, + author: item.author?.username, + category: item.tags.map((tag) => tag.name), + guid: item.resource_id, + })); + + return { + title: 'AMZ123 快讯', + link: `${rootUrl}/kx`, + item: items, + }; +} diff --git a/lib/routes/amz123/namespace.ts b/lib/routes/amz123/namespace.ts new file mode 100644 index 000000000000000..289242d2dd8894a --- /dev/null +++ b/lib/routes/amz123/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Amz123', + url: 'www.amz123.com', + categories: ['new-media'], + description: '跨境电商平台', + lang: 'zh-CN', +}; From b1386984554716bf4223a8dba2b029117f97b1e5 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 5 Dec 2024 00:33:48 +0800 Subject: [PATCH 678/740] chore(api): increase maxHeaderSize --- lib/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/index.ts b/lib/index.ts index 97cf8882bbf4821..bd6ba51d69091b0 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -20,6 +20,9 @@ const server = serve({ fetch: app.fetch, hostname: config.listenInaddrAny ? '::' : '127.0.0.1', port, + serverOptions: { + maxHeaderSize: 1024 * 64, + }, }); export default server; From cb551b45e437fb36d13ba2d32cfd80c9811fb363 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 5 Dec 2024 01:08:26 +0800 Subject: [PATCH 679/740] fix(route/hbr): remove Latest from type --- lib/routes/hbr/topic.ts | 45 +++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/lib/routes/hbr/topic.ts b/lib/routes/hbr/topic.ts index d7bac1912aea4dc..adbce1b657380df 100644 --- a/lib/routes/hbr/topic.ts +++ b/lib/routes/hbr/topic.ts @@ -1,14 +1,25 @@ 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'; export const route: Route = { path: '/topic/:topic?/:type?', - categories: ['new-media'], - example: '/hbr/topic/leadership', - parameters: { topic: 'Topic, can be found in URL, Leadership by default', type: 'Type, see below, Latest by default' }, + categories: ['new-media', 'popular'], + example: '/hbr/topic/Leadership/Popular', + parameters: { + topic: 'Topic, can be found in URL, Leadership by default', + type: { + description: 'Type, see below, Popular by default', + options: [ + { value: 'Popular', label: 'Popular' }, + { value: 'From the Store', label: 'From the Store' }, + { value: 'For You', label: 'For You' }, + ], + default: 'Popular', + }, + }, features: { requireConfig: false, requirePuppeteer: false, @@ -23,11 +34,11 @@ export const route: Route = { }, ], name: 'Topic', - maintainers: ['nczitzk'], + maintainers: ['nczitzk', 'pseudoyu'], handler, - description: `| LATEST | POPULAR | FROM THE STORE | FOR YOU | - | ------ | ------- | -------------- | ------- | - | Latest | Popular | From the Store | For You | + description: `| POPULAR | FROM THE STORE | FOR YOU | + | ------- | -------------- | ------- | + | Popular | From the Store | For You | :::tip Click here to view [All Topics](https://hbr.org/topics) @@ -35,18 +46,15 @@ export const route: Route = { }; async function handler(ctx) { - const topic = ctx.req.param('topic') ?? 'leadership'; - const type = ctx.req.param('type') ?? 'Latest'; + const topic = ctx.req.param('topic') ?? 'Leadership'; + const type = ctx.req.param('type') ?? 'Popular'; const rootUrl = 'https://hbr.org'; const currentUrl = `${rootUrl}/topic/${topic}`; - const response = await got({ - method: 'get', - url: currentUrl, - }); + const response = await ofetch(currentUrl); - const $ = load(response.data); + const $ = load(response); const list = $(`stream-content[data-stream-name="${type}"]`) .find('.stream-item') @@ -65,12 +73,9 @@ async function handler(ctx) { const items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { - const detailResponse = await got({ - method: 'get', - url: item.link, - }); + const detailResponse = await ofetch(item.link); - const content = load(detailResponse.data); + const content = load(detailResponse); item.description = content('.article-body, article[itemprop="description"]').html(); item.pubDate = parseDate(content('meta[property="article:published_time"]').attr('content')); From d81a618b922156d9a2ad9998ba609c2d6007d2dd Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 5 Dec 2024 01:32:21 +0800 Subject: [PATCH 680/740] feat(route/spotify): add podcasts route to popular --- lib/routes/spotify/show.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/routes/spotify/show.ts b/lib/routes/spotify/show.ts index 524af39f8b0a6fa..20e14c7922512df 100644 --- a/lib/routes/spotify/show.ts +++ b/lib/routes/spotify/show.ts @@ -1,11 +1,12 @@ -import { Route } from '@/types'; +import { Route, ViewType } from '@/types'; import utils from './utils'; import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { path: '/show/:id', - categories: ['multimedia'], + categories: ['multimedia', 'popular'], + view: ViewType.Audios, example: '/spotify/show/5CfCWKI5pZ28U0uOzXkDHe', parameters: { id: 'Show ID' }, features: { @@ -30,8 +31,8 @@ export const route: Route = { source: ['open.spotify.com/show/:id'], }, ], - name: 'Show', - maintainers: ['caiohsramos'], + name: 'Show/Podcasts', + maintainers: ['caiohsramos', 'pseudoyu'], handler, }; From 103ef92a78ce3c75f1116d17f3ccaff1872e169e Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:30:07 -0800 Subject: [PATCH 681/740] fix(view/index): update logo image path to relative (#17803) --- lib/views/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/views/index.tsx b/lib/views/index.tsx index 4c6c40baef379bc..4cef59cb8a958f8 100644 --- a/lib/views/index.tsx +++ b/lib/views/index.tsx @@ -136,7 +136,7 @@ const Index: FC<{ debugQuery: string | undefined }> = ({ debugQuery }) => { }} ></div> <div className="w-full grow shrink-0 py-8 flex items-center justify-center flex-col space-y-4"> - <img src="/logo.png" alt="RSSHub" width="100" loading="lazy" /> + <img src="./logo.png" alt="RSSHub" width="100" loading="lazy" /> <h1 className="text-4xl font-bold"> Welcome to <span className="text-[#F5712C]">RSSHub</span>! </h1> From b12b135e0209152ae2c0bbc49944589a93424376 Mon Sep 17 00:00:00 2001 From: quiniapiezoelectricity <73748843+quiniapiezoelectricity@users.noreply.github.com> Date: Wed, 4 Dec 2024 20:21:04 +0000 Subject: [PATCH 682/740] feat(route): add Yonhap News Agency route (#17802) * feat(route): add Yonhap New Agency route * Update lib/routes/yna/namespace.ts --------- --- lib/routes/yna/index.ts | 92 +++++++++++++++++++++++++++++++++++++ lib/routes/yna/namespace.ts | 10 ++++ 2 files changed, 102 insertions(+) create mode 100644 lib/routes/yna/index.ts create mode 100644 lib/routes/yna/namespace.ts diff --git a/lib/routes/yna/index.ts b/lib/routes/yna/index.ts new file mode 100644 index 000000000000000..119c1e76267efec --- /dev/null +++ b/lib/routes/yna/index.ts @@ -0,0 +1,92 @@ +import { Route } from '@/types'; +import parser from '@/utils/rss-parser'; +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: '/:lang?/:channel?', + categories: ['traditional-media'], + example: '/yna/en/national', + parameters: { + lang: 'Language, see below, `ko` by default', + channel: 'RSS Feed Channel, see below, `news` by default', + }, + features: { + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + requireConfig: false, + }, + name: 'News', + maintainers: ['quiniapiezoelectricity'], + handler, + description: ` +| Language | 한국어 | English | 简体中文 | 日本語 | عربي | Español | Français | +| --------- | ------ | ------- | -------- | ------ | ------ | ------- | -------- | +| \`:lang\` | \`ko\` | \`en\` | \`cn\` | \`jp\` | \`ar\` | \`es\` | \`fr\` | + +For a full list of RSS Feed Channels, please refer to the RSS feed page of the corresponding language +| RSS Feed Page | +| --------------------------------------------------------- | +| [한국어](https://www.yna.co.kr/rss/index?site=footer_rss) | +| [English](https://en.yna.co.kr/channel/index) | +| [简体中文](https://cn.yna.co.kr/channel/index) | +| [日本語](https://jp.yna.co.kr/channel/index) | +| [عربي](https://ar.yna.co.kr/channel/index) | +| [Español](https://sp.yna.co.kr/channel/index) | +| [Français](https://fr.yna.co.kr/channel/index) | + +:::tip +For example, the path for the RSS feed url https://www.yna.co.kr/rss/economy.xml and https://cn.yna.co.kr/RSS/news.xml would be \`/ko/economy\` and \`/cn/news\` respectively. +::: +`, +}; + +async function handler(ctx) { + const lang = ctx.req.param('lang') ?? 'ko'; + const channel = ctx.req.param('channel') ?? 'news'; + let url; + switch (lang) { + case 'ko': + url = `https://www.yna.co.kr/rss/${channel}.xml`; + break; + default: + url = `https://${lang}.yna.co.kr/RSS/${channel}.xml`; + break; + } + + const feed = await parser.parseURL(url); + const items = await Promise.all( + feed.items.map((item) => + cache.tryGet(item.link, async () => { + item.pubDate = lang === 'ko' ? parseDate(item.pubDate) : timezone(parseDate(item.pubDate), +9); // Timezone is only included in the pubDate of the Korean language RSS + const response = await got(item.link); + const $ = load(response.data); + item.author = + item.creator ?? + $('.tit-name') + .toArray() + .map((c) => $(c).text()) + .join(', '); + const article = $('article.story-news'); + article.find('.related-group').remove(); + article.find('.writer-zone01').remove(); + item.description = article.html(); + return item; + }) + ) + ); + + return { + title: feed.title, + link: feed.link, + description: feed.description, + language: feed.language ?? lang, + item: items, + }; +} diff --git a/lib/routes/yna/namespace.ts b/lib/routes/yna/namespace.ts new file mode 100644 index 000000000000000..37440b9efc9d806 --- /dev/null +++ b/lib/routes/yna/namespace.ts @@ -0,0 +1,10 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'Yonhap News Agency', + url: 'yna.co.kr', + lang: 'ko', + zh: { + name: '韩联社', + } +}; From 8b765e6266025e037bcc3751d2231721d5bed7d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 20:23:43 +0000 Subject: [PATCH 683/740] style: auto format --- lib/routes/yna/namespace.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/yna/namespace.ts b/lib/routes/yna/namespace.ts index 37440b9efc9d806..361481423442a14 100644 --- a/lib/routes/yna/namespace.ts +++ b/lib/routes/yna/namespace.ts @@ -5,6 +5,6 @@ export const namespace: Namespace = { url: 'yna.co.kr', lang: 'ko', zh: { - name: '韩联社', - } + name: '韩联社', + }, }; From 0a5e90720bda24d1f561397e2669da24175a1f84 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Wed, 4 Dec 2024 13:13:53 -0800 Subject: [PATCH 684/740] feat(route): luogu (#17804) --- lib/routes/luogu/daily.ts | 2 +- lib/routes/luogu/user-article.ts | 75 ++++++++++++++++++++++++++++++++ lib/routes/luogu/user-blog.ts | 5 ++- lib/routes/luogu/user-feed.ts | 19 ++++---- lib/routes/luogu/utils.ts | 17 ++++++++ 5 files changed, 106 insertions(+), 12 deletions(-) create mode 100644 lib/routes/luogu/user-article.ts create mode 100644 lib/routes/luogu/utils.ts diff --git a/lib/routes/luogu/daily.ts b/lib/routes/luogu/daily.ts index b48affaab1c1398..09be4c19bc3de56 100644 --- a/lib/routes/luogu/daily.ts +++ b/lib/routes/luogu/daily.ts @@ -23,7 +23,7 @@ export const route: Route = { }, ], name: '日报', - maintainers: ['LogicJake ', 'prnake ', 'nczitzk'], + maintainers: ['LogicJake', 'prnake', 'nczitzk'], handler, url: 'luogu.com.cn/discuss/47327', }; diff --git a/lib/routes/luogu/user-article.ts b/lib/routes/luogu/user-article.ts new file mode 100644 index 000000000000000..401d59b03443b7e --- /dev/null +++ b/lib/routes/luogu/user-article.ts @@ -0,0 +1,75 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import ofetch from '@/utils/ofetch'; +import * as cheerio from 'cheerio'; +import { getUserInfoFromUID } from './utils'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/user/article/:uid', + categories: ['programming'], + example: '/luogu/user/article/1', + parameters: { name: '用户 UID' }, + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['luogu.com/user/:uid'], + }, + { + source: ['luogu.com.cn/user/:uid'], + }, + ], + name: '用户文章', + maintainers: ['TonyRL'], + handler, +}; + +const baseUrl = 'https://www.luogu.com'; + +async function handler(ctx) { + const { uid } = ctx.req.param(); + + const userInfo = await getUserInfoFromUID(uid); + const response = await ofetch(`${baseUrl}/api/article/find`, { + query: { + user: uid, + page: 1, + ascending: false, + }, + }); + + const posts = response.articles.result.map((item) => ({ + title: item.title, + link: `${baseUrl}/article/${item.lid}`, + author: item.author.name, + pubDate: parseDate(item.time, 'X'), + description: item.content, + })); + + const item = await Promise.all( + posts.map((item) => + cache.tryGet(item.link, async () => { + const response = await ofetch(item.link); + const $ = cheerio.load(response); + item.description = $('div#rendered-preview').html(); + + return item; + }) + ) + ); + + return { + title: `${userInfo.name} 的个人中心 - 洛谷 | 计算机科学教育新生态`, + description: userInfo.description, + link: `${baseUrl}/user/${uid}#article`, + image: userInfo.avatar, + item, + }; +} diff --git a/lib/routes/luogu/user-blog.ts b/lib/routes/luogu/user-blog.ts index 6d91e5ce8215a0d..51538cb45354105 100644 --- a/lib/routes/luogu/user-blog.ts +++ b/lib/routes/luogu/user-blog.ts @@ -17,12 +17,15 @@ export const route: Route = { supportScihub: false, }, radar: [ + { + source: ['luogu.com/blog/:name'], + }, { source: ['luogu.com.cn/blog/:name'], }, ], name: '用户博客', - maintainers: [], + maintainers: ['ftiasch'], handler, }; diff --git a/lib/routes/luogu/user-feed.ts b/lib/routes/luogu/user-feed.ts index 34c50ce04afbb40..bde1cd462776c5a 100644 --- a/lib/routes/luogu/user-feed.ts +++ b/lib/routes/luogu/user-feed.ts @@ -1,8 +1,8 @@ import { Route } from '@/types'; -import cache from '@/utils/cache'; import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import MarkdownIt from 'markdown-it'; +import { getUserInfoFromUID } from './utils'; const md = MarkdownIt(); export const route: Route = { @@ -19,6 +19,9 @@ export const route: Route = { supportScihub: false, }, radar: [ + { + source: ['luogu.com/user/:uid'], + }, { source: ['luogu.com.cn/user/:uid'], }, @@ -29,27 +32,23 @@ export const route: Route = { }; async function handler(ctx) { - const getUsernameFromUID = (uid) => - cache.tryGet('luogu:username:' + uid, async () => { - const { data } = await got(`https://www.luogu.com.cn/user/${uid}?_contentOnly=1`); - return data.currentData.user.name; - }); - const uid = ctx.req.param('uid'); - const name = await getUsernameFromUID(uid); + const userInfo = await getUserInfoFromUID(uid); const { data: response } = await got(`https://www.luogu.com.cn/api/feed/list?user=${uid}`); const data = response.feeds.result; return { - title: `${name} 的洛谷动态`, + title: `${userInfo.name} 的洛谷动态`, + description: userInfo.description, + image: userInfo.avatar, link: `https://www.luogu.com.cn/user/${uid}#activity`, allowEmpty: true, item: data.map((item) => ({ title: item.content, description: md.render(item.content), pubDate: parseDate(item.time, 'X'), - author: name, + author: userInfo.name, link: `https://www.luogu.com.cn/user/${uid}#activity`, guid: item.id, })), diff --git a/lib/routes/luogu/utils.ts b/lib/routes/luogu/utils.ts new file mode 100644 index 000000000000000..bf28c669f4758a0 --- /dev/null +++ b/lib/routes/luogu/utils.ts @@ -0,0 +1,17 @@ +import cache from '@/utils/cache'; +import ofetch from '@/utils/got'; + +export const getUserInfoFromUID = (uid) => + cache.tryGet('luogu:username:' + uid, async () => { + const data = await ofetch(`https://www.luogu.com/user/${uid}`, { + query: { + _contentOnly: 1, + }, + }); + + return { + name: data.data.currentData.user.name, + description: data.data.currentData.user.slogan, + avatar: data.data.currentData.user.avatar, + }; + }) as Promise<{ name: string; description: string; avatar: string }>; From c731e6e301d070206a4f60dbb90d97e5f8f3ea10 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 5 Dec 2024 10:19:52 +0800 Subject: [PATCH 685/740] fix(route/theatlantic): null image issue --- lib/routes/theatlantic/news.ts | 11 ++++------- lib/routes/theatlantic/utils.ts | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/lib/routes/theatlantic/news.ts b/lib/routes/theatlantic/news.ts index eab56646aeccd4d..d6b056d8174516a 100644 --- a/lib/routes/theatlantic/news.ts +++ b/lib/routes/theatlantic/news.ts @@ -1,5 +1,5 @@ import { Route } from '@/types'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { load } from 'cheerio'; import { getArticleDetails } from './utils'; export const route: Route = { @@ -21,7 +21,7 @@ export const route: Route = { }, ], name: 'News', - maintainers: ['EthanWng97'], + maintainers: ['EthanWng97', 'pseudoyu'], handler, description: `| Popular | Latest | Politics | Technology | Business | | ------------ | ------ | -------- | ---------- | -------- | @@ -34,11 +34,8 @@ async function handler(ctx) { const host = 'https://www.theatlantic.com'; const category = ctx.req.param('category'); const url = `${host}/${category}/`; - const response = await got({ - method: 'get', - url, - }); - const $ = load(response.data); + const response = await ofetch(url); + const $ = load(response); const contents = JSON.parse($('script#__NEXT_DATA__').text()).props.pageProps.urqlState; const keyWithContent = Object.keys(contents).filter((key) => contents[key].data.includes(category)); const data = JSON.parse(contents[keyWithContent].data); diff --git a/lib/routes/theatlantic/utils.ts b/lib/routes/theatlantic/utils.ts index f0dc4c2da9b079f..cba3daa8d28f4a1 100644 --- a/lib/routes/theatlantic/utils.ts +++ b/lib/routes/theatlantic/utils.ts @@ -3,7 +3,7 @@ const __dirname = getCurrentPath(import.meta.url); import cache from '@/utils/cache'; import { load } from 'cheerio'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import { parseDate } from '@/utils/parse-date'; import { art } from '@/utils/render'; import path from 'node:path'; @@ -16,20 +16,18 @@ const getArticleDetails = async (items) => { items.map((item) => cache.tryGet(item.link, async () => { const url = item.link; - const response = await got({ - url, - method: 'get', + const html = await ofetch(url, { headers: { 'User-Agent': UA, }, }); - const html = response.data; const $ = load(html); let data = JSON.parse($('script#__NEXT_DATA__').text()); const list = data.props.pageProps.urqlState; const keyWithContent = Object.keys(list).filter((key) => list[key].data.includes('content')); data = JSON.parse(list[keyWithContent].data).article; + item.title = data.shareTitle; item.category = data.categories.map((category) => category.slug); for (const channel of data.channels) { @@ -37,9 +35,13 @@ const getArticleDetails = async (items) => { } item.content = data.content.filter((item) => item.innerHtml !== undefined && item.innerHtml !== ''); item.caption = data.dek; - item.imgUrl = data.leadArt.image?.url; - item.imgAlt = data.leadArt.image?.altText; - item.imgCaption = data.leadArt.image?.attributionText; + + if (data.leadArt) { + item.imgUrl = data.leadArt.image?.url; + item.imgAlt = data.leadArt.image?.altText; + item.imgCaption = data.leadArt.image?.attributionText; + } + item.description = art(path.join(__dirname, 'templates/article-description.art'), { item, }); From 9d1d6673e61c39d7c2e600ee632364f7848ad124 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 5 Dec 2024 10:38:08 +0800 Subject: [PATCH 686/740] fix: route/bloomburg unknown author name --- lib/routes/bloomberg/authors.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/routes/bloomberg/authors.ts b/lib/routes/bloomberg/authors.ts index 6ce5d2689b15ca0..83b6eed8586aa72 100644 --- a/lib/routes/bloomberg/authors.ts +++ b/lib/routes/bloomberg/authors.ts @@ -1,18 +1,18 @@ import { Route, ViewType } from '@/types'; import { load } from 'cheerio'; -import got from '@/utils/got'; +import ofetch from '@/utils/ofetch'; import rssParser from '@/utils/rss-parser'; import { asyncPoolAll, parseArticle } from './utils'; const parseAuthorNewsList = async (slug) => { const baseURL = `https://www.bloomberg.com/authors/${slug}`; const apiUrl = `https://www.bloomberg.com/lineup/api/lazy_load_author_stories?slug=${slug}&authorType=default&page=1`; - const resp = await got(apiUrl); + const resp = await ofetch(apiUrl); // Likely rate limited - if (!resp.data.html) { + if (!resp.html) { return []; } - const $ = load(resp.data.html); + const $ = load(resp.html); const articles = $('article.story-list-story'); return articles .map((index, item) => { @@ -49,7 +49,7 @@ export const route: Route = { }, ], name: 'Authors', - maintainers: ['josh'], + maintainers: ['josh', 'pseudoyu'], handler, }; @@ -67,7 +67,7 @@ async function handler(ctx) { } const item = await asyncPoolAll(1, list, (item) => parseArticle(item)); - const authorName = item.find((i) => i.author)?.author ?? 'Unknown'; + const authorName = item.find((i) => i.author)?.author ?? slug; return { title: `Bloomberg - ${authorName}`, From 0cac38f71441ca8f90f01a8258c0486f55473ff5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 09:10:02 +0000 Subject: [PATCH 687/740] chore(deps): bump @scalar/hono-api-reference from 0.5.162 to 0.5.163 (#17813) Bumps [@scalar/hono-api-reference](https://github.com/scalar/scalar/tree/HEAD/packages/hono-api-reference) from 0.5.162 to 0.5.163. - [Changelog](https://github.com/scalar/scalar/blob/main/packages/hono-api-reference/CHANGELOG.md) - [Commits](https://github.com/scalar/scalar/commits/HEAD/packages/hono-api-reference) --- updated-dependencies: - dependency-name: "@scalar/hono-api-reference" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 2bd46e1e5d28c41..f04c57466530a4f 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.23", - "@scalar/hono-api-reference": "0.5.162", + "@scalar/hono-api-reference": "0.5.163", "@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 37bb1b365183f0a..2036dd892de80d6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,8 +58,8 @@ importers: specifier: 0.0.23 version: 0.0.23 '@scalar/hono-api-reference': - specifier: 0.5.162 - version: 0.5.162(hono@4.6.12) + specifier: 0.5.163 + version: 0.5.163(hono@4.6.12) '@sentry/node': specifier: 7.119.1 version: 7.119.1 @@ -1778,8 +1778,8 @@ packages: '@rss3/sdk@0.0.23': resolution: {integrity: sha512-1cF1AqLU0k6dMwqQ5Fch3rOAbh4UXJ4UZLtOwzp/RWyGoCvu3lUOUIdJF41omunuH/JJSP2z6rJTPj4S6a60eg==} - '@scalar/hono-api-reference@0.5.162': - resolution: {integrity: sha512-WoC6lLXLYSB6OxDuybtYe+5/EdU0M33DPsknjRsOImp+L6Qn64OZvKwyf7033rEHWvqqpwvEB9r+2zZ4F6KhoQ==} + '@scalar/hono-api-reference@0.5.163': + resolution: {integrity: sha512-kIZRMSIBT1Ac0PjWLuoIERZYTk0ZTp+B/zfK13lOjTQ8cgPnau34hsAT8Bydr9hOWENbmEPOumMBFJ1F81+PKw==} engines: {node: '>=18'} peerDependencies: hono: ^4.0.0 @@ -1788,8 +1788,8 @@ packages: resolution: {integrity: sha512-6geH9ehvQ/sG/xUyy3e0lyOw3BaY5s6nn22wHjEJhcobdmWyFER0O6m7AU0ZN4QTjle/gYvFJOjj552l/rsNSw==} engines: {node: '>=18'} - '@scalar/types@0.0.22': - resolution: {integrity: sha512-+S1flivP58p2uiHM4dU5ZaAb20wbVcP0nV39KWoVjijvHDx1HWtAGg+PaDXRCRj2zM4QzBeg4olaso20Tm26fQ==} + '@scalar/types@0.0.23': + resolution: {integrity: sha512-dOvQig4hyeVw1kXIo9MQAnM9tUt9vCOZs3zOe6oSqOUG8xY7+WXioirlRCsc+wcQegMbuNYOlNBXCDugOP1YJA==} engines: {node: '>=18'} '@sec-ant/readable-stream@0.4.1': @@ -7231,14 +7231,14 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.162(hono@4.6.12)': + '@scalar/hono-api-reference@0.5.163(hono@4.6.12)': dependencies: - '@scalar/types': 0.0.22 + '@scalar/types': 0.0.23 hono: 4.6.12 '@scalar/openapi-types@0.1.5': {} - '@scalar/types@0.0.22': + '@scalar/types@0.0.23': dependencies: '@scalar/openapi-types': 0.1.5 '@unhead/schema': 1.11.11 From 55df956cc2a6cc3ad85d7407a3ace0bc21097e3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 04:41:47 -0800 Subject: [PATCH 688/740] chore(deps): bump @opentelemetry/sdk-metrics from 1.28.0 to 1.29.0 (#17808) Bumps [@opentelemetry/sdk-metrics](https://github.com/open-telemetry/opentelemetry-js) from 1.28.0 to 1.29.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.28.0...v1.29.0) --- updated-dependencies: - dependency-name: "@opentelemetry/sdk-metrics" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 39 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 38 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index f04c57466530a4f..79c04721e76574f 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@opentelemetry/exporter-prometheus": "0.55.0", "@opentelemetry/exporter-trace-otlp-http": "0.55.0", "@opentelemetry/resources": "1.28.0", - "@opentelemetry/sdk-metrics": "1.28.0", + "@opentelemetry/sdk-metrics": "1.29.0", "@opentelemetry/sdk-trace-base": "1.28.0", "@opentelemetry/semantic-conventions": "1.28.0", "@postlight/parser": "2.2.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2036dd892de80d6..7dc8226870ff436 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -43,8 +43,8 @@ importers: specifier: 1.28.0 version: 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': - specifier: 1.28.0 - version: 1.28.0(@opentelemetry/api@1.9.0) + specifier: 1.29.0 + version: 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': specifier: 1.28.0 version: 1.28.0(@opentelemetry/api@1.9.0) @@ -1532,6 +1532,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/core@1.29.0': + resolution: {integrity: sha512-gmT7vAreXl0DTHD2rVZcw3+l2g84+5XiHIqdBUxXbExymPCvSsGOpiwMmn8nkiJur28STV31wnhIDrzWDPzjfA==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/exporter-prometheus@0.55.0': resolution: {integrity: sha512-huHo4Fw9W2jlMu67EKXTY1DMSzQepmEDTTElPBTJ/2qcdlrFFhuz+neJW9cQ7M7Db8qd7I5bpNdxObCn4ZEjnA==} engines: {node: '>=14'} @@ -1562,6 +1568,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/resources@1.29.0': + resolution: {integrity: sha512-s7mLXuHZE7RQr1wwweGcaRp3Q4UJJ0wazeGlc/N5/XSe6UyXfsh1UQGMADYeg7YwD+cEdMtU1yJAUXdnFzYzyQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/sdk-logs@0.55.0': resolution: {integrity: sha512-TSx+Yg/d48uWW6HtjS1AD5x6WPfLhDWLl/WxC7I2fMevaiBuKCuraxTB8MDXieCNnBI24bw9ytyXrDCswFfWgA==} engines: {node: '>=14'} @@ -1574,6 +1586,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' + '@opentelemetry/sdk-metrics@1.29.0': + resolution: {integrity: sha512-MkVtuzDjXZaUJSuJlHn6BSXjcQlMvHcsDV7LjY4P6AJeffMa4+kIGDjzsCf6DkAh6Vqlwag5EWEam3KZOX5Drw==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.3.0 <1.10.0' + '@opentelemetry/sdk-trace-base@1.28.0': resolution: {integrity: sha512-ceUVWuCpIao7Y5xE02Xs3nQi0tOGmMea17ecBdwtCvdo9ekmO+ijc9RFDgfifMl7XCBf41zne/1POM3LqSTZDA==} engines: {node: '>=14'} @@ -6984,6 +7002,11 @@ snapshots: '@opentelemetry/api': 1.9.0 '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/core@1.29.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/semantic-conventions': 1.28.0 + '@opentelemetry/exporter-prometheus@0.55.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -7023,6 +7046,12 @@ snapshots: '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/resources@1.29.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 + '@opentelemetry/sdk-logs@0.55.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -7036,6 +7065,12 @@ snapshots: '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-metrics@1.29.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base@1.28.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 From ab3c415f807b8b5f988b1d982c6df0439b7f4d3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 05:08:37 -0800 Subject: [PATCH 689/740] chore(deps): bump @opentelemetry/sdk-trace-base from 1.28.0 to 1.29.0 (#17814) Bumps [@opentelemetry/sdk-trace-base](https://github.com/open-telemetry/opentelemetry-js) from 1.28.0 to 1.29.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.28.0...v1.29.0) --- updated-dependencies: - dependency-name: "@opentelemetry/sdk-trace-base" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 79c04721e76574f..192f01e533af817 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "@opentelemetry/exporter-trace-otlp-http": "0.55.0", "@opentelemetry/resources": "1.28.0", "@opentelemetry/sdk-metrics": "1.29.0", - "@opentelemetry/sdk-trace-base": "1.28.0", + "@opentelemetry/sdk-trace-base": "1.29.0", "@opentelemetry/semantic-conventions": "1.28.0", "@postlight/parser": "2.2.3", "@rss3/sdk": "0.0.23", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7dc8226870ff436..da20978e88b9969 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,8 +46,8 @@ importers: specifier: 1.29.0 version: 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-trace-base': - specifier: 1.28.0 - version: 1.28.0(@opentelemetry/api@1.9.0) + specifier: 1.29.0 + version: 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': specifier: 1.28.0 version: 1.28.0 @@ -1598,6 +1598,12 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/sdk-trace-base@1.29.0': + resolution: {integrity: sha512-hEOpAYLKXF3wGJpXOtWsxEtqBgde0SCv+w+jvr3/UusR4ll3QrENEGnSl1WDCyRrpqOQ5NCNOvZch9UFVa7MnQ==} + engines: {node: '>=14'} + peerDependencies: + '@opentelemetry/api': '>=1.0.0 <1.10.0' + '@opentelemetry/semantic-conventions@1.27.0': resolution: {integrity: sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==} engines: {node: '>=14'} @@ -7078,6 +7084,13 @@ snapshots: '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.27.0 + '@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0)': + dependencies: + '@opentelemetry/api': 1.9.0 + '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/semantic-conventions': 1.28.0 + '@opentelemetry/semantic-conventions@1.27.0': {} '@opentelemetry/semantic-conventions@1.28.0': {} From 14e02b7b4b1455562d2bcc7930d6b541c9cdecb8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 05:18:49 -0800 Subject: [PATCH 690/740] chore(deps): bump @opentelemetry/resources from 1.28.0 to 1.29.0 (#17812) Bumps [@opentelemetry/resources](https://github.com/open-telemetry/opentelemetry-js) from 1.28.0 to 1.29.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.28.0...v1.29.0) --- updated-dependencies: - dependency-name: "@opentelemetry/resources" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 192f01e533af817..c3fd0c832ae5e35 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.55.0", "@opentelemetry/exporter-trace-otlp-http": "0.55.0", - "@opentelemetry/resources": "1.28.0", + "@opentelemetry/resources": "1.29.0", "@opentelemetry/sdk-metrics": "1.29.0", "@opentelemetry/sdk-trace-base": "1.29.0", "@opentelemetry/semantic-conventions": "1.28.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da20978e88b9969..75c52e1513bb24e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -40,8 +40,8 @@ importers: specifier: 0.55.0 version: 0.55.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': - specifier: 1.28.0 - version: 1.28.0(@opentelemetry/api@1.9.0) + specifier: 1.29.0 + version: 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': specifier: 1.29.0 version: 1.29.0(@opentelemetry/api@1.9.0) From 96416bda3b8329b746556cd376009a3cb40317ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 05:34:44 -0800 Subject: [PATCH 691/740] chore(deps): bump @opentelemetry/exporter-trace-otlp-http (#17809) Bumps [@opentelemetry/exporter-trace-otlp-http](https://github.com/open-telemetry/opentelemetry-js) from 0.55.0 to 0.56.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/experimental/v0.55.0...experimental/v0.56.0) --- updated-dependencies: - dependency-name: "@opentelemetry/exporter-trace-otlp-http" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 79 +++++++++++++++++++++----------------------------- 2 files changed, 34 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index c3fd0c832ae5e35..6cbd8dcb7002464 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", "@opentelemetry/exporter-prometheus": "0.55.0", - "@opentelemetry/exporter-trace-otlp-http": "0.55.0", + "@opentelemetry/exporter-trace-otlp-http": "0.56.0", "@opentelemetry/resources": "1.29.0", "@opentelemetry/sdk-metrics": "1.29.0", "@opentelemetry/sdk-trace-base": "1.29.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 75c52e1513bb24e..6a595df1fbeccc8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -37,8 +37,8 @@ importers: specifier: 0.55.0 version: 0.55.0(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http': - specifier: 0.55.0 - version: 0.55.0(@opentelemetry/api@1.9.0) + specifier: 0.56.0 + version: 0.56.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': specifier: 1.29.0 version: 1.29.0(@opentelemetry/api@1.9.0) @@ -1518,8 +1518,8 @@ packages: '@open-draft/until@2.1.0': resolution: {integrity: sha512-U69T3ItWHvLwGg5eJ0n3I62nWuE6ilHlmz7zM0npLBRvPRd7e6NYmg54vvRtP5mZG7kZqZCFVdsTWo7BPtBujg==} - '@opentelemetry/api-logs@0.55.0': - resolution: {integrity: sha512-3cpa+qI45VHYcA5c0bHM6VHo9gicv3p5mlLHNG3rLyjQU8b7e0st1rWtrUn3JbZ3DwwCfhKop4eQ9UuYlC6Pkg==} + '@opentelemetry/api-logs@0.56.0': + resolution: {integrity: sha512-Wr39+94UNNG3Ei9nv3pHd4AJ63gq5nSemMRpCd8fPwDL9rN3vK26lzxfH27mw16XzOSO+TpyQwBAMaLxaPWG0g==} engines: {node: '>=14'} '@opentelemetry/api@1.9.0': @@ -1544,20 +1544,20 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/exporter-trace-otlp-http@0.55.0': - resolution: {integrity: sha512-lMiNic63EVHpW+eChmLD2CieDmwQBFi72+LFbh8+5hY0ShrDGrsGP/zuT5MRh7M/vM/UZYO/2A/FYd7CMQGR7A==} + '@opentelemetry/exporter-trace-otlp-http@0.56.0': + resolution: {integrity: sha512-vqVuJvcwameA0r0cNrRzrZqPLB0otS+95g0XkZdiKOXUo81wYdY6r4kyrwz4nSChqTBEFm0lqi/H2OWGboOa6g==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-exporter-base@0.55.0': - resolution: {integrity: sha512-iHQI0Zzq3h1T6xUJTVFwmFl5Dt5y1es+fl4kM+k5T/3YvmVyeYkSiF+wHCg6oKrlUAJfk+t55kaAu3sYmt7ZYA==} + '@opentelemetry/otlp-exporter-base@0.56.0': + resolution: {integrity: sha512-eURvv0fcmBE+KE1McUeRo+u0n18ZnUeSc7lDlW/dzlqFYasEbsztTK4v0Qf8C4vEY+aMTjPKUxBG0NX2Te3Pmw==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/otlp-transformer@0.55.0': - resolution: {integrity: sha512-kVqEfxtp6mSN2Dhpy0REo1ghP4PYhC1kMHQJ2qVlO99Pc+aigELjZDfg7/YKmL71gR6wVGIeJfiql/eXL7sQPA==} + '@opentelemetry/otlp-transformer@0.56.0': + resolution: {integrity: sha512-kVkH/W2W7EpgWWpyU5VnnjIdSD7Y7FljQYObAQSKdRcejiwMj2glypZtUdfq1LTJcv4ht0jyTrw1D3CCxssNtQ==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 @@ -1574,8 +1574,8 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/sdk-logs@0.55.0': - resolution: {integrity: sha512-TSx+Yg/d48uWW6HtjS1AD5x6WPfLhDWLl/WxC7I2fMevaiBuKCuraxTB8MDXieCNnBI24bw9ytyXrDCswFfWgA==} + '@opentelemetry/sdk-logs@0.56.0': + resolution: {integrity: sha512-OS0WPBJF++R/cSl+terUjQH5PebloidB1Jbbecgg2rnCmQbTST9xsRes23bLfDQVRvmegmHqDh884h0aRdJyLw==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': '>=1.4.0 <1.10.0' @@ -1592,12 +1592,6 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-trace-base@1.28.0': - resolution: {integrity: sha512-ceUVWuCpIao7Y5xE02Xs3nQi0tOGmMea17ecBdwtCvdo9ekmO+ijc9RFDgfifMl7XCBf41zne/1POM3LqSTZDA==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/sdk-trace-base@1.29.0': resolution: {integrity: sha512-hEOpAYLKXF3wGJpXOtWsxEtqBgde0SCv+w+jvr3/UusR4ll3QrENEGnSl1WDCyRrpqOQ5NCNOvZch9UFVa7MnQ==} engines: {node: '>=14'} @@ -6997,7 +6991,7 @@ snapshots: '@open-draft/until@2.1.0': {} - '@opentelemetry/api-logs@0.55.0': + '@opentelemetry/api-logs@0.56.0': dependencies: '@opentelemetry/api': 1.9.0 @@ -7020,30 +7014,30 @@ snapshots: '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/exporter-trace-otlp-http@0.55.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/exporter-trace-otlp-http@0.56.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base': 0.55.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.55.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-exporter-base': 0.56.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.56.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.29.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-exporter-base@0.55.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/otlp-exporter-base@0.56.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer': 0.55.0(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/otlp-transformer': 0.56.0(@opentelemetry/api@1.9.0) - '@opentelemetry/otlp-transformer@0.55.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/otlp-transformer@0.56.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.55.0 - '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-logs': 0.55.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-metrics': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/api-logs': 0.56.0 + '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-logs': 0.56.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-metrics': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-trace-base': 1.29.0(@opentelemetry/api@1.9.0) protobufjs: 7.4.0 '@opentelemetry/resources@1.28.0(@opentelemetry/api@1.9.0)': @@ -7058,12 +7052,12 @@ snapshots: '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.28.0 - '@opentelemetry/sdk-logs@0.55.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/sdk-logs@0.56.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/api-logs': 0.55.0 - '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/api-logs': 0.56.0 + '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/sdk-metrics@1.28.0(@opentelemetry/api@1.9.0)': dependencies: @@ -7077,13 +7071,6 @@ snapshots: '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-trace-base@1.28.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/sdk-trace-base@1.29.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 From 9b684c2183c01973e1048bea2122763586533ff8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:47:54 +0800 Subject: [PATCH 692/740] chore(deps): bump @opentelemetry/exporter-prometheus (#17811) Bumps [@opentelemetry/exporter-prometheus](https://github.com/open-telemetry/opentelemetry-js) from 0.55.0 to 0.56.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/experimental/v0.55.0...experimental/v0.56.0) --- updated-dependencies: - dependency-name: "@opentelemetry/exporter-prometheus" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 57 +++++++------------------------------------------- 2 files changed, 9 insertions(+), 50 deletions(-) diff --git a/package.json b/package.json index 6cbd8dcb7002464..998a7b6e8741419 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@hono/zod-openapi": "0.18.3", "@notionhq/client": "2.2.15", "@opentelemetry/api": "1.9.0", - "@opentelemetry/exporter-prometheus": "0.55.0", + "@opentelemetry/exporter-prometheus": "0.56.0", "@opentelemetry/exporter-trace-otlp-http": "0.56.0", "@opentelemetry/resources": "1.29.0", "@opentelemetry/sdk-metrics": "1.29.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a595df1fbeccc8..d07da8ccaf6004f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -34,8 +34,8 @@ importers: specifier: 1.9.0 version: 1.9.0 '@opentelemetry/exporter-prometheus': - specifier: 0.55.0 - version: 0.55.0(@opentelemetry/api@1.9.0) + specifier: 0.56.0 + version: 0.56.0(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http': specifier: 0.56.0 version: 0.56.0(@opentelemetry/api@1.9.0) @@ -1526,20 +1526,14 @@ packages: resolution: {integrity: sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg==} engines: {node: '>=8.0.0'} - '@opentelemetry/core@1.28.0': - resolution: {integrity: sha512-ZLwRMV+fNDpVmF2WYUdBHlq0eOWtEaUJSusrzjGnBt7iSRvfjFE3RXYUZJrqou/wIDWV0DwQ5KIfYe9WXg9Xqw==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/core@1.29.0': resolution: {integrity: sha512-gmT7vAreXl0DTHD2rVZcw3+l2g84+5XiHIqdBUxXbExymPCvSsGOpiwMmn8nkiJur28STV31wnhIDrzWDPzjfA==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/exporter-prometheus@0.55.0': - resolution: {integrity: sha512-huHo4Fw9W2jlMu67EKXTY1DMSzQepmEDTTElPBTJ/2qcdlrFFhuz+neJW9cQ7M7Db8qd7I5bpNdxObCn4ZEjnA==} + '@opentelemetry/exporter-prometheus@0.56.0': + resolution: {integrity: sha512-5kFcTumUveNREskg6n4aaXx2o3ADc9YxDkArGCIegzErlc3zfzreO4Y7HDc/fYBnV9aIhJUk5P8yotyVCuymkQ==} engines: {node: '>=14'} peerDependencies: '@opentelemetry/api': ^1.3.0 @@ -1562,12 +1556,6 @@ packages: peerDependencies: '@opentelemetry/api': ^1.3.0 - '@opentelemetry/resources@1.28.0': - resolution: {integrity: sha512-cIyXSVJjGeTICENN40YSvLDAq4Y2502hGK3iN7tfdynQLKWb3XWZQEkPc+eSx47kiy11YeFAlYkEfXwR1w8kfw==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/resources@1.29.0': resolution: {integrity: sha512-s7mLXuHZE7RQr1wwweGcaRp3Q4UJJ0wazeGlc/N5/XSe6UyXfsh1UQGMADYeg7YwD+cEdMtU1yJAUXdnFzYzyQ==} engines: {node: '>=14'} @@ -1580,12 +1568,6 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.4.0 <1.10.0' - '@opentelemetry/sdk-metrics@1.28.0': - resolution: {integrity: sha512-43tqMK/0BcKTyOvm15/WQ3HLr0Vu/ucAl/D84NO7iSlv6O4eOprxSHa3sUtmYkaZWHqdDJV0AHVz/R6u4JALVQ==} - engines: {node: '>=14'} - peerDependencies: - '@opentelemetry/api': '>=1.3.0 <1.10.0' - '@opentelemetry/sdk-metrics@1.29.0': resolution: {integrity: sha512-MkVtuzDjXZaUJSuJlHn6BSXjcQlMvHcsDV7LjY4P6AJeffMa4+kIGDjzsCf6DkAh6Vqlwag5EWEam3KZOX5Drw==} engines: {node: '>=14'} @@ -1598,10 +1580,6 @@ packages: peerDependencies: '@opentelemetry/api': '>=1.0.0 <1.10.0' - '@opentelemetry/semantic-conventions@1.27.0': - resolution: {integrity: sha512-sAay1RrB+ONOem0OZanAR1ZI/k7yDpnOQSQmTMuGImUQb2y8EbSaCJ94FQluM74xoU03vlb2d2U90hZluL6nQg==} - engines: {node: '>=14'} - '@opentelemetry/semantic-conventions@1.28.0': resolution: {integrity: sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA==} engines: {node: '>=14'} @@ -6997,22 +6975,17 @@ snapshots: '@opentelemetry/api@1.9.0': {} - '@opentelemetry/core@1.28.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/core@1.29.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 '@opentelemetry/semantic-conventions': 1.28.0 - '@opentelemetry/exporter-prometheus@0.55.0(@opentelemetry/api@1.9.0)': + '@opentelemetry/exporter-prometheus@0.56.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-metrics': 1.28.0(@opentelemetry/api@1.9.0) + '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) + '@opentelemetry/sdk-metrics': 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/exporter-trace-otlp-http@0.56.0(@opentelemetry/api@1.9.0)': dependencies: @@ -7040,12 +7013,6 @@ snapshots: '@opentelemetry/sdk-trace-base': 1.29.0(@opentelemetry/api@1.9.0) protobufjs: 7.4.0 - '@opentelemetry/resources@1.28.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/semantic-conventions': 1.27.0 - '@opentelemetry/resources@1.29.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -7059,12 +7026,6 @@ snapshots: '@opentelemetry/core': 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-metrics@1.28.0(@opentelemetry/api@1.9.0)': - dependencies: - '@opentelemetry/api': 1.9.0 - '@opentelemetry/core': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/resources': 1.28.0(@opentelemetry/api@1.9.0) - '@opentelemetry/sdk-metrics@1.29.0(@opentelemetry/api@1.9.0)': dependencies: '@opentelemetry/api': 1.9.0 @@ -7078,8 +7039,6 @@ snapshots: '@opentelemetry/resources': 1.29.0(@opentelemetry/api@1.9.0) '@opentelemetry/semantic-conventions': 1.28.0 - '@opentelemetry/semantic-conventions@1.27.0': {} - '@opentelemetry/semantic-conventions@1.28.0': {} '@otplib/core@12.0.1': {} From b35d47d68519f55be0cc0fa739aa3212940d3d19 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Thu, 5 Dec 2024 22:19:39 +0800 Subject: [PATCH 693/740] fix(36kr): add checks --- lib/routes/36kr/hot-list.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/routes/36kr/hot-list.ts b/lib/routes/36kr/hot-list.ts index 46b072ddd9e2fed..b546d4b1437ca27 100644 --- a/lib/routes/36kr/hot-list.ts +++ b/lib/routes/36kr/hot-list.ts @@ -4,6 +4,7 @@ import got from '@/utils/got'; import { parseDate } from '@/utils/parse-date'; import { rootUrl, ProcessItem } from './utils'; +import InvalidParameterError from '@/errors/types/invalid-parameter'; const categories = { 24: { @@ -54,6 +55,10 @@ export const route: Route = { async function handler(ctx) { const category = ctx.req.param('category') ?? '24'; + if (!categories[category]) { + throw new InvalidParameterError('This category does not exist. Please refer to the documentation for the correct usage.'); + } + const currentUrl = category === '24' ? rootUrl : `${rootUrl}/hot-list/catalog`; const response = await got({ From 166e69bfaa6d5143c1785677660574fbdf578d3a Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 5 Dec 2024 22:48:13 +0800 Subject: [PATCH 694/740] fix(api): decrease maxHeaderSize --- lib/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/index.ts b/lib/index.ts index bd6ba51d69091b0..61fbec2f9311f29 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -21,7 +21,7 @@ const server = serve({ hostname: config.listenInaddrAny ? '::' : '127.0.0.1', port, serverOptions: { - maxHeaderSize: 1024 * 64, + maxHeaderSize: 1024 * 32, }, }); From db98160eed66ff11e754990880c8b017482de867 Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Thu, 5 Dec 2024 23:53:45 +0800 Subject: [PATCH 695/740] =?UTF-8?q?fix(mihoyo/bbs):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=20timeline=20API=20URL=20(#17806)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新 timeline API URL 以匹配最新的 API 路径 --- lib/routes/mihoyo/bbs/timeline.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/mihoyo/bbs/timeline.ts b/lib/routes/mihoyo/bbs/timeline.ts index af60ba5f8a70aca..0a2f1b14f465370 100644 --- a/lib/routes/mihoyo/bbs/timeline.ts +++ b/lib/routes/mihoyo/bbs/timeline.ts @@ -47,7 +47,7 @@ async function handler(ctx) { page_size, }; const link = 'https://www.miyoushe.com/ys/timeline'; - const url = 'https://bbs-api.miyoushe.com/post/wapi/timelines'; + const url = 'https://bbs-api.miyoushe.com/painter/wapi/timeline/list'; const response = await got({ method: 'get', url, From ce2b89a6428979a7ca91861c88a5fc41283581fe Mon Sep 17 00:00:00 2001 From: Yuhang <50909599+MiuNice@users.noreply.github.com> Date: Fri, 6 Dec 2024 00:52:06 +0800 Subject: [PATCH 696/740] fix: qweather route example inaccuracy. (#17805) * fix: qweather route example inaccuracy. qweather route example inaccuracy * fix(qweather): throw on config not found --------- --- lib/routes/qweather/3days.ts | 7 ++++--- lib/routes/qweather/now.ts | 21 ++++++++++++--------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/lib/routes/qweather/3days.ts b/lib/routes/qweather/3days.ts index d077dde84f7d76e..7602d89d493994d 100644 --- a/lib/routes/qweather/3days.ts +++ b/lib/routes/qweather/3days.ts @@ -35,19 +35,20 @@ export const route: Route = { name: '近三天天气', maintainers: ['Rein-Ou', 'la3rence'], handler, - description: `需自行注册获取 api 的 key,并在环境变量 HEFENG\_KEY 中进行配置,获取订阅近三天天气预报`, + description: '获取订阅近三天天气预报', }; async function handler(ctx) { if (!config.hefeng.key) { throw new ConfigNotFoundError('QWeather RSS is disabled due to the lack of <a href="https://docs.rsshub.app/zh/install/config#%E5%92%8C%E9%A3%8E%E5%A4%A9%E6%B0%94">relevant config</a>'); } - const id = await cache.tryGet(ctx.req.param('location') + '_id', async () => { + + const id = await cache.tryGet('qweather:' + ctx.req.param('location') + ':id', async () => { const response = await got(`${CIRY_LOOKUP_API}?location=${ctx.req.param('location')}&key=${config.hefeng.key}`); return response.data.location[0].id; }); const weatherData = await cache.tryGet( - ctx.req.param('location'), + 'qweather:' + ctx.req.param('location'), async () => { const response = await got(`${WEATHER_API}?key=${config.hefeng.key}&location=${id}`); return response.data; diff --git a/lib/routes/qweather/now.ts b/lib/routes/qweather/now.ts index c73e227b53bd9cd..4233562d7fcc7cb 100644 --- a/lib/routes/qweather/now.ts +++ b/lib/routes/qweather/now.ts @@ -8,17 +8,20 @@ import { art } from '@/utils/render'; import path from 'node:path'; import { parseDate } from '@/utils/parse-date'; import { config } from '@/config'; +import ConfigNotFoundError from '@/errors/types/config-not-found'; + const rootUrl = 'https://devapi.qweather.com/v7/weather/now?'; + export const route: Route = { path: '/now/:location', categories: ['forecast'], - example: '/qweather/广州', + example: '/qweather/now/广州', parameters: { location: 'N' }, features: { requireConfig: [ { name: 'HEFENG_KEY', - description: '', + description: '访问 `https://www.qweather.com/` 注册开发 API Key。', }, ], requirePuppeteer: false, @@ -30,21 +33,21 @@ export const route: Route = { name: '实时天气', maintainers: ['Rein-Ou'], handler, - description: `需自行注册获取 api 的 key,每小时更新一次数据`, }; async function handler(ctx) { - const id = await cache.tryGet(ctx.req.param('location') + '_id', async () => { + if (!config.hefeng.key) { + throw new ConfigNotFoundError('QWeather RSS is disabled due to the lack of <a href="https://docs.rsshub.app/zh/install/config#%E5%92%8C%E9%A3%8E%E5%A4%A9%E6%B0%94">relevant config</a>'); + } + + const id = await cache.tryGet('qweather:' + ctx.req.param('location') + ':id', async () => { const response = await got(`https://geoapi.qweather.com/v2/city/lookup?location=${ctx.req.param('location')}&key=${config.hefeng.key}`); - const data = []; - for (const i in response.data.location) { - data.push(response.data.location[i]); - } + const data = response.data.location.map((loc) => loc); return data[0].id; }); const requestUrl = rootUrl + 'key=' + config.hefeng.key + '&location=' + id; const responseData = await cache.tryGet( - ctx.req.param('location') + '_now', + 'qweather:' + ctx.req.param('location') + ':now', async () => { const response = await got(requestUrl); return response.data; From d7447b25cff4830a4818e8c7b6abb4fde0d98530 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 6 Dec 2024 07:14:05 +0800 Subject: [PATCH 697/740] chore(route/joneslanglasalle): fetch 12 items by default --- lib/routes/joneslanglasalle/index.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/routes/joneslanglasalle/index.ts b/lib/routes/joneslanglasalle/index.ts index 7eaba49260d1de0..763fc2db13c6121 100644 --- a/lib/routes/joneslanglasalle/index.ts +++ b/lib/routes/joneslanglasalle/index.ts @@ -35,7 +35,8 @@ const cleanHtml = (html: string, preservedTags: string[]): string => { export const handler = async (ctx: Context): Promise<Data> => { const { language: lang = 'zh', category = 'trends-and-insights' } = ctx.req.param(); - const limit: number = Number.parseInt(ctx.req.query('limit') ?? '10', 10); + // default limit is 12 + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '11', 11); const rootUrl: string = 'https://www.joneslanglasalle.com.cn'; const targetUrl: string = new URL(`${lang}/${category}`, rootUrl).href; @@ -191,7 +192,7 @@ export const route: Route = { path: '/:language?/:category{.+}?', name: 'Trends & Insights', url: 'joneslanglasalle.com.cn', - maintainers: ['nczitzk'], + maintainers: ['nczitzk', 'pseudoyu'], handler, example: '/joneslanglasalle/en/trends-and-insights', parameters: { From db18c561cbe6923bef7ae4b0b46ac659fa589902 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 6 Dec 2024 07:54:20 +0800 Subject: [PATCH 698/740] fix(route/joneslanglasalle): radix to 10 and set default to 12 --- lib/routes/joneslanglasalle/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/joneslanglasalle/index.ts b/lib/routes/joneslanglasalle/index.ts index 763fc2db13c6121..731c56f2cfcc718 100644 --- a/lib/routes/joneslanglasalle/index.ts +++ b/lib/routes/joneslanglasalle/index.ts @@ -36,7 +36,7 @@ const cleanHtml = (html: string, preservedTags: string[]): string => { export const handler = async (ctx: Context): Promise<Data> => { const { language: lang = 'zh', category = 'trends-and-insights' } = ctx.req.param(); // default limit is 12 - const limit: number = Number.parseInt(ctx.req.query('limit') ?? '11', 11); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '12', 10); const rootUrl: string = 'https://www.joneslanglasalle.com.cn'; const targetUrl: string = new URL(`${lang}/${category}`, rootUrl).href; From 60dd8f6ba6263c6ed63f77a280b072c2d31cb05b Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Fri, 6 Dec 2024 16:12:32 +0800 Subject: [PATCH 699/740] feat(route/twitter): support getUserTweets thirdparty api --- lib/routes/twitter/api/web-api/utils.ts | 57 ++++++++++++++++--------- lib/routes/twitter/user.ts | 11 ++++- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index d3902425deecc89..a8632757ddb09f2 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -222,32 +222,49 @@ export const twitterGot = async ( }; export const paginationTweets = async (endpoint: string, userId: number | undefined, variables: Record<string, any>, path?: string[]) => { - const { data } = await twitterGot(baseUrl + gqlMap[endpoint], { - variables: JSON.stringify({ - ...variables, - userId, - }), + const params = { + variables: JSON.stringify({ ...variables, userId }), features: JSON.stringify(gqlFeatures[endpoint]), - }); - let instructions; - if (path) { - instructions = data; - for (const p of path) { - instructions = instructions[p]; + }; + + const fetchData = async () => { + if (config.twitter.thirdPartyApi) { + const { data } = await ofetch(`${config.twitter.thirdPartyApi}${gqlMap[endpoint]}`, { + method: 'GET', + params, + }); + return data; } - instructions = instructions.instructions; - } else { - if (data?.user?.result?.timeline_v2?.timeline?.instructions) { - instructions = data.user.result.timeline_v2.timeline.instructions; - } else { - // throw new Error('Because Twitter Premium has features that hide your likes, this RSS link is not available for Twitter Premium accounts.'); + const { data } = await twitterGot(baseUrl + gqlMap[endpoint], params); + return data; + }; + + const getInstructions = (data: any) => { + if (path) { + let instructions = data; + for (const p of path) { + instructions = instructions[p]; + } + return instructions.instructions; + } + + const instructions = data?.user?.result?.timeline_v2?.timeline?.instructions; + if (!instructions) { logger.debug(`twitter debug: instructions not found in data: ${JSON.stringify(data)}`); } + return instructions; + }; + + const data = await fetchData(); + const instructions = getInstructions(data); + if (!instructions) { + return []; } - const entries1 = instructions?.find((i) => i.type === 'TimelineAddToModule')?.moduleItems; // Media - const entries2 = instructions?.find((i) => i.type === 'TimelineAddEntries').entries; - return entries1 || entries2 || []; + const moduleItems = instructions.find((i) => i.type === 'TimelineAddToModule')?.moduleItems; + const entries = instructions.find((i) => i.type === 'TimelineAddEntries')?.entries; + + return moduleItems || entries || []; }; export function gatherLegacyFromData(entries: any[], filterNested?: string[], userId?: number | string) { diff --git a/lib/routes/twitter/user.ts b/lib/routes/twitter/user.ts index 277ba339b6f0566..eebff2a7b685b98 100644 --- a/lib/routes/twitter/user.ts +++ b/lib/routes/twitter/user.ts @@ -2,6 +2,7 @@ import { Route, ViewType } from '@/types'; import utils from './utils'; import api from './api'; import logger from '@/utils/logger'; +import { config } from '@/config'; export const route: Route = { path: '/user/:id/:routeParams?', @@ -45,7 +46,7 @@ export const route: Route = { supportScihub: false, }, name: 'User timeline', - maintainers: ['DIYgod', 'yindaheng98', 'Rongronggg9', 'CaoMeiYouRen'], + maintainers: ['DIYgod', 'yindaheng98', 'Rongronggg9', 'CaoMeiYouRen', 'pseudoyu'], handler, radar: [ { @@ -59,9 +60,15 @@ async function handler(ctx) { const id = ctx.req.param('id'); // For compatibility - const { count, exclude_replies, include_rts } = utils.parseRouteParams(ctx.req.param('routeParams')); + const { count, exclude_replies: initialExcludeReplies, include_rts } = utils.parseRouteParams(ctx.req.param('routeParams')); const params = count ? { count } : {}; + // Third party API does not support replies for now + let exclude_replies = initialExcludeReplies; + if (config.twitter.thirdPartyApi) { + exclude_replies = true; + } + await api.init(); const userInfo = await api.getUser(id); let data; From 8eb7abb8e2f0c9f61bc7077d6c54f7a6958338b4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 08:27:52 +0000 Subject: [PATCH 700/740] chore(deps): bump imapflow from 1.0.169 to 1.0.171 (#17817) Bumps [imapflow](https://github.com/postalsys/imapflow) from 1.0.169 to 1.0.171. - [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.169...v1.0.171) --- updated-dependencies: - dependency-name: imapflow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 72 ++++++-------------------------------------------- 2 files changed, 9 insertions(+), 65 deletions(-) diff --git a/package.json b/package.json index 998a7b6e8741419..bf4c75888bf5599 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", "iconv-lite": "0.6.3", - "imapflow": "1.0.169", + "imapflow": "1.0.171", "instagram-private-api": "1.46.1", "ioredis": "5.4.1", "ip-regex": "5.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d07da8ccaf6004f..8cc260766404e02 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.169 - version: 1.0.169 + specifier: 1.0.171 + version: 1.0.171 instagram-private-api: specifier: 1.46.1 version: 1.46.1 @@ -2876,14 +2876,6 @@ packages: enabled@2.0.0: resolution: {integrity: sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==} - encoding-japanese@2.0.0: - resolution: {integrity: sha512-++P0RhebUC8MJAwJOsT93dT+5oc5oPImp1HubZpAuCZ5kTLnhuuBhKHj2jJeO/Gj93idPBWmIuQ9QWMe5rX3pQ==} - engines: {node: '>=8.10.0'} - - encoding-japanese@2.1.0: - resolution: {integrity: sha512-58XySVxUgVlBikBTbQ8WdDxBDHIdXucB16LO5PBHR8t75D54wQrNo4cg+58+R1CtJfKnsVsvt9XlteRaR8xw1w==} - engines: {node: '>=8.10.0'} - encoding-japanese@2.2.0: resolution: {integrity: sha512-EuJWwlHPZ1LbADuKTClvHtwbaFn4rOD+dRAbWysqEOXRc2Uui0hJInNJrsdH0c+OhJA4nrCBdSkW4DD5YxAo6A==} engines: {node: '>=8.10.0'} @@ -3570,8 +3562,8 @@ packages: engines: {node: '>=6.9.0'} hasBin: true - imapflow@1.0.169: - resolution: {integrity: sha512-bPq5KyS6TgNX9rj+khGnIsfwREEvM0OIqnkOgIzz2i/duBHUk5erXYe3+bCMWT89p2WDDyIQeRjezQ5rDwob/Q==} + imapflow@1.0.171: + resolution: {integrity: sha512-4H33FkLk1bDBdfSF0uacFFHuha83S1F7njhskh20vO1CweZ+jO65f3SD47ZcoE9HEQ5SqeaEwCkiQPBPkjcIhw==} immediate@3.0.6: resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==} @@ -3899,27 +3891,12 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} - libbase64@1.2.1: - resolution: {integrity: sha512-l+nePcPbIG1fNlqMzrh68MLkX/gTxk/+vdvAb388Ssi7UuUN31MI44w4Yf33mM3Cm4xDfw48mdf3rkdHszLNew==} - libbase64@1.3.0: resolution: {integrity: sha512-GgOXd0Eo6phYgh0DJtjQ2tO8dc0IVINtZJeARPeiIJqge+HdsWSuaDTe8ztQ7j/cONByDZ3zeB325AHiv5O0dg==} - libmime@5.2.0: - resolution: {integrity: sha512-X2U5Wx0YmK0rXFbk67ASMeqYIkZ6E5vY7pNWRKtnNzqjvdYYG8xtPDpCnuUEnPU9vlgNev+JoSrcaKSUaNvfsw==} - - libmime@5.3.5: - resolution: {integrity: sha512-nSlR1yRZ43L3cZCiWEw7ali3jY29Hz9CQQ96Oy+sSspYnIP5N54ucOPHqooBsXzwrX1pwn13VUE05q4WmzfaLg==} - libmime@5.3.6: resolution: {integrity: sha512-j9mBC7eiqi6fgBPAGvKCXJKJSIASanYF4EeA4iBzSG0HxQxmXnR3KbyWqTn4CwsKSebqCv2f5XZfAO6sKzgvwA==} - libqp@2.0.1: - resolution: {integrity: sha512-Ka0eC5LkF3IPNQHJmYBWljJsw0UvM6j+QdKRbWyCdTmYwvIDE6a7bCm0UkTAL/K+3KXK5qXT/ClcInU01OpdLg==} - - libqp@2.1.0: - resolution: {integrity: sha512-O6O6/fsG5jiUVbvdgT7YX3xY3uIadR6wEZ7+vy9u7PKHAlSEB6blvC1o5pHBjgsi95Uo0aiBBdkyFecj6jtb7A==} - libqp@2.1.1: resolution: {integrity: sha512-0Wd+GPz1O134cP62YU2GTOPNA7Qgl09XwCqM5zpBv87ERCXdfDtyKXvV7c9U22yWJh44QZqBocFnXN11K96qow==} @@ -4060,9 +4037,6 @@ packages: mailparser@3.7.2: resolution: {integrity: sha512-iI0p2TCcIodR1qGiRoDBBwboSSff50vQAWytM5JRggLfABa4hHYCf3YVujtuzV454xrOP352VsAPIzviqMTo4Q==} - mailsplit@5.4.0: - resolution: {integrity: sha512-wnYxX5D5qymGIPYLwnp6h8n1+6P6vz/MJn5AzGjZ8pwICWssL+CCQjWBIToOVHASmATot4ktvlLo6CyLfOXWYA==} - mailsplit@5.4.2: resolution: {integrity: sha512-4cczG/3Iu3pyl8JgQ76dKkisurZTmxMrA4dj/e8d2jKYcFTZ7MxOzg1gTioTDMPuFXwTrVuN/gxhkrO7wLg7qA==} @@ -8411,10 +8385,6 @@ snapshots: enabled@2.0.0: {} - encoding-japanese@2.0.0: {} - - encoding-japanese@2.1.0: {} - encoding-japanese@2.2.0: {} encoding-sniffer@0.2.0: @@ -9318,14 +9288,14 @@ snapshots: image-size@0.7.5: {} - imapflow@1.0.169: + imapflow@1.0.171: dependencies: encoding-japanese: 2.2.0 iconv-lite: 0.6.3 libbase64: 1.3.0 - libmime: 5.3.5 - libqp: 2.1.0 - mailsplit: 5.4.0 + libmime: 5.3.6 + libqp: 2.1.1 + mailsplit: 5.4.2 nodemailer: 6.9.16 pino: 9.5.0 socks: 2.8.3 @@ -9663,24 +9633,8 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - libbase64@1.2.1: {} - libbase64@1.3.0: {} - libmime@5.2.0: - dependencies: - encoding-japanese: 2.0.0 - iconv-lite: 0.6.3 - libbase64: 1.2.1 - libqp: 2.0.1 - - libmime@5.3.5: - dependencies: - encoding-japanese: 2.1.0 - iconv-lite: 0.6.3 - libbase64: 1.3.0 - libqp: 2.1.0 - libmime@5.3.6: dependencies: encoding-japanese: 2.2.0 @@ -9688,10 +9642,6 @@ snapshots: libbase64: 1.3.0 libqp: 2.1.1 - libqp@2.0.1: {} - - libqp@2.1.0: {} - libqp@2.1.1: {} lie@3.1.1: @@ -9843,12 +9793,6 @@ snapshots: punycode.js: 2.3.1 tlds: 1.255.0 - mailsplit@5.4.0: - dependencies: - libbase64: 1.2.1 - libmime: 5.2.0 - libqp: 2.0.1 - mailsplit@5.4.2: dependencies: libbase64: 1.3.0 From 0d07768955d577e1df7ffb2a34ad2c34f03c758d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 08:28:12 +0000 Subject: [PATCH 701/740] chore(deps): bump hono from 4.6.12 to 4.6.13 (#17818) Bumps [hono](https://github.com/honojs/hono) from 4.6.12 to 4.6.13. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.6.12...v4.6.13) --- updated-dependencies: - dependency-name: hono dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 bf4c75888bf5599..f431216a434c8c6 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.12", + "hono": "4.6.13", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.6", "https-proxy-agent": "7.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8cc260766404e02..8a1139821ab0ee2 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.12) + version: 1.13.7(hono@4.6.13) '@hono/zod-openapi': specifier: 0.18.3 - version: 0.18.3(hono@4.6.12)(zod@3.23.8) + version: 0.18.3(hono@4.6.13)(zod@3.23.8) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -59,7 +59,7 @@ importers: version: 0.0.23 '@scalar/hono-api-reference': specifier: 0.5.163 - version: 0.5.163(hono@4.6.12) + version: 0.5.163(hono@4.6.13) '@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.12 - version: 4.6.12 + specifier: 4.6.13 + version: 4.6.13 html-to-text: specifier: 9.0.5 version: 9.0.5 @@ -3454,8 +3454,8 @@ packages: hmacsha1@1.0.0: resolution: {integrity: sha512-4FP6J0oI8jqb6gLLl9tSwVdosWJ/AKSGJ+HwYf6Ixe4MUcEkst4uWzpVQrNOCin0fzTRQbXV8ePheU8WiiDYBw==} - hono@4.6.12: - resolution: {integrity: sha512-eHtf4kSDNw6VVrdbd5IQi16r22m3s7mWPLd7xOMhg1a/Yyb1A0qpUFq8xYMX4FMuDe1nTKeMX5rTx7Nmw+a+Ag==} + hono@4.6.13: + resolution: {integrity: sha512-haV0gaMdSjy9URCRN9hxBPlqHa7fMm/T72kAImIxvw4eQLbNz1rgjN4hHElLJSieDiNuiIAXC//cC6YGz2KCbg==} engines: {node: '>=16.9.0'} hookable@5.5.3: @@ -6764,20 +6764,20 @@ snapshots: dependencies: levn: 0.4.1 - '@hono/node-server@1.13.7(hono@4.6.12)': + '@hono/node-server@1.13.7(hono@4.6.13)': dependencies: - hono: 4.6.12 + hono: 4.6.13 - '@hono/zod-openapi@0.18.3(hono@4.6.12)(zod@3.23.8)': + '@hono/zod-openapi@0.18.3(hono@4.6.13)(zod@3.23.8)': dependencies: '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.4.1(hono@4.6.12)(zod@3.23.8) - hono: 4.6.12 + '@hono/zod-validator': 0.4.1(hono@4.6.13)(zod@3.23.8) + hono: 4.6.13 zod: 3.23.8 - '@hono/zod-validator@0.4.1(hono@4.6.12)(zod@3.23.8)': + '@hono/zod-validator@0.4.1(hono@4.6.13)(zod@3.23.8)': dependencies: - hono: 4.6.12 + hono: 4.6.13 zod: 3.23.8 '@humanfs/core@0.19.1': {} @@ -7199,10 +7199,10 @@ snapshots: '@rss3/api-core': 0.0.23 '@rss3/api-utils': 0.0.23 - '@scalar/hono-api-reference@0.5.163(hono@4.6.12)': + '@scalar/hono-api-reference@0.5.163(hono@4.6.13)': dependencies: '@scalar/types': 0.0.23 - hono: 4.6.12 + hono: 4.6.13 '@scalar/openapi-types@0.1.5': {} @@ -9157,7 +9157,7 @@ snapshots: hmacsha1@1.0.0: {} - hono@4.6.12: {} + hono@4.6.13: {} hookable@5.5.3: {} From 5c3d6fa348907c340a8d49fa3ee24cf393054441 Mon Sep 17 00:00:00 2001 From: PangBo <51732678+pangbo13@users.noreply.github.com> Date: Sun, 8 Dec 2024 00:21:19 +0800 Subject: [PATCH 702/740] =?UTF-8?q?feat(route):=20=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E4=B8=8A=E6=B5=B7=E4=BA=A4=E9=80=9A=E5=A4=A7=E5=AD=A6=E6=95=99?= =?UTF-8?q?=E5=8A=A1=E5=A4=84=20=E9=9D=A2=E5=90=91=E5=AD=A6=E7=94=9F?= =?UTF-8?q?=E7=9A=84=E9=80=9A=E7=9F=A5=20=E8=B7=AF=E7=94=B1=20(#17823)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add `sjtu/jwc/students` * feat(route/sjtu/jwc): add description for /sjtu/jwc/students --- lib/routes/sjtu/jwc.ts | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/lib/routes/sjtu/jwc.ts b/lib/routes/sjtu/jwc.ts index 3930f8f6a29780d..8b5ab8691279fa2 100644 --- a/lib/routes/sjtu/jwc.ts +++ b/lib/routes/sjtu/jwc.ts @@ -4,7 +4,7 @@ import got from '@/utils/got'; import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; -const urlRoot = 'https://jwc.sjtu.edu.cn/xwtg'; +const urlRoot = 'https://jwc.sjtu.edu.cn'; async function getFullArticle(link) { const response = await got(link).catch(() => null); @@ -46,9 +46,9 @@ export const route: Route = { name: '教务处通知公告', maintainers: ['SeanChao'], handler, - description: `| 新闻中心 | 通知通告 | 教学运行 | 注册学务 | 研究办 | 教改办 | 综合办 | 语言文字 | 工会与支部 | 通识教育 | + description: `| 新闻中心 | 通知通告 | 教学运行 | 注册学务 | 研究办 | 教改办 | 综合办 | 语言文字 | 工会与支部 | 通识教育 | 面向学生的通知 | | -------- | -------- | --------- | -------- | ------ | ------ | ------ | -------- | ---------- | -------- | - | news | notice | operation | affairs | yjb | jgb | zhb | language | party | ge |`, + | news | notice | operation | affairs | yjb | jgb | zhb | language | party | ge | students |`, }; async function handler(ctx) { @@ -56,48 +56,52 @@ async function handler(ctx) { const config = { all: { section: '通知通告', - link: '/tztg.htm', + link: '/xwtg/tztg.htm', }, news: { - link: '/xwzx.htm', + link: '/xwtg/xwzx.htm', section: '新闻中心', }, notice: { - link: '/tztg.htm', + link: '/xwtg/tztg.htm', section: '通知通告', }, operation: { - link: '/jxyx.htm', + link: '/xwtg/jxyx.htm', section: '教学运行', }, affairs: { - link: '/zcxw.htm', + link: '/xwtg/zcxw.htm', section: '注册学务', }, yjb: { - link: '/yjb.htm', + link: '/xwtg/yjb.htm', section: '研究办', }, jgb: { - link: '/jgb.htm', + link: '/xwtg/jgb.htm', section: '教改办', }, zhb: { - link: '/zhb.htm', + link: '/xwtg/zhb.htm', section: '综合办', }, language: { - link: '/yywz.htm', + link: '/xwtg/yywz.htm', section: '语言文字', }, party: { - link: '/ghyzb.htm', + link: '/xwtg/ghyzb.htm', section: '工会与支部', }, ge: { - link: '/tsjy.htm', + link: '/xwtg/tsjy.htm', section: '通识教育', }, + students: { + link: '/index/mxxsdtz.htm', + section: '面向学生的通知', + }, }; const sectionLink = urlRoot + config[type].link; From 3b1de0dc9e91ba2109642b64b8ca5842366830a9 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Mon, 9 Dec 2024 09:48:29 +0800 Subject: [PATCH 703/740] =?UTF-8?q?feat(route):=20add=20=E6=B8=B8=E4=BE=A0?= =?UTF-8?q?=E7=BD=91=E8=B5=84=E8=AE=AF=20(#17815)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): add 游侠网资讯 * fix typo --- lib/routes/ali213/namespace.ts | 9 + lib/routes/ali213/news.ts | 269 ++++++++++++++++++++ lib/routes/ali213/templates/description.art | 21 ++ 3 files changed, 299 insertions(+) create mode 100644 lib/routes/ali213/namespace.ts create mode 100644 lib/routes/ali213/news.ts create mode 100644 lib/routes/ali213/templates/description.art diff --git a/lib/routes/ali213/namespace.ts b/lib/routes/ali213/namespace.ts new file mode 100644 index 000000000000000..14cec63452d6842 --- /dev/null +++ b/lib/routes/ali213/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '游侠网', + url: 'ali213.net', + categories: ['game'], + description: '', + lang: 'zh-CN', +}; diff --git a/lib/routes/ali213/news.ts b/lib/routes/ali213/news.ts new file mode 100644 index 000000000000000..2a1387b79669835 --- /dev/null +++ b/lib/routes/ali213/news.ts @@ -0,0 +1,269 @@ +import path from 'node:path'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; + +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<Data> => { + const { category = 'new' } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '30', 10); + + const rootUrl: string = 'https://www.ali213.net'; + const targetUrl: string = new URL(`news/${category.endsWith('/') ? category : `${category}/`}`, rootUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language: string = $('html').prop('lang') ?? 'zh-CN'; + + let items: DataItem[] = $('div.n_lone') + .slice(0, limit) + .toArray() + .map((item): DataItem => { + const $item: Cheerio<Element> = $(item); + + const aEl: Cheerio<Element> = $item.find('h2.lone_t a'); + + const title: string = aEl.prop('title') || aEl.text(); + const link: string | undefined = aEl.prop('href'); + + const imageEl: Cheerio<Element> = $item.find('img'); + const imageSrc: string | undefined = imageEl?.prop('src'); + const imageAlt: string | undefined = imageEl?.prop('alt'); + + const intro: string = $item.find('div.lone_f_r_t').text(); + + const description: string = art(path.join(__dirname, 'templates/description.art'), { + images: imageEl + ? [ + { + src: imageSrc, + alt: imageAlt, + }, + ] + : undefined, + intro, + }); + + const author: DataItem['author'] = $item.find('div.lone_f_r_f span').last().text().split(/:/).pop(); + + return { + title, + description, + pubDate: parseDate($item.find('div.lone_f_r_f span').first().text()), + link, + author, + content: { + html: description, + text: $item.find('div.lone_f_r_t').text(), + }, + image: imageSrc, + banner: imageSrc, + language, + }; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link && typeof item.link !== 'string') { + return item; + } + + return cache.tryGet(item.link, async (): Promise<DataItem> => { + try { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + const title: string = $$('h1.newstit').text(); + const image: string | undefined = $$('div#Content img').first().prop('src'); + + const mediaContent: Cheerio<Element> = $$('div#Content p span img'); + const media: Record<string, Record<string, string>> = {}; + + if (mediaContent.length) { + mediaContent.each((_, el) => { + const $$el: Cheerio<Element> = $$(el); + + const pEl: Cheerio<Element> = $$el.closest('p'); + + const mediaUrl: string | undefined = $$el.prop('src'); + const mediaType: string | undefined = mediaUrl?.split(/\./).pop(); + + if (mediaType && mediaUrl) { + media[mediaType] = { url: mediaUrl }; + + pEl.replaceWith( + art(path.join(__dirname, 'templates/description.art'), { + images: [ + { + src: mediaUrl, + }, + ], + }) + ); + } + }); + } + + const description: string = art(path.join(__dirname, 'templates/description.art'), { + description: $$('div#Content').html() ?? '', + }); + + const extraLinks = $$('div.extend_read ul li a') + .toArray() + .map((el) => { + const $$el: Cheerio<Element> = $$(el); + + return { + url: $$el.prop('href'), + type: 'related', + content_html: $$el.prop('title') || $$el.text(), + }; + }) + .filter((_): _ is { url: string; type: string; content_html: string } => true); + + return { + title, + description, + pubDate: timezone(parseDate($$('div.newstag_l').text().split(/\s/)[0]), +8), + author: item.author, + content: { + html: description, + text: $$('div#Content').html() ?? '', + }, + image, + banner: image, + language, + media: Object.keys(media).length > 0 ? media : undefined, + _extra: { + links: extraLinks.length > 0 ? extraLinks : undefined, + }, + }; + } catch { + return item; + } + }); + }) + ) + ).filter((_): _ is DataItem => true); + + const author = '游侠网'; + const title = $('div.news-list-title').text(); + const feedImage = new URL('news/images/ali213_app_big.png', rootUrl).href; + + return { + title: `${author} - ${title}`, + description: title, + link: targetUrl, + item: items, + allowEmpty: true, + image: feedImage, + author, + language, + id: targetUrl, + }; +}; + +export const route: Route = { + path: '/news/:category?', + name: '资讯', + url: 'www.ali213.net', + maintainers: ['nczitzk'], + handler, + example: '/ali213/news/new', + parameters: { + category: '分类,默认为 `new`,即最新资讯,可在对应分类页 URL 中找到', + }, + description: `:::tip +若订阅 [游戏资讯](https://www.ali213.net/news/game/),网址为 \`https://www.ali213.net/news/game/\`,请截取 \`https://www.ali213.net/news/\` 到末尾 \`/\` 的部分 \`game\` 作为 \`category\` 参数填入,此时目标路由为 [\`/ali213/news/game\`](https://rsshub.app/ali213/news/game)。 +::: + +| 分类名称 | 分类 ID | +| -------- | ------- | +| 最新资讯 | new | +| 评测 | pingce | +| 游戏 | game | +| 动漫 | comic | +| 影视 | movie | +| 科技 | tech | +| 电竞 | esports | +| 娱乐 | amuse | +| 手游 | mobile | +`, + categories: ['game'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.ali213.net/news/:category'], + target: (params) => { + const category = params.category; + + return `/news/${category ? `/${category}` : ''}`; + }, + }, + { + title: '最新资讯', + source: ['www.ali213.net/news/new'], + target: '/news/new', + }, + { + title: '评测', + source: ['www.ali213.net/news/pingce'], + target: '/news/pingce', + }, + { + title: '游戏', + source: ['www.ali213.net/news/game'], + target: '/news/game', + }, + { + title: '动漫', + source: ['www.ali213.net/news/comic'], + target: '/news/comic', + }, + { + title: '影视', + source: ['www.ali213.net/news/movie'], + target: '/news/movie', + }, + { + title: '科技', + source: ['www.ali213.net/news/tech'], + target: '/news/tech', + }, + { + title: '电竞', + source: ['www.ali213.net/news/esports'], + target: '/news/esports', + }, + { + title: '娱乐', + source: ['www.ali213.net/news/amuse'], + target: '/news/amuse', + }, + { + title: '手游', + source: ['www.ali213.net/news/mobile'], + target: '/news/mobile', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/ali213/templates/description.art b/lib/routes/ali213/templates/description.art new file mode 100644 index 000000000000000..249654e7e618a4a --- /dev/null +++ b/lib/routes/ali213/templates/description.art @@ -0,0 +1,21 @@ +{{ if images }} + {{ each images image }} + {{ if image?.src }} + <figure> + <img + {{ if image.alt }} + alt="{{ image.alt }}" + {{ /if }} + src="{{ image.src }}"> + </figure> + {{ /if }} + {{ /each }} +{{ /if }} + +{{ if intro }} + <blockquote>{{ intro }}</blockquote> +{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file From 4af0c75d0594e91ad9b0cc7714d3697a7fc3faea Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 08:27:48 +0000 Subject: [PATCH 704/740] chore(deps): bump tldts from 6.1.65 to 6.1.66 (#17829) Bumps [tldts](https://github.com/remusao/tldts) from 6.1.65 to 6.1.66. - [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.65...v6.1.66) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 f431216a434c8c6..ea79fc9b7439db3 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "telegram": "2.26.8", "tiny-async-pool": "2.1.0", "title": "4.0.1", - "tldts": "6.1.65", + "tldts": "6.1.66", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8a1139821ab0ee2..aa2950ee5ce425f 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.65 - version: 6.1.65 + specifier: 6.1.66 + version: 6.1.66 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5255,11 +5255,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.65: - resolution: {integrity: sha512-Uq5t0N0Oj4nQSbU8wFN1YYENvMthvwU13MQrMJRspYCGLSAZjAfoBOJki5IQpnBM/WFskxxC/gIOTwaedmHaSg==} + tldts-core@6.1.66: + resolution: {integrity: sha512-s07jJruSwndD2X8bVjwioPfqpIc1pDTzszPe9pL1Skbh4bjytL85KNQ3tolqLbCvpQHawIsGfFi9dgerWjqW4g==} - tldts@6.1.65: - resolution: {integrity: sha512-xU9gLTfAGsADQ2PcWee6Hg8RFAv0DnjMGVJmDnUmI8a9+nYmapMQix4afwrdaCtT+AqP4MaxEzu7cCrYmBPbzQ==} + tldts@6.1.66: + resolution: {integrity: sha512-l3ciXsYFel/jSRfESbyKYud1nOw7WfhrBEF9I3UiarYk/qEaOOwu3qXNECHw4fHGHGTEOuhf/VdKgoDX5M/dhQ==} hasBin: true tmp@0.0.33: @@ -11161,11 +11161,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.65: {} + tldts-core@6.1.66: {} - tldts@6.1.65: + tldts@6.1.66: dependencies: - tldts-core: 6.1.65 + tldts-core: 6.1.66 tmp@0.0.33: dependencies: @@ -11201,7 +11201,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.65 + tldts: 6.1.66 tr46@0.0.3: {} From 95c71c5988759535fb51d5e9e221843419a9486c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 08:28:05 +0000 Subject: [PATCH 705/740] chore(deps): bump socks-proxy-agent from 8.0.4 to 8.0.5 (#17833) Bumps [socks-proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/HEAD/packages/socks-proxy-agent) from 8.0.4 to 8.0.5. - [Release notes](https://github.com/TooTallNate/proxy-agents/releases) - [Changelog](https://github.com/TooTallNate/proxy-agents/blob/main/packages/socks-proxy-agent/CHANGELOG.md) - [Commits](https://github.com/TooTallNate/proxy-agents/commits/socks-proxy-agent@8.0.5/packages/socks-proxy-agent) --- updated-dependencies: - dependency-name: socks-proxy-agent dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index ea79fc9b7439db3..c5f3a7cb41cc4d1 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "rss-parser": "3.13.0", "sanitize-html": "2.13.1", "simplecc-wasm": "1.1.0", - "socks-proxy-agent": "8.0.4", + "socks-proxy-agent": "8.0.5", "source-map": "0.7.4", "telegram": "2.26.8", "tiny-async-pool": "2.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa2950ee5ce425f..6f00e9a7e8088c4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -226,8 +226,8 @@ importers: specifier: 1.1.0 version: 1.1.0 socks-proxy-agent: - specifier: 8.0.4 - version: 8.0.4 + specifier: 8.0.5 + version: 8.0.5 source-map: specifier: 0.7.4 version: 0.7.4 @@ -2154,6 +2154,10 @@ packages: resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} engines: {node: '>= 14'} + agent-base@7.1.3: + resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} + engines: {node: '>= 14'} + ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} @@ -5009,8 +5013,8 @@ packages: resolution: {integrity: sha512-CjU5pyRfwOtaOITYv5C8DzpZ8XA/ieRsDpr93HI2r6e3YInC6moZpSQbmUtg8cTk58tq2x3jcG2gv+p1IZGmMA==} engines: {node: '>=8'} - socks-proxy-agent@8.0.4: - resolution: {integrity: sha512-GNAq/eg8Udq2x0eNiFkr9gRg5bA7PXEWagQdeRX4cPSG+X/8V38v637gim9bjFptMk1QWsCTr0ttrJEiXbNnRw==} + socks-proxy-agent@8.0.5: + resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==} engines: {node: '>= 14'} socks@2.8.3: @@ -7657,6 +7661,8 @@ snapshots: transitivePeerDependencies: - supports-color + agent-base@7.1.3: {} + ajv@6.12.6: dependencies: fast-deep-equal: 3.1.3 @@ -10305,7 +10311,7 @@ snapshots: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 pac-resolver: 7.0.1 - socks-proxy-agent: 8.0.4 + socks-proxy-agent: 8.0.5 transitivePeerDependencies: - supports-color @@ -10483,14 +10489,14 @@ snapshots: lru-cache: 7.18.3 pac-proxy-agent: 7.0.2 proxy-from-env: 1.1.0 - socks-proxy-agent: 8.0.4 + socks-proxy-agent: 8.0.5 transitivePeerDependencies: - supports-color proxy-chain@2.5.6: dependencies: socks: 2.8.3 - socks-proxy-agent: 8.0.4 + socks-proxy-agent: 8.0.5 tslib: 2.8.1 transitivePeerDependencies: - supports-color @@ -10895,9 +10901,9 @@ snapshots: map-obj: 4.3.0 to-snake-case: 1.0.0 - socks-proxy-agent@8.0.4: + socks-proxy-agent@8.0.5: dependencies: - agent-base: 7.1.1 + agent-base: 7.1.3 debug: 4.3.7 socks: 2.8.3 transitivePeerDependencies: From 503a779091b36f4fa2fda3b6c4333d238aeb5e18 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 08:34:19 +0000 Subject: [PATCH 706/740] chore(deps): bump https-proxy-agent from 7.0.5 to 7.0.6 (#17834) Bumps [https-proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/HEAD/packages/https-proxy-agent) from 7.0.5 to 7.0.6. - [Release notes](https://github.com/TooTallNate/proxy-agents/releases) - [Changelog](https://github.com/TooTallNate/proxy-agents/blob/main/packages/https-proxy-agent/CHANGELOG.md) - [Commits](https://github.com/TooTallNate/proxy-agents/commits/https-proxy-agent@7.0.6/packages/https-proxy-agent) --- updated-dependencies: - dependency-name: https-proxy-agent dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index c5f3a7cb41cc4d1..7dfeb554e9aa065 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "hono": "4.6.13", "html-to-text": "9.0.5", "http-cookie-agent": "6.0.6", - "https-proxy-agent": "7.0.5", + "https-proxy-agent": "7.0.6", "iconv-lite": "0.6.3", "imapflow": "1.0.171", "instagram-private-api": "1.46.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6f00e9a7e8088c4..92cfa7943147e79 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -127,8 +127,8 @@ importers: specifier: 6.0.6 version: 6.0.6(tough-cookie@5.0.0)(undici@6.21.0) https-proxy-agent: - specifier: 7.0.5 - version: 7.0.5 + specifier: 7.0.6 + version: 7.0.6 iconv-lite: specifier: 0.6.3 version: 0.6.3 @@ -3529,8 +3529,8 @@ packages: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} engines: {node: '>= 6'} - https-proxy-agent@7.0.5: - resolution: {integrity: sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==} + https-proxy-agent@7.0.6: + resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} engines: {node: '>= 14'} human-signals@5.0.0: @@ -8972,7 +8972,7 @@ snapshots: gaxios@6.7.1: dependencies: extend: 3.0.2 - https-proxy-agent: 7.0.5 + https-proxy-agent: 7.0.6 is-stream: 2.0.1 node-fetch: 2.7.0 uuid: 9.0.1 @@ -9236,7 +9236,7 @@ snapshots: http-proxy-agent@7.0.2: dependencies: - agent-base: 7.1.1 + agent-base: 7.1.3 debug: 4.3.7 transitivePeerDependencies: - supports-color @@ -9265,9 +9265,9 @@ snapshots: transitivePeerDependencies: - supports-color - https-proxy-agent@7.0.5: + https-proxy-agent@7.0.6: dependencies: - agent-base: 7.1.1 + agent-base: 7.1.3 debug: 4.3.7 transitivePeerDependencies: - supports-color @@ -9534,7 +9534,7 @@ snapshots: form-data: 4.0.1 html-encoding-sniffer: 4.0.0 http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.5 + https-proxy-agent: 7.0.6 is-potential-custom-element-name: 1.0.1 nwsapi: 2.2.13 parse5: 7.2.1 @@ -10309,7 +10309,7 @@ snapshots: debug: 4.3.7 get-uri: 6.0.3 http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.5 + https-proxy-agent: 7.0.6 pac-resolver: 7.0.1 socks-proxy-agent: 8.0.5 transitivePeerDependencies: @@ -10482,10 +10482,10 @@ snapshots: proxy-agent@6.4.0: dependencies: - agent-base: 7.1.1 + agent-base: 7.1.3 debug: 4.3.7 http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.5 + https-proxy-agent: 7.0.6 lru-cache: 7.18.3 pac-proxy-agent: 7.0.2 proxy-from-env: 1.1.0 From c70fda5b99e6b6fee098dfac0c9d49dd581e30cb Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Mon, 9 Dec 2024 18:17:11 +0800 Subject: [PATCH 707/740] feat(route/twitter): support tweets with replies --- lib/routes/twitter/user.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lib/routes/twitter/user.ts b/lib/routes/twitter/user.ts index eebff2a7b685b98..137d70687de07b8 100644 --- a/lib/routes/twitter/user.ts +++ b/lib/routes/twitter/user.ts @@ -2,7 +2,6 @@ import { Route, ViewType } from '@/types'; import utils from './utils'; import api from './api'; import logger from '@/utils/logger'; -import { config } from '@/config'; export const route: Route = { path: '/user/:id/:routeParams?', @@ -60,15 +59,9 @@ async function handler(ctx) { const id = ctx.req.param('id'); // For compatibility - const { count, exclude_replies: initialExcludeReplies, include_rts } = utils.parseRouteParams(ctx.req.param('routeParams')); + const { count, exclude_replies, include_rts } = utils.parseRouteParams(ctx.req.param('routeParams')); const params = count ? { count } : {}; - // Third party API does not support replies for now - let exclude_replies = initialExcludeReplies; - if (config.twitter.thirdPartyApi) { - exclude_replies = true; - } - await api.init(); const userInfo = await api.getUser(id); let data; From 43f635d389af8b3710672498f62e020feddef2c8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 04:29:17 -0800 Subject: [PATCH 708/740] chore(deps-dev): bump @stylistic/eslint-plugin from 2.11.0 to 2.12.0 (#17831) Bumps [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin) from 2.11.0 to 2.12.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/v2.12.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@stylistic/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 77 ++++---------------------------------------------- 2 files changed, 7 insertions(+), 72 deletions(-) diff --git a/package.json b/package.json index 7dfeb554e9aa065..18a46fda6dd1151 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "@eslint/eslintrc": "3.2.0", "@eslint/js": "9.16.0", "@microsoft/eslint-formatter-sarif": "3.1.0", - "@stylistic/eslint-plugin": "2.11.0", + "@stylistic/eslint-plugin": "2.12.0", "@types/aes-js": "3.1.4", "@types/babel__preset-env": "7.9.7", "@types/crypto-js": "4.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 92cfa7943147e79..d653f8bdbdd9385 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.11.0 - version: 2.11.0(eslint@9.16.0)(typescript@5.7.2) + specifier: 2.12.0 + version: 2.12.0(eslint@9.16.0)(typescript@5.7.2) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -1826,8 +1826,8 @@ packages: resolution: {integrity: sha512-QWLl2P+rsCJeofkDNIT3WFmb6NrRud1SUYW8dIhXK/46XFV8Q/g7Bsvib0Askb0reRLe+WYPeeE+l5cH7SlkuQ==} engines: {node: '>=18'} - '@stylistic/eslint-plugin@2.11.0': - resolution: {integrity: sha512-PNRHbydNG5EH8NK4c+izdJlxajIR6GxcUhzsYNRsn6Myep4dsZt0qFCz3rCPnkvgO5FYibDcMqgNHUT+zvjYZw==} + '@stylistic/eslint-plugin@2.12.0': + resolution: {integrity: sha512-IvD2WXbOoSp0zNpyYbjdSyEjZtut78RYfj2WIlbChE7HFuposTK5X1hc5+4AyqYcjLXYdD5oo/sJtqMGFNRb1w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' @@ -2011,10 +2011,6 @@ packages: typescript: optional: true - '@typescript-eslint/scope-manager@8.14.0': - resolution: {integrity: sha512-aBbBrnW9ARIDn92Zbo7rguLnqQ/pOrUguVpbUwzOhkFg2npFDwTgPGqFqE0H5feXcOoJOfX3SxlJaKEVtq54dw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.17.0': resolution: {integrity: sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2029,23 +2025,10 @@ packages: typescript: optional: true - '@typescript-eslint/types@8.14.0': - resolution: {integrity: sha512-yjeB9fnO/opvLJFAsPNYlKPnEM8+z4og09Pk504dkqonT02AyL5Z9SSqlE0XqezS93v6CXn49VHvB2G7XSsl0g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.17.0': resolution: {integrity: sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.14.0': - resolution: {integrity: sha512-OPXPLYKGZi9XS/49rdaCbR5j/S14HazviBlUQFvSKz3npr3NikF+mrgK7CFVur6XEt95DZp/cmke9d5i3vtVnQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.17.0': resolution: {integrity: sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2055,12 +2038,6 @@ packages: typescript: optional: true - '@typescript-eslint/utils@8.14.0': - resolution: {integrity: sha512-OGqj6uB8THhrHj0Fk27DcHPojW7zKwKkPmHXHvQ58pLYp4hy8CSUdTKykKeh+5vFqTTVmjz0zCOOPKRovdsgHA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/utils@8.17.0': resolution: {integrity: sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2071,10 +2048,6 @@ packages: typescript: optional: true - '@typescript-eslint/visitor-keys@8.14.0': - resolution: {integrity: sha512-vG0XZo8AdTH9OE6VFRwAZldNc7qtJ/6NLGWak+BtENuEUXGZgFpihILPiBvKXvJ2nFu27XNGC6rKiwuaoMbYzQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.17.0': resolution: {integrity: sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7258,9 +7231,9 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.11.0(eslint@9.16.0)(typescript@5.7.2)': + '@stylistic/eslint-plugin@2.12.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/utils': 8.14.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2) eslint: 9.16.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 @@ -7461,11 +7434,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.14.0': - dependencies: - '@typescript-eslint/types': 8.14.0 - '@typescript-eslint/visitor-keys': 8.14.0 - '@typescript-eslint/scope-manager@8.17.0': dependencies: '@typescript-eslint/types': 8.17.0 @@ -7483,25 +7451,8 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.14.0': {} - '@typescript-eslint/types@8.17.0': {} - '@typescript-eslint/typescript-estree@8.14.0(typescript@5.7.2)': - dependencies: - '@typescript-eslint/types': 8.14.0 - '@typescript-eslint/visitor-keys': 8.14.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.7.2) - optionalDependencies: - typescript: 5.7.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.17.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 8.17.0 @@ -7517,17 +7468,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.14.0(eslint@9.16.0)(typescript@5.7.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) - '@typescript-eslint/scope-manager': 8.14.0 - '@typescript-eslint/types': 8.14.0 - '@typescript-eslint/typescript-estree': 8.14.0(typescript@5.7.2) - eslint: 9.16.0 - transitivePeerDependencies: - - supports-color - - typescript - '@typescript-eslint/utils@8.17.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) @@ -7540,11 +7480,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.14.0': - dependencies: - '@typescript-eslint/types': 8.14.0 - eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.17.0': dependencies: '@typescript-eslint/types': 8.17.0 From 134d114ffaf60ce54301f8e80d3d1311c86742f1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 04:30:50 -0800 Subject: [PATCH 709/740] chore(deps-dev): bump vite-tsconfig-paths from 5.1.3 to 5.1.4 (#17830) Bumps [vite-tsconfig-paths](https://github.com/aleclarson/vite-tsconfig-paths) from 5.1.3 to 5.1.4. - [Release notes](https://github.com/aleclarson/vite-tsconfig-paths/releases) - [Commits](https://github.com/aleclarson/vite-tsconfig-paths/compare/v5.1.3...v5.1.4) --- updated-dependencies: - dependency-name: vite-tsconfig-paths dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 18a46fda6dd1151..d227fcd53761504 100644 --- a/package.json +++ b/package.json @@ -193,7 +193,7 @@ "supertest": "7.0.0", "typescript": "5.7.2", "unified": "11.0.5", - "vite-tsconfig-paths": "5.1.3", + "vite-tsconfig-paths": "5.1.4", "vitest": "2.0.5", "yaml-eslint-parser": "1.2.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d653f8bdbdd9385..29d63cd818ca37f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -440,8 +440,8 @@ importers: specifier: 11.0.5 version: 11.0.5 vite-tsconfig-paths: - specifier: 5.1.3 - version: 5.1.3(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.1)) + specifier: 5.1.4 + version: 5.1.4(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.1)) vitest: specifier: 2.0.5 version: 2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) @@ -5516,8 +5516,8 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-tsconfig-paths@5.1.3: - resolution: {integrity: sha512-0bz+PDlLpGfP2CigeSKL9NFTF1KtXkeHGZSSaGQSuPZH77GhoiQaA8IjYgOaynSuwlDTolSUEU0ErVvju3NURg==} + vite-tsconfig-paths@5.1.4: + resolution: {integrity: sha512-cYj0LRuLV2c2sMqhqhGpaO3LretdtMn/BVX4cPLanIZuwwrkVl+lK84E/miEXkCHWXuq65rhNN4rXsBcOB3S4w==} peerDependencies: vite: '*' peerDependenciesMeta: @@ -11353,7 +11353,7 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.3(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.1)): + vite-tsconfig-paths@5.1.4(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.1)): dependencies: debug: 4.3.7 globrex: 0.1.2 From 74f50c3154ad39eb3e6f3ba1cc517a6a3c496b20 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 21:04:32 +0800 Subject: [PATCH 710/740] chore(deps): bump pac-proxy-agent from 7.0.2 to 7.1.0 (#17835) Bumps [pac-proxy-agent](https://github.com/TooTallNate/proxy-agents/tree/HEAD/packages/pac-proxy-agent) from 7.0.2 to 7.1.0. - [Release notes](https://github.com/TooTallNate/proxy-agents/releases) - [Changelog](https://github.com/TooTallNate/proxy-agents/blob/main/packages/pac-proxy-agent/CHANGELOG.md) - [Commits](https://github.com/TooTallNate/proxy-agents/commits/pac-proxy-agent@7.1.0/packages/pac-proxy-agent) --- updated-dependencies: - dependency-name: pac-proxy-agent dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 d227fcd53761504..9430935074421d1 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "oauth-1.0a": "2.2.6", "ofetch": "1.4.1", "otplib": "12.0.1", - "pac-proxy-agent": "7.0.2", + "pac-proxy-agent": "7.1.0", "proxy-chain": "2.5.6", "puppeteer": "22.6.2", "puppeteer-extra": "3.3.6", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 29d63cd818ca37f..8e27b13d2b34f66 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -184,8 +184,8 @@ importers: specifier: 12.0.1 version: 12.0.1 pac-proxy-agent: - specifier: 7.0.2 - version: 7.0.2 + specifier: 7.1.0 + version: 7.1.0 proxy-chain: specifier: 2.5.6 version: 2.5.6 @@ -4443,8 +4443,8 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} - pac-proxy-agent@7.0.2: - resolution: {integrity: sha512-BFi3vZnO9X5Qt6NRz7ZOaPja3ic0PhlsmCRYLOpN11+mWBCR6XJDqW5RF3j8jm4WGGQZtBA+bTfxYzeKW73eHg==} + pac-proxy-agent@7.1.0: + resolution: {integrity: sha512-Z5FnLVVZSnX7WjBg0mhDtydeRZ1xMcATZThjySQUHqr+0ksP8kqaw23fNKkaaN/Z8gwLUs/W7xdl0I75eP2Xyw==} engines: {node: '>= 14'} pac-resolver@7.0.1: @@ -10237,10 +10237,10 @@ snapshots: p-try@2.2.0: {} - pac-proxy-agent@7.0.2: + pac-proxy-agent@7.1.0: dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 - agent-base: 7.1.1 + agent-base: 7.1.3 debug: 4.3.7 get-uri: 6.0.3 http-proxy-agent: 7.0.2 @@ -10422,7 +10422,7 @@ snapshots: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 lru-cache: 7.18.3 - pac-proxy-agent: 7.0.2 + pac-proxy-agent: 7.1.0 proxy-from-env: 1.1.0 socks-proxy-agent: 8.0.5 transitivePeerDependencies: From 8434009b734149ba85875b3626737b48763c7055 Mon Sep 17 00:00:00 2001 From: Tony <TonyRL@users.noreply.github.com> Date: Mon, 9 Dec 2024 13:33:28 -0800 Subject: [PATCH 711/740] fix(route/sohu): add image URL decryption for fetched articles (#17837) --- lib/routes/sohu/mp.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/routes/sohu/mp.ts b/lib/routes/sohu/mp.ts index 92bd976515d4920..b720719a38ebc7c 100644 --- a/lib/routes/sohu/mp.ts +++ b/lib/routes/sohu/mp.ts @@ -8,6 +8,7 @@ import * as cheerio from 'cheerio'; import { parseDate } from '@/utils/parse-date'; import path from 'node:path'; import { art } from '@/utils/render'; +import CryptoJS from 'crypto-js'; export const route: Route = { path: '/mp/:xpt', @@ -39,6 +40,15 @@ function randomString(length = 32) { } const defaultSUV = '1612268936507kas0gk'; +function decryptImageUrl(cipherText) { + const key = CryptoJS.enc.Utf8.parse('www.sohu.com6666'); + const cipher = CryptoJS.AES.decrypt(cipherText, key, { + mode: CryptoJS.mode.ECB, + padding: CryptoJS.pad.Pkcs7, + }); + return cipher.toString(CryptoJS.enc.Utf8); +} + function fetchArticle(item) { return cache.tryGet(item.link, async () => { const response = await ofetch(item.link); @@ -64,6 +74,13 @@ function fetchArticle(item) { article.find('#backsohucom, p[data-role="editor-name"]').each((i, e) => { $(e).remove(); }); + article.find('img').each((_, e) => { + const $e = $(e); + if ($e.attr('data-src') && !$e.attr('src')) { + $e.attr('src', decryptImageUrl($e.attr('data-src'))); + $e.removeAttr('data-src'); + } + }); item.description = article.html(); } From 17e2fc729d52d17ba8b07988ae168cc3c956fdc7 Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:30:42 +0800 Subject: [PATCH 712/740] feat(route/github): enhance /repos route with optional parameters for type, sort, and direction (#17827) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route/github): enhance /repos route with optional parameters for type, sort, and direction - Updated the route to accept optional parameters: type, sort, and direction. - Added filtering logic for repository types: all, owner, member, public, private, forks, and sources. - Improved documentation for parameters to clarify usage. * refactor(github): 优化仓库路由参数配置 - 移除 `direction` 参数,简化排序逻辑 - 更新路由路径以匹配简化后的参数 --- lib/routes/github/repos.ts | 47 ++++++++++++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/lib/routes/github/repos.ts b/lib/routes/github/repos.ts index 57e02e3ec704d8c..edf19af5c40dbc8 100644 --- a/lib/routes/github/repos.ts +++ b/lib/routes/github/repos.ts @@ -1,13 +1,16 @@ import { Route } from '@/types'; import got from '@/utils/got'; import { config } from '@/config'; -import queryString from 'query-string'; export const route: Route = { - path: '/repos/:user', + path: '/repos/:user/:type?/:sort?', categories: ['programming'], example: '/github/repos/DIYgod', - parameters: { user: 'GitHub username' }, + parameters: { + user: 'GitHub username', + type: 'Type of repository, can be `all`, `owner`, `member`, `public`, `private`, `forks`, `sources`', + sort: 'Sort by `created`, `updated`, `pushed`, `full_name`', + }, features: { requireConfig: false, requirePuppeteer: false, @@ -28,20 +31,44 @@ export const route: Route = { async function handler(ctx) { const user = ctx.req.param('user'); - - const headers = {}; + const type = ctx.req.param('type') || 'all'; + const sort = ctx.req.param('sort') || 'created'; + let headers = {}; if (config.github && config.github.access_token) { - headers.Authorization = `token ${config.github.access_token}`; + headers = { + ...headers, + Authorization: `token ${config.github.access_token}`, + }; } const response = await got({ method: 'get', url: `https://api.github.com/users/${user}/repos`, - searchParams: queryString.stringify({ - sort: 'created', - }), + searchParams: { + type, + sort, + }, headers, }); - const data = response.data; + const data = response.data.filter((item) => { + switch (type) { + case 'all': + return true; + case 'owner': + return item.owner.login === user; + case 'member': + return item.owner.login !== user; + case 'public': + return item.private === false; + case 'private': + return item.private === true; + case 'forks': + return item.fork === true; + case 'sources': + return item.fork === false; + default: + return true; + } + }); return { allowEmpty: true, title: `${user}'s GitHub repositories`, From 844e6580083202341b1795cf6158458c37852160 Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Tue, 10 Dec 2024 11:29:59 +0800 Subject: [PATCH 713/740] feat(route/twitter): only apply third-party api supported routes --- lib/routes/twitter/api/web-api/constants.ts | 4 +++- lib/routes/twitter/api/web-api/utils.ts | 4 ++-- lib/routes/twitter/keyword.ts | 6 +++++- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/routes/twitter/api/web-api/constants.ts b/lib/routes/twitter/api/web-api/constants.ts index 059dc0f85de4963..ade5b768c35c38b 100644 --- a/lib/routes/twitter/api/web-api/constants.ts +++ b/lib/routes/twitter/api/web-api/constants.ts @@ -15,6 +15,8 @@ const graphQLEndpointsPlain = [ const gqlMap = Object.fromEntries(graphQLEndpointsPlain.map((endpoint) => [endpoint.split('/')[3].replace(/V2$|Query$|QueryV2$/, ''), endpoint])); +const thirdPartySupportedAPI = ['UserByScreenName', 'UserByRestId', 'UserTweets', 'UserTweetsAndReplies']; + const gqlFeatureUser = { hidden_profile_subscriptions_enabled: true, rweb_tipjar_consumption_enabled: true, @@ -112,4 +114,4 @@ const timelineParams = { const bearerToken = 'Bearer AAAAAAAAAAAAAAAAAAAAANRILgAAAAAAnNwIzUejRCOuH5E6I8xnZz4puTs%3D1Zv7ttfk8LF81IUq16cHjhLTvJu4FA33AGWWjCpTnA'; -export { baseUrl, gqlMap, gqlFeatures, timelineParams, bearerToken }; +export { baseUrl, gqlMap, gqlFeatures, timelineParams, bearerToken, thirdPartySupportedAPI }; diff --git a/lib/routes/twitter/api/web-api/utils.ts b/lib/routes/twitter/api/web-api/utils.ts index a8632757ddb09f2..1a34023c123b952 100644 --- a/lib/routes/twitter/api/web-api/utils.ts +++ b/lib/routes/twitter/api/web-api/utils.ts @@ -1,5 +1,5 @@ import ConfigNotFoundError from '@/errors/types/config-not-found'; -import { baseUrl, gqlFeatures, bearerToken, gqlMap } from './constants'; +import { baseUrl, gqlFeatures, bearerToken, gqlMap, thirdPartySupportedAPI } from './constants'; import { config } from '@/config'; import queryString from 'query-string'; import { Cookie, CookieJar } from 'tough-cookie'; @@ -228,7 +228,7 @@ export const paginationTweets = async (endpoint: string, userId: number | undefi }; const fetchData = async () => { - if (config.twitter.thirdPartyApi) { + if (config.twitter.thirdPartyApi && thirdPartySupportedAPI.includes(endpoint)) { const { data } = await ofetch(`${config.twitter.thirdPartyApi}${gqlMap[endpoint]}`, { method: 'GET', params, diff --git a/lib/routes/twitter/keyword.ts b/lib/routes/twitter/keyword.ts index 990ead5a4d77305..596ff5b9312d174 100644 --- a/lib/routes/twitter/keyword.ts +++ b/lib/routes/twitter/keyword.ts @@ -22,6 +22,10 @@ export const route: Route = { name: 'TWITTER_AUTH_TOKEN', description: 'Please see above for details.', }, + { + name: 'TWITTER_THIRD_PARTY_API', + description: 'Please see above for details.', + }, ], requirePuppeteer: false, antiCrawler: false, @@ -30,7 +34,7 @@ export const route: Route = { supportScihub: false, }, name: 'Keyword', - maintainers: ['DIYgod', 'yindaheng98', 'Rongronggg9'], + maintainers: ['DIYgod', 'yindaheng98', 'Rongronggg9', 'pseudoyu'], handler, radar: [ { From b17d3605c89eec1caab406ec8ffceee2d5ac9b39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 08:44:18 +0000 Subject: [PATCH 714/740] chore(deps-dev): bump discord-api-types from 0.37.110 to 0.37.111 (#17849) Bumps [discord-api-types](https://github.com/discordjs/discord-api-types) from 0.37.110 to 0.37.111. - [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.110...0.37.111) --- updated-dependencies: - dependency-name: discord-api-types dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 9430935074421d1..9c7b01527f366cb 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "@typescript-eslint/parser": "8.17.0", "@vercel/nft": "0.27.7", "@vitest/coverage-v8": "2.0.5", - "discord-api-types": "0.37.110", + "discord-api-types": "0.37.111", "eslint": "9.16.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8e27b13d2b34f66..8e95d21e5dd059c 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.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: - specifier: 0.37.110 - version: 0.37.110 + specifier: 0.37.111 + version: 0.37.111 eslint: specifier: 9.16.0 version: 9.16.0 @@ -2768,8 +2768,8 @@ packages: resolution: {integrity: sha512-d9paCbverdqmuwR+B40phSqiHhgPKiP8dpsMz5WT9U6ug2VVQ3tqXNCedpa6iGHg6mgv9lHaoq5DJUu2IXMjsQ==} engines: {node: '>=18.17.0'} - discord-api-types@0.37.110: - resolution: {integrity: sha512-wVaAJkrSgNRo8nd523qKYPqkClTNHhjKOk/g6265rzHuc7TNS6Ivz06DPW4iZvnhFobbH95hKlgsRf6jcAbtlA==} + discord-api-types@0.37.111: + resolution: {integrity: sha512-22O4/mjfcLaQ8bbJorGpzFThnjhd8/exQxFscP3fnyJPo9Fk9O5GkWDIremYbvuw4YiwMfssWFniIb/iAwRqTg==} doctrine@3.0.0: resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} @@ -8231,7 +8231,7 @@ snapshots: directory-import@3.3.1: {} - discord-api-types@0.37.110: {} + discord-api-types@0.37.111: {} doctrine@3.0.0: dependencies: From 9714a48c2daf0b33ebdbba66b7190395a7bcdeb9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 08:44:31 +0000 Subject: [PATCH 715/740] chore(deps-dev): bump @vercel/nft from 0.27.7 to 0.27.9 (#17851) Bumps [@vercel/nft](https://github.com/vercel/nft) from 0.27.7 to 0.27.9. - [Release notes](https://github.com/vercel/nft/releases) - [Commits](https://github.com/vercel/nft/compare/0.27.7...0.27.9) --- updated-dependencies: - dependency-name: "@vercel/nft" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 255 ++++++++++++++----------------------------------- 2 files changed, 73 insertions(+), 184 deletions(-) diff --git a/package.json b/package.json index 9c7b01527f366cb..00235a97a834a6b 100644 --- a/package.json +++ b/package.json @@ -169,7 +169,7 @@ "@types/uuid": "10.0.0", "@typescript-eslint/eslint-plugin": "8.17.0", "@typescript-eslint/parser": "8.17.0", - "@vercel/nft": "0.27.7", + "@vercel/nft": "0.27.9", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.111", "eslint": "9.16.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8e95d21e5dd059c..94bd16b74666bff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -368,8 +368,8 @@ importers: specifier: 8.17.0 version: 8.17.0(eslint@9.16.0)(typescript@5.7.2) '@vercel/nft': - specifier: 0.27.7 - version: 0.27.7(rollup@4.24.4) + specifier: 0.27.9 + version: 0.27.9(rollup@4.24.4) '@vitest/coverage-v8': specifier: 2.0.5 version: 2.0.5(vitest@2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) @@ -1434,6 +1434,10 @@ packages: resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} engines: {node: '>=12'} + '@isaacs/fs-minipass@4.0.1': + resolution: {integrity: sha512-wgm9Ehl2jpeqP3zw/7mo3kRHFp5MEDhqAdwy1fTGkHAwnkGOVsgpvQhL8B5n1qlb01jV3n/bI0ZfZp5lWA1k4w==} + engines: {node: '>=18.0.0'} + '@istanbuljs/schema@0.1.3': resolution: {integrity: sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==} engines: {node: '>=8'} @@ -1459,8 +1463,9 @@ packages: '@lifeomic/attempt@3.1.0': resolution: {integrity: sha512-QZqem4QuAnAyzfz+Gj5/+SLxqwCAw2qmt7732ZXodr6VDWGeYLG6w1i/vYLa55JQM9wRuBKLmXmiZ2P0LtE5rw==} - '@mapbox/node-pre-gyp@1.0.11': - resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} + '@mapbox/node-pre-gyp@2.0.0-rc.0': + resolution: {integrity: sha512-nhSMNprz3WmeRvd8iUs5JqkKr0Ncx46JtPxM3AhXes84XpSJfmIwKeWXRpsr53S7kqPkQfPhzrMFUxSNb23qSA==} + engines: {node: '>=18'} hasBin: true '@microsoft/eslint-formatter-sarif@3.1.0': @@ -2058,8 +2063,8 @@ packages: '@unhead/schema@1.11.11': resolution: {integrity: sha512-xSGsWHPBYcMV/ckQeImbrVu6ddeRnrdDCgXUKv3xIjGBY+ob/96V80lGX8FKWh8GwdFSwhblISObKlDAt5K9ZQ==} - '@vercel/nft@0.27.7': - resolution: {integrity: sha512-FG6H5YkP4bdw9Ll1qhmbxuE8KwW2E/g8fJpM183fWQLeVDGqzeywMIeJ9h2txdWZ03psgWMn6QymTxaDLmdwUg==} + '@vercel/nft@0.27.9': + resolution: {integrity: sha512-pTs7OchHQmSYJPR0puVQCWw/NqzuvAtnAhBurz21lq4Y4KqWoMpYKqmikkETG5r1bHNCM/hQMZ5JiRr9mhOkyg==} engines: {node: '>=16'} hasBin: true @@ -2089,9 +2094,6 @@ packages: '@vitest/utils@2.0.5': resolution: {integrity: sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ==} - abbrev@1.1.1: - resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} - abbrev@2.0.0: resolution: {integrity: sha512-6/mh1E2u2YgEsCHdY0Yx5oW+61gZU+1vXaoiHHrpKeuRNNgFvS+/jrwHiQhB5apAf5oB7UB7E19ol2R2LKH8hQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -2119,10 +2121,6 @@ packages: aes-js@3.1.2: resolution: {integrity: sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==} - agent-base@6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - agent-base@7.1.1: resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} engines: {node: '>= 14'} @@ -2174,14 +2172,6 @@ packages: resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} engines: {node: '>=12'} - aproba@2.0.0: - resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} - - are-we-there-yet@2.0.0: - resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} - engines: {node: '>=10'} - deprecated: This package is no longer supported. - arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} @@ -2430,9 +2420,9 @@ packages: resolution: {integrity: sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==} engines: {node: '>=18.17'} - chownr@2.0.0: - resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} - engines: {node: '>=10'} + chownr@3.0.0: + resolution: {integrity: sha512-+IxzY9BZOQd/XuYPRmrvEVjF/nqj5kgT4kEq7VofrDoM1MxoRjEWkrCC3EtLi59TVawxTAn+orJwFQcrqEN1+g==} + engines: {node: '>=18'} chromium-bidi@0.5.16: resolution: {integrity: sha512-IT5lnR44h/qZQ4GaCHvBxYIl4cQL2i9UvFyYeRyVdcpY04hx5H720HQfe/7Oz7ndxaYVLQFGpCO71J4X2Ye/Gw==} @@ -2521,10 +2511,6 @@ packages: color-string@1.9.1: resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} - color-support@1.1.3: - resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} - hasBin: true - color@3.2.1: resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==} @@ -2561,8 +2547,9 @@ packages: config-chain@1.1.13: resolution: {integrity: sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==} - console-control-strings@1.1.0: - resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -2733,9 +2720,6 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - delegates@1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - denque@2.1.0: resolution: {integrity: sha512-HVQE3AAb/pxF8fQAoiqpvg9i3evqug3hoiwakOyZAwJm+6vZehbkYXZ0l4JxS+I3QxM97v5aaRNhj8v5oBhekw==} engines: {node: '>=0.10'} @@ -3258,10 +3242,6 @@ packages: resolution: {integrity: sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==} engines: {node: '>=14.14'} - fs-minipass@2.1.0: - resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==} - engines: {node: '>= 8'} - fs.realpath@1.0.0: resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} @@ -3270,11 +3250,6 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] - gauge@3.0.2: - resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} - engines: {node: '>=10'} - deprecated: This package is no longer supported. - gaxios@6.7.1: resolution: {integrity: sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==} engines: {node: '>=14'} @@ -3411,9 +3386,6 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - has-unicode@2.0.1: - resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - he@1.2.0: resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} hasBin: true @@ -3498,10 +3470,6 @@ packages: resolution: {integrity: sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==} engines: {node: '>=10.19.0'} - https-proxy-agent@5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} - https-proxy-agent@7.0.6: resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} engines: {node: '>= 14'} @@ -4017,10 +3985,6 @@ packages: mailsplit@5.4.2: resolution: {integrity: sha512-4cczG/3Iu3pyl8JgQ76dKkisurZTmxMrA4dj/e8d2jKYcFTZ7MxOzg1gTioTDMPuFXwTrVuN/gxhkrO7wLg7qA==} - make-dir@3.1.0: - resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} - engines: {node: '>=8'} - make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} @@ -4187,21 +4151,13 @@ packages: resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} engines: {node: '>=16 || 14 >=14.17'} - minipass@3.3.6: - resolution: {integrity: sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==} - engines: {node: '>=8'} - - minipass@5.0.0: - resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} - engines: {node: '>=8'} - minipass@7.1.2: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} - minizlib@2.1.2: - resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} - engines: {node: '>= 8'} + minizlib@3.0.1: + resolution: {integrity: sha512-umcy022ILvb5/3Djuu8LWeqUa8D68JaBzlttKeMWen48SjabqS3iY5w/vzeMzMUNhLDifyhbOwKDSznB1vvrwg==} + engines: {node: '>= 18'} mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} @@ -4210,8 +4166,8 @@ packages: resolution: {integrity: sha512-ALGF1Jt9ouehcaXaHhn6t1yGWRqGaHkPFndtFVHfZXOvkIZ/yoGaSi0AHVTafb3ZBGg4dr/bDwnaEKqCXzchMA==} engines: {node: '>=0.10.0'} - mkdirp@1.0.4: - resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + mkdirp@3.0.1: + resolution: {integrity: sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==} engines: {node: '>=10'} hasBin: true @@ -4307,16 +4263,16 @@ packages: resolution: {integrity: sha512-psAuZdTIRN08HKVd/E8ObdV6NO7NTBY3KsC30F7M4H1OnmLCUNaS56FpYxyb26zWLSyYF9Ozch9KYHhHegsiOQ==} engines: {node: '>=6.0.0'} - nopt@5.0.0: - resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} - engines: {node: '>=6'} - hasBin: true - nopt@7.2.1: resolution: {integrity: sha512-taM24ViiimT/XntxbPyJQzCG+p4EKOpgD3mxFwW38mGjVUrfERQOeY4EDHjdnptttfHuHQXFx+lTP08Q+mLa/w==} 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==} + engines: {node: ^18.17.0 || >=20.5.0} + hasBin: true + normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} @@ -4332,10 +4288,6 @@ packages: resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - npmlog@5.0.1: - resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} - deprecated: This package is no longer supported. - nth-check@1.0.2: resolution: {integrity: sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==} @@ -4351,10 +4303,6 @@ 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==} @@ -4876,6 +4824,10 @@ 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 + rollup@4.24.4: resolution: {integrity: sha512-vGorVWIsWfX3xbcyAS+I047kFKapHYivmkaT63Smj77XwvLSJos6M1xGqZnBPFQFBRZDOcG1QnYEIxAvTr/HjA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} @@ -4936,9 +4888,6 @@ packages: engines: {node: '>=10'} hasBin: true - set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - shallow-clone@0.1.2: resolution: {integrity: sha512-J1zdXCky5GmNnuauESROVu31MQSnLoYvlyEn6j2Ztk6Q5EHFIhxkMhYcv6vuDzl2XEzoRr856QwzMgWM/TmZgw==} engines: {node: '>=0.10.0'} @@ -5176,9 +5125,9 @@ packages: tar-stream@3.1.7: resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} - tar@6.2.1: - resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} - engines: {node: '>=10'} + tar@7.4.3: + resolution: {integrity: sha512-5S7Va8hKfV7W5U6g3aYxXmlPoZVAwUMy9AOKyF2fVuZa2UD3qZjg578OrLRt8PcNN1PleVaL/5/yYATNL0ICUw==} + engines: {node: '>=18'} telegram@2.26.8: resolution: {integrity: sha512-5sIb43Fd7HxjXQZqKWMhNTmdMOlG3QkuhR2xPleUA5B8BxOZl9IwrDwFdiC7aezGVTcD6oJ1d4cloUySjmCX/A==} @@ -5623,9 +5572,6 @@ packages: engines: {node: '>=8'} hasBin: true - wide-align@1.1.5: - resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - winston-transport@4.9.0: resolution: {integrity: sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==} engines: {node: '>= 12.0.0'} @@ -5719,6 +5665,10 @@ packages: yallist@4.0.0: resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + yallist@5.0.0: + resolution: {integrity: sha512-YgvUTfwqyc7UXVMrB+SImsVYSmTS8X/tSrtdNZMImM+n7+QTriRXyXim0mBrTXNeqzVF0KWGgHPeiyViFFrNDw==} + engines: {node: '>=18'} + yaml-eslint-parser@1.2.3: resolution: {integrity: sha512-4wZWvE398hCP7O8n3nXKu/vdq1HcH01ixYlCREaJL5NUMwQ0g3MaGFUBNSlmBtKmhbtVG/Cm6lyYmSVTEVil8A==} engines: {node: ^14.17.0 || >=16.0.0} @@ -6826,6 +6776,10 @@ snapshots: wrap-ansi: 8.1.0 wrap-ansi-cjs: wrap-ansi@7.0.0 + '@isaacs/fs-minipass@4.0.1': + dependencies: + minipass: 7.1.2 + '@istanbuljs/schema@0.1.3': {} '@jridgewell/gen-mapping@0.3.5': @@ -6847,17 +6801,15 @@ snapshots: '@lifeomic/attempt@3.1.0': {} - '@mapbox/node-pre-gyp@1.0.11': + '@mapbox/node-pre-gyp@2.0.0-rc.0': dependencies: + consola: 3.2.3 detect-libc: 2.0.3 - https-proxy-agent: 5.0.1 - make-dir: 3.1.0 + https-proxy-agent: 7.0.6 node-fetch: 2.7.0 - nopt: 5.0.0 - npmlog: 5.0.1 - rimraf: 3.0.2 + nopt: 8.0.0 semver: 7.6.3 - tar: 6.2.1 + tar: 7.4.3 transitivePeerDependencies: - encoding - supports-color @@ -7492,9 +7444,9 @@ snapshots: hookable: 5.5.3 zhead: 2.2.4 - '@vercel/nft@0.27.7(rollup@4.24.4)': + '@vercel/nft@0.27.9(rollup@4.24.4)': dependencies: - '@mapbox/node-pre-gyp': 1.0.11 + '@mapbox/node-pre-gyp': 2.0.0-rc.0 '@rollup/pluginutils': 5.1.3(rollup@4.24.4) acorn: 8.14.0 acorn-import-attributes: 1.9.5(acorn@8.14.0) @@ -7503,8 +7455,8 @@ snapshots: estree-walker: 2.0.2 glob: 7.2.3 graceful-fs: 4.2.11 - micromatch: 4.0.8 node-gyp-build: 4.8.2 + picomatch: 4.0.2 resolve-from: 5.0.0 transitivePeerDependencies: - encoding @@ -7566,8 +7518,6 @@ snapshots: loupe: 3.1.2 tinyrainbow: 1.2.0 - abbrev@1.1.1: {} - abbrev@2.0.0: {} acorn-import-attributes@1.9.5(acorn@8.14.0): @@ -7584,12 +7534,6 @@ snapshots: aes-js@3.1.2: {} - agent-base@6.0.2: - dependencies: - debug: 4.3.7 - transitivePeerDependencies: - - supports-color - agent-base@7.1.1: dependencies: debug: 4.3.7 @@ -7633,13 +7577,6 @@ snapshots: ansi-styles@6.2.1: {} - aproba@2.0.0: {} - - are-we-there-yet@2.0.0: - dependencies: - delegates: 1.0.0 - readable-stream: 3.6.2 - arg@5.0.2: {} argparse@2.0.1: {} @@ -7937,7 +7874,7 @@ snapshots: undici: 6.21.0 whatwg-mimetype: 4.0.0 - chownr@2.0.0: {} + chownr@3.0.0: {} chromium-bidi@0.5.16(devtools-protocol@0.0.1262051): dependencies: @@ -8026,8 +7963,6 @@ snapshots: color-name: 1.1.4 simple-swizzle: 0.2.2 - color-support@1.1.3: {} - color@3.2.1: dependencies: color-convert: 1.9.3 @@ -8061,7 +7996,7 @@ snapshots: ini: 1.3.8 proto-list: 1.2.4 - console-control-strings@1.1.0: {} + consola@3.2.3: {} convert-source-map@2.0.0: {} @@ -8204,8 +8139,6 @@ snapshots: delayed-stream@1.0.0: {} - delegates@1.0.0: {} - denque@2.1.0: {} dequal@2.0.3: {} @@ -8883,27 +8816,11 @@ snapshots: jsonfile: 6.1.0 universalify: 2.0.1 - fs-minipass@2.1.0: - dependencies: - minipass: 3.3.6 - fs.realpath@1.0.0: {} fsevents@2.3.3: optional: true - gauge@3.0.2: - dependencies: - aproba: 2.0.0 - color-support: 1.1.3 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.7 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wide-align: 1.1.5 - gaxios@6.7.1: dependencies: extend: 3.0.2 @@ -9086,8 +9003,6 @@ snapshots: has-flag@4.0.0: {} - has-unicode@2.0.1: {} - he@1.2.0: {} headers-polyfill@4.0.3: {} @@ -9193,13 +9108,6 @@ snapshots: quick-lru: 5.1.1 resolve-alpn: 1.2.1 - https-proxy-agent@5.0.1: - dependencies: - agent-base: 6.0.2 - debug: 4.3.7 - transitivePeerDependencies: - - supports-color - https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.3 @@ -9740,10 +9648,6 @@ snapshots: libmime: 5.3.6 libqp: 2.1.1 - make-dir@3.1.0: - dependencies: - semver: 6.3.1 - make-dir@4.0.0: dependencies: semver: 7.6.3 @@ -9976,18 +9880,12 @@ snapshots: dependencies: brace-expansion: 2.0.1 - minipass@3.3.6: - dependencies: - yallist: 4.0.0 - - minipass@5.0.0: {} - minipass@7.1.2: {} - minizlib@2.1.2: + minizlib@3.0.1: dependencies: - minipass: 3.3.6 - yallist: 4.0.0 + minipass: 7.1.2 + rimraf: 5.0.10 mitt@3.0.1: {} @@ -9996,7 +9894,7 @@ snapshots: for-in: 0.1.8 is-extendable: 0.1.1 - mkdirp@1.0.4: {} + mkdirp@3.0.1: {} mockdate@3.0.5: {} @@ -10080,11 +9978,11 @@ snapshots: nodemailer@6.9.16: {} - nopt@5.0.0: + nopt@7.2.1: dependencies: - abbrev: 1.1.1 + abbrev: 2.0.0 - nopt@7.2.1: + nopt@8.0.0: dependencies: abbrev: 2.0.0 @@ -10108,13 +10006,6 @@ snapshots: dependencies: path-key: 4.0.0 - npmlog@5.0.1: - dependencies: - are-we-there-yet: 2.0.0 - console-control-strings: 1.1.0 - gauge: 3.0.2 - set-blocking: 2.0.0 - nth-check@1.0.2: dependencies: boolbase: 1.0.0 @@ -10129,8 +10020,6 @@ snapshots: oauth-sign@0.9.0: {} - object-assign@4.1.1: {} - ofetch@1.4.1: dependencies: destr: 2.0.3 @@ -10714,6 +10603,10 @@ snapshots: dependencies: glob: 7.2.3 + rimraf@5.0.10: + dependencies: + glob: 10.4.5 + rollup@4.24.4: dependencies: '@types/estree': 1.0.6 @@ -10790,8 +10683,6 @@ snapshots: semver@7.6.3: {} - set-blocking@2.0.0: {} - shallow-clone@0.1.2: dependencies: is-extendable: 0.1.1 @@ -11033,14 +10924,14 @@ snapshots: fast-fifo: 1.3.2 streamx: 2.20.1 - tar@6.2.1: + tar@7.4.3: dependencies: - chownr: 2.0.0 - fs-minipass: 2.1.0 - minipass: 5.0.0 - minizlib: 2.1.2 - mkdirp: 1.0.4 - yallist: 4.0.0 + '@isaacs/fs-minipass': 4.0.1 + chownr: 3.0.0 + minipass: 7.1.2 + minizlib: 3.0.1 + mkdirp: 3.0.1 + yallist: 5.0.0 telegram@2.26.8: dependencies: @@ -11455,10 +11346,6 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 - wide-align@1.1.5: - dependencies: - string-width: 4.2.3 - winston-transport@4.9.0: dependencies: logform: 2.7.0 @@ -11548,6 +11435,8 @@ snapshots: yallist@4.0.0: {} + yallist@5.0.0: {} + yaml-eslint-parser@1.2.3: dependencies: eslint-visitor-keys: 3.4.3 From 0d1a9d23052309b10669d8911b6b3a47d28de2ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 08:52:36 +0000 Subject: [PATCH 716/740] chore(deps): bump nanoid from 3.3.7 to 3.3.8 (#17854) Bumps [nanoid](https://github.com/ai/nanoid) from 3.3.7 to 3.3.8. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/3.3.7...3.3.8) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pnpm-lock.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 94bd16b74666bff..80cbc15c9993614 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4209,8 +4209,8 @@ packages: resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - nanoid@3.3.7: - resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + nanoid@3.3.8: + resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -9936,7 +9936,7 @@ snapshots: mute-stream@1.0.0: {} - nanoid@3.3.7: {} + nanoid@3.3.8: {} narou@1.0.0: dependencies: @@ -10244,7 +10244,7 @@ snapshots: postcss@8.4.47: dependencies: - nanoid: 3.3.7 + nanoid: 3.3.8 picocolors: 1.1.1 source-map-js: 1.2.1 From f1c793aca558c51e10fe646d6bc41759db41ca00 Mon Sep 17 00:00:00 2001 From: iusx <rhyme.qing@gmail.com> Date: Tue, 10 Dec 2024 20:55:52 +0800 Subject: [PATCH 717/740] fix(route/isct): TIP overflow layout (#17838) * Update namespace.ts * Update namespace.ts --- lib/routes/isct/namespace.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/isct/namespace.ts b/lib/routes/isct/namespace.ts index 2dbb6fcf8387ae4..0eb118cc1dbacb7 100644 --- a/lib/routes/isct/namespace.ts +++ b/lib/routes/isct/namespace.ts @@ -4,10 +4,10 @@ export const namespace: Namespace = { name: 'Institute of Science Tokyo', url: 'isct.ac.jp', lang: 'ja', - description: ` -:::tip - 支持通过category参数筛选新闻类别。详情请查看[指南](https://docs.rsshub.app/zh/guide/parameters#%E5%86%85%E5%AE%B9%E8%BF%87%E6%BB%A4)。 - You can filter news by category through the category parameter. For more information, please refer to the [guide](https://docs.rsshub.app/guide/parameters#filtering). + description: `:::tip +支持通过 category 参数筛选新闻类别。详情请查看 [指南](https://docs.rsshub.app/zh/guide/parameters#%E5%86%85%E5%AE%B9%E8%BF%87%E6%BB%A4) 。 + +You can filter news by category through the category parameter. For more information, please refer to the [guide](https://docs.rsshub.app/guide/parameters#filtering). :::`, ja: { name: '東京科学大学', From 61725b253c662be8e533acfc8590346c6201f38b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 05:14:45 -0800 Subject: [PATCH 718/740] chore(deps-dev): bump @typescript-eslint/parser from 8.17.0 to 8.18.0 (#17847) Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 8.17.0 to 8.18.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.18.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 74 ++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 58 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 00235a97a834a6b..6125ef078fbbe24 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.17.0", - "@typescript-eslint/parser": "8.17.0", + "@typescript-eslint/parser": "8.18.0", "@vercel/nft": "0.27.9", "@vitest/coverage-v8": "2.0.5", "discord-api-types": "0.37.111", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 80cbc15c9993614..12cfac1379e11fe 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -363,10 +363,10 @@ importers: version: 10.0.0 '@typescript-eslint/eslint-plugin': specifier: 8.17.0 - version: 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) + version: 8.17.0(@typescript-eslint/parser@8.18.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/parser': - specifier: 8.17.0 - version: 8.17.0(eslint@9.16.0)(typescript@5.7.2) + specifier: 8.18.0 + version: 8.18.0(eslint@9.16.0)(typescript@5.7.2) '@vercel/nft': specifier: 0.27.9 version: 0.27.9(rollup@4.24.4) @@ -2006,20 +2006,21 @@ packages: typescript: optional: true - '@typescript-eslint/parser@8.17.0': - resolution: {integrity: sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==} + '@typescript-eslint/parser@8.18.0': + resolution: {integrity: sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.8.0' '@typescript-eslint/scope-manager@8.17.0': resolution: {integrity: sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/scope-manager@8.18.0': + resolution: {integrity: sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/type-utils@8.17.0': resolution: {integrity: sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2034,6 +2035,10 @@ packages: resolution: {integrity: sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/types@8.18.0': + resolution: {integrity: sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@8.17.0': resolution: {integrity: sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2043,6 +2048,12 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.18.0': + resolution: {integrity: sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '>=4.8.4 <5.8.0' + '@typescript-eslint/utils@8.17.0': resolution: {integrity: sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2057,6 +2068,10 @@ packages: resolution: {integrity: sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/visitor-keys@8.18.0': + resolution: {integrity: sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} @@ -7355,10 +7370,10 @@ snapshots: '@types/node': 22.10.1 optional: true - '@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.18.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.17.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/parser': 8.18.0(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/scope-manager': 8.17.0 '@typescript-eslint/type-utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2) @@ -7373,15 +7388,14 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2)': + '@typescript-eslint/parser@8.18.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/scope-manager': 8.17.0 - '@typescript-eslint/types': 8.17.0 - '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.17.0 + '@typescript-eslint/scope-manager': 8.18.0 + '@typescript-eslint/types': 8.18.0 + '@typescript-eslint/typescript-estree': 8.18.0(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.18.0 debug: 4.3.7 eslint: 9.16.0 - optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -7391,6 +7405,11 @@ snapshots: '@typescript-eslint/types': 8.17.0 '@typescript-eslint/visitor-keys': 8.17.0 + '@typescript-eslint/scope-manager@8.18.0': + dependencies: + '@typescript-eslint/types': 8.18.0 + '@typescript-eslint/visitor-keys': 8.18.0 + '@typescript-eslint/type-utils@8.17.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2) @@ -7405,6 +7424,8 @@ snapshots: '@typescript-eslint/types@8.17.0': {} + '@typescript-eslint/types@8.18.0': {} + '@typescript-eslint/typescript-estree@8.17.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 8.17.0 @@ -7420,6 +7441,20 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/typescript-estree@8.18.0(typescript@5.7.2)': + dependencies: + '@typescript-eslint/types': 8.18.0 + '@typescript-eslint/visitor-keys': 8.18.0 + debug: 4.3.7 + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.4.0(typescript@5.7.2) + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/utils@8.17.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) @@ -7437,6 +7472,11 @@ snapshots: '@typescript-eslint/types': 8.17.0 eslint-visitor-keys: 4.2.0 + '@typescript-eslint/visitor-keys@8.18.0': + dependencies: + '@typescript-eslint/types': 8.18.0 + eslint-visitor-keys: 4.2.0 + '@ungap/structured-clone@1.2.0': {} '@unhead/schema@1.11.11': From 23f3dbda49b36de19a76af856dbc89a43072292a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 21:24:57 +0800 Subject: [PATCH 719/740] chore(deps-dev): bump @typescript-eslint/eslint-plugin (#17848) Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 8.17.0 to 8.18.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.18.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 58 +++++++++++++++++++++++++++++--------------------- 2 files changed, 35 insertions(+), 25 deletions(-) diff --git a/package.json b/package.json index 6125ef078fbbe24..157fd8ed798b168 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.17.0", + "@typescript-eslint/eslint-plugin": "8.18.0", "@typescript-eslint/parser": "8.18.0", "@vercel/nft": "0.27.9", "@vitest/coverage-v8": "2.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 12cfac1379e11fe..cb8a083637ffb3a 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.17.0 - version: 8.17.0(@typescript-eslint/parser@8.18.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) + specifier: 8.18.0 + version: 8.18.0(@typescript-eslint/parser@8.18.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) '@typescript-eslint/parser': specifier: 8.18.0 version: 8.18.0(eslint@9.16.0)(typescript@5.7.2) @@ -1995,16 +1995,13 @@ packages: '@types/yauzl@2.10.3': resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} - '@typescript-eslint/eslint-plugin@8.17.0': - resolution: {integrity: sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==} + '@typescript-eslint/eslint-plugin@8.18.0': + resolution: {integrity: sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==} 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: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.8.0' '@typescript-eslint/parser@8.18.0': resolution: {integrity: sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==} @@ -2021,15 +2018,12 @@ packages: resolution: {integrity: sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/type-utils@8.17.0': - resolution: {integrity: sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==} + '@typescript-eslint/type-utils@8.18.0': + resolution: {integrity: sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true + typescript: '>=4.8.4 <5.8.0' '@typescript-eslint/types@8.17.0': resolution: {integrity: sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==} @@ -2064,6 +2058,13 @@ packages: typescript: optional: true + '@typescript-eslint/utils@8.18.0': + resolution: {integrity: sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==} + 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/visitor-keys@8.17.0': resolution: {integrity: sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7370,20 +7371,19 @@ snapshots: '@types/node': 22.10.1 optional: true - '@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.18.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)': + '@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@eslint-community/regexpp': 4.12.1 '@typescript-eslint/parser': 8.18.0(eslint@9.16.0)(typescript@5.7.2) - '@typescript-eslint/scope-manager': 8.17.0 - '@typescript-eslint/type-utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2) - '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2) - '@typescript-eslint/visitor-keys': 8.17.0 + '@typescript-eslint/scope-manager': 8.18.0 + '@typescript-eslint/type-utils': 8.18.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.18.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/visitor-keys': 8.18.0 eslint: 9.16.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 ts-api-utils: 1.4.0(typescript@5.7.2) - optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -7410,14 +7410,13 @@ snapshots: '@typescript-eslint/types': 8.18.0 '@typescript-eslint/visitor-keys': 8.18.0 - '@typescript-eslint/type-utils@8.17.0(eslint@9.16.0)(typescript@5.7.2)': + '@typescript-eslint/type-utils@8.18.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2) - '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/typescript-estree': 8.18.0(typescript@5.7.2) + '@typescript-eslint/utils': 8.18.0(eslint@9.16.0)(typescript@5.7.2) debug: 4.3.7 eslint: 9.16.0 ts-api-utils: 1.4.0(typescript@5.7.2) - optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color @@ -7467,6 +7466,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/utils@8.18.0(eslint@9.16.0)(typescript@5.7.2)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) + '@typescript-eslint/scope-manager': 8.18.0 + '@typescript-eslint/types': 8.18.0 + '@typescript-eslint/typescript-estree': 8.18.0(typescript@5.7.2) + eslint: 9.16.0 + typescript: 5.7.2 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/visitor-keys@8.17.0': dependencies: '@typescript-eslint/types': 8.17.0 From d93568fd12901fddf64ad07b32c10d5f7a71b38f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Dec 2024 05:59:59 -0800 Subject: [PATCH 720/740] chore(deps-dev): bump eslint-plugin-n from 17.14.0 to 17.15.0 (#17850) Bumps [eslint-plugin-n](https://github.com/eslint-community/eslint-plugin-n) from 17.14.0 to 17.15.0. - [Release notes](https://github.com/eslint-community/eslint-plugin-n/releases) - [Changelog](https://github.com/eslint-community/eslint-plugin-n/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint-community/eslint-plugin-n/compare/v17.14.0...v17.15.0) --- updated-dependencies: - dependency-name: eslint-plugin-n dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 157fd8ed798b168..3a5854c29ba744d 100644 --- a/package.json +++ b/package.json @@ -175,7 +175,7 @@ "eslint": "9.16.0", "eslint-config-prettier": "9.1.0", "eslint-nibble": "8.1.0", - "eslint-plugin-n": "17.14.0", + "eslint-plugin-n": "17.15.0", "eslint-plugin-prettier": "5.2.1", "eslint-plugin-unicorn": "56.0.1", "eslint-plugin-yml": "1.16.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cb8a083637ffb3a..44dc6cc04c1e342 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -386,8 +386,8 @@ importers: specifier: 8.1.0 version: 8.1.0(eslint@9.16.0) eslint-plugin-n: - specifier: 17.14.0 - version: 17.14.0(eslint@9.16.0) + specifier: 17.15.0 + version: 17.15.0(eslint@9.16.0) eslint-plugin-prettier: specifier: 5.2.1 version: 5.2.1(@types/eslint@9.6.1)(eslint-config-prettier@9.1.0(eslint@9.16.0))(eslint@9.16.0)(prettier@3.4.2) @@ -2976,8 +2976,8 @@ packages: peerDependencies: eslint: '>=8' - eslint-plugin-n@17.14.0: - resolution: {integrity: sha512-maxPLMEA0rPmRpoOlxEclKng4UpDe+N5BJS4t24I3UKnN109Qcivnfs37KMy84G0af3bxjog5lKctP5ObsvcTA==} + eslint-plugin-n@17.15.0: + resolution: {integrity: sha512-xF3zJkOfLlFOm5TvmqmsnA9/fO+/z2pYs0dkuKXKN/ymS6UB1yEcaoIkqxLKQ9Dw/WmLX/Tdh6/5ZS5azVixFQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.23.0' @@ -8480,7 +8480,7 @@ snapshots: eslint: 9.16.0 eslint-compat-utils: 0.5.1(eslint@9.16.0) - eslint-plugin-n@17.14.0(eslint@9.16.0): + eslint-plugin-n@17.15.0(eslint@9.16.0): dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) enhanced-resolve: 5.17.1 From e7647392dc290bdc6d33fb91ccb5885daac9b579 Mon Sep 17 00:00:00 2001 From: mocusez <mocusz@163.com> Date: Wed, 11 Dec 2024 01:46:54 +0800 Subject: [PATCH 721/740] fix(route/duckdb): change blogs link and author (#17856) * fix(route/duckdb): change blogs link and author * fix(route/duckdb): update description selector --------- --- lib/routes/duckdb/news.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/routes/duckdb/news.ts b/lib/routes/duckdb/news.ts index d4cde64a9ffd6b0..eece112c5608542 100644 --- a/lib/routes/duckdb/news.ts +++ b/lib/routes/duckdb/news.ts @@ -36,8 +36,9 @@ async function handler() { item = $(item); return { title: item.find('h3').text().trim(), - link: `https://duckdb.org${item.find('a').eq(2).attr('href')}`, + link: `https://duckdb.org${item.find('a.blocklink').attr('href')}`, pubDate: timezone(parseDate(item.find('.date').text(), 'YYYY-MM-DD'), 0), + author: item.find('.author').text().trim(), }; }); @@ -46,9 +47,7 @@ async function handler() { cache.tryGet(item.link, async () => { const response = await got(item.link); const $ = load(response.body); - item.author = $('.author').text(); - item.description = $('.singleentry').html(); - + item.description = $('.contentwidth').find('h1, .infoline').remove().end().html(); // 上面每个列表项的每个属性都在此重用, // 并增加了一个新属性“description” return item; From 32d09356f3b6f446d0f9bb498dbe7800df4a06c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:49:46 +0000 Subject: [PATCH 722/740] chore(deps-dev): bump @stylistic/eslint-plugin from 2.12.0 to 2.12.1 (#17862) Bumps [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic/tree/HEAD/packages/eslint-plugin) from 2.12.0 to 2.12.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/v2.12.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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 82 ++++---------------------------------------------- 2 files changed, 7 insertions(+), 77 deletions(-) diff --git a/package.json b/package.json index 3a5854c29ba744d..1d8c06ee209bb1d 100644 --- a/package.json +++ b/package.json @@ -144,7 +144,7 @@ "@eslint/eslintrc": "3.2.0", "@eslint/js": "9.16.0", "@microsoft/eslint-formatter-sarif": "3.1.0", - "@stylistic/eslint-plugin": "2.12.0", + "@stylistic/eslint-plugin": "2.12.1", "@types/aes-js": "3.1.4", "@types/babel__preset-env": "7.9.7", "@types/crypto-js": "4.2.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 44dc6cc04c1e342..83b7bf393ce8a46 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.12.0 - version: 2.12.0(eslint@9.16.0)(typescript@5.7.2) + specifier: 2.12.1 + version: 2.12.1(eslint@9.16.0)(typescript@5.7.2) '@types/aes-js': specifier: 3.1.4 version: 3.1.4 @@ -1831,8 +1831,8 @@ packages: resolution: {integrity: sha512-QWLl2P+rsCJeofkDNIT3WFmb6NrRud1SUYW8dIhXK/46XFV8Q/g7Bsvib0Askb0reRLe+WYPeeE+l5cH7SlkuQ==} engines: {node: '>=18'} - '@stylistic/eslint-plugin@2.12.0': - resolution: {integrity: sha512-IvD2WXbOoSp0zNpyYbjdSyEjZtut78RYfj2WIlbChE7HFuposTK5X1hc5+4AyqYcjLXYdD5oo/sJtqMGFNRb1w==} + '@stylistic/eslint-plugin@2.12.1': + resolution: {integrity: sha512-fubZKIHSPuo07FgRTn6S4Nl0uXPRPYVNpyZzIDGfp7Fny6JjNus6kReLD7NI380JXi4HtUTSOZ34LBuNPO1XLQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: '>=8.40.0' @@ -2010,10 +2010,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/scope-manager@8.17.0': - resolution: {integrity: sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/scope-manager@8.18.0': resolution: {integrity: sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2025,39 +2021,16 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/types@8.17.0': - resolution: {integrity: sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/types@8.18.0': resolution: {integrity: sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.17.0': - resolution: {integrity: sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/typescript-estree@8.18.0': resolution: {integrity: sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/utils@8.17.0': - resolution: {integrity: sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/utils@8.18.0': resolution: {integrity: sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -2065,10 +2038,6 @@ packages: eslint: ^8.57.0 || ^9.0.0 typescript: '>=4.8.4 <5.8.0' - '@typescript-eslint/visitor-keys@8.17.0': - resolution: {integrity: sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/visitor-keys@8.18.0': resolution: {integrity: sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -7199,9 +7168,9 @@ snapshots: '@sindresorhus/is@7.0.1': {} - '@stylistic/eslint-plugin@2.12.0(eslint@9.16.0)(typescript@5.7.2)': + '@stylistic/eslint-plugin@2.12.1(eslint@9.16.0)(typescript@5.7.2)': dependencies: - '@typescript-eslint/utils': 8.17.0(eslint@9.16.0)(typescript@5.7.2) + '@typescript-eslint/utils': 8.18.0(eslint@9.16.0)(typescript@5.7.2) eslint: 9.16.0 eslint-visitor-keys: 4.2.0 espree: 10.3.0 @@ -7400,11 +7369,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.17.0': - dependencies: - '@typescript-eslint/types': 8.17.0 - '@typescript-eslint/visitor-keys': 8.17.0 - '@typescript-eslint/scope-manager@8.18.0': dependencies: '@typescript-eslint/types': 8.18.0 @@ -7421,25 +7385,8 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.17.0': {} - '@typescript-eslint/types@8.18.0': {} - '@typescript-eslint/typescript-estree@8.17.0(typescript@5.7.2)': - dependencies: - '@typescript-eslint/types': 8.17.0 - '@typescript-eslint/visitor-keys': 8.17.0 - debug: 4.3.7 - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.4.0(typescript@5.7.2) - optionalDependencies: - typescript: 5.7.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/typescript-estree@8.18.0(typescript@5.7.2)': dependencies: '@typescript-eslint/types': 8.18.0 @@ -7454,18 +7401,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.17.0(eslint@9.16.0)(typescript@5.7.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) - '@typescript-eslint/scope-manager': 8.17.0 - '@typescript-eslint/types': 8.17.0 - '@typescript-eslint/typescript-estree': 8.17.0(typescript@5.7.2) - eslint: 9.16.0 - optionalDependencies: - typescript: 5.7.2 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/utils@8.18.0(eslint@9.16.0)(typescript@5.7.2)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0) @@ -7477,11 +7412,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.17.0': - dependencies: - '@typescript-eslint/types': 8.17.0 - eslint-visitor-keys: 4.2.0 - '@typescript-eslint/visitor-keys@8.18.0': dependencies: '@typescript-eslint/types': 8.18.0 From f9165acccc6952162da93abc1a5f7fca5d916415 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:49:58 +0000 Subject: [PATCH 723/740] chore(deps-dev): bump lint-staged from 15.2.10 to 15.2.11 (#17863) Bumps [lint-staged](https://github.com/lint-staged/lint-staged) from 15.2.10 to 15.2.11. - [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.2.10...v15.2.11) --- updated-dependencies: - dependency-name: lint-staged dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 47 ++++++++++++++++++++++++++++++----------------- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 1d8c06ee209bb1d..5857bf3e0ff5535 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.2.10", + "lint-staged": "15.2.11", "mockdate": "3.0.5", "msw": "2.4.3", "node-network-devtools": "1.0.23", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 83b7bf393ce8a46..237a6124fcb9cd7 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.2.10 - version: 15.2.10 + specifier: 15.2.11 + version: 15.2.11 mockdate: specifier: 3.0.5 version: 3.0.5 @@ -2649,6 +2649,15 @@ packages: supports-color: optional: true + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decamelize-keys@1.1.1: resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} engines: {node: '>=0.10.0'} @@ -3833,8 +3842,8 @@ packages: lie@3.1.1: resolution: {integrity: sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==} - lilconfig@3.1.2: - resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + lilconfig@3.1.3: + resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} engines: {node: '>=14'} lines-and-columns@1.2.4: @@ -3843,8 +3852,8 @@ packages: linkify-it@5.0.0: resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} - lint-staged@15.2.10: - resolution: {integrity: sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==} + lint-staged@15.2.11: + resolution: {integrity: sha512-Ev6ivCTYRTGs9ychvpVw35m/bcNDuBN+mnTeObCL5h+boS5WzBEC6LHI4I9F/++sZm1m+J2LEiy0gxL/R9TBqQ==} engines: {node: '>=18.12.0'} hasBin: true @@ -5658,13 +5667,13 @@ packages: resolution: {integrity: sha512-4wZWvE398hCP7O8n3nXKu/vdq1HcH01ixYlCREaJL5NUMwQ0g3MaGFUBNSlmBtKmhbtVG/Cm6lyYmSVTEVil8A==} engines: {node: ^14.17.0 || >=16.0.0} - yaml@2.5.1: - resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} + yaml@2.6.0: + resolution: {integrity: sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==} engines: {node: '>= 14'} hasBin: true - yaml@2.6.0: - resolution: {integrity: sha512-a6ae//JvKDEra2kdi1qzCyrJW/WZCgFi8ydDV+eXExl95t+5R+ijnqHJbz9tmMh8FUjx3iv2fCQ4dclAQlO2UQ==} + yaml@2.6.1: + resolution: {integrity: sha512-7r0XPzioN/Q9kXBro/XPnA6kznR73DHq+GXh5ON7ZozRO6aMjbmiBuKste2wslTFkC5d1dw0GooOCepZXJ2SAg==} engines: {node: '>= 14'} hasBin: true @@ -8076,6 +8085,10 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.4.0: + dependencies: + ms: 2.1.3 + decamelize-keys@1.1.1: dependencies: decamelize: 1.2.0 @@ -9477,7 +9490,7 @@ snapshots: dependencies: immediate: 3.0.6 - lilconfig@3.1.2: {} + lilconfig@3.1.3: {} lines-and-columns@1.2.4: {} @@ -9485,18 +9498,18 @@ snapshots: dependencies: uc.micro: 2.1.0 - lint-staged@15.2.10: + lint-staged@15.2.11: dependencies: chalk: 5.3.0 commander: 12.1.0 - debug: 4.3.7 + debug: 4.4.0 execa: 8.0.1 - lilconfig: 3.1.2 + lilconfig: 3.1.3 listr2: 8.2.5 micromatch: 4.0.8 pidtree: 0.6.0 string-argv: 0.3.2 - yaml: 2.5.1 + yaml: 2.6.1 transitivePeerDependencies: - supports-color @@ -11423,10 +11436,10 @@ snapshots: lodash: 4.17.21 yaml: 2.6.0 - yaml@2.5.1: {} - yaml@2.6.0: {} + yaml@2.6.1: {} + yargs-parser@15.0.3: dependencies: camelcase: 5.3.1 From a15355ea36ff9697785f7d26f4f9c3c28538914c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:50:08 +0000 Subject: [PATCH 724/740] chore(deps): bump rfc4648 from 1.5.3 to 1.5.4 (#17866) Bumps [rfc4648](https://github.com/swansontec/rfc4648.js) from 1.5.3 to 1.5.4. - [Release notes](https://github.com/swansontec/rfc4648.js/releases) - [Changelog](https://github.com/swansontec/rfc4648.js/blob/master/CHANGELOG.md) - [Commits](https://github.com/swansontec/rfc4648.js/commits) --- updated-dependencies: - dependency-name: rfc4648 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 5857bf3e0ff5535..393e373f51ce106 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,7 @@ "query-string": "9.1.1", "rate-limiter-flexible": "5.0.4", "re2js": "0.4.3", - "rfc4648": "1.5.3", + "rfc4648": "1.5.4", "rss-parser": "3.13.0", "sanitize-html": "2.13.1", "simplecc-wasm": "1.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 237a6124fcb9cd7..7856c06786de45f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -214,8 +214,8 @@ importers: specifier: 0.4.3 version: 0.4.3 rfc4648: - specifier: 1.5.3 - version: 1.5.3 + specifier: 1.5.4 + version: 1.5.4 rss-parser: specifier: 3.13.0 version: 3.13.0 @@ -4807,8 +4807,8 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rfc4648@1.5.3: - resolution: {integrity: sha512-MjOWxM065+WswwnmNONOT+bD1nXzY9Km6u3kzvnx8F8/HXGZdz3T6e6vZJ8Q/RIMUSp/nxqjH3GwvJDy8ijeQQ==} + rfc4648@1.5.4: + resolution: {integrity: sha512-rRg/6Lb+IGfJqO05HZkN50UtY7K/JhxJag1kP23+zyMfrvoB0B7RWv06MbOzoc79RgCdNTiUaNsTT1AJZ7Z+cg==} rfdc@1.4.1: resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} @@ -10588,7 +10588,7 @@ snapshots: reusify@1.0.4: {} - rfc4648@1.5.3: {} + rfc4648@1.5.4: {} rfdc@1.4.1: {} From c876e39f23a36324aebd5fd60ab8b0b88835c9e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 08:51:33 +0000 Subject: [PATCH 725/740] chore(deps): bump http-cookie-agent from 6.0.6 to 6.0.7 (#17868) Bumps [http-cookie-agent](https://github.com/3846masa/http-cookie-agent) from 6.0.6 to 6.0.7. - [Release notes](https://github.com/3846masa/http-cookie-agent/releases) - [Changelog](https://github.com/3846masa/http-cookie-agent/blob/main/CHANGELOG.md) - [Commits](https://github.com/3846masa/http-cookie-agent/compare/v6.0.6...v6.0.7) --- updated-dependencies: - dependency-name: http-cookie-agent dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 24 ++++++------------------ 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/package.json b/package.json index 393e373f51ce106..34704162a3d7b26 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ "googleapis": "144.0.0", "hono": "4.6.13", "html-to-text": "9.0.5", - "http-cookie-agent": "6.0.6", + "http-cookie-agent": "6.0.7", "https-proxy-agent": "7.0.6", "iconv-lite": "0.6.3", "imapflow": "1.0.171", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7856c06786de45f..ca89f571d1cddb4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -124,8 +124,8 @@ importers: specifier: 9.0.5 version: 9.0.5 http-cookie-agent: - specifier: 6.0.6 - version: 6.0.6(tough-cookie@5.0.0)(undici@6.21.0) + specifier: 6.0.7 + version: 6.0.7(tough-cookie@5.0.0)(undici@6.21.0) https-proxy-agent: specifier: 7.0.6 version: 7.0.6 @@ -2106,10 +2106,6 @@ packages: aes-js@3.1.2: resolution: {integrity: sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ==} - agent-base@7.1.1: - resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} - engines: {node: '>= 14'} - agent-base@7.1.3: resolution: {integrity: sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==} engines: {node: '>= 14'} @@ -3438,8 +3434,8 @@ packages: http-cache-semantics@4.1.1: resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} - http-cookie-agent@6.0.6: - resolution: {integrity: sha512-XkwhYUWo0yhiHBWqLmAe2kIBymVY70ewi9sKmy6YBHpNU3BCH4nipKrtY5/effAxj0qneQ9ziZG5TXgaKLfYgg==} + http-cookie-agent@6.0.7: + resolution: {integrity: sha512-+Q2kuUy5Nifb78MMbUxRsslFSGwrckleoCp97RF8KbW0dgmp4MyFxtz9WnRlaRFheL4afuc+1J1vWzD1dH8C5w==} engines: {node: '>=18.0.0'} peerDependencies: tough-cookie: ^4.0.0 || ^5.0.0 @@ -7523,12 +7519,6 @@ snapshots: aes-js@3.1.2: {} - agent-base@7.1.1: - dependencies: - debug: 4.3.7 - transitivePeerDependencies: - - supports-color - agent-base@7.1.3: {} ajv@6.12.6: @@ -9068,14 +9058,12 @@ snapshots: http-cache-semantics@4.1.1: {} - http-cookie-agent@6.0.6(tough-cookie@5.0.0)(undici@6.21.0): + http-cookie-agent@6.0.7(tough-cookie@5.0.0)(undici@6.21.0): dependencies: - agent-base: 7.1.1 + agent-base: 7.1.3 tough-cookie: 5.0.0 optionalDependencies: undici: 6.21.0 - transitivePeerDependencies: - - supports-color http-proxy-agent@7.0.2: dependencies: From ab760e9305fb45dd2fea118826e330ec485215bb Mon Sep 17 00:00:00 2001 From: lidashuang <li.dashuang@icloud.com> Date: Wed, 11 Dec 2024 17:13:41 +0800 Subject: [PATCH 726/740] fix(/mittrchina/breaking): TypeError: Cannot read properties of null (reading 'content') (#17855) * feat(route): add amz123.com * fix(/mittrchina/breaking): check var null TypeError: Cannot read properties of null (reading 'content') * fix(/mittrchina): breaking url null properties --- lib/routes/mittrchina/index.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/routes/mittrchina/index.ts b/lib/routes/mittrchina/index.ts index d9e30b68604cfbe..ef392a47eac1089 100644 --- a/lib/routes/mittrchina/index.ts +++ b/lib/routes/mittrchina/index.ts @@ -82,14 +82,16 @@ async function handler(ctx) { type: article.address.split('.').pop(), }, }) - : article.summary, - pubDate: article.start_time ? parseDate(article.start_time, 'X') : undefined, + : type === 'breaking' + ? article.content + : article.summary, + pubDate: article.start_time ? parseDate(article.start_time, 'X') : article.push_time ? parseDate(article.push_time, 'X') : undefined, id: article.id, link: `https://www.mittrchina.com/news/detail/${article.id}`, })); let items = list; - if (type !== 'video') { + if (type !== 'video' && type !== 'breaking') { items = await Promise.all( list.map((item) => cache.tryGet(item.link, async () => { From a49355bc40086674882edeb482f3f2ad4ec9d334 Mon Sep 17 00:00:00 2001 From: karasu <karasu.shing@gmail.com> Date: Wed, 11 Dec 2024 17:17:59 +0800 Subject: [PATCH 727/740] fix(route): filter out invalid subscriptions (#17861) --- lib/routes/follow/profile.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/routes/follow/profile.ts b/lib/routes/follow/profile.ts index f736026c91af97b..c0e422878e24a2b 100644 --- a/lib/routes/follow/profile.ts +++ b/lib/routes/follow/profile.ts @@ -1,7 +1,7 @@ import { ViewType, type Data, type Route } from '@/types'; import type { Context } from 'hono'; import ofetch from '@/utils/ofetch'; -import type { FollowResponse, InboxSubscription, ListSubscription, Profile, Subscription } from './types'; +import type { FeedSubscription, FollowResponse, InboxSubscription, ListSubscription, Profile, Subscription } from './types'; import { parse } from 'tldts'; export const route: Route = { @@ -30,6 +30,8 @@ const isList = (subscription: Subscription): subscription is ListSubscription => const isInbox = (subscription: Subscription): subscription is InboxSubscription => 'inboxId' in subscription; +const isFeed = (subscription: Subscription): subscription is FeedSubscription => 'feeds' in subscription; + async function handler(ctx: Context): Promise<Data> { const handleOrId = ctx.req.param('uid'); const host = 'https://api.follow.is'; @@ -47,7 +49,7 @@ async function handler(ctx: Context): Promise<Data> { return { title: `${profile.data.name}'s subscriptions`, - item: (<Exclude<Subscription, InboxSubscription>[]>subscriptions.data.filter((i) => !isInbox(i))).map((subscription) => { + item: (<Exclude<Subscription, InboxSubscription>[]>subscriptions.data.filter((i) => !isInbox(i) && !(isFeed(i) && !!i.feeds.errorAt))).map((subscription) => { if (isList(subscription)) { return { title: subscription.lists.title, From 3cb7925770db41fb4f8e3cf3a70e318a0f7bb648 Mon Sep 17 00:00:00 2001 From: Bubu <43925055+p3psi-boo@users.noreply.github.com> Date: Wed, 11 Dec 2024 20:42:13 +0800 Subject: [PATCH 728/740] =?UTF-8?q?feat(route):=20=E6=96=B0=E5=A2=9E=20i?= =?UTF-8?q?=E9=BB=91=E9=A9=AC=E7=BD=91=20(#17843)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/iheima/index.ts | 44 ++++++++++++++++++++++++++++++++++ lib/routes/iheima/namespace.ts | 8 +++++++ 2 files changed, 52 insertions(+) create mode 100644 lib/routes/iheima/index.ts create mode 100644 lib/routes/iheima/namespace.ts diff --git a/lib/routes/iheima/index.ts b/lib/routes/iheima/index.ts new file mode 100644 index 000000000000000..1f105587d5b2ca4 --- /dev/null +++ b/lib/routes/iheima/index.ts @@ -0,0 +1,44 @@ +import { Route } from '@/types'; +import got from '@/utils/got'; +import { parseDate } from '@/utils/parse-date'; + +export const route: Route = { + path: '/recommend', + categories: ['new-media'], + example: '/iheima/recommend', + url: 'www.iheima.com', + name: '推荐', + maintainers: ['p3psi-boo'], + handler, +}; + +async function handler() { + const baseUrl = 'https://www.iheima.com/?page=1&pagesize=20'; + + const response = await got({ + method: 'get', + url: baseUrl, + responseType: 'json', + headers: { + Accept: 'application/json, text/javascript, */*; q=0.01', + Referer: 'https://www.iheima.com/', + 'X-Requested-With': 'XMLHttpRequest', + }, + }); + + const content = JSON.parse(response.body); + const list = content.contents; + + const items = list.map((item) => ({ + title: item.title, + link: item.url, + pubDate: parseDate(item.published), + description: item.content, + })); + + return { + title: '推荐', + link: baseUrl, + item: items, + }; +} diff --git a/lib/routes/iheima/namespace.ts b/lib/routes/iheima/namespace.ts new file mode 100644 index 000000000000000..b276ca53c5eaf58 --- /dev/null +++ b/lib/routes/iheima/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: 'i黑马网', + url: 'www.iheima.com', + description: '', + lang: 'zh-CN', +}; From 107cc039516295bbe09a8462205a242651fa25e8 Mon Sep 17 00:00:00 2001 From: Bubu <43925055+p3psi-boo@users.noreply.github.com> Date: Wed, 11 Dec 2024 21:11:31 +0800 Subject: [PATCH 729/740] =?UTF-8?q?feat(route):=20=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E7=99=BD=E9=B2=B8=E5=87=BA=E6=B5=B7=20(#17845)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): 添加白鲸出海 * Update lib/routes/baijing/index.ts * Update lib/routes/baijing/index.ts --- lib/routes/baijing/index.ts | 48 +++++++++++++++++++++++++++++++++ lib/routes/baijing/namespace.ts | 8 ++++++ 2 files changed, 56 insertions(+) create mode 100644 lib/routes/baijing/index.ts create mode 100644 lib/routes/baijing/namespace.ts diff --git a/lib/routes/baijing/index.ts b/lib/routes/baijing/index.ts new file mode 100644 index 000000000000000..79b2bda6b4ae4e3 --- /dev/null +++ b/lib/routes/baijing/index.ts @@ -0,0 +1,48 @@ +import { Route } from '@/types'; +import cache from '@/utils/cache'; +import { load } from 'cheerio'; +import { parseDate } from '@/utils/parse-date'; +import ofetch from '@/utils/ofetch'; + +export const route: Route = { + path: '/article', + categories: ['new-media'], + example: '/baijing/article', + url: 'www.baijing.cn/article/', + name: '资讯', + maintainers: ['p3psi-boo'], + handler, +}; + +async function handler() { + const apiUrl = 'https://www.baijing.cn/index/ajax/get_article/'; + const response = await ofetch(apiUrl); + const data = response.data.article_list; + + const list = data.map((item) => ({ + title: item.title, + link: `https://www.baijing.cn/article/${item.id}`, + author: item.user_info.user_name, + category: item.topic?.map((t) => t.title), + })); + + const items = await Promise.all( + list.map((item) => + cache.tryGet(item.link, async () => { + const response = await ofetch(item.link); + + const $ = load(response); + item.description = $('.content').html(); + item.pubDate = parseDate($('.timeago').text()); + + return item; + }) + ) + ); + + return { + title: '白鲸出海 - 资讯', + link: 'https://www.baijing.cn/article/', + item: items, + }; +} diff --git a/lib/routes/baijing/namespace.ts b/lib/routes/baijing/namespace.ts new file mode 100644 index 000000000000000..57d69294cd4383e --- /dev/null +++ b/lib/routes/baijing/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '白鲸出海', + url: 'baijing.cn', + description: '白鲸出海', + lang: 'zh-CN', +}; From 936045ae97655f76884f5a9a4f43c3dac4986afd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 11 Dec 2024 22:02:57 +0800 Subject: [PATCH 730/740] chore(deps): bump zod from 3.23.8 to 3.24.1 (#17865) Bumps [zod](https://github.com/colinhacks/zod) from 3.23.8 to 3.24.1. - [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.23.8...v3.24.1) --- updated-dependencies: - dependency-name: zod dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> 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 34704162a3d7b26..176bf4ba9fe485a 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "uuid": "11.0.3", "winston": "3.17.0", "xxhash-wasm": "1.1.0", - "zod": "3.23.8" + "zod": "3.24.1" }, "devDependencies": { "@babel/preset-env": "7.26.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ca89f571d1cddb4..c8778aa20e3a423 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,7 +26,7 @@ importers: version: 1.13.7(hono@4.6.13) '@hono/zod-openapi': specifier: 0.18.3 - version: 0.18.3(hono@4.6.13)(zod@3.23.8) + version: 0.18.3(hono@4.6.13)(zod@3.24.1) '@notionhq/client': specifier: 2.2.15 version: 2.2.15 @@ -271,8 +271,8 @@ importers: specifier: 1.1.0 version: 1.1.0 zod: - specifier: 3.23.8 - version: 3.23.8 + specifier: 3.24.1 + version: 3.24.1 devDependencies: '@babel/preset-env': specifier: 7.26.0 @@ -5701,8 +5701,8 @@ packages: zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} - zod@3.23.8: - resolution: {integrity: sha512-XBx9AXhXktjUqnepgTiE5flcKIYWi/rme0Eaj+5Y0lftuGBq+jyRu/md4WnuxqgP1ubdpNCsYEYPxrzVHD8d6g==} + zod@3.24.1: + resolution: {integrity: sha512-muH7gBL9sI1nciMZV67X5fTKKBLtwpZ5VBp1vsOQzj1MhrBZ4wlVCm3gedKZWLp0Oyel8sIGfeiz54Su+OVT+A==} snapshots: @@ -5711,10 +5711,10 @@ snapshots: '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 - '@asteasolutions/zod-to-openapi@7.2.0(zod@3.23.8)': + '@asteasolutions/zod-to-openapi@7.2.0(zod@3.24.1)': dependencies: openapi3-ts: 4.4.0 - zod: 3.23.8 + zod: 3.24.1 '@babel/code-frame@7.0.0': dependencies: @@ -6685,17 +6685,17 @@ snapshots: dependencies: hono: 4.6.13 - '@hono/zod-openapi@0.18.3(hono@4.6.13)(zod@3.23.8)': + '@hono/zod-openapi@0.18.3(hono@4.6.13)(zod@3.24.1)': dependencies: - '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.23.8) - '@hono/zod-validator': 0.4.1(hono@4.6.13)(zod@3.23.8) + '@asteasolutions/zod-to-openapi': 7.2.0(zod@3.24.1) + '@hono/zod-validator': 0.4.1(hono@4.6.13)(zod@3.24.1) hono: 4.6.13 - zod: 3.23.8 + zod: 3.24.1 - '@hono/zod-validator@0.4.1(hono@4.6.13)(zod@3.23.8)': + '@hono/zod-validator@0.4.1(hono@4.6.13)(zod@3.24.1)': dependencies: hono: 4.6.13 - zod: 3.23.8 + zod: 3.24.1 '@humanfs/core@0.19.1': {} @@ -11458,4 +11458,4 @@ snapshots: zod@3.22.4: {} - zod@3.23.8: {} + zod@3.24.1: {} From 7a36be760e2239b1914a6cdf7ffb946c21bf6f17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E7=81=AB=E6=B5=81=E5=85=89?= <gc.thlg@gmail.com> Date: Wed, 11 Dec 2024 23:18:37 +0800 Subject: [PATCH 731/740] feat: add routes (#17792) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add routes Signed-off-by: 天火流光 <gc.thlg@gmail.com> * feat: add routes * revert: "feat: add routes" This reverts commit 0bdbc3b0ee3ce536e6a02d1e8608bc85a19b42c3. * fix: revert * feat: add routes Signed-off-by: 天火流光 <gc.thlg@gmail.com> * 🐞 fix: Wait page to load Signed-off-by: 天火流光 <gc.thlg@gmail.com> * fix: improve video description --------- Signed-off-by: 天火流光 <gc.thlg@gmail.com> --- lib/routes/kuaishou/namespace.ts | 8 +++ lib/routes/kuaishou/profile.ts | 92 ++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 lib/routes/kuaishou/namespace.ts create mode 100644 lib/routes/kuaishou/profile.ts diff --git a/lib/routes/kuaishou/namespace.ts b/lib/routes/kuaishou/namespace.ts new file mode 100644 index 000000000000000..2a784ede648c1e4 --- /dev/null +++ b/lib/routes/kuaishou/namespace.ts @@ -0,0 +1,8 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '快手', + url: 'kuaishou.com', + categories: ['social-media'], + lang: 'zh-CN', +}; diff --git a/lib/routes/kuaishou/profile.ts b/lib/routes/kuaishou/profile.ts new file mode 100644 index 000000000000000..0f45113f497b80c --- /dev/null +++ b/lib/routes/kuaishou/profile.ts @@ -0,0 +1,92 @@ +import { Route, Data } from '@/types'; +import puppeteer from '@/utils/puppeteer'; +import { config } from '@/config'; +export const route: Route = { + name: 'Profile', + path: '/profile/:principalId', + radar: [ + { + source: ['kuaishou.com/profile/:principalId'], + target: '/profile/:principalId', + }, + ], + parameters: { + principalId: '用户 id, 可在主页中找到', + }, + example: '/kuaishou/profile/3xk46q9cdnvgife', + maintainers: ['GuoChen-thlg'], + url: 'kuaishou.com/profile/:principalId', + description: `:::tip +The profile page of the user, which contains the user's information, videos, and other information. + :::`, + handler, +}; + +async function handler(ctx) { + const { principalId } = ctx.req.param(); + const browser = await puppeteer(); + const page = await browser.newPage(); + + let retryCount = 0; + let resolve; + let userInfo; + const promise = new Promise((res) => { + resolve = res; + }); + await page.setRequestInterception(true); + page.on('request', (req) => { + const resourceType = req.resourceType(); + if (resourceType === 'image' || resourceType === 'media' || resourceType === 'font' || resourceType === 'stylesheet' || resourceType === 'ping') { + req.abort(); + } else { + req.continue(); + } + }); + page.on('response', async (res) => { + if (res.ok() && res.url().includes('/live_api/profile/public')) { + const resData = await res.json(); + if (resData.data.list.length > 0) { + resolve(resData.data); + } else { + if (retryCount > config.requestRetry) { + resolve({}); + } + setTimeout(() => { + page.reload().then(); + retryCount++; + }, 3000); + } + } else if (res.ok() && res.url().includes('/live_api/baseuser/userinfo/byid')) { + // principalId + const resData = await res.json(); + userInfo = resData.data.userInfo; + } + }); + await page.goto('https://www.kuaishou.com', { + waitUntil: 'domcontentloaded', + }); + await page.goto(`https://live.kuaishou.com/profile/${principalId}`); + const resData = (await promise.catch((error) => error)) as Array<any>; + + await browser.close(); + const data: Data = { + title: userInfo?.name ?? `${principalId}的作品 - 快手`, + // description: JSON.stringify(resData), + item: + resData?.list?.map((item) => ({ + // title: '', + author: item.author.name, + description: `<video controls preload="metadata" poster="${item.poster}"> + <source src="${item.playUrl}" type="video/mp4"> + </video>`, + // link: '', + id: item.id, + guid: item.id, + banner: item.poster, + media: { + content: { url: item.playUrl }, + }, + })) || [], + }; + return data; +} From 91399b3c275ac9e62ac72a58763130b76340ec9b Mon Sep 17 00:00:00 2001 From: Geraldxm <115340172+Geraldxm@users.noreply.github.com> Date: Wed, 11 Dec 2024 23:39:23 +0800 Subject: [PATCH 732/740] feat: get full text for routes/qbitai/category (#17740) --- lib/routes/qbitai/category.ts | 36 ++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/lib/routes/qbitai/category.ts b/lib/routes/qbitai/category.ts index 55aad3c152657c1..12ba955a7f552af 100644 --- a/lib/routes/qbitai/category.ts +++ b/lib/routes/qbitai/category.ts @@ -1,6 +1,8 @@ import { Route } from '@/types'; import parser from '@/utils/rss-parser'; - +import ofetch from '@/utils/ofetch'; +import cache from '@/utils/cache'; +import { load } from 'cheerio'; import { parseDate } from '@/utils/parse-date'; export const route: Route = { @@ -22,7 +24,7 @@ export const route: Route = { }, ], name: '分类', - maintainers: ['FuryMartin'], + maintainers: ['FuryMartin, Geraldxm'], handler, description: `| 资讯 | 数码 | 智能车 | 智库 | 活动 | | ---- | -------- | ------ | ----- | ------- | @@ -31,24 +33,36 @@ export const route: Route = { async function handler(ctx) { const category = ctx.req.param('category'); - const link = encodeURI(`https://www.qbitai.com/category/${category}/feed`); - const feed = await parser.parseURL(link); + const url = encodeURI(`https://www.qbitai.com/category/${category}/feed`); - const items = feed.items.map((item) => ({ + const feed = await parser.parseURL(url); + const entries = feed.items.map((item) => ({ title: item.title, pubDate: parseDate(item.pubDate), link: item.link, author: '量子位', category: item.categories, - description: item['content:encoded'], + description: '', // Initialize description field })); + const resolvedEntries = await Promise.all( + entries.map((entry) => + cache.tryGet(entry.link, async () => { + try { + const response = await ofetch(entry.link); + const $ = load(response); + entry.description = $('.article').html() || 'No content found'; + } catch { + entry.description = 'Failed to fetch content'; + } + return entry; + }) + ) + ); + return { - // 源标题 - title: `量子位-${category}`, - // 源链接 + title: `量子位 - ${category}`, link: `https://www.qbitai.com/category/${category}`, - // 源文章 - item: items, + item: resolvedEntries, }; } From e1c5e635fc8bfbbb7884520aababf11f1c485960 Mon Sep 17 00:00:00 2001 From: Ethan Shen <42264778+nczitzk@users.noreply.github.com> Date: Thu, 12 Dec 2024 01:05:57 +0800 Subject: [PATCH 733/740] =?UTF-8?q?feat(route):=20add=20=E4=B8=AD=E5=9B=BD?= =?UTF-8?q?=E7=96=BE=E7=97=85=E9=A2=84=E9=98=B2=E6=8E=A7=E5=88=B6=E4=B8=AD?= =?UTF-8?q?=E5=BF=83=20(#17873)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/chinacdc/index.ts | 490 ++++++++++++++++++ lib/routes/chinacdc/namespace.ts | 9 + lib/routes/chinacdc/templates/description.art | 7 + 3 files changed, 506 insertions(+) create mode 100644 lib/routes/chinacdc/index.ts create mode 100644 lib/routes/chinacdc/namespace.ts create mode 100644 lib/routes/chinacdc/templates/description.art diff --git a/lib/routes/chinacdc/index.ts b/lib/routes/chinacdc/index.ts new file mode 100644 index 000000000000000..5ca8c021d7b9479 --- /dev/null +++ b/lib/routes/chinacdc/index.ts @@ -0,0 +1,490 @@ +import path from 'node:path'; + +import { type CheerioAPI, type Cheerio, type Element, load } from 'cheerio'; +import { type Context } from 'hono'; + +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<Data> => { + const { category = 'zxyw' } = ctx.req.param(); + const limit: number = Number.parseInt(ctx.req.query('limit') ?? '11', 10); + + const rootUrl: string = 'https://www.chinacdc.cn'; + const targetUrl: string = new URL(category.endsWith('/') ? category : `${category}/`, rootUrl).href; + + const response = await ofetch(targetUrl); + const $: CheerioAPI = load(response); + const language: string = $('html').prop('lang'); + + let items: DataItem[] = $('ul.xw_list li') + .slice(0, limit) + .toArray() + .map((item): DataItem => { + const $item: Cheerio<Element> = $(item); + + const aEl: Cheerio<Element> = $item.find('a'); + + const title: string = aEl.prop('title') || aEl.text(); + + const description: string = art(path.join(__dirname, 'templates/description.art'), { + intro: $item.find('p.zy').text(), + }); + + const imageSrc: string | undefined = $item.find('img').prop('src'); + const imageType: string | undefined = imageSrc?.split(/\./).pop(); + const image: string | undefined = imageSrc ? new URL(imageSrc, targetUrl).href : undefined; + const media: Record<string, Record<string, string>> = {}; + + if (imageType && image) { + media[imageType] = { url: image }; + } + + return { + title, + description, + pubDate: parseDate($item.find('span').text()), + link: new URL(aEl.prop('href') as string, targetUrl).href, + content: { + html: description, + text: $item.find('p.zy').text(), + }, + image, + banner: image, + language, + media: Object.keys(media).length > 0 ? media : undefined, + }; + }); + + items = ( + await Promise.all( + items.map((item) => { + if (!item.link && typeof item.link !== 'string') { + return item; + } + + return cache.tryGet(item.link, async (): Promise<DataItem> => { + const detailResponse = await ofetch(item.link); + const $$: CheerioAPI = load(detailResponse); + + const title: string = $$('h5').text(); + const description: string = art(path.join(__dirname, 'templates/description.art'), { + description: $$('div.TRS_Editor').html(), + }); + + return { + title, + description, + pubDate: parseDate($$('span.fb em').text()), + content: { + html: description, + text: $$('div.TRS_Editor').text(), + }, + image: item.image, + banner: item.banner, + language, + media: item.media, + }; + }); + }) + ) + ).filter((_): _ is DataItem => true); + + const author: string = $('title').text(); + const title: string = $('div.erjiCurNav').text(); + const feedImage: string = new URL($('img.logo').prop('src') as string, targetUrl).href; + + return { + title: `${author} - ${title}`, + description: title, + link: targetUrl, + item: items, + allowEmpty: true, + image: feedImage, + author, + language, + id: targetUrl, + }; +}; + +export const route: Route = { + path: '/:category{.+}?', + name: '通用', + url: 'www.chinacdc.cn', + maintainers: ['nczitzk'], + handler, + example: '/chinacdc/zxyw', + parameters: { + category: '分类,默认为 `zxyw`,即中心要闻,可在对应分类页 URL 中找到, Category, `zxyw`,即中心要闻 by default', + }, + description: `:::tip +若订阅 [中心要闻](https://www.chinacdc.cn/zxyw/),网址为 \`https://www.chinacdc.cn/zxyw/\`,请截取 \`https://www.chinacdc.cn/\` 到末尾 \`/\` 的部分 \`zxyw\` 作为 \`category\` 参数填入,此时目标路由为 [\`/chinacdc/zxyw\`](https://rsshub.app/chinacdc/zxyw)。 +::: + +| [中心要闻](https://www.chinacdc.cn/zxyw/) | [通知公告](https://www.chinacdc.cn/tzgg/) | +| ----------------------------------------- | ----------------------------------------- | +| [zxyw](https://rsshub.app/chinacdc/zxyw) | [tzgg](https://rsshub.app/chinacdc/tzgg) | + +<details> + <summary>更多分类</summary> + +#### [党建园地](https://www.chinacdc.cn/dqgz/djgz/) + +| [党建工作](https://www.chinacdc.cn/dqgz/djgz/) | [廉政文化](https://www.chinacdc.cn/djgz_13611/) | [工会工作](https://www.chinacdc.cn/ghgz/) | [团青工作](https://www.chinacdc.cn/tqgz/) | [理论学习](https://www.chinacdc.cn/tqgz_13618/) | +| -------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------------------- | +| [dqgz/djgz](https://rsshub.app/chinacdc/dqgz/djgz) | [dqgz/djgz_13611](https://rsshub.app/chinacdc/dqgz/djgz_13611) | [dqgz/ghgz](https://rsshub.app/chinacdc/dqgz/ghgz) | [dqgz/tqgz](https://rsshub.app/chinacdc/dqgz/tqgz) | [dqgz/tqgz_13618](https://rsshub.app/chinacdc/dqgz/tqgz_13618) | + +#### [疾控应急](https://www.chinacdc.cn/jkyj/) + +| [传染病](https://www.chinacdc.cn/jkyj/crb2/) | [突发公共卫生事件](https://www.chinacdc.cn/jkyj/tfggws/) | [慢性病与伤害防控](https://www.chinacdc.cn/jkyj/mxfcrxjb2/) | [烟草控制](https://www.chinacdc.cn/jkyj/yckz/) | [营养与健康](https://www.chinacdc.cn/jkyj/yyyjk2/) | +| -------------------------------------------------- | -------------------------------------------------------- | ------------------------------------------------------------ | -------------------------------------------------- | ------------------------------------------------------ | +| [jkyj/crb2](https://rsshub.app/chinacdc/jkyj/crb2) | [jkyj/tfggws](https://rsshub.app/chinacdc/jkyj/tfggws) | [jkyj/mxfcrxjb2](https://rsshub.app/chinacdc/jkyj/mxfcrxjb2) | [jkyj/yckz](https://rsshub.app/chinacdc/jkyj/yckz) | [jkyj/yyyjk2](https://rsshub.app/chinacdc/jkyj/yyyjk2) | + +| [环境与健康](https://www.chinacdc.cn/jkyj/hjyjk/) | [职业卫生与中毒控制](https://www.chinacdc.cn/jkyj/hjwsyzdkz/) | [放射卫生](https://www.chinacdc.cn/jkyj/fsws/) | [免疫规划](https://www.chinacdc.cn/jkyj/mygh02/) | [结核病防控](https://www.chinacdc.cn/jkyj/jhbfk/) | +| ---------------------------------------------------- | ------------------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------------ | ---------------------------------------------------- | +| [jkyj/hjyjk](https://rsshub.app/chinacdc/jkyj/hjyjk) | [jkyj/hjwsyzdkz](https://rsshub.app/chinacdc/jkyj/hjwsyzdkz) | [jkyj/fsws](https://rsshub.app/chinacdc/jkyj/fsws) | [jkyj/mygh02](https://rsshub.app/chinacdc/jkyj/mygh02) | [jkyj/jhbfk](https://rsshub.app/chinacdc/jkyj/jhbfk) | + +| [寄生虫病](https://www.chinacdc.cn/jkyj/jscb/) | +| -------------------------------------------------- | +| [jkyj/jscb](https://rsshub.app/chinacdc/jkyj/jscb) | + +#### [科学研究](https://www.chinacdc.cn/kxyj/) + +| [科技进展](https://www.chinacdc.cn/kxyj/kjjz/) | [学术动态](https://www.chinacdc.cn/kxyj/xsdt/) | [科研平台](https://www.chinacdc.cn/kxyj/xsjl/) | [科研亮点](https://www.chinacdc.cn/kxyj/kyld/) | [科技政策](https://www.chinacdc.cn/kxyj/kjzc/) | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| [kxyj/kjjz](https://rsshub.app/chinacdc/kxyj/kjjz) | [kxyj/xsdt](https://rsshub.app/chinacdc/kxyj/xsdt) | [kxyj/xsjl](https://rsshub.app/chinacdc/kxyj/xsjl) | [kxyj/kyld](https://rsshub.app/chinacdc/kxyj/kyld) | [kxyj/kjzc](https://rsshub.app/chinacdc/kxyj/kjzc) | + +#### [教育培训](https://www.chinacdc.cn/jypx/) + +| [研究生院](https://www.chinacdc.cn/jypx/yjsy/) | [继续教育](https://www.chinacdc.cn/jypx/jxjy/) | [博士后](https://www.chinacdc.cn/jypx/bsh/) | [中国现场流行病学培训项目(CFETP)](https://www.chinacdc.cn/jypx/CFETP/) | +| -------------------------------------------------- | -------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------ | +| [jypx/yjsy](https://rsshub.app/chinacdc/jypx/yjsy) | [jypx/jxjy](https://rsshub.app/chinacdc/jypx/jxjy) | [jypx/bsh](https://rsshub.app/chinacdc/jypx/bsh) | [jypx/CFETP](https://rsshub.app/chinacdc/jypx/CFETP) | + +#### [全球公卫](https://www.chinacdc.cn/qqgw/) + +| [合作伙伴](https://www.chinacdc.cn/qqgw/hzhb/) | [世界卫生组织合作中心和参比实验室](https://www.chinacdc.cn/qqgw/wszz/) | [国际交流(港澳台交流)](https://www.chinacdc.cn/qqgw/gjjl/) | [公共卫生援外与合作](https://www.chinacdc.cn/qqgw/ggws/) | +| -------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------- | +| [qqgw/hzhb](https://rsshub.app/chinacdc/qqgw/hzhb) | [qqgw/wszz](https://rsshub.app/chinacdc/qqgw/wszz) | [qqgw/gjjl](https://rsshub.app/chinacdc/qqgw/gjjl) | [qqgw/ggws](https://rsshub.app/chinacdc/qqgw/ggws) | + +#### [人才建设](https://www.chinacdc.cn/rcjs/) + +| [院士风采](https://www.chinacdc.cn/rcjs/ysfc/) | [首席专家](https://www.chinacdc.cn/rcjs/sxzj/) | [人才队伍](https://www.chinacdc.cn/rcjs/rcdw/) | [人才招聘](https://www.chinacdc.cn/rcjs/rczp/) | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| [rcjs/ysfc](https://rsshub.app/chinacdc/rcjs/ysfc) | [rcjs/sxzj](https://rsshub.app/chinacdc/rcjs/sxzj) | [rcjs/rcdw](https://rsshub.app/chinacdc/rcjs/rcdw) | [rcjs/rczp](https://rsshub.app/chinacdc/rcjs/rczp) | + +#### [健康数据](https://www.chinacdc.cn/jksj/) + +| [全国法定传染病疫情情况](https://www.chinacdc.cn/jksj/jksj01/) | [全国新型冠状病毒感染疫情情况](https://www.chinacdc.cn/jksj/xgbdyq/) | [重点传染病和突发公共卫生事件风险评估报告](https://www.chinacdc.cn/jksj/jksj02/) | [全球传染病事件风险评估报告](https://www.chinacdc.cn/jksj/jksj03/) | [全国预防接种异常反应监测信息概况](https://www.chinacdc.cn/jksj/jksj04_14209/) | +| -------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| [jksj/jksj01](https://rsshub.app/chinacdc/jksj/jksj01) | [jksj/xgbdyq](https://rsshub.app/chinacdc/jksj/xgbdyq) | [jksj/jksj02](https://rsshub.app/chinacdc/jksj/jksj02) | [jksj/jksj03](https://rsshub.app/chinacdc/jksj/jksj03) | [jksj/jksj04_14209](https://rsshub.app/chinacdc/jksj/jksj04_14209) | + +| [流感监测周报](https://www.chinacdc.cn/jksj/jksj04_14249/) | [全国急性呼吸道传染病哨点监测情况](https://www.chinacdc.cn/jksj/jksj04_14275/) | [健康报告](https://www.chinacdc.cn/jksj/jksj04/) | +| ------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------ | +| [jksj/jksj04_14249](https://rsshub.app/chinacdc/jksj/jksj04_14249) | [jksj/jksj04_14275](https://rsshub.app/chinacdc/jksj/jksj04_14275) | [jksj/jksj04](https://rsshub.app/chinacdc/jksj/jksj04) | + +#### [健康科普](https://www.chinacdc.cn/jkkp/) + +| [传染病](https://www.chinacdc.cn/jkkp/crb/) | [慢性非传染性疾病](https://www.chinacdc.cn/jkkp/mxfcrb/) | [免疫规划](https://www.chinacdc.cn/jkkp/mygh/) | [公共卫生事件](https://www.chinacdc.cn/jkkp/ggws/) | [烟草控制](https://www.chinacdc.cn/jkkp/yckz/) | +| ------------------------------------------------ | -------------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------- | +| [jkkp/crb](https://rsshub.app/chinacdc/jkkp/crb) | [jkkp/mxfcrb](https://rsshub.app/chinacdc/jkkp/mxfcrb) | [jkkp/mygh](https://rsshub.app/chinacdc/jkkp/mygh) | [jkkp/ggws](https://rsshub.app/chinacdc/jkkp/ggws) | [jkkp/yckz](https://rsshub.app/chinacdc/jkkp/yckz) | + +| [营养与健康](https://www.chinacdc.cn/jkkp/yyjk/) | [环境健康](https://www.chinacdc.cn/jkkp/hjjk/) | [职业健康与中毒控制](https://www.chinacdc.cn/jkkp/zyjk/) | [放射卫生](https://www.chinacdc.cn/jkkp/fsws/) | +| -------------------------------------------------- | -------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------- | +| [jkkp/yyjk](https://rsshub.app/chinacdc/jkkp/yyjk) | [jkkp/hjjk](https://rsshub.app/chinacdc/jkkp/hjjk) | [jkkp/zyjk](https://rsshub.app/chinacdc/jkkp/zyjk) | [jkkp/fsws](https://rsshub.app/chinacdc/jkkp/fsws) | + +</details> +`, + categories: ['government'], + features: { + requireConfig: false, + requirePuppeteer: false, + antiCrawler: false, + supportRadar: true, + supportBT: false, + supportPodcast: false, + supportScihub: false, + }, + radar: [ + { + source: ['www.chinacdc.cn/:category'], + target: (params) => { + const category = params.category; + + return `/chinacdc${category ? `/${category}` : ''}`; + }, + }, + { + title: '中心要闻', + source: ['www.chinacdc.cn/zxyw/'], + target: '/zxyw', + }, + { + title: '通知公告', + source: ['www.chinacdc.cn/tzgg/'], + target: '/tzgg', + }, + { + title: '党建园地 - 廉政文化', + source: ['www.chinacdc.cn/djgz_13611/'], + target: '/dqgz/djgz_13611', + }, + { + title: '党建园地 - 党建工作', + source: ['www.chinacdc.cn/dqgz/'], + target: '/dqgz/djgz', + }, + { + title: '党建园地 - 廉政文化', + source: ['www.chinacdc.cn/djgz_13611/'], + target: '/dqgz/djgz_13611', + }, + { + title: '党建园地 - 工会工作', + source: ['www.chinacdc.cn/ghgz/'], + target: '/dqgz/ghgz', + }, + { + title: '党建园地 - 团青工作', + source: ['www.chinacdc.cn/tqgz/'], + target: '/dqgz/tqgz', + }, + { + title: '党建园地 - 理论学习', + source: ['www.chinacdc.cn/tqgz_13618/'], + target: '/dqgz/tqgz_13618', + }, + { + title: '疾控应急 - 传染病', + source: ['www.chinacdc.cn/jkyj/crb2/'], + target: '/jkyj/crb2', + }, + { + title: '疾控应急 - 突发公共卫生事件', + source: ['www.chinacdc.cn/jkyj/tfggws/'], + target: '/jkyj/tfggws', + }, + { + title: '疾控应急 - 慢性病与伤害防控', + source: ['www.chinacdc.cn/jkyj/mxfcrxjb2/'], + target: '/jkyj/mxfcrxjb2', + }, + { + title: '疾控应急 - 烟草控制', + source: ['www.chinacdc.cn/jkyj/yckz/'], + target: '/jkyj/yckz', + }, + { + title: '疾控应急 - 营养与健康', + source: ['www.chinacdc.cn/jkyj/yyyjk2/'], + target: '/jkyj/yyyjk2', + }, + { + title: '疾控应急 - 环境与健康', + source: ['www.chinacdc.cn/jkyj/hjyjk/'], + target: '/jkyj/hjyjk', + }, + { + title: '疾控应急 - 职业卫生与中毒控制', + source: ['www.chinacdc.cn/jkyj/hjwsyzdkz/'], + target: '/jkyj/hjwsyzdkz', + }, + { + title: '疾控应急 - 放射卫生', + source: ['www.chinacdc.cn/jkyj/fsws/'], + target: '/jkyj/fsws', + }, + { + title: '疾控应急 - 免疫规划', + source: ['www.chinacdc.cn/jkyj/mygh02/'], + target: '/jkyj/mygh02', + }, + { + title: '疾控应急 - 结核病防控', + source: ['www.chinacdc.cn/jkyj/jhbfk/'], + target: '/jkyj/jhbfk', + }, + { + title: '疾控应急 - 寄生虫病', + source: ['www.chinacdc.cn/jkyj/jscb/'], + target: '/jkyj/jscb', + }, + { + title: '科学研究 - 科技进展', + source: ['www.chinacdc.cn/kxyj/kjjz/'], + target: '/kxyj/kjjz', + }, + { + title: '科学研究 - 学术动态', + source: ['www.chinacdc.cn/kxyj/xsdt/'], + target: '/kxyj/xsdt', + }, + { + title: '科学研究 - 科研平台', + source: ['www.chinacdc.cn/kxyj/xsjl/'], + target: '/kxyj/xsjl', + }, + { + title: '科学研究 - 科研亮点', + source: ['www.chinacdc.cn/kxyj/kyld/'], + target: '/kxyj/kyld', + }, + { + title: '科学研究 - 科技政策', + source: ['www.chinacdc.cn/kxyj/kjzc/'], + target: '/kxyj/kjzc', + }, + { + title: '教育培训 - 研究生院', + source: ['www.chinacdc.cn/jypx/yjsy/'], + target: '/jypx/yjsy', + }, + { + title: '教育培训 - 继续教育', + source: ['www.chinacdc.cn/jypx/jxjy/'], + target: '/jypx/jxjy', + }, + { + title: '教育培训 - 博士后', + source: ['www.chinacdc.cn/jypx/bsh/'], + target: '/jypx/bsh', + }, + { + title: '教育培训 - 中国现场流行病学培训项目(CFETP)', + source: ['www.chinacdc.cn/jypx/CFETP/'], + target: '/jypx/CFETP', + }, + { + title: '全球公卫 - 合作伙伴', + source: ['www.chinacdc.cn/qqgw/hzhb/'], + target: '/qqgw/hzhb', + }, + { + title: '全球公卫 - 世界卫生组织合作中心和参比实验室', + source: ['www.chinacdc.cn/qqgw/wszz/'], + target: '/qqgw/wszz', + }, + { + title: '全球公卫 - 国际交流(港澳台交流)', + source: ['www.chinacdc.cn/qqgw/gjjl/'], + target: '/qqgw/gjjl', + }, + { + title: '全球公卫 - 公共卫生援外与合作', + source: ['www.chinacdc.cn/qqgw/ggws/'], + target: '/qqgw/ggws', + }, + { + title: '人才建设 - 院士风采', + source: ['www.chinacdc.cn/rcjs/ysfc/'], + target: '/rcjs/ysfc', + }, + { + title: '人才建设 - 首席专家', + source: ['www.chinacdc.cn/rcjs/sxzj/'], + target: '/rcjs/sxzj', + }, + { + title: '人才建设 - 人才队伍', + source: ['www.chinacdc.cn/rcjs/rcdw/'], + target: '/rcjs/rcdw', + }, + { + title: '人才建设 - 人才招聘', + source: ['www.chinacdc.cn/rcjs/rczp/'], + target: '/rcjs/rczp', + }, + { + title: '健康数据 - 全国法定传染病疫情情况', + source: ['www.chinacdc.cn/jksj/jksj01/'], + target: '/jksj/jksj01', + }, + { + title: '健康数据 - 全国新型冠状病毒感染疫情情况', + source: ['www.chinacdc.cn/jksj/xgbdyq/'], + target: '/jksj/xgbdyq', + }, + { + title: '健康数据 - 重点传染病和突发公共卫生事件风险评估报告', + source: ['www.chinacdc.cn/jksj/jksj02/'], + target: '/jksj/jksj02', + }, + { + title: '健康数据 - 全球传染病事件风险评估报告', + source: ['www.chinacdc.cn/jksj/jksj03/'], + target: '/jksj/jksj03', + }, + { + title: '健康数据 - 全国预防接种异常反应监测信息概况', + source: ['www.chinacdc.cn/jksj/jksj04_14209/'], + target: '/jksj/jksj04_14209', + }, + { + title: '健康数据 - 流感监测周报', + source: ['www.chinacdc.cn/jksj/jksj04_14249/'], + target: '/jksj/jksj04_14249', + }, + { + title: '健康数据 - 全国急性呼吸道传染病哨点监测情况', + source: ['www.chinacdc.cn/jksj/jksj04_14275/'], + target: '/jksj/jksj04_14275', + }, + { + title: '健康数据 - 健康报告', + source: ['www.chinacdc.cn/jksj/jksj04/'], + target: '/jksj/jksj04', + }, + { + title: '健康科普 - 传染病', + source: ['www.chinacdc.cn/jkkp/crb/'], + target: '/jkkp/crb', + }, + { + title: '健康科普 - 慢性非传染性疾病', + source: ['www.chinacdc.cn/jkkp/mxfcrb/'], + target: '/jkkp/mxfcrb', + }, + { + title: '健康科普 - 免疫规划', + source: ['www.chinacdc.cn/jkkp/mygh/'], + target: '/jkkp/mygh', + }, + { + title: '健康科普 - 公共卫生事件', + source: ['www.chinacdc.cn/jkkp/ggws/'], + target: '/jkkp/ggws', + }, + { + title: '健康科普 - 烟草控制', + source: ['www.chinacdc.cn/jkkp/yckz/'], + target: '/jkkp/yckz', + }, + { + title: '健康科普 - 营养与健康', + source: ['www.chinacdc.cn/jkkp/yyjk/'], + target: '/jkkp/yyjk', + }, + { + title: '健康科普 - 环境健康', + source: ['www.chinacdc.cn/jkkp/hjjk/'], + target: '/jkkp/hjjk', + }, + { + title: '健康科普 - 职业健康与中毒控制', + source: ['www.chinacdc.cn/jkkp/zyjk/'], + target: '/jkkp/zyjk', + }, + { + title: '健康科普 - 放射卫生', + source: ['www.chinacdc.cn/jkkp/fsws/'], + target: '/jkkp/fsws', + }, + ], + view: ViewType.Articles, +}; diff --git a/lib/routes/chinacdc/namespace.ts b/lib/routes/chinacdc/namespace.ts new file mode 100644 index 000000000000000..5708fce38f3ee70 --- /dev/null +++ b/lib/routes/chinacdc/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '中国疾病预防控制中心', + url: 'www.chinacdc.cn', + categories: ['government'], + description: '', + lang: 'zh-CN', +}; diff --git a/lib/routes/chinacdc/templates/description.art b/lib/routes/chinacdc/templates/description.art new file mode 100644 index 000000000000000..57498ab45a9d86c --- /dev/null +++ b/lib/routes/chinacdc/templates/description.art @@ -0,0 +1,7 @@ +{{ if intro }} + <blockquote>{{ intro }}</blockquote> +{{ /if }} + +{{ if description }} + {{@ description }} +{{ /if }} \ No newline at end of file From 7c5a04fa7a06a61708215d374eb00a1d9a5355e0 Mon Sep 17 00:00:00 2001 From: Yun Du <27944418+Muyun99@users.noreply.github.com> Date: Thu, 12 Dec 2024 01:34:07 +0800 Subject: [PATCH 734/740] feat(route): add cool paper first-author infomation (#17857) * [update] update cool paper * [add] add author of cool paper --- lib/routes/papers/index.ts | 8 +++++--- lib/routes/papers/templates/description.art | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/routes/papers/index.ts b/lib/routes/papers/index.ts index ead2927feb3098a..3f0f0b0f8201ec1 100644 --- a/lib/routes/papers/index.ts +++ b/lib/routes/papers/index.ts @@ -34,10 +34,12 @@ export const handler = async (ctx) => { const kimiUrl = new URL(id, apiKimiUrl).href; const pdfUrl = Object.hasOwn(pdfUrlGenerators, site) ? pdfUrlGenerators[site](id) : undefined; + const authorString = item.author; const description = art(path.join(__dirname, 'templates/description.art'), { pdfUrl, siteUrl: item.link, kimiUrl, + authorString, summary: item.summary, }); @@ -47,7 +49,7 @@ export const handler = async (ctx) => { pubDate: parseDate(item.pubDate ?? ''), link: item.link, category: item.categories, - author: item.creator, + author: authorString, doi: `${site}${id}`, guid, id: guid, @@ -77,7 +79,7 @@ export const route: Route = { path: '/:category{.+}?', name: 'Topic', url: 'papers.cool', - maintainers: ['nczitzk'], + maintainers: ['nczitzk', 'Muyun99'], handler, example: '/papers/arxiv/cs.AI', parameters: { category: 'Category, arXiv Artificial Intelligence (cs.AI) by default' }, @@ -91,7 +93,7 @@ export const route: Route = { | 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 | + | arXiv Robotics (cs.RO) | arxiv/cs.RO | `, categories: ['journal'], diff --git a/lib/routes/papers/templates/description.art b/lib/routes/papers/templates/description.art index 368ea61f8ee8427..0c11cd609973692 100644 --- a/lib/routes/papers/templates/description.art +++ b/lib/routes/papers/templates/description.art @@ -10,6 +10,10 @@ <a href="{{ kimiUrl }}">[Kimi]</a> {{ /if }} +{{ if authorString }} + <p><b>Authors:</b> {{ authorString }}</p> +{{ /if }} + {{ if summary }} <p>{{ summary }}</p> {{ /if }} \ No newline at end of file From 127b45637a173ea1b77659ed73e3e5b881d9088a Mon Sep 17 00:00:00 2001 From: Zihao Diao <diao.zihao@icloud.com> Date: Wed, 11 Dec 2024 17:59:34 -0500 Subject: [PATCH 735/740] feat(picnob): fix Picnob Instagram Reels video playback. (#17874) * feat(picnob): fix Picnob igtv video playback. Signed-off-by: Zihao Diao <hi@ericdiao.com> * feat(picnob): fix Picnob Instagram Reels video playback Signed-off-by: Zihao Diao <hi@ericdiao.com> --------- Signed-off-by: Zihao Diao <hi@ericdiao.com> --- lib/routes/picnob/templates/desc.art | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/picnob/templates/desc.art b/lib/routes/picnob/templates/desc.art index 4910d642370204f..876dfa25a6f8c5f 100644 --- a/lib/routes/picnob/templates/desc.art +++ b/lib/routes/picnob/templates/desc.art @@ -1,4 +1,4 @@ -{{ if item.type === 'video' }} +{{ if item.type === 'video' || item.type === 'igtv' }} <video poster="{{ item.pic }}" controls preload="metadata"> <source src="{{ item.video }}" type="video/mp4"> </video> From 6deb2f57cf9ac96a87f1b8009f790ddd2af466af Mon Sep 17 00:00:00 2001 From: pseudoyu <pseudoyu@connect.hku.hk> Date: Thu, 12 Dec 2024 13:53:50 +0800 Subject: [PATCH 736/740] feat(route/twitter): support twitter list third-party api --- lib/routes/twitter/api/web-api/constants.ts | 2 +- lib/routes/twitter/list.ts | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/routes/twitter/api/web-api/constants.ts b/lib/routes/twitter/api/web-api/constants.ts index ade5b768c35c38b..4b3d9880b7a70c4 100644 --- a/lib/routes/twitter/api/web-api/constants.ts +++ b/lib/routes/twitter/api/web-api/constants.ts @@ -15,7 +15,7 @@ const graphQLEndpointsPlain = [ const gqlMap = Object.fromEntries(graphQLEndpointsPlain.map((endpoint) => [endpoint.split('/')[3].replace(/V2$|Query$|QueryV2$/, ''), endpoint])); -const thirdPartySupportedAPI = ['UserByScreenName', 'UserByRestId', 'UserTweets', 'UserTweetsAndReplies']; +const thirdPartySupportedAPI = ['UserByScreenName', 'UserByRestId', 'UserTweets', 'UserTweetsAndReplies', 'ListLatestTweetsTimeline']; const gqlFeatureUser = { hidden_profile_subscriptions_enabled: true, diff --git a/lib/routes/twitter/list.ts b/lib/routes/twitter/list.ts index c19e5feec3c6ff9..1618f3920668ad8 100644 --- a/lib/routes/twitter/list.ts +++ b/lib/routes/twitter/list.ts @@ -13,6 +13,10 @@ export const route: Route = { name: 'TWITTER_AUTH_TOKEN', description: 'Please see above for details.', }, + { + name: 'TWITTER_THIRD_PARTY_API', + description: 'Please see above for details.', + }, ], requirePuppeteer: false, antiCrawler: false, From 0823df23c2dfb908f7a399876dadbe1d4b636da3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 08:31:28 +0000 Subject: [PATCH 737/740] chore(deps): bump tldts from 6.1.66 to 6.1.67 (#17877) Bumps [tldts](https://github.com/remusao/tldts) from 6.1.66 to 6.1.67. - [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.66...v6.1.67) --- updated-dependencies: - dependency-name: tldts dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- pnpm-lock.yaml | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 176bf4ba9fe485a..b45892eba46fdb9 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "telegram": "2.26.8", "tiny-async-pool": "2.1.0", "title": "4.0.1", - "tldts": "6.1.66", + "tldts": "6.1.67", "tosource": "2.0.0-alpha.3", "tough-cookie": "5.0.0", "tsx": "4.19.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8778aa20e3a423..610d89db7be8cfe 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.66 - version: 6.1.66 + specifier: 6.1.67 + version: 6.1.67 tosource: specifier: 2.0.0-alpha.3 version: 2.0.0-alpha.3 @@ -5171,11 +5171,11 @@ packages: resolution: {integrity: sha512-tcwMRIioTcF/FcxLev8MJWxCp+GUALRhFEqbDoZrnowmKSGqPrl5pqS+Sut2m8BgJ6S4FExCSSpGffZ0Tks6Aw==} hasBin: true - tldts-core@6.1.66: - resolution: {integrity: sha512-s07jJruSwndD2X8bVjwioPfqpIc1pDTzszPe9pL1Skbh4bjytL85KNQ3tolqLbCvpQHawIsGfFi9dgerWjqW4g==} + tldts-core@6.1.67: + resolution: {integrity: sha512-12K5O4m3uUW6YM5v45Z7wc6NTSmAYj4Tq3de7eXghZkp879IlfPJrUWeWFwu1FS94U5t2vwETgJ1asu8UGNKVQ==} - tldts@6.1.66: - resolution: {integrity: sha512-l3ciXsYFel/jSRfESbyKYud1nOw7WfhrBEF9I3UiarYk/qEaOOwu3qXNECHw4fHGHGTEOuhf/VdKgoDX5M/dhQ==} + tldts@6.1.67: + resolution: {integrity: sha512-714VbegxoZ9WF5/IsVCy9rWXKUpPkJq87ebWLXQzNawce96l5oRrRf2eHzB4pT2g/4HQU1dYbu+sdXClYxlDKQ==} hasBin: true tmp@0.0.33: @@ -5741,7 +5741,7 @@ snapshots: '@babel/traverse': 7.25.9 '@babel/types': 7.26.0 convert-source-map: 2.0.0 - debug: 4.3.7 + debug: 4.4.0 gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -10974,11 +10974,11 @@ snapshots: tlds@1.255.0: {} - tldts-core@6.1.66: {} + tldts-core@6.1.67: {} - tldts@6.1.66: + tldts@6.1.67: dependencies: - tldts-core: 6.1.66 + tldts-core: 6.1.67 tmp@0.0.33: dependencies: @@ -11014,7 +11014,7 @@ snapshots: tough-cookie@5.0.0: dependencies: - tldts: 6.1.66 + tldts: 6.1.67 tr46@0.0.3: {} From 6ffabac65457b23c877069272b73e371c843612c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 01:27:27 -0800 Subject: [PATCH 738/740] chore(deps-dev): bump @types/node from 22.10.1 to 22.10.2 (#17876) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 22.10.1 to 22.10.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-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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 b45892eba46fdb9..b3e0622edf56379 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.1", + "@types/node": "22.10.2", "@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 610d89db7be8cfe..32e911c3d950dae 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.1 - version: 22.10.1 + specifier: 22.10.2 + version: 22.10.2 '@types/sanitize-html': specifier: 2.13.0 version: 2.13.0 @@ -372,7 +372,7 @@ importers: version: 0.27.9(rollup@4.24.4) '@vitest/coverage-v8': specifier: 2.0.5 - version: 2.0.5(vitest@2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) + version: 2.0.5(vitest@2.0.5(@types/node@22.10.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10))) discord-api-types: specifier: 0.37.111 version: 0.37.111 @@ -441,10 +441,10 @@ importers: version: 11.0.5 vite-tsconfig-paths: specifier: 5.1.4 - version: 5.1.4(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.1)) + version: 5.1.4(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.2)) vitest: specifier: 2.0.5 - version: 2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + version: 2.0.5(@types/node@22.10.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) yaml-eslint-parser: specifier: 1.2.3 version: 1.2.3 @@ -1947,8 +1947,8 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node@22.10.1': - resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==} + '@types/node@22.10.2': + resolution: {integrity: sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ==} '@types/normalize-package-data@2.4.4': resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} @@ -6735,7 +6735,7 @@ snapshots: '@inquirer/figures': 1.0.7 '@inquirer/type': 2.0.0 '@types/mute-stream': 0.0.4 - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/wrap-ansi': 3.0.0 ansi-escapes: 4.3.2 cli-width: 4.1.0 @@ -7222,12 +7222,12 @@ snapshots: '@types/etag@1.8.3': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/html-to-text@9.0.4': {} @@ -7235,13 +7235,13 @@ snapshots: '@types/imapflow@1.0.19': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/js-beautify@1.14.3': {} '@types/jsdom@21.1.7': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/tough-cookie': 4.0.5 parse5: 7.2.1 @@ -7251,7 +7251,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/jsrsasign@10.5.13': {} @@ -7261,7 +7261,7 @@ snapshots: '@types/mailparser@3.4.5': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 iconv-lite: 0.6.3 '@types/markdown-it@14.1.2': @@ -7283,14 +7283,14 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 form-data: 4.0.1 - '@types/node@22.10.1': + '@types/node@22.10.2': dependencies: undici-types: 6.20.0 @@ -7304,7 +7304,7 @@ snapshots: '@types/request@2.48.12': dependencies: '@types/caseless': 0.12.5 - '@types/node': 22.10.1 + '@types/node': 22.10.2 '@types/tough-cookie': 4.0.5 form-data: 2.5.2 @@ -7318,7 +7318,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.10.1 + '@types/node': 22.10.2 form-data: 4.0.1 '@types/supertest@6.0.2': @@ -7342,7 +7342,7 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 optional: true '@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)': @@ -7448,7 +7448,7 @@ snapshots: - rollup - supports-color - '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': + '@vitest/coverage-v8@2.0.5(vitest@2.0.5(@types/node@22.10.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)))': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -7462,7 +7462,7 @@ snapshots: std-env: 3.7.0 test-exclude: 7.0.1 tinyrainbow: 1.2.0 - vitest: 2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) + vitest: 2.0.5(@types/node@22.10.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)) transitivePeerDependencies: - supports-color @@ -10282,7 +10282,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.10.1 + '@types/node': 22.10.2 long: 5.2.3 proxy-agent@6.4.0: @@ -11207,13 +11207,13 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-node@2.0.5(@types/node@22.10.1): + vite-node@2.0.5(@types/node@22.10.2): dependencies: cac: 6.7.14 debug: 4.3.7 pathe: 1.1.2 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.10.1) + vite: 5.4.10(@types/node@22.10.2) transitivePeerDependencies: - '@types/node' - less @@ -11225,27 +11225,27 @@ snapshots: - supports-color - terser - vite-tsconfig-paths@5.1.4(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.1)): + vite-tsconfig-paths@5.1.4(typescript@5.7.2)(vite@5.4.10(@types/node@22.10.2)): dependencies: debug: 4.3.7 globrex: 0.1.2 tsconfck: 3.1.4(typescript@5.7.2) optionalDependencies: - vite: 5.4.10(@types/node@22.10.1) + vite: 5.4.10(@types/node@22.10.2) transitivePeerDependencies: - supports-color - typescript - vite@5.4.10(@types/node@22.10.1): + vite@5.4.10(@types/node@22.10.2): dependencies: esbuild: 0.21.5 postcss: 8.4.47 rollup: 4.24.4 optionalDependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 fsevents: 2.3.3 - vitest@2.0.5(@types/node@22.10.1)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): + vitest@2.0.5(@types/node@22.10.2)(jsdom@25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10)): dependencies: '@ampproject/remapping': 2.3.0 '@vitest/expect': 2.0.5 @@ -11263,11 +11263,11 @@ snapshots: tinybench: 2.9.0 tinypool: 1.0.1 tinyrainbow: 1.2.0 - vite: 5.4.10(@types/node@22.10.1) - vite-node: 2.0.5(@types/node@22.10.1) + vite: 5.4.10(@types/node@22.10.2) + vite-node: 2.0.5(@types/node@22.10.2) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.1 + '@types/node': 22.10.2 jsdom: 25.0.1(bufferutil@4.0.8)(utf-8-validate@5.0.10) transitivePeerDependencies: - less From 2a90282da9154cd702f1f5d5c1bb084569cd7d48 Mon Sep 17 00:00:00 2001 From: Geraldxm <115340172+Geraldxm@users.noreply.github.com> Date: Thu, 12 Dec 2024 18:52:24 +0800 Subject: [PATCH 739/740] =?UTF-8?q?feat(route):=20=E5=85=85=E7=94=B5?= =?UTF-8?q?=E5=A4=B4=E7=BD=91=20(#17860)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(route): 充电头网 * use REST API * remove cache; use date_gmt * Update lib/routes/chongdiantou/index.ts --- lib/routes/chongdiantou/index.ts | 54 ++++++++++++++++++++++++++++ lib/routes/chongdiantou/namespace.ts | 9 +++++ 2 files changed, 63 insertions(+) create mode 100644 lib/routes/chongdiantou/index.ts create mode 100644 lib/routes/chongdiantou/namespace.ts diff --git a/lib/routes/chongdiantou/index.ts b/lib/routes/chongdiantou/index.ts new file mode 100644 index 000000000000000..3ea95397d04ee51 --- /dev/null +++ b/lib/routes/chongdiantou/index.ts @@ -0,0 +1,54 @@ +import { Route } from '@/types'; +import { namespace } from './namespace'; +import ofetch from '@/utils/ofetch'; +import logger from '@/utils/logger'; + +async function getPosts() { + try { + // Fetch data directly from the API without caching + const response = await ofetch('https://www.chongdiantou.com/wp-json/wp/v2/posts?_embed&per_page=10', { + headers: { + method: 'GET', + }, + }); + return response.map((post) => ({ + title: post.title.rendered, + link: post.link, + pubDate: new Date(post.date_gmt), // Use date_gmt instead of date + category: post._embedded['wp:term'][0].map((term) => term.name).join(', '), + description: post.content.rendered, + author: post._embedded.author[0].name, + image: post._embedded['wp:featuredmedia'] ? post._embedded['wp:featuredmedia'][0].source_url : '', + })); + } catch (error) { + logger.error('Error fetching posts:', error); + return []; + } +} + +export const route: Route = { + path: '/', + categories: namespace.categories, + example: '/chongdiantou', + radar: [ + { + source: ['www.chongdiantou.com'], + }, + ], + name: '最新资讯', + maintainers: ['Geraldxm'], + handler, + url: 'www.chongdiantou.com', +}; + +async function handler() { + const items = await getPosts(); + + return { + title: '充电头网 - 最新资讯', + description: '充电头网新闻资讯', + link: 'https://www.chongdiantou.com/', + image: 'https://static.chongdiantou.com/wp-content/uploads/2021/02/2021021806172389.png', + item: items, + }; +} diff --git a/lib/routes/chongdiantou/namespace.ts b/lib/routes/chongdiantou/namespace.ts new file mode 100644 index 000000000000000..b67d38e1b650179 --- /dev/null +++ b/lib/routes/chongdiantou/namespace.ts @@ -0,0 +1,9 @@ +import type { Namespace } from '@/types'; + +export const namespace: Namespace = { + name: '充电头网', + url: 'www.chongdiantou.com', + categories: ['new-media'], + lang: 'zh-CN', + description: '充电头网是国内最早进行消费类电源技术及其周边配件(快充、充电头、充电器、无线充、车充、车载充电器、数据线、充电线材、移动电源及电芯、USB插排)评测、拆解的专业机构。', +}; From 352cac955d44ace6bae478ce40ab569b50ef97d0 Mon Sep 17 00:00:00 2001 From: X <xiangzy8@gmail.com> Date: Thu, 12 Dec 2024 22:01:10 +0800 Subject: [PATCH 740/740] fix(route/xiaohongshu): remove items url extra slash (#17878) --- lib/routes/xiaohongshu/user.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/xiaohongshu/user.ts b/lib/routes/xiaohongshu/user.ts index e97a226757883cc..bf082925f3f33c3 100644 --- a/lib/routes/xiaohongshu/user.ts +++ b/lib/routes/xiaohongshu/user.ts @@ -97,7 +97,7 @@ async function getUserFeeds(url: string, category: string) { notes.flatMap((n) => n.map(({ id, noteCard }) => ({ title: noteCard.displayTitle, - link: `${url}/${noteCard.noteId || id}`, + link: new URL(noteCard.noteId || id, url).toString(), guid: noteCard.noteId || id || noteCard.displayTitle, description: `<img src ="${noteCard.cover.infoList.pop().url}"><br>${noteCard.displayTitle}`, author: noteCard.user.nickname,