refactor(core): migrate to Bun and converge acquisition policies and Agent boundaries

This commit is contained in:
root committed 2026-10-13 14:37:03 +08:00
1 parent 3f1c6d02f6
commit 27c0f27434
268 files changed
+7468 -7852

No files matched your search

+1 -1
View File
@@ -219,7 +219,7 @@ describe("TmdbClient 缓存/限流/错误分类", () => {
const e1 = await dead.details("movie", 1).catch((x) => x);
expect(e1.kind).toBe("network");
// 模拟把 URL(含 api_key 参数与编码后的明文)拼进信息的 fetch 实现
const leaky: typeof fetch = async (input) => {
const leaky: (input: RequestInfo | URL, init?: RequestInit) => Promise<Response> = async (input) => {
throw new TypeError(`error sending request for url (${String(input)}): key ${encodeURIComponent(KEY)}`);
};
const e2 = await createTmdbClient({ baseUrl: "http://tmdb.local/3", apiKey: KEY, retries: 0, fetch: leaky })