refactor(core): initial multiple servers infra (#8745)

This is the initial refactoring of affine to support multiple servers, but many more changes are needed to make multi-server actually work.
This commit is contained in:
EYHN
2024-11-27 06:44:46 +00:00
parent 3f4cb5be40
commit 6b4a1aa917
80 changed files with 1141 additions and 519 deletions

View File

@@ -3,7 +3,7 @@
*
* for support arraybuffer response type
*/
import { FetchProvider } from '@affine/core/modules/cloud/provider/fetch';
import { RawFetchProvider } from '@affine/core/modules/cloud/provider/fetch';
import { CapacitorHttp } from '@capacitor/core';
import type { Framework } from '@toeverything/infra';
@@ -121,7 +121,7 @@ function base64ToUint8Array(base64: string) {
return new Uint8Array(binaryArray);
}
export function configureFetchProvider(framework: Framework) {
framework.override(FetchProvider, {
framework.override(RawFetchProvider, {
fetch: async (input, init) => {
const request = new Request(input, init);
const { method } = request;