checkpoint
This commit is contained in:
parent
f3cf18f673
commit
c955fac585
|
|
@ -3,6 +3,7 @@ import pako, { gzip } from "pako";
|
|||
import { fetchViaProxy, getProxyUrl } from "../proxy";
|
||||
import { del, get, set } from "idb-keyval";
|
||||
import { pack } from "msgpackr";
|
||||
import { WS_CONFIG } from "../../../utils/sync/ws-client";
|
||||
|
||||
const schema_promise = {
|
||||
tables: {} as Record<string, any>,
|
||||
|
|
@ -202,6 +203,7 @@ export const fetchSendDb = async (
|
|||
text = await res.text();
|
||||
result = JSON.parse(text);
|
||||
if (
|
||||
WS_CONFIG.debug &&
|
||||
typeof location === "object" &&
|
||||
(["localhost", "prasi.avolut.com"].includes(location.hostname) ||
|
||||
location.hostname.endsWith(".avolut.com"))
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import { initIDB } from "./idb";
|
|||
const packr = new Packr({ structuredClone: true });
|
||||
|
||||
/** CONSTANT */
|
||||
const WS_CONFIG = {
|
||||
export const WS_CONFIG = {
|
||||
debug: !!localStorage.getItem("prasi-ws-debug"),
|
||||
reconnectTimeout: 1000,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue