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