Commit Graph
82 Commits
Author SHA1 Message Date
xixu-me 621c2260fd build(types): add node typings for TypeScript 6 2026-03-30 22:00:59 +08:00
xixu-me 5fbaf83f25 test: remove obsolete xget skill script tests 2026-03-29 02:55:23 +08:00
xixu-me e3a0da9181 ci(commitlint): skip dependabot pull request branches 2026-03-24 19:26:45 +08:00
xixu-me f2936d2598 refactor(core): modularize request pipeline 2026-03-20 15:36:10 +08:00
xixu-me 1ee3ad102e test: raise coverage above 95 percent 2026-03-20 13:03:50 +08:00
xixu-me 67fb8c1ba5 ci: integrate codecov coverage reporting 2026-03-20 12:20:21 +08:00
xixu-me a391e95bcb fix(test): avoid unhandled header injection rejection 2026-03-16 17:53:08 +08:00
xixu-me 85a0c83484 fix(docker): harden auth token parsing 2026-03-16 14:51:43 +08:00
xixu-me fad1b710e8 fix(pypi): prevent caching origin-bound rewritten index pages 2026-03-16 12:57:21 +08:00
xixu-me 9214028cf9 fix(flathub): scope rewritten descriptor cache by origin 2026-03-16 01:14:33 +08:00
xixu-me 69c3bba933 refactor(skill): streamline Xget skill documentation and remove deprecated test cases 2026-03-15 17:42:45 +08:00
xixu-me c8e8d2b76e refactor(skill): remove cargo preset limitations and related test cases 2026-03-15 15:47:42 +08:00
xixu-me 37e2ff8708 fix(skills): harden URL conversion 2026-03-15 12:16:31 +08:00
xixu-me 2b9d4790de fix: harden proxy error handling and regression tests 2026-03-14 17:33:06 +08:00
xixu-me 442263d8f9 chore: align Flathub ordering and commit guidance
Resolves #222
2026-03-14 16:45:01 +08:00
xixu-me be2ce81c2a feat: add Flathub mirror support 2026-03-14 16:23:38 +08:00
xixu-me ad5f1993c5 fix: handle docker host-style registry paths 2026-03-09 18:05:13 +08:00
xixu-me 18247d5cfe feat: refactor AI inference request detection and Docker authentication handling 2026-03-09 17:49:47 +08:00
xixu-me 89dc392374 feat: update dependencies and improve request handling 2026-03-09 17:37:27 +08:00
xixu-me ecef35dfe9 Revert "fix(proxy): correct registry auth and rewrite lengths"
This reverts commit cb44ddb66c.
2026-03-09 17:00:43 +08:00
xixu-me 8075a181de Revert "style(proxy): format docker protocol tests"
This reverts commit 213e04de76.
2026-03-09 16:56:27 +08:00
xixu-me a72f9142ab Revert "feat(platform): add ScoopInstaller support"
This reverts commit 6f0d7e15f8.
2026-03-09 13:04:37 +08:00
xixu-me 35a5d26d83 feat(platform): add ScoopInstaller support
Resolves #207
2026-03-08 13:05:15 +08:00
xixu-me d891973b73 fix: harden proxy behavior and stabilize ci 2026-03-06 21:10:59 +08:00
xixu-me 6b0476f17e style(proxy): format docker protocol tests 2026-03-06 20:30:35 +08:00
xixu-me 805b4d0f6d fix(proxy): correct registry auth and rewrite lengths 2026-03-06 20:27:43 +08:00
xixu-me 87b7529628 style: format prettier violations 2026-03-06 19:45:03 +08:00
xixu-me 0837de2f14 fix(proxy): tighten protocol routing and stabilize tests 2026-03-06 19:41:14 +08:00
xixu-me e705367524 feat: enhance security validation and caching behavior for requests with sensitive headers 2026-02-01 13:50:11 +08:00
xixu-me 0fc3935042 fix: increase test timeouts and fix lint error
- Add global testTimeout (60s) and hookTimeout (30s) in vitest.config.js
- Increase timeouts for network-dependent tests in security, integration,
  and container-registry test files
