From 7deee8ea6fded632116e55c16c30e2dfd99f6c20 Mon Sep 17 00:00:00 2001 From: zph Date: Tue, 29 Dec 2020 17:43:46 +0800 Subject: [PATCH 01/39] Added Radio Free Asia --- docs/en/traditional-media.md | 12 +++++++++ docs/traditional-media.md | 12 +++++++++ lib/router.js | 3 +++ lib/routes/rfa/index.js | 47 ++++++++++++++++++++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 lib/routes/rfa/index.js diff --git a/docs/en/traditional-media.md b/docs/en/traditional-media.md index 983211fe8..4f942f500 100644 --- a/docs/en/traditional-media.md +++ b/docs/en/traditional-media.md @@ -149,6 +149,18 @@ Generates full-text feeds that the official feed doesn't provide. +## Radio Free Asia (RFA) + + + +Delivers a better experience by supporting parameter specification. + +Parameters can be obtained from the official website, for instance: + +`https://www.rfa.org/cantonese/news` corresponds to `/rfa/cantonese/news` + +`https://www.rfa.org/cantonese/news/htm` corresponds to `/rfa/cantonese/news/htm` + ## Reuters ### Channel diff --git a/docs/traditional-media.md b/docs/traditional-media.md index 94db156ae..6281d1bee 100644 --- a/docs/traditional-media.md +++ b/docs/traditional-media.md @@ -965,3 +965,15 @@ category 对应的关键词有 ### 九江新闻 + +## 自由亚洲电台 + + + +通过指定频道参数,提供比官方源更佳的阅读体验。 + +参数均可在官网获取,如: + +`https://www.rfa.org/cantonese/news` 对应 `/rfa/cantonese/news` + +`https://www.rfa.org/cantonese/news/htm` 对应 `/rfa/cantonese/news/htm` diff --git a/lib/router.js b/lib/router.js index 5bb0f656c..7ca17dea0 100644 --- a/lib/router.js +++ b/lib/router.js @@ -3780,4 +3780,7 @@ router.get('/nace/blog/:sort?', require('./routes/nace/blog')); // Caixin Latest router.get('/caixin/latest', require('./routes/caixin/latest')); +// Radio Free Asia +router.get('/rfa/:language?/:channel?/:subChannel?', require('./routes/rfa/index')); + module.exports = router; diff --git a/lib/routes/rfa/index.js b/lib/routes/rfa/index.js new file mode 100644 index 000000000..90791eb2f --- /dev/null +++ b/lib/routes/rfa/index.js @@ -0,0 +1,47 @@ +const cheerio = require('cheerio'); +const got = require('@/utils/got'); + +module.exports = async (ctx) => { + let url = 'https://www.rfa.org/' + (ctx.params.language || 'english'); + + if (ctx.params.channel) { + url += '/' + ctx.params.channel; + } + if (ctx.params.subChannel) { + url += '/' + ctx.params.subChannel; + } + + const response = await got.get(url); + const $ = cheerio.load(response.data); + + const selectors = ['div[id=topstorywidefulltease]', 'div.two_featured', 'div.three_featured', 'div.single_column_teaser', 'div.sectionteaser', 'div.specialwrap']; + const list = []; + selectors.forEach(function (selector) { + $(selector).each(function (_, e) { + const item = {}; + item.title = $(e).find('h2 a span').first().text(); + item.link = $(e).find('h2 a').first().attr('href'); + list.push(item); + }); + }); + + const result = await Promise.all( + list.map( + async (item) => + await ctx.cache.tryGet(item.link, async () => { + const content = await got.get(item.link); + + const description = cheerio.load(content.data); + item.description = description('div[id=storytext]').html(); + item.pubDate = new Date(description('span[id=story_date]').text()).toUTCString(); + return item; + }) + ) + ); + + ctx.state.data = { + title: 'RFA', + link: 'https://www.rfa.org/', + item: result, + }; +}; From 8f7f5918c081e34aece243c0337fa69ccc58f487 Mon Sep 17 00:00:00 2001 From: nczitzk Date: Wed, 30 Dec 2020 19:00:59 +0800 Subject: [PATCH 02/39] =?UTF-8?q?feat:=20add=20=E4=B8=AD=E5=9B=BD=E5=86=9C?= =?UTF-8?q?=E5=B7=A5=E6=B0=91=E4=B8=BB=E5=85=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/government.md | 12 +++++++++ lib/router.js | 3 +++ lib/routes/gov/ngd/index.js | 52 +++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 lib/routes/gov/ngd/index.js diff --git a/docs/government.md b/docs/government.md index 7787edca2..eb76ada01 100644 --- a/docs/government.md +++ b/docs/government.md @@ -185,6 +185,18 @@ pageClass: routes +## 中国农工民主党 + +### 新闻中心 + + + +将目标栏目的网址拆解为 `http://www.ngd.org.cn/` 和后面的字段,去掉 `.htm` 后,把后面的字段中的 `/` 替换为 `-`,即为该路由的 slug + +如:(要闻动态)[http://www.ngd.org.cn/xwzx/ywdt/index.htm] 的网址在 `http://www.ngd.org.cn/` 后的字段是 `xwzx/ywdt/index.htm`,则对应的 slug 为 `xwzx-ywdt-index`,对应的路由即为 `/ngd/xwzx-ywdt-index` + + + ## 中国人大网 diff --git a/lib/router.js b/lib/router.js index 5bb0f656c..7bb0603be 100644 --- a/lib/router.js +++ b/lib/router.js @@ -3780,4 +3780,7 @@ router.get('/nace/blog/:sort?', require('./routes/nace/blog')); // Caixin Latest router.get('/caixin/latest', require('./routes/caixin/latest')); +// 中国农工民主党 +router.get('/ngd/:slug?', require('./routes/gov/ngd/index')); + module.exports = router; diff --git a/lib/routes/gov/ngd/index.js b/lib/routes/gov/ngd/index.js new file mode 100644 index 000000000..5dfd996fe --- /dev/null +++ b/lib/routes/gov/ngd/index.js @@ -0,0 +1,52 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const slug = ctx.params.slug || 'xwzx-ywdt-index'; + + const rootUrl = 'http://www.ngd.org.cn'; + const currentUrl = `${rootUrl}/${slug.replace(/-/g, '/')}.htm`; + const response = await got({ + method: 'get', + url: currentUrl, + }); + + const $ = cheerio.load(response.data); + + const list = $('.gp-ellipsis a') + .slice(0, 15) + .map((_, item) => { + item = $(item); + return { + title: item.text(), + link: `${currentUrl.replace('/index.htm', '')}/${item.attr('href')}`, + }; + }) + .get(); + + const items = await Promise.all( + list.map( + async (item) => + await ctx.cache.tryGet(item.link, async () => { + const detailResponse = await got({ + method: 'get', + url: item.link, + }); + const content = cheerio.load(detailResponse.data); + const info = content('.articleAuthor').text().split('|'); + + item.author = info[0].replace('来源:', ''); + item.description = content('.gp-article').html(); + item.pubDate = new Date(info[info.length - 1].replace('发布时间:', '')).toUTCString(); + + return item; + }) + ) + ); + + ctx.state.data = { + title: $('title').text(), + link: currentUrl, + item: items, + }; +}; From 0f4c9e00fd72760477713e5d9ff50fc857729570 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 30 Dec 2020 20:59:18 +0000 Subject: [PATCH 03/39] chore(deps): bump query-string from 6.13.7 to 6.13.8 Bumps [query-string](https://github.com/sindresorhus/query-string) from 6.13.7 to 6.13.8. - [Release notes](https://github.com/sindresorhus/query-string/releases) - [Commits](https://github.com/sindresorhus/query-string/compare/v6.13.7...v6.13.8) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ff684507d..a733513d7 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "pidusage": "2.0.21", "plist": "3.0.1", "puppeteer": "5.5.0", - "query-string": "6.13.7", + "query-string": "6.13.8", "redis": "3.0.2", "require-all": "3.0.0", "rss-parser": "3.9.0", diff --git a/yarn.lock b/yarn.lock index c2b27d07d..1fe15db06 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10626,10 +10626,10 @@ qs@~6.5.2: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -query-string@6.13.7, query-string@^6.2.0: - version "6.13.7" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.13.7.tgz#af53802ff6ed56f3345f92d40a056f93681026ee" - integrity sha512-CsGs8ZYb39zu0WLkeOhe0NMePqgYdAuCqxOYKDR5LVCytDZYMGx3Bb+xypvQvPHVPijRXB0HZNFllCzHRe4gEA== +query-string@6.13.8, query-string@^6.2.0: + version "6.13.8" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.13.8.tgz#8cf231759c85484da3cf05a851810d8e825c1159" + integrity sha512-jxJzQI2edQPE/NPUOusNjO/ZOGqr1o2OBa/3M00fU76FsLXDVbJDv/p7ng5OdQyorKrkRz1oqfwmbe5MAMePQg== dependencies: decode-uri-component "^0.2.0" split-on-first "^1.0.0" From 925b2ee523df83ca389ae2d0aa6bdcf78617aa5b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 30 Dec 2020 21:06:52 +0000 Subject: [PATCH 04/39] chore(deps): bump rss-parser from 3.9.0 to 3.10.0 Bumps [rss-parser](https://github.com/bobby-brennan/rss-parser) from 3.9.0 to 3.10.0. - [Release notes](https://github.com/bobby-brennan/rss-parser/releases) - [Commits](https://github.com/bobby-brennan/rss-parser/compare/v3.9.0...v3.10.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a733513d7..e3912b7d9 100644 --- a/package.json +++ b/package.json @@ -109,7 +109,7 @@ "query-string": "6.13.8", "redis": "3.0.2", "require-all": "3.0.0", - "rss-parser": "3.9.0", + "rss-parser": "3.10.0", "showdown": "1.9.1", "socks-proxy-agent": "5.0.0", "string-similarity": "^4.0.3", diff --git a/yarn.lock b/yarn.lock index 1fe15db06..2285e4518 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11260,10 +11260,10 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" -rss-parser@3.9.0: - version "3.9.0" - resolved "https://registry.yarnpkg.com/rss-parser/-/rss-parser-3.9.0.tgz#469a1201619d155e902b073c4f495c589943085a" - integrity sha512-wlRSfGrotOXuWo19Dtl2KmQt7o9i5zzCExUrxpechE0O54BAx7JD+xhWyGumPPqiJj771ndflV3sE3bTHen0HQ== +rss-parser@3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/rss-parser/-/rss-parser-3.10.0.tgz#19a8bcc569981832180a87fe58a17f1838ca3a45" + integrity sha512-TC6FNvEmdFeaW6r/60MSJT7cp4d95X4M9As+mvNtxRx7YXHxpV95syMnWZthZSeD1BRN7SEKdq6c3nxMLQRopw== dependencies: entities "^2.0.3" xml2js "^0.4.19" From 3a563b623869b25773616867340468f1be04d295 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 2 Jan 2021 03:11:26 +0000 Subject: [PATCH 05/39] chore(deps-dev): bump eslint from 7.16.0 to 7.17.0 Bumps [eslint](https://github.com/eslint/eslint) from 7.16.0 to 7.17.0. - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v7.16.0...v7.17.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e3912b7d9..071ddae51 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@vuepress/plugin-google-analytics": "1.7.1", "@vuepress/plugin-pwa": "1.7.1", "cross-env": "7.0.3", - "eslint": "7.16.0", + "eslint": "7.17.0", "eslint-config-prettier": "7.1.0", "eslint-plugin-prettier": "3.3.0", "jest": "26.6.3", diff --git a/yarn.lock b/yarn.lock index 2285e4518..d34acfc0b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5099,10 +5099,10 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== -eslint@7.16.0: - version "7.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.16.0.tgz#a761605bf9a7b32d24bb7cde59aeb0fd76f06092" - integrity sha512-iVWPS785RuDA4dWuhhgXTNrGxHHK3a8HLSMBgbbU59ruJDubUraXN8N5rn7kb8tG6sjg74eE0RA3YWT51eusEw== +eslint@7.17.0: + version "7.17.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.17.0.tgz#4ccda5bf12572ad3bf760e6f195886f50569adb0" + integrity sha512-zJk08MiBgwuGoxes5sSQhOtibZ75pz0J35XTRlZOk9xMffhpA9BTbQZxoXZzOl5zMbleShbGwtw+1kGferfFwQ== dependencies: "@babel/code-frame" "^7.0.0" "@eslint/eslintrc" "^0.2.2" From ccf3f042924f290feecbf502a5574f6fc53540ce Mon Sep 17 00:00:00 2001 From: Laam Pui Date: Sat, 2 Jan 2021 11:34:41 +0800 Subject: [PATCH 06/39] fix: /douban/movie/later --- lib/routes/douban/later.js | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/lib/routes/douban/later.js b/lib/routes/douban/later.js index bf6a69ee0..8d9b784dd 100644 --- a/lib/routes/douban/later.js +++ b/lib/routes/douban/later.js @@ -1,19 +1,32 @@ const got = require('@/utils/got'); +const cheerio = require('cheerio'); module.exports = async (ctx) => { const response = await got({ method: 'get', - url: 'https://api.douban.com/v2/movie/coming_soon?apikey=0df993c66c0c636e29ecbb5344252a4a', + url: 'https://movie.douban.com/cinema/later/beijing/', }); - const movieList = response.data.subjects; + const $ = cheerio.load(response.data); + + const item = $('#showing-soon .item') + .map((index, ele) => { + const description = $(ele).html(); + const name = $('h3', ele).text().trim(); + const date = $('ul li', ele).eq(0).text().trim(); + const type = $('ul li', ele).eq(1).text().trim(); + const link = $('a.thumb', ele).attr('href'); + + return { + title: `${date} - 《${name}》 - ${type}`, + link, + description, + }; + }) + .get(); ctx.state.data = { title: '即将上映的电影', link: 'https://movie.douban.com/cinema/later/', - item: movieList.map((item) => ({ - title: item.title, - description: `标题:${item.title}
影片类型:${item.genres.join(' | ')}
评分:${item.rating.stars === '00' ? '无' : item.rating.average}
`, - link: item.alt, - })), + item, }; }; From c4dd02cae7d458486d140b175da9cc0336205e01 Mon Sep 17 00:00:00 2001 From: duhd1993 Date: Sat, 2 Jan 2021 19:25:25 -0500 Subject: [PATCH 07/39] caixin: add fulltext to the article route --- lib/routes/caixin/article.js | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/lib/routes/caixin/article.js b/lib/routes/caixin/article.js index 29fd6d70a..fe8d617c0 100644 --- a/lib/routes/caixin/article.js +++ b/lib/routes/caixin/article.js @@ -1,4 +1,5 @@ const got = require('@/utils/got'); +const cheerio = require('cheerio'); module.exports = async (ctx) => { const response = await got({ @@ -12,15 +13,33 @@ module.exports = async (ctx) => { const data = response.data.data.list; + const items = await Promise.all( + data.map(async (item) => { + const link = item.web_url; + const summary = `

摘要:${item.summary}

`; + + const fullText = await ctx.cache.tryGet(link, async () => { + const result = await got.get(link); + + const $ = cheerio.load(result.data); + + return $('#Main_Content_Val').html(); + }); + + return { + title: item.title, + description: summary + fullText, + link: link, + pubDate: new Date(item.time * 1000), + author: item.author_name, + }; + }) + ); + ctx.state.data = { title: `财新网 - 首页`, link: `http://www.caixin.com/`, description: '财新网 - 首页', - item: data.map((item) => ({ - title: item.title, - description: `

${item.summary}

`, - link: item.web_url, - pubDate: new Date(item.time * 1000), - })), + item: items, }; }; From df5e015dd79663fece927c25c28515f1c6727a47 Mon Sep 17 00:00:00 2001 From: duhd1993 Date: Sat, 2 Jan 2021 19:52:43 -0500 Subject: [PATCH 08/39] caixin: do not display fullText when it's not article --- lib/routes/caixin/article.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/caixin/article.js b/lib/routes/caixin/article.js index fe8d617c0..bef43439c 100644 --- a/lib/routes/caixin/article.js +++ b/lib/routes/caixin/article.js @@ -28,7 +28,7 @@ module.exports = async (ctx) => { return { title: item.title, - description: summary + fullText, + description: fullText ? summary + fullText : summary, link: link, pubDate: new Date(item.time * 1000), author: item.author_name, From e1a3f8c8698e6df2cf16db82a12d5f662f30382d Mon Sep 17 00:00:00 2001 From: duhd1993 Date: Sat, 2 Jan 2021 20:36:18 -0500 Subject: [PATCH 09/39] caixin: style of article route --- lib/routes/caixin/article.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/routes/caixin/article.js b/lib/routes/caixin/article.js index bef43439c..6874fe8aa 100644 --- a/lib/routes/caixin/article.js +++ b/lib/routes/caixin/article.js @@ -16,7 +16,7 @@ module.exports = async (ctx) => { const items = await Promise.all( data.map(async (item) => { const link = item.web_url; - const summary = `

摘要:${item.summary}

`; + const summary = `

${item.summary}

