Make getDynamicRateLimits async and await getProxyEndpoints to ensure proxy endpoints are resolved before calculating limits; update checkRateLimit to await the dynamic limits. Replace the custom microtask-based delay loop with a simple setTimeout-based Promise in delayRequest, normalizing and clamping the delay to milliseconds. These changes fix async behavior and simplify the request-delay implementation.
Removed charset from Content-Type, updated Accept-Encoding to include zstd, and commented out fingerprint and customHeader spreading. Also removed Cache-Control header for a more streamlined request.
Expanded request headers to better mimic browser requests and improve compatibility with DeepL. Added specific handling for HTTP 429 rate limit errors and enhanced general error reporting for non-200 responses.
Refined the generateBrowserFingerprint function to use more realistic and concise HTTP headers. Updated wrangler.jsonc to disable general observability but enable and configure detailed logging and tracing with persistence and full sampling.
Introduces CLAUDE.md with detailed project, architecture, and contribution guidelines. Improves generateBrowserFingerprint in proxyManager.ts by adding comprehensive headers to better mimic real browsers and bypass DeepL bot detection. Minor cleanup in testHelpers.ts. package-lock.json updated for peer dependencies.
Eliminated Microsoft Translator support from the codebase, including its service implementation, API endpoint, and related tests. Updated both English and Chinese README files to reflect the removal and to clarify usage of DeepL and Google endpoints, providing improved examples and API documentation.
Refactored the Microsoft Translator service to use a parameter object for translation requests, improved language code normalization, and enhanced error handling. Updated integration and unit tests to match the new API and moved Microsoft Translator unit tests to a new location under tests/lib/services. Removed the old test file and added more comprehensive test coverage for translation scenarios and error cases.
Changed the call to translateWithMicrosoft to pass text, source_lang, and target_lang as separate arguments instead of a single params object. Updated the function implementation to match the new signature and inlined the request body construction.
Refactored the Microsoft Translator integration to improve error handling, token acquisition, and API request structure. Added comprehensive unit tests for translation and service availability, covering success, error, and edge cases.
Introduces a new Microsoft Translator service with a compatible API, adds the /microsoft POST endpoint, and updates the translation handler to support Microsoft as a provider. Also includes minor cleanup in testHelpers.
Updated the translateWithGoogle function to accept an optional config parameter and handle missing clientIP values gracefully. This improves flexibility and prevents errors when config or its properties are undefined.
Introduces a Google Translate integration with a new service module and endpoint (/google), refactors translation handling to support both DeepL and Google providers, and updates cache key generation to include the provider. Adds integration and unit tests for the new provider and updates API route definitions for clarity and extensibility.
Moved the worker export configuration to the end of the file and refactored the scheduled handler to be a synchronous function. This improves code organization and clarity.
Replaced occurrences of 'application' with 'app' in code comments and documentation for consistency and brevity. Updated both English and Chinese README files to add and clarify DeepLX App usage instructions, and adjusted section order for better clarity.
Deleted htmlUtils module and its related tests. Removed all references to HTML preservation functions from index.ts and query.ts, simplifying the query logic and eliminating HTML-specific handling.
Changed placeholder format to a unique string less likely to be altered by translation services and added zero-padding for consistency. Updated restoration logic to handle case-insensitive matching of placeholders. Added tests to verify correct restoration when placeholders are converted to lowercase.
Add configuration, documentation, code of conduct, contributing guide, license, and README files. Set up .gitignore, coverage config, GitHub issue templates, pull request template, and initial source code, scripts, and tests for DeepLX optimized for Cloudflare Workers.