Commit Graph

166 Commits

Author SHA1 Message Date
Tony
14c1647724 fix(parameter): tighter condition for fulltext mode (#11750) 2023-02-01 19:38:01 +08:00
DIYgod
b36dd844dd feat: add content_html for reply extra data 2023-02-01 09:42:30 +00:00
DIYgod
52678c9eef feat: generate quote content_html, telegram channel repost extra data 2023-01-30 22:00:07 +00:00
零小白
728da7f154 fix: author is not iterable (#11555)
Co-authored-by: xianjiantao <xianjiantao@bytedance.com>
2023-01-04 21:44:23 +08:00
Tony
d2ab8ab3c0 feat(core): json feed (#11494)
* feat(core): json feed

* docs: json feed description

* fix: remove extra comma if no elements exist after author

* test: json feed test

* feat: generate json feed without art-template

* test: fix coverage

* style: 4 spaces json

* docs: fix parameter
2023-01-02 21:35:36 +08:00
Tony
0513566d04 fix(core): fix category filtering (#11451) 2022-12-14 23:30:18 +08:00
Tony
30975dd20b chore(deps): replace @postlight/mercury-parser with @postlight/parser (#10862) 2022-09-23 03:25:56 +08:00
Tony
d553430312 fix(core): fulltext mode title (#10788) 2022-09-14 19:40:53 +08:00
Tony
878266c535 feat(core): true ua (#10761)
* feat(core): true ua

* test: skip mercury parser temporary
2022-09-12 01:13:38 +08:00
Charlie Jiang
655b899715 feat(core): 增加 sorted 参数来控制结果排序 (#10744)
* feat: 增加 `sorted` 参数来控制结果排序

* feat: 添加 `sorted` 参数的测试

重用了 `sort` 的代码和数据:是不是可以考虑将两者结合?
2022-09-09 00:11:18 +08:00
Tony
4877301f23 fix(core): throw URL cache key (#10497) 2022-08-16 21:38:05 +08:00
Tony
03117f4c50 feat(core): filter category (#10212) 2022-07-14 00:42:38 +08:00
NeverBehave
dc64debaf7 feat(core): regex engine naming and test suit (#10014)
* feat(core): regex engine config

* fix(docs): config naming

* filter-engine test naming
2022-06-23 04:38:52 +08:00
NeverBehave
e4478a366c feat(core): regex engine config (#10013) 2022-06-22 12:25:30 -07:00
Rongrong
1cf6925187 docs: correct misleading statements (#10002)
Signed-off-by: Rongrong <i@rong.moe>
2022-06-22 11:09:43 +02:00
DIYgod
5c41774414 fix: use re2, thank @Rongronggg9 2022-06-21 16:56:06 +01:00
NeverBehave
5db837d6dc feat(core): anti-hotlink experimental parameters (#9997)
Co-authored-by: Rongrong <i@rong.moe>
2022-06-20 18:41:16 -07:00
Rongrong
6a0d44348e fix(core/parameter): missing some tags handling (#9983)
Signed-off-by: Rongrong <i@rong.moe>
2022-06-18 06:45:03 -09:00
Tony
548395b4b4 fix(core): unnecessary redis io (#9875) 2022-06-02 21:33:24 +08:00
Rongrong
e1ee28267e fix(core): RequestInProgressError cache age (#9850)
* fix(core): RequestInProgressError cache age

Signed-off-by: Rongrong <i@rong.moe>

* fix: ci test

Signed-off-by: Rongrong <i@rong.moe>
2022-05-30 17:30:41 +08:00
TonyRL
ac43d15af0 chore: fix vercel git hash
docs: https://vercel.com/docs/concepts/git/vercel-for-github
2022-05-21 15:20:21 +00:00
Rongrong
2c4eab5e31 fix(core/parameter): absurd wrong path cache time (#9796)
Signed-off-by: Rongrong <i@rong.moe>
2022-05-21 21:44:45 +08:00
Rongrong
a5d74e521c feat(core/middleware/anti-hotlink): route matching (#9681)
* feat(core/middleware/anti-hotlink): route matching

Signed-off-by: Rongrong <i@rong.moe>

* fix(test): coverage

Signed-off-by: Rongrong <i@rong.moe>

* docs(install): fix mistaken config key

Signed-off-by: Rongrong <i@rong.moe>
2022-05-04 03:29:23 +08:00
Rongrong
616ad78c88 fix(core/utils/anti-hotlink): invalid HTML output (#9669)
Signed-off-by: Rongrong <i@rong.moe>
2022-05-01 04:14:07 +08:00
Rongrong
5b35471e39 fix(core): offending RFC4287 (#9441)
* fix(core): offending RFC4287

should not leave `<updated>` blank when `<published>` is not blank
these two fields MUST conform to the "date-time" production in RFC3339

Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>

* test(common-utils): complete tests

Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>

* test(template): restrict expected value of `pubDate`

Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>
2022-04-02 17:44:45 +08:00
Rongrong
501dff59d0 refactor(core): unified memory cache (#9395)
Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>
2022-03-28 22:55:29 +08:00
Tony
baeafb97a5 feat: git hash on error (#9373) 2022-03-24 01:10:47 +08:00
Rongrong
c48ca6bd5b fix(core): invalid feed fields (#9286)
Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>
2022-03-22 02:13:15 +08:00
Rongrong
41910802f2 feat(core): caching enhancements (#9227)
* fix(core): redis cache ignore `maxAge` when refreshing

memory cache do not have such a problem

Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>

* feat(core): make `cache.tryGet()` refreshing selectable

Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>

* docs: `ctx.cache.tryGet()` update

Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>
2022-03-19 02:13:15 +08:00
Tony
2ed9fd5c5f chore: bump lru-cache from 6.0.0 to 7.7.1 (#9339)
* feat(core): lru-cache v7

* chore: bump lru-cache to 7.7.1

* feat: configurable max
2022-03-18 21:08:04 +08:00
Rongrong
3364b7eb1d fix(route): migrate invalid enclosure_length usages to itunes_duration (#9291)
Close #9287

Signed-off-by: Rongrong <15956627+Rongronggg9@users.noreply.github.com>
2022-03-10 20:54:29 +08:00
Tony
530b0a4dd3 fix(core): fix fulltext (#8951)
* fix(core): fix fulltext

* fix(core): fix fulltext
2022-02-02 23:06:36 +08:00
Tony
eb2037c5d1 fix(middleware): simplecc null description (#8053) 2022-01-22 19:59:10 +00:00
myl7
51a7833bd0 fix: remove entity decoding for item html description (#8700) 2022-01-22 18:49:32 +00:00
linbuxiao
2872ca8aec fix: cache next error not catch (#8361) 2021-11-27 08:32:39 +00:00
GitHub Action
9433c49004 style: auto format 2021-09-22 12:43:18 +00:00
NeverBehave
0792f7ba25 feat(core): first attempt to init script standard (#8224)
- lazy load
- rate limit per path
- init .debug.json support
- docs
- maintainer
- radar
2021-09-22 05:41:00 -07:00
Daniel Li (李丹阳)
d77a039f05 style(eslint): add no-implicit-coercion rule (#8175)
* refactor: add no-implicit-coercion rule for ESLint

* fix: errors from deepscan

* fix: errors from deepscan

* fix: errors from deepscan

* fix: errors from deepscan

* fix: errors from deepscan

* Update docs/en/joinus/quick-start.md

Co-authored-by: Sukka <isukkaw@gmail.com>

* Update docs/joinus/quick-start.md

Co-authored-by: Sukka <isukkaw@gmail.com>

* Update lib/routes/av01/tag.js

Co-authored-by: Sukka <isukkaw@gmail.com>

* Update lib/routes/gov/taiwan/mnd.js

Co-authored-by: Sukka <isukkaw@gmail.com>

* Update lib/routes/ps/product.js

Co-authored-by: Sukka <isukkaw@gmail.com>

* refactor: minify html string

Co-authored-by: Sukka <isukkaw@gmail.com>
2021-09-15 21:22:11 +08:00
Toby Tso
e24906fdeb feat(middleware): brief parameter (#8074)
Co-authored-by: SettingDust <settingdust@gmail.com>
Co-authored-by: ギャラ <me@gyara.moe>
2021-09-09 01:37:41 -07:00
Sukka
ea21cfdd28 perf: lazyload sentry sdk for faster cold start speed (#8125) 2021-09-01 15:53:04 +08:00
Sukka
31720bbb1b perf: lazy require dependencies (#8025) 2021-08-20 14:05:57 +08:00
Sukka
d82847f541 style/chore(eslint): enforce new rules (#8040)
* style: prefer object shorthand syntax
* refactor: prefer Array#map over Array#forEach
* style: prefer arrow callback
* chore(eslint): update rules
* style: auto fix by eslint
2021-08-17 22:23:23 +08:00
Sukka
6e3b58ed1d refactor: avoid promise overhead (#8028) 2021-08-16 11:45:53 -07:00
SettingDust
4db1c91cfa fix(route): pixiv login (#7623) 2021-06-23 20:37:55 -07:00
fengkx
ea2e2abb91 refactor(middleware): replace opencc with simplecc-wasm (#7111)
* refactor: replace opencc with simplecc-wasm

* docs: simplecc-wasm docs change

* new yarn.lock
2021-03-14 01:21:46 -05:00
DIYgod
5298f845f2 feat: support ua in blacklist and whitelist 2021-03-07 10:06:24 +08:00
NeverBehave
4aaccd7a49 fix(core): do not add optional pubdate when it is not available (#7093) 2021-03-02 19:06:17 -05:00
DIYgod
177c36cae7 feat: sentry route timeout 2021-02-01 20:06:23 +08:00
DIYgod
97893f2701 feat: replace co-redis and redis with ioredis, make cache module clearer 2021-01-27 19:16:59 +08:00
DIYgod
6506c39239 feat: remove hot ip in debug info 2021-01-21 11:57:16 +08:00