@objectstack/objectql 3.0.9 → 3.0.11
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/.turbo/turbo-build.log +8 -8
- package/CHANGELOG.md +18 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/protocol.ts +13 -2
package/dist/index.mjs
CHANGED
|
@@ -491,6 +491,7 @@ SchemaRegistry.namespaceRegistry = /* @__PURE__ */ new Map();
|
|
|
491
491
|
SchemaRegistry.metadata = /* @__PURE__ */ new Map();
|
|
492
492
|
|
|
493
493
|
// src/protocol.ts
|
|
494
|
+
import { parseFilterAST, isFilterAST } from "@objectstack/spec/data";
|
|
494
495
|
function simpleHash(str) {
|
|
495
496
|
let hash = 0;
|
|
496
497
|
for (let i = 0; i < str.length; i++) {
|
|
@@ -717,18 +718,18 @@ var ObjectStackProtocolImplementation = class {
|
|
|
717
718
|
options.sort = parsed;
|
|
718
719
|
delete options.orderBy;
|
|
719
720
|
}
|
|
721
|
+
if (options.filters !== void 0 && options.filter === void 0) {
|
|
722
|
+
options.filter = options.filters;
|
|
723
|
+
}
|
|
724
|
+
delete options.filters;
|
|
720
725
|
if (typeof options.filter === "string") {
|
|
721
726
|
try {
|
|
722
727
|
options.filter = JSON.parse(options.filter);
|
|
723
728
|
} catch {
|
|
724
729
|
}
|
|
725
730
|
}
|
|
726
|
-
if (
|
|
727
|
-
|
|
728
|
-
options.filter = JSON.parse(options.filters);
|
|
729
|
-
delete options.filters;
|
|
730
|
-
} catch {
|
|
731
|
-
}
|
|
731
|
+
if (isFilterAST(options.filter)) {
|
|
732
|
+
options.filter = parseFilterAST(options.filter);
|
|
732
733
|
}
|
|
733
734
|
if (typeof options.populate === "string") {
|
|
734
735
|
options.populate = options.populate.split(",").map((s) => s.trim()).filter(Boolean);
|