- Use HEAD requests where appropriate to reduce network overhead
- Fix lint error: change 'let scope' to 'const scope' in src/index.js
2026-01-31 22:22:59 +08:00
xixu-me d529a16789 Improve JSDoc types and add eslint-plugin-jsdoc
Standardized JSDoc type annotations across the codebase, replacing 'Object' with 'object' and refining function signatures for better type safety. Added and configured eslint-plugin-jsdoc for enhanced documentation linting, and updated ESLint settings to include adapters and new JSDoc rules. Updated dependencies to include eslint-plugin-jsdoc and related packages.
2025-12-11 13:27:26 +08:00
xixu-me 3832d565e2 Refactor integration tests and add feature-specific test suites
Moves Git, Git LFS, and authentication header forwarding tests from integration.test.js into dedicated feature test files under test/features/. Updates range-cache, security, and container-registry tests for consistency and minor improvements. Refactors src/index.js for code style and readability, especially around cache logic and error handling.
2025-12-10 16:23:44 +08:00
xixu-me 2c2862cb78 Add multi-platform function adapters and CI workflow
Introduces adapters for Vercel, Netlify Edge, Deno Deploy, and Cloudflare Pages, each with platform-specific entry points and configuration files. Adds a GitHub Actions CI workflow for linting, type checking, and testing. Updates lint scripts to include adapters, improves type annotations in src/index.js, and fixes a type assertion in security tests.
2025-12-10 16:08:10 +08:00
xixu-me cb0bb2da2f Refactor request handling and improve Docker detection
Refactored the main request handler in src/index.js for improved readability and error handling. Enhanced Docker request detection in validation.js to include additional Content-Type checks. Updated tests to increase timeouts and expand expected status codes for container registry platforms.
2025-12-10 15:47:25 +08:00
xixu-me 75d8594532 Refactor protocol and utility logic into separate modules
Moved Docker/OCI protocol handling, performance monitoring, security, and validation logic into dedicated modules under src/protocols and src/utils. Updated src/index.js to use these new modules, improving maintainability and separation of concerns. Added pre-computed sorted platform keys for efficient matching in platform config.
2025-12-10 15:03:27 +08:00
xixu-me 251dbd2181 Transform scope parameter for container registry auth
Added logic to remove the cr/[registry]/ prefix from the scope parameter and handle official Docker Hub images by adding the library/ prefix. Updated tests to verify correct scope transformation for Docker Hub, GHCR, and official images.
2025-12-10 13:04:33 +08:00
xixu-me 81e810ec9a Add type declarations and improve test typings
Introduces src/types.d.ts and test/types.d.ts for Cloudflare Workers and test utilities. Enhances JSDoc comments and type annotations across test files for better type safety and clarity. Updates tsconfig.json to use bundler module resolution and include additional type sources. Minor test logic and assertion improvements for robustness.
2025-12-08 19:57:48 +08:00
xixu-me 1979557fa9 Improve parsing, regex, and test consistency
Refines regex patterns for URL rewriting and authentication parsing, ensures parseInt uses radix 10 throughout, and updates test mocks and helpers for consistency. Also adds more global variables to ESLint config, improves error handling, and removes unused code in tests.
2025-12-08 19:19:10 +08:00
xixu-me dbc80db767 Refactor test helpers and add auth header forwarding tests
Modularizes test helpers into separate files for assertions, generators, and mocks, and updates imports for platform tests. Adds new tests to verify Authorization header forwarding for authenticated requests. Cleans up and simplifies test setup, and updates fixtures for clarity and maintainability.
2025-11-27 16:27:42 +08:00
xixu-me 7aa125a625 Redirect invalid and incomplete paths to homepage
Update request handling to redirect root, invalid platform prefixes, and platform prefixes without resource paths to the homepage. Adjust tests to expect 302 redirects instead of 404 or 400 responses for these cases.
2025-11-18 18:30:15 +08:00
xixu-me 4890a512fd Add support for GitHub Gist platform
Added GitHub Gist ('gist') to the supported platforms in the configuration, updated documentation in both English and Chinese READMEs, and included related tests to ensure correct path transformation and base URL.
2025-11-10 20:45:58 +08:00
xixu-me 31d6ac5907 Add Git LFS protocol support and tests
Introduces detection and handling for Git LFS (Large File Storage) operations, including LFS-specific endpoints, headers, and user agents. Updates request validation, header management, and cache logic to properly support LFS requests and ensure real-time data synchronization. Adds comprehensive integration and unit tests for LFS scenarios, and documents the new behavior in CLAUDE.md.
2025-11-09 15:51:39 +08:00
Claude 331c1697bf Add Docker Hub container registry support with library prefix handling
This commit adds support for Docker Hub (registry-1.docker.io) as a container registry platform with special authentication handling for official images.

