作者: @{{ uid }}
@@ -69,19 +76,23 @@ export default {
type: String,
default: null
},
+ puppeteer: {
+ type: String,
+ default: null
+ },
},
methods: {
renderMarkdown(item, inline = true) {
const md = require('markdown-it')({
- html: true,
+ html: true,
});
- return inline ? md.renderInline(item) : md.render(item);
+ return inline ? md.renderInline(item) : md.render(item);
},
},
computed: {
- demoUrl: function () {
- return 'https://rsshub.app'+ this.example
- }
+ demoUrl: function () {
+ return 'https://rsshub.app'+ this.example
+ }
}
}
diff --git a/docs/.vuepress/components/RouteEn.vue b/docs/.vuepress/components/RouteEn.vue
index 92b15998b469fc..551ee5d3e3cc30 100644
--- a/docs/.vuepress/components/RouteEn.vue
+++ b/docs/.vuepress/components/RouteEn.vue
@@ -1,7 +1,14 @@
Author: @{{ uid }}
@@ -53,6 +60,10 @@ export default {
type: String,
default: null
},
+ supportScihub: {
+ type: String,
+ default: null
+ },
radar: {
type: String,
default: null
@@ -65,19 +76,23 @@ export default {
type: String,
default: null
},
+ puppeteer: {
+ type: String,
+ default: null
+ }
},
methods: {
renderMarkdown(item, inline = true) {
const md = require('markdown-it')({
- html: true,
+ html: true,
});
- return inline ? md.renderInline(item) : md.render(item);
+ return inline ? md.renderInline(item) : md.render(item);
},
},
computed: {
- demoUrl: function () {
- return 'https://rsshub.app'+ this.example
- }
+ demoUrl: function () {
+ return 'https://rsshub.app'+ this.example
+ }
}
}
diff --git a/docs/bbs.md b/docs/bbs.md
index 003f265bd8fb45..2f27dee6a73f24 100644
--- a/docs/bbs.md
+++ b/docs/bbs.md
@@ -208,6 +208,32 @@ pageClass: routes
- ${articleType}
- |
- ${author}
- ${brief} ${brief} ${abs} Subjects: Links: {{@ vdescription }} {{@ vdescription }} Hello world ${e.description}Brief
- Brief
- Abstract
- ${subject}
` : '';
- const citation = itemCapture('p.c-bibliographic-information__download-citation > a').attr('href');
- const citationContents = citation !== undefined ? `Download citation` : '';
- const doi = itemCapture('meta[name="DOI"]').attr('content');
- const doiContents = doi !== undefined ? `DOI: ${doi}` : '';
- const pdf = itemCapture('meta[name="citation_pdf_url"]').attr('content');
- const pdfContents = pdf !== undefined ? `Offical PDF` : '';
- const linkContents = '' + [citationContents, doiContents, pdfContents].filter((x) => x !== '').map((x) => `
';
- const infoContents = `
- About this article
-
-
${utils.ProcessImage(item.content)}`;
-
- return {
- title,
- description,
- author: item.author.name,
- pubDate: new Date(item.updated_time * 1000).toUTCString(),
- guid: item.id.toString(),
- link: `https://www.zhihu.com/question/${questionId}/answer/${item.id}`,
- };
- }),
- };
-};
diff --git a/lib/utils/parse-date.js b/lib/utils/parse-date.js
index f19cf1fbbd553e..2412432a98a79a 100644
--- a/lib/utils/parse-date.js
+++ b/lib/utils/parse-date.js
@@ -129,7 +129,7 @@ module.exports = {
// 将 `\d+年\d+月...\d+秒前` 分割成 `['\d+年', ..., '\d+秒前']`
- const matches = theDate.match(/(?:\D+)?\d+(?!:|-|\/)\D+/g);
+ const matches = theDate.match(/(?:\D+)?\d+(?!:|-|\/|(a|p)m)\D+/g);
if (matches) {
// 获得最后的时间单元,如 `\d+秒前`
@@ -187,7 +187,9 @@ module.exports = {
for (const w of words) {
const wordMatches = w.regExp.exec(theDate);
if (wordMatches) {
- return dayjs(`${w.startAt.format('YYYY-MM-DD')} ${wordMatches[1]}`).toDate();
+ // The default parser of dayjs() can parse '8:00 pm' but not '8:00pm'
+ // so we need to insert a space in between
+ return dayjs(`${w.startAt.format('YYYY-MM-DD')} ${/a|pm$/.test(wordMatches[1]) ? wordMatches[1].replace(/a|pm/, ' $&') : wordMatches[1]}`).toDate();
}
}
}
diff --git a/lib/v2/9to5/maintainer.js b/lib/v2/9to5/maintainer.js
new file mode 100644
index 00000000000000..724098c3c56e5a
--- /dev/null
+++ b/lib/v2/9to5/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/9to5/:subsite/:tag?': ['HenryQW'],
+};
diff --git a/lib/v2/9to5/radar.js b/lib/v2/9to5/radar.js
new file mode 100644
index 00000000000000..431667891254df
--- /dev/null
+++ b/lib/v2/9to5/radar.js
@@ -0,0 +1,35 @@
+module.exports = {
+ '9to5toys.com': {
+ _name: '9to5',
+ '.': [
+ {
+ title: 'Toys 分站',
+ docs: 'https://docs.rsshub.app/new-media.html#_9to5',
+ source: ['/', '/guides/:tag'],
+ target: '/9to5/toys/:tag?',
+ },
+ ],
+ },
+ '9to5mac.com': {
+ _name: '9to5',
+ '.': [
+ {
+ title: 'Mac 分站',
+ docs: 'https://docs.rsshub.app/new-media.html#_9to5',
+ source: ['/', '/guides/:tag'],
+ target: '/9to5/mac/:tag?',
+ },
+ ],
+ },
+ '9to5google.com': {
+ _name: '9to5',
+ '.': [
+ {
+ title: 'Google 分站',
+ docs: 'https://docs.rsshub.app/new-media.html#_9to5',
+ source: ['/', '/guides/:tag'],
+ target: '/9to5/google/:tag?',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/9to5/router.js b/lib/v2/9to5/router.js
new file mode 100644
index 00000000000000..cedd24b33c222b
--- /dev/null
+++ b/lib/v2/9to5/router.js
@@ -0,0 +1,3 @@
+module.exports = function (router) {
+ router.get('/:subsite/:tag?', require('./subsite'));
+};
diff --git a/lib/routes/9to5/subsite.js b/lib/v2/9to5/subsite.js
similarity index 60%
rename from lib/routes/9to5/subsite.js
rename to lib/v2/9to5/subsite.js
index 3764a2f1542209..15adbdcb0192b7 100644
--- a/lib/routes/9to5/subsite.js
+++ b/lib/v2/9to5/subsite.js
@@ -31,31 +31,34 @@ module.exports = async (ctx) => {
}
if (ctx.params.tag) {
- link = `${link}/guides/${ctx.params.tag}/feed`;
+ link = `${link}/guides/${ctx.params.tag}/feed/`;
title = `${ctx.params.tag} | ${title}`;
} else {
- link = `${link}/feed`;
+ link = `${link}/feed/`;
}
const feed = await parser.parseURL(link);
const items = await Promise.all(
- feed.items.splice(0, 10).map(async (item) => {
- const response = await got({
- method: 'get',
- url: item.link,
- });
- const description = utils.ProcessFeed(response.data);
+ feed.items.splice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 10).map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const response = await got({
+ method: 'get',
+ url: item.link,
+ });
+ const description = utils.ProcessFeed(response.data);
- const single = {
- title: item.title,
- description,
- pubDate: item.pubDate,
- link: item.link,
- author: item['dc:creator'],
- };
- return Promise.resolve(single);
- })
+ const single = {
+ title: item.title,
+ description,
+ pubDate: item.pubDate,
+ link: item.link,
+ author: item['dc:creator'],
+ };
+
+ return single;
+ })
+ )
);
ctx.state.data = {
diff --git a/lib/routes/9to5/utils.js b/lib/v2/9to5/utils.js
similarity index 86%
rename from lib/routes/9to5/utils.js
rename to lib/v2/9to5/utils.js
index 444f2fbdadd2fd..94a48c143a4963 100644
--- a/lib/routes/9to5/utils.js
+++ b/lib/v2/9to5/utils.js
@@ -2,7 +2,7 @@ const cheerio = require('cheerio');
const ProcessFeed = (data) => {
const $ = cheerio.load(data);
- const content = $('div[itemprop="articleBody"]');
+ const content = $('div.post-body');
const cover = $('meta[property="og:image"]');
if (cover.length > 0) {
@@ -16,6 +16,9 @@ const ProcessFeed = (data) => {
$(e).remove();
});
+ // remove ad
+ content.find('div.ad-disclaimer-container').remove();
+
content.find('div').each((i, e) => {
if ($(e)[0].attribs.class) {
const classes = $(e)[0].attribs.class;
diff --git a/lib/routes/aliyun/database_month.js b/lib/v2/aliyun/database_month.js
similarity index 58%
rename from lib/routes/aliyun/database_month.js
rename to lib/v2/aliyun/database_month.js
index 817006e1040d45..a3a176478cdab1 100644
--- a/lib/routes/aliyun/database_month.js
+++ b/lib/v2/aliyun/database_month.js
@@ -10,7 +10,7 @@ module.exports = async (ctx) => {
.map((i, e) => {
const element = $(e);
const title = element.find('a').text().trim();
- const link = 'http://mysql.taobao.org' + element.find('a').attr('href').trim();
+ const link = `http://mysql.taobao.org${element.find('a').attr('href').trim()}/`;
return {
title,
description: '',
@@ -20,20 +20,15 @@ module.exports = async (ctx) => {
.get();
const result = await Promise.all(
- list.map(async (item) => {
+ list.map((item) => {
const link = item.link;
- const cache = await ctx.cache.get(link);
- if (cache) {
- return Promise.resolve(JSON.parse(cache));
- }
-
- const itemReponse = await got.get(link);
- const itemElement = cheerio.load(itemReponse.data);
- item.description = itemElement('.content').html();
-
- ctx.cache.set(link, JSON.stringify(item));
- return item;
+ return ctx.cache.tryGet(link, async () => {
+ const itemReponse = await got(link);
+ const itemElement = cheerio.load(itemReponse.data);
+ item.description = itemElement('.content').html();
+ return item;
+ });
})
);
diff --git a/lib/routes/aliyun/developer/group.js b/lib/v2/aliyun/developer/group.js
similarity index 72%
rename from lib/routes/aliyun/developer/group.js
rename to lib/v2/aliyun/developer/group.js
index 940cb23e39caf5..1027b3056d0c2b 100644
--- a/lib/routes/aliyun/developer/group.js
+++ b/lib/v2/aliyun/developer/group.js
@@ -1,5 +1,6 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const type = ctx.params.type;
@@ -34,9 +35,13 @@ module.exports = async (ctx) => {
list
.map((index, item) => {
item = $(item);
+ const desc = item.find('.question-desc');
+ const description = item.find('.browse').text() + ' ' + desc.find('.answer').text();
return {
- title: item.find('p').first().text().trim(),
+ title: item.find('.question-title').text().trim() || item.find('a p').text().trim(),
link: item.find('a').attr('href'),
+ pubDate: parseDate(item.find('.time').text()),
+ description,
};
})
.get(),
diff --git a/lib/v2/aliyun/maintainer.js b/lib/v2/aliyun/maintainer.js
new file mode 100644
index 00000000000000..224bdb6fe7ee19
--- /dev/null
+++ b/lib/v2/aliyun/maintainer.js
@@ -0,0 +1,5 @@
+module.exports = {
+ '/database_month': ['junbaor'],
+ '/developer/group/:type': ['umm233'],
+ '/notice/:type?': ['muzea'],
+};
diff --git a/lib/routes/aliyun/notice.js b/lib/v2/aliyun/notice.js
similarity index 59%
rename from lib/routes/aliyun/notice.js
rename to lib/v2/aliyun/notice.js
index 47cb41787432ab..42b6490889e0de 100644
--- a/lib/routes/aliyun/notice.js
+++ b/lib/v2/aliyun/notice.js
@@ -1,9 +1,7 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
-const dayjs = require('dayjs');
-const customParseFormat = require('dayjs/plugin/customParseFormat');
-
-dayjs.extend(customParseFormat);
+const { parseDate } = require('@/utils/parse-date');
+const timezone = require('@/utils/timezone');
const typeMap = {
0: '9004748',
@@ -28,32 +26,26 @@ module.exports = async (ctx) => {
const title = element.find('a').text().trim();
const link = 'https://help.aliyun.com' + element.find('a').attr('href').trim();
const date = element.find('.y-right').text();
- const pubDate = dayjs(`${date} +0800`, 'YYYY-MM-DDHH:mm:ss ZZ');
+ const pubDate = timezone(parseDate(date), +8);
return {
title,
description: '',
link,
- pubDate: pubDate.toString(),
+ pubDate,
};
})
.get();
const result = await Promise.all(
- list.map(async (item) => {
- const link = item.link;
-
- const cache = await ctx.cache.get(link);
- if (cache) {
- return Promise.resolve(JSON.parse(cache));
- }
-
- const itemReponse = await got.get(link);
- const itemElement = cheerio.load(itemReponse.data);
- item.description = itemElement('#se-knowledge').html();
-
- ctx.cache.set(link, JSON.stringify(item));
- return item;
- })
+ list.map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const itemReponse = await got(item.link);
+ const itemElement = cheerio.load(itemReponse.data);
+ item.description = itemElement('#se-knowledge').html();
+
+ return item;
+ })
+ )
);
ctx.state.data = {
diff --git a/lib/v2/aliyun/radar.js b/lib/v2/aliyun/radar.js
new file mode 100644
index 00000000000000..9d2490ff03740f
--- /dev/null
+++ b/lib/v2/aliyun/radar.js
@@ -0,0 +1,32 @@
+module.exports = {
+ 'aliyun.com': {
+ _name: '阿里云',
+ developer: [
+ {
+ title: '开发者社区 - 主题',
+ docs: 'https://docs.rsshub.app/programming.html#a-li-yun',
+ source: ['/group/:type'],
+ target: '/aliyun/developer/group/:type',
+ },
+ ],
+ help: [
+ {
+ title: '公告',
+ docs: 'https://docs.rsshub.app/programming.html#a-li-yun',
+ source: ['/noticelist/:type', '/'],
+ target: (params) => `/aliyun/notice${params.type ? '/' + params.type.replace('.html', '') : ''}`,
+ },
+ ],
+ },
+ 'taobao.org': {
+ _name: '阿里云',
+ mysql: [
+ {
+ title: '数据库内核月报',
+ docs: 'https://docs.rsshub.app/programming.html#a-li-yun',
+ source: ['/monthly', '/'],
+ target: '/aliyun/database_month',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/aliyun/router.js b/lib/v2/aliyun/router.js
new file mode 100644
index 00000000000000..0e812d1744a43a
--- /dev/null
+++ b/lib/v2/aliyun/router.js
@@ -0,0 +1,5 @@
+module.exports = (router) => {
+ router.get('/database_month', require('./database_month'));
+ router.get('/developer/group/:type', require('./developer/group'));
+ router.get('/notice/:type?', require('./notice'));
+};
diff --git a/lib/v2/cncf/index.js b/lib/v2/cncf/index.js
new file mode 100644
index 00000000000000..89597dc276d3a9
--- /dev/null
+++ b/lib/v2/cncf/index.js
@@ -0,0 +1,43 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
+
+const rootURL = 'https://www.cncf.io';
+
+module.exports = async (ctx) => {
+ const cate = ctx.params.cate ?? 'blog';
+ const url = `${rootURL}/${cate}/`;
+
+ const response = await got(url);
+ const $ = cheerio.load(response.data);
+ const title = $('h1.is-style-page-title').text();
+ const list = $('div.post-archive__item')
+ .map((_index, item) => ({
+ title: $(item).find('span.post-archive__title').text().trim(),
+ link: $(item).find('span.post-archive__title > a').attr('href'),
+ pubDate: parseDate($(item).find('span.post-archive__item_date').text().split('|')[0]),
+ }))
+ .get();
+
+ const items = await Promise.all(
+ list.map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got(item.link);
+ const content = cheerio.load(detailResponse.data);
+
+ content('div.post-author').remove();
+ content('div.social-share').remove();
+
+ item.description = content('article').html();
+
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: `CNCF - ${title}`,
+ link: url,
+ item: items,
+ };
+};
diff --git a/lib/v2/cncf/maintainer.js b/lib/v2/cncf/maintainer.js
new file mode 100644
index 00000000000000..b09f2060426ff6
--- /dev/null
+++ b/lib/v2/cncf/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/:cate?': ['Fatpandac'],
+};
diff --git a/lib/v2/cncf/radar.js b/lib/v2/cncf/radar.js
new file mode 100644
index 00000000000000..d30db690010b1d
--- /dev/null
+++ b/lib/v2/cncf/radar.js
@@ -0,0 +1,31 @@
+module.exports = {
+ 'cncf.io': {
+ _name: 'CNCF',
+ '.': [
+ {
+ title: 'Blog',
+ docs: 'https://docs.rsshub.app/programming.html#cncf',
+ source: ['/blog'],
+ target: '/cncf/blog',
+ },
+ {
+ title: 'News',
+ docs: 'https://docs.rsshub.app/programming.html#cncf',
+ source: ['/news'],
+ target: '/cncf/news',
+ },
+ {
+ title: 'Announcements',
+ docs: 'https://docs.rsshub.app/programming.html#cncf',
+ source: ['/announcements'],
+ target: '/cncf/announcements',
+ },
+ {
+ title: 'Reports',
+ docs: 'https://docs.rsshub.app/programming.html#cncf',
+ source: ['/reports'],
+ target: '/cncf/reports',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/cncf/reports.js b/lib/v2/cncf/reports.js
new file mode 100644
index 00000000000000..e4214417d264a7
--- /dev/null
+++ b/lib/v2/cncf/reports.js
@@ -0,0 +1,38 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
+
+const rootURL = 'https://www.cncf.io';
+
+module.exports = async (ctx) => {
+ const url = `${rootURL}/reports/`;
+
+ const response = await got(url);
+ const $ = cheerio.load(response.data);
+ const list = $('div.report-item')
+ .map((_index, item) => ({
+ title: $(item).find('a.report-item__link').attr('title'),
+ link: $(item).find('a.report-item__link').attr('href'),
+ }))
+ .get();
+
+ const items = await Promise.all(
+ list.map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got(item.link);
+ const content = cheerio.load(detailResponse.data);
+
+ item.parseDate = parseDate(content('p.is-style-spaced-uppercase').splice(':')[1]);
+ item.description = content('article > div.has-background').html();
+
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: `CNCF - Reports`,
+ link: url,
+ item: items,
+ };
+};
diff --git a/lib/v2/cncf/router.js b/lib/v2/cncf/router.js
new file mode 100644
index 00000000000000..9d730a432e70e2
--- /dev/null
+++ b/lib/v2/cncf/router.js
@@ -0,0 +1,4 @@
+module.exports = function (router) {
+ router.get('/reports', require('./reports'));
+ router.get('/:cate?', require('./index'));
+};
diff --git a/lib/routes/earthquake/ceic.js b/lib/v2/earthquake/ceic.js
similarity index 91%
rename from lib/routes/earthquake/ceic.js
rename to lib/v2/earthquake/ceic.js
index 1181c46d248509..2fc25177d44927 100644
--- a/lib/routes/earthquake/ceic.js
+++ b/lib/v2/earthquake/ceic.js
@@ -1,4 +1,6 @@
const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+const timezone = require('@/utils/timezone');
module.exports = async (ctx) => {
let type = Number(ctx.params.type);
@@ -57,7 +59,7 @@ module.exports = async (ctx) => {
return {
title: `${entity.LOCATION_C}发生${entity.M}级地震`,
link: `${baseUrl}/${NEW_DID}.html`,
- pubDate: new Date(entity.O_TIME).toUTCString(),
+ pubDate: timezone(parseDate(entity.O_TIME, 'YYYY-MM-DD HH:mm:ss'), +8),
description: contentBuilder.join('
'),
guid: NEW_DID,
};
diff --git a/lib/routes/earthquake/index.js b/lib/v2/earthquake/index.js
similarity index 83%
rename from lib/routes/earthquake/index.js
rename to lib/v2/earthquake/index.js
index 974d48af8b1285..da27abe04ef97a 100644
--- a/lib/routes/earthquake/index.js
+++ b/lib/v2/earthquake/index.js
@@ -1,7 +1,9 @@
const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+const timezone = require('@/utils/timezone');
module.exports = async (ctx) => {
- const region = ctx.params.region || 1;
+ const region = ctx.params.region ?? 1;
const api = 'https://www.cea.gov.cn/eportal/ui?struts.portlet.mode=view&struts.portlet.action=/portlet/expressEarthquake!queryExpressEarthquakeList.action&pageId=363409&moduleId=a852ba487b534470a84a30f00e7d6670';
const link = 'https://www.cea.gov.cn/cea/xwzx/zqsd/index.html';
const response = await got({
@@ -18,14 +20,14 @@ module.exports = async (ctx) => {
const out = data.map((item) => {
const { id, epicenter, latitudes, longitudes, depth } = item;
- const date = item.orig_time.slice(0, -2);
+ const date = item.orig_time;
const num = item.num_mag;
const description = `北京时间${date},${epicenter}(纬度${latitudes}度,经度${longitudes}度)发生${num}级地震,震源深度${depth}千米`;
return {
title: `${epicenter}发生${num}级地震`,
link: `https://www.cea.gov.cn/eportal/ui?struts.portlet.mode=view&struts.portlet.action=/portlet/expressEarthquake!toNewInfoView.action&pageId=366521&id=${id}`,
- pubDate: new Date(date).toUTCString(),
+ pubDate: timezone(parseDate(date, 'YYYY-MM-DD HH:mm:ss'), +8),
description,
};
});
diff --git a/lib/v2/earthquake/maintainer.js b/lib/v2/earthquake/maintainer.js
new file mode 100644
index 00000000000000..291da67fd91491
--- /dev/null
+++ b/lib/v2/earthquake/maintainer.js
@@ -0,0 +1,4 @@
+module.exports = {
+ '/ceic/:type?': ['SettingDust'],
+ '/:region?': ['LogicJake'],
+};
diff --git a/lib/v2/earthquake/radar.js b/lib/v2/earthquake/radar.js
new file mode 100644
index 00000000000000..08e0fa38b59378
--- /dev/null
+++ b/lib/v2/earthquake/radar.js
@@ -0,0 +1,24 @@
+module.exports = {
+ 'ac.cn': {
+ _name: '地震速报',
+ 'www.ceic': [
+ {
+ title: '中国地震台',
+ docs: 'https://docs-rsshub.pages.dev/forecast.html#di-zhen-su-bao',
+ source: ['/speedsearch', '/'],
+ target: '/earthquake/ceic',
+ },
+ ],
+ },
+ 'cea.gov.cn': {
+ _name: '地震速报',
+ www: [
+ {
+ title: '中国地震局',
+ docs: 'https://docs-rsshub.pages.dev/forecast.html#di-zhen-su-bao',
+ source: ['/cea/xwzx/zqsd/index.html', '/'],
+ target: '/earthquake',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/earthquake/router.js b/lib/v2/earthquake/router.js
new file mode 100644
index 00000000000000..d10ad2bf9e06d6
--- /dev/null
+++ b/lib/v2/earthquake/router.js
@@ -0,0 +1,4 @@
+module.exports = (router) => {
+ router.get('/ceic/:type?', require('./ceic'));
+ router.get('/:region?', require('./index'));
+};
diff --git a/lib/v2/epicgames/index.js b/lib/v2/epicgames/index.js
index ced794d1b7a3e2..9aad773ce2ce79 100644
--- a/lib/v2/epicgames/index.js
+++ b/lib/v2/epicgames/index.js
@@ -3,7 +3,6 @@ const { parseDate } = require('@/utils/parse-date');
const { art } = require('@/utils/render');
const path = require('path');
const dayjs = require('dayjs');
-dayjs.extend(require('dayjs/plugin/isSameOrBefore'));
module.exports = async (ctx) => {
const locale = ctx.params.locale ?? 'en-US';
@@ -18,17 +17,25 @@ module.exports = async (ctx) => {
url: apiUrl,
});
+ const now = dayjs();
const items = response.data.data.Catalog.searchStore.elements
- .filter((item) => dayjs().subtract(7, 'days').isSameOrBefore(parseDate(item.effectiveDate)) && item.seller.name !== 'Epic Dev Test Account')
+ .filter(
+ (item) =>
+ item.promotions &&
+ item.promotions.promotionalOffers &&
+ item.promotions.promotionalOffers[0] &&
+ dayjs(item.promotions.promotionalOffers[0].promotionalOffers[0].startDate) <= now &&
+ dayjs(item.promotions.promotionalOffers[0].promotionalOffers[0].endDate) > now
+ )
.map((item) => ({
title: item.title,
author: item.seller.name,
- link: `${rootUrl}/en-US/p/${item.offerMappings.length > 0 ? item.offerMappings[0].pageSlug : item.urlSlug}`,
+ link: `${rootUrl}/${locale}/p/${item.catalogNs.mappings.length > 0 ? item.catalogNs.mappings[0].pageSlug : item.offerMappings.length > 0 ? item.offerMappings[0].pageSlug : item.urlSlug}`,
description: art(path.join(__dirname, 'templates/description.art'), {
description: item.description,
image: item.keyImages[0].url,
}),
- pubDate: parseDate(item.effectiveDate),
+ pubDate: parseDate(item.promotions.promotionalOffers[0].promotionalOffers[0].startDate),
}));
ctx.state.data = {
diff --git a/lib/v2/epicgames/maintainer.js b/lib/v2/epicgames/maintainer.js
index 3ca92881aac642..8dcb0fb08e681c 100644
--- a/lib/v2/epicgames/maintainer.js
+++ b/lib/v2/epicgames/maintainer.js
@@ -1,3 +1,3 @@
module.exports = {
- '/freegames/:locale?/:country?': ['DIYgod', 'NeverBehave', 'Zyx-A', 'junfengP', 'nczitzk'],
+ '/freegames/:locale?/:country?': ['DIYgod', 'NeverBehave', 'Zyx-A', 'junfengP', 'nczitzk', 'KotaHv'],
};
diff --git a/lib/v2/gov/hebei/czt.js b/lib/v2/gov/hebei/czt.js
new file mode 100644
index 00000000000000..d5603de56526c7
--- /dev/null
+++ b/lib/v2/gov/hebei/czt.js
@@ -0,0 +1,53 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const category = ctx.params.category ?? 'gzdt';
+
+ const rootUrl = 'http://czt.hebei.gov.cn';
+ const currentUrl = `${rootUrl}/xwdt/${category}`;
+
+ const response = await got({
+ method: 'get',
+ url: currentUrl,
+ });
+
+ const $ = cheerio.load(response.data);
+
+ let items = $('td li a[title]')
+ .toArray()
+ .map((item) => {
+ item = $(item);
+
+ return {
+ title: item.text(),
+ link: `${rootUrl}${/^\.\.\/\.\./.test(item.attr('href')) ? item.attr('href').replace(/^\.\.\/\.\./, '') : `/xwdt/${category}${item.attr('href').replace(/^\./, '')}`}`,
+ };
+ });
+
+ items = await Promise.all(
+ items.map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got({
+ method: 'get',
+ url: item.link,
+ });
+
+ const content = cheerio.load(detailResponse.data);
+
+ item.author = content('meta[name="ContentSource"]').attr('content');
+ item.pubDate = parseDate(content('meta[name="PubDate"]').attr('content'));
+ item.description = content('.TRS_Editor, .content').html();
+
+ return item;
+ })
+ )
+ );
+
+ ctx.state.data = {
+ title: $('title').text(),
+ link: currentUrl,
+ item: items,
+ };
+};
diff --git a/lib/v2/gov/maintainer.js b/lib/v2/gov/maintainer.js
index 00ff01a1d9bb59..7645d58fc4c78c 100644
--- a/lib/v2/gov/maintainer.js
+++ b/lib/v2/gov/maintainer.js
@@ -17,6 +17,7 @@ module.exports = {
'/anhui/kjt/:path?': ['nczitzk'],
'/beijing/kw/:channel': ['Fatpandac'],
+ '/hebei/czt/xwdt/:category?': ['nczitzk'],
'/shenzhen/hrss/szksy/:caty/:page?': ['zlasd'],
'/shenzhen/zzb/:caty/:page?': ['zlasd'],
'/shanghai/rsj/ksxm': ['Fatpandac'],
diff --git a/lib/v2/gov/radar.js b/lib/v2/gov/radar.js
index 116cf0090fd632..9bbbb47ff337bd 100644
--- a/lib/v2/gov/radar.js
+++ b/lib/v2/gov/radar.js
@@ -300,6 +300,41 @@ module.exports = {
},
],
},
+ 'hebei.gov.cn': {
+ _name: '河北省人民政府',
+ czt: [
+ {
+ title: '河北省财政厅 - 财政动态',
+ docs: 'https://docs.rsshub.app/government.html#he-bei-sheng-cai-zheng-ting-cai-zheng-dong-tai',
+ source: ['/xwdt/:category'],
+ target: (params) => {
+ if (params.category === 'gzdt') {
+ return '/gov/hebei/czt/xwdt/:category';
+ }
+ },
+ },
+ {
+ title: '河北省财政厅 - 综合新闻',
+ docs: 'https://docs.rsshub.app/government.html#he-bei-sheng-cai-zheng-ting-zong-he-xin-wen',
+ source: ['/xwdt/:category'],
+ target: (params) => {
+ if (params.category === 'zhxw') {
+ return '/gov/hebei/czt/xwdt/:category';
+ }
+ },
+ },
+ {
+ title: '河北省财政厅 - 通知公告',
+ docs: 'https://docs.rsshub.app/government.html#he-bei-sheng-cai-zheng-ting-tong-zhi-gong-gao',
+ source: ['/xwdt/:category'],
+ target: (params) => {
+ if (params.category === 'tzgg') {
+ return '/gov/hebei/czt/xwdt/:category';
+ }
+ },
+ },
+ ],
+ },
'homeaffairs.gov.au': {
_name: 'Department of Home Affairs',
immi: [
diff --git a/lib/v2/gov/router.js b/lib/v2/gov/router.js
index e285591b044d6a..853d6c35f80c15 100644
--- a/lib/v2/gov/router.js
+++ b/lib/v2/gov/router.js
@@ -18,6 +18,7 @@ module.exports = function (router) {
// province
router.get(/anhui\/kjt\/([\w\d/-]+)?/, require('./anhui/kjt'));
router.get('/beijing/kw/:channel', require('./beijing/kw/index'));
+ router.get('/hebei/czt/xwdt/:category?', require('./hebei/czt'));
router.get('/shenzhen/hrss/szksy/:caty/:page?', require('./shenzhen/hrss/szksy/index'));
router.get('/shenzhen/zzb/:caty/:page?', require('./shenzhen/zzb/index'));
router.get('/shanghai/rsj/ksxm', require('./shanghai/rsj/ksxm'));
diff --git a/lib/routes/juejin/books.js b/lib/v2/juejin/books.js
similarity index 89%
rename from lib/routes/juejin/books.js
rename to lib/v2/juejin/books.js
index a414643d7f291c..29120e0eb441ab 100644
--- a/lib/routes/juejin/books.js
+++ b/lib/v2/juejin/books.js
@@ -1,4 +1,5 @@
const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const response = await got({
@@ -17,7 +18,7 @@ module.exports = async (ctx) => {
${base_info.summary}
价格: ${base_info.price / 100}元
`,
- pubDate: new Date(base_info.ctime * 1000).toUTCString(),
+ pubDate: parseDate(base_info.ctime * 1000),
guid: base_info.booklet_id,
}));
diff --git a/lib/routes/juejin/category.js b/lib/v2/juejin/category.js
similarity index 95%
rename from lib/routes/juejin/category.js
rename to lib/v2/juejin/category.js
index 3a5e46d69cb6af..f3d3b6be3a1aba 100644
--- a/lib/routes/juejin/category.js
+++ b/lib/v2/juejin/category.js
@@ -26,7 +26,7 @@ module.exports = async (ctx) => {
let originalData = [];
if (response.data.data) {
- originalData = response.data.data.slice(0, 5);
+ originalData = response.data.data;
}
const resultItems = await util.ProcessFeed(originalData, ctx.cache);
diff --git a/lib/routes/juejin/collection.js b/lib/v2/juejin/collection.js
similarity index 100%
rename from lib/routes/juejin/collection.js
rename to lib/v2/juejin/collection.js
diff --git a/lib/routes/juejin/column.js b/lib/v2/juejin/column.js
similarity index 100%
rename from lib/routes/juejin/column.js
rename to lib/v2/juejin/column.js
diff --git a/lib/routes/juejin/favorites.js b/lib/v2/juejin/favorites.js
similarity index 100%
rename from lib/routes/juejin/favorites.js
rename to lib/v2/juejin/favorites.js
diff --git a/lib/v2/juejin/maintainer.js b/lib/v2/juejin/maintainer.js
new file mode 100644
index 00000000000000..8121cf2f1faef0
--- /dev/null
+++ b/lib/v2/juejin/maintainer.js
@@ -0,0 +1,13 @@
+module.exports = {
+ '/books': ['xyqfer'],
+ '/category/:category': ['DIYgod'],
+ '/collection/:collectionId': ['isQ'],
+ '/collections/:userId': ['isQ'],
+ '/column/:id': ['xiangzy1'],
+ '/news/:id': ['CancerGary'],
+ '/pins/:type?': ['xyqfer', 'laampui'],
+ '/posts/:id': ['Maecenas'],
+ '/shares/:userId': ['qiwihui'],
+ '/tag/:tag': ['isheng5'],
+ '/trending/:category/:type': ['moaix'],
+};
diff --git a/lib/v2/juejin/news.js b/lib/v2/juejin/news.js
new file mode 100644
index 00000000000000..494660f536596a
--- /dev/null
+++ b/lib/v2/juejin/news.js
@@ -0,0 +1,25 @@
+const got = require('@/utils/got');
+const util = require('./utils');
+
+module.exports = async (ctx) => {
+ const { id } = ctx.params;
+
+ const response = await got({
+ method: 'post',
+ url: 'https://api.juejin.cn/content_api/v1/news/list_user',
+ json: {
+ user_id: id,
+ sort_type: 2,
+ },
+ });
+ const { data } = response.data;
+ const username = data[0] && data[0].author_user_info && data[0].author_user_info.user_name;
+ const resultItems = await util.ProcessFeed(data, ctx.cache);
+
+ ctx.state.data = {
+ title: `掘金资讯-${username}`,
+ link: `https://juejin.cn/user/${id}/news`,
+ description: `掘金资讯-${username}`,
+ item: resultItems,
+ };
+};
diff --git a/lib/routes/juejin/pins.js b/lib/v2/juejin/pins.js
similarity index 91%
rename from lib/routes/juejin/pins.js
rename to lib/v2/juejin/pins.js
index 06cf3911736dbd..7c149dd1b541fd 100644
--- a/lib/routes/juejin/pins.js
+++ b/lib/v2/juejin/pins.js
@@ -1,7 +1,8 @@
const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
- const type = ctx.params.type || 'recommend';
+ const type = ctx.params.type ?? 'recommend';
const title = {
recommend: '推荐',
hot: '热门',
@@ -35,7 +36,7 @@ module.exports = async (ctx) => {
const title = content;
const guid = item.msg_id;
const link = `https://juejin.cn/pin/${guid}`;
- const pubDate = new Date(parseInt(item.msg_Info.ctime) * 1000).toUTCString();
+ const pubDate = parseDate(item.msg_Info.ctime * 1000);
const author = item.author_user_info.user_name;
const imgs = item.msg_Info.pic_list.reduce((imgs, item) => {
imgs += `
diff --git a/lib/routes/juejin/posts.js b/lib/v2/juejin/posts.js
similarity index 100%
rename from lib/routes/juejin/posts.js
rename to lib/v2/juejin/posts.js
diff --git a/lib/v2/juejin/radar.js b/lib/v2/juejin/radar.js
new file mode 100644
index 00000000000000..c86595dc6e9d78
--- /dev/null
+++ b/lib/v2/juejin/radar.js
@@ -0,0 +1,61 @@
+module.exports = {
+ 'juejin.cn': {
+ _name: '掘金',
+ '.': [
+ {
+ title: '标签',
+ docs: 'https://docs.rsshub.app/programming.html#jue-jin-biao-qian',
+ source: '/tag/:tag',
+ target: '/juejin/tag/:tag',
+ },
+ {
+ title: '小册',
+ docs: 'https://docs.rsshub.app/programming.html#jue-jin-xiao-ce',
+ source: '/books',
+ target: '/juejin/books',
+ },
+ {
+ title: '沸点',
+ docs: 'https://docs.rsshub.app/programming.html#jue-jin-fei-dian',
+ source: ['/pins/:type', '/pins/topic/:type'],
+ target: (params) => (params.type !== 'recommended' ? '/juejin/pins/:type' : '/juejin/pins'),
+ },
+ {
+ title: '用户专栏',
+ docs: 'https://docs.rsshub.app/programming.html#jue-jin-zhuan-lan',
+ source: ['/user/:id', '/user/:id/posts'],
+ target: '/juejin/posts/:id',
+ },
+ {
+ title: '收藏集',
+ docs: 'https://docs.rsshub.app/programming.html#jue-jin-shou-cang-ji',
+ source: ['/user/:id', '/user/:id/collections'],
+ target: '/juejin/collections/:id',
+ },
+ {
+ title: '单个收藏夹',
+ docs: 'https://docs.rsshub.app/programming.html#jue-jin-dan-ge-shou-cang-jia',
+ source: '/collection/:collectionId',
+ target: '/juejin/collection/:collectionId',
+ },
+ {
+ title: '分享',
+ docs: 'https://docs.rsshub.app/programming.html#jue-jin',
+ source: ['/user/:userId', '/user/:userId/shares'],
+ target: '/juejin/shares/:userId',
+ },
+ {
+ title: '专栏',
+ docs: 'https://docs.rsshub.app/programming.html#jue-jin',
+ source: '/column/:id',
+ target: '/juejin/column/:id',
+ },
+ {
+ title: '资讯',
+ docs: 'https://docs.rsshub.app/programming.html#jue-jin',
+ source: ['/user/:id', '/user/:id/news'],
+ target: '/juejin/news/:userId',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/juejin/router.js b/lib/v2/juejin/router.js
new file mode 100644
index 00000000000000..a3f4a2ea18ba4b
--- /dev/null
+++ b/lib/v2/juejin/router.js
@@ -0,0 +1,13 @@
+module.exports = (router) => {
+ router.get('/books', require('./books'));
+ router.get('/category/:category', require('./category'));
+ router.get('/collection/:collectionId', require('./collection'));
+ router.get('/collections/:userId', require('./favorites'));
+ router.get('/column/:id', require('./column'));
+ router.get('/news/:id', require('./news'));
+ router.get('/pins/:type?', require('./pins'));
+ router.get('/posts/:id', require('./posts'));
+ router.get('/shares/:userId', require('./shares'));
+ router.get('/tag/:tag', require('./tag'));
+ router.get('/trending/:category/:type', require('./trending'));
+};
diff --git a/lib/routes/juejin/shares.js b/lib/v2/juejin/shares.js
similarity index 100%
rename from lib/routes/juejin/shares.js
rename to lib/v2/juejin/shares.js
diff --git a/lib/routes/juejin/tag.js b/lib/v2/juejin/tag.js
similarity index 100%
rename from lib/routes/juejin/tag.js
rename to lib/v2/juejin/tag.js
diff --git a/lib/routes/juejin/trending.js b/lib/v2/juejin/trending.js
similarity index 100%
rename from lib/routes/juejin/trending.js
rename to lib/v2/juejin/trending.js
diff --git a/lib/routes/juejin/utils.js b/lib/v2/juejin/utils.js
similarity index 54%
rename from lib/routes/juejin/utils.js
rename to lib/v2/juejin/utils.js
index b62591cd089cf0..50a9faafe4394e 100644
--- a/lib/routes/juejin/utils.js
+++ b/lib/v2/juejin/utils.js
@@ -1,6 +1,6 @@
const got = require('@/utils/got');
+const cheerio = require('cheerio');
const { parseDate } = require('@/utils/parse-date');
-const timezone = require('@/utils/timezone');
const md = require('markdown-it')({
html: true,
});
@@ -15,21 +15,29 @@ async function load(id) {
});
let description;
if (response.data.data) {
- description = md.render(response.data.data.article_info.mark_content);
+ description = md.render(response.data.data.article_info.mark_content) || response.data.data.article_info.content;
}
return { description };
}
+const loadNews = async (link) => {
+ const response = await got(link);
+ const $ = cheerio.load(response.data);
+ $('h1.title, .main-box .message').remove();
+ return { description: $('.main-box .article').html() };
+};
+
const ProcessFeed = (list, caches) =>
Promise.all(
list.map(async (item) => {
- const pubDate = timezone(parseDate(parseInt(item.article_info.ctime) * 1000), +8);
- const link = `https://juejin.cn/post/${item.article_id}`;
+ const isArticle = !!item.article_info;
+ const pubDate = parseDate((isArticle ? item.article_info.ctime : item.content_info.ctime) * 1000);
+ const link = `https://juejin.cn${isArticle ? '/post/' + item.article_id : '/news/' + item.content_id}`;
// 列表上提取到的信息
const single = {
- title: item.article_info.title,
- description: (item.article_info.brief_content || '无描述').replace(/[\x00-\x08\x0b-\x0c\x0e-\x1f\x7f]/g, ''),
+ title: isArticle ? item.article_info.title : item.content_info.title,
+ description: ((isArticle ? item.article_info.brief_content : item.content_info.brief) || '无描述').replace(/[\x00-\x08\x0b-\x0c\x0e-\x1f\x7f]/g, ''),
pubDate,
author: item.author_user_info.user_name,
link,
@@ -37,7 +45,7 @@ const ProcessFeed = (list, caches) =>
// 使用tryGet方法从缓存获取内容。
// 当缓存中无法获取到链接内容的时候,则使用load方法加载文章内容。
- const other = await caches.tryGet(link, () => load(item.article_id));
+ const other = await caches.tryGet(link, () => (isArticle ? load(item.article_id) : loadNews(link)));
// 合并解析后的结果集作为该篇文章最终的输出结果
return { ...single, ...other };
})
diff --git a/lib/v2/lever/index.js b/lib/v2/lever/index.js
new file mode 100644
index 00000000000000..a8672a4ca5008d
--- /dev/null
+++ b/lib/v2/lever/index.js
@@ -0,0 +1,28 @@
+const got = require('@/utils/got');
+const { parseDate } = require('@/utils/parse-date');
+
+// Initiate a HTTP GET request
+module.exports = async (ctx) => {
+ const domain = ctx.params.domain;
+ const response = await got(`https://api.lever.co/v0/postings/${domain}?mode=json`);
+ const data = response.data;
+ ctx.state.data = {
+ // the source title
+ title: `${domain}'s Job feed in RSS`,
+ // the source link
+ link: `https://api.lever.co/v0/postings/${domain}`,
+ // the source description
+ description: `Auto Generated RSS Spec for ${domain}`,
+ // iterate through all leaf objects
+ item: data.map((item) => ({
+ // the article title
+ title: item.text,
+ // the article content
+ description: item.descriptionPlain,
+ // the article publish time
+ pubDate: parseDate(item.createdAt),
+ // the article link
+ link: item.hostedUrl,
+ })),
+ };
+};
diff --git a/lib/v2/lever/maintainer.js b/lib/v2/lever/maintainer.js
new file mode 100644
index 00000000000000..550490aac09ddb
--- /dev/null
+++ b/lib/v2/lever/maintainer.js
@@ -0,0 +1,3 @@
+module.exports = {
+ '/:domain': ['tsarlewey'],
+};
diff --git a/lib/v2/lever/radar.js b/lib/v2/lever/radar.js
new file mode 100644
index 00000000000000..ff990059c6ecd2
--- /dev/null
+++ b/lib/v2/lever/radar.js
@@ -0,0 +1,13 @@
+module.exports = {
+ 'lever.co': {
+ _name: 'Lever',
+ '.': [
+ {
+ title: 'Lever HRIS Job Boards Feed',
+ docs: 'https://docs.rsshub.app/other.html#lever',
+ source: ['/:domain'],
+ target: '/lever/:domain',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/lever/router.js b/lib/v2/lever/router.js
new file mode 100644
index 00000000000000..6d4b80086d5113
--- /dev/null
+++ b/lib/v2/lever/router.js
@@ -0,0 +1,3 @@
+module.exports = function (router) {
+ router.get('/:domain', require('./index.js'));
+};
diff --git a/lib/v2/lfsyd/templates/video.art b/lib/v2/lfsyd/templates/video.art
new file mode 100644
index 00000000000000..5aab94d67917f3
--- /dev/null
+++ b/lib/v2/lfsyd/templates/video.art
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lib/v2/lfsyd/utils.js b/lib/v2/lfsyd/utils.js
index c65df4e159318c..eab0dc21574456 100644
--- a/lib/v2/lfsyd/utils.js
+++ b/lib/v2/lfsyd/utils.js
@@ -74,6 +74,16 @@ const cleanHtml = (htmlString) => {
$(e).find('.audio-area.hidden').attr('class', 'audio-area');
});
+ $('.yingdi-video iframe').each((i, e) => {
+ const bvid = $(e)
+ .attr('src')
+ .match(/bvid=(.*?)&/)[1];
+ if (bvid) {
+ const url = `https://www.bilibili.com/video/${bvid}`;
+ $(e).after(art(path.join(__dirname, 'templates/video.art'), { url }));
+ }
+ });
+
// 用户头像
$('.yingdi-card.user').each((i, e) => {
$(e).prev('p').remove();
diff --git a/lib/v2/mobilism/forums.js b/lib/v2/mobilism/forums.js
new file mode 100644
index 00000000000000..a7e7ed4508414f
--- /dev/null
+++ b/lib/v2/mobilism/forums.js
@@ -0,0 +1,75 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { toTitleCase } = require('@/utils/common-utils');
+const { parseDate, parseRelativeDate } = require('@/utils/parse-date');
+const rootUrl = `https://forum.mobilism.org/viewforum.php?f=`;
+const categeoryMap = {
+ books: {
+ romance: 1292,
+ scifi: 1293,
+ classics: 121,
+ magazines: 123,
+ audioBooks: 124,
+ comics: 311,
+ },
+ android: {
+ apps: 399,
+ games: 408,
+ },
+ iphone: {
+ apps: 316,
+ games: 320,
+ },
+ ipad: {
+ apps: 951,
+ games: 988,
+ },
+};
+module.exports = async (ctx) => {
+ const { category, type, fulltext } = ctx.params;
+ const currentUrl = rootUrl + categeoryMap[category][type];
+ const response = await got(currentUrl);
+ const $ = cheerio.load(cheerio.load(response.data)('tbody')[1]);
+ const lists = $('tbody > tr');
+ const list = lists
+ .map((index, item) => {
+ item = $(item);
+ const title = item.find('td').first().find('a[title]').text();
+ const link = new URL(item.find('td').first().find('a[title]').attr('href'), 'https://forum.mobilism.org');
+ const author = item.find('td').first().find('a.username-coloured').text();
+ const pubDate = item.find('td').first().find('small').text();
+ link.searchParams.delete('sid');
+ return {
+ title,
+ link: link.toString(),
+ author,
+ pubDate: /ago|day/.test(pubDate) ? parseRelativeDate(pubDate) : parseDate(pubDate, 'MMM D, YYYY, h:mm a'),
+ };
+ })
+ .get()
+ .sort((a, b) => b.pubDate - a.pubDate)
+ .slice(0, ctx.query.limit ? parseInt(ctx.query.limit) : 35);
+ // server will return 520 if concurrency > 37 when fulltext is used
+ let items;
+ if (fulltext === 'y') {
+ items = await Promise.all(
+ list.map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got(item.link);
+ const content = cheerio.load(detailResponse.data);
+ item.description = content('div.content').html();
+ return item;
+ })
+ )
+ );
+ } else {
+ items = list;
+ }
+
+ ctx.state.data = {
+ title: `Mobilism Forums ${toTitleCase(category)} ${toTitleCase(type)} Release`,
+ link: currentUrl,
+ description: `Mobilism Forums ${toTitleCase(category)} ${toTitleCase(type)} RSS`,
+ item: items,
+ };
+};
diff --git a/lib/v2/mobilism/maintainer.js b/lib/v2/mobilism/maintainer.js
new file mode 100644
index 00000000000000..23853f51f2c86c
--- /dev/null
+++ b/lib/v2/mobilism/maintainer.js
@@ -0,0 +1,4 @@
+module.exports = {
+ '/forums/:category/:type/:fulltext?': ['nitezs'],
+ '/portal/:type/:fulltext?': ['nitezs'],
+};
diff --git a/lib/v2/mobilism/portal.js b/lib/v2/mobilism/portal.js
new file mode 100644
index 00000000000000..f61cd83a3c7b45
--- /dev/null
+++ b/lib/v2/mobilism/portal.js
@@ -0,0 +1,54 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { toTitleCase } = require('@/utils/common-utils');
+const { parseDate, parseRelativeDate } = require('@/utils/parse-date');
+
+const get = (data) => {
+ const $ = cheerio.load(data);
+ const posts = $('div.span9 > section');
+ const items = posts
+ .map((index, item) => {
+ item = $(item);
+ const link = new URL(item.find('div.well > a').attr('href'), 'https://forum.mobilism.org');
+ const pubDate = item.find('div.well > span.muted > em').text().replace(item.find('div.well > span.muted > em > strong').text(), '').replace(' at ', '').split(' in ')[0];
+ link.searchParams.delete('sid');
+ return {
+ title: item.find('div.page-header > h3').text(),
+ link: link.toString(),
+ author: item.find('div.well > span.muted > em > strong').text().replace('Posted by: ', ''),
+ description: item.find('div.well > div.postbody').text(),
+ pubDate: /ago|day/.test(pubDate) ? parseRelativeDate(pubDate) : parseDate(pubDate, 'MMM D, YYYY, h:mm a'),
+ };
+ })
+ .get();
+ return items;
+};
+
+module.exports = async (ctx) => {
+ const { type, fulltext } = ctx.params;
+ const url = `https://forum.mobilism.org/portal.php?mode=articles&block=${type}&sk=t&sd=d&start=0`;
+ const response = await got(url);
+ const list = get(response.data);
+ let items;
+ if (fulltext === 'y') {
+ items = await Promise.all(
+ list.map((item) =>
+ ctx.cache.tryGet(item.link, async () => {
+ const detailResponse = await got(item.link);
+ const content = cheerio.load(detailResponse.data);
+ item.description = content('div.content').html();
+ return item;
+ })
+ )
+ );
+ } else {
+ items = list;
+ }
+
+ ctx.state.data = {
+ title: `Mobilism Portal ${toTitleCase(type)} Release`,
+ link: url,
+ description: `Mobilism Portal ${toTitleCase(type)} RSS`,
+ item: items,
+ };
+};
diff --git a/lib/v2/mobilism/radar.js b/lib/v2/mobilism/radar.js
new file mode 100644
index 00000000000000..1ac08d61997175
--- /dev/null
+++ b/lib/v2/mobilism/radar.js
@@ -0,0 +1,23 @@
+module.exports = {
+ 'mobilism.org': {
+ _name: 'Mobilism',
+ '.': [
+ {
+ title: '论坛',
+ docs: 'https://docs.rsshub.app/bbs.html#mobilism',
+ source: '/',
+ },
+ {
+ title: '门户',
+ docs: 'https://docs.rsshub.app/bbs.html#mobilism',
+ source: '/portal.php',
+ target: (_params, url) => `/mobilism/portal/${new URL(url).searchParams.get('block')}`,
+ },
+ {
+ title: '电子书',
+ docs: 'https://docs.rsshub.app/reading.html#mobilism',
+ source: '/',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/mobilism/router.js b/lib/v2/mobilism/router.js
new file mode 100644
index 00000000000000..0d4647855e2430
--- /dev/null
+++ b/lib/v2/mobilism/router.js
@@ -0,0 +1,4 @@
+module.exports = function (router) {
+ router.get('/forums/:category/:type/:fulltext?', require('./forums'));
+ router.get('/portal/:type/:fulltext?', require('./portal'));
+};
diff --git a/lib/v2/nature/cover.js b/lib/v2/nature/cover.js
new file mode 100644
index 00000000000000..c08bb161d467c5
--- /dev/null
+++ b/lib/v2/nature/cover.js
@@ -0,0 +1,77 @@
+// The content is generateed by undocumentated API of nature journals
+// This router has **just** been tested in:
+// nature: Nature
+// nbt: Nature Biotechnology
+// neuro: Nature Neuroscience
+// ng: Nature Genetics
+// ni: Nature Immunology
+// nmeth: Nature Method
+// nchem: Nature Chemistry
+// nmat: Nature Materials
+// natmachintell: Nature Machine Intelligence
+// ncb: Nature Cell Biology
+// nplants: Nature Plants
+// natastron: Nature Astronomy
+// nphys Nature Physics
+
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
+const { baseUrl, journalMap } = require('./utils');
+
+module.exports = async (ctx) => {
+ const journals = journalMap.items;
+ const out = await Promise.all(
+ journals
+ .filter((j) => j.id)
+ .map(async (journal) => {
+ // get the lastest volumn and issue id
+ const pageURL = `${baseUrl}/${journal.title}/current-issue`;
+ const cookieData = await got
+ .extend({
+ prefixUrl: 'https://idp.nature.com/authorize',
+ followRedirect: false,
+ })
+ .get(`?response_type=cookie&client_id=grover&redirect_uri=${encodeURI(pageURL)}`)
+ .then((response) => response.headers['set-cookie'].join(' '));
+ const issueURL = await got
+ .extend({
+ prefixUrl: pageURL,
+ headers: {
+ cookie: cookieData,
+ },
+ followRedirect: false,
+ })
+ .get('')
+ .then((response) => response.headers.location);
+ const capturingRegex = /volumes\/(?
${utils.ProcessImage(item.target.content)}`,
author: item.target.author.name,
- pubDate: new Date(item.target.updated_time * 1000).toUTCString(),
+ pubDate: parseDate(item.target.updated_time * 1000),
guid: item.target.id.toString(),
link: `https://www.zhihu.com/question/${item.target.question.id}/answer/${item.target.id}`,
};
@@ -29,7 +30,7 @@ module.exports = async (ctx) => {
title: item.target.title,
description: `${item.target.author.name}的文章
${utils.ProcessImage(item.target.content)}`,
author: item.target.author.name,
- pubDate: new Date(item.updated * 1000).toUTCString(),
+ pubDate: parseDate(item.updated * 1000),
guid: item.target.id.toString(),
link: `https://zhuanlan.zhihu.com/p/${item.target.id}`,
};
@@ -37,7 +38,6 @@ module.exports = async (ctx) => {
return {
title: '未知类型',
description: '请点击链接提交issue',
- pubDate: new Date().toUTCString(),
guid: item.target.type,
link: 'https://github.com/DIYgod/RSSHub/issues',
};
diff --git a/lib/v2/zhihu/maintainer.js b/lib/v2/zhihu/maintainer.js
new file mode 100644
index 00000000000000..11609cf77cc12d
--- /dev/null
+++ b/lib/v2/zhihu/maintainer.js
@@ -0,0 +1,19 @@
+module.exports = {
+ '/bookstore/newest': ['xyqfer'],
+ '/collection/:id/:getAll?': ['huruji', 'Colin-XKL', 'Fatpandac'],
+ '/daily': ['DHPO'],
+ '/daily/section/:sectionId': ['ccbikai'],
+ '/hot/:category?': ['nczitzk'],
+ '/hotlist': ['DIYgod'],
+ '/people/activities/:id': ['DIYgod'],
+ '/people/answers/:id': ['DIYgod', 'prnake'],
+ '/people/pins/:id': ['xyqfer'],
+ '/pin/daily': ['xyqfer'],
+ '/pin/hotlist': ['xyqfer'],
+ '/posts/:usertype/:id': ['whtsky', 'Colin-XKL'],
+ '/question/:questionId': ['xyqfer', 'hacklu'],
+ '/timeline': ['SeanChao'],
+ '/topic/:topicId': ['xyqfer'],
+ '/weekly': ['LogicJake'],
+ '/zhuanlan/:id': ['DIYgod'],
+};
diff --git a/lib/routes/zhihu/pin/daily.js b/lib/v2/zhihu/pin/daily.js
similarity index 100%
rename from lib/routes/zhihu/pin/daily.js
rename to lib/v2/zhihu/pin/daily.js
diff --git a/lib/routes/zhihu/pin/hotlist.js b/lib/v2/zhihu/pin/hotlist.js
similarity index 100%
rename from lib/routes/zhihu/pin/hotlist.js
rename to lib/v2/zhihu/pin/hotlist.js
diff --git a/lib/routes/zhihu/pin/people.js b/lib/v2/zhihu/pin/people.js
similarity index 100%
rename from lib/routes/zhihu/pin/people.js
rename to lib/v2/zhihu/pin/people.js
diff --git a/lib/routes/zhihu/pin/utils.js b/lib/v2/zhihu/pin/utils.js
similarity index 95%
rename from lib/routes/zhihu/pin/utils.js
rename to lib/v2/zhihu/pin/utils.js
index 6cc3ae04c40592..6359583244b55b 100644
--- a/lib/routes/zhihu/pin/utils.js
+++ b/lib/v2/zhihu/pin/utils.js
@@ -1,8 +1,10 @@
+const { parseDate } = require('@/utils/parse-date');
+
module.exports = {
generateData: (data) =>
data.map((item) => {
const target = item.target ? item.target : item;
- const pubDate = new Date(target.created * 1000).toUTCString();
+ const pubDate = parseDate(target.created * 1000);
const author = target.author.name;
const title = `${author}:${target.excerpt_title}`;
const link = `https://www.zhihu.com/pin/${target.id}`;
diff --git a/lib/routes/zhihu/posts.js b/lib/v2/zhihu/posts.js
similarity index 96%
rename from lib/routes/zhihu/posts.js
rename to lib/v2/zhihu/posts.js
index 6d9181bce80ebb..74ce0c1492ef5f 100644
--- a/lib/routes/zhihu/posts.js
+++ b/lib/v2/zhihu/posts.js
@@ -36,7 +36,7 @@ module.exports = async (ctx) => {
item:
list.length > 0 &&
list.map((item) => ({
- title: String(item.title),
+ title: item.title,
description: item.content,
link: item.url,
pubDate: parseDate(item.updated * 1000),
diff --git a/lib/v2/zhihu/question.js b/lib/v2/zhihu/question.js
new file mode 100644
index 00000000000000..69a1c070433fd5
--- /dev/null
+++ b/lib/v2/zhihu/question.js
@@ -0,0 +1,78 @@
+const got = require('@/utils/got');
+const utils = require('./utils');
+const md5 = require('@/utils/md5');
+const g_encrypt = require('./execlib/g_encrypt');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const { questionId } = ctx.params;
+ // Because the API of zhihu.com has changed, we must use the value of `d_c0` (extracted from cookies) to calculate
+ // `x-zse-96`. So first get `d_c0`, then get the actual data of a ZhiHu question. In this way, we don't need to
+ // require users to set the cookie in environmental variables anymore.
+
+ // fisrt: get cookie(dc_0) from zhihu.com
+ const cookie_mes = await ctx.cache.tryGet('zhihu:cookies:d_c0', async () => {
+ const response = await got({
+ method: 'get',
+ url: `https://www.zhihu.com/question/${questionId}`,
+ headers: {
+ ...utils.header,
+ },
+ });
+
+ const cookie_org = response.headers['set-cookie'];
+ const cookie = cookie_org.toString();
+ const match = cookie.match(/d_c0=(\S+?)(?:;|$)/);
+ const cookie_mes = match && match[1];
+ if (!cookie_mes) {
+ throw Error('Failed to extract `d_c0` from cookies');
+ }
+ return cookie_mes;
+ });
+ const cookie = `d_c0=${cookie_mes}`;
+
+ // second: get real data from zhihu
+ const sort = 'updated'; // or default,created
+ const limit = 20;
+ const include =
+ 'data%5B*%5D.is_normal%2Cadmin_closed_comment%2Creward_info%2Cis_collapsed%2Cannotation_action%2Cannotation_detail%2Ccollapse_reason%2Cis_sticky%2Ccollapsed_by%2Csuggest_edit%2Ccomment_count%2Ccan_comment%2Ccontent%2Ceditable_content%2Cattachment%2Cvoteup_count%2Creshipment_settings%2Ccomment_permission%2Ccreated_time%2Cupdated_time%2Creview_info%2Crelevant_info%2Cquestion%2Cexcerpt%2Cis_labeled%2Cpaid_info%2Cpaid_info_content%2Crelationship.is_authorized%2Cis_author%2Cvoting%2Cis_thanked%2Cis_nothelp%2Cis_recognized%3Bdata%5B*%5D.mark_infos%5B*%5D.url%3Bdata%5B*%5D.author.follower_count%2Cbadge%5B*%5D.topics%3Bdata%5B*%5D.settings.table_of_content.enabled&offset=0';
+ const rootUrl = 'https://www.zhihu.com';
+ const apiPath = `/api/v4/questions/${questionId}/answers?include=${include}&limit=${limit}&sort_by=${sort}&platform=desktop`;
+ const url = rootUrl + apiPath;
+
+ // calculate x-zse-96, refer to https://github.com/srx-2000/spider_collection/issues/18
+ const f = `101_3_2.0+${apiPath}+${cookie_mes}`;
+ const xzse96 = '2.0_' + g_encrypt(md5(f));
+ const _header = { cookie, 'x-zse-96': xzse96, 'x-app-za': 'OS=Web', 'x-zse-93': '101_3_2.0' };
+
+ const response = await got({
+ method: 'get',
+ url,
+ headers: {
+ ...utils.header,
+ ..._header,
+ Referer: `https://www.zhihu.com/question/${questionId}`,
+ // Authorization: 'oauth c3cef7c66a1843f8b3a9e6a1e3160e20', // previously hard-coded in js, outdated
+ },
+ });
+
+ const listRes = response.data.data;
+
+ ctx.state.data = {
+ title: `知乎-${listRes[0].question.title}`,
+ link: `https://www.zhihu.com/question/${questionId}`,
+ item: listRes.map((item) => {
+ const title = `${item.author.name}的回答:${item.excerpt}`;
+ const description = `${item.author.name}的回答
${utils.ProcessImage(item.content)}`;
+
+ return {
+ title,
+ description,
+ author: item.author.name,
+ pubDate: parseDate(item.updated_time * 1000),
+ guid: item.id.toString(),
+ link: `https://www.zhihu.com/question/${questionId}/answer/${item.id}`,
+ };
+ }),
+ };
+};
diff --git a/lib/v2/zhihu/radar.js b/lib/v2/zhihu/radar.js
new file mode 100644
index 00000000000000..8bf6f289ba68fe
--- /dev/null
+++ b/lib/v2/zhihu/radar.js
@@ -0,0 +1,107 @@
+module.exports = {
+ 'zhihu.com': {
+ _name: '知乎',
+ www: [
+ {
+ title: '收藏夹',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/collection/:id',
+ target: '/zhihu/collection/:id',
+ },
+ {
+ title: '用户动态',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/people/:id',
+ target: '/zhihu/people/activities/:id',
+ },
+ {
+ title: '用户回答',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/people/:id/answers',
+ target: '/zhihu/people/answers/:id',
+ },
+ {
+ title: '用户想法',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/people/:id/pins',
+ target: '/zhihu/people/pins/:id',
+ },
+ {
+ title: '用户文章',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/:usertype/:id/posts',
+ target: '/zhihu/posts/:usertype/:id',
+ },
+
+ {
+ title: '热榜',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/hot',
+ target: '/zhihu/hotlist',
+ },
+ {
+ title: '想法热榜',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ target: '/zhihu/pin/hotlist',
+ },
+ {
+ title: '问题',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/question/:questionId',
+ target: '/zhihu/question/:questionId',
+ },
+ {
+ title: '话题',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/topic/:topicId/:type',
+ target: '/zhihu/topic/:topicId',
+ },
+ {
+ title: '新书',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/zhihu/bookstore/newest',
+ target: '/zhihu/pin/hotlist',
+ },
+ {
+ title: '想法-24 小时新闻汇总',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/pin/special/972884951192113152',
+ target: '/zhihu/pin/daily',
+ },
+ {
+ title: '书店-周刊',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/pub/weekly',
+ target: '/zhihu/weekly',
+ },
+ {
+ title: '专栏',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/column/:id',
+ target: '/zhihu/zhuanlan/:id',
+ },
+ ],
+ zhuanlan: [
+ {
+ title: '专栏',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/:id',
+ target: '/zhihu/zhuanlan/:id',
+ },
+ ],
+ daily: [
+ {
+ title: '日报',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '',
+ target: '/zhihu/daily',
+ },
+ {
+ title: '日报',
+ docs: 'https://docs.rsshub.app/social-media.html#zhi-hu',
+ source: '/*tpath',
+ target: '/zhihu/daily',
+ },
+ ],
+ },
+};
diff --git a/lib/v2/zhihu/router.js b/lib/v2/zhihu/router.js
new file mode 100644
index 00000000000000..b275fed88f5d78
--- /dev/null
+++ b/lib/v2/zhihu/router.js
@@ -0,0 +1,19 @@
+module.exports = (router) => {
+ router.get('/bookstore/newest', require('./bookstore/newest'));
+ router.get('/collection/:id/:getAll?', require('./collection'));
+ router.get('/daily', require('./daily'));
+ router.get('/daily/section/:sectionId', require('./daily_section'));
+ router.get('/hot/:category?', require('./hot'));
+ router.get('/hotlist', require('./hotlist'));
+ router.get('/people/activities/:id', require('./activities'));
+ router.get('/people/answers/:id', require('./answers'));
+ router.get('/people/pins/:id', require('./pin/people'));
+ router.get('/pin/daily', require('./pin/daily'));
+ router.get('/pin/hotlist', require('./pin/hotlist'));
+ router.get('/posts/:usertype/:id', require('./posts'));
+ router.get('/question/:questionId', require('./question'));
+ router.get('/timeline', require('./timeline'));
+ router.get('/topic/:topicId', require('./topic'));
+ router.get('/weekly', require('./weekly'));
+ router.get('/zhuanlan/:id', require('./zhuanlan'));
+};
diff --git a/lib/routes/zhihu/timeline.js b/lib/v2/zhihu/timeline.js
similarity index 94%
rename from lib/routes/zhihu/timeline.js
rename to lib/v2/zhihu/timeline.js
index 3c6cc490727ed9..ed648dc19109ea 100644
--- a/lib/routes/zhihu/timeline.js
+++ b/lib/v2/zhihu/timeline.js
@@ -1,6 +1,7 @@
const got = require('@/utils/got');
const config = require('@/config').value;
const utils = require('./utils');
+const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
const cookie = config.zhihu.cookies;
@@ -59,7 +60,7 @@ module.exports = async (ctx) => {
return {
title: `${e.action_text_tpl.replace('{}', buildActors(e))}: ${getOne([e.target.title, e.target.question ? e.target.question.title : ''])}`,
description: utils.ProcessImage(getOne([e.target.content, e.target.detail, e.target.excerpt, ''])),
- pubDate: new Date(e.updated_time * 1000),
+ pubDate: parseDate(e.updated_time * 1000),
link: buildLink(e),
author: e.target.author ? e.target.author.name : '',
guid: this.link,
@@ -79,7 +80,7 @@ module.exports = async (ctx) => {
.map((e) => `${e.title}
`)
.join('')
: '';
- const pubDate = e.list && Array.isArray(e.list) && e.list.length > 0 ? new Date(e.list[0].updated_time * 1000) : new Date();
+ const pubDate = e.list && Array.isArray(e.list) && e.list.length > 0 ? parseDate(e.list[0].updated_time * 1000) : new Date();
const guid = `${title} ${pubDate}`;
return {
title,
diff --git a/lib/routes/zhihu/topic.js b/lib/v2/zhihu/topic.js
similarity index 100%
rename from lib/routes/zhihu/topic.js
rename to lib/v2/zhihu/topic.js
diff --git a/lib/routes/zhihu/utils.js b/lib/v2/zhihu/utils.js
similarity index 100%
rename from lib/routes/zhihu/utils.js
rename to lib/v2/zhihu/utils.js
diff --git a/lib/routes/zhihu/weekly.js b/lib/v2/zhihu/weekly.js
similarity index 83%
rename from lib/routes/zhihu/weekly.js
rename to lib/v2/zhihu/weekly.js
index 44b3fd26f123e5..572ca121056d77 100644
--- a/lib/routes/zhihu/weekly.js
+++ b/lib/v2/zhihu/weekly.js
@@ -1,12 +1,11 @@
const got = require('@/utils/got');
const cheerio = require('cheerio');
-const url = require('url');
const host = 'https://www.zhihu.com';
module.exports = async (ctx) => {
const link = 'https://www.zhihu.com/pub/weekly';
- const response = await got.get(link);
+ const response = await got(link);
const $ = cheerio.load(response.data);
const description = $('p.Weekly-description').text();
@@ -15,7 +14,7 @@ module.exports = async (ctx) => {
.map(function () {
const info = {
title: $(this).find('span.PubBookListItem-title').text(),
- link: url.resolve(host, $(this).find('a.PubBookListItem-buttonWrapper').attr('href')),
+ link: new URL($(this).find('a.PubBookListItem-buttonWrapper').attr('href'), host).href,
description: $(this).find('div.PubBookListItem-description').text(),
author: $(this).find('span.PubBookListItem-author').text(),
};
diff --git a/lib/routes/zhihu/zhuanlan.js b/lib/v2/zhihu/zhuanlan.js
similarity index 90%
rename from lib/routes/zhihu/zhuanlan.js
rename to lib/v2/zhihu/zhuanlan.js
index 907685563dab85..0e54194d401161 100644
--- a/lib/routes/zhihu/zhuanlan.js
+++ b/lib/v2/zhihu/zhuanlan.js
@@ -1,9 +1,10 @@
const got = require('@/utils/got');
const utils = require('./utils');
const cheerio = require('cheerio');
+const { parseDate } = require('@/utils/parse-date');
module.exports = async (ctx) => {
- const id = String(ctx.params.id);
+ const id = ctx.params.id;
const listRes = await got({
method: 'get',
@@ -31,7 +32,7 @@ module.exports = async (ctx) => {
url = `https://www.zhihu.com/column/${id}`;
}
- const infoRes = await got.get(url);
+ const infoRes = await got(url);
const $ = cheerio.load(infoRes.data);
const title = $('.css-zyehvu').text();
const description = $('.css-1bnklpv').text();
@@ -54,18 +55,18 @@ module.exports = async (ctx) => {
title = item.question.title;
author = item.question.author ? item.question.author.name : '';
link = `https://www.zhihu.com/question/${item.question.id}/answer/${item.id}`;
- pubDate = new Date(item.created_time * 1000);
+ pubDate = parseDate(item.created_time * 1000);
} else if (item.type === 'article') {
title = item.title;
link = item.url;
author = item.author.name;
- pubDate = new Date(item.created * 1000);
+ pubDate = parseDate(item.created * 1000);
} else if (item.type === 'zvideo') {
// 官方 api 没有提供视频类的源 url, 故返回专栏页面 url
title = item.title;
link = url;
author = item.author.name;
- pubDate = new Date(item.created_at * 1000);
+ pubDate = parseDate(item.created_at * 1000);
// 判断是否存在视频简介
if (item.description) {
description = `${item.description}
视频内容请跳转至原页面观看`;
diff --git a/now.json b/now.json
deleted file mode 100644
index 6691f392a1427b..00000000000000
--- a/now.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "version": 2,
- "routes": [
- { "src": "/api/.*", "dest": "/api/now.js" },
- { "src": "/.*", "dest": "/api/now.js" }
- ]
-}
diff --git a/package.json b/package.json
index c1ec8a24c63849..41b92a56d8b855 100644
--- a/package.json
+++ b/package.json
@@ -43,17 +43,16 @@
"devDependencies": {
"@napi-rs/pinyin": "1.7.0",
"@types/koa": "2.13.4",
- "@vercel/nft": "0.18.2",
+ "@vercel/nft": "0.19.0",
"@vuepress/plugin-back-to-top": "1.9.7",
"@vuepress/plugin-google-analytics": "1.9.7",
"@vuepress/plugin-pwa": "1.9.7",
"@vuepress/shared-utils": "1.9.7",
- "ci-info": "3.3.0",
"cross-env": "7.0.3",
"eslint": "8.15.0",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.0.0",
- "eslint-plugin-yml": "0.14.0",
+ "eslint-plugin-yml": "1.0.0",
"fs-extra": "10.1.0",
"jest": "28.1.0",
"mockdate": "3.0.5",
@@ -66,12 +65,14 @@
"remark-frontmatter": "3.0.0",
"remark-gfm": "1.0.0",
"remark-pangu": "2.2.0",
+ "remark-parse": "9.0.0",
"remark-preset-prettier": "0.5.1",
"remark-stringify": "9.0.1",
"staged-git-files": "1.3.0",
"string-width": "4.2.3",
"supertest": "6.2.3",
"tosource": "2.0.0-alpha.3",
+ "unified": "9.2.2",
"vuepress": "1.9.7",
"yorkie": "2.0.0"
},
@@ -99,8 +100,7 @@
"https-proxy-agent": "5.0.1",
"iconv-lite": "0.6.3",
"instagram-private-api": "1.45.3",
- "ioredis": "5.0.4",
- "ip": "*",
+ "ioredis": "5.0.5",
"ip-regex": "4.3.0",
"is-localhost-ip": "1.4.0",
"jsdom": "19.0.0",
@@ -122,7 +122,7 @@
"puppeteer-extra": "3.2.3",
"puppeteer-extra-plugin-stealth": "2.9.0",
"query-string": "7.1.1",
- "rand-user-agent": "1.0.62",
+ "rand-user-agent": "1.0.63",
"require-all": "3.0.0",
"rss-parser": "3.12.0",
"showdown": "2.1.0",
diff --git a/scripts/docker/minify-docker.js b/scripts/docker/minify-docker.js
index 908eb490124a22..c12274a6018df1 100644
--- a/scripts/docker/minify-docker.js
+++ b/scripts/docker/minify-docker.js
@@ -6,7 +6,7 @@ const { nodeFileTrace } = require('@vercel/nft');
const projectRoot = path.resolve(process.env.PROJECT_ROOT || path.join(__dirname, '../..'));
const resultFolder = path.join(projectRoot, 'app-minimal'); // no need to resolve, ProjectRoot is always absolute
-const files = ['lib/index.js', 'api/now.js'].map((file) => path.join(projectRoot, file));
+const files = ['lib/index.js', 'api/vercel.js'].map((file) => path.join(projectRoot, file));
(async () => {
console.log('Start analyzing, project root:', projectRoot);
diff --git a/scripts/workflow/build-radar.js b/scripts/workflow/build-radar.js
index 822b33afe5f74b..40929b803fb4af 100644
--- a/scripts/workflow/build-radar.js
+++ b/scripts/workflow/build-radar.js
@@ -1,6 +1,8 @@
const fs = require('fs');
const path = require('path');
-const target = path.join(__dirname, '../../assets/build/radar-rules.js');
+const targetJs = path.join(__dirname, '../../assets/build/radar-rules.js');
+const targetJson = path.join(__dirname, '../../assets/build/radar-rules.json');
const radar = require(path.join(__dirname, '../../lib/radar.js'));
-fs.writeFileSync(target, radar.toSource());
+fs.writeFileSync(targetJs, radar.toSource());
+fs.writeFileSync(targetJson, JSON.stringify(radar.rules, undefined, 2));
diff --git a/scripts/workflow/test-issue/call-maintainer.js b/scripts/workflow/test-issue/call-maintainer.js
new file mode 100644
index 00000000000000..4dd312660e5d39
--- /dev/null
+++ b/scripts/workflow/test-issue/call-maintainer.js
@@ -0,0 +1,176 @@
+const unified = require('unified');
+const parse = require('remark-parse');
+const got = require('got');
+
+// @TODO maybe we could use label or some other better ways to distinguish bug/feature issues
+const matchTitle = ['路由地址', 'Routes'];
+const maintainerURL = 'https://raw.githubusercontent.com/DIYgod/RSSHub/gh-pages/build/maintainer.json';
+const successTag = 'Bug Ping: Pinged';
+const parseFailTag = 'Bug Ping: Parsing Failed';
+const failTag = 'Bug Ping: Not Found';
+const v1route = 'Route: v1';
+const v2route = 'Route: v2';
+
+// DnD (do-not-disturb) usernames, add yours here to avoid being notified
+const dndUsernames = new Set([]);
+
+async function parseBodyRoutes(body, core) {
+ const ast = await unified().use(parse).parse(body);
+
+ // Is this a bug report?
+ const title = ast.children[0].children[0].value.trim();
+ core.debug(`title: ${title}`);
+ if (!matchTitle.some((ele) => ele.localeCompare(title) === 0)) {
+ return null;
+ }
+
+ let routes = ast.children[1].value.trim();
+ core.debug(`routes: ${JSON.stringify(routes)}`);
+ if (routes.localeCompare('NOROUTE') === 0) {
+ return null;
+ }
+
+ if (routes) {
+ routes = routes.split(/\r?\n/).filter((n) => n);
+ const dedup = [...new Set(routes)];
+ if (dedup.length !== routes.length) {
+ core.warning('Duplication detected.');
+ }
+ core.debug(dedup);
+ return dedup;
+ }
+
+ throw 'unable to parse the issue body: route does not exist';
+}
+
+async function getMaintainersByRoutes(routes, core) {
+ const maintainers = await got(maintainerURL).json();
+
+ return routes.map((e) => {
+ const m = maintainers[e];
+ if (m === undefined) {
+ core.warning(`Route ${e} not found`);
+ }
+
+ return m;
+ });
+}
+
+module.exports = async ({ github, context, core }) => {
+ const body = context.payload.issue.body;
+ const issue_facts = {
+ issue_number: context.issue.number,
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ };
+
+ const routes = await parseBodyRoutes(body, core).catch((e) => {
+ core.warning(e);
+ });
+
+ if (routes === null) {
+ return; // Not a bug report, or NOROUTE
+ }
+
+ if (routes === undefined) {
+ await github.rest.issues
+ .addLabels({
+ ...issue_facts,
+ labels: [parseFailTag],
+ })
+ .catch((e) => {
+ core.warning(e);
+ });
+ return;
+ }
+
+ const maintainers = await getMaintainersByRoutes(routes, core);
+
+ let successCount = 0;
+ let emptyCount = 0;
+ let failedCount = 0;
+ let comments = '##### Searching for maintainers: \n\n';
+
+ for (let i = 0; i < routes.length; i++) {
+ const route = routes[i];
+ const main = maintainers[i];
+ if (main === undefined) {
+ comments += `- \`${route}\`: **Route not found**\n`;
+ failedCount += 1;
+ continue;
+ }
+
+ if (main.length === 0) {
+ comments += `- \`${route}\`: No maintainer listed, possibly a v1 or misconfigured route\n`;
+ emptyCount += 1;
+ continue;
+ }
+
+ if (main.length > 0) {
+ const pingStr = main
+ .map((e) => {
+ if (e in dndUsernames) {
+ return `\`@${e}\``; // Wrap in an inline code block to make sure no mention will be sent
+ }
+ return `@${e}`;
+ })
+ .join(' ');
+ comments += `- \`${route}\`: ${pingStr}\n`;
+ successCount += 1;
+ }
+ }
+
+ const labels = [`Count: ${successCount}/${routes.length}`];
+
+ if (failedCount > 0) {
+ labels.push(failTag);
+ } else {
+ labels.push(successTag);
+ }
+
+ if (emptyCount > 0) {
+ labels.push(v1route);
+ }
+
+ if (successCount > 0) {
+ labels.push(v2route);
+ }
+
+ // Write labels (status, affected route count)
+ await github.rest.issues
+ .addLabels({
+ ...issue_facts,
+ labels,
+ })
+ .catch((e) => {
+ core.warning(e);
+ });
+
+ // Reply to the issue and notify the maintainers (if any)
+ await github.rest.issues
+ .createComment({
+ ...issue_facts,
+ body: `${comments}
+
+
+> To maintainers: if you are not willing to be disturbed, list your username in \`scripts/workflow/test-issue/call-maintainer.js\`. In this way, your username will be wrapped in an inline code block when tagged so you will not be notified.
+
+如果有任何路由无法匹配,issue 将会被自动关闭。如果 issue 和路由无关,请使用 \`NOROUTE\` 关键词,或者留下评论。我们会重新审核。
+If there is any route not found, the issue will be closed automatically. Please use \`NOROUTE\` for a route-irrelevant issue or leave a comment if it is a mistake.
+`,
+ })
+ .catch((e) => {
+ core.warning(e);
+ });
+
+ if (failedCount > 0) {
+ await github.rest.issues
+ .update({
+ ...issue_facts,
+ state: 'closed',
+ })
+ .catch((e) => {
+ core.warning(e);
+ });
+ }
+};
diff --git a/test/utils/parse-date.js b/test/utils/parse-date.js
index 87e170ffe257f9..682b9118518577 100644
--- a/test/utils/parse-date.js
+++ b/test/utils/parse-date.js
@@ -112,6 +112,10 @@ describe('parseRelativeDate', () => {
expect(+new Date(parseRelativeDate('Today 08:00'))).toBe(+date + 8 * hour);
});
+ it('Today, h:m a', () => {
+ expect(+new Date(parseRelativeDate('Today, 8:00 pm'))).toBe(+date + 20 * hour);
+ });
+
it('TDA H:m:s', () => {
expect(+new Date(parseRelativeDate('TDA 08:00:00'))).toBe(+date + 8 * hour);
});
diff --git a/vercel.json b/vercel.json
new file mode 100644
index 00000000000000..b2b787b45a10bd
--- /dev/null
+++ b/vercel.json
@@ -0,0 +1,6 @@
+{
+ "routes": [
+ { "src": "/api/.*", "dest": "/api/vercel.js" },
+ { "src": "/.*", "dest": "/api/vercel.js" }
+ ]
+}
diff --git a/yarn.lock b/yarn.lock
index 66426f7b715815..8a70507058ddaa 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1257,24 +1257,24 @@
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/resolve-uri@^3.0.3":
- version "3.0.6"
- resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.6.tgz#4ac237f4dabc8dd93330386907b97591801f7352"
- integrity sha512-R7xHtBSNm+9SyvpJkdQl+qrM3Hm2fea3Ef197M3mUug+v+yR+Rhfbs7PBtcBUVnIWJ4JcAdjvij+c8hXS9p5aw==
+ version "3.0.7"
+ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz#30cd49820a962aff48c8fffc5cd760151fca61fe"
+ integrity sha512-8cXDaBBHOr2pQ7j77Y6Vp5VDT2sIqWyWQ56TjEq4ih/a4iST3dItRe8Q9fp0rrIl9DoKhWQtUQz/YpOxLkXbNA==
"@jridgewell/set-array@^1.0.0":
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.0.tgz#1179863356ac8fbea64a5a4bcde93a4871012c01"
- integrity sha512-SfJxIxNVYLTsKwzB3MoOQ1yxf4w/E6MdkvTgrgAt1bfxjSrLUoHMKrDOykwN14q65waezZIdqDneUIPh4/sKxg==
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea"
+ integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ==
"@jridgewell/sourcemap-codec@^1.4.10":
- version "1.4.11"
- resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz#771a1d8d744eeb71b6adb35808e1a6c7b9b8c8ec"
- integrity sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg==
+ version "1.4.13"
+ resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.13.tgz#b6461fb0c2964356c469e115f504c95ad97ab88c"
+ integrity sha512-GryiOJmNcWbovBxTfZSF71V/mXbgcV3MewDe3kIMCLyIh5e7SKAeUZs+rMnJ8jkMolZ/4/VsdBmMrw3l+VdZ3w==
"@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9":
- version "0.3.9"
- resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9"
- integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==
+ version "0.3.13"
+ resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea"
+ integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w==
dependencies:
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
@@ -1674,9 +1674,9 @@
"@types/node" "*"
"@types/content-disposition@*":
- version "0.5.4"
- resolved "https://registry.yarnpkg.com/@types/content-disposition/-/content-disposition-0.5.4.tgz#de48cf01c79c9f1560bcfd8ae43217ab028657f8"
- integrity sha512-0mPF08jn9zYI0n0Q/Pnz7C4kThdSt+6LD4amsrYDDpgBfrVWa3TcCOxKX1zkGgYniGagRv8heN2cbh+CAn+uuQ==
+ version "0.5.5"
+ resolved "https://registry.yarnpkg.com/@types/content-disposition/-/content-disposition-0.5.5.tgz#650820e95de346e1f84e30667d168c8fd25aa6e3"
+ integrity sha512-v6LCdKfK6BwcqMo+wYW05rLS12S0ZO0Fl4w1h4aaZMD7bqT3gVUns6FvLJKGZHQmYn3SX55JWGpziwJRwVgutA==
"@types/cookies@*":
version "0.7.7"
@@ -1750,9 +1750,9 @@
integrity sha512-EqX+YQxINb+MeXaIqYDASb6U6FCHbWjkj4a1CKDBks3d/QiB2+PqBLyO72vLDgAO1wUI4O+9gweRcQK11bTL/w==
"@types/http-proxy@^1.17.5":
- version "1.17.8"
- resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.8.tgz#968c66903e7e42b483608030ee85800f22d03f55"
- integrity sha512-5kPLG5BKpWYkw/LVOGWpiq3nEVqxiN32rTgI53Sk12/xHFQ2rG3ehI9IO+O3W2QoKeyB92dJkoka8SUm6BX1pA==
+ version "1.17.9"
+ resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.9.tgz#7f0e7931343761efde1e2bf48c40f02f3f75705a"
+ integrity sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw==
dependencies:
"@types/node" "*"
@@ -1861,14 +1861,14 @@
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
"@types/node@*":
- version "17.0.31"
- resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.31.tgz#a5bb84ecfa27eec5e1c802c6bbf8139bdb163a5d"
- integrity sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q==
+ version "17.0.33"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.33.tgz#3c1879b276dc63e73030bb91165e62a4509cd506"
+ integrity sha512-miWq2m2FiQZmaHfdZNcbpp9PuXg34W5JZ5CrJ/BaS70VuhoJENBEQybeiYSaPBRNq6KQGnjfEnc/F3PN++D+XQ==
"@types/prettier@^2.1.5":
- version "2.6.0"
- resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.0.tgz#efcbd41937f9ae7434c714ab698604822d890759"
- integrity sha512-G/AdOadiZhnJp0jXCaBQU449W2h716OW/EoXeYkCytxKL06X1WCXB4DZpp8TpZ8eyIJVS1cw4lrlkkSYU21cDw==
+ version "2.6.1"
+ resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.1.tgz#76e72d8a775eef7ce649c63c8acae1a0824bbaed"
+ integrity sha512-XFjFHmaLVifrAKaZ+EKghFHtHSUonyw8P2Qmy2/+osBnrKbH9UYtlK10zg8/kCt47MFilll/DEDKy3DHfJ0URw==
"@types/puppeteer@*":
version "5.4.6"
@@ -2008,10 +2008,10 @@
dependencies:
"@types/node" "*"
-"@vercel/nft@0.18.2":
- version "0.18.2"
- resolved "https://registry.yarnpkg.com/@vercel/nft/-/nft-0.18.2.tgz#46ab17e1d631220bfc21c8fe299d10e36514e897"
- integrity sha512-Oxy4y5JDh7CMbaxEGjKKzHcnQ1gRQqtfp+x3xvOmZYixXHwaD2RMJDTzaPz0b2B3pgVbbPOHY87wffJPFDaoFg==
+"@vercel/nft@0.19.0":
+ version "0.19.0"
+ resolved "https://registry.yarnpkg.com/@vercel/nft/-/nft-0.19.0.tgz#56f2a17e0685b5c052158aafec3a9f31552de5b4"
+ integrity sha512-diHIP3/OHq/4wSkS4JJ7LqY6NAQOpCr83vpNZuKqx2PV7zrhwUH8CZ9QCu0SHkZh3LYaV0zcbGusVxTNw3DMvA==
dependencies:
"@mapbox/node-pre-gyp" "^1.0.5"
acorn "^8.6.0"
@@ -3628,9 +3628,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001332:
- version "1.0.30001335"
- resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001335.tgz#899254a0b70579e5a957c32dced79f0727c61f2a"
- integrity sha512-ddP1Tgm7z2iIxu6QTtbZUv6HJxSaV/PZeSrWFZtbY4JZ69tOeNhBCl3HyRQgeNZKE5AOn1kpV7fhljigy0Ty3w==
+ version "1.0.30001340"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001340.tgz#029a2f8bfc025d4820fafbfaa6259fd7778340c7"
+ integrity sha512-jUNz+a9blQTQVu4uFcn17uAD8IDizPzQkIKh3LCJfg9BkyIqExYYdyc/ZSlWUSKb8iYiXxKsxbv4zYSvkqjrxw==
caseless@~0.12.0:
version "0.12.0"
@@ -3810,11 +3810,6 @@ chrono-node@2.3.8:
dependencies:
dayjs "^1.10.0"
-ci-info@3.3.0, ci-info@^3.1.1, ci-info@^3.2.0:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2"
- integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw==
-
ci-info@^1.5.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-1.6.0.tgz#2ca20dbb9ceb32d4524a683303313f0304b1e497"
@@ -3825,6 +3820,11 @@ ci-info@^2.0.0:
resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46"
integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==
+ci-info@^3.1.1, ci-info@^3.2.0:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.1.tgz#58331f6f472a25fe3a50a351ae3052936c2c7f32"
+ integrity sha512-SXgeMX9VwDe7iFFaEWkA5AstuER9YKqy4EhHqr4DVqkwmD9rpVimkMKWHdjn30Ja45txyjhSn63lVX69eVCckg==
+
cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de"
@@ -4052,10 +4052,10 @@ component-emitter@^1.2.0, component-emitter@^1.2.1, component-emitter@^1.3.0:
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==
-compress-brotli@^1.3.6:
- version "1.3.6"
- resolved "https://registry.yarnpkg.com/compress-brotli/-/compress-brotli-1.3.6.tgz#64bd6f21f4f3e9841dbac392f4c29218caf5e9d9"
- integrity sha512-au99/GqZtUtiCBliqLFbWlhnCxn+XSYjwZ77q6mKN4La4qOXDoLVPZ50iXr0WmAyMxl8yqoq3Yq4OeQNPPkyeQ==
+compress-brotli@^1.3.8:
+ version "1.3.8"
+ resolved "https://registry.yarnpkg.com/compress-brotli/-/compress-brotli-1.3.8.tgz#0c0a60c97a989145314ec381e84e26682e7b38db"
+ integrity sha512-lVcQsjhxhIXsuupfy9fmZUFtAIdBmXA7EGY6GBdgZ++qkM9zG4YFT8iU7FoBxzryNDMOpD1HIFHUSX4D87oqhQ==
dependencies:
"@types/json-buffer" "~3.0.0"
json-buffer "~3.0.1"
@@ -4222,9 +4222,9 @@ copy-webpack-plugin@^5.0.2:
webpack-log "^2.0.0"
core-js-compat@^3.21.0, core-js-compat@^3.22.1, core-js-compat@^3.6.5:
- version "3.22.3"
- resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.22.3.tgz#9b10d786052d042bc97ee8df9c0d1fb6a49c2005"
- integrity sha512-wliMbvPI2idgFWpFe7UEyHMvu6HWgW8WA+HnDRtgzoSDYvXFMpoGX1H3tPDDXrcfUSyXafCLDd7hOeMQHEZxGw==
+ version "3.22.5"
+ resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.22.5.tgz#7fffa1d20cb18405bd22756ca1353c6f1a0e8614"
+ integrity sha512-rEF75n3QtInrYICvJjrAgV03HwKiYvtKHdPtaba1KucG+cNZ4NJnH9isqt979e67KZlhpbCOTwnsvnIr+CVeOg==
dependencies:
browserslist "^4.20.3"
semver "7.0.0"
@@ -4235,9 +4235,9 @@ core-js@^2.4.0, core-js@^2.6.12:
integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==
core-js@^3.6.4, core-js@^3.6.5:
- version "3.22.3"
- resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.22.3.tgz#498c41d997654cb00e81c7a54b44f0ab21ab01d5"
- integrity sha512-1t+2a/d2lppW1gkLXx3pKPVGbBdxXAkqztvWb1EJ8oF8O2gIGiytzflNiFEehYwVK/t2ryUsGBoOFFvNx95mbg==
+ version "3.22.5"
+ resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.22.5.tgz#a5f5a58e663d5c0ebb4e680cd7be37536fb2a9cf"
+ integrity sha512-VP/xYuvJ0MJWRAobcmQ8F2H6Bsn+s7zqAAjFaHGBMc5AQm7zaelhD1LGduFn2EehEcQcU+br6t+fwbpQ5d1ZWA==
core-util-is@1.0.2:
version "1.0.2"
@@ -4752,7 +4752,7 @@ defer-to-connect@^2.0.0:
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-2.0.1.tgz#8016bdb4143e4632b77a3449c6236277de520587"
integrity sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg==
-define-properties@^1.1.2, define-properties@^1.1.3:
+define-properties@^1.1.2, define-properties@^1.1.3, define-properties@^1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1"
integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA==
@@ -5110,9 +5110,9 @@ ee-first@1.1.1:
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
electron-to-chromium@^1.4.118:
- version "1.4.129"
- resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.129.tgz#c675793885721beefff99da50f57c6525c2cd238"
- integrity sha512-GgtN6bsDtHdtXJtlMYZWGB/uOyjZWjmRDumXTas7dGBaB9zUyCjzHet1DY2KhyHN8R0GLbzZWqm4efeddqqyRQ==
+ version "1.4.137"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.137.tgz#186180a45617283f1c012284458510cd99d6787f"
+ integrity sha512-0Rcpald12O11BUogJagX3HsCN3FE83DSqWjgXoHo5a72KUKMSfI39XBgJpgNNxS9fuGzytaFjE06kZkiVFy2qA==
ellipsize@0.1.0:
version "0.1.0"
@@ -5302,17 +5302,19 @@ error-inject@^1.0.0:
resolved "https://registry.yarnpkg.com/error-inject/-/error-inject-1.0.0.tgz#e2b3d91b54aed672f309d950d154850fa11d4f37"
integrity sha1-4rPZG1Su1nLzCdlQ0VSFD6EdTzc=
-es-abstract@^1.17.2, es-abstract@^1.19.1:
- version "1.19.5"
- resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.5.tgz#a2cb01eb87f724e815b278b0dd0d00f36ca9a7f1"
- integrity sha512-Aa2G2+Rd3b6kxEUKTF4TaW67czBLyAv3z7VOhYRU50YBx+bbsYZ9xQP4lMNazePuFlybXI0V4MruPos7qUo5fA==
+es-abstract@^1.17.2, es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.5:
+ version "1.20.0"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.0.tgz#b2d526489cceca004588296334726329e0a6bfb6"
+ integrity sha512-URbD8tgRthKD3YcC39vbvSDrX23upXnPcnGAjQfgxXF5ID75YcENawc9ZX/9iTP9ptUyfCLIxTTuMYoRfiOVKA==
dependencies:
call-bind "^1.0.2"
es-to-primitive "^1.2.1"
function-bind "^1.1.1"
+ function.prototype.name "^1.1.5"
get-intrinsic "^1.1.1"
get-symbol-description "^1.0.0"
has "^1.0.3"
+ has-property-descriptors "^1.0.0"
has-symbols "^1.0.3"
internal-slot "^1.0.3"
is-callable "^1.2.4"
@@ -5324,9 +5326,10 @@ es-abstract@^1.17.2, es-abstract@^1.19.1:
object-inspect "^1.12.0"
object-keys "^1.1.1"
object.assign "^4.1.2"
- string.prototype.trimend "^1.0.4"
- string.prototype.trimstart "^1.0.4"
- unbox-primitive "^1.0.1"
+ regexp.prototype.flags "^1.4.1"
+ string.prototype.trimend "^1.0.5"
+ string.prototype.trimstart "^1.0.5"
+ unbox-primitive "^1.0.2"
es-to-primitive@^1.2.1:
version "1.2.1"
@@ -5516,15 +5519,15 @@ eslint-plugin-prettier@4.0.0:
dependencies:
prettier-linter-helpers "^1.0.0"
-eslint-plugin-yml@0.14.0:
- version "0.14.0"
- resolved "https://registry.yarnpkg.com/eslint-plugin-yml/-/eslint-plugin-yml-0.14.0.tgz#110e1126ebe983d830e4ab8754e437f2279d2b72"
- integrity sha512-+0+bBV/07txENbxfrHF9olGoLCHez64vmnOmjWOoLwmXOwfdaSRleBSPIi4nWQs7WwX8lm/fSLadOjbVEcsXQQ==
+eslint-plugin-yml@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-yml/-/eslint-plugin-yml-1.0.0.tgz#9a1bd81176d2d70201b8db048533c0f1faebb35e"
+ integrity sha512-0RVoUFh5vpznE2DIP5agSpWO/nU8GgAWwoTAHWopU2X+1SCB5ykHU6DwS0GrZ5Hvejtk6CcADQllpQQJB4C5QA==
dependencies:
debug "^4.3.2"
lodash "^4.17.21"
natural-compare "^1.4.0"
- yaml-eslint-parser "^0.5.0"
+ yaml-eslint-parser "^1.0.0"
eslint-scope@^4.0.3:
version "4.0.3"
@@ -5679,9 +5682,9 @@ events@^3.0.0:
integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==
eventsource@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.1.0.tgz#00e8ca7c92109e94b0ddf32dac677d841028cfaf"
- integrity sha512-VSJjT5oCNrFvCS6igjzPAt5hBzQ2qPBFIbJ03zLI9SE0mxwZpMw6BfJrbFHm1a141AavMEB8JHmBhWAd66PfCg==
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.1.1.tgz#4544a35a57d7120fba4fa4c86cb4023b2c09df2f"
+ integrity sha512-qV5ZC0h7jYIAOhArFJgSfdyz6rALJyb270714o7ZtNnw2WSJ+eexhKtE0O8LYPRsHZHf2osHKZBxGPvm3kPkCA==
dependencies:
original "^1.0.0"
@@ -6102,9 +6105,9 @@ fn.name@1.x.x:
integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==
follow-redirects@^1.0.0:
- version "1.14.9"
- resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
- integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==
+ version "1.15.0"
+ resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.0.tgz#06441868281c86d0dda4ad8bdaead2d02dca89d4"
+ integrity sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==
for-in@^0.1.3:
version "0.1.8"
@@ -6124,9 +6127,9 @@ for-own@^0.1.3:
for-in "^1.0.1"
foreach@^2.0.5:
- version "2.0.5"
- resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
- integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k=
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.6.tgz#87bcc8a1a0e74000ff2bf9802110708cfb02eb6e"
+ integrity sha512-k6GAGDyqLe9JaebCsFCoudPPWfihKu8pylYXRlqP1J7ms39iPoTtk2fviNglIeQEwdh0bQeKJ01ZPyuyQvKzwg==
forever-agent@~0.6.1:
version "0.6.1"
@@ -6315,6 +6318,16 @@ function-bind@^1.1.1:
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+function.prototype.name@^1.1.5:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621"
+ integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==
+ dependencies:
+ call-bind "^1.0.2"
+ define-properties "^1.1.3"
+ es-abstract "^1.19.0"
+ functions-have-names "^1.2.2"
+
functional-red-black-tree@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
@@ -6539,9 +6552,9 @@ globals@^11.1.0:
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
globals@^13.6.0, globals@^13.9.0:
- version "13.13.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-13.13.0.tgz#ac32261060d8070e2719dd6998406e27d2b5727b"
- integrity sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==
+ version "13.15.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac"
+ integrity sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog==
dependencies:
type-fest "^0.20.2"
@@ -7411,10 +7424,10 @@ interpret@^1.0.0:
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
-ioredis@5.0.4:
- version "5.0.4"
- resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.0.4.tgz#0d4abfd818adfc5ef5029fddac4b8f503a1433b7"
- integrity sha512-qFJw3MnPNsJF1lcIOP3vztbsasOXK3nDdNAgjQj7t7/Bn/w10PGchTOpqylQNxjzPbLoYDu34LjeJtSWiKBntQ==
+ioredis@5.0.5:
+ version "5.0.5"
+ resolved "https://registry.yarnpkg.com/ioredis/-/ioredis-5.0.5.tgz#94e51284631b30e15b359cd17de59c48945230fb"
+ integrity sha512-H+u9YB/cBckDO5lt5+S34gGN1EuIBjjaXk31LivQWfX3G1cqZPYCiwF9qCOkqK2NsKVk+saoUN+fLBz5tc2gFw==
dependencies:
"@ioredis/commands" "^1.1.1"
cluster-key-slot "^1.1.0"
@@ -7436,10 +7449,10 @@ 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@*, 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=
+ip@^1.1.0, ip@^1.1.5:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48"
+ integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==
ipaddr.js@1.9.1, ipaddr.js@^1.9.0:
version "1.9.1"
@@ -8582,11 +8595,11 @@ keyv@^3.0.0:
json-buffer "3.0.0"
keyv@^4.0.0:
- version "4.2.2"
- resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.2.2.tgz#4b6f602c0228ef4d8214c03c520bef469ed6b768"
- integrity sha512-uYS0vKTlBIjNCAUqrjlxmruxOEiZxZIHXyp32sdcGmP+ukFrmWUnE//RcPXJH3Vxrni1H2gsQbjHE0bH7MtMQQ==
+ version "4.2.8"
+ resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.2.8.tgz#6c91189fe6134d8a526cb360566693c095fcfb60"
+ integrity sha512-IZZo6krhHWPhgsP5mBkEdPopVPN/stgCnBVuqi6dda/Nm5mDTOSVTrFMkWqlJsDum+B0YSe887tNxdjDWkO7aQ==
dependencies:
- compress-brotli "^1.3.6"
+ compress-brotli "^1.3.8"
json-buffer "3.0.1"
killable@^1.0.1:
@@ -10537,9 +10550,9 @@ path-to-regexp@0.1.7:
integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
path-to-regexp@^6.1.0:
- version "6.2.0"
- resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.0.tgz#f7b3803336104c346889adece614669230645f38"
- integrity sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==
+ version "6.2.1"
+ resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-6.2.1.tgz#d54934d6798eb9e5ef14e7af7962c945906918e5"
+ integrity sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==
path-type@^3.0.0:
version "3.0.0"
@@ -11409,10 +11422,10 @@ ramda@^0.26.1:
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06"
integrity sha512-hLWjpy7EnsDBb0p+Z3B7rPi3GDeRG5ZtiI33kJhTt+ORCd38AbAIjB/9zRIUoeTbE/AVX5ZkU7m6bznsvrf8eQ==
-rand-user-agent@1.0.62:
- version "1.0.62"
- resolved "https://registry.yarnpkg.com/rand-user-agent/-/rand-user-agent-1.0.62.tgz#50b648c7df1c26e1b62724506570d547c2c8824b"
- integrity sha512-gtgj9qp+Unim6N5vDvHY1UdSQQhAT9JmGHXQXVrUDKnUc2Hf8uM/O1X/WwiX1BJTXOUmMsvEHJLs3Of9Yzko3Q==
+rand-user-agent@1.0.63:
+ version "1.0.63"
+ resolved "https://registry.yarnpkg.com/rand-user-agent/-/rand-user-agent-1.0.63.tgz#eadb7ed4b7a1d0ffb07bca10d40c60346961e205"
+ integrity sha512-asYTDQa/bGvHKqm4XGHYnQZtdMAzE/X/C3roQdJzM3ShfykDx6jCrv12BIR8bF1okhb+6Va7x6UABA/j04Pm4g==
randexp@0.4.6:
version "0.4.6"
@@ -11583,7 +11596,7 @@ regex-not@^1.0.0, regex-not@^1.0.2:
extend-shallow "^3.0.2"
safe-regex "^1.1.0"
-regexp.prototype.flags@^1.2.0:
+regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.4.1:
version "1.4.3"
resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac"
integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==
@@ -11670,7 +11683,7 @@ remark-pangu@2.2.0:
unist-util-is "^4.0.2"
unist-util-visit "^2.0.2"
-remark-parse@^9.0.0:
+remark-parse@9.0.0, remark-parse@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-9.0.0.tgz#4d20a299665880e4f4af5d90b7c7b8a935853640"
integrity sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==
@@ -12652,21 +12665,23 @@ string-width@^3.0.0, string-width@^3.1.0:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^5.1.0"
-string.prototype.trimend@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80"
- integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==
+string.prototype.trimend@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0"
+ integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
+ define-properties "^1.1.4"
+ es-abstract "^1.19.5"
-string.prototype.trimstart@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed"
- integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==
+string.prototype.trimstart@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef"
+ integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg==
dependencies:
call-bind "^1.0.2"
- define-properties "^1.1.3"
+ define-properties "^1.1.4"
+ es-abstract "^1.19.5"
string_decoder@^1.0.0, string_decoder@^1.1.1:
version "1.3.0"
@@ -13388,7 +13403,7 @@ uglify-js@3.4.x:
commander "~2.19.0"
source-map "~0.6.1"
-unbox-primitive@^1.0.1:
+unbox-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e"
integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==
@@ -13434,7 +13449,7 @@ unicode-property-aliases-ecmascript@^2.0.0:
resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz#0a36cb9a585c4f6abd51ad1deddb285c165297c8"
integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==
-unified@^9.1.0:
+unified@9.2.2, unified@^9.1.0:
version "9.2.2"
resolved "https://registry.yarnpkg.com/unified/-/unified-9.2.2.tgz#67649a1abfc3ab85d2969502902775eb03146975"
integrity sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==
@@ -14536,19 +14551,19 @@ yallist@^4.0.0:
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
-yaml-eslint-parser@^0.5.0:
- version "0.5.0"
- resolved "https://registry.yarnpkg.com/yaml-eslint-parser/-/yaml-eslint-parser-0.5.0.tgz#01d4e4d992a820769ea85ef5fd526dfc20ebc6f5"
- integrity sha512-nJeyLA3YHAzhBTZbRAbu3W6xrSCucyxExmA+ZDtEdUFpGllxAZpto2Zxo2IG0r0eiuEiBM4e+wiAdxTziTq94g==
+yaml-eslint-parser@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/yaml-eslint-parser/-/yaml-eslint-parser-1.0.1.tgz#f1f867dc2e4c5101a3b60533b1cd181bed8cca3e"
+ integrity sha512-acQYWneSXwnJgPQbTyJvDxWx9zlJ/rq267p/zzQMSCE7ljJxQ8elefsQase1gEIJMo+pIqmLRczoo7fPt6VbKQ==
dependencies:
eslint-visitor-keys "^3.0.0"
lodash "^4.17.21"
- yaml "^1.10.2"
+ yaml "^2.0.0"
-yaml@^1.10.2:
- version "1.10.2"
- resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b"
- integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==
+yaml@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.1.0.tgz#96ba62ff4dd990c0eb16bd96c6254a085d288b80"
+ integrity sha512-OuAINfTsoJrY5H7CBWnKZhX6nZciXBydrMtTHr1dC4nP40X5jyTIVlogZHxSlVZM8zSgXRfgZGsaHF4+pV+JRw==
yargs-parser@^13.1.2:
version "13.1.2"
@@ -14588,9 +14603,9 @@ yargs@^13.3.2:
yargs-parser "^13.1.2"
yargs@^17.3.1:
- version "17.4.1"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.4.1.tgz#ebe23284207bb75cee7c408c33e722bfb27b5284"
- integrity sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==
+ version "17.5.0"
+ resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.0.tgz#2706c5431f8c119002a2b106fc9f58b9bb9097a3"
+ integrity sha512-3sLxVhbAB5OC8qvVRebCLWuouhwh/rswsiDYx3WGxajUk/l4G20SKfrKKFeNIHboUFt2JFgv2yfn+5cgOr/t5A==
dependencies:
cliui "^7.0.2"
escalade "^3.1.1"
From e95b898ec54abdb01a5584798b7e2b6c8fe8bcb2 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Thu, 2 Nov 2023 21:56:25 +0000
Subject: [PATCH 2/2] chore(deps): bump Simek/yarn-lock-changes from 0.9.0 to
0.11.3
Bumps [Simek/yarn-lock-changes](https://github.com/simek/yarn-lock-changes) from 0.9.0 to 0.11.3.
- [Release notes](https://github.com/simek/yarn-lock-changes/releases)
- [Commits](https://github.com/simek/yarn-lock-changes/compare/v0.9.0...v0.11.3)
---
updated-dependencies:
- dependency-name: Simek/yarn-lock-changes
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]