47 Commits

Author SHA1 Message Date
DIYgod 25cd9f1a28 feat: add Cloudflare Containers deployment support (#20932)
- Create Container Worker entry point with load balancing (20 instances)
- Add wrangler-container.toml configuration with KV binding for environment variables
- Configure container to use standard-1 instance type with Chromium support
- Implement dynamic environment variable loading from Cloudflare KV

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-20 15:29:13 +08:00
DIYgod 1131350b5f feat: deploy RSSHub to Cloudflare Workers (#20804)
* feat: deploy RSSHub to Cloudflare Workers

- Create Worker entry point (lib/worker.ts) with polyfills
- Implement Worker-specific app configuration (lib/app.worker.tsx)
- Add automatic .worker.ts resolution plugin for cleaner config
- Simplify build configuration with only 3 essential shims
- Enable static asset serving via Cloudflare Static Assets feature
- Support dynamic route loading with proper module aliasing

🤖 Generated with Claude Code

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* feat(worker): add puppeteer and request-rewriter support

- Add @cloudflare/puppeteer for Browser Rendering API support
- Create puppeteer.worker.ts with Cloudflare Browser binding
- Add request-rewriter Worker version with static browser headers
- Add vm module shim to node-module.ts for JSDOM compatibility
- Configure __dirname/__filename in tsdown for CommonJS compat
- Update wrangler.toml with BROWSER binding configuration
- Dynamically extract namespaces from foloAnalysisTop100 for routes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(cache): restore synchronous initialization for tests

The async initialization caused cache tests to fail because the cache
module wasn't ready when tests ran. Restored synchronous imports while
keeping Worker-specific no-op behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(worker): add automated Worker integration tests

- Add miniflare for Worker environment simulation
- Create lib/worker.worker.test.ts with integration tests
- Test basic routes (/test/1, /, unknown routes)
- Test RSS feed routes (hackernews, v2ex)
- Test error handling for puppeteer routes without BROWSER binding
- Add worker-test npm script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(worker): use test routes for Worker integration tests

- Replace third-party routes (hackernews, v2ex, weibo) with /test/* routes
- Remove miniflare dependency (wrangler includes it internally)
- Simplify test setup using wrangler's unstable_dev API

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(test): make header-generator test less flaky

The header-generator library may return different platform values due to
internal randomness. Update test to check for valid format instead of
exact value.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(test): exclude worker tests from vitest coverage run

Worker tests require the dist-worker bundle to be built first,
which is not part of the regular CI test workflow. These tests
should be run separately using 'pnpm worker-test'.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* test(worker): add automated Worker integration tests

- Add worker-build step to CI workflow before running tests
- Revert exclusion of worker tests from vitest coverage run
- Worker tests now run as part of the regular test suite

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(worker): fix routes.js alias path in worker build config

Change alias key from absolute path to relative import path to match
how it's imported in lib/registry.ts. This fixes the worker build
failing with "Could not resolve '../assets/build/routes.js'" error.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* ci: trigger CI re-run

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(ci): build worker routes before worker-build

The worker build requires routes-worker.js which is generated by
running build:routes with WORKER_BUILD=true. This was missing in CI,
causing the worker build to fail with "Could not resolve routes.js".

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(test): increase timeout for Worker integration tests

Worker tests need more time in CI environments. Increase individual
test timeouts from default 10s to 30s for each test case.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-04 09:22:05 +08:00
Dzming Li ce34d6eb59 fix(.envrc): add --no-pure-eval for devenv flake compatibility (#20692)
* feat(nix): add flake module and offline-friendly build

* chore(nix): upgrade to Node.js 24 and pnpm 10

Update devenv.nix to match project dependencies:
- Upgrade Node.js from 22 to 24 (aligns with Dockerfile node:24-bookworm)
- Upgrade pnpm from 9 to 10 (aligns with package.json pnpm@10.22.0)

* test: fix buffer-get test timeout

Replace external URL with mock server endpoint to prevent test timeout.
The test was trying to fetch from http://example.com which is not mocked,
causing it to timeout. Now uses http://rsshub.test/headers which is
properly mocked in the test setup.

* fix(.envrc): add --no-pure-eval for devenv flake compatibility

This fixes an issue where devenv fails when entering the directory with
direnv, reporting: "devenv was not able to determine the current directory."

The --no-pure-eval flag allows devenv to determine the project root via
builtins.getEnv "PWD" in flake mode.

Also adds .direnv, .devenv, and .pre-commit-config.yaml to .gitignore
following alphabetical order as per project conventions.
2025-12-19 00:00:46 +08:00
Dzming Li dbb692462d chore: add Nix flake and NixOS module support (#20597)
* feat(nix): add flake module and offline-friendly build

* chore(nix): upgrade to Node.js 24 and pnpm 10

Update devenv.nix to match project dependencies:
- Upgrade Node.js from 22 to 24 (aligns with Dockerfile node:24-bookworm)
- Upgrade pnpm from 9 to 10 (aligns with package.json pnpm@10.22.0)

* test: fix buffer-get test timeout

Replace external URL with mock server endpoint to prevent test timeout.
The test was trying to fetch from http://example.com which is not mocked,
causing it to timeout. Now uses http://rsshub.test/headers which is
properly mocked in the test setup.
2025-12-09 19:43:06 +08:00
Stephen Zhou b4a2aa5e70 fix(core): package mode (#20580) 2025-11-26 20:44:18 +08:00
Tony d1122aec02 chore: sort git ignore 2025-04-16 03:59:36 +08:00
pseudoyu 87a679e265 fix(route/nea): fetch ghs items logic 2025-04-15 17:03:04 +08:00
pseudoyu 04c0f056a9 fix(route/wechat): fetch sogou wechat articles 2025-04-15 14:54:36 +08:00
DIYgod 78f3cb3f75 feat: twitter.com -> x.com 2024-05-18 23:57:25 +08:00
DIYgod e5f1ad343c chore: recover radar.js 2024-03-12 21:32:48 +08:00
DIYgod 93fc0608f7 feat: remove docs test and push assets 2024-03-09 18:48:10 +08:00
DIYgod d1a4e19c62 fix: typescript build errors 2024-02-25 23:43:34 +08:00
DIYgod cb17e72f31 test: common-utils 2024-02-24 22:30:29 +08:00
DIYgod a02b0c95bc docs: update badge 2023-12-18 00:19:43 +08:00
DIYgod 8558382d95 docs: add twitter token generation script 2023-12-01 23:40:44 +08:00
Junk_Chen 2bd8e4842a feat(route): 微博自定义分组(使用Cookie) (#12514)
* change route 'weibo/user' to fit api could be opened with Share(third-party android weibo clent)

* update weibo group route using cookies approach

* fix typo

* code optimization for /weibo/group; docs for /weibo/group

* try fix ESLint error

* fix typo and code optimization

* fix missing ','

* '/weibo/group' throw error when the cookie is not set
2023-05-15 23:04:59 +08:00
TonyRL c2bb5e4df5 chore: use husky 2023-05-08 01:38:56 +00:00
Tony 1de1e9ae56 build: use pnpm (#12438)
* build: use pnpm

* fix: use corepack pnpm

* chore: use pnpm in gha

* chore: add setup pnpm

* fix: install command

* fix: pnpm lock file not updated

* chore: pnpm no recursive install

* docs: use pnpm

* fix: ignore yarn lock

* chore: update command for cloud dev env
2023-05-05 20:09:54 +08:00
Curly Brackets 8dd0314cd4 fix(bilibili): fix user/video error, update account info api (#12361) 2023-04-21 09:55:15 -02:00
奔跑的小草 d5ada18c30 feat(route): 添加电鸭社区分类文章路由 (#11758)
* feat(route): 添加电鸭社区分类文章路由

* fix(route): 修复eslint错误

* Update lib/v2/eleduck/posts.js

* Update lib/v2/eleduck/posts.js

* fix(route): 增加维护者文件

* refactor: migrate to v2

---------
2023-02-02 22:10:35 +08:00
Tony 32fa8631e5 chore: gitignore redis dump.rdb 2022-06-08 02:42:17 +08:00
Fatpandac 6553bbad45 chore: add Session.vim into .gitignore (#8978) 2022-02-03 00:30:19 +08:00
DIYgod 8a387ca7b7 chore: add package-lock to gitignore 2021-11-28 00:26:56 +00:00
DIYgod 483ae4593b chore: use yarn.lock 2021-11-28 00:26:08 +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
NeverBehave c0b638c860 fix(dockerfile): copy necessary file when building (#8008)
* fix(dockerfile): copy necessary file when building

*when even bother deleting file...

* no console
2021-08-13 03:44:39 -07:00
fengkx c412846dc0 chore(core): Docker build 缩小 image size 更新github action (#7197) 2021-08-11 23:01:35 -07:00
NeverBehave a8c14970c0 chore(deps): keep npm 7 as main deps manager 2021-05-09 12:44:50 -04:00
NeverBehave 9a3ae8a4bc docs(core): pubdate, npm ci with templates (#7501) 2021-05-08 17:47:22 -04:00
fengkx 7902c547cf feat: depoly on now serverless function (#4554) 2020-04-28 17:28:57 +08:00
DIYgod e0f39bd6f3 feat(core): support .env file to config environment variables 2019-05-06 00:21:07 +08:00
DIYgod 21877b1f28 unit test 2018-12-30 14:38:11 +08:00
DIYgod 38a90e29b0 optimize directory structure 2018-12-26 18:35:10 +08:00
DIYgod 2008e4dbae update dependencies; remove newrelic to compatible with node v11.x 2018-11-19 02:32:13 +08:00
SettingDust 6371e82fc0 Fix bangumi eps date (#942) & 虎牙直播 2018-10-24 00:15:57 +08:00
〇〰〇 59433ade22 [reopen] add feed for net-updates of aozora.gr.jp (#910)
* add feed for net-updates of aozora.gr.jp

* .gitignore: filt vim swap file

* fix a line in .gitignore; try change char in ReadMe

* try fix ReadMe
2018-10-19 00:04:13 +08:00
DIYgod ead54bee00 app: use newrelic 2018-10-09 16:30:27 +08:00
DIYgod 63cb0ea837 rss: add douyin user 2018-09-04 18:33:32 +08:00
Jeff Wen 9f42bbfbba feat: update 3dm download rss (#496) 2018-08-20 14:20:46 +08:00
Henry Wang 8523a27b75 Update docs (#467) 2018-08-15 10:45:47 +08:00
fengkx ef8ccc9d82 National Geographic RSS support (#389)
* National Geographic RSS

* fix format warning

* docs

* full text by default && correct docs

* format fix ci check

* correct docs
2018-07-28 11:52:03 +08:00
ZnHoCn 3d63c2f7d5 添加 停水通知 (#315)
* Add tingshuitz in Hanghou, Xiaoshan, Dalian area

* 更新 停水通知 文档

* 更正文档链接错误处

* Remove package-lock.json

* Change .gitignore
2018-06-27 23:32:04 +08:00
Su Yang 4663a6ea17 改进Docker的使用方式 (#272)
* 改进Docker的使用方式(https://github.com/DIYgod/RSSHub/issues/271)

* ignore npm lockfile, config dir desc file

* Accept with the advice of the maintainer
2018-06-06 23:35:35 +08:00
DIYgod 39fb33e7f5 docs: update vuepress; unregister service worker 2018-05-25 22:45:52 +08:00
さくら 49de384d2e feat: add prettier and commit hooks (#144)
* feat: add prettier and commit hooks

* style(*): prettier format

* fix(eslint): parsing error: Unexpected token ...

* style(eslint): eslint --fix

* style(bilibili): fix `no-undef` and `no-unused-vars`

* style(jiandan): fix eqeqeq

* style(pixiv): disable `no-constant-condition` rule for eslint

* fix(pixiv): use template string

* style(toutiao): remove unused variables

* style(weibo): use `forEach` instead of `map`

The array has no return value, you should use `forEach` instead of `map`

* chore(hooks): add eslint hooks

* chore(hooks): switch from husky to yorkie

* style(zhihu): prettier format

* style(docs): fix vuepress custom container

https://vuepress.vuejs.org/guide/markdown.html#custom-containers

* chore(prettier): set a more reasonable `printWidth` value

* style(*): better prettier format
2018-05-17 10:52:29 +08:00
u3u 0f757e8ac5 ignore editor config 2018-04-17 19:14:13 +08:00
DIYgod 5794ac872c basic modules 2018-04-11 01:48:11 +08:00