* chore: add node-network-devtools to enhance development experience
* feat(dev): visualize network requests in the development environment on Chrome Devtools's network tab
* chore(deps): update node-network-devtools
* fix: lock error when ci
* chore: update node-network-devtools to v1.0.18
* chore: update node-network-devtools
* chore: use node-network-devtools v1.0.20
* feat: use hook to add custom headers for fetch
* fix: complex method 16
* test: add test for fetch
* fix: test type error
* fix: hard code
* chore(cr): rename the fetch.spec.ts to fetch.test.ts and use exact version
* chore: fix lock error
---------
* fix(core/utils/wechat-mp): empty description when request blocked by WAF
Silently falling back to the fallback method would generate empty
description. Fixed by throwing an error when failed to extract
item_show_type from the page.
Some misc warnings are also added to make bug reporting easier.
Signed-off-by: Rongrong <i@rong.moe>
* fix(core/utils/wechat-mp): err msg for unknown page
Signed-off-by: Rongrong <i@rong.moe>
* test(core/utils/wechat-mp): fix coverage
Signed-off-by: Rongrong <i@rong.moe>
* fix(core/utils/wechat-mp): ESLint no-await-in-loop
Signed-off-by: Rongrong <i@rong.moe>
* fix(core/utils/wechat-mp): normalizeUrl: & -> &
Signed-off-by: Rongrong <i@rong.moe>
* feat(core/utils/wechat-mp): do not prompt raising an issue when blocked
by WAF
Signed-off-by: Rongrong <i@rong.moe>
* feat(core/utils/wechat-mp): recognize deleted page
Signed-off-by: Rongrong <i@rong.moe>
* feat(core/utils/wechat-mp): log when error
Prevent errors from being completely suppressed if the caller catches
them.
Signed-off-by: Rongrong <i@rong.moe>
---------
Signed-off-by: Rongrong <i@rong.moe>
* feat(core/utils/wechat-mp): major rewrite
* Support more `item_show_type`: `APP_MSG_PAGE`, `VIDEO_SHARE_PAGE`,
`AUDIO_SHARE_PAGE`, and `IMG_SHARE_PAGE`. Previously only the first one
could be parsed properly. There are still some other known types waiting
for live examples for further adaptation. If this is the case, a
fallback method will try to generate entries using mostly OpenGraph
metadata. Meanwhile, the administrator of self-hosted instances will see
warnings in the log, asking them to report the URL as a new live
example. Still, `VIDEO_SHARE_PAGE` explicitly uses the fallback method
without any warning, as there is no possible approach to generate a
video/iframe URL from page metadata.
* Show audio and videos in `APP_MSG_PAGE`. However, not all videos
can be shown due to the same reason as `VIDEO_SHARE_PAGE`.
* Show the location where the article is sent.
* Some bugs, mostly due to outdated cheerio selector, are fixed.
* Add a new sub-route `wechat-mp` to `/test` to make things easier.
* All changes are well-tested.
Signed-off-by: Rongrong <i@rong.moe>
* style(core/utils/wechat-mp): fix ESLint & CodeQL errors
Signed-off-by: Rongrong <i@rong.moe>
* style(core/utils/wechat-mp): fix a DeepScan issue
Signed-off-by: Rongrong <i@rong.moe>
* style(core/utils/wechat-mp): fix ESLint error
Another try w/ pre-commit hook disabled.
Signed-off-by: Rongrong <i@rong.moe>
---------
Signed-off-by: Rongrong <i@rong.moe>
* feat: add javdb session config
* fix: Return data instead of setting ctx.set in JavDB routes
* docs: Add JavDB login instructions to config.md
* docs: Add note about javdb session validity in config.md
* fix: Return data instead of setting ctx.set in JavDB routes
* fix: Update route path in javdb index.ts
Remove '/:category?/:sort?/:filter?', it will cause other module routes to be inaccessible
* chore: Remove unused cookie variable in ProcessItems function
* chore: Unnecessary changes
* chore: Add JAVDB sessions in alphabetical order.
* docs: Add JAVDB sessions in alphabetical order.
* feat: Add support for passing cookies in headers
* test: Add cookieJar test to got.test.ts
* Update lib/utils/got.ts
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
* feat: Update JavDB routes to include optional JAVDB_SESSION in requireConfig
---------
Co-authored-by: zhaoyi.wu <zhaoyi.wu@amh-group.com>