Add build:routes:worker script that generates routes-worker.js with
WORKER_BUILD=true before running tsdown for worker builds. Also add
alias for routes.json to resolve static module resolution.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
- Update build-docs.ts to output routes.json and categories.json
- Modify workflow to copy JSON files to rsshub-docs/src/public
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
- Add Cloudflare Workers KV cache implementation with TTL support
- Create xxhash-wasm shim using Web Crypto API to replace incompatible WebAssembly
- Unify cache middleware to use single cache.ts via tsdown-worker.config.ts alias
- Update dependencies: wrangler, @cloudflare/puppeteer, @cloudflare/workers-types
- Configure automatic KV namespace provisioning without manual ID configuration
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
* 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>
* fix(route/alwayscontrol): correct import order to pass ESLint check
- Move cheerio import to first line (external dependencies first)
- Add blank line after external imports
- Keep type imports before other internal imports
- Maintain alphabetical order for @/ imports
This fixes the ESLint import/order error that was blocking PR #20522
* feat(route/alwayscontrol): add namespace file
Add required namespace.ts file for alwayscontrol route as requested by reviewer.
* fix(route/patreon): support creator under /cw/
* fix(route/patreon): improve regex
* fix(route/patreon): streamline creator data extraction from Patreon API
* fix: add summary field in JSON output format
This fixes that the summary/description was not included in the feed.
As a side-note, we cannot remove the content_html field even if only the
summary/description is present.
> content_html and content_text are each optional strings — but one or
> both must be present.
* test: add JSON view tests
---------
* feat(tests): add comprehensive unit tests for various utility functions and views
- Implement tests for cache utility to ensure proper behavior with no cache and TTL keys.
- Add tests for common utilities including string manipulation and path handling.
- Introduce tests for directory import functionality to validate file imports and pattern matching.
- Create tests for git hash retrieval to handle fallback scenarios.
- Develop tests for deprecated got utility to verify response handling and retry logic.
- Enhance got utility tests to include request hooks and search parameter handling.
- Mock header generator tests to validate user agent handling.
- Expand helpers tests to cover current path retrieval and duration parsing.
- Implement tests for ofetch utility to ensure proper proxy handling and logging.
- Add OpenTelemetry metric tests to validate metric serialization.
- Create proxy tests to verify multi-proxy selection and failure handling.
- Introduce request rewriter tests to validate fetch and get wrapper functionality.
- Add timezone utility tests to handle various input types.
- Implement view tests for Atom and RSS rendering to ensure correct output.
- Create index view tests to validate debug information display based on configuration.
* refactor: remove deprecated got implementation and associated tests
* test: expand coverage for api, middleware, and utils
* feat: denonbu
* chore: UPPER_SNAKE_CASE for constants
* fix: timezone
* fix: extract a title if none is given
* fix: typo
* fix: handle special media fields
testcase: /denonbu/news/daiba
* fix: naming
* feat: cache token
* chore: remove manual `...` (RSSHub will add it)
* chore: simplify checks
shall be safe to guess the site won't have sid === 0
* Apply suggestion from TonyRL
---------
* feat(route): add tag
* fix: replace 'referrer' with 'referer' in http header
* fix(route): update tag path
* fix(utils): update pubDate parsing to include timezone
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix: update image source to use favicon.ico for foodtalks routes
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* fix(route): fix wrong title of /ecnu/bksy
Co-authored-by: FrozenStarrrr <frozenstars@qq.com>
* feat(route): add ECNU Software Engineering Insitute notices route
* fix(route): modify wrong radar target
* add School of Computer Science and Technology ECNU notices route
* add School of data science and engineering notices route
* add School of Comm. & Elec. Engineering notices route
* add School of Geospace A.I. Engineering ECNU notices route
* add ECNU faculty of Edu. notices route
* add ECNU faculty of Earth Sci. notices route
* add ECNU Meng Xiancheng notices route
* add ECNU Guanghua notices route
* fix(route): add empty line at the end of files.
* add department of history ECNU notices route
* add department of Philo. ECNU notices route
* fix(route): add maintainer of /ecnu/bksy
* fix(route): delete unnecessary try-catch statment, modified incorrect url, fix image url.
* fix(route): fix unnecessary try-catch, description, condition and wrond url
* fix(route): fix image display
* fix(route): fix problems in bksy.ts
* feat(route): add ecnu/pharm
* feat(route): add art insititute of ECNU
* feat(route): add route of school of Stat. ECNU
* feat(route): add route of school of Phy. & Elec., ECNU
* feat(route): add route of school of Chem. & Mol., ECNU
* feat(route): add route of school of Eco. & Envir., ECNU
* feat(route): add route of school of Comm., ECNU
* feat(route): add route of school of International Chinese Studies, ECNU
* feat(route): add route of school of Psy. & cognitive Sci., ECNU
* feat(route): add route of college of Phy. Edu. & health , ECNU
* feat(route): add route of college of public management, ECNU
* feat(route): add route of college of Marxismus, ECNU
* fix(routes): fix incorrect time display and remove unnecessary codes
* fix(foute): format the code
* add cxcy
* feat(routes): add ecnu/jiaoliu
* feat(route): add two new routes of ECNU
* feat(route): add info of /ecnu/cxcy
* fix(route): replace links with baseUrl and update the method to query dom element
* Update lib/routes/ecnu/cxcy.ts
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
---------
Co-authored-by: FrozenStarrrr <frozenstars@qq.com>