`; const fullText = await ctx.cache.tryGet(link, async () => { const result = await got.get(link); From 70696a36d1571c8960a2f65009fbe3854ec93778 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 3 Jan 2021 08:32:06 +0000 Subject: [PATCH 10/39] chore(deps): bump dayjs from 1.9.8 to 1.10.0 Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.9.8 to 1.10.0. - [Release notes](https://github.com/iamkun/dayjs/releases) - [Changelog](https://github.com/iamkun/dayjs/blob/v1.10.0/CHANGELOG.md) - [Commits](https://github.com/iamkun/dayjs/compare/v1.9.8...v1.10.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 071ddae51..74c273e1a 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "co-redis": "2.1.1", "crypto-js": "4.0.0", "currency-symbol-map": "4.0.4", - "dayjs": "1.9.8", + "dayjs": "1.10.0", "dotenv": "8.2.0", "emailjs-imap-client": "3.1.0", "entities": "2.1.0", diff --git a/yarn.lock b/yarn.lock index d34acfc0b..b1a64d593 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4304,10 +4304,10 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= -dayjs@1.9.8, dayjs@^1.8.29: - version "1.9.8" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.9.8.tgz#9a65fbdca037e3d5835f98672da6e796f757cd58" - integrity sha512-F42qBtJRa30FKF7XDnOQyNUTsaxDkuaZRj/i7BejSHC34LlLfPoIU4aeopvWfM+m1dJ6/DHKAWLg2ur+pLgq1w== +dayjs@1.10.0, dayjs@^1.8.29: + version "1.10.0" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.0.tgz#41ae4c1a5116c446738c4ec7e9f4f10e937e698b" + integrity sha512-U/yusl5TQPvU1Tlhsu3A82Ebn4BNKHJMIk9AePYHCmGtTXcuPkODiEhkzqA8mnQ0bbgoR6+oha2ioZEewOiP2A== de-indent@^1.0.2: version "1.0.2" From 199b4d3f46ea22dd739fff5edc19f37bb90153bb Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 3 Jan 2021 13:09:24 +0000 Subject: [PATCH 11/39] chore(deps): bump dayjs from 1.10.0 to 1.10.1 Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.10.0 to 1.10.1. - [Release notes](https://github.com/iamkun/dayjs/releases) - [Changelog](https://github.com/iamkun/dayjs/blob/v1.10.1/CHANGELOG.md) - [Commits](https://github.com/iamkun/dayjs/compare/v1.10.0...v1.10.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 74c273e1a..bd4f75e89 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "co-redis": "2.1.1", "crypto-js": "4.0.0", "currency-symbol-map": "4.0.4", - "dayjs": "1.10.0", + "dayjs": "1.10.1", "dotenv": "8.2.0", "emailjs-imap-client": "3.1.0", "entities": "2.1.0", diff --git a/yarn.lock b/yarn.lock index b1a64d593..19610af41 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4304,10 +4304,10 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= -dayjs@1.10.0, dayjs@^1.8.29: - version "1.10.0" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.0.tgz#41ae4c1a5116c446738c4ec7e9f4f10e937e698b" - integrity sha512-U/yusl5TQPvU1Tlhsu3A82Ebn4BNKHJMIk9AePYHCmGtTXcuPkODiEhkzqA8mnQ0bbgoR6+oha2ioZEewOiP2A== +dayjs@1.10.1, dayjs@^1.8.29: + version "1.10.1" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.1.tgz#114f678624842035396667a24eb1436814bc16fd" + integrity sha512-2xg7JrHQeLBQFkvTumLoy62x1siyeocc98QwjtURgvRqOPYmAkMUdmSjrOA+MlmL6QMQn5MUhDf6rNZNuPc1LQ== de-indent@^1.0.2: version "1.0.2" From 28bbaf02ce360b34c147a28b5781cdd5e656696e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 4 Jan 2021 15:18:40 +0000 Subject: [PATCH 12/39] chore(deps): bump koa from 2.13.0 to 2.13.1 Bumps [koa](https://github.com/koajs/koa) from 2.13.0 to 2.13.1. - [Release notes](https://github.com/koajs/koa/releases) - [Changelog](https://github.com/koajs/koa/blob/master/History.md) - [Commits](https://github.com/koajs/koa/compare/2.13.0...2.13.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 22 +++++++++++----------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index bd4f75e89..962c3d3c8 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "jsdom": "16.4.0", "json-bigint": "1.0.0", "json5": "2.1.3", - "koa": "2.13.0", + "koa": "2.13.1", "koa-basic-auth": "4.0.0", "koa-favicon": "2.1.0", "koa-mount": "4.0.0", diff --git a/yarn.lock b/yarn.lock index 19610af41..d60425b66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4497,16 +4497,16 @@ denque@^1.4.1: resolved "https://registry.yarnpkg.com/denque/-/denque-1.4.1.tgz#6744ff7641c148c3f8a69c307e51235c1f4a37cf" integrity sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ== -depd@^1.1.2, depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -depd@~2.0.0: +depd@^2.0.0, depd@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + des.js@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.0.tgz#c074d2e2aa6a8a9a07dbd61f9a15c2cd83ec8ecc" @@ -8038,10 +8038,10 @@ koa-mount@4.0.0: debug "^4.0.1" koa-compose "^4.1.0" -koa@2.13.0: - version "2.13.0" - resolved "https://registry.yarnpkg.com/koa/-/koa-2.13.0.tgz#25217e05efd3358a7e5ddec00f0a380c9b71b501" - integrity sha512-i/XJVOfPw7npbMv67+bOeXr3gPqOAw6uh5wFyNs3QvJ47tUx3M3V9rIE0//WytY42MKz4l/MXKyGkQ2LQTfLUQ== +koa@2.13.1: + version "2.13.1" + resolved "https://registry.yarnpkg.com/koa/-/koa-2.13.1.tgz#6275172875b27bcfe1d454356a5b6b9f5a9b1051" + integrity sha512-Lb2Dloc72auj5vK4X4qqL7B5jyDPQaZucc9sR/71byg7ryoD1NCaCm63CShk9ID9quQvDEi1bGR/iGjCG7As3w== dependencies: accepts "^1.3.5" cache-content-type "^1.0.0" @@ -8050,7 +8050,7 @@ koa@2.13.0: cookies "~0.8.0" debug "~3.1.0" delegates "^1.0.0" - depd "^1.1.2" + depd "^2.0.0" destroy "^1.0.4" encodeurl "^1.0.2" escape-html "^1.0.3" From 80af5678c7f2cb65aef489d6089577d6778aee15 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 4 Jan 2021 20:18:44 +0000 Subject: [PATCH 13/39] chore(deps-dev): bump eslint-plugin-prettier from 3.3.0 to 3.3.1 Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 3.3.0 to 3.3.1. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v3.3.0...v3.3.1) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 962c3d3c8..3c0c06c52 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "cross-env": "7.0.3", "eslint": "7.17.0", "eslint-config-prettier": "7.1.0", - "eslint-plugin-prettier": "3.3.0", + "eslint-plugin-prettier": "3.3.1", "jest": "26.6.3", "mockdate": "3.0.2", "nock": "13.0.5", diff --git a/yarn.lock b/yarn.lock index d60425b66..d1673c8d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5059,10 +5059,10 @@ eslint-config-prettier@7.1.0: resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-7.1.0.tgz#5402eb559aa94b894effd6bddfa0b1ca051c858f" integrity sha512-9sm5/PxaFG7qNJvJzTROMM1Bk1ozXVTKI0buKOyb0Bsr1hrwi0H/TzxF/COtf1uxikIK8SwhX7K6zg78jAzbeA== -eslint-plugin-prettier@3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.0.tgz#61e295349a65688ffac0b7808ef0a8244bdd8d40" - integrity sha512-tMTwO8iUWlSRZIwS9k7/E4vrTsfvsrcM5p1eftyuqWH25nKsz/o6/54I7jwQ/3zobISyC7wMy9ZsFwgTxOcOpQ== +eslint-plugin-prettier@3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.3.1.tgz#7079cfa2497078905011e6f82e8dd8453d1371b7" + integrity sha512-Rq3jkcFY8RYeQLgk2cCwuc0P7SEFwDravPhsJZOQ5N4YI4DSg50NyqJ/9gdZHzQlHf8MvafSesbNJCcP/FF6pQ== dependencies: prettier-linter-helpers "^1.0.0" From 2e07b9a23fb5eb68d64029092aec2f060fcef018 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 5 Jan 2021 02:35:55 +0000 Subject: [PATCH 14/39] chore(deps-dev): bump vuepress from 1.7.1 to 1.8.0 Bumps [vuepress](https://github.com/vuejs/vuepress/tree/HEAD/packages/vuepress) from 1.7.1 to 1.8.0. - [Release notes](https://github.com/vuejs/vuepress/releases) - [Changelog](https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md) - [Commits](https://github.com/vuejs/vuepress/commits/v1.8.0/packages/vuepress) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 121 +++++++++++++++++++++++++++++---------------------- 2 files changed, 69 insertions(+), 54 deletions(-) diff --git a/package.json b/package.json index 3c0c06c52..3a8214b5e 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "staged-git-files": "1.2.0", "string-width": "4.2.0", "supertest": "6.0.1", - "vuepress": "1.7.1", + "vuepress": "1.8.0", "yorkie": "2.0.0" }, "dependencies": { diff --git a/yarn.lock b/yarn.lock index d1673c8d3..9321e1631 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1906,18 +1906,18 @@ source-map "~0.6.1" vue-template-es2015-compiler "^1.9.0" -"@vuepress/core@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/core/-/core-1.7.1.tgz#e92faad0e9445fdd775f8e0d65e927bc35e80571" - integrity sha512-M5sxZq30Ke1vXa4ZZjk6185fwtpiJOqzXNnzcIe0GxtvtaF8Yij6b+KqQKlUJnnUXm+CKxiLCr8PTzDY26N7yw== +"@vuepress/core@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/core/-/core-1.8.0.tgz#b5450cdd33d7fc1e1d21a1590806d429c92d0dc9" + integrity sha512-DrHx3gXa5rUDdvjcUHhmZg1DccMwc3kiYpgtbKCuJpHksz9eAVuOxbcy/b6TGRbbY4Q5EA2Fs3kI9hvPjYdCrQ== dependencies: "@babel/core" "^7.8.4" "@vue/babel-preset-app" "^4.1.2" - "@vuepress/markdown" "1.7.1" - "@vuepress/markdown-loader" "1.7.1" - "@vuepress/plugin-last-updated" "1.7.1" - "@vuepress/plugin-register-components" "1.7.1" - "@vuepress/shared-utils" "1.7.1" + "@vuepress/markdown" "1.8.0" + "@vuepress/markdown-loader" "1.8.0" + "@vuepress/plugin-last-updated" "1.8.0" + "@vuepress/plugin-register-components" "1.8.0" + "@vuepress/shared-utils" "1.8.0" autoprefixer "^9.5.1" babel-loader "^8.0.4" cache-loader "^3.0.0" @@ -1950,21 +1950,21 @@ webpack-merge "^4.1.2" webpackbar "3.2.0" -"@vuepress/markdown-loader@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/markdown-loader/-/markdown-loader-1.7.1.tgz#f3ab20965d5dec6e2fc2d11c78ef1a9f08d62f72" - integrity sha512-GM1F/tRhP9qZydTC89FXJPlLH+BmZijMKom5BYLAMEXsU20A9kABTRoatPjOUbZuKT+gn03JgG97qVd8xa/ETw== +"@vuepress/markdown-loader@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/markdown-loader/-/markdown-loader-1.8.0.tgz#0d7493995869f974953b1aa47c7a791943d1d835" + integrity sha512-ykYTNe4mC/0CxyEfyM9+oYJqFvOMZWw5qiNZVfg2t+Ip8nVR2pFhQ6fJe07Pbtc59eT4awKSEd8/kcjhTpfeZA== dependencies: - "@vuepress/markdown" "1.7.1" + "@vuepress/markdown" "1.8.0" loader-utils "^1.1.0" lru-cache "^5.1.1" -"@vuepress/markdown@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/markdown/-/markdown-1.7.1.tgz#56f60c2362fd82b8f2702eefa366c0d5b02fdcbd" - integrity sha512-Ava9vJECHG1+RC53ut1dXSze35IH5tc3qesC06Ny37WS93iDSQy09j8y+a0Lugy12j1369+QQeRFWa40tdHczA== +"@vuepress/markdown@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/markdown/-/markdown-1.8.0.tgz#2fb0a9f6011d2543a4dc7d6a2ae976b9f49873ef" + integrity sha512-f2yhoIHTD6gaPeLLidkxuytKGQCT6Gopm0fpyKZwfFZaWWz5+RPPGevq5UTmTb+5vvO2Li44HJc1EV7QONOw9Q== dependencies: - "@vuepress/shared-utils" "1.7.1" + "@vuepress/shared-utils" "1.8.0" markdown-it "^8.4.1" markdown-it-anchor "^5.0.2" markdown-it-chain "^1.3.0" @@ -1972,10 +1972,10 @@ markdown-it-table-of-contents "^0.4.0" prismjs "^1.13.0" -"@vuepress/plugin-active-header-links@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-1.7.1.tgz#5a16281bebb977fc1c2b93d992b1a3b7ff840641" - integrity sha512-Wgf/oB9oPZLnYoLjQ/xbQc4Qa3RU5tXAo2dB4Xl/7bUL6SqBxO866kX3wPxKdSOIL58tq8iH9XbUe3Sxi8/ISQ== +"@vuepress/plugin-active-header-links@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-active-header-links/-/plugin-active-header-links-1.8.0.tgz#1e3f9c1057a58f3bc849d0eebbcd492975f63a88" + integrity sha512-0SqdkJLJSQqhPTgGccu/ev5zRCfeKKMkyPnUMJYsQe4zGhSosmwLcfB7LDo/VLqLhRipipzBnONESr12OgI4SQ== dependencies: lodash.debounce "^4.0.8" @@ -1991,17 +1991,17 @@ resolved "https://registry.yarnpkg.com/@vuepress/plugin-google-analytics/-/plugin-google-analytics-1.7.1.tgz#c337e13c8a27f6fea911a04db22a3f3596a571fb" integrity sha512-27fQzRMsqGYpMf+ruyhsdfLv/n6z6b6LutFLE/pH66Itlh6ox9ew31x0pqYBbWIC/a4lBfXYUwFvi+DEvlb1EQ== -"@vuepress/plugin-last-updated@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-last-updated/-/plugin-last-updated-1.7.1.tgz#668c55daa6b8bc1d8ee42cdb4169cf67c01b6e97" - integrity sha512-VW5jhBuO0WRHDsBmFsKC6QtEyBLCgyhuH9nQ65aairCn3tdoJPz0uQ4g3lr/boVbgsPexO677Sn3dRPgYqnMug== +"@vuepress/plugin-last-updated@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-last-updated/-/plugin-last-updated-1.8.0.tgz#a0fcd2906a4dcae107634013f7c49ddd05e0de87" + integrity sha512-fBwtlffAabpTTalUMPSaJy/5fp3WpIA1FdWOfFcQ12X6179tupZB8fnueNsVJGBvGcdw8fbyzh5C9yKAq9lR/w== dependencies: cross-spawn "^6.0.5" -"@vuepress/plugin-nprogress@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-nprogress/-/plugin-nprogress-1.7.1.tgz#101ebf720eaa635a473e16ca16e7b4a7850331fa" - integrity sha512-KtqfI3RitbsEbm22EhbooTvhjfMf6zttKlbND7LcyJwP3MEPVYyzQJuET03hk9z4SgCfNV2r/W3sYyejzzTMog== +"@vuepress/plugin-nprogress@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-nprogress/-/plugin-nprogress-1.8.0.tgz#8fd3d5415d4c8326ca569118e935b875e5fd7bb5" + integrity sha512-JmjeJKKWhbF/8z+EnY8BCWHoHKhUWfqXjXOfV+xifITl6BJlf53I/jLFpX7Sij8Whe+SKjH7kNvc+hioUdwJQw== dependencies: nprogress "^0.2.0" @@ -2014,17 +2014,17 @@ register-service-worker "^1.7.0" workbox-build "^4.3.1" -"@vuepress/plugin-register-components@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-register-components/-/plugin-register-components-1.7.1.tgz#1ff58e931e8c27d64f9b86f2df879ddaceccdebe" - integrity sha512-MlFdH6l3rTCJlGMvyssXVG998cq5LSMzxCuQLYcRdtHQT4HbikIcV4HSPGarWInD1mP12+qX/PvKUawGwp1eVg== +"@vuepress/plugin-register-components@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-register-components/-/plugin-register-components-1.8.0.tgz#cb23c8b54865926f16e81fdf5fa6ccf0dec17c0e" + integrity sha512-ztafaAxn7XFS4F8z51d+QQB6DNAUG54wBSdfKydfnHbAYgtxoALzPlJW7FKQdxvZKxqGrJa9e4rkoZsat13KRQ== dependencies: - "@vuepress/shared-utils" "1.7.1" + "@vuepress/shared-utils" "1.8.0" -"@vuepress/plugin-search@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-1.7.1.tgz#f52b6e77af30f452213bc677741cefe8a8309be2" - integrity sha512-OmiGM5eYg9c+uC50b6/cSxAhqxfD7AIui6JEztFGeECrlP33RLHmteXK9YBBZjp5wTNmoYs+NXI/cWggYUPW8Q== +"@vuepress/plugin-search@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-1.8.0.tgz#d10cc04cff7467829b2e2e896b7e72a5ebc27ce1" + integrity sha512-LlOCPg7JJ3I9WEpiBU8vCEFp6I5sa3OBu6SFHk+uK9iyKHwJYdRs4VK9x+igG40Rt/OIDRDo3c9SbLX/E/kqeA== "@vuepress/shared-utils@1.7.1": version "1.7.1" @@ -2041,14 +2041,29 @@ toml "^3.0.0" upath "^1.1.0" -"@vuepress/theme-default@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/theme-default/-/theme-default-1.7.1.tgz#36fee5bb5165798c0082c512cbf4d94352260d97" - integrity sha512-a9HeTrlcWQj3ONHiABmlN2z9TyIxKfQtLsA8AL+WgjN3PikhFuZFIJGzfr+NLt67Y9oiI+S9ZfiaVyvWM+7bWQ== +"@vuepress/shared-utils@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/shared-utils/-/shared-utils-1.8.0.tgz#b1187c764f4c2dee018b83f3560a14067d931240" + integrity sha512-CVNMiYBntQyb4CuyS4KzmglDqsuBpj8V4QMzL9gCSoMv0VmwKx05fZedu+r0G5OcxYN4qjnu99yl9G6zWhOU9w== dependencies: - "@vuepress/plugin-active-header-links" "1.7.1" - "@vuepress/plugin-nprogress" "1.7.1" - "@vuepress/plugin-search" "1.7.1" + chalk "^2.3.2" + escape-html "^1.0.3" + fs-extra "^7.0.1" + globby "^9.2.0" + gray-matter "^4.0.1" + hash-sum "^1.0.2" + semver "^6.0.0" + toml "^3.0.0" + upath "^1.1.0" + +"@vuepress/theme-default@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/theme-default/-/theme-default-1.8.0.tgz#5bcca542bc61099498f5d99a9928f0ff66e6e382" + integrity sha512-CueCaANfICFbLnEL78YxSjgCHXL7mkgQI/cfyEHBgxlr247cYJQ+9IFDQIS0fJNuzHdLRy9UFUvVrCu6go8PUg== + dependencies: + "@vuepress/plugin-active-header-links" "1.8.0" + "@vuepress/plugin-nprogress" "1.8.0" + "@vuepress/plugin-search" "1.8.0" docsearch.js "^2.5.2" lodash "^4.17.15" stylus "^0.54.8" @@ -13268,13 +13283,13 @@ vuepress-plugin-smooth-scroll@^0.0.3: dependencies: smoothscroll-polyfill "^0.4.3" -vuepress@1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-1.7.1.tgz#bb0e139d8c407a0b5aa962cf9577832a5808937e" - integrity sha512-AdA3do1L4DNzeF8sMTE+cSUJ5hR/6f3YujU8DVowi/vFOg/SX2lJF8urvDkZUSXzaAT6aSgkI9L+B6D+i7SJjA== +vuepress@1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/vuepress/-/vuepress-1.8.0.tgz#0139d466b33fbfdb628abb76d555368b85cf9772" + integrity sha512-YvNitvoEc+JSJRv1W+IoRnvOTFyTWyUMuGuF2kTIbiSwIHb1hNinc3lqNSeBQJy7IBqyEzK5fnTq1mlynh4gwA== dependencies: - "@vuepress/core" "1.7.1" - "@vuepress/theme-default" "1.7.1" + "@vuepress/core" "1.8.0" + "@vuepress/theme-default" "1.8.0" cac "^6.5.6" envinfo "^7.2.0" opencollective-postinstall "^2.0.2" From 249a465857edba38c505ab2009143b66e94881c2 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 5 Jan 2021 02:37:43 +0000 Subject: [PATCH 15/39] chore(deps-dev): bump @vuepress/plugin-back-to-top from 1.7.1 to 1.8.0 Bumps [@vuepress/plugin-back-to-top](https://github.com/vuejs/vuepress/tree/HEAD/packages/@vuepress/plugin-back-to-top) from 1.7.1 to 1.8.0. - [Release notes](https://github.com/vuejs/vuepress/releases) - [Changelog](https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md) - [Commits](https://github.com/vuejs/vuepress/commits/v1.8.0/packages/@vuepress/plugin-back-to-top) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 3c0c06c52..3a3136f7c 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@types/cheerio": "0.22.23", "@types/got": "9.6.11", "@types/koa": "2.11.6", - "@vuepress/plugin-back-to-top": "1.7.1", + "@vuepress/plugin-back-to-top": "1.8.0", "@vuepress/plugin-google-analytics": "1.7.1", "@vuepress/plugin-pwa": "1.7.1", "cross-env": "7.0.3", diff --git a/yarn.lock b/yarn.lock index d1673c8d3..dcca04303 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1979,10 +1979,10 @@ dependencies: lodash.debounce "^4.0.8" -"@vuepress/plugin-back-to-top@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-back-to-top/-/plugin-back-to-top-1.7.1.tgz#8bdc4a2de95f8244f167b3b3066c2610b88aabeb" - integrity sha512-Hw/5kQjqtkHEstifcq4gpdVwS38C3ecruLCUibq3YEES6DJUYZ8tN1oo3FTugYgpXsyn3HxWftyalozcZ2IutA== +"@vuepress/plugin-back-to-top@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-back-to-top/-/plugin-back-to-top-1.8.0.tgz#eb7062e33cd65f4582e012702f7f69ccf0f55ae7" + integrity sha512-myyC4ZLT887IAaKcBBles8OHYeAfYMFSvC0CqjCBOyoBExNt6E+Xg3ksYksxrew/mNCTiwxXJvu+0o2a/8WIYA== dependencies: lodash.debounce "^4.0.8" From c30fe03a760e67817ff45df335fc15adafd68fbc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 5 Jan 2021 02:45:58 +0000 Subject: [PATCH 16/39] chore(deps-dev): bump @vuepress/plugin-google-analytics Bumps [@vuepress/plugin-google-analytics](https://github.com/vuejs/vuepress/tree/HEAD/packages/@vuepress/plugin-google-analytics) from 1.7.1 to 1.8.0. - [Release notes](https://github.com/vuejs/vuepress/releases) - [Changelog](https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md) - [Commits](https://github.com/vuejs/vuepress/commits/v1.8.0/packages/@vuepress/plugin-google-analytics) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 812356f2d..caac8f09f 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@types/got": "9.6.11", "@types/koa": "2.11.6", "@vuepress/plugin-back-to-top": "1.8.0", - "@vuepress/plugin-google-analytics": "1.7.1", + "@vuepress/plugin-google-analytics": "1.8.0", "@vuepress/plugin-pwa": "1.7.1", "cross-env": "7.0.3", "eslint": "7.17.0", diff --git a/yarn.lock b/yarn.lock index 8ae1843dd..60769594e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1986,10 +1986,10 @@ dependencies: lodash.debounce "^4.0.8" -"@vuepress/plugin-google-analytics@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-google-analytics/-/plugin-google-analytics-1.7.1.tgz#c337e13c8a27f6fea911a04db22a3f3596a571fb" - integrity sha512-27fQzRMsqGYpMf+ruyhsdfLv/n6z6b6LutFLE/pH66Itlh6ox9ew31x0pqYBbWIC/a4lBfXYUwFvi+DEvlb1EQ== +"@vuepress/plugin-google-analytics@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-google-analytics/-/plugin-google-analytics-1.8.0.tgz#99752be07867730df27e830a15c95b3f25b04741" + integrity sha512-1aILIrGjyGOtNROZhNRezrnAsTq3RA4Q9/euTkpdNDyRs4etmW6hWm5yx43Sp+upREMycpbXZ/QoOWmahGwMNA== "@vuepress/plugin-last-updated@1.8.0": version "1.8.0" From 91afd76422588b09211a6e68e5f14e449826000e Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 5 Jan 2021 02:58:18 +0000 Subject: [PATCH 17/39] chore(deps-dev): bump @vuepress/plugin-pwa from 1.7.1 to 1.8.0 Bumps [@vuepress/plugin-pwa](https://github.com/vuejs/vuepress/tree/HEAD/packages/@vuepress/plugin-pwa) from 1.7.1 to 1.8.0. - [Release notes](https://github.com/vuejs/vuepress/releases) - [Changelog](https://github.com/vuejs/vuepress/blob/master/CHANGELOG.md) - [Commits](https://github.com/vuejs/vuepress/commits/v1.8.0/packages/@vuepress/plugin-pwa) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 25 +++++-------------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index caac8f09f..ff9b5790a 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "@types/koa": "2.11.6", "@vuepress/plugin-back-to-top": "1.8.0", "@vuepress/plugin-google-analytics": "1.8.0", - "@vuepress/plugin-pwa": "1.7.1", + "@vuepress/plugin-pwa": "1.8.0", "cross-env": "7.0.3", "eslint": "7.17.0", "eslint-config-prettier": "7.1.0", diff --git a/yarn.lock b/yarn.lock index 60769594e..3887035a0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2005,12 +2005,12 @@ dependencies: nprogress "^0.2.0" -"@vuepress/plugin-pwa@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/plugin-pwa/-/plugin-pwa-1.7.1.tgz#22fb176b48a4f9cba3d69a0a8c6d1971efb7e49d" - integrity sha512-c3oozxPPGpraU+UnY3gp3sWnKYO3mOLcexQWXaYABWnUC3yFbHx4e8wIF8LGqp7Z75bjQuUoI+LcHqpQXyYNag== +"@vuepress/plugin-pwa@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@vuepress/plugin-pwa/-/plugin-pwa-1.8.0.tgz#e3baa9a83828cd3d538825a5b52db3c217b2f220" + integrity sha512-wdXSi5ZNMFqIJ6uAazP6xYObrjHk4Mfez84ImZQ68zzeLw9eI8f8WfWvRW7PCRxBa3V95WIGDRcz0MZJ0JzHCg== dependencies: - "@vuepress/shared-utils" "1.7.1" + "@vuepress/shared-utils" "1.8.0" register-service-worker "^1.7.0" workbox-build "^4.3.1" @@ -2026,21 +2026,6 @@ resolved "https://registry.yarnpkg.com/@vuepress/plugin-search/-/plugin-search-1.8.0.tgz#d10cc04cff7467829b2e2e896b7e72a5ebc27ce1" integrity sha512-LlOCPg7JJ3I9WEpiBU8vCEFp6I5sa3OBu6SFHk+uK9iyKHwJYdRs4VK9x+igG40Rt/OIDRDo3c9SbLX/E/kqeA== -"@vuepress/shared-utils@1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@vuepress/shared-utils/-/shared-utils-1.7.1.tgz#028bc6003247bb4c60cdc96f231eecfb55e7b85d" - integrity sha512-ydB2ZKsFZE6hFRb9FWqzZksxAPIMJjtBawk50RP6F+YX5HbID/HlyYYZM9aDSbk6RTkjgB5UzJjggA2xM8POlw== - dependencies: - chalk "^2.3.2" - escape-html "^1.0.3" - fs-extra "^7.0.1" - globby "^9.2.0" - gray-matter "^4.0.1" - hash-sum "^1.0.2" - semver "^6.0.0" - toml "^3.0.0" - upath "^1.1.0" - "@vuepress/shared-utils@1.8.0": version "1.8.0" resolved "https://registry.yarnpkg.com/@vuepress/shared-utils/-/shared-utils-1.8.0.tgz#b1187c764f4c2dee018b83f3560a14067d931240" From 78d6f76fe5355aa4df04f9c1bd3f56b3f396af73 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Tue, 5 Jan 2021 23:59:30 +0000 Subject: [PATCH 18/39] chore(deps): bump dayjs from 1.10.1 to 1.10.2 Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.10.1 to 1.10.2. - [Release notes](https://github.com/iamkun/dayjs/releases) - [Changelog](https://github.com/iamkun/dayjs/blob/v1.10.2/CHANGELOG.md) - [Commits](https://github.com/iamkun/dayjs/compare/v1.10.1...v1.10.2) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index ff9b5790a..0ac56cc3e 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "co-redis": "2.1.1", "crypto-js": "4.0.0", "currency-symbol-map": "4.0.4", - "dayjs": "1.10.1", + "dayjs": "1.10.2", "dotenv": "8.2.0", "emailjs-imap-client": "3.1.0", "entities": "2.1.0", diff --git a/yarn.lock b/yarn.lock index 3887035a0..512f41889 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4304,10 +4304,10 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= -dayjs@1.10.1, dayjs@^1.8.29: - version "1.10.1" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.1.tgz#114f678624842035396667a24eb1436814bc16fd" - integrity sha512-2xg7JrHQeLBQFkvTumLoy62x1siyeocc98QwjtURgvRqOPYmAkMUdmSjrOA+MlmL6QMQn5MUhDf6rNZNuPc1LQ== +dayjs@1.10.2, dayjs@^1.8.29: + version "1.10.2" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.2.tgz#8f3a424ceb944a8193506804b0045a773d2d0672" + integrity sha512-h/YtykNNTR8Qgtd1Fxl5J1/SFP1b7SOk/M1P+Re+bCdFMV0IMkuKNgHPN7rlvvuhfw24w0LX78iYKt4YmePJNQ== de-indent@^1.0.2: version "1.0.2" From 8cc0dfa231fc4ec02c3d9930d3bfaa6ed27d806b Mon Sep 17 00:00:00 2001 From: zytomorrow Date: Wed, 6 Jan 2021 15:49:58 +0800 Subject: [PATCH 19/39] =?UTF-8?q?feat:=20=E7=AE=80=E9=98=85(simpread)=20no?= =?UTF-8?q?tice?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/program-update.md | 6 ++++++ lib/router.js | 3 +++ lib/routes/simpread/notice.js | 20 ++++++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 lib/routes/simpread/notice.js diff --git a/docs/program-update.md b/docs/program-update.md index 5cddf1086..a2dafca86 100644 --- a/docs/program-update.md +++ b/docs/program-update.md @@ -433,3 +433,9 @@ pageClass: routes | | -commentCount | -createdAt | createdAt |
+ +## simpread + +### 消息通知 + + diff --git a/lib/router.js b/lib/router.js index 5bb0f656c..e9f57e387 100644 --- a/lib/router.js +++ b/lib/router.js @@ -3780,4 +3780,7 @@ router.get('/nace/blog/:sort?', require('./routes/nace/blog')); // Caixin Latest router.get('/caixin/latest', require('./routes/caixin/latest')); +// SimpRead +router.get('/simpread/notice', require('./routes/simpread/notice')); + module.exports = router; diff --git a/lib/routes/simpread/notice.js b/lib/routes/simpread/notice.js new file mode 100644 index 000000000..a6ef1a11d --- /dev/null +++ b/lib/routes/simpread/notice.js @@ -0,0 +1,20 @@ +const got = require('@/utils/got'); +const md = require('markdown-it')(); + +module.exports = async (ctx) => { + const url = 'https://static.simp.red/notice'; + const response = await got.get(url); + const data = response.data.notice; + ctx.state.data = { + title: 'SimpRead 消息通知', + link: url, + description: 'SimpRead 消息通知', + item: data.map((item) => ({ + description: md.render(item.content), + link: url, + pubDate: item.date, + title: `${item.category.name}-${item.title}`, + author: 'SimpRead', + })), + }; +}; From 763542c6f0f42e79b86daa94ec2e975abe4c9a7b Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 6 Jan 2021 11:11:20 +0000 Subject: [PATCH 20/39] chore(deps): bump string-similarity from 4.0.3 to 4.0.4 Bumps [string-similarity](https://github.com/aceakash/string-similarity) from 4.0.3 to 4.0.4. - [Release notes](https://github.com/aceakash/string-similarity/releases) - [Commits](https://github.com/aceakash/string-similarity/commits/4.0.4) Signed-off-by: dependabot-preview[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 512f41889..37c9e5c30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11977,9 +11977,9 @@ string-length@^4.0.1: strip-ansi "^6.0.0" string-similarity@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-4.0.3.tgz#ef52d6fc59c8a0fc93b6307fbbc08cc6e18cde21" - integrity sha512-QEwJzNFCqq+5AGImk5z4vbsEPTN/+gtyKfXBVLBcbPBRPNganZGfQnIuf9yJ+GiwSnD65sT8xrw/uwU1Q1WmfQ== + version "4.0.4" + resolved "https://registry.yarnpkg.com/string-similarity/-/string-similarity-4.0.4.tgz#42d01ab0b34660ea8a018da8f56a3309bb8b2a5b" + integrity sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ== string-width@4.2.0, string-width@^4.0.0, string-width@^4.2.0: version "4.2.0" From 061cb7025d1da311df703b4e12c1c9bb9b72bf3f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 6 Jan 2021 15:09:30 +0000 Subject: [PATCH 21/39] chore(deps-dev): bump nodemon from 2.0.6 to 2.0.7 Bumps [nodemon](https://github.com/remy/nodemon) from 2.0.6 to 2.0.7. - [Release notes](https://github.com/remy/nodemon/releases) - [Commits](https://github.com/remy/nodemon/compare/v2.0.6...v2.0.7) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0ac56cc3e..dba1b0d34 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "jest": "26.6.3", "mockdate": "3.0.2", "nock": "13.0.5", - "nodemon": "2.0.6", + "nodemon": "2.0.7", "pinyin": "2.9.1", "prettier": "2.2.1", "prettier-check": "2.0.0", diff --git a/yarn.lock b/yarn.lock index 37c9e5c30..011b36eb8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9197,10 +9197,10 @@ nodemailer@6.4.16: resolved "https://registry.yarnpkg.com/nodemailer/-/nodemailer-6.4.16.tgz#5cb6391b1d79ab7eff32d6f9f48366b5a7117293" integrity sha512-68K0LgZ6hmZ7PVmwL78gzNdjpj5viqBdFqKrTtr9bZbJYj6BRj5W6WGkxXrEnUl3Co3CBXi3CZBUlpV/foGnOQ== -nodemon@2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.6.tgz#1abe1937b463aaf62f0d52e2b7eaadf28cc2240d" - integrity sha512-4I3YDSKXg6ltYpcnZeHompqac4E6JeAMpGm8tJnB9Y3T0ehasLa4139dJOcCrB93HHrUMsCrKtoAlXTqT5n4AQ== +nodemon@2.0.7: + version "2.0.7" + resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-2.0.7.tgz#6f030a0a0ebe3ea1ba2a38f71bf9bab4841ced32" + integrity sha512-XHzK69Awgnec9UzHr1kc8EomQh4sjTQ8oRf8TsGrSmHDx9/UmiGG9E/mM3BuTfNeFwdNBvrqQq/RHL0xIeyFOA== dependencies: chokidar "^3.2.2" debug "^3.2.6" From 170a6428d17610c6daf2e8ac4dccf227f58221b4 Mon Sep 17 00:00:00 2001 From: Sean Chao Date: Thu, 7 Jan 2021 06:53:08 +0800 Subject: [PATCH 22/39] feat: add zhihu follow timeline (#6560) --- docs/install/README.md | 5 +++++ docs/social-media.md | 9 +++++++++ lib/config.js | 3 +++ lib/router.js | 1 + lib/routes/zhihu/timeline.js | 33 +++++++++++++++++++++++++++++++++ 5 files changed, 51 insertions(+) create mode 100644 lib/routes/zhihu/timeline.js diff --git a/docs/install/README.md b/docs/install/README.md index a98da79d6..82c18370a 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -619,3 +619,8 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行 - `DIDA365_USERNAME`: 滴答清单用户名 - `DIDA365_PASSWORD`: 滴答清单密码 + +- 知乎用户关注时间线 + + - `ZHIHU_COOKIES`: 知乎登录后的 cookie 值. + 1. 可以在知乎网页版的一些请求的请求头中找到,如 `GET /moments` 请求头中的 `cookie` 值. diff --git a/docs/social-media.md b/docs/social-media.md index e18c2d30d..d4ff76d2d 100644 --- a/docs/social-media.md +++ b/docs/social-media.md @@ -1141,3 +1141,12 @@ rule ### 知乎书店 - 知乎周刊 + +### 用户关注时间线 + + +::: warning 注意 + +用户关注动态需要登录后的 Cookie 值,所以只能自建,详情见部署页面的配置模块。 + +::: diff --git a/lib/config.js b/lib/config.js index 83112c8e7..5e81e3e9e 100644 --- a/lib/config.js +++ b/lib/config.js @@ -89,6 +89,9 @@ const calculateValue = () => { yuque: { token: envs.YUQUE_TOKEN, }, + zhihu: { + cookies: envs.ZHIHU_COOKIES, + }, puppeteerWSEndpoint: envs.PUPPETEER_WS_ENDPOINT, loggerLevel: envs.LOGGER_LEVEL || 'info', proxyUri: envs.PROXY_URI, diff --git a/lib/router.js b/lib/router.js index 5bb0f656c..71be05cda 100644 --- a/lib/router.js +++ b/lib/router.js @@ -158,6 +158,7 @@ router.get('/zhihu/people/pins/:id', require('./routes/zhihu/pin/people')); router.get('/zhihu/bookstore/newest', require('./routes/zhihu/bookstore/newest')); router.get('/zhihu/pin/daily', require('./routes/zhihu/pin/daily')); router.get('/zhihu/weekly', require('./routes/zhihu/weekly')); +router.get('/zhihu/timeline', require('./routes/zhihu/timeline')); // 妹子图 router.get('/mzitu/home/:type?', require('./routes/mzitu/home')); diff --git a/lib/routes/zhihu/timeline.js b/lib/routes/zhihu/timeline.js new file mode 100644 index 000000000..568c30a0e --- /dev/null +++ b/lib/routes/zhihu/timeline.js @@ -0,0 +1,33 @@ +const got = require('@/utils/got'); +const config = require('@/config').value; + +module.exports = async (ctx) => { + const cookie = config.zhihu.cookies; + if (cookie === undefined) { + throw Error('缺少知乎用户登录后的 Cookie 值'); + } + + const response = await got({ + method: 'get', + url: `https://www.zhihu.com/api/v3/moments?limit=10`, + headers: { + Cookie: cookie, + }, + }); + const feeds = response.data.data; + + const out = feeds.map((e) => ({ + title: `${e.action_text}: ${e.target.title ? e.target.title : e.target.question.title}`, + description: `${e.target.excerpt}`, + pubDate: new Date(e.updated_time * 1000), + link: e.target.url.replace('api.zhihu.com', 'zhihu.com'), + author: e.target.author.name, + guid: e.id, + })); + + ctx.state.data = { + title: `知乎关注动态`, + link: `https://www.zhihu.com/follow`, + item: out, + }; +}; From 5b1c4cf80269f4bdd7bf71db82dd2a1674301fa5 Mon Sep 17 00:00:00 2001 From: hellodword <46193371+hellodword@users.noreply.github.com> Date: Thu, 7 Jan 2021 11:22:29 +0800 Subject: [PATCH 23/39] feat: add microsoft store updates --- docs/en/program-update.md | 6 +++++ docs/program-update.md | 6 +++++ lib/router.js | 3 +++ lib/routes/microsoft-store/updates.js | 32 +++++++++++++++++++++++++++ 4 files changed, 47 insertions(+) create mode 100644 lib/routes/microsoft-store/updates.js diff --git a/docs/en/program-update.md b/docs/en/program-update.md index 9325fd5e2..13b702821 100644 --- a/docs/en/program-update.md +++ b/docs/en/program-update.md @@ -164,6 +164,12 @@ The owner of the official image fills in the library, for example: https://rsshu +## Microsoft Store + +### Updates + + + ## Minecraft Refer to [#minecraft](/en/game.html#minecraft) diff --git a/docs/program-update.md b/docs/program-update.md index 5cddf1086..ed7354551 100644 --- a/docs/program-update.md +++ b/docs/program-update.md @@ -212,6 +212,12 @@ pageClass: routes +## Microsoft Store + +### Updates + + + ## Minecraft 见 [#minecraft](/game.html#minecraft) diff --git a/lib/router.js b/lib/router.js index 71be05cda..e50f2c3a0 100644 --- a/lib/router.js +++ b/lib/router.js @@ -2853,6 +2853,9 @@ router.get('/xposed/module/:mod', require('./routes/xposed/module')); // Microsoft Edge router.get('/edge/addon/:crxid', require('./routes/edge/addon')); +// Microsoft Store +router.get('/microsoft-store/updates/:productid/:market?', require('./routes/microsoft-store/updates')); + // 上海立信会计金融学院 router.get('/slu/tzgg/:id', require('./routes/universities/slu/tzgg')); router.get('/slu/jwc/:id', require('./routes/universities/slu/jwc')); diff --git a/lib/routes/microsoft-store/updates.js b/lib/routes/microsoft-store/updates.js new file mode 100644 index 000000000..4c5f63f62 --- /dev/null +++ b/lib/routes/microsoft-store/updates.js @@ -0,0 +1,32 @@ +const got = require('@/utils/got'); + +module.exports = async (ctx) => { + const { market = 'CN', productid } = ctx.params; + + const { data } = await got({ + method: 'get', + url: `https://displaycatalog.mp.microsoft.com/v7.0/products/${productid}/?fieldsTemplate=&market=${market}&languages=en`, + headers: { + 'Content-Type': 'application/json', + 'MS-CV': `${Array(16) + .join() + .split(',') + .map(function () { + return 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.charAt(Math.floor(Math.random() * 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'.length)); + }) + .join('')}.1`, + }, + }); + + ctx.state.data = { + title: `${data.Product.LocalizedProperties[0].ProductTitle} - Microsoft Store Updates`, + link: `https://www.microsoft.com/store/productId/${productid}`, + item: [ + { + title: data.Product.DisplaySkuAvailabilities[0].Sku.Properties.Packages[0].PackageFullName, + pubDate: new Date(data.Product.DisplaySkuAvailabilities[0].Sku.LastModifiedDate), + link: `https://www.microsoft.com/store/productId/${productid}`, + }, + ], + }; +}; From 333f99215aafb356e5d6773fa50ab38fea4b9d3b Mon Sep 17 00:00:00 2001 From: KTachibanaM Date: Wed, 6 Jan 2021 21:55:49 -0800 Subject: [PATCH 24/39] add instruction for ansible deployment --- docs/en/install/README.md | 30 ++++++++++++++++++++++++++++++ docs/install/README.md | 30 ++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) diff --git a/docs/en/install/README.md b/docs/en/install/README.md index 460be758e..3623834bb 100644 --- a/docs/en/install/README.md +++ b/docs/en/install/README.md @@ -104,6 +104,36 @@ $ docker run -d --name rsshub -p 1200:1200 -e CACHE_EXPIRE=3600 -e GITHUB_ACCESS To configure more options please refer to [Configuration](#configuration). +# Ansible Deployment + +[This Ansible playbook](https://github.com/k-t-corp/RSSHub-ansible) includes RSSHub, Redis, browserless and Caddy + +This Ansible playbook currently only support Ubuntu 20.04 + +### Install + +```bash +sudo apt update +sudo apt install ansible +cd ~ +git clone https://github.com/k-t-corp/RSSHub-ansible.git +cd RSSHub-ansible +ansible-playbook rsshub.yaml +# When prompt to enter a domain name, enter the domain name that this machine/VM will use +# For example, if your users use https://rsshub.exmaple.com to access your RSSHub instance, enter rsshub.exmaple.com (remove the https://) +``` + +### Update + +```bash +cd ~ +git clone https://github.com/k-t-corp/RSSHub-ansible.git +cd RSSHub-ansible +ansible-playbook rsshub.yaml +# When prompt to enter a domain name, enter the domain name that this machine/VM will use +# For example, if your users use https://rsshub.exmaple.com to access your RSSHub instance, enter rsshub.exmaple.com (remove the https://) +``` + ## Manual Deployment The most direct way to deploy `RSSHub`, you can follow the steps below to deploy`RSSHub` on your computer, server or anywhere. diff --git a/docs/install/README.md b/docs/install/README.md index 82c18370a..dfa6a0948 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -106,6 +106,36 @@ $ docker run -d --name rsshub -p 1200:1200 -e CACHE_EXPIRE=3600 -e GITHUB_ACCESS 更多配置项请看 [#配置](#pei-zhi) +## Ansible 部署 + +[该 Ansible playbook](https://github.com/k-t-corp/RSSHub-ansible) 包括了 RSSHub, Redis, browserless 以及 Caddy 的安装 + +该 Ansible playbook 目前只支持 Ubuntu 20.04 + +### 安装 + +```bash +sudo apt update +sudo apt install ansible +cd ~ +git clone https://github.com/k-t-corp/RSSHub-ansible.git +cd RSSHub-ansible +ansible-playbook rsshub.yaml +# 当提示输入 domain name 的时候,输入该主机所使用的域名 +# 举例:如果您的 RSSHub 用户使用 https://rsshub.exmaple.com 访问您的 RSSHub 实例,输入 rsshub.exmaple.com(去掉 https://) +``` + +### 更新 + +```bash +cd ~ +git clone https://github.com/k-t-corp/RSSHub-ansible.git +cd RSSHub-ansible +ansible-playbook rsshub.yaml +# 当提示输入 domain name 的时候,输入该主机所使用的域名 +# 举例:如果您的 RSSHub 用户使用 https://rsshub.exmaple.com 访问您的 RSSHub 实例,输入 rsshub.exmaple.com(去掉 https://) +``` + ## 手动部署 部署 `RSSHub` 最直接的方式,您可以按照以下步骤将 `RSSHub` 部署在您的电脑、服务器或者其他任何地方 From 866baa903a0b6c87bfa3fb31d6da96a3d1f42253 Mon Sep 17 00:00:00 2001 From: KTachibanaM Date: Wed, 6 Jan 2021 21:58:36 -0800 Subject: [PATCH 25/39] specify caddy 2 for ansible deployment --- docs/en/install/README.md | 2 +- docs/install/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/install/README.md b/docs/en/install/README.md index 3623834bb..621730334 100644 --- a/docs/en/install/README.md +++ b/docs/en/install/README.md @@ -106,7 +106,7 @@ To configure more options please refer to [Configuration](#configuration). # Ansible Deployment -[This Ansible playbook](https://github.com/k-t-corp/RSSHub-ansible) includes RSSHub, Redis, browserless and Caddy +[This Ansible playbook](https://github.com/k-t-corp/RSSHub-ansible) includes RSSHub, Redis, browserless and Caddy 2 This Ansible playbook currently only support Ubuntu 20.04 diff --git a/docs/install/README.md b/docs/install/README.md index dfa6a0948..793fd15b8 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -108,7 +108,7 @@ $ docker run -d --name rsshub -p 1200:1200 -e CACHE_EXPIRE=3600 -e GITHUB_ACCESS ## Ansible 部署 -[该 Ansible playbook](https://github.com/k-t-corp/RSSHub-ansible) 包括了 RSSHub, Redis, browserless 以及 Caddy 的安装 +[该 Ansible playbook](https://github.com/k-t-corp/RSSHub-ansible) 包括了 RSSHub, Redis, browserless 以及 Caddy 2 该 Ansible playbook 目前只支持 Ubuntu 20.04 From da9be824ee48c647499cc8d12bdddacc3e948e85 Mon Sep 17 00:00:00 2001 From: zytomorrow Date: Thu, 7 Jan 2021 17:57:33 +0800 Subject: [PATCH 26/39] =?UTF-8?q?feat:=20=E7=AE=80=E9=98=85(simpread)=20ch?= =?UTF-8?q?angelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/program-update.md | 3 ++ lib/router.js | 5 ++- lib/routes/simpread/changelog.js | 77 ++++++++++++++++++++++++++++++++ 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 lib/routes/simpread/changelog.js diff --git a/docs/program-update.md b/docs/program-update.md index a2dafca86..706791de6 100644 --- a/docs/program-update.md +++ b/docs/program-update.md @@ -439,3 +439,6 @@ pageClass: routes ### 消息通知 + +### 更新日志 + diff --git a/lib/router.js b/lib/router.js index e9f57e387..2da405237 100644 --- a/lib/router.js +++ b/lib/router.js @@ -3780,7 +3780,10 @@ router.get('/nace/blog/:sort?', require('./routes/nace/blog')); // Caixin Latest router.get('/caixin/latest', require('./routes/caixin/latest')); -// SimpRead +// SimpRead-消息通知 router.get('/simpread/notice', require('./routes/simpread/notice')); +// SimpRead-更新日志 +router.get('/simpread/changelog', require('./routes/simpread/changelog')); + module.exports = router; diff --git a/lib/routes/simpread/changelog.js b/lib/routes/simpread/changelog.js new file mode 100644 index 000000000..d7ad05d76 --- /dev/null +++ b/lib/routes/simpread/changelog.js @@ -0,0 +1,77 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const url = 'https://simpread.pro/changelog.html'; + const response = await got.get(url); + const data = response.data; + const $ = cheerio.load(data); + ctx.state.data = { + title: 'SimpRead 更新日志', + link: url, + description: $('body > div.container.changelog > div.desc').html(), + item: $('.version') + .map((index, item) => { + const year = $(item).find('.year').html(); + const month_day = $(item).find('.day').html(); + let version = ''; + let detail = ''; + + // 结构异化-收个version与后续version不同级 + if (index === 0) { + // 版本名称处理 + version = $($(item).find('.num > a')[0]).clone().children().remove().end().text(); + // detail处理 + detail = $($(item).find('.details')[0]); + } else { + // 版本名称处理 + version = $(item).find('.num > a').clone().children().remove().end().text(); + // detail处理 + detail = $(item).find('.details'); + } + if (version === '') { + version = $(item).find('.num').clone().children().remove().end().text(); + } + let version_type = $(item).find('.num > a > i').attr('class'); + // 部分结构不一致处理 + if (version_type === undefined) { + version_type = $(item).find('.num > i').attr('class'); + } + if (version_type.indexOf('chrome') !== -1) { + version_type = 'Chrome'; + } + if (version_type.indexOf('apple') !== -1) { + version_type = 'Safari'; + } + if (version_type.indexOf('code') !== -1) { + version_type = 'UserScript'; + } + if (version_type.indexOf('firefox') !== -1) { + version_type = 'Firefox'; + } + + $(detail) + .find('li') + .map((index, item) => { + const level = $(item).find('span').attr('class'); + if (level !== undefined) { + if (level.indexOf('empty') !== -1) { + $(item).wrap('
    '); + } else { + $(item).find('span').append('
    '); + } + } + return {}; + }); + + return { + description: $(detail).html(), + link: url, + pubDate: `${year}-${month_day.replace('.', '-')} 00:00:00 GMT`, + title: `${version_type}${version}`, + author: 'SimpRead', + }; + }) + .get(), + }; +}; From 34fb795c8c27467d2d184ce73ff8b17f7463573a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Thu, 7 Jan 2021 19:59:33 +0000 Subject: [PATCH 27/39] chore(deps): bump googleapis from 66.0.0 to 67.0.0 Bumps [googleapis](https://github.com/googleapis/google-api-nodejs-client) from 66.0.0 to 67.0.0. - [Release notes](https://github.com/googleapis/google-api-nodejs-client/releases) - [Changelog](https://github.com/googleapis/google-api-nodejs-client/blob/master/CHANGELOG.md) - [Commits](https://github.com/googleapis/google-api-nodejs-client/compare/v66.0.0...v67.0.0) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index dba1b0d34..10393dbed 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,7 @@ "etag": "1.8.1", "fanfou-sdk": "4.2.0", "git-rev-sync": "3.0.1", - "googleapis": "66.0.0", + "googleapis": "67.0.0", "got": "11.8.1", "https-proxy-agent": "5.0.0", "iconv-lite": "0.6.2", diff --git a/yarn.lock b/yarn.lock index 011b36eb8..229a4b395 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6077,10 +6077,10 @@ googleapis-common@^4.4.1: url-template "^2.0.8" uuid "^8.0.0" -googleapis@66.0.0: - version "66.0.0" - resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-66.0.0.tgz#008062d06b13954bd3a0425c17e8f8396e884957" - integrity sha512-jdEleRoyo/AeJZjKGC7Z2mHgochn2vR2JKqey6kydRkIBmCZxoQKLisRR4H8CRYZeEd6+c8Ns/LzS1S7qUjoFw== +googleapis@67.0.0: + version "67.0.0" + resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-67.0.0.tgz#ce0b92dcf5e4bc0fd1b82666a1625eb37fd3dc36" + integrity sha512-luhulHrk42DruR+c12W2sY2rrEVoKVdjaZDuHWSxcp1qz+VxvWQpuiK2QDLCXmo36/VFPMaa+Y7rRUR+Qqzd7w== dependencies: google-auth-library "^6.0.0" googleapis-common "^4.4.1" From 2aca91a25e71b508cf74a9fb48bf57acc0bbd54c Mon Sep 17 00:00:00 2001 From: zytomorrow Date: Fri, 8 Jan 2021 08:57:25 +0800 Subject: [PATCH 28/39] =?UTF-8?q?fix:=20=E7=AE=80=E9=98=85(simpread)=20doc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/program-update.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/program-update.md b/docs/program-update.md index 706791de6..b12003588 100644 --- a/docs/program-update.md +++ b/docs/program-update.md @@ -438,7 +438,7 @@ pageClass: routes ### 消息通知 - + ### 更新日志 - + From 97b89d68ef50e1cd300b73d77956a8963cab3b47 Mon Sep 17 00:00:00 2001 From: KTachibanaM Date: Thu, 7 Jan 2021 19:59:44 -0800 Subject: [PATCH 29/39] move ansible scripts inside --- docs/en/install/README.md | 19 +++-- docs/install/README.md | 19 +++-- scripts/ansible/.gitignore | 90 +++++++++++++++++++++ scripts/ansible/README.md | 20 +++++ scripts/ansible/Vagrantfile | 5 ++ scripts/ansible/rsshub.Caddyfile | 3 + scripts/ansible/rsshub.env | 3 + scripts/ansible/rsshub.service | 11 +++ scripts/ansible/rsshub.yaml | 130 +++++++++++++++++++++++++++++++ scripts/ansible/try.sh | 5 ++ 10 files changed, 285 insertions(+), 20 deletions(-) create mode 100644 scripts/ansible/.gitignore create mode 100644 scripts/ansible/README.md create mode 100644 scripts/ansible/Vagrantfile create mode 100644 scripts/ansible/rsshub.Caddyfile create mode 100644 scripts/ansible/rsshub.env create mode 100644 scripts/ansible/rsshub.service create mode 100644 scripts/ansible/rsshub.yaml create mode 100755 scripts/ansible/try.sh diff --git a/docs/en/install/README.md b/docs/en/install/README.md index 621730334..7dc0b7d95 100644 --- a/docs/en/install/README.md +++ b/docs/en/install/README.md @@ -106,19 +106,20 @@ To configure more options please refer to [Configuration](#configuration). # Ansible Deployment -[This Ansible playbook](https://github.com/k-t-corp/RSSHub-ansible) includes RSSHub, Redis, browserless and Caddy 2 +This Ansible playbook includes RSSHub, Redis, browserless and Caddy 2 -This Ansible playbook currently only support Ubuntu 20.04 +Currently only support Ubuntu 20.04 + +Requires sudo privilege ### Install ```bash sudo apt update sudo apt install ansible -cd ~ -git clone https://github.com/k-t-corp/RSSHub-ansible.git -cd RSSHub-ansible -ansible-playbook rsshub.yaml +git clone https://github.com/DIYgod/RSSHub.git ~/RSSHub +cd ~/RSSHub/scripts/ansible +sudo ansible-playbook rsshub.yaml # When prompt to enter a domain name, enter the domain name that this machine/VM will use # For example, if your users use https://rsshub.exmaple.com to access your RSSHub instance, enter rsshub.exmaple.com (remove the https://) ``` @@ -126,10 +127,8 @@ ansible-playbook rsshub.yaml ### Update ```bash -cd ~ -git clone https://github.com/k-t-corp/RSSHub-ansible.git -cd RSSHub-ansible -ansible-playbook rsshub.yaml +cd ~/RSSHub/scripts/ansible +sudo ansible-playbook rsshub.yaml # When prompt to enter a domain name, enter the domain name that this machine/VM will use # For example, if your users use https://rsshub.exmaple.com to access your RSSHub instance, enter rsshub.exmaple.com (remove the https://) ``` diff --git a/docs/install/README.md b/docs/install/README.md index 793fd15b8..ed8455288 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -108,19 +108,20 @@ $ docker run -d --name rsshub -p 1200:1200 -e CACHE_EXPIRE=3600 -e GITHUB_ACCESS ## Ansible 部署 -[该 Ansible playbook](https://github.com/k-t-corp/RSSHub-ansible) 包括了 RSSHub, Redis, browserless 以及 Caddy 2 +这个 Ansible playbook 包括了 RSSHub, Redis, browserless 以及 Caddy 2 -该 Ansible playbook 目前只支持 Ubuntu 20.04 +目前只支持 Ubuntu 20.04 + +需要 sudo 权限 ### 安装 ```bash sudo apt update sudo apt install ansible -cd ~ -git clone https://github.com/k-t-corp/RSSHub-ansible.git -cd RSSHub-ansible -ansible-playbook rsshub.yaml +git clone https://github.com/DIYgod/RSSHub.git ~/RSSHub +cd ~/RSSHub/scripts/ansible +sudo ansible-playbook rsshub.yaml # 当提示输入 domain name 的时候,输入该主机所使用的域名 # 举例:如果您的 RSSHub 用户使用 https://rsshub.exmaple.com 访问您的 RSSHub 实例,输入 rsshub.exmaple.com(去掉 https://) ``` @@ -128,10 +129,8 @@ ansible-playbook rsshub.yaml ### 更新 ```bash -cd ~ -git clone https://github.com/k-t-corp/RSSHub-ansible.git -cd RSSHub-ansible -ansible-playbook rsshub.yaml +cd ~/RSSHub/scripts/ansible +sudo ansible-playbook rsshub.yaml # 当提示输入 domain name 的时候,输入该主机所使用的域名 # 举例:如果您的 RSSHub 用户使用 https://rsshub.exmaple.com 访问您的 RSSHub 实例,输入 rsshub.exmaple.com(去掉 https://) ``` diff --git a/scripts/ansible/.gitignore b/scripts/ansible/.gitignore new file mode 100644 index 000000000..6117c5218 --- /dev/null +++ b/scripts/ansible/.gitignore @@ -0,0 +1,90 @@ +# Created by https://www.toptal.com/developers/gitignore/api/windows,linux,macos,ansible,vagrant +# Edit at https://www.toptal.com/developers/gitignore?templates=windows,linux,macos,ansible,vagrant + +### Ansible ### +*.retry + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Vagrant ### +# General +.vagrant/ + +# Log files (if you are creating logs in debug mode, uncomment this) +# *.log + +### Vagrant Patch ### +*.box + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/windows,linux,macos,ansible,vagrant + +# vagrant logs +*.log \ No newline at end of file diff --git a/scripts/ansible/README.md b/scripts/ansible/README.md new file mode 100644 index 000000000..50cae9b71 --- /dev/null +++ b/scripts/ansible/README.md @@ -0,0 +1,20 @@ +# Readme + +Ansible playbook to deploy [RSSHub](https://github.com/DIYgod/RSSHub) on bare-metal with Redis, browserless and Caddy 2 + +Requires sudo permission + +## Usage +On `Ubuntu 20.04`, [install ansible](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-ansible-on-ubuntu-20-04), then + +```bash +sudo ansible-playbook rsshub.yaml +``` + +## Development +Install `vagrant`, then + +```bash +./try.sh +ansible-playbook rsshub.yaml +``` diff --git a/scripts/ansible/Vagrantfile b/scripts/ansible/Vagrantfile new file mode 100644 index 000000000..604af7f5a --- /dev/null +++ b/scripts/ansible/Vagrantfile @@ -0,0 +1,5 @@ +Vagrant.configure("2") do |config| + config.vm.box = "generic/ubuntu2004" + config.vm.synced_folder ".", "/vagrant", type: "rsync", rsync__exclude: ".git/" + config.ssh.extra_args = ["-t", "cd /vagrant; bash --login"] +end diff --git a/scripts/ansible/rsshub.Caddyfile b/scripts/ansible/rsshub.Caddyfile new file mode 100644 index 000000000..7781eb24f --- /dev/null +++ b/scripts/ansible/rsshub.Caddyfile @@ -0,0 +1,3 @@ +{{ domain_name }} + +reverse_proxy localhost:1200 diff --git a/scripts/ansible/rsshub.env b/scripts/ansible/rsshub.env new file mode 100644 index 000000000..d4a283725 --- /dev/null +++ b/scripts/ansible/rsshub.env @@ -0,0 +1,3 @@ +NODE_ENV=production +CACHE_TYPE=redis +PUPPETEER_WS_ENDPOINT=ws://localhost:3000 diff --git a/scripts/ansible/rsshub.service b/scripts/ansible/rsshub.service new file mode 100644 index 000000000..0c8352a44 --- /dev/null +++ b/scripts/ansible/rsshub.service @@ -0,0 +1,11 @@ +[Unit] +Description=RSSHub is an open source, easy to use, and extensible RSS feed aggregator + +[Service] +User=rsshub +WorkingDirectory=/home/rsshub/app +ExecStart=yarn start +EnvironmentFile=/home/rsshub/app/.env + +[Install] +WantedBy=multi-user.target diff --git a/scripts/ansible/rsshub.yaml b/scripts/ansible/rsshub.yaml new file mode 100644 index 000000000..33671a51c --- /dev/null +++ b/scripts/ansible/rsshub.yaml @@ -0,0 +1,130 @@ +- + name: Install RSSHub + hosts: localhost + become: true + vars_prompt: + - + name: domain_name + prompt: What is the domain name (without www, e.g. rsshub.example.com)? Use "http://localhost" for development in Vagrant VM. + private: no + tasks: + - + name: Check OS + fail: + msg: This playbook can only be run on Ubuntu 20.04 at this moment + when: ansible_distribution != 'Ubuntu' or ansible_distribution_version !='20.04' + - + name: Install GPG keys for repos + apt_key: + url: '{{ item }}' + state: present + with_items: + - https://deb.nodesource.com/gpgkey/nodesource.gpg.key + - https://dl.yarnpkg.com/debian/pubkey.gpg + - https://download.docker.com/linux/ubuntu/gpg + - https://dl.cloudsmith.io/public/caddy/stable/cfg/gpg/gpg.155B6D79CA56EA34.key + - + name: Install repos + apt_repository: + repo: '{{ item }}' + state: present + update_cache: yes + with_items: + - deb https://deb.nodesource.com/node_12.x focal main + - deb https://dl.yarnpkg.com/debian/ stable main + - deb https://download.docker.com/linux/ubuntu focal stable + - deb https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main + - + name: Install prerequisites + apt: + name: + - nodejs + - yarn + - build-essential + - python-is-python2 + - redis-server + - docker-ce + - python3-pip + - virtualenv + - python3-setuptools + - caddy + state: present + update_cache: yes + - + name: Install python module for docker + pip: + name: docker + - + name: Pull docker image for browserless + docker_image: + name: browserless/chrome + source: pull + - + name: Start redis + systemd: + state: restarted + enabled: yes + name: redis + daemon_reload: yes + - + name: Copy caddy configuration + template: + src: rsshub.Caddyfile + dest: /etc/caddy/Caddyfile + - + name: Start caddy + systemd: + state: restarted + enabled: yes + name: caddy + daemon_reload: yes + - + name: Create and start browserless container + docker_container: + name: browserless + image: browserless/chrome + state: started + restart_policy: always + published_ports: + - "3000:3000" + - + name: Create the user + user: + name: rsshub + create_home: true + shell: /bin/bash + - + name: Clone the repo + git: + repo: https://github.com/DIYgod/RSSHub.git + dest: /home/rsshub/app + update: yes + - + name: Install repo dependencies + command: yarn install --production + args: + chdir: /home/rsshub/app + - + name: Copy configuration + copy: + src: rsshub.env + dest: /home/rsshub/app/.env + - + name: Own repo to the user + file: + path: /home/rsshub/app + owner: rsshub + group: rsshub + recurse: yes + - + name: Install the systemd unit + copy: + src: rsshub.service + dest: /etc/systemd/system/rsshub.service + - + name: Start the systemd service + systemd: + state: restarted + enabled: yes + name: rsshub + daemon_reload: yes diff --git a/scripts/ansible/try.sh b/scripts/ansible/try.sh new file mode 100755 index 000000000..cd8f1df76 --- /dev/null +++ b/scripts/ansible/try.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e + +vagrant rsync +vagrant ssh From 7aec48e8d0f83c1fd640fef3583a235d07a5b08a Mon Sep 17 00:00:00 2001 From: zytomorrow Date: Fri, 8 Jan 2021 12:41:47 +0800 Subject: [PATCH 30/39] =?UTF-8?q?fix:=20=E7=AE=80=E9=98=85(simpread)=20cha?= =?UTF-8?q?ngelog=E7=BB=93=E6=9E=84bug=E4=BF=AE=E5=A4=8D=E9=80=82=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/simpread/changelog.js | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/lib/routes/simpread/changelog.js b/lib/routes/simpread/changelog.js index d7ad05d76..5be450af7 100644 --- a/lib/routes/simpread/changelog.js +++ b/lib/routes/simpread/changelog.js @@ -16,19 +16,10 @@ module.exports = async (ctx) => { const month_day = $(item).find('.day').html(); let version = ''; let detail = ''; - - // 结构异化-收个version与后续version不同级 - if (index === 0) { - // 版本名称处理 - version = $($(item).find('.num > a')[0]).clone().children().remove().end().text(); - // detail处理 - detail = $($(item).find('.details')[0]); - } else { - // 版本名称处理 - version = $(item).find('.num > a').clone().children().remove().end().text(); - // detail处理 - detail = $(item).find('.details'); - } + // 版本名称处理 + version = $(item).find('.num > a').clone().children().remove().end().text(); + // detail处理 + detail = $(item).find('.details'); if (version === '') { version = $(item).find('.num').clone().children().remove().end().text(); } From 92ddaf6178c193ce799f82df00b4862332168cab Mon Sep 17 00:00:00 2001 From: zytomorrow Date: Fri, 8 Jan 2021 13:20:07 +0800 Subject: [PATCH 31/39] =?UTF-8?q?fix:=20=E7=AE=80=E9=98=85(simpread)=20?= =?UTF-8?q?=E5=8D=A0=E4=BD=8D=E5=AD=97=E7=AC=A6=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/simpread/changelog.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/simpread/changelog.js b/lib/routes/simpread/changelog.js index 5be450af7..dfa3f8a14 100644 --- a/lib/routes/simpread/changelog.js +++ b/lib/routes/simpread/changelog.js @@ -45,11 +45,13 @@ module.exports = async (ctx) => { .find('li') .map((index, item) => { const level = $(item).find('span').attr('class'); + const text = $(item).find('span').html(); + $(item).find('span').remove(); if (level !== undefined) { if (level.indexOf('empty') !== -1) { $(item).wrap('
      '); } else { - $(item).find('span').append('
      '); + $(item).prepend(`${text}: `); } } return {}; From f17c4e92b8d199599b91379493b8970a3cbd5e21 Mon Sep 17 00:00:00 2001 From: zytomorrow Date: Fri, 8 Jan 2021 14:31:28 +0800 Subject: [PATCH 32/39] =?UTF-8?q?fix:=20=E7=AE=80=E9=98=85(simpread)=20?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E7=BE=8E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/simpread/changelog.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/routes/simpread/changelog.js b/lib/routes/simpread/changelog.js index dfa3f8a14..9665b4cb5 100644 --- a/lib/routes/simpread/changelog.js +++ b/lib/routes/simpread/changelog.js @@ -2,7 +2,7 @@ const got = require('@/utils/got'); const cheerio = require('cheerio'); module.exports = async (ctx) => { - const url = 'https://simpread.pro/changelog.html'; + const url = 'http://ksria.com/simpread/changelog.html'; const response = await got.get(url); const data = response.data; const $ = cheerio.load(data); @@ -41,17 +41,26 @@ module.exports = async (ctx) => { version_type = 'Firefox'; } + // detail + const text_color = { + important: '#9c27b0', + add: '#4caf50', + change: '#ffc107', + fix: '#f44336', + complete: '#03a9f4', + }; $(detail) .find('li') .map((index, item) => { - const level = $(item).find('span').attr('class'); + let span_class = $(item).find('span').attr('class'); const text = $(item).find('span').html(); $(item).find('span').remove(); - if (level !== undefined) { - if (level.indexOf('empty') !== -1) { + if (span_class !== undefined) { + span_class = span_class.split(' '); + if (span_class[1] === 'empty') { $(item).wrap('
        '); } else { - $(item).prepend(`${text}: `); + $(item).prepend(`${text}: `); } } return {}; From ce132be12e11a3b8565fa74503f8bbc34bdcf61e Mon Sep 17 00:00:00 2001 From: zytomorrow Date: Fri, 8 Jan 2021 15:06:05 +0800 Subject: [PATCH 33/39] =?UTF-8?q?fix:=20=E7=AE=80=E9=98=85(simpread)=20?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E7=BE=8E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/simpread/notice.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/simpread/notice.js b/lib/routes/simpread/notice.js index a6ef1a11d..8da1c99bc 100644 --- a/lib/routes/simpread/notice.js +++ b/lib/routes/simpread/notice.js @@ -7,11 +7,11 @@ module.exports = async (ctx) => { const data = response.data.notice; ctx.state.data = { title: 'SimpRead 消息通知', - link: url, + link: 'http://ksria.com/simpread/changelog.html', description: 'SimpRead 消息通知', item: data.map((item) => ({ description: md.render(item.content), - link: url, + link: 'http://ksria.com/simpread/changelog.html', pubDate: item.date, title: `${item.category.name}-${item.title}`, author: 'SimpRead', From 0747bfb9927475669b7e7f6602714d208509e6f2 Mon Sep 17 00:00:00 2001 From: zytomorrow Date: Fri, 8 Jan 2021 15:13:42 +0800 Subject: [PATCH 34/39] =?UTF-8?q?fix:=20=E7=AE=80=E9=98=85(simpread)=20?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E7=BE=8E=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/routes/simpread/changelog.js | 4 ++-- lib/routes/simpread/notice.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/routes/simpread/changelog.js b/lib/routes/simpread/changelog.js index 9665b4cb5..59ecaea8f 100644 --- a/lib/routes/simpread/changelog.js +++ b/lib/routes/simpread/changelog.js @@ -8,7 +8,7 @@ module.exports = async (ctx) => { const $ = cheerio.load(data); ctx.state.data = { title: 'SimpRead 更新日志', - link: url, + link: 'https://simpread.pro/changelog.html', description: $('body > div.container.changelog > div.desc').html(), item: $('.version') .map((index, item) => { @@ -68,7 +68,7 @@ module.exports = async (ctx) => { return { description: $(detail).html(), - link: url, + link: 'https://simpread.pro/changelog.html', pubDate: `${year}-${month_day.replace('.', '-')} 00:00:00 GMT`, title: `${version_type}${version}`, author: 'SimpRead', diff --git a/lib/routes/simpread/notice.js b/lib/routes/simpread/notice.js index 8da1c99bc..79dd7950e 100644 --- a/lib/routes/simpread/notice.js +++ b/lib/routes/simpread/notice.js @@ -7,11 +7,11 @@ module.exports = async (ctx) => { const data = response.data.notice; ctx.state.data = { title: 'SimpRead 消息通知', - link: 'http://ksria.com/simpread/changelog.html', + link: 'https://simpread.pro/changelog.html', description: 'SimpRead 消息通知', item: data.map((item) => ({ description: md.render(item.content), - link: 'http://ksria.com/simpread/changelog.html', + link: 'https://simpread.pro/changelog.html', pubDate: item.date, title: `${item.category.name}-${item.title}`, author: 'SimpRead', From 01b8757729ec085d47a96bdeac18f524094c5ed9 Mon Sep 17 00:00:00 2001 From: KTachibanaM Date: Fri, 8 Jan 2021 23:19:11 -0800 Subject: [PATCH 35/39] mention docker for ansible --- docs/en/install/README.md | 2 +- docs/install/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/install/README.md b/docs/en/install/README.md index 7dc0b7d95..d271aa069 100644 --- a/docs/en/install/README.md +++ b/docs/en/install/README.md @@ -106,7 +106,7 @@ To configure more options please refer to [Configuration](#configuration). # Ansible Deployment -This Ansible playbook includes RSSHub, Redis, browserless and Caddy 2 +This Ansible playbook includes RSSHub, Redis, browserless (uses Docker) and Caddy 2 Currently only support Ubuntu 20.04 diff --git a/docs/install/README.md b/docs/install/README.md index ed8455288..3d69e4301 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -108,7 +108,7 @@ $ docker run -d --name rsshub -p 1200:1200 -e CACHE_EXPIRE=3600 -e GITHUB_ACCESS ## Ansible 部署 -这个 Ansible playbook 包括了 RSSHub, Redis, browserless 以及 Caddy 2 +这个 Ansible playbook 包括了 RSSHub, Redis, browserless (依赖 Docker) 以及 Caddy 2 目前只支持 Ubuntu 20.04 From 2a6e1176aace62dce1a8ba05aabe5900b992c890 Mon Sep 17 00:00:00 2001 From: KTachibanaM Date: Fri, 8 Jan 2021 23:24:37 -0800 Subject: [PATCH 36/39] mentions docker will be automatically installed for ansible deployment --- docs/en/install/README.md | 2 +- docs/install/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/install/README.md b/docs/en/install/README.md index d271aa069..b61260062 100644 --- a/docs/en/install/README.md +++ b/docs/en/install/README.md @@ -110,7 +110,7 @@ This Ansible playbook includes RSSHub, Redis, browserless (uses Docker) and Cadd Currently only support Ubuntu 20.04 -Requires sudo privilege +Requires sudo privilege and virtualization capability (Docker will be automatically installed) ### Install diff --git a/docs/install/README.md b/docs/install/README.md index 3d69e4301..a8c59fa91 100644 --- a/docs/install/README.md +++ b/docs/install/README.md @@ -112,7 +112,7 @@ $ docker run -d --name rsshub -p 1200:1200 -e CACHE_EXPIRE=3600 -e GITHUB_ACCESS 目前只支持 Ubuntu 20.04 -需要 sudo 权限 +需要 sudo 权限和虚拟化能力(Docker 将会被自动安装) ### 安装 From e7048c56c34e1bc596d5bb52cdbc20eae9bb194c Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 9 Jan 2021 08:21:07 +0000 Subject: [PATCH 37/39] chore(deps): bump dayjs from 1.10.2 to 1.10.3 Bumps [dayjs](https://github.com/iamkun/dayjs) from 1.10.2 to 1.10.3. - [Release notes](https://github.com/iamkun/dayjs/releases) - [Changelog](https://github.com/iamkun/dayjs/blob/v1.10.3/CHANGELOG.md) - [Commits](https://github.com/iamkun/dayjs/compare/v1.10.2...v1.10.3) Signed-off-by: dependabot-preview[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 10393dbed..e762c5ede 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "co-redis": "2.1.1", "crypto-js": "4.0.0", "currency-symbol-map": "4.0.4", - "dayjs": "1.10.2", + "dayjs": "1.10.3", "dotenv": "8.2.0", "emailjs-imap-client": "3.1.0", "entities": "2.1.0", diff --git a/yarn.lock b/yarn.lock index 229a4b395..b6ed190df 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4304,10 +4304,10 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= -dayjs@1.10.2, dayjs@^1.8.29: - version "1.10.2" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.2.tgz#8f3a424ceb944a8193506804b0045a773d2d0672" - integrity sha512-h/YtykNNTR8Qgtd1Fxl5J1/SFP1b7SOk/M1P+Re+bCdFMV0IMkuKNgHPN7rlvvuhfw24w0LX78iYKt4YmePJNQ== +dayjs@1.10.3, dayjs@^1.8.29: + version "1.10.3" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.10.3.tgz#cf3357c8e7f508432826371672ebf376cb7d619b" + integrity sha512-/2fdLN987N8Ki7Id8BUN2nhuiRyxTLumQnSQf9CNncFCyqFsSKb9TNhzRYcC8K8eJSJOKvbvkImo/MKKhNi4iw== de-indent@^1.0.2: version "1.0.2" From f8da7ce83547e4e25c02efe522ba433d12e7e825 Mon Sep 17 00:00:00 2001 From: nczitzk Date: Sat, 9 Jan 2021 22:33:00 +0800 Subject: [PATCH 38/39] feat: add cgtn opinions --- docs/en/new-media.md | 4 +++ docs/new-media.md | 4 +++ lib/router.js | 1 + lib/routes/cgtn/opinions.js | 51 +++++++++++++++++++++++++++++++++++++ 4 files changed, 60 insertions(+) create mode 100644 lib/routes/cgtn/opinions.js diff --git a/docs/en/new-media.md b/docs/en/new-media.md index 070815cbe..d0b372cc8 100644 --- a/docs/en/new-media.md +++ b/docs/en/new-media.md @@ -67,6 +67,10 @@ Compared to the official one, the RSS feed generated by RSSHub not only has more ## CGTN +### Opinions + + + ### Most Read & Most Share diff --git a/docs/new-media.md b/docs/new-media.md index dea896d57..ebc5e352c 100644 --- a/docs/new-media.md +++ b/docs/new-media.md @@ -122,6 +122,10 @@ pageClass: routes ## CGTN +### Opinions + + + ### Most Read & Most Share diff --git a/lib/router.js b/lib/router.js index 5bb0f656c..8daef9d3d 100644 --- a/lib/router.js +++ b/lib/router.js @@ -3338,6 +3338,7 @@ router.get('/fulinian/:caty?', require('./routes/fulinian/index')); // CGTN router.get('/cgtn/most/:type?/:time?', require('./routes/cgtn/most')); +router.get('/cgtn/opinions', require('./routes/cgtn/opinions')); // AppSales router.get('/appsales/:caty?/:time?', require('./routes/appsales/index')); diff --git a/lib/routes/cgtn/opinions.js b/lib/routes/cgtn/opinions.js new file mode 100644 index 000000000..c10c3216c --- /dev/null +++ b/lib/routes/cgtn/opinions.js @@ -0,0 +1,51 @@ +const got = require('@/utils/got'); +const cheerio = require('cheerio'); + +module.exports = async (ctx) => { + const rootUrl = `https://www.cgtn.com/opinions`; + const response = await got({ + method: 'get', + url: rootUrl, + }); + + const $ = cheerio.load(response.data); + + $('.cg-pic').parent().remove(); + + const list = $(`.cg-title h4`) + .slice(0, 15) + .map((_, item) => { + item = $(item); + const a = item.find('a'); + return { + title: a.text(), + link: a.attr('href'), + pubDate: new Date(parseInt(a.attr('data-time'))).toUTCString(), + }; + }) + .get(); + + const items = await Promise.all( + list.map( + async (item) => + await ctx.cache.tryGet(item.link, async () => { + const detailResponse = await got({ + method: 'get', + url: item.link, + }); + const content = cheerio.load(detailResponse.data); + + item.author = content('.news-author-name').text(); + item.description = content('#cmsMainContent').html(); + + return item; + }) + ) + ); + + ctx.state.data = { + title: 'CGTN - Opinions', + link: rootUrl, + item: items, + }; +}; From f954c2515903f02fd935e731c2455dee43c3d018 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sun, 10 Jan 2021 05:34:24 +0000 Subject: [PATCH 39/39] style: auto format --- docs/program-update.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/program-update.md b/docs/program-update.md index 5eb9cf3bd..a78f659c9 100644 --- a/docs/program-update.md +++ b/docs/program-update.md @@ -316,6 +316,16 @@ pageClass: routes +## simpread + +### 消息通知 + + + +### 更新日志 + + + ## sketch.com ### beta 更新 @@ -439,12 +449,3 @@ pageClass: routes | | -commentCount | -createdAt | createdAt | - -## simpread - -### 消息通知 - - - -### 更新日志 -