@stoker-platform/web-client 0.5.39 → 0.5.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/bundle.js +24 -19
  2. package/package.json +3 -3
package/dist/bundle.js CHANGED
@@ -8,7 +8,7 @@ import { getFunctions as Ue, httpsCallable as Je, connectFunctionsEmulator as up
8
8
  import { ReCaptchaEnterpriseProvider as fp, initializeAppCheck as Gn, onTokenChanged as Hn } from "firebase/app-check";
9
9
  import { getPerformance as dp } from "firebase/performance";
10
10
  import { getRemoteConfig as hp, fetchAndActivate as mp } from "firebase/remote-config";
11
- const pp = "0.5.39", yp = (r) => !!r.auth, vt = (r, e) => {
11
+ const pp = "0.5.40", yp = (r) => !!r.auth, vt = (r, e) => {
12
12
  if (e?.operations)
13
13
  return e.operations.includes(r);
14
14
  }, An = (r, e) => e ? e.Role ? r.access?.includes(e.Role) : !1 : !0, gp = (r, e) => e ? !e.Role || r.restrictCreate === !0 ? !1 : typeof r.restrictCreate == "object" ? r.restrictCreate?.includes(e.Role) : !0 : !0, _p = (r, e) => e ? !e.Role || r.restrictUpdate === !0 ? !1 : typeof r.restrictUpdate == "object" ? r.restrictUpdate?.includes(e.Role) : !0 : !0, te = (r, e) => r.filter((t) => t.name === e)[0], _e = (r) => ["OneToOne", "OneToMany", "ManyToOne", "ManyToMany"].includes(r.type), Rd = (r, e) => {
@@ -11955,24 +11955,18 @@ let fn, Ka = 0;
11955
11955
  const Ew = async () => {
11956
11956
  const r = Am(), e = Ie();
11957
11957
  return hr(ke(r, "system_deployment", "latest_deploy"), (n) => {
11958
- if (n.exists())
11959
- fn = n.data(), Ka++, Ka > 1 && (fn.refresh ? window.location.reload() : ve(e.onVersionUpdate, [fn, Ka]));
11960
- else
11961
- throw new Error("Version info not found");
11958
+ n.exists() ? (fn = n.data(), Ka++, Ka > 1 && (fn.refresh ? window.location.reload() : ve(e.onVersionUpdate, [fn, Ka]))) : console.error("Version info not found");
11962
11959
  }, (n) => {
11963
- throw new Error("Error getting version info", { cause: n.message });
11960
+ console.error("Error getting version info", { cause: n.message });
11964
11961
  });
11965
11962
  }, Om = () => fn;
11966
11963
  let Ro;
11967
11964
  const Sw = async () => {
11968
11965
  const r = Ie(), e = Am();
11969
11966
  hr(ke(e, "system_deployment", "maintenance_mode"), (t) => {
11970
- if (t.exists())
11971
- Ro = t.data(), ve(r.onMaintenanceUpdate, [Ro.active ? "on" : "off"]);
11972
- else
11973
- throw new Error("Maintenance status not found");
11967
+ t.exists() ? (Ro = t.data(), ve(r.onMaintenanceUpdate, [Ro.active ? "on" : "off"])) : console.error("Maintenance status not found");
11974
11968
  }, (t) => {
11975
- throw new Error("Error getting maintenance status", { cause: t.message });
11969
+ console.error("Error getting maintenance status", { cause: t.message });
11976
11970
  });
11977
11971
  }, Tw = () => Ro;
11978
11972
  let Nr, Er = null;
@@ -11996,14 +11990,25 @@ const Rw = () => {
11996
11990
  await ve(r.postLogout, [s]);
11997
11991
  }
11998
11992
  }, Aw = (r) => {
11999
- const e = (t) => {
12000
- typeof t == "string" && t.includes("Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds.") && (console.warn("Slow Firestore Connection Detected"), ve(r.onFirestoreSlowConnection)), typeof t == "string" && t.includes("Using maximum backoff delay to prevent overloading the backend.") && (console.warn("Firestore Load Failure Detected"), ve(r.onFirestoreLoadFailure)), typeof t == "string" && t.includes("The user's credential is no longer valid. The user must sign in again.") && (console.warn("User Credential Expired"), Em()), typeof t == "string" && t.includes("Connection to Indexed Database server lost. Refresh the page to try again") && (console.warn("Indexed Database Connection Lost"), ve(r.onIndexedDBConnectionLost));
12001
- };
12002
- window.addEventListener("error", (t) => {
12003
- e(t.message);
12004
- }), window.addEventListener("unhandledrejection", (t) => {
12005
- const n = t.reason?.message;
12006
- e(n);
11993
+ const e = (s) => {
11994
+ typeof s == "string" && s.includes("Could not reach Cloud Firestore backend. Backend didn't respond within 10 seconds.") && (console.warn("Slow Firestore Connection Detected"), ve(r.onFirestoreSlowConnection)), typeof s == "string" && s.includes("Using maximum backoff delay to prevent overloading the backend.") && (console.warn("Firestore Load Failure Detected"), ve(r.onFirestoreLoadFailure)), typeof s == "string" && s.includes("The user's credential is no longer valid. The user must sign in again.") && (console.warn("User Credential Expired"), Em()), typeof s == "string" && s.includes("Connection to Indexed Database server lost. Refresh the page to try again") && (console.warn("Indexed Database Connection Lost"), ve(r.onIndexedDBConnectionLost));
11995
+ }, t = console.error.bind(console);
11996
+ let n = !1;
11997
+ console.error = (...s) => {
11998
+ if (t(...s), !n) {
11999
+ n = !0;
12000
+ try {
12001
+ for (const i of s)
12002
+ typeof i == "string" ? e(i) : i instanceof Error && e(i.message);
12003
+ } finally {
12004
+ n = !1;
12005
+ }
12006
+ }
12007
+ }, window.addEventListener("error", (s) => {
12008
+ e(s.message);
12009
+ }), window.addEventListener("unhandledrejection", (s) => {
12010
+ const i = s.reason?.message;
12011
+ e(i);
12007
12012
  });
12008
12013
  };
12009
12014
  let ht, hc, Tt, Sm, pe, Tm, Pr, mc, pc, $e, Rm, Rn = [], be;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-client",
3
- "version": "0.5.39",
3
+ "version": "0.5.41",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "files": [
@@ -24,8 +24,8 @@
24
24
  "test": "echo \"Error: no test specified\""
25
25
  },
26
26
  "dependencies": {
27
- "@stoker-platform/types": "0.5.27",
28
- "@stoker-platform/utils": "0.5.34",
27
+ "@stoker-platform/types": "0.5.28",
28
+ "@stoker-platform/utils": "0.5.35",
29
29
  "@types/lodash": "^4.17.24",
30
30
  "@types/luxon": "^3.7.1",
31
31
  "firebase": "^12.11.0",