refactor: 抽取共享模块,消除跨端重复代码 (~1500 行净省)#22
Open
eric8810 wants to merge 1 commit into
Open
Conversation
Rust: - 新增 catcher-core::ffi_helpers (CancellationGuard/invoke_callback/parse_headers 等) - http_ffi 793→410, ws_ffi 234→147, sse_ffi 358→273, quality_ffi 165→125 - WsStream 委托宏, 手写 base64→crate, retry when() 统一, MultipartError 删除, TLS 转换去重 TypeScript: - 新增 helpers.ts (createExecutor/sleep/classifyFetch/SSEStreamCore/SSEClientCore) - 新增 interceptors.ts (createInterceptorManager 共享) - 新增 sse-router.ts (routeLine/PushQueue 共享) - SSE stream/client 参数化 (各平台仅保留 readWithIdleTimeout 差异) - 删除 dead code: getLastRetryCount/clearDnsCache/mergeConfig Dart: - 新增 ffi_utils.dart (allocFfiString/copyBytesToMalloc/FfiAsyncBridge/CatcherError) - _execute/_executeWithCancel 应用 FfiAsyncBridge - CatcherHttpError/CatcherWsError 统一为 CatcherError - 删除冗余 integration 测试 (roundtrip 子集)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rust:
TypeScript:
Dart: