From 77d55262ff1f44388f87fcb60d23383a32f2b9a7 Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 4 Feb 2020 01:09:14 +0800 Subject: [PATCH] chore: bump got from 9.x to 10.x (#3875) --- lib/routes/1point3acres/offer.js | 24 +- lib/routes/afdian/dynamic.js | 4 +- lib/routes/afdian/explore.js | 2 +- lib/routes/baijing/index.js | 3 +- lib/routes/bilibili/cache.js | 3 +- lib/routes/bing/index.js | 9 +- lib/routes/clickme/index.js | 3 +- lib/routes/coronavirus/mogov-2019ncov.js | 9 +- lib/routes/csrc/auditstatus.js | 3 +- lib/routes/dengekionline/new.js | 10 +- lib/routes/dlsite/campaign.js | 8 +- lib/routes/dlsite/new.js | 4 +- lib/routes/duozhuayu/search.js | 5 +- lib/routes/earthquake/index.js | 3 +- lib/routes/eastday/sh.js | 3 +- lib/routes/eleme/open/announce.js | 3 +- lib/routes/geektime/column.js | 6 +- lib/routes/geektime/news.js | 6 +- lib/routes/getitfree/category.js | 2 +- lib/routes/github/branches.js | 5 +- lib/routes/github/file.js | 5 +- lib/routes/github/follower.js | 3 +- lib/routes/github/issue.js | 5 +- lib/routes/github/pulls.js | 5 +- lib/routes/github/repos.js | 5 +- lib/routes/github/star.js | 3 +- lib/routes/github/starred_repos.js | 3 +- lib/routes/gov/zhengce/govall.js | 2 +- lib/routes/gov/zhengce/wenjian.js | 5 +- lib/routes/gradcafe/result.js | 5 +- lib/routes/greasyfork/scripts.js | 5 +- lib/routes/guet/news.js | 4 +- lib/routes/hopper/index.js | 5 +- lib/routes/houxu/live.js | 2 +- lib/routes/hpoi/info.js | 13 +- lib/routes/icourse163/newest.js | 3 +- lib/routes/imaijia/category.js | 3 +- lib/routes/infoq/recommend.js | 3 +- lib/routes/infoq/topic.js | 6 +- lib/routes/infoq/utils.js | 3 +- lib/routes/jingdong/zhongchou.js | 3 +- lib/routes/juejin/pins.js | 3 +- lib/routes/konachan/post_popular_recent.js | 5 +- lib/routes/laosiji/hotshow.js | 3 +- lib/routes/linkedkeeper/index.js | 5 +- lib/routes/liwushuo/index.js | 2 +- lib/routes/matters/latest.js | 3 +- lib/routes/mcbbs/forum.js | 7 +- lib/routes/mcbbs/post.js | 7 +- lib/routes/mcbbs/utils.js | 2 +- lib/routes/mi/miui/index.js | 8 +- lib/routes/mihoyo/bh3.js | 5 +- lib/routes/ncm/djradio.js | 3 +- lib/routes/ncm/playlist.js | 3 +- lib/routes/ncm/userplaylist.js | 3 +- lib/routes/nga/forum.js | 6 +- lib/routes/nintendo/eshop_us.js | 3 +- lib/routes/owspace/read.js | 2 +- lib/routes/patchwork.kernel.org/comments.js | 5 +- lib/routes/pingwest/status.js | 2 +- lib/routes/pingwest/tag.js | 2 +- lib/routes/pingwest/user.js | 2 +- lib/routes/pintu360/index.js | 3 +- lib/routes/pixiv/api/getBookmarks.js | 5 +- lib/routes/pixiv/api/getIllustFollows.js | 5 +- lib/routes/pixiv/api/getIllusts.js | 5 +- lib/routes/pixiv/api/getRanking.js | 5 +- lib/routes/pixiv/api/getUserDetail.js | 5 +- lib/routes/pixiv/api/searchIllust.js | 5 +- lib/routes/pixiv/api/searchPopularIllust.js | 5 +- lib/routes/pixiv/token.js | 41 +-- lib/routes/pmcaff/list.js | 3 +- lib/routes/polimi/news.js | 5 +- lib/routes/queshu/book.js | 5 +- lib/routes/queshu/sale.js | 5 +- lib/routes/saraba1st/thread.js | 5 +- lib/routes/sf/sffq-announce.js | 3 +- lib/routes/steam/news.js | 3 +- lib/routes/steam/search.js | 3 +- lib/routes/topys/article.js | 3 +- lib/routes/universities/csu/job.js | 5 +- lib/routes/universities/gdut/news.js | 3 +- lib/routes/weibo/super_index.js | 5 +- lib/routes/westore/new.js | 3 +- lib/routes/x-mol/news.js | 4 +- lib/routes/x-mol/paper.js | 9 +- lib/routes/xueqiu/favorite.js | 5 +- lib/routes/xueqiu/hots.js | 5 +- lib/routes/xueqiu/stock_info.js | 5 +- lib/routes/xueqiu/user.js | 5 +- lib/routes/xueqiu/user_stock.js | 5 +- lib/routes/yande.re/post_popular_recent.js | 5 +- lib/routes/ziroom/room.js | 3 +- lib/utils/got.js | 15 +- lib/utils/request-wrapper.js | 8 +- package.json | 5 +- test/utils/got.js | 31 +- test/utils/request-wrapper.js | 36 +- yarn.lock | 370 +++++++++++++------- 99 files changed, 483 insertions(+), 445 deletions(-) diff --git a/lib/routes/1point3acres/offer.js b/lib/routes/1point3acres/offer.js index cdcfbd586..2ea7516e0 100644 --- a/lib/routes/1point3acres/offer.js +++ b/lib/routes/1point3acres/offer.js @@ -27,8 +27,7 @@ module.exports = async (ctx) => { responseBasic = await got({ method: 'post', url: url, - json: true, - data: { + json: { filters: {}, }, }); @@ -37,8 +36,7 @@ module.exports = async (ctx) => { responseBasic = await got({ method: 'post', url: url, - json: true, - data: { + json: { filters: { outname_w: school, }, @@ -53,8 +51,7 @@ module.exports = async (ctx) => { responseBasic = await got({ method: 'post', url: url, - json: true, - data: { + json: { filters: { planmajor: major, }, @@ -65,8 +62,7 @@ module.exports = async (ctx) => { responseBasic = await got({ method: 'post', url: url, - json: true, - data: { + json: { filters: { planmajor: major, outname_w: school, @@ -84,8 +80,7 @@ module.exports = async (ctx) => { responseBasic = await got({ method: 'post', url: url, - json: true, - data: { + json: { filters: { planyr: year, }, @@ -96,8 +91,7 @@ module.exports = async (ctx) => { responseBasic = await got({ method: 'post', url: url, - json: true, - data: { + json: { filters: { planyr: year, outname_w: school, @@ -112,8 +106,7 @@ module.exports = async (ctx) => { responseBasic = await got({ method: 'post', url: url, - json: true, - data: { + json: { filters: { planyr: year, planmajor: major, @@ -125,8 +118,7 @@ module.exports = async (ctx) => { responseBasic = await got({ method: 'post', url: url, - json: true, - data: { + json: { filters: { planyr: year, planmajor: major, diff --git a/lib/routes/afdian/dynamic.js b/lib/routes/afdian/dynamic.js index c98ad84e6..271fe1cf8 100644 --- a/lib/routes/afdian/dynamic.js +++ b/lib/routes/afdian/dynamic.js @@ -4,7 +4,7 @@ module.exports = async (ctx) => { const url_slug = ctx.params.uid.replace('@', ''); const baseUrl = 'https://afdian.net'; const userInfoRes = await got(`${baseUrl}/api/user/get-profile-by-slug`, { - query: { + searchParams: { url_slug, }, }); @@ -12,7 +12,7 @@ module.exports = async (ctx) => { const { user_id, name } = userInfo; const dynamicRes = await got(`${baseUrl}/api/post/get-list`, { - query: { + searchParams: { type: 'old', user_id, }, diff --git a/lib/routes/afdian/explore.js b/lib/routes/afdian/explore.js index beb680e29..bccd77236 100644 --- a/lib/routes/afdian/explore.js +++ b/lib/routes/afdian/explore.js @@ -31,7 +31,7 @@ module.exports = async (ctx) => { const baseUrl = 'https://afdian.net'; const link = `${baseUrl}/api/creator/list`; const res = await got(link, { - query: { + searchParams: { type, category_id: categoryMap[category], }, diff --git a/lib/routes/baijing/index.js b/lib/routes/baijing/index.js index 435f22614..c14bf1e1b 100644 --- a/lib/routes/baijing/index.js +++ b/lib/routes/baijing/index.js @@ -4,9 +4,8 @@ module.exports = async (ctx) => { const response = await got({ method: 'post', url: 'http://www.baijingapp.com/api/get_more_articles/', - form: true, responseType: 'json', - body: { + form: { deviceid: 'ios', page: 1, }, diff --git a/lib/routes/bilibili/cache.js b/lib/routes/bilibili/cache.js index 8693fffc9..04a6070cc 100644 --- a/lib/routes/bilibili/cache.js +++ b/lib/routes/bilibili/cache.js @@ -13,8 +13,7 @@ module.exports = { headers: { Referer: `https://space.bilibili.com/${uid}/`, }, - form: true, - data: { + form: { mid: uid, }, }); diff --git a/lib/routes/bing/index.js b/lib/routes/bing/index.js index bfcec13f5..cf69bda81 100644 --- a/lib/routes/bing/index.js +++ b/lib/routes/bing/index.js @@ -1,16 +1,17 @@ const got = require('@/utils/got'); +const queryString = require('query-string'); module.exports = async (ctx) => { const response = await got({ method: 'get', - baseUrl: 'https://cn.bing.com', - url: '/HPImageArchive.aspx', - params: { + prefixUrl: 'https://cn.bing.com', + url: 'HPImageArchive.aspx', + searchParams: queryString.stringify({ format: 'js', idx: 0, n: 7, mkt: 'zh-CN', - }, + }), }); const data = response.data; ctx.state.data = { diff --git a/lib/routes/clickme/index.js b/lib/routes/clickme/index.js index ac35aff05..3ca742b88 100644 --- a/lib/routes/clickme/index.js +++ b/lib/routes/clickme/index.js @@ -13,9 +13,8 @@ module.exports = async (ctx) => { url: 'https://api.clickme.net/article/list?key=clickme', headers: { Referer: url, - 'Content-Type': 'application/x-www-form-urlencoded', }, - body: `articleType=${site ? 'r18' : 'article'}&subtype=${grouping}&subtypeSlug=${encodeURIComponent(name)}&device=&limit=10&page=1`, + form: `articleType=${site ? 'r18' : 'article'}&subtype=${grouping}&subtypeSlug=${encodeURIComponent(name)}&device=&limit=10&page=1`, }); const category_name = name === 'new' ? '最新' : response.data.data.items[0].categoryName[0].name; diff --git a/lib/routes/coronavirus/mogov-2019ncov.js b/lib/routes/coronavirus/mogov-2019ncov.js index b299dca3c..d7558a414 100644 --- a/lib/routes/coronavirus/mogov-2019ncov.js +++ b/lib/routes/coronavirus/mogov-2019ncov.js @@ -1,14 +1,10 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); -const FormData = require('form-data'); module.exports = async (ctx) => { const language = ctx.params.lang.toLowerCase(); const dataUrl = `https://www.ssm.gov.mo/apps1/apps/webpage2020/wpg/gcsnewssc_body.aspx`; - const form = new FormData(); - form.append('pg', '0'); - form.append('lang', language); const dateTextMapping = { ch: '日期 : ', @@ -19,7 +15,10 @@ module.exports = async (ctx) => { const response = await got({ method: 'post', url: dataUrl, - data: form, + form: { + pg: '0', + lang: language, + }, }); const $ = cheerio.load(response.data); const items = $('div.col-xs-12') diff --git a/lib/routes/csrc/auditstatus.js b/lib/routes/csrc/auditstatus.js index adba1f4a5..3e8b5aab1 100644 --- a/lib/routes/csrc/auditstatus.js +++ b/lib/routes/csrc/auditstatus.js @@ -13,8 +13,7 @@ module.exports = async (ctx) => { headers: { 'User-Agent': userAgent, }, - form: true, - data: { + form: { appMatrCde: apply_id, pageNo: 1, pageSize: 10, diff --git a/lib/routes/dengekionline/new.js b/lib/routes/dengekionline/new.js index 5a7eaf072..55d397017 100644 --- a/lib/routes/dengekionline/new.js +++ b/lib/routes/dengekionline/new.js @@ -55,13 +55,13 @@ module.exports = async (ctx) => { if (info === undefined) { throw Error('不存在的类型'); } - const patch = info.patch; + const patch = info.patch.slice(1); const category = info.category; const title = `電撃オンライン - ${category}`; // 网页请求获取新闻列表 const response = await got(patch, { method: 'get', - baseUrl: host, + prefixUrl: host, }); const data = response.data; const link = response.url; @@ -76,7 +76,9 @@ module.exports = async (ctx) => { const liArr = $('li', element); const date = $('time', element).attr('datetime'); - const newLink = $(element).attr('href'); + const newLink = $(element) + .attr('href') + .slice(1); // 新闻封面 const cover = $('img', element); const category = liArr.map((index, li) => $(li).text()).get(); @@ -87,7 +89,7 @@ module.exports = async (ctx) => { // console.log(newLink); const result = await got(newLink, { method: 'get', - baseUrl: host, + prefixUrl: host, }); const $ = cheerio.load(result.data); const title = $('.gEntry_title').text(); diff --git a/lib/routes/dlsite/campaign.js b/lib/routes/dlsite/campaign.js index 4bcee55c4..cbb85b6c3 100644 --- a/lib/routes/dlsite/campaign.js +++ b/lib/routes/dlsite/campaign.js @@ -109,10 +109,10 @@ const setUrl = (info) => { for (const name in params) { if (Array.isArray(params[name])) { for (const index in params[name]) { - paramsPath += `/${name}[${index}]/${params[name][index]}`; + paramsPath += `${name}[${index}]/${params[name][index]}`; } } else { - paramsPath += `/${name}/${params[name]}`; + paramsPath += `${name}/${params[name]}`; } } return paramsPath; @@ -127,11 +127,11 @@ module.exports = async (ctx) => { if (ctx.params.free !== undefined) { info.params.is_free = 1; } - const link = host + setUrl(info); + const link = setUrl(info); const response = await got(link, { method: 'GET', - baseUrl: host, + prefixUrl: host, }); const data = response.data; const $ = cheerio.load(data); diff --git a/lib/routes/dlsite/new.js b/lib/routes/dlsite/new.js index 2ef0d7d2d..41ec5dc8d 100644 --- a/lib/routes/dlsite/new.js +++ b/lib/routes/dlsite/new.js @@ -55,11 +55,11 @@ module.exports = async (ctx) => { throw Error('不支持指定类型!'); } - const link = host + info.url; + const link = info.url.slice(1); const response = await got(link, { method: 'GET', - baseUrl: host, + prefixUrl: host, }); const data = response.data; const $ = cheerio.load(data); diff --git a/lib/routes/duozhuayu/search.js b/lib/routes/duozhuayu/search.js index 7d87e6157..102c20676 100644 --- a/lib/routes/duozhuayu/search.js +++ b/lib/routes/duozhuayu/search.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const aesjs = require('aes-js'); +const queryString = require('query-string'); module.exports = async (ctx) => { const wd = ctx.params.wd; @@ -41,10 +42,10 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url: 'https://www.duozhuayu.com/api/search', - params: { + searchParams: queryString.stringify({ type: 'normal', q: wd, - }, + }), headers: getCustomRequestHeaders(), }); const books = response.data.data || []; diff --git a/lib/routes/earthquake/index.js b/lib/routes/earthquake/index.js index 6f76cd1d5..a77095609 100644 --- a/lib/routes/earthquake/index.js +++ b/lib/routes/earthquake/index.js @@ -7,8 +7,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'post', url: api, - form: true, - data: { + form: { region: region, dateType: 2, magnitude: 0, diff --git a/lib/routes/eastday/sh.js b/lib/routes/eastday/sh.js index ec8f15af3..ca96c9680 100644 --- a/lib/routes/eastday/sh.js +++ b/lib/routes/eastday/sh.js @@ -8,8 +8,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'post', url: `https://apin.eastday.com/api/news/list`, - json: true, - data: { + json: { channelId: '15', currentPage: 1, pageSize: 20, diff --git a/lib/routes/eleme/open/announce.js b/lib/routes/eleme/open/announce.js index 18c762fb0..96182470b 100644 --- a/lib/routes/eleme/open/announce.js +++ b/lib/routes/eleme/open/announce.js @@ -5,8 +5,7 @@ module.exports = async (ctx) => { await got({ method: 'post', url: 'https://app-api.shop.ele.me/arena/invoke/?method=NoticeKeeperService.getBroadcastList', - json: true, - data: { + json: { id: '5CC2B32FA6F24CF78CB300DDE2F370BE|1565511577423', metas: { appName: 'Odin', diff --git a/lib/routes/geektime/column.js b/lib/routes/geektime/column.js index d01db2ce8..c3fd31e8c 100644 --- a/lib/routes/geektime/column.js +++ b/lib/routes/geektime/column.js @@ -10,8 +10,7 @@ module.exports = async (ctx) => { headers: { Referer: 'https://time.geekbang.org/', }, - json: true, - data: { + json: { cid: column_id, }, }); @@ -25,8 +24,7 @@ module.exports = async (ctx) => { headers: { Referer: 'https://time.geekbang.org/', }, - json: true, - data: { + json: { cid: column_id, }, }); diff --git a/lib/routes/geektime/news.js b/lib/routes/geektime/news.js index f3c87bbc9..53e34168b 100644 --- a/lib/routes/geektime/news.js +++ b/lib/routes/geektime/news.js @@ -10,8 +10,7 @@ module.exports = async (ctx) => { headers: { Referer: 'https://time.geekbang.org/', }, - json: true, - data: { + json: { cid: column_id, }, }); @@ -25,8 +24,7 @@ module.exports = async (ctx) => { headers: { Referer: 'https://time.geekbang.org/', }, - json: true, - data: { + json: { cid: column_id, }, }); diff --git a/lib/routes/getitfree/category.js b/lib/routes/getitfree/category.js index 9ecb18b1c..e4081c987 100644 --- a/lib/routes/getitfree/category.js +++ b/lib/routes/getitfree/category.js @@ -39,7 +39,7 @@ module.exports = async (ctx) => { item = item.concat(utils.parseListItem($, '.main-content')); } else { const res = await got(baseUrl, { - query: { + searchParams: { action: 'fa_load_postlist', paged: 1, category, diff --git a/lib/routes/github/branches.js b/lib/routes/github/branches.js index d20d6e5e4..76e35f444 100644 --- a/lib/routes/github/branches.js +++ b/lib/routes/github/branches.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const config = require('@/config').value; +const queryString = require('query-string'); module.exports = async (ctx) => { const user = ctx.params.user; @@ -11,9 +12,9 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url, - params: { + searchParams: queryString.stringify({ access_token: config.github && config.github.access_token, - }, + }), }); const data = response.data; diff --git a/lib/routes/github/file.js b/lib/routes/github/file.js index 7a1d5ccbc..27c2281f4 100644 --- a/lib/routes/github/file.js +++ b/lib/routes/github/file.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const config = require('@/config').value; +const queryString = require('query-string'); module.exports = async (ctx) => { const user = ctx.params.user; @@ -10,11 +11,11 @@ module.exports = async (ctx) => { const fileUrl = `https://github.com/${user}/${repo}/commits/${branch}/${filepath}`; const res = await got.get(`https://api.github.com/repos/${user}/${repo}/commits`, { - params: { + searchParams: queryString.stringify({ sha: branch, path: filepath, access_token: config.github && config.github.access_token, - }, + }), }); const list = res.data; const count = []; diff --git a/lib/routes/github/follower.js b/lib/routes/github/follower.js index f864b9d3e..428b3736e 100644 --- a/lib/routes/github/follower.js +++ b/lib/routes/github/follower.js @@ -16,8 +16,7 @@ module.exports = async (ctx) => { headers: { Authorization: `bearer ${config.github.access_token}`, }, - json: true, - data: { + json: { query: ` { user(login: "${user}") { diff --git a/lib/routes/github/issue.js b/lib/routes/github/issue.js index b7b4574f7..7b5b86fe7 100644 --- a/lib/routes/github/issue.js +++ b/lib/routes/github/issue.js @@ -3,6 +3,7 @@ const config = require('@/config').value; const md = require('markdown-it')({ html: true, }); +const queryString = require('query-string'); module.exports = async (ctx) => { const user = ctx.params.user; @@ -16,12 +17,12 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url, - params: { + searchParams: queryString.stringify({ state: state, labels: labels, sort: 'created', access_token: config.github && config.github.access_token, - }, + }), }); const data = response.data; diff --git a/lib/routes/github/pulls.js b/lib/routes/github/pulls.js index 7a965a41a..1ac83c14a 100644 --- a/lib/routes/github/pulls.js +++ b/lib/routes/github/pulls.js @@ -3,6 +3,7 @@ const config = require('@/config').value; const md = require('markdown-it')({ html: true, }); +const queryString = require('query-string'); module.exports = async (ctx) => { const user = ctx.params.user; @@ -15,10 +16,10 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url, - params: { + searchParams: queryString.stringify({ sort: 'created', access_token: config.github && config.github.access_token, - }, + }), }); const data = response.data; diff --git a/lib/routes/github/repos.js b/lib/routes/github/repos.js index a33bb7dba..20e2b5ae6 100644 --- a/lib/routes/github/repos.js +++ b/lib/routes/github/repos.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const config = require('@/config').value; +const queryString = require('query-string'); module.exports = async (ctx) => { const user = ctx.params.user; @@ -7,10 +8,10 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url: `https://api.github.com/users/${user}/repos`, - params: { + searchParams: queryString.stringify({ sort: 'created', access_token: config.github && config.github.access_token, - }, + }), }); const data = response.data; ctx.state.data = { diff --git a/lib/routes/github/star.js b/lib/routes/github/star.js index 1c7c39441..6610bd3b7 100644 --- a/lib/routes/github/star.js +++ b/lib/routes/github/star.js @@ -17,8 +17,7 @@ module.exports = async (ctx) => { headers: { Authorization: `bearer ${config.github.access_token}`, }, - json: true, - data: { + json: { query: ` { repository(owner: "${user}", name: "${repo}") { diff --git a/lib/routes/github/starred_repos.js b/lib/routes/github/starred_repos.js index 9f0e379de..92e602ff1 100644 --- a/lib/routes/github/starred_repos.js +++ b/lib/routes/github/starred_repos.js @@ -16,8 +16,7 @@ module.exports = async (ctx) => { headers: { Authorization: `bearer ${config.github.access_token}`, }, - json: true, - data: { + json: { query: ` { user(login: "${user}") { diff --git a/lib/routes/gov/zhengce/govall.js b/lib/routes/gov/zhengce/govall.js index 519444c03..4c831e736 100644 --- a/lib/routes/gov/zhengce/govall.js +++ b/lib/routes/gov/zhengce/govall.js @@ -12,7 +12,7 @@ module.exports = async (ctx) => { }); const query = `${params.toString()}&${advance}`; const res = await got.get(link, { - query: query.replace(/([\u4e00-\u9fa5])/g, (str) => encodeURIComponent(str)), + searchParams: query.replace(/([\u4e00-\u9fa5])/g, (str) => encodeURIComponent(str)), }); const $list = cheerio.load(res.data); diff --git a/lib/routes/gov/zhengce/wenjian.js b/lib/routes/gov/zhengce/wenjian.js index 8cda5837f..44e4a9a25 100644 --- a/lib/routes/gov/zhengce/wenjian.js +++ b/lib/routes/gov/zhengce/wenjian.js @@ -1,16 +1,17 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); +const queryString = require('query-string'); module.exports = async (ctx) => { const { pcodeJiguan } = ctx.params; const link = `http://sousuo.gov.cn/list.htm`; const res = await got.get(link, { - params: { + searchParams: queryString.stringify({ n: 20, sort: 'pubtime', t: 'paper', pcodeJiguan: pcodeJiguan ? pcodeJiguan : '', - }, + }), }); const $list = cheerio.load(res.data); diff --git a/lib/routes/gradcafe/result.js b/lib/routes/gradcafe/result.js index 3072a1b35..e3db9d684 100644 --- a/lib/routes/gradcafe/result.js +++ b/lib/routes/gradcafe/result.js @@ -1,12 +1,13 @@ const cheerio = require('cheerio'); const got = require('@/utils/got'); +const queryString = require('query-string'); const url = 'https://www.thegradcafe.com/survey/'; module.exports = async (ctx) => { const type = ctx.params.type; const res = await got.get(url, { - params: { + searchParams: queryString.stringify({ q: type, - }, + }), }); const $ = cheerio.load(res.data); const list = $('table.submission-table tbody tr'); diff --git a/lib/routes/greasyfork/scripts.js b/lib/routes/greasyfork/scripts.js index 2dc62542d..ade5478d7 100644 --- a/lib/routes/greasyfork/scripts.js +++ b/lib/routes/greasyfork/scripts.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); +const queryString = require('query-string'); module.exports = async (ctx) => { const language = ctx.params.language === 'all' ? 'zh-CN' : ctx.params.language; @@ -10,10 +11,10 @@ module.exports = async (ctx) => { const res = await got({ method: 'get', url: `https://greasyfork.org/${language}/scripts/${url}`, - params: { + searchParams: queryString.stringify({ filter_locale: filter_locale, sort: 'updated', - }, + }), }); const $ = cheerio.load(res.data); const list = $('.script-list').find('h2'); diff --git a/lib/routes/guet/news.js b/lib/routes/guet/news.js index fddffff13..0ee4854f7 100644 --- a/lib/routes/guet/news.js +++ b/lib/routes/guet/news.js @@ -46,10 +46,10 @@ module.exports = async (ctx) => { if (!infos[type]) { throw Error('参数不在可选范围之内'); } - const path = infos[type].path; + const path = infos[type].path.slice(1); const response = await got(path, { - baseUrl: host, + prefixUrl: host, }); const data = response.data; const $ = cheerio.load(data); diff --git a/lib/routes/hopper/index.js b/lib/routes/hopper/index.js index 818b0de34..e91a66208 100644 --- a/lib/routes/hopper/index.js +++ b/lib/routes/hopper/index.js @@ -1,6 +1,7 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); const dayjs = require('dayjs'); +const queryString = require('query-string'); module.exports = async (ctx) => { const from = ctx.params.from.toUpperCase(); @@ -14,10 +15,10 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url, - params: { + searchParams: queryString.stringify({ pid: 'website', c: 'flexweb', - }, + }), }); const $ = cheerio.load(response.data); diff --git a/lib/routes/houxu/live.js b/lib/routes/houxu/live.js index 5a009ef2f..d2240c120 100644 --- a/lib/routes/houxu/live.js +++ b/lib/routes/houxu/live.js @@ -14,7 +14,7 @@ module.exports = async (ctx) => { }); const itemsRes = await got(`${baseUrl}/api/1/lives/${id}/threads`, { - query: { + searchParams: { limit: 40, }, }); diff --git a/lib/routes/hpoi/info.js b/lib/routes/hpoi/info.js index c2cd6f9d2..6d3c4f6f7 100644 --- a/lib/routes/hpoi/info.js +++ b/lib/routes/hpoi/info.js @@ -1,19 +1,16 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); -const FormData = require('form-data'); module.exports = async (ctx) => { const { type = 'all' } = ctx.params; const baseUrl = 'https://www.hpoi.net'; const reqUrl = `${baseUrl}/user/home/ajax`; - const formData = new FormData(); - Object.entries({ - page: 1, - type: 'info', - catType: type, - }).forEach(([key, value]) => formData.append(key, value)); const response = await got.post(reqUrl, { - body: formData, + form: { + page: 1, + type: 'info', + catType: type, + }, }); const $ = cheerio.load(response.data.data.html); diff --git a/lib/routes/icourse163/newest.js b/lib/routes/icourse163/newest.js index b1c7dd268..92385295a 100644 --- a/lib/routes/icourse163/newest.js +++ b/lib/routes/icourse163/newest.js @@ -14,8 +14,7 @@ module.exports = async (ctx) => { headers: { Cookie: `NTESSTUDYSI=${csrfKey};`, }, - form: true, - data: { + form: { categoryId: -1, type: 30, orderBy: 10, diff --git a/lib/routes/imaijia/category.js b/lib/routes/imaijia/category.js index 7c810b14e..2708f5343 100644 --- a/lib/routes/imaijia/category.js +++ b/lib/routes/imaijia/category.js @@ -11,9 +11,8 @@ module.exports = async (ctx) => { headers: { Referer: url, }, - form: true, url: api_url, - data: { + form: { pageNo: 1, catid: `${category}`, }, diff --git a/lib/routes/infoq/recommend.js b/lib/routes/infoq/recommend.js index 0a546a615..3bfed9887 100644 --- a/lib/routes/infoq/recommend.js +++ b/lib/routes/infoq/recommend.js @@ -11,8 +11,7 @@ module.exports = async (ctx) => { headers: { Referer: pageUrl, }, - json: true, - data: { + json: { size: 5, }, }); diff --git a/lib/routes/infoq/topic.js b/lib/routes/infoq/topic.js index 8c70bafa8..30ecf31d3 100644 --- a/lib/routes/infoq/topic.js +++ b/lib/routes/infoq/topic.js @@ -13,8 +13,7 @@ module.exports = async (ctx) => { headers: { Referer: pageUrl, }, - json: true, - data: { + json: { id: paramId, }, }); @@ -27,8 +26,7 @@ module.exports = async (ctx) => { headers: { Referer: pageUrl, }, - json: true, - data: { + json: { size: 5, type: type, id: paramId, diff --git a/lib/routes/infoq/utils.js b/lib/routes/infoq/utils.js index 02c98ca83..0b860588e 100644 --- a/lib/routes/infoq/utils.js +++ b/lib/routes/infoq/utils.js @@ -14,8 +14,7 @@ const ProcessFeed = async (list, cache) => { headers: { Referer: link, }, - json: true, - data: { + json: { uuid: uuid, }, }); diff --git a/lib/routes/jingdong/zhongchou.js b/lib/routes/jingdong/zhongchou.js index ecc6bc947..bd211bb43 100644 --- a/lib/routes/jingdong/zhongchou.js +++ b/lib/routes/jingdong/zhongchou.js @@ -1,6 +1,7 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); const url = require('url'); +const queryString = require('query-string'); const contentUrl = 'https://z.jd.com/bigger/search.html'; const host = 'https://z.jd.com/'; @@ -48,7 +49,7 @@ module.exports = async (ctx) => { headers: { 'Content-type': 'application/x-www-form-urlencoded', }, - params: params, + searchParams: queryString.stringify(params), }); const $ = cheerio.load(response.data); diff --git a/lib/routes/juejin/pins.js b/lib/routes/juejin/pins.js index 6e4a55e64..8d96de0fd 100644 --- a/lib/routes/juejin/pins.js +++ b/lib/routes/juejin/pins.js @@ -4,8 +4,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'post', url: 'https://web-api.juejin.im/graphql', - json: true, - data: { operationName: '', query: '', variables: { size: 20, after: '', afterPosition: '' }, extensions: { query: { id: '964dab26a3f9997283d173b865509890' } } }, + json: { operationName: '', query: '', variables: { size: 20, after: '', afterPosition: '' }, extensions: { query: { id: '964dab26a3f9997283d173b865509890' } } }, headers: { 'X-Agent': 'Juejin/Web', }, diff --git a/lib/routes/konachan/post_popular_recent.js b/lib/routes/konachan/post_popular_recent.js index 9b753536a..84e71d1d0 100644 --- a/lib/routes/konachan/post_popular_recent.js +++ b/lib/routes/konachan/post_popular_recent.js @@ -1,4 +1,5 @@ const got = require('@/utils/got'); +const queryString = require('query-string'); module.exports = async (ctx) => { const { period = '1d' } = ctx.params; @@ -10,9 +11,9 @@ module.exports = async (ctx) => { method: 'get', baseUrl, url: '/post/popular_recent.json', - params: { + searchParams: queryString.stringify({ period, - }, + }), }); const posts = response.data; diff --git a/lib/routes/laosiji/hotshow.js b/lib/routes/laosiji/hotshow.js index 9f8309930..c41d8cf43 100644 --- a/lib/routes/laosiji/hotshow.js +++ b/lib/routes/laosiji/hotshow.js @@ -10,8 +10,7 @@ module.exports = async (ctx) => { headers: { Referer: link, }, - form: true, - data: { + form: { hotShowId: id, sort: 1, pageNo: 1, diff --git a/lib/routes/linkedkeeper/index.js b/lib/routes/linkedkeeper/index.js index 7ed91710c..3fcd8651b 100644 --- a/lib/routes/linkedkeeper/index.js +++ b/lib/routes/linkedkeeper/index.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); +const queryString = require('query-string'); module.exports = async (ctx) => { const type = ctx.params.type; @@ -8,10 +9,10 @@ module.exports = async (ctx) => { const res = await got({ method: 'get', url: `http://www.linkedkeeper.com/list/${type}.action`, - params: { + searchParams: queryString.stringify({ sid: id, tid: id, - }, + }), }); const $ = cheerio.load(res.data); const list = $('tbody').find('td'); diff --git a/lib/routes/liwushuo/index.js b/lib/routes/liwushuo/index.js index 1f4eae975..739c78953 100644 --- a/lib/routes/liwushuo/index.js +++ b/lib/routes/liwushuo/index.js @@ -4,7 +4,7 @@ module.exports = async (ctx) => { const baseUrl = 'https://www.liwushuo.com'; const link = `${baseUrl}/api/channels/1/items`; const res = await got(link, { - query: { + searchParams: { limit: 21, }, }); diff --git a/lib/routes/matters/latest.js b/lib/routes/matters/latest.js index 54af71409..33c9c2909 100644 --- a/lib/routes/matters/latest.js +++ b/lib/routes/matters/latest.js @@ -5,8 +5,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'post', url: 'https://server.matters.news/graphql', - json: true, - data: { + json: { operationName: 'NewestFeed', variables: { hasArticleDigestActionAuthor: false, diff --git a/lib/routes/mcbbs/forum.js b/lib/routes/mcbbs/forum.js index 26739e5a8..3a8d11ce9 100644 --- a/lib/routes/mcbbs/forum.js +++ b/lib/routes/mcbbs/forum.js @@ -1,20 +1,21 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); const utils = require('./utils'); +const queryString = require('query-string'); module.exports = async (ctx) => { const type = ctx.params.type; const response = await got(utils.forumUrl, { method: 'get', - params: { + searchParams: queryString.stringify({ mod: 'forumdisplay', fid: type, // 最新帖子 filter: 'lastpost', orderby: 'lastpost', - }, - baseUrl: utils.host, + }), + prefixUrl: utils.host, }); const data = response.data; const $ = cheerio.load(data); diff --git a/lib/routes/mcbbs/post.js b/lib/routes/mcbbs/post.js index e4411a977..451ddc7a4 100644 --- a/lib/routes/mcbbs/post.js +++ b/lib/routes/mcbbs/post.js @@ -1,20 +1,21 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); const utils = require('./utils'); +const queryString = require('query-string'); module.exports = async (ctx) => { const tid = ctx.params.tid; const authorid = ctx.params.authorid; const response = await got(utils.forumUrl, { method: 'get', - params: { + searchParams: queryString.stringify({ mod: 'viewthread', tid: tid, authorid: authorid, // 倒序查看帖子 ordertype: 1, - }, - baseUrl: utils.host, + }), + prefixUrl: utils.host, }); const data = response.data; const $ = cheerio.load(data); diff --git a/lib/routes/mcbbs/utils.js b/lib/routes/mcbbs/utils.js index ff1cb4e7e..5b1e89e41 100644 --- a/lib/routes/mcbbs/utils.js +++ b/lib/routes/mcbbs/utils.js @@ -1,6 +1,6 @@ const utils = { host: 'https://www.mcbbs.net', - forumUrl: '/forum.php', + forumUrl: 'forum.php', }; module.exports = utils; diff --git a/lib/routes/mi/miui/index.js b/lib/routes/mi/miui/index.js index 5d84fa087..c2a0e7cd9 100644 --- a/lib/routes/mi/miui/index.js +++ b/lib/routes/mi/miui/index.js @@ -1,4 +1,5 @@ const got = require('@/utils/got'); +const queryString = require('query-string'); const cacheLength = 5; @@ -11,15 +12,14 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', - baseUrl: 'http://update.miui.com', - url: '/updates/miota-fullrom.php', - params: { + url: 'http://update.miui.com/updates/miota-fullrom.php', + searchParams: queryString.stringify({ d: device, b: releaseType, r: regionName, l: 'zh_CN', n: '', - }, + }), }); const responseData = response.data; diff --git a/lib/routes/mihoyo/bh3.js b/lib/routes/mihoyo/bh3.js index 36083c03e..373fac390 100644 --- a/lib/routes/mihoyo/bh3.js +++ b/lib/routes/mihoyo/bh3.js @@ -1,4 +1,5 @@ const got = require('@/utils/got'); +const queryString = require('query-string'); module.exports = async (ctx) => { const url = 'https://www.bh3.com/index.php/news/_more'; @@ -21,10 +22,10 @@ module.exports = async (ctx) => { Referer: url, 'x-requested-with': 'XMLHttpRequest', }, - params: { + searchParams: queryString.stringify({ begin: new Date(), type: type, - }, + }), }); const data = response.data.data.data; diff --git a/lib/routes/ncm/djradio.js b/lib/routes/ncm/djradio.js index a9d1e728a..569146a56 100644 --- a/lib/routes/ncm/djradio.js +++ b/lib/routes/ncm/djradio.js @@ -9,8 +9,7 @@ module.exports = async (ctx) => { headers: { Referer: 'https://music.163.com/', }, - form: true, - data: { + form: { radioId: id, limit: 1000, offset: 0, diff --git a/lib/routes/ncm/playlist.js b/lib/routes/ncm/playlist.js index 6b4b886c2..5af6d8abe 100644 --- a/lib/routes/ncm/playlist.js +++ b/lib/routes/ncm/playlist.js @@ -9,8 +9,7 @@ module.exports = async (ctx) => { headers: { Referer: 'https://music.163.com/', }, - form: true, - data: { + form: { id: id, }, }); diff --git a/lib/routes/ncm/userplaylist.js b/lib/routes/ncm/userplaylist.js index 959b5a1d0..2b146f779 100644 --- a/lib/routes/ncm/userplaylist.js +++ b/lib/routes/ncm/userplaylist.js @@ -9,8 +9,7 @@ module.exports = async (ctx) => { headers: { Referer: 'https://music.163.com/', }, - form: true, - data: { + form: { uid: uid, limit: 1000, offset: 0, diff --git a/lib/routes/nga/forum.js b/lib/routes/nga/forum.js index 12284352d..6282964b0 100644 --- a/lib/routes/nga/forum.js +++ b/lib/routes/nga/forum.js @@ -15,8 +15,7 @@ module.exports = async (ctx) => { headers: { 'X-User-Agent': 'NGA_skull/6.0.5(iPhone10,3;iOS 12.0.1)', }, - form: true, - data: { + form: { fid, recommend: recommend ? 1 : 0, }, @@ -43,8 +42,7 @@ module.exports = async (ctx) => { headers: { 'X-User-Agent': 'NGA_skull/6.0.5(iPhone10,3;iOS 12.0.1)', }, - form: true, - data: { + form: { tid, }, }); diff --git a/lib/routes/nintendo/eshop_us.js b/lib/routes/nintendo/eshop_us.js index 9ac051356..12581d875 100644 --- a/lib/routes/nintendo/eshop_us.js +++ b/lib/routes/nintendo/eshop_us.js @@ -4,8 +4,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'post', url: `https://u3b6gr4ua3-dsn.algolia.net/1/indexes/*/queries?x-algolia-agent=Algolia%20for%20vanilla%20JavaScript%20(lite)%203.22.1%3BJS%20Helper%202.20.1&x-algolia-application-id=U3B6GR4UA3&x-algolia-api-key=9a20c93440cf63cf1a7008d75f7438bf`, - json: true, - data: { + json: { requests: [ { indexName: 'noa_aem_game_en_us_release_des', diff --git a/lib/routes/owspace/read.js b/lib/routes/owspace/read.js index 2aad03be0..c83087588 100644 --- a/lib/routes/owspace/read.js +++ b/lib/routes/owspace/read.js @@ -120,7 +120,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url: 'http://static.owspace.com/', - query: qs.stringify(queryData), + searchParams: qs.stringify(queryData), headers: { 'User-Agent': 'com.onewaystreet.weread/14', }, diff --git a/lib/routes/patchwork.kernel.org/comments.js b/lib/routes/patchwork.kernel.org/comments.js index 5112837c2..27259de18 100644 --- a/lib/routes/patchwork.kernel.org/comments.js +++ b/lib/routes/patchwork.kernel.org/comments.js @@ -1,6 +1,7 @@ const got = require('@/utils/got'); const cache = require('./cache'); const he = require('he'); +const queryString = require('query-string'); module.exports = async (ctx) => { const id = ctx.params.id; @@ -13,9 +14,9 @@ module.exports = async (ctx) => { const response = await got({ method: 'get', url, - params: { + searchParams: queryString.stringify({ order: '-date', - }, + }), }); const data = response.data; diff --git a/lib/routes/pingwest/status.js b/lib/routes/pingwest/status.js index db4a97834..3a3944064 100644 --- a/lib/routes/pingwest/status.js +++ b/lib/routes/pingwest/status.js @@ -5,7 +5,7 @@ module.exports = async (ctx) => { const baseUrl = 'https://www.pingwest.com'; const url = `${baseUrl}/api/state/list`; const response = await got(url, { - query: { + searchParams: { page: 1, }, headers: { diff --git a/lib/routes/pingwest/tag.js b/lib/routes/pingwest/tag.js index c29747df6..fd640605d 100644 --- a/lib/routes/pingwest/tag.js +++ b/lib/routes/pingwest/tag.js @@ -18,7 +18,7 @@ module.exports = async (ctx) => { }); const url = `${baseUrl}/api/tag_article_list`; const response = await got(url, { - query: { + searchParams: { page: 1, id: tagId, type, diff --git a/lib/routes/pingwest/user.js b/lib/routes/pingwest/user.js index 81204ddd3..cf40cabfe 100644 --- a/lib/routes/pingwest/user.js +++ b/lib/routes/pingwest/user.js @@ -21,7 +21,7 @@ module.exports = async (ctx) => { }); const url = `${baseUrl}/api/user_data`; const response = await got(url, { - query: { + searchParams: { page: 1, user_id: realUid, tab: type, diff --git a/lib/routes/pintu360/index.js b/lib/routes/pintu360/index.js index 68229f216..5e76b1301 100644 --- a/lib/routes/pintu360/index.js +++ b/lib/routes/pintu360/index.js @@ -10,8 +10,7 @@ module.exports = async (ctx) => { headers: { Referer: 'https://www.pintu360.com/', }, - form: true, - data: { + form: { fnName: 'getArticleList', type: type === '0' ? 'recommend' : 'classId', id: type, diff --git a/lib/routes/pixiv/api/getBookmarks.js b/lib/routes/pixiv/api/getBookmarks.js index 658724f4a..a446f8e3b 100644 --- a/lib/routes/pixiv/api/getBookmarks.js +++ b/lib/routes/pixiv/api/getBookmarks.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const maskHeader = require('../constants').maskHeader; +const queryString = require('query-string'); /** * 获取用户的收藏 @@ -16,9 +17,9 @@ module.exports = async function getBookmarks(user_id, token) { ...maskHeader, Authorization: 'Bearer ' + token, }, - params: { + searchParams: queryString.stringify({ user_id: user_id, restrict: 'public', - }, + }), }); }; diff --git a/lib/routes/pixiv/api/getIllustFollows.js b/lib/routes/pixiv/api/getIllustFollows.js index f857fe3fe..d73908ca5 100644 --- a/lib/routes/pixiv/api/getIllustFollows.js +++ b/lib/routes/pixiv/api/getIllustFollows.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const maskHeader = require('../constants').maskHeader; +const queryString = require('query-string'); /** * 获取用户关注的画师们的最新插画 @@ -14,8 +15,8 @@ module.exports = async function getUserIllustFollows(token) { ...maskHeader, Authorization: 'Bearer ' + token, }, - params: { + searchParams: queryString.stringify({ restrict: 'public', - }, + }), }); }; diff --git a/lib/routes/pixiv/api/getIllusts.js b/lib/routes/pixiv/api/getIllusts.js index c2d563036..cd764d9c7 100644 --- a/lib/routes/pixiv/api/getIllusts.js +++ b/lib/routes/pixiv/api/getIllusts.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const maskHeader = require('../constants').maskHeader; +const queryString = require('query-string'); /** * 获取用户插画作品 @@ -15,10 +16,10 @@ module.exports = async function getIllusts(user_id, token) { ...maskHeader, Authorization: 'Bearer ' + token, }, - params: { + searchParams: queryString.stringify({ user_id: user_id, filter: 'for_ios', type: 'illust', - }, + }), }); }; diff --git a/lib/routes/pixiv/api/getRanking.js b/lib/routes/pixiv/api/getRanking.js index 33c7994cf..da1c48dae 100644 --- a/lib/routes/pixiv/api/getRanking.js +++ b/lib/routes/pixiv/api/getRanking.js @@ -1,6 +1,7 @@ const got = require('@/utils/got'); const maskHeader = require('../constants').maskHeader; const assert = require('assert'); +const queryString = require('query-string'); const allowMode = ['day', 'week', 'month', 'day_male', 'day_female', 'week_original', 'week_rookie', 'day_r18', 'day_male_r18', 'day_female_r18', 'week_r18', 'week_r18g']; @@ -20,12 +21,12 @@ module.exports = async function getRanking(mode, date, token) { ...maskHeader, Authorization: 'Bearer ' + token, }, - params: { + searchParams: queryString.stringify({ mode: mode, filter: 'for_ios', ...(date && { date: `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()}`, }), - }, + }), }); }; diff --git a/lib/routes/pixiv/api/getUserDetail.js b/lib/routes/pixiv/api/getUserDetail.js index c1717ed4d..7c750adbb 100644 --- a/lib/routes/pixiv/api/getUserDetail.js +++ b/lib/routes/pixiv/api/getUserDetail.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const maskHeader = require('../constants').maskHeader; +const queryString = require('query-string'); /** * pixiv 用户 @@ -21,8 +22,8 @@ module.exports = async function getUserDetail(user_id, token) { ...maskHeader, Authorization: 'Bearer ' + token, }, - params: { + searchParams: queryString.stringify({ user_id: user_id, - }, + }), }); }; diff --git a/lib/routes/pixiv/api/searchIllust.js b/lib/routes/pixiv/api/searchIllust.js index 503b28607..affb418a8 100644 --- a/lib/routes/pixiv/api/searchIllust.js +++ b/lib/routes/pixiv/api/searchIllust.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const maskHeader = require('../constants').maskHeader; +const queryString = require('query-string'); /** * 按时间排序搜索内容 @@ -15,11 +16,11 @@ module.exports = async function searchIllust(keyword, token) { ...maskHeader, Authorization: 'Bearer ' + token, }, - params: { + searchParams: queryString.stringify({ word: keyword, search_target: 'partial_match_for_tags', sort: 'date_desc', filter: 'for_ios', - }, + }), }); }; diff --git a/lib/routes/pixiv/api/searchPopularIllust.js b/lib/routes/pixiv/api/searchPopularIllust.js index e6581b28b..ded3f1bbe 100644 --- a/lib/routes/pixiv/api/searchPopularIllust.js +++ b/lib/routes/pixiv/api/searchPopularIllust.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const maskHeader = require('../constants').maskHeader; +const queryString = require('query-string'); /** * 按热门排序搜索内容 @@ -15,10 +16,10 @@ module.exports = async function searchPopularIllust(keyword, token) { ...maskHeader, Authorization: 'Bearer ' + token, }, - params: { + searchParams: queryString.stringify({ word: keyword, search_target: 'partial_match_for_tags', filter: 'for_ios', - }, + }), }); }; diff --git a/lib/routes/pixiv/token.js b/lib/routes/pixiv/token.js index b319808a3..23ceb9a6b 100644 --- a/lib/routes/pixiv/token.js +++ b/lib/routes/pixiv/token.js @@ -1,7 +1,6 @@ const config = require('@/config').value; const logger = require('@/utils/logger'); const wait = require('@/utils/wait'); -const FormData = require('form-data'); const got = require('@/utils/got'); const maskHeader = require('./constants').maskHeader; const md5 = require('@/utils/md5'); @@ -19,28 +18,19 @@ const authorizationInfo = { }; async function getToken() { - const data = new FormData(); - const jsonData = { - ...authorizationInfo, - get_secure_url: 1, - grant_type: 'password', - }; - for (const key in jsonData) { - if (jsonData.hasOwnProperty(key)) { - const element = jsonData[key]; - data.append(key, element); - } - } const localTime = new Date().toISOString().replace(/\..+/, '') + '+00:00'; const response = await got({ method: 'post', url: 'https://oauth.secure.pixiv.net/auth/token', - data: data, + form: { + ...authorizationInfo, + get_secure_url: 1, + grant_type: 'password', + }, headers: { 'X-Client-Time': localTime, 'X-Client-Hash': md5(localTime + authorizationInfo.hash_secret), ...maskHeader, - ...data.getHeaders(), }, }).catch(function() { logger.error('Pixiv login fail.'); @@ -49,26 +39,17 @@ async function getToken() { } async function refreshToken(refresh_token) { - const data = new FormData(); - const jsonData = { - ...authorizationInfo, - get_secure_url: 1, - grant_type: 'refresh_token', - refresh_token: refresh_token, - }; - for (const key in jsonData) { - if (jsonData.hasOwnProperty(key)) { - const element = jsonData[key]; - data.append(key, element); - } - } const response = await got({ method: 'post', url: 'https://oauth.secure.pixiv.net/auth/token', - data: data, + form: { + ...authorizationInfo, + get_secure_url: 1, + grant_type: 'refresh_token', + refresh_token: refresh_token, + }, headers: { ...maskHeader, - ...data.getHeaders(), }, }); return response.data.response; diff --git a/lib/routes/pmcaff/list.js b/lib/routes/pmcaff/list.js index 4af69f812..31fa3084c 100644 --- a/lib/routes/pmcaff/list.js +++ b/lib/routes/pmcaff/list.js @@ -14,8 +14,7 @@ module.exports = async (ctx) => { headers: { Referer: url, }, - json: true, - data: { + json: { page: 1, feed_sum: 15, type: typeid, diff --git a/lib/routes/polimi/news.js b/lib/routes/polimi/news.js index 84717343e..4f1201941 100644 --- a/lib/routes/polimi/news.js +++ b/lib/routes/polimi/news.js @@ -1,4 +1,5 @@ const buildData = require('@/utils/common-config'); +const queryString = require('query-string'); module.exports = async (ctx) => { let link = `https://www.polimi.it/tutte-le-news/`; @@ -9,9 +10,9 @@ module.exports = async (ctx) => { link, url: link, title: `Polimi News`, - params: { + searchParams: queryString.stringify({ homeLink: 'https://www.polimi.it', - }, + }), item: { item: '.container .no', title: `$('h3').text()`, diff --git a/lib/routes/queshu/book.js b/lib/routes/queshu/book.js index c016eac81..a2769b4f3 100644 --- a/lib/routes/queshu/book.js +++ b/lib/routes/queshu/book.js @@ -1,4 +1,5 @@ const buildData = require('@/utils/common-config'); +const queryString = require('query-string'); module.exports = async (ctx) => { const bookid = ctx.params.bookid; @@ -9,10 +10,10 @@ module.exports = async (ctx) => { url: link, title: `%title%`, allowEmpty: true, - params: { + searchParams: queryString.stringify({ title: `$('#book_left > #h1').text().trim() + ' - 单品活动信息 - 缺书网'`, host, - }, + }), item: { item: '.stacked.right_state > a', title: `$('.right_item .bodycol_258').text()`, diff --git a/lib/routes/queshu/sale.js b/lib/routes/queshu/sale.js index 1a2a0ea58..276d58fdb 100644 --- a/lib/routes/queshu/sale.js +++ b/lib/routes/queshu/sale.js @@ -1,4 +1,5 @@ const buildData = require('@/utils/common-config'); +const queryString = require('query-string'); module.exports = async (ctx) => { const link = `http://www.queshu.com/sale/`; @@ -7,10 +8,10 @@ module.exports = async (ctx) => { link, url: link, title: `%title%`, - params: { + searchParams: queryString.stringify({ title: '图书促销 - 缺书网', host, - }, + }), item: { item: '#tb_sale tr', title: `$('.news_sale_detail .sale_btn').text() + ':' + $('.news_sale_title a').text()`, diff --git a/lib/routes/saraba1st/thread.js b/lib/routes/saraba1st/thread.js index c23f9267e..7c06c31cb 100644 --- a/lib/routes/saraba1st/thread.js +++ b/lib/routes/saraba1st/thread.js @@ -2,16 +2,17 @@ const url = require('url'); const got = require('@/utils/got'); const cheerio = require('cheerio'); const date = require('@/utils/date'); +const queryString = require('query-string'); module.exports = async (ctx) => { const tid = ctx.params.tid; const res = await got.get('https://bbs.saraba1st.com/2b/forum.php', { - params: { + searchParams: queryString.stringify({ mod: 'viewthread', tid: tid, ordertype: 1, - }, + }), }); const $ = cheerio.load(res.data); diff --git a/lib/routes/sf/sffq-announce.js b/lib/routes/sf/sffq-announce.js index fcf1fb9c9..af9dd8ec0 100644 --- a/lib/routes/sf/sffq-announce.js +++ b/lib/routes/sf/sffq-announce.js @@ -5,8 +5,7 @@ module.exports = async (ctx) => { await got({ method: 'post', url: 'https://qiao.sf-express.com/menu/getListNews.pub', - json: true, - data: {}, + json: {}, }) ).data; diff --git a/lib/routes/steam/news.js b/lib/routes/steam/news.js index 854433b65..c139bb94b 100644 --- a/lib/routes/steam/news.js +++ b/lib/routes/steam/news.js @@ -1,10 +1,11 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); +const queryString = require('query-string'); module.exports = async (ctx) => { const { appids } = ctx.params; const { data: html } = await got.get(`https://store.steampowered.com/news/`, { - params: { appids }, + searchParams: queryString.stringify({ appids }), }); const $ = cheerio.load(html); diff --git a/lib/routes/steam/search.js b/lib/routes/steam/search.js index 40dbb4738..7e76ca4e3 100644 --- a/lib/routes/steam/search.js +++ b/lib/routes/steam/search.js @@ -1,12 +1,13 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); const qs = require('querystring'); +const queryString = require('query-string'); module.exports = async (ctx) => { const { params } = ctx.params; const query = qs.parse(params); const { data: html } = await got.get(`https://store.steampowered.com/search/results`, { - params: query, + searchParams: queryString.stringify(query), }); const $ = cheerio.load(html); diff --git a/lib/routes/topys/article.js b/lib/routes/topys/article.js index b68f41b41..84e4dcb72 100644 --- a/lib/routes/topys/article.js +++ b/lib/routes/topys/article.js @@ -16,8 +16,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'post', url: 'https://www.topys.cn/ajax/article/get_article_list', - form: true, - data: { + form: { needloginpage: 2, islogin: 0, module: 'article', diff --git a/lib/routes/universities/csu/job.js b/lib/routes/universities/csu/job.js index 52e761a6c..510768a66 100644 --- a/lib/routes/universities/csu/job.js +++ b/lib/routes/universities/csu/job.js @@ -8,10 +8,7 @@ module.exports = async (ctx) => { const type = ctx.params.type || 1; const link = 'http://jobsky.csu.edu.cn/Home/PartialArticleList'; const response = await got.post(link, { - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - body: 'pageindex=1&pagesize=10&typeid=' + type + '&followingdates=-1', + form: 'pageindex=1&pagesize=10&typeid=' + type + '&followingdates=-1', }); const $ = cheerio.load('' + response.data + '
'); const list = $('tr'); diff --git a/lib/routes/universities/gdut/news.js b/lib/routes/universities/gdut/news.js index ab9d21425..e1adb9b4f 100644 --- a/lib/routes/universities/gdut/news.js +++ b/lib/routes/universities/gdut/news.js @@ -39,8 +39,7 @@ async function getCookie() { Cookie: cookie, Referer: site + login, }, - body: postdata, - form: true, + form: postdata, }).catch((e) => { if (e.statusCode === 302) { if (/UserLogin/.test(e.headers.location)) { diff --git a/lib/routes/weibo/super_index.js b/lib/routes/weibo/super_index.js index cd7a322e0..89c824993 100644 --- a/lib/routes/weibo/super_index.js +++ b/lib/routes/weibo/super_index.js @@ -1,16 +1,17 @@ const got = require('@/utils/got'); const weiboUtils = require('./utils'); const date = require('@/utils/date'); +const queryString = require('query-string'); module.exports = async (ctx) => { const id = ctx.params.id; const res = await got.get('https://m.weibo.cn/api/container/getIndex', { - params: { + searchParams: queryString.stringify({ containerid: `${id}_-_feed`, luicode: '10000011', lfid: `${id}_-_main`, - }, + }), headers: { Referer: `https://m.weibo.cn/p/index?containerid=${id}_-_soul&luicode=10000011&lfid=${id}_-_main`, 'MWeibo-Pwa': '1', diff --git a/lib/routes/westore/new.js b/lib/routes/westore/new.js index 0808da5b0..254fd88ac 100644 --- a/lib/routes/westore/new.js +++ b/lib/routes/westore/new.js @@ -5,8 +5,7 @@ module.exports = async (ctx) => { const response = await got({ method: 'post', url: 'https://uapi.vip.qq.com/Api/api.brand.productssrf', - json: true, - data: { + json: { page: 1, per_page: 20, asc: 0, diff --git a/lib/routes/x-mol/news.js b/lib/routes/x-mol/news.js index 1a4a1336a..8e3b1799f 100644 --- a/lib/routes/x-mol/news.js +++ b/lib/routes/x-mol/news.js @@ -4,10 +4,10 @@ const utils = require('./utils'); module.exports = async (ctx) => { const tag = ctx.params.tag; - const path = tag ? `/news/tag/${tag}` : '/news/index'; + const path = tag ? `news/tag/${tag}` : 'news/index'; const response = await got(path, { method: 'GET', - baseUrl: utils.host, + prefixUrl: utils.host, }); const data = response.data; const $ = cheerio.load(data); diff --git a/lib/routes/x-mol/paper.js b/lib/routes/x-mol/paper.js index 9b58440b4..cf4f25570 100644 --- a/lib/routes/x-mol/paper.js +++ b/lib/routes/x-mol/paper.js @@ -1,14 +1,15 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); const utils = require('./utils'); +const queryString = require('query-string'); module.exports = async (ctx) => { const type = ctx.params.type; const magazine = ctx.params.magazine; - const path = `/paper/${type}/${magazine}`; + const path = `paper/${type}/${magazine}`; const response = await got(path, { method: 'GET', - baseUrl: utils.host, + prefixUrl: utils.host, headers: { Cookie: 'closeFloatWindow=true; journalIndexViewType=list; journalSort=publishDate', }, @@ -38,9 +39,9 @@ module.exports = async (ctx) => { imageUrl = (await ctx.cache.tryGet(getLink, async () => { const result = await got.get(getLink, { - params: { + searchParams: queryString.stringify({ attachmentId: imageId, - }, + }), }); return result.data; })) || noPic; diff --git a/lib/routes/xueqiu/favorite.js b/lib/routes/xueqiu/favorite.js index 090471d3a..971952e77 100644 --- a/lib/routes/xueqiu/favorite.js +++ b/lib/routes/xueqiu/favorite.js @@ -1,4 +1,5 @@ const got = require('@/utils/got'); +const queryString = require('query-string'); module.exports = async (ctx) => { const id = ctx.params.id; @@ -12,9 +13,9 @@ module.exports = async (ctx) => { const res2 = await got({ method: 'get', url: 'https://xueqiu.com/favorites.json', - params: { + searchParams: queryString.stringify({ userid: id, - }, + }), headers: { Cookie: token, Referer: `https://xueqiu.com/u/${id}`, diff --git a/lib/routes/xueqiu/hots.js b/lib/routes/xueqiu/hots.js index e4b8e77d2..421afc248 100644 --- a/lib/routes/xueqiu/hots.js +++ b/lib/routes/xueqiu/hots.js @@ -1,4 +1,5 @@ const got = require('@/utils/got'); +const queryString = require('query-string'); module.exports = async (ctx) => { const res1 = await got({ @@ -10,14 +11,14 @@ module.exports = async (ctx) => { const res2 = await got({ method: 'get', url: 'https://xueqiu.com/statuses/hots.json', - params: { + searchParams: queryString.stringify({ a: '1', count: '10', page: '1', scope: 'day', type: 'status', meigu: '0', - }, + }), headers: { Cookie: token, Referer: `https://xueqiu.com/`, diff --git a/lib/routes/xueqiu/stock_info.js b/lib/routes/xueqiu/stock_info.js index 0e411404f..1f82981db 100644 --- a/lib/routes/xueqiu/stock_info.js +++ b/lib/routes/xueqiu/stock_info.js @@ -1,5 +1,6 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); +const queryString = require('query-string'); module.exports = async (ctx) => { const id = ctx.params.id; @@ -34,7 +35,7 @@ module.exports = async (ctx) => { const res2 = await got({ method: 'get', url: query_url, - params: { + searchParams: queryString.stringify({ symbol_id: id, symbol: id, source: source, @@ -43,7 +44,7 @@ module.exports = async (ctx) => { sort: 'alpha', comment: '0', hl: '0', - }, + }), headers: { Cookie: token, Referer: `https://xueqiu.com/u/${id}`, diff --git a/lib/routes/xueqiu/user.js b/lib/routes/xueqiu/user.js index 8764f727e..9a7fa988b 100644 --- a/lib/routes/xueqiu/user.js +++ b/lib/routes/xueqiu/user.js @@ -1,4 +1,5 @@ const got = require('@/utils/got'); +const queryString = require('query-string'); module.exports = async (ctx) => { const id = ctx.params.id; @@ -22,11 +23,11 @@ module.exports = async (ctx) => { const res2 = await got({ method: 'get', url: 'https://xueqiu.com/v4/statuses/user_timeline.json', - params: { + searchParams: queryString.stringify({ user_id: id, type: type, source: source, - }, + }), headers: { Cookie: token, Referer: `https://xueqiu.com/u/${id}`, diff --git a/lib/routes/xueqiu/user_stock.js b/lib/routes/xueqiu/user_stock.js index eeb575fac..4b5809d3e 100644 --- a/lib/routes/xueqiu/user_stock.js +++ b/lib/routes/xueqiu/user_stock.js @@ -1,4 +1,5 @@ const got = require('@/utils/got'); +const queryString = require('query-string'); module.exports = async (ctx) => { const id = ctx.params.id; @@ -22,9 +23,9 @@ module.exports = async (ctx) => { const res3 = await got({ method: 'get', url: 'https://xueqiu.com/statuses/original/show.json', - params: { + searchParams: queryString.stringify({ user_id: id, - }, + }), headers: { Cookie: token, Referer: `https://xueqiu.com/u/${id}`, diff --git a/lib/routes/yande.re/post_popular_recent.js b/lib/routes/yande.re/post_popular_recent.js index fd0705e28..da5f1dae5 100644 --- a/lib/routes/yande.re/post_popular_recent.js +++ b/lib/routes/yande.re/post_popular_recent.js @@ -1,13 +1,14 @@ const got = require('@/utils/got'); +const queryString = require('query-string'); module.exports = async (ctx) => { const { period = '1d' } = ctx.params; const response = await got({ url: 'https://yande.re/post/popular_recent.json', - params: { + searchParams: queryString.stringify({ period, - }, + }), }); const posts = response.data; diff --git a/lib/routes/ziroom/room.js b/lib/routes/ziroom/room.js index 11555de6c..706d9f6b5 100644 --- a/lib/routes/ziroom/room.js +++ b/lib/routes/ziroom/room.js @@ -13,8 +13,7 @@ module.exports = async (ctx) => { headers: { Referer: `http://${domain}/${city.toUpperCase()}/search.html`, }, - form: true, - data: { + form: { recent_money: 0, sort: 0, is_whole: iswhole, diff --git a/lib/utils/got.js b/lib/utils/got.js index d4e385f71..af713f942 100644 --- a/lib/utils/got.js +++ b/lib/utils/got.js @@ -1,11 +1,10 @@ const logger = require('./logger'); const config = require('@/config').value; const got = require('got'); -const queryString = require('query-string'); const custom = got.extend({ retry: { - retries: config.requestRetry, + limit: config.requestRetry, statusCodes: [408, 413, 429, 500, 502, 503, 504, 404], // add 404 to default for unit test }, hooks: { @@ -31,18 +30,6 @@ const custom = got.extend({ if (options.data) { options.body = options.body || options.data; } - if (options.responseType === 'buffer') { - options.encoding = null; - } - if (options.params) { - options.query = options.query || queryString.stringify(options.params); - } - if (options.query) { - options.searchParams = options.query; // for Got v11 after - } - if (options.baseUrl) { - options.prefixUrl = options.baseUrl; // for Got next version - } }, ], }, diff --git a/lib/utils/request-wrapper.js b/lib/utils/request-wrapper.js index 4641f29e0..f464de12a 100644 --- a/lib/utils/request-wrapper.js +++ b/lib/utils/request-wrapper.js @@ -101,8 +101,12 @@ const httpWrap = (func) => { const origin = func; return function(url, request) { if (typeof url === 'object') { - const req = url; - requestWrapper(req.url || req.href || `${req.protocol}//${req.hostname}${req.path}`, req); + if (url instanceof URL) { + requestWrapper(url.toString(), request); + } else { + const req = url; + requestWrapper(req.url || req.href || `${req.protocol}//${req.hostname}${req.path}`, req); + } } else { requestWrapper(url, request); } diff --git a/package.json b/package.json index a245fe6ec..9e29498c7 100644 --- a/package.json +++ b/package.json @@ -73,10 +73,9 @@ "emailjs-imap-client": "3.0.7", "etag": "1.8.1", "fanfou-sdk": "4.1.0", - "form-data": "3.0.0", "git-rev-sync": "2.0.0", "googleapis": "47.0.0", - "got": "9.6.0", + "got": "10.4.0", "he": "1.2.0", "iconv-lite": "0.5.1", "jsdom": "16.1.0", @@ -98,7 +97,7 @@ "redis": "2.8.0", "require-all": "3.0.0", "rss-parser": "3.7.4", - "socks-proxy-agent": "4.0.2", + "socks-proxy-agent": "TooTallNate/node-socks-proxy-agent#master", "tunnel": "0.0.6", "twit": "2.2.11", "winston": "3.2.1" diff --git a/test/utils/got.js b/test/utils/got.js index f93232995..9bb92fc0c 100644 --- a/test/utils/got.js +++ b/test/utils/got.js @@ -16,29 +16,22 @@ describe('got', () => { it('retry', async () => { const requestRun = jest.fn(); - let requestTime; nock('http://rsshub.test') .get('/testRerty') .times(config.requestRetry + 1) .reply(function() { requestRun(); - const now = new Date(); - if (requestTime) { - expect(now - requestTime).toBeGreaterThanOrEqual(100); - expect(now - requestTime).toBeLessThan(120); - } - requestTime = new Date(); return [404, '0']; }); try { await got.get('http://rsshub.test/testRerty'); } catch (error) { - expect(error.name).toBe('RequestError'); + expect(error.name).toBe('HTTPError'); } // retries - expect(requestRun).toHaveBeenCalledTimes(config.requestRetry); + expect(requestRun).toHaveBeenCalledTimes(config.requestRetry + 1); }); it('axios', async () => { @@ -48,10 +41,8 @@ describe('got', () => { return [200, '{"code": 0}']; }); - const response1 = await got.post('post', { - baseUrl: 'http://rsshub.test/', - form: true, - data: { + const response1 = await got.post('http://rsshub.test/post', { + form: { test: 1, }, }); @@ -59,19 +50,5 @@ describe('got', () => { expect(response1.status).toBe(200); expect(response1.body).toBe('{"code": 0}'); expect(response1.data.code).toBe(0); - - nock('http://rsshub.test') - .get(/^\/params/) - .reply(function() { - expect(this.req.path).toBe('/params?test=1'); - return [200, '']; - }); - - await got.get('http://rsshub.test/params', { - params: { - test: 1, - }, - responseType: 'buffer', - }); }); }); diff --git a/test/utils/request-wrapper.js b/test/utils/request-wrapper.js index df181fb90..2d8959401 100644 --- a/test/utils/request-wrapper.js +++ b/test/utils/request-wrapper.js @@ -21,7 +21,11 @@ afterEach(() => { const origin = func; return function(url, request) { if (typeof url === 'object') { - check(url); + if (url instanceof URL) { + check(request); + } else { + check(url); + } } else { check(request); } @@ -34,26 +38,18 @@ afterEach(() => { describe('got', () => { it('headers', async () => { - nock('http://rsshub.test') + nock(/rsshub\.test/) .get(/.*/) - .times(3) + .times(4) .reply(function() { expect(this.req.headers.server).toBe('RSSHub'); expect(this.req.headers.referer).toBe('http://www.rsshub.test'); return [200, simpleResponse]; }); - nock(/rsshub\.test/) - .get(/.*/) - .times(2) - .reply(function() { - expect(this.req.headers.referer).toBe('https://www.rsshub.test'); - return [200, simpleResponse]; - }); await got.get('http://rsshub.test/test'); await got.get('http://rsshub.test'); - await got.get('rsshub.test/test'); - await got.get('api.rsshub.test/test'); + await got.get('http://api.rsshub.test/test'); await parser.parseURL('http://rsshub.test/test'); }); @@ -67,10 +63,10 @@ describe('got', () => { require('../../lib/utils/request-wrapper'); check = (request) => { expect(request.agent.constructor.name).toBe('SocksProxyAgent'); - expect(request.agent.options.href).toBe('socks://rsshub.proxy:2333'); + expect(request.agent.proxy.href).toBe('socks://rsshub.proxy:2333'); }; - nock('http://rsshub.test') + nock(/rsshub\.test/) .get('/proxy') .times(2) .reply(200, simpleResponse); @@ -92,7 +88,7 @@ describe('got', () => { expect(request.agent.options.proxy.port).toBe(2333); }; - nock('http://rsshub.test') + nock(/rsshub\.test/) .get('/proxy') .times(2) .reply(200, simpleResponse); @@ -114,7 +110,7 @@ describe('got', () => { expect(request.agent.options.proxy.port).toBe(2333); }; - nock('http://rsshub.test') + nock(/rsshub\.test/) .get('/proxy') .times(2) .reply(200, simpleResponse); @@ -132,7 +128,7 @@ describe('got', () => { jest.resetModules(); require('../../lib/utils/request-wrapper'); - nock('http://rsshub.test') + nock(/rsshub\.test/) .get('/auth') .times(2) .reply(function() { @@ -155,17 +151,17 @@ describe('got', () => { check = (request) => { if (request.path === '/url_regex') { expect(request.agent.constructor.name).toBe('SocksProxyAgent'); - expect(request.agent.options.href).toBe('socks://rsshub.proxy:2333'); + expect(request.agent.proxy.href).toBe('socks://rsshub.proxy:2333'); } else if (request.path === '/proxy') { expect(request.agent).toBe(undefined); } }; - nock('http://rsshub.test') + nock(/rsshub\.test/) .get('/url_regex') .times(2) .reply(() => [200, simpleResponse]); - nock('http://rsshub.test') + nock(/rsshub\.test/) .get('/proxy') .times(2) .reply(() => [200, simpleResponse]); diff --git a/yarn.lock b/yarn.lock index ad262ff18..43452d016 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1158,6 +1158,11 @@ resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== +"@sindresorhus/is@^1.0.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-1.2.0.tgz#63ce3638cb85231f3704164c90a18ef816da3fb7" + integrity sha512-mwhXGkRV5dlvQc4EgPDxDxO6WuMBVymGFd1CA+2Y+z5dG9MNspoQ+AWjl/Ld1MnpCL8AKbosZlDVohqcIwuWsw== + "@sinonjs/commons@^1.7.0": version "1.7.0" resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.7.0.tgz#f90ffc52a2e519f018b13b6c4da03cbff36ebed6" @@ -1172,6 +1177,13 @@ dependencies: defer-to-connect "^1.0.1" +"@szmarczak/http-timer@^4.0.0": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-4.0.0.tgz#309789ccb7842ff1e41848cf43da587f78068836" + integrity sha512-3yoXv8OtGr/r3R5gaWWNQ3VUoQ5G3Gmo8DXX95V14ZVvE2b7Pj6Ide9uIDON8ym4D/ItyfL9ejohYUPqOyvRXw== + dependencies: + defer-to-connect "^1.1.1" + "@types/accepts@*": version "1.3.5" resolved "https://registry.yarnpkg.com/@types/accepts/-/accepts-1.3.5.tgz#c34bec115cfc746e04fe5a059df4ce7e7b391575" @@ -1220,6 +1232,16 @@ "@types/connect" "*" "@types/node" "*" +"@types/cacheable-request@^6.0.1": + version "6.0.1" + resolved "https://registry.yarnpkg.com/@types/cacheable-request/-/cacheable-request-6.0.1.tgz#5d22f3dded1fd3a84c0bbeb5039a7419c2c91976" + integrity sha512-ykFq2zmBGOCbpIXtoVbz4SKY5QriWPh3AjyU4G74RYbtt5yOc5OfaY75ftjg7mikMOla1CTGpX3lLbuJh8DTrQ== + dependencies: + "@types/http-cache-semantics" "*" + "@types/keyv" "*" + "@types/node" "*" + "@types/responselike" "*" + "@types/cheerio@0.22.16": version "0.22.16" resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.16.tgz#c748a97b8a6f781b04bbda4a552e11b35bcc77e4" @@ -1294,6 +1316,11 @@ resolved "https://registry.yarnpkg.com/@types/http-assert/-/http-assert-1.5.1.tgz#d775e93630c2469c2f980fc27e3143240335db3b" integrity sha512-PGAK759pxyfXE78NbKxyfRcWYA/KwW17X290cNev/qAsn9eQIxkH4shoNBafH37wewhDG/0p1cHPbK6+SzZjWQ== +"@types/http-cache-semantics@*": + version "4.0.0" + resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.0.tgz#9140779736aa2655635ee756e2467d787cfe8a2a" + integrity sha512-c3Xy026kOF7QOTn00hbIllV1dLR9hG9NkSrLQgCVs8NF6sBU+VGWjD3wLPhmh1TYAc7ugCFsvHYMN4VcBN1U1A== + "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0", "@types/istanbul-lib-coverage@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -1319,6 +1346,13 @@ resolved "https://registry.yarnpkg.com/@types/keygrip/-/keygrip-1.0.1.tgz#ff540462d2fb4d0a88441ceaf27d287b01c3d878" integrity sha1-/1QEYtL7TQqIRBzq8n0oewHD2Hg= +"@types/keyv@*": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@types/keyv/-/keyv-3.1.1.tgz#e45a45324fca9dab716ab1230ee249c9fb52cfa7" + integrity sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw== + dependencies: + "@types/node" "*" + "@types/koa-compose@*": version "3.2.4" resolved "https://registry.yarnpkg.com/@types/koa-compose/-/koa-compose-3.2.4.tgz#76a461634a59c3e13449831708bb9b355fb1548e" @@ -1368,6 +1402,13 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== +"@types/responselike@*": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/responselike/-/responselike-1.0.0.tgz#251f4fe7d154d2bad125abe1b429b23afd262e29" + integrity sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA== + dependencies: + "@types/node" "*" + "@types/serve-static@*": version "1.13.3" resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.3.tgz#eb7e1c41c4468272557e897e9171ded5e2ded9d1" @@ -1874,20 +1915,6 @@ agent-base@5: resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-5.1.1.tgz#e8fb3f242959db44d63be665db7a8e739537a32c" integrity sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g== -agent-base@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" - integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== - dependencies: - es6-promisify "^5.0.0" - -agent-base@~4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" - integrity sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg== - dependencies: - es6-promisify "^5.0.0" - agentkeepalive@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-2.2.0.tgz#c5d1bd4b129008f1163f236f86e5faea2026e2ef" @@ -2345,11 +2372,16 @@ balanced-match@^1.0.0: resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= -base64-js@^1.0.2, base64-js@^1.2.3, base64-js@^1.3.0: +base64-js@^1.0.2, base64-js@^1.2.3: version "1.3.0" resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.0.tgz#cab1e6118f051095e58b5281aea8c1cd22bfc0e3" integrity sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw== +base64-js@^1.3.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.3.1.tgz#58ece8cb75dd07e71ed08c736abc5fac4dbf8df1" + integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g== + base@^0.11.1: version "0.11.2" resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" @@ -2720,6 +2752,13 @@ cache-loader@^3.0.0: neo-async "^2.6.1" schema-utils "^1.0.0" +cacheable-lookup@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/cacheable-lookup/-/cacheable-lookup-1.0.0.tgz#ae877296b7b43b720e4a4554c47ec85e74d0932a" + integrity sha512-Te7MkBWBEPUdLjFWLoIu61osWKjrvBdBrSxEso6T9iGLTDPhcA2PI6J++lF/Hmqi5HtZmkKN3q/C7gwa+U/EUg== + dependencies: + keyv "^4.0.0" + cacheable-request@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.0.0.tgz#4a1727414e02ac4af82560c4da1b61daa3fa2b63" @@ -2733,6 +2772,19 @@ cacheable-request@^6.0.0: normalize-url "^3.1.0" responselike "^1.0.2" +cacheable-request@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-7.0.1.tgz#062031c2856232782ed694a257fa35da93942a58" + integrity sha512-lt0mJ6YAnsrBErpTMWeu5kl/tg9xMAWjavYTN6VQXM1A/teBITuNcccXsCxF0tDQQJf9DfAaX5O4e0zp0KlfZw== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^4.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^2.0.0" + call-me-maybe@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b" @@ -3785,6 +3837,13 @@ decompress-response@^3.3.0: dependencies: mimic-response "^1.0.0" +decompress-response@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-5.0.0.tgz#7849396e80e3d1eba8cb2f75ef4930f76461cb0f" + integrity sha512-TLZWWybuxWgoW7Lykv+gq9xvzOsUjQ9tF09Tj6NSTYGMTCHNXzrPnD6Hi+TgZq19PyTAGH4Ll/NIM/eTGglnMw== + dependencies: + mimic-response "^2.0.0" + deep-equal@^1.0.1, deep-equal@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" @@ -3818,6 +3877,11 @@ defer-to-connect@^1.0.1: resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.0.2.tgz#4bae758a314b034ae33902b5aac25a8dd6a8633e" integrity sha512-k09hcQcTDY+cwgiwa6PYKLm3jlagNzQ+RSvhjzESOGOx+MNOuXkxTfEvPrO1IOQ81tArCFYQgi631clB70RpQw== +defer-to-connect@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.1.tgz#88ae694b93f67b81815a2c8c769aef6574ac8f2f" + integrity sha512-J7thop4u3mRTkYRQ+Vpfwy2G5Ehoy82I14+14W4YMDLKdWloI9gSzRbV30s/NckQGVJtPkWNcW4oMAUigTdqiQ== + define-properties@^1.1.2, define-properties@^1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" @@ -4324,11 +4388,6 @@ es6-promise@^3.2.1: resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-3.3.1.tgz#a08cdde84ccdbf34d027a1451bc91d4bcd28a613" integrity sha1-oIzd6EzNvzTQJ6FFG8kdS80ophM= -es6-promise@^4.0.3: - version "4.2.8" - resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" - integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== - es6-promise@^4.1.0: version "4.2.6" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f" @@ -4341,13 +4400,6 @@ es6-promisify@^4.1.0: dependencies: es6-promise "^3.2.1" -es6-promisify@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" - integrity sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM= - dependencies: - es6-promise "^4.0.3" - escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -4977,15 +5029,6 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -form-data@3.0.0, form-data@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" - integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - form-data@^2.3.1, form-data@^2.5.0: version "2.5.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" @@ -4995,6 +5038,15 @@ form-data@^2.3.1, form-data@^2.5.0: combined-stream "^1.0.6" mime-types "^2.1.12" +form-data@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.0.tgz#31b7e39c85f1355b7139ee0c647cf0de7f83c682" + integrity sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + form-data@~2.3.2: version "2.3.3" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" @@ -5111,31 +5163,21 @@ gauge@~2.7.3: strip-ansi "^3.0.1" wide-align "^1.1.0" -gaxios@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-2.0.1.tgz#2ca1c9eb64c525d852048721316c138dddf40708" - integrity sha512-c1NXovTxkgRJTIgB2FrFmOFg4YIV6N/bAa4f/FZ4jIw13Ql9ya/82x69CswvotJhbV3DiGnlTZwoq2NVXk2Irg== +gaxios@^2.0.1, gaxios@^2.1.0: + version "2.2.2" + resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-2.2.2.tgz#f58516ead6868d997fcf267d4fe2dcef652bd1a3" + integrity sha512-fzttYsjvZxCaN+bQK7FtAMgoIlPtHkMwlz7vHD+aNRcU7I7gHgnp6hvGJksoo+dO1TDxaog+dSBycbYhHIStaA== dependencies: abort-controller "^3.0.0" extend "^3.0.2" - https-proxy-agent "^2.2.1" - node-fetch "^2.3.0" - -gaxios@^2.1.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/gaxios/-/gaxios-2.2.0.tgz#7c51653c224415ac9218416cb94ff48610b816bc" - integrity sha512-54Y7s3yvtEO9CZ0yBVQHI5fzS7TzkjlnuLdDEkeyL1SNYMv877VofvA56E/C3dvj3rS7GFiyMWl833Qrr+nrkg== - dependencies: - abort-controller "^3.0.0" - extend "^3.0.2" - https-proxy-agent "^3.0.0" + https-proxy-agent "^4.0.0" is-stream "^2.0.0" node-fetch "^2.3.0" -gcp-metadata@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-3.2.2.tgz#dcac6bf65775d5caa3a2e161469c0af068849256" - integrity sha512-vR7kcJMCYJG/mYWp/a1OszdOqnLB/XW1GorWW1hc1lWVNL26L497zypWb9cG0CYDQ4Bl1Wk0+fSZFFjwJlTQgQ== +gcp-metadata@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/gcp-metadata/-/gcp-metadata-3.3.0.tgz#df061f0c0da3fb274b20f4af0d955030bbc21eac" + integrity sha512-uO3P/aByOQmoDu5bOYBODHmD1oDCZw7/R8SYY0MdmMQSZVEmeTSxmiM1vwde+YHYSpkaQnAAMAIZuOqLvgfp/Q== dependencies: gaxios "^2.1.0" json-bigint "^0.3.0" @@ -5177,7 +5219,7 @@ get-stream@^4.0.0, get-stream@^4.1.0: dependencies: pump "^3.0.0" -get-stream@^5.0.0: +get-stream@^5.0.0, get-stream@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.1.0.tgz#01203cdc92597f9b909067c3e656cc1f4d3c4dc9" integrity sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== @@ -5340,30 +5382,30 @@ good-listener@^1.2.2: delegate "^3.1.2" google-auth-library@^5.6.1: - version "5.7.0" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-5.7.0.tgz#2d8273793a9177f9f37f3920861f4256419c77ae" - integrity sha512-uclMldsQNf64Qr67O8TINdnqbU/Ixv81WryX+sF9g7uP0igJ98aCR/uU399u1ABLa53LNsyji+bo+bP8/iL9dA== + version "5.9.1" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-5.9.1.tgz#aab2893b4aac10fce6c9215f918a83ae8e7b67bb" + integrity sha512-927NlfjqRLrkok2JRBap4iYqe5+bsdtaotwO1JSAAxoQmji+Xmf+pFLzB+52C8ovtfycwFXbvC9f/SB4gmQCXw== dependencies: arrify "^2.0.0" base64-js "^1.3.0" fast-text-encoding "^1.0.0" gaxios "^2.1.0" - gcp-metadata "^3.2.0" + gcp-metadata "^3.3.0" gtoken "^4.1.0" - jws "^3.1.5" + jws "^4.0.0" lru-cache "^5.0.0" google-p12-pem@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-2.0.0.tgz#78f57cfeee46bd676e4a556009432712b687bad6" - integrity sha512-n8eGSKzWOb9/EmSBIh81sPvsQM939QlpHMXahTZDzuRIpCu09x3Oaqz+mXGjL4TeCvSbcnOC0YZRvjkJ9s9lnA== + version "2.0.4" + resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-2.0.4.tgz#036462394e266472632a78b685f0cc3df4ef337b" + integrity sha512-S4blHBQWZRnEW44OcR7TL9WR+QCqByRvhNDZ/uuQfpxywfupikf/miba8js1jZi6ZOGv5slgSuoshCWh6EMDzg== dependencies: - node-forge "^0.8.0" + node-forge "^0.9.0" googleapis-common@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/googleapis-common/-/googleapis-common-3.2.0.tgz#80e706405065a0fe897b6d15bb2824f8a18e1776" - integrity sha512-ARTbCRgge1jnPJhXBJbxboofWF0cCYlktEhsc9tQzTDCTIjf8SiQkGmhyakitP4c9lBQAtOX4vYOJQE0En4CGw== + version "3.2.1" + resolved "https://registry.yarnpkg.com/googleapis-common/-/googleapis-common-3.2.1.tgz#1c81dfce74876948fb1e68a2a99f842da6123877" + integrity sha512-lPAJXYpZLvY4AZp57RWj1eUXS2D5LxS3y6W0n9Jbl6eKOWmyLgz99f84XVCxVnyq8DcgV/ZAxt1lpFEzGZkVvQ== dependencies: extend "^3.0.2" gaxios "^2.0.1" @@ -5380,22 +5422,25 @@ googleapis@47.0.0: google-auth-library "^5.6.1" googleapis-common "^3.2.0" -got@9.6.0, got@^9.5.1, got@^9.6.0: - version "9.6.0" - resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" - integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== +got@10.4.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/got/-/got-10.4.0.tgz#2bd869d3d965716a43bee89d6fc3d16b565109c4" + integrity sha512-yHxq0LgdLFmJcrl27wEOIvZaHbgtn1DYpYUUX/kovLZoQ8q+QwJH+i9zkldDxGUawu1cUsgNMp8Xxm5yKT2UyQ== dependencies: - "@sindresorhus/is" "^0.14.0" - "@szmarczak/http-timer" "^1.1.2" - cacheable-request "^6.0.0" - decompress-response "^3.3.0" + "@sindresorhus/is" "^1.0.0" + "@szmarczak/http-timer" "^4.0.0" + "@types/cacheable-request" "^6.0.1" + cacheable-lookup "^1.0.0" + cacheable-request "^7.0.1" + decompress-response "^5.0.0" duplexer3 "^0.1.4" - get-stream "^4.1.0" - lowercase-keys "^1.0.1" - mimic-response "^1.0.1" - p-cancelable "^1.0.0" - to-readable-stream "^1.0.0" - url-parse-lax "^3.0.0" + get-stream "^5.0.0" + lowercase-keys "^2.0.0" + mimic-response "^2.0.0" + p-cancelable "^2.0.0" + responselike "^2.0.0" + to-readable-stream "^2.0.0" + type-fest "^0.9.0" got@^6.7.1: version "6.7.1" @@ -5414,6 +5459,23 @@ got@^6.7.1: unzip-response "^2.0.1" url-parse-lax "^1.0.0" +got@^9.5.1, got@^9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" + graceful-fs@4.1.15, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" @@ -5440,13 +5502,13 @@ growly@^1.3.0: integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= gtoken@^4.1.0: - version "4.1.3" - resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-4.1.3.tgz#efa9e42f59d02731f15de466b09331d7afc393cf" - integrity sha512-ofW+FiXjswyKdkjMcDbe6E4K7cDDdE82dGDhZIc++kUECqaE7MSErf6arJPAjcnYn1qxE1/Ti06qQuqgVusovQ== + version "4.1.4" + resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-4.1.4.tgz#925ff1e7df3aaada06611d30ea2d2abf60fcd6a7" + integrity sha512-VxirzD0SWoFUo5p8RDP8Jt2AGyOmyYcT/pOUgDKJCK+iSw0TMqwrVfY37RXTNmoKwrzmDHSk0GMT9FsgVmnVSA== dependencies: gaxios "^2.1.0" google-p12-pem "^2.0.0" - jws "^3.1.5" + jws "^4.0.0" mime "^2.2.0" handle-thing@^2.0.0: @@ -5779,22 +5841,6 @@ https-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73" integrity sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM= -https-proxy-agent@^2.2.1: - version "2.2.4" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" - integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - -https-proxy-agent@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-3.0.0.tgz#0106efa5d63d6d6f3ab87c999fa4877a3fd1ff97" - integrity sha512-y4jAxNEihqvBI5F3SaO2rtsjIOnnNA8sEbuiP+UhJZJHeM2NRm6c09ax2tgqme+SgUUvjao2fJXF4h3D6Cb2HQ== - dependencies: - agent-base "^4.3.0" - debug "^3.1.0" - https-proxy-agent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-4.0.0.tgz#702b71fb5520a132a66de1f67541d9e62154d82b" @@ -6026,7 +6072,7 @@ ip-regex@^2.1.0: resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" integrity sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= -ip@^1.1.0, ip@^1.1.5: +ip@1.1.5, ip@^1.1.0, ip@^1.1.5: version "1.1.5" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a" integrity sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo= @@ -6981,6 +7027,11 @@ json-buffer@3.0.0: resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== + json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -7054,21 +7105,21 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jwa@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.4.1.tgz#743c32985cb9e98655530d53641b66c8645b039a" - integrity sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA== +jwa@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-2.0.0.tgz#a7e9c3f29dae94027ebcaf49975c9345593410fc" + integrity sha512-jrZ2Qx916EA+fq9cEAeCROWPTfCwi1IVHqT2tapuqLEVVDKFDENFw1oL+MwrTvH6msKxsd1YTDVw6uKEcsrLEA== dependencies: buffer-equal-constant-time "1.0.1" ecdsa-sig-formatter "1.0.11" safe-buffer "^5.0.1" -jws@^3.1.5: - version "3.2.2" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.2.2.tgz#001099f3639468c9414000e99995fa52fb478304" - integrity sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA== +jws@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jws/-/jws-4.0.0.tgz#2d4e8cf6a318ffaa12615e9dec7e86e6c97310f4" + integrity sha512-KDncfTmOZoOMTFG4mBlG0qUIOlc03fmzH+ru6RgYVZhPkyiy/92Owlt/8UEN+a4TXR1FQetfIpJE8ApdvdVxTg== dependencies: - jwa "^1.4.1" + jwa "^2.0.0" safe-buffer "^5.0.1" keygrip@~1.1.0: @@ -7090,6 +7141,13 @@ keyv@^3.0.0: dependencies: json-buffer "3.0.0" +keyv@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.0.0.tgz#2d1dab694926b2d427e4c74804a10850be44c12f" + integrity sha512-U7ioE8AimvRVLfw4LffyOIRhL2xVgmE8T22L6i0BucSnBUyv4w+I7VN/zVZwRKHOI6ZRUcdMdWHQ8KSUvGpEog== + dependencies: + json-buffer "3.0.1" + killable@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" @@ -7485,6 +7543,11 @@ lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + lru-cache@5.1.1, lru-cache@^5.0.0, lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -7761,11 +7824,16 @@ mime@1.6.0, mime@^1.3.4, mime@^1.4.1: resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== -mime@^2.0.3, mime@^2.2.0, mime@^2.4.2: +mime@^2.0.3, mime@^2.4.2: version "2.4.3" resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.3.tgz#229687331e86f68924e6cb59e1cdd937f18275fe" integrity sha512-QgrPRJfE+riq5TPZMcHZOtm8c6K/yYrMbKIoRfapfiGLxS8OTeIfRhUGW5LU7MlRa52KOAGCfUNruqLrIBvWZw== +mime@^2.2.0: + version "2.4.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" + integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== + mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" @@ -7776,6 +7844,11 @@ mimic-response@^1.0.0, mimic-response@^1.0.1: resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== +mimic-response@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.0.0.tgz#996a51c60adf12cb8a87d7fb8ef24c2f3d5ebb46" + integrity sha512-8ilDoEapqA4uQ3TwS0jakGONKXVJqpy+RpM+3b7pLdOjghCrEiGp9SRkFbUHAmZW9vdnrENWHjaweIoTIJExSQ== + min-document@^2.19.0: version "2.19.0" resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" @@ -8065,10 +8138,10 @@ node-forge@^0.7.5: resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.6.tgz#fdf3b418aee1f94f0ef642cd63486c77ca9724ac" integrity sha1-/fO0GK7h+U8O9kLNY0hsd8qXJKw= -node-forge@^0.8.0: - version "0.8.4" - resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.8.4.tgz#d6738662b661be19e2711ef01aa3b18212f13030" - integrity sha512-UOfdpxivIYY4g5tqp5FNRNgROVNxRACUxxJREntJLFaJr1E0UEqFtUIk0F/jYx/E+Y6sVXd0KDi/m5My0yGCVw== +node-forge@^0.9.0: + version "0.9.1" + resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.9.1.tgz#775368e6846558ab6676858a4d8c6e8d16c677b5" + integrity sha512-G6RlQt5Sb4GMBzXvhfkeFmbqR6MzhtnT7VTHuLadjkii3rdYHNdw0m8zA4BTxVIh68FicCQ2NSUANpsqkr9jvQ== node-int64@^0.4.0: version "0.4.0" @@ -8239,6 +8312,11 @@ normalize-url@^3.0.0, normalize-url@^3.1.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.3.0.tgz#b2e1c4dc4f7c6d57743df733a4f5978d18650559" integrity sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg== +normalize-url@^4.1.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" + integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== + npm-bundled@^1.0.1: version "1.0.6" resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.6.tgz#e7ba9aadcef962bb61248f91721cd932b3fe6bdd" @@ -8498,6 +8576,11 @@ p-cancelable@^1.0.0: resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== +p-cancelable@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-2.0.0.tgz#4a3740f5bdaf5ed5d7c3e34882c6fb5d6b266a6e" + integrity sha512-wvPXDmbMmu2ksjkB4Z3nZWTSkJEb9lqVdMaCKpZUGJG9TMiNp9XcbG3fn9fPKjem04fJMJnXoyFPk2FmgiaiNg== + p-defer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" @@ -9482,11 +9565,16 @@ q@^1.1.2: resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= -qs@6.7.0, qs@^6.5.1, qs@^6.7.0: +qs@6.7.0, qs@^6.5.1: version "6.7.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== +qs@^6.7.0: + version "6.9.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.9.1.tgz#20082c65cb78223635ab1a9eaca8875a29bf8ec9" + integrity sha512-Cxm7/SS/y/Z3MHWSxXb8lIFqgqBowP5JMlTUFyJN88y0SGQhVmZnqFK/PeuMX9LzUyWsqqhNxIyg0jlzq946yA== + qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" @@ -9951,6 +10039,13 @@ responselike@^1.0.2: dependencies: lowercase-keys "^1.0.0" +responselike@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-2.0.0.tgz#26391bcc3174f750f9a79eacc40a12a5c42d7723" + integrity sha512-xH48u3FTB9VsZw7R+vvgaKeLKzT6jOogbQhEe/jewwnZgzPcnyWui2Av6JpoYZF/91uueC+lqhWqeURw5/qhCw== + dependencies: + lowercase-keys "^2.0.0" + restore-cursor@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" @@ -10323,10 +10418,10 @@ slice-ansi@^2.1.0: astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -smart-buffer@4.0.2: - version "4.0.2" - resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.2.tgz#5207858c3815cc69110703c6b94e46c15634395d" - integrity sha512-JDhEpTKzXusOqXZ0BUIdH+CjFdO/CR3tLlf5CN34IypI+xMmXW1uB16OOY8z3cICbJlDAVJzNbwBhNO0wt9OAw== +smart-buffer@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" + integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== smoothscroll-polyfill@^0.4.3: version "0.4.4" @@ -10383,21 +10478,20 @@ sockjs@0.3.19: faye-websocket "^0.10.0" uuid "^3.0.1" -socks-proxy-agent@4.0.2: +socks-proxy-agent@TooTallNate/node-socks-proxy-agent#master: version "4.0.2" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.2.tgz#3c8991f3145b2799e70e11bd5fbc8b1963116386" - integrity sha512-NT6syHhI9LmuEMSK6Kd2V7gNv5KFZoLE7V5udWmn0de+3Mkj3UMA/AJPLyeNUVmElCurSHtUdM3ETpR3z770Wg== + resolved "https://codeload.github.com/TooTallNate/node-socks-proxy-agent/tar.gz/d90f7e867fe527fb072c826bfe4acf8e430641b3" dependencies: - agent-base "~4.2.1" - socks "~2.3.2" + agent-base "5" + socks "^2.3.2" -socks@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.2.tgz#ade388e9e6d87fdb11649c15746c578922a5883e" - integrity sha512-pCpjxQgOByDHLlNqlnh/mNSAxIUkyBBuwwhTcV+enZGbDaClPvHdvm6uvOwZfFJkam7cGhBNbb4JxiP8UZkRvQ== +socks@^2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/socks/-/socks-2.3.3.tgz#01129f0a5d534d2b897712ed8aceab7ee65d78e3" + integrity sha512-o5t52PCNtVdiOvzMry7wU4aOqYWL0PeCXRWBEiJow4/i/wr+wpsJQ9awEu1EonLIqsfGd5qSgDdxEOvCdmBEpA== dependencies: - ip "^1.1.5" - smart-buffer "4.0.2" + ip "1.1.5" + smart-buffer "^4.1.0" sort-keys@^2.0.0: version "2.0.0" @@ -11082,6 +11176,11 @@ to-readable-stream@^1.0.0: resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== +to-readable-stream@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-2.1.0.tgz#82880316121bea662cdc226adb30addb50cb06e8" + integrity sha512-o3Qa6DGg1CEXshSdvWNX2sN4QHqg03SPq7U6jPXRahlQdl5dK8oXjkU/2/sGrnOZKeGV1zLSO8qPwyKklPPE7w== + to-regex-range@^2.1.0: version "2.1.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" @@ -11253,6 +11352,11 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +type-fest@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.9.0.tgz#3b7904821e42b26377831a6e9b5d2930ab19c99a" + integrity sha512-j55pzONIdg7rdtJTRZPKIbV0FosUqYdhHK1aAYJIrUvejv1VVyBokrILE8KQDT4emW/1Ev9tx+yZG+AxuSBMmA== + type-is@^1.6.16, type-is@~1.6.17, type-is@~1.6.18: version "1.6.18" resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"