Skip to content

Commit

Permalink
Merge pull request #116 from DIYgod/master
Browse files Browse the repository at this point in the history
[pull] master from diygod:master
  • Loading branch information
WilliamK7 authored Feb 25, 2024
2 parents f076f45 + 6ed47fb commit 44ab849
Show file tree
Hide file tree
Showing 271 changed files with 5,914 additions and 1,904 deletions.
20 changes: 10 additions & 10 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
"rangav.vscode-thunder-client",
"SonarSource.sonarlint-vscode",
"unifiedjs.vscode-mdx",
"ZihanLi.at-helper",
],
},
"ZihanLi.at-helper"
]
}
},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
Expand All @@ -30,12 +30,12 @@
"portsAttributes": {
"1200": {
"label": "app port",
"onAutoForward": "notify",
"onAutoForward": "notify"
},
"3000": {
"label": "docs port",
"onAutoForward": "notify",
},
"onAutoForward": "notify"
}
},

"onCreateCommand": "sudo apt-get update && export DEBIAN_FRONTEND=noninteractive && sudo apt-get -y install --no-install-recommends ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libcairo2 libcups2 libdbus-1-3 libexpat1 libgbm1 libglib2.0-0 libnspr4 libnss3 libpango-1.0-0 libx11-6 libxcb1 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxkbcommon0 libxrandr2 wget xdg-utils redis-server && sudo apt-get autoremove -y && sudo apt-get clean -y && sudo rm -rf /var/lib/apt/lists/*",
Expand All @@ -55,10 +55,10 @@
"remoteUser": "node",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker": {
"version": "latest",
"version": "latest"
},
"ghcr.io/devcontainers/features/github-cli": {
"version": "latest",
},
},
"version": "latest"
}
}
}
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Fail to comply will result in your pull request being closed automatically.
请在 `routes` 区域填写以 / 开头的完整路由地址,否则你的 PR 将会被无条件关闭。
如果路由包含在文档中列出可以完全穷举的参数(例如分类),请依次全部列出。
```route
```routes
/some/route
/some/other/route
/dont/use/this/or/modify/it
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js Active LTS
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-on-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.event.sender.login != 'issuehunt-oss[bot]'
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4 # just need its cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-test-cont.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
-p 1200:1200 \
rsshub:latest
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-command.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v3
with:
version: 8

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# timeout-minutes: 5
# steps:
# - uses: actions/checkout@v4
# - uses: pnpm/action-setup@v2
# - uses: pnpm/action-setup@v3
# with:
# version: 8
# - uses: actions/setup-node@v4
Expand All @@ -40,7 +40,7 @@ jobs:
security-events: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
HUSKY: 0
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
name: Jest on Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
name: Jest puppeteer on Node ${{ matrix.node-version }} with ${{ matrix.chromium.name }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
Expand Down Expand Up @@ -118,7 +118,7 @@ jobs:
name: Build docs on Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
Expand All @@ -141,7 +141,7 @@ jobs:
name: Build radar and maintainer on Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v3
with:
version: 8
- uses: actions/setup-node@v4
Expand Down
6 changes: 3 additions & 3 deletions jsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./lib/*"],
},
"@/*": ["./lib/*"]
}
},
"include": ["./lib/**/*"],
"include": ["./lib/**/*"]
}
3 changes: 3 additions & 0 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ const calculateValue = () => {
cookies: medium_cookies,
articleCookie: envs.MEDIUM_ARTICLE_COOKIE || '',
},
mihoyo: {
cookie: envs.MIHOYO_COOKIE,
},
miniflux: {
instance: envs.MINIFLUX_INSTANCE || 'https://reader.miniflux.app',
token: envs.MINIFLUX_TOKEN || '',
Expand Down
10 changes: 5 additions & 5 deletions lib/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ router.get('/xiaoheihe/discount/:platform?', lazyloadRouteHandler('./routes/xiao
router.get('/ebb', lazyloadRouteHandler('./routes/ebb'));

// Indienova
router.get('/indienova/:type', lazyloadRouteHandler('./routes/indienova/article'));
// router.get('/indienova/:type', lazyloadRouteHandler('./routes/indienova/article'));

// JPMorgan Chase Institute
router.get('/jpmorganchase', lazyloadRouteHandler('./routes/jpmorganchase/research'));
Expand Down Expand Up @@ -900,9 +900,9 @@ router.get('/zhishifenzi/depth', lazyloadRouteHandler('./routes/zhishifenzi/dept
router.get('/zhishifenzi/innovation/:type?', lazyloadRouteHandler('./routes/zhishifenzi/innovation'));

// 4Gamers
router.get('/4gamers/category/:category', lazyloadRouteHandler('./routes/4gamers/category'));
router.get('/4gamers/tag/:tag', lazyloadRouteHandler('./routes/4gamers/tag'));
router.get('/4gamers/topic/:topic', lazyloadRouteHandler('./routes/4gamers/topic'));
// router.get('/4gamers/category/:category', lazyloadRouteHandler('./routes/4gamers/category'));
// router.get('/4gamers/tag/:tag', lazyloadRouteHandler('./routes/4gamers/tag'));
// router.get('/4gamers/topic/:topic', lazyloadRouteHandler('./routes/4gamers/topic'));

// 大麦网
// router.get('/damai/activity/:city/:category/:subcategory/:keyword?', lazyloadRouteHandler('./routes/damai/activity'));
Expand Down Expand Up @@ -1244,7 +1244,7 @@ router.get('/gov/caict/qwsj', lazyloadRouteHandler('./routes/gov/caict/qwsj'));
router.get('/gov/caict/caictgd', lazyloadRouteHandler('./routes/gov/caict/caictgd'));

// 中证网
router.get('/cs/news/:caty', lazyloadRouteHandler('./routes/cs/news'));
// router.get('/cs/news/:caty', lazyloadRouteHandler('./routes/cs/news'));

// hentai-cosplays
router.get('/porn-images-xxx/:type?/:name?', lazyloadRouteHandler('./routes/hentai-cosplays/porn-images-xxx'));
Expand Down
20 changes: 0 additions & 20 deletions lib/routes/4gamers/category.js

This file was deleted.

20 changes: 0 additions & 20 deletions lib/routes/4gamers/tag.js

This file was deleted.

20 changes: 0 additions & 20 deletions lib/routes/4gamers/topic.js

This file was deleted.

69 changes: 0 additions & 69 deletions lib/routes/cs/news.js

This file was deleted.

2 changes: 1 addition & 1 deletion lib/routes/disqus/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const config = require('@/config').value;

module.exports = async (ctx) => {
if (!config.disqus || !config.disqus.api_key) {
throw 'Disqus RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
throw new Error('Disqus RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
}
const forum = ctx.params.forum;

Expand Down
2 changes: 1 addition & 1 deletion lib/routes/fanfou/favorites.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const utils = require('./utils');

module.exports = async (ctx) => {
if (!config.fanfou || !config.fanfou.consumer_key || !config.fanfou.consumer_secret || !config.fanfou.username || !config.fanfou.password) {
throw 'Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
throw new Error('Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
}

const uid = ctx.params.uid;
Expand Down
2 changes: 1 addition & 1 deletion lib/routes/fanfou/home-timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const utils = require('./utils');

module.exports = async (ctx) => {
if (!config.fanfou || !config.fanfou.consumer_key || !config.fanfou.consumer_secret || !config.fanfou.username || !config.fanfou.password) {
throw 'Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
throw new Error('Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
}

const fanfou = await utils.getFanfou();
Expand Down
2 changes: 1 addition & 1 deletion lib/routes/fanfou/public-timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const utils = require('./utils');

module.exports = async (ctx) => {
if (!config.fanfou || !config.fanfou.consumer_key || !config.fanfou.consumer_secret || !config.fanfou.username || !config.fanfou.password) {
throw 'Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
throw new Error('Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
}

const keyword = ctx.params.keyword;
Expand Down
2 changes: 1 addition & 1 deletion lib/routes/fanfou/user-timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const utils = require('./utils');

module.exports = async (ctx) => {
if (!config.fanfou || !config.fanfou.consumer_key || !config.fanfou.consumer_secret || !config.fanfou.username || !config.fanfou.password) {
throw 'Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>';
throw new Error('Fanfou RSS is disabled due to the lack of <a href="https://docs.rsshub.app/install/#pei-zhi-bu-fen-rss-mo-kuai-pei-zhi">relevant config</a>');
}

const uid = ctx.params.uid;
Expand Down
Loading

0 comments on commit 44ab849

Please sign in to comment.