domql 3.7.4 → 3.7.5
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/iife/index.js +25 -15
- package/package.json +4 -4
package/dist/iife/index.js
CHANGED
|
@@ -1941,7 +1941,9 @@ var Domql = (() => {
|
|
|
1941
1941
|
);
|
|
1942
1942
|
createClient = mod.createClient;
|
|
1943
1943
|
}
|
|
1944
|
-
|
|
1944
|
+
const client = createClient(supabaseUrl, key, options);
|
|
1945
|
+
if (!client || !client.auth) return null;
|
|
1946
|
+
return supabaseAdapter(client);
|
|
1945
1947
|
};
|
|
1946
1948
|
applyFilters = (query, params) => {
|
|
1947
1949
|
if (!params) return query;
|
|
@@ -2573,7 +2575,7 @@ var Domql = (() => {
|
|
|
2573
2575
|
return resolved;
|
|
2574
2576
|
};
|
|
2575
2577
|
initAdapterAuth = async (adapter, context) => {
|
|
2576
|
-
if (adapter.__authInitialized) return;
|
|
2578
|
+
if (!adapter || adapter.__authInitialized) return;
|
|
2577
2579
|
adapter.__authInitialized = true;
|
|
2578
2580
|
if (!adapter.getSession) return;
|
|
2579
2581
|
const updateAuth = (user, session) => {
|
|
@@ -2605,9 +2607,10 @@ var Domql = (() => {
|
|
|
2605
2607
|
if (db.__resolving) return db.__resolving;
|
|
2606
2608
|
db.__resolving = resolveDb(db);
|
|
2607
2609
|
const resolved = await db.__resolving;
|
|
2610
|
+
delete db.__resolving;
|
|
2611
|
+
if (!resolved) return null;
|
|
2608
2612
|
db.__resolved = resolved;
|
|
2609
2613
|
context.fetch = resolved;
|
|
2610
|
-
delete db.__resolving;
|
|
2611
2614
|
if (db.auth !== false) await initAdapterAuth(resolved, context);
|
|
2612
2615
|
return resolved;
|
|
2613
2616
|
};
|
|
@@ -4114,13 +4117,19 @@ ${element}` : "";
|
|
|
4114
4117
|
const prop = element[param];
|
|
4115
4118
|
if (isFunction(prop) && !isMethod(param, element)) {
|
|
4116
4119
|
ref.__exec[param] = prop;
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
result.then
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4120
|
+
try {
|
|
4121
|
+
const result = prop(element, element.state, element.context);
|
|
4122
|
+
if (result && typeof result.then === "function") {
|
|
4123
|
+
result.then((resolved) => {
|
|
4124
|
+
element[param] = resolved;
|
|
4125
|
+
}).catch((e) => {
|
|
4126
|
+
console.warn("[DOMQL] Async exec error in", param, ":", e?.message || e);
|
|
4127
|
+
});
|
|
4128
|
+
} else {
|
|
4129
|
+
element[param] = result;
|
|
4130
|
+
}
|
|
4131
|
+
} catch (e) {
|
|
4132
|
+
console.warn("[DOMQL] Exec error in", param, ":", e?.message || e);
|
|
4124
4133
|
}
|
|
4125
4134
|
}
|
|
4126
4135
|
}
|
|
@@ -4340,10 +4349,7 @@ ${element}` : "";
|
|
|
4340
4349
|
// ../element/dist/esm/mixins/html.js
|
|
4341
4350
|
init_esm();
|
|
4342
4351
|
function html(param, element, node) {
|
|
4343
|
-
|
|
4344
|
-
if (isString(prop) && prop.includes("{{") && element.call) {
|
|
4345
|
-
prop = element.call("replaceLiteralsWithObjectFields", prop, element.state);
|
|
4346
|
-
}
|
|
4352
|
+
const prop = exec(param ?? element?.props?.html, element);
|
|
4347
4353
|
const { __ref } = element;
|
|
4348
4354
|
if (prop !== __ref.__html) {
|
|
4349
4355
|
if (node.nodeName === "SVG") node.textContent = prop;
|
|
@@ -6608,7 +6614,11 @@ ${element}` : "";
|
|
|
6608
6614
|
if (!ref.__skipCreate && REGISTRY[k] && !optionsHasDefine) {
|
|
6609
6615
|
continue;
|
|
6610
6616
|
} else if (element[k] && !hasDefine && !optionsHasDefine && !contextHasDefine) {
|
|
6611
|
-
|
|
6617
|
+
try {
|
|
6618
|
+
create(exec(element[k], element), element, k, options);
|
|
6619
|
+
} catch (e) {
|
|
6620
|
+
console.warn("[DOMQL] onlyResolveExtends child error in", k, ":", e?.message || e);
|
|
6621
|
+
}
|
|
6612
6622
|
}
|
|
6613
6623
|
}
|
|
6614
6624
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "domql",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.5",
|
|
4
4
|
"license": "CC-BY-NC-4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"build:iife": "cross-env NODE_ENV=$NODE_ENV esbuild index.js --bundle --target=es2020 --format=iife --global-name=Domql --outfile=dist/iife/index.js --define:process.env.NODE_ENV=process.env.NODE_ENV"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@domql/element": "^3.7.
|
|
29
|
-
"@domql/state": "^3.7.
|
|
30
|
-
"@domql/utils": "^3.7.
|
|
28
|
+
"@domql/element": "^3.7.5",
|
|
29
|
+
"@domql/state": "^3.7.5",
|
|
30
|
+
"@domql/utils": "^3.7.5"
|
|
31
31
|
},
|
|
32
32
|
"gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681",
|
|
33
33
|
"browser": "./dist/esm/index.js",
|