Commit Graph
81 Commits
Author SHA1 Message Date
xixu-me 9e4b523851 test: remove obsolete xget skill script tests 2026-03-29 02:55:23 +08:00
xixu-me 0a7679893c ci(commitlint): skip dependabot pull request branches 2026-03-24 19:26:45 +08:00
xixu-me 1b67fd2ff1 refactor(core): modularize request pipeline 2026-03-20 15:36:10 +08:00
xixu-me 8e5550c709 test: raise coverage above 95 percent 2026-03-20 13:03:50 +08:00
xixu-me 3fb46ad729 ci: integrate codecov coverage reporting 2026-03-20 12:20:21 +08:00
xixu-me c036fab353 fix(test): avoid unhandled header injection rejection 2026-03-16 17:53:08 +08:00
xixu-me 993570fede fix(docker): harden auth token parsing 2026-03-16 14:51:43 +08:00
xixu-me a10413eddf fix(pypi): prevent caching origin-bound rewritten index pages 2026-03-16 12:57:21 +08:00
xixu-me c76dcca460 fix(flathub): scope rewritten descriptor cache by origin 2026-03-16 01:14:33 +08:00
xixu-me 11a032f243 refactor(skill): streamline Xget skill documentation and remove deprecated test cases 2026-03-15 17:42:45 +08:00
xixu-me 8cb08f2b79 refactor(skill): remove cargo preset limitations and related test cases 2026-03-15 15:47:42 +08:00
xixu-me ff3e61ae22 fix(skills): harden URL conversion 2026-03-15 12:16:31 +08:00
xixu-me 7bec13b3e5 fix: harden proxy error handling and regression tests 2026-03-14 17:33:06 +08:00
xixu-me 7340cb481f chore: align Flathub ordering and commit guidance
Resolves #222
2026-03-14 16:45:01 +08:00
xixu-me 88c351a9ac feat: add Flathub mirror support 2026-03-14 16:23:38 +08:00
xixu-me 234692584a fix: handle docker host-style registry paths 2026-03-09 18:05:13 +08:00
xixu-me fc7e08abfc feat: refactor AI inference request detection and Docker authentication handling 2026-03-09 17:49:47 +08:00
xixu-me 929337c494 feat: update dependencies and improve request handling 2026-03-09 17:37:27 +08:00
xixu-me 3957f78d9d Revert "fix(proxy): correct registry auth and rewrite lengths"
This reverts commit cb44ddb66c.
2026-03-09 17:00:43 +08:00
xixu-me 9a666f37a0 Revert "style(proxy): format docker protocol tests"
This reverts commit 213e04de76.
2026-03-09 16:56:27 +08:00
xixu-me fe17b9a1d6 Revert "feat(platform): add ScoopInstaller support"
This reverts commit 6f0d7e15f8.
2026-03-09 13:04:37 +08:00
xixu-me 6f0d7e15f8 feat(platform): add ScoopInstaller support
Resolves #207
2026-03-08 13:05:15 +08:00
xixu-me cc3abf89c3 fix: harden proxy behavior and stabilize ci 2026-03-06 21:10:59 +08:00
xixu-me 213e04de76 style(proxy): format docker protocol tests 2026-03-06 20:30:35 +08:00
xixu-me cb44ddb66c fix(proxy): correct registry auth and rewrite lengths 2026-03-06 20:27:43 +08:00
xixu-me 4546821023 style: format prettier violations 2026-03-06 19:45:03 +08:00
xixu-me 71e239060c fix(proxy): tighten protocol routing and stabilize tests 2026-03-06 19:41:14 +08:00
xixu-me 90b8edd53a feat: enhance security validation and caching behavior for requests with sensitive headers 2026-02-01 13:50:11 +08:00
xixu-me c700b6acee 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 07f5f35972 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 ce93ea9861 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 44b54580ad 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 214e596d00 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 70ff5b248d 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 80e3c26967 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 4993444f51 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 d88f1911a6 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 f60661db6f 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 0204501aba 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 6245da9e6f 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 17f94416d6 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 57e30e8aaa 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 7d50e9e788 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 d231a61528 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 0a5ef94d81 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 16edbd841d Revert "Add Kaggle platform support and path transformation"
This reverts commit 1480595fbc.
2025-08-20 22:30:06 +08:00
xixu-me 1480595fbc 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 a9843ab948 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 8089a30b96 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
xixu-me 144da6a0e7 Update AI provider keys and docs for consistency
Renamed several AI provider keys and references (e.g., 'ip-google' to 'ip-gemini', 'ip-mistral' to 'ip-mistralai', etc.) in the codebase, documentation, and tests for improved clarity and alignment with provider branding. Updated README usage examples and provider tables to match the new keys.
2025-08-14 16:52:14 +08:00