@databrainhq/plugin 0.15.28 → 0.15.29
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.
- package/dist/webcomponents.es.js +14 -14
- package/dist/webcomponents.umd.js +1 -1
- package/package.json +1 -1
package/dist/webcomponents.es.js
CHANGED
|
@@ -9042,7 +9042,7 @@ function useQuery(arg1, arg2, arg3) {
|
|
|
9042
9042
|
var parsedOptions = parseQueryArgs(arg1, arg2, arg3);
|
|
9043
9043
|
return useBaseQuery(parsedOptions, QueryObserver);
|
|
9044
9044
|
}
|
|
9045
|
-
const API_BASE_URL = {}.VITE_SELFHOSTED_ENV === "ECS" ? "DBN_SELFHOSTED_EXPRESS_DOMAIN" : "https://
|
|
9045
|
+
const API_BASE_URL = {}.VITE_SELFHOSTED_ENV === "ECS" ? "DBN_SELFHOSTED_EXPRESS_DOMAIN" : "https://api.usedatabrain.com";
|
|
9046
9046
|
const DASHBOARD_PATH = "/api/v2/dashboard";
|
|
9047
9047
|
const METRIC_PATH = "/api/v2/metric";
|
|
9048
9048
|
const NEW_METRIC_PATH = "/api/v3/metric";
|
|
@@ -9636,7 +9636,7 @@ const createStore = (initialValues) => {
|
|
|
9636
9636
|
const pendingMap = /* @__PURE__ */ new Map();
|
|
9637
9637
|
let stateListeners;
|
|
9638
9638
|
let mountedAtoms;
|
|
9639
|
-
if (({ "VITE_END_POINT": "https://
|
|
9639
|
+
if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production") {
|
|
9640
9640
|
stateListeners = /* @__PURE__ */ new Set();
|
|
9641
9641
|
mountedAtoms = /* @__PURE__ */ new Set();
|
|
9642
9642
|
}
|
|
@@ -9649,7 +9649,7 @@ const createStore = (initialValues) => {
|
|
|
9649
9649
|
// not invalidated
|
|
9650
9650
|
d: /* @__PURE__ */ new Map()
|
|
9651
9651
|
};
|
|
9652
|
-
if (({ "VITE_END_POINT": "https://
|
|
9652
|
+
if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production") {
|
|
9653
9653
|
Object.freeze(atomState);
|
|
9654
9654
|
if (!hasInitialValue(atom2)) {
|
|
9655
9655
|
console.warn(
|
|
@@ -9717,7 +9717,7 @@ const createStore = (initialValues) => {
|
|
|
9717
9717
|
return committedAtomStateMap.get(atom2);
|
|
9718
9718
|
};
|
|
9719
9719
|
const setAtomState = (version2, atom2, atomState) => {
|
|
9720
|
-
if (({ "VITE_END_POINT": "https://
|
|
9720
|
+
if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production") {
|
|
9721
9721
|
Object.freeze(atomState);
|
|
9722
9722
|
}
|
|
9723
9723
|
if (version2) {
|
|
@@ -9872,7 +9872,7 @@ const createStore = (initialValues) => {
|
|
|
9872
9872
|
// invalidated
|
|
9873
9873
|
};
|
|
9874
9874
|
setAtomState(version2, atom2, nextAtomState);
|
|
9875
|
-
} else if (({ "VITE_END_POINT": "https://
|
|
9875
|
+
} else if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production") {
|
|
9876
9876
|
console.warn("[Bug] could not invalidate non existing atom", atom2);
|
|
9877
9877
|
}
|
|
9878
9878
|
};
|
|
@@ -9987,7 +9987,7 @@ const createStore = (initialValues) => {
|
|
|
9987
9987
|
return writeGetter(a3, options2);
|
|
9988
9988
|
});
|
|
9989
9989
|
}
|
|
9990
|
-
if (({ "VITE_END_POINT": "https://
|
|
9990
|
+
if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production") {
|
|
9991
9991
|
console.info(
|
|
9992
9992
|
"Reading pending atom state in write operation. We throw a promise for now.",
|
|
9993
9993
|
a3
|
|
@@ -9998,7 +9998,7 @@ const createStore = (initialValues) => {
|
|
|
9998
9998
|
if ("v" in aState) {
|
|
9999
9999
|
return aState.v;
|
|
10000
10000
|
}
|
|
10001
|
-
if (({ "VITE_END_POINT": "https://
|
|
10001
|
+
if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production") {
|
|
10002
10002
|
console.warn(
|
|
10003
10003
|
"[Bug] no value found while reading atom in write operation. This is probably a bug.",
|
|
10004
10004
|
a3
|
|
@@ -10047,7 +10047,7 @@ const createStore = (initialValues) => {
|
|
|
10047
10047
|
l: /* @__PURE__ */ new Set()
|
|
10048
10048
|
};
|
|
10049
10049
|
mountedMap.set(atom2, mounted);
|
|
10050
|
-
if (({ "VITE_END_POINT": "https://
|
|
10050
|
+
if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production") {
|
|
10051
10051
|
mountedAtoms.add(atom2);
|
|
10052
10052
|
}
|
|
10053
10053
|
const atomState = readAtomState(void 0, atom2);
|
|
@@ -10078,7 +10078,7 @@ const createStore = (initialValues) => {
|
|
|
10078
10078
|
onUnmount();
|
|
10079
10079
|
}
|
|
10080
10080
|
mountedMap.delete(atom2);
|
|
10081
|
-
if (({ "VITE_END_POINT": "https://
|
|
10081
|
+
if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production") {
|
|
10082
10082
|
mountedAtoms.delete(atom2);
|
|
10083
10083
|
}
|
|
10084
10084
|
const atomState = getAtomState(version2, atom2);
|
|
@@ -10097,7 +10097,7 @@ const createStore = (initialValues) => {
|
|
|
10097
10097
|
}
|
|
10098
10098
|
}
|
|
10099
10099
|
});
|
|
10100
|
-
} else if (({ "VITE_END_POINT": "https://
|
|
10100
|
+
} else if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production") {
|
|
10101
10101
|
console.warn("[Bug] could not find atom state to unmount", atom2);
|
|
10102
10102
|
}
|
|
10103
10103
|
};
|
|
@@ -10153,7 +10153,7 @@ const createStore = (initialValues) => {
|
|
|
10153
10153
|
mounted == null ? void 0 : mounted.l.forEach((listener) => listener());
|
|
10154
10154
|
});
|
|
10155
10155
|
}
|
|
10156
|
-
if (({ "VITE_END_POINT": "https://
|
|
10156
|
+
if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production") {
|
|
10157
10157
|
stateListeners.forEach((l2) => l2());
|
|
10158
10158
|
}
|
|
10159
10159
|
};
|
|
@@ -10193,7 +10193,7 @@ const createStore = (initialValues) => {
|
|
|
10193
10193
|
}
|
|
10194
10194
|
flushPending(version2);
|
|
10195
10195
|
};
|
|
10196
|
-
if (({ "VITE_END_POINT": "https://
|
|
10196
|
+
if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production") {
|
|
10197
10197
|
return {
|
|
10198
10198
|
[READ_ATOM]: readAtom,
|
|
10199
10199
|
[WRITE_ATOM]: writeAtom,
|
|
@@ -10239,7 +10239,7 @@ function useAtomValue(atom2, scope) {
|
|
|
10239
10239
|
const { s: store, v: versionFromProvider } = scopeContainer;
|
|
10240
10240
|
const getAtomValue = (version22) => {
|
|
10241
10241
|
const atomState = store[READ_ATOM](atom2, version22);
|
|
10242
|
-
if (({ "VITE_END_POINT": "https://
|
|
10242
|
+
if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production" && !atomState.y) {
|
|
10243
10243
|
throw new Error("should not be invalidated");
|
|
10244
10244
|
}
|
|
10245
10245
|
if ("e" in atomState) {
|
|
@@ -10296,7 +10296,7 @@ function useSetAtom(atom2, scope) {
|
|
|
10296
10296
|
const { s: store, w: versionedWrite } = useContext(ScopeContext);
|
|
10297
10297
|
const setAtom = useCallback(
|
|
10298
10298
|
(update) => {
|
|
10299
|
-
if (({ "VITE_END_POINT": "https://
|
|
10299
|
+
if (({ "VITE_END_POINT": "https://api.usedatabrain.com", "BASE_URL": "/", "MODE": "production", "DEV": false, "PROD": true, "SSR": false } && "production") !== "production" && !("write" in atom2)) {
|
|
10300
10300
|
throw new Error("not writable atom");
|
|
10301
10301
|
}
|
|
10302
10302
|
const write2 = (version2) => store[WRITE_ATOM](atom2, update, version2);
|