Commit Graph

281 Commits

Author SHA1 Message Date
pseudoyu 3380b56488
fix(route/newrank): wechat route error 2024-11-29 19:25:26 +08:00
Tony 4e404a7328
chore: disable remote debugger by default (#17498) 2024-11-08 04:08:05 +08:00
bugyaluwang ff1ff8d940
feat(dev): visualize network requests in the development environment on Chrome Devtools's network tab (#17308)
* 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

---------
2024-11-06 04:50:43 +08:00
Stephen Zhou e7526eada4
fix: get SearchParams string (#17445)
* fix: get SearchParams string

* refactor: use ufo

* lock deps
2024-11-05 11:27:13 +08:00
Stephen Zhou 4ffe081eb2
fix(bilibili): video reply (#17440)
* fix(bilibili): video reply

* fix

* update
2024-11-05 00:27:55 +08:00
Tony c97564446c
feat: log redirect (#17307) 2024-10-25 23:48:32 +08:00
dependabot[bot] edce496ba0
chore(deps): bump @opentelemetry/exporter-prometheus from 0.53.0 to 0.54.0 (#17286)
* chore(deps): bump @opentelemetry/exporter-prometheus

Bumps [@opentelemetry/exporter-prometheus](https://github.com/open-telemetry/opentelemetry-js) from 0.53.0 to 0.54.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-js/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-js/compare/experimental/v0.53.0...experimental/v0.54.0)

---
updated-dependencies:
- dependency-name: "@opentelemetry/exporter-prometheus"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: fix pnpm install

* fix: use ATTR_SERVICE_NAME

SEMRESATTRS_SERVICE_NAME is deprecated

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-24 22:28:25 +08:00
Tony 2a1af7dc90
fix(cache): store cache TTL (#17044) 2024-10-09 00:37:02 +08:00
DIYgod 9b144a715f
fix(twitter): debug 2024-10-07 01:50:26 +08:00
DIYgod 3a9e9914d8
feat: increase maxQueueSize 2024-09-26 15:23:12 +08:00
Tony 62d72837b9 revert: "fix(common-config): add back parseDate and timezone"
This reverts commit 02efe692b2.

looks like tsx doesn't allow this
2024-09-20 11:21:30 +08:00
Tony 02efe692b2 fix(common-config): add bacl parseDate and timezone 2024-09-19 23:25:37 +08:00
incubator4 be3ba61788
chore: otel fix and enhancement (#16754)
* feat(otel): use routePath insteadof path

* feat(otel): add otel bucket boundary env

* chore: move otel to debug block with alphabetical sort
2024-09-15 19:42:21 +08:00
DIYgod 49df5559a1
feat: support ipv6, close #16513 2024-08-26 16:52:35 +08:00
DIYgod 50409ec19a
Revert "feat: puppeteer timeout"
This reverts commit 6d1a19a9bd.
2024-08-23 17:39:57 +08:00
DIYgod c1f8a74602
Revert "test: fix puppeteer timeout"
This reverts commit bbbe60dd5a.
2024-08-23 17:39:49 +08:00
DIYgod bbbe60dd5a
test: fix puppeteer timeout 2024-08-23 16:14:28 +08:00
DIYgod 6d1a19a9bd
feat: puppeteer timeout 2024-08-23 16:08:35 +08:00
Innei 2d82ddcddc
feat(route/rss3): RSS3 metadata parser (#16486)
* init

* done

Signed-off-by: Innei <i@innei.in>

* chore: cleanup

Signed-off-by: Innei <i@innei.in>

* fix: format

Signed-off-by: Innei <i@innei.in>

* fix: pass through

Signed-off-by: Innei <i@innei.in>

* chore: add testcase

Signed-off-by: Innei <i@innei.in>

* fix: update

Signed-off-by: Innei <i@innei.in>

---------

Signed-off-by: Innei <i@innei.in>
2024-08-21 22:49:59 +08:00
Tony b7b64b2824 chore: add jsdoc to tryGet 2024-07-25 20:10:05 +08:00
DIYgod 58912d5dcf
fix: dispatcher conflict 2024-07-13 23:08:49 +08:00
DIYgod 9fbbed6b04
feat: x-prefer-proxy 2024-07-13 18:20:28 +08:00
DIYgod d53c5e41dc
feat: retryStatusCodes 2024-07-13 01:34:58 +08:00
DIYgod 99bf04cfad
feat: proxy strategy 2024-07-13 00:15:41 +08:00
DIYgod 5cf1de9445
feat: more logs 2024-07-12 22:07:32 +08:00
Nya Candy 68c7430fbb
feat(core): opentelementry support (update of #14668) (#16087)
* chore: squash commit

* fix: tweak some mentioned issues

---------

Co-authored-by: incubator4 <aries0robin@gmail.com>
2024-07-05 19:22:33 +08:00
DIYgod 53edbc7e62
test: fix rate limiter duration 2024-05-26 20:51:30 +08:00
DIYgod e16f95c546
feat: add outgoing request rate limit 2024-05-26 17:18:48 +08:00
DIYgod e3f57a17e0
feat: temporarily disable request timeout 2024-05-26 15:58:43 +08:00
github-actions[bot] 9af421ae2f style: auto format 2024-05-10 14:46:15 +00:00
Tony 41c6861d88
fix(got): posting form as x-www-form-urlencoded (#15348) 2024-04-24 00:10:53 +08:00
Rongrong f3cf86cd72
fix(core/utils/wechat-mp): empty description when request blocked by WAF (#15294)
* 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: &amp; -> &

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>
2024-04-22 02:19:33 +08:00
Mg Pig 8eccccc59c
fix(core): request-rewriter proxy ignore loopback address and puppeteer ws endpoint (#15293) 2024-04-19 23:58:43 +08:00
Tony 9ef453e501 style: run prettier before eslint 2024-04-18 22:44:04 +08:00
github-actions[bot] a11404ee02 style: auto format 2024-04-18 14:07:09 +00:00
Rongrong a99b35f257
feat(core/utils/wechat-mp): major rewrite (#15276)
* 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>
2024-04-18 22:05:32 +08:00
Henry Wang 5c3711cbcc
feat: support .rss3 output type (#15258)
Co-authored-by: pull[bot] <39814207+pull[bot]@users.noreply.github.com>
2024-04-18 02:10:33 +08:00
Prajna a51cc049bf
feat: add javdb session config and cookieJar to fakeGot (#14782)
* 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>
2024-04-12 19:30:42 +08:00
Tony 0893debb07
style(eslint): lint tsx (#15098) 2024-04-04 20:28:45 +08:00
xtex 06a995b9aa
feat(routes): Add censorbib (#15082)
* feat(routes): Add censorbib

* fix: Make got options optional

* Update lib/routes/nymity/censorbib.ts

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

---------
2024-04-04 01:17:49 +08:00
JimenezLi 690b06e680
fix(core): buffer responseType (#15083) 2024-04-03 23:01:02 +08:00
JimenezLi 3d3286db6d
fix(core): fix Git Hash unknown (#15041)
* fix: replace git-rev-sync with node function

* fix: replace git-rev-sync in routes-deprecated
2024-04-02 01:28:35 +08:00
DIYgod bc2fd88abf
test: longger puppeteer timeout 2024-04-02 01:26:23 +08:00
DIYgod 39f8eeb1fc
test: add ofetch tests 2024-04-01 21:00:32 +08:00
DIYgod bf4e5dd78f
test: fix caces 2024-03-31 23:13:22 +08:00
DIYgod f7048d4c24
fix: ignore url parsing error 2024-03-31 02:45:40 +08:00
DIYgod 8c50e2f96f
test: request-rewriter 2024-03-31 02:28:58 +08:00
DIYgod d83c951d8c
fix: proxy auth 2024-03-31 02:28:26 +08:00
DIYgod 59631b2e9b
test: request-rewriter headers 2024-03-30 18:30:41 +08:00
DIYgod bec0ba0705
test: request headers 2024-03-30 18:29:38 +08:00