Skip to content

Commit

Permalink
Merge pull request #8 from DIYgod/master
Browse files Browse the repository at this point in the history
[pull] master from diygod:master
  • Loading branch information
pull[bot] authored Dec 5, 2023
2 parents 13d8549 + 7dee6a8 commit d127039
Show file tree
Hide file tree
Showing 12 changed files with 573 additions and 1,409 deletions.
18 changes: 10 additions & 8 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
'Route: v1':
- lib/router.js
- any: ['lib/routes/**/*.js', '!lib/routes/index.js']
- changed-files:
- any-glob-to-any-file: ['lib/router.js']
- all-globs-to-any-file: ['lib/routes/**/*.js', '!lib/routes/index.js']

'Route: v2':
- 'lib/v2/**/*.js'
- changed-files:
- any-glob-to-any-file: ['lib/v2/**/*.js']

core enhancement:
- lib/routes/index.js
- any: ['lib/**', '!lib/radar-rules.js', '!lib/router.js', '!lib/routes/**', '!lib/v2/**']
- changed-files:
- any-glob-to-any-file: ['lib/routes/index.js']
- all-globs-to-any-file: ['lib/**', '!lib/radar-rules.js', '!/lib/config.js', '!lib/router.js', '!lib/routes/**', '!lib/v2/**']

dependencies:
- package.json
- pnpm-lock.yaml
- yarn.lock
- changed-files:
- any-glob-to-any-file: ['package.json', 'pnpm-lock.yaml', 'yarn.lock']
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/labeler@v4
- uses: actions/labeler@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions lib/middleware/onerror.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ module.exports = async (ctx, next) => {
});
}
} catch (err) {
// Append v2 route path
ctx.request.path = (ctx.mountPath ?? '') + ctx.request.path;
ctx._matchedRoute = ctx._matchedRoute ? (ctx.mountPath ?? '') + ctx._matchedRoute : ctx.request.path;

let message = err;
if (err.name && (err.name === 'HTTPError' || err.name === 'RequestError')) {
message = `${err.message}: target website might be blocking our access, you can <a href="https://docs.rsshub.app/install/">host your own RSSHub instance</a> for a better usability.`;
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@
},
"dependencies": {
"@koa/router": "12.0.1",
"@notionhq/client": "2.2.13",
"@notionhq/client": "2.2.14",
"@postlight/parser": "2.2.3",
"@sentry/node": "7.84.0",
"@tonyrl/rand-user-agent": "2.0.41",
"@sentry/node": "7.85.0",
"@tonyrl/rand-user-agent": "2.0.42",
"aes-js": "3.1.2",
"art-template": "4.13.2",
"bbcodejs": "0.0.4",
Expand Down Expand Up @@ -136,7 +136,7 @@
"puppeteer-extra-plugin-user-data-dir": "2.4.1",
"puppeteer-extra-plugin-user-preferences": "2.4.1",
"query-string": "7.1.3",
"re2js": "0.4.0",
"re2js": "0.4.1",
"require-all": "3.0.0",
"rfc4648": "1.5.3",
"rss-parser": "3.13.0",
Expand Down Expand Up @@ -179,18 +179,18 @@
"@types/supertest": "2.0.16",
"@types/tiny-async-pool": "2.0.3",
"@types/tough-cookie": "4.0.5",
"@vercel/nft": "0.24.3",
"@vercel/nft": "0.24.4",
"cross-env": "7.0.3",
"eslint": "8.54.0",
"eslint-config-prettier": "9.0.0",
"eslint": "8.55.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-n": "16.3.1",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-yml": "1.10.0",
"fs-extra": "11.2.0",
"husky": "8.0.3",
"jest": "29.7.0",
"jest-junit": "16.0.0",
"lint-staged": "15.1.0",
"lint-staged": "15.2.0",
"mockdate": "3.0.5",
"nock": "13.4.0",
"nodemon": "3.0.2",
Expand Down
Loading

0 comments on commit d127039

Please sign in to comment.