Changes:
- Add 'cr-docker' platform pointing to https://registry-1.docker.io in platforms.js
- Implement special authentication scope handling for Docker Hub official images
- Docker Hub stores official images (nginx, redis, etc.) as library/nginx, library/redis
- Single-component image names are automatically prefixed with 'library/' for authentication
- Multi-component names (user/image) are passed through unchanged
- Add comprehensive tests for Docker Hub support

This resolves the issue where pulling public images from Docker Hub would prompt for authentication incorrectly. The library prefix is now automatically added to the authentication scope for single-name images, allowing proper anonymous access to public official images.

Test coverage:
- Official images (single-name): /cr/docker/v2/nginx/manifests/latest
- User images (namespaced): /cr/docker/v2/nginxinc/nginx-unprivileged/manifests/latest
- GET and HEAD request methods verified

All Docker Hub specific tests pass.
2025-11-09 07:16:03 +00:00
xixu-me f92ede78c3 Improve range request caching and media file handling
Enhances caching strategy to only cache 200 responses (not 206), supports serving range requests from cached full content, and avoids compression for media files to ensure proper byte-range support. Adds comprehensive tests for range request caching, media file handling, cache key management, and performance metrics.
2025-09-03 03:26:01 +08:00
xixu-me d0a37eb472 Remove test README and update format scripts
Deleted test/README.md and updated the Prettier format scripts in package.json to exclude markdown files from formatting.
2025-09-03 02:42:58 +08:00
xixu-me 7a41998535 Add Jenkins plugin mirror support
Introduces Jenkins plugin and update center mirror support in README and platform config. Updates transformPath logic for Jenkins endpoints and adds comprehensive tests for Jenkins path handling and URL construction.
2025-09-03 01:47:23 +08:00
xixu-me 2166f02cb8 Revert "Add Kaggle platform support and path transformation"
This reverts commit 1480595fbc.
2025-08-20 22:30:06 +08:00
xixu-me 3469e3f8d6 Add Kaggle platform support and path transformation
Introduces Kaggle as a supported platform in the configuration and health check. Implements special path transformation logic for Kaggle API endpoints in transformPath, and adds comprehensive tests to verify correct path handling for various Kaggle API routes.
2025-08-20 22:17:48 +08:00
xixu-me 55adac1ec5 Add Civitai platform support
Added 'civitai' to the PLATFORMS config and updated tests to include Civitai path transformations. This enables handling of Civitai URLs in the platform configuration and ensures correct path transformation logic.
2025-08-20 21:37:57 +08:00
xixu-me 4b0eb5ecd3 Update AI API references and Gemini test case
Revised README to clarify 'AI 推理 API' terminology, updated Gemini API example URLs to use 'gemini-2.5-flash', and adjusted the related test case in platforms.test.js to match the new Gemini API path.
2025-08-14 17:09:58 +08:00