@mastra/convex 1.9.1-alpha.0 → 1.9.1-alpha.1
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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +2 -2
- package/dist/index.cjs +17 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -26
- package/dist/index.js.map +1 -1
- package/dist/vector/index.d.ts +1 -0
- package/dist/vector/index.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/docs/SKILL.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.9.1-alpha.
|
|
2
|
+
"version": "1.9.1-alpha.1",
|
|
3
3
|
"package": "@mastra/convex",
|
|
4
4
|
"exports": {
|
|
5
5
|
"ConvexCacheClient": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"ConvexNativeVector": {
|
|
11
11
|
"types": "dist/vector/native.d.ts",
|
|
12
12
|
"implementation": "dist/index.js",
|
|
13
|
-
"line":
|
|
13
|
+
"line": 2875
|
|
14
14
|
},
|
|
15
15
|
"ConvexServerCache": {
|
|
16
16
|
"types": "dist/cache/index.d.ts",
|
package/dist/index.cjs
CHANGED
|
@@ -2791,38 +2791,29 @@ var ConvexVector = class extends _mastra_core_vector.MastraVector {
|
|
|
2791
2791
|
if (!value.some((cond) => this.matchesFilterConditions(recordMetadata, cond))) return false;
|
|
2792
2792
|
continue;
|
|
2793
2793
|
}
|
|
2794
|
-
if (typeof value === "object" && value !== null &&
|
|
2795
|
-
if (!
|
|
2796
|
-
continue;
|
|
2797
|
-
}
|
|
2798
|
-
if (typeof value === "object" && value !== null && "$nin" in value) {
|
|
2799
|
-
if (Array.isArray(value.$nin) && value.$nin.includes(recordMetadata[key])) return false;
|
|
2800
|
-
continue;
|
|
2801
|
-
}
|
|
2802
|
-
if (typeof value === "object" && value !== null && "$gt" in value) {
|
|
2803
|
-
if (!(recordMetadata[key] > value.$gt)) return false;
|
|
2804
|
-
continue;
|
|
2805
|
-
}
|
|
2806
|
-
if (typeof value === "object" && value !== null && "$gte" in value) {
|
|
2807
|
-
if (!(recordMetadata[key] >= value.$gte)) return false;
|
|
2808
|
-
continue;
|
|
2809
|
-
}
|
|
2810
|
-
if (typeof value === "object" && value !== null && "$lt" in value) {
|
|
2811
|
-
if (!(recordMetadata[key] < value.$lt)) return false;
|
|
2812
|
-
continue;
|
|
2813
|
-
}
|
|
2814
|
-
if (typeof value === "object" && value !== null && "$lte" in value) {
|
|
2815
|
-
if (!(recordMetadata[key] <= value.$lte)) return false;
|
|
2816
|
-
continue;
|
|
2817
|
-
}
|
|
2818
|
-
if (typeof value === "object" && value !== null && "$ne" in value) {
|
|
2819
|
-
if (recordMetadata[key] === value.$ne) return false;
|
|
2794
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value) && Object.keys(value).some((k) => k.startsWith("$"))) {
|
|
2795
|
+
if (!this.matchesFieldOperators(recordMetadata[key], value)) return false;
|
|
2820
2796
|
continue;
|
|
2821
2797
|
}
|
|
2822
2798
|
if (recordMetadata[key] !== value) return false;
|
|
2823
2799
|
}
|
|
2824
2800
|
return true;
|
|
2825
2801
|
}
|
|
2802
|
+
matchesFieldOperators(fieldValue, operators) {
|
|
2803
|
+
return Object.entries(operators).every(([operator, operand]) => {
|
|
2804
|
+
switch (operator) {
|
|
2805
|
+
case "$eq": return fieldValue === operand;
|
|
2806
|
+
case "$ne": return fieldValue !== operand;
|
|
2807
|
+
case "$in": return Array.isArray(operand) && operand.includes(fieldValue);
|
|
2808
|
+
case "$nin": return !(Array.isArray(operand) && operand.includes(fieldValue));
|
|
2809
|
+
case "$gt": return fieldValue > operand;
|
|
2810
|
+
case "$gte": return fieldValue >= operand;
|
|
2811
|
+
case "$lt": return fieldValue < operand;
|
|
2812
|
+
case "$lte": return fieldValue <= operand;
|
|
2813
|
+
default: return false;
|
|
2814
|
+
}
|
|
2815
|
+
});
|
|
2816
|
+
}
|
|
2826
2817
|
async callStorage(request) {
|
|
2827
2818
|
return this.client.callStorage(request);
|
|
2828
2819
|
}
|