@mastra/turbopuffer 1.2.4 → 1.2.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.
@@ -3,7 +3,7 @@ name: mastra-turbopuffer
3
3
  description: Documentation for @mastra/turbopuffer. Use when working with @mastra/turbopuffer APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/turbopuffer"
6
- version: "1.2.4"
6
+ version: "1.2.5"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,11 +1,11 @@
1
1
  {
2
- "version": "1.2.4",
2
+ "version": "1.2.5",
3
3
  "package": "@mastra/turbopuffer",
4
4
  "exports": {
5
5
  "TurbopufferVector": {
6
6
  "types": "dist/vector/index.d.ts",
7
7
  "implementation": "dist/index.js",
8
- "line": 157
8
+ "line": 158
9
9
  }
10
10
  },
11
11
  "modules": {}
package/dist/index.cjs CHANGED
@@ -59,6 +59,7 @@ var TurbopufferFilterTranslator = class extends _mastra_core_vector_filter.BaseF
59
59
  const entries = Object.entries(node);
60
60
  if (entries.length === 0) return ["And", []];
61
61
  const [key, value] = entries[0];
62
+ if (entries.length > 1 && entries.some(([entryKey]) => this.isLogicalOperator(entryKey))) return ["And", entries.map(([entryKey, entryValue]) => this.translateNode({ [entryKey]: entryValue }))];
62
63
  if (key && this.isLogicalOperator(key)) return this.translateLogical(key, value);
63
64
  if (entries.length > 1) return ["And", entries.map(([field, fieldValue]) => this.translateFieldCondition(field, fieldValue))];
64
65
  return this.translateFieldCondition(key, value);
package/dist/index.js CHANGED
@@ -58,6 +58,7 @@ var TurbopufferFilterTranslator = class extends BaseFilterTranslator {
58
58
  const entries = Object.entries(node);
59
59
  if (entries.length === 0) return ["And", []];
60
60
  const [key, value] = entries[0];
61
+ if (entries.length > 1 && entries.some(([entryKey]) => this.isLogicalOperator(entryKey))) return ["And", entries.map(([entryKey, entryValue]) => this.translateNode({ [entryKey]: entryValue }))];
61
62
  if (key && this.isLogicalOperator(key)) return this.translateLogical(key, value);
62
63
  if (entries.length > 1) return ["And", entries.map(([field, fieldValue]) => this.translateFieldCondition(field, fieldValue))];
63
64
  return this.translateFieldCondition(key, value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/turbopuffer",
3
- "version": "1.2.4",
3
+ "version": "1.2.5",
4
4
  "description": "Turbopuffer vector store provider for Mastra",
5
5
  "type": "module",
6
6
  "files": [
@@ -35,10 +35,10 @@
35
35
  "tsx": "^4.23.15",
36
36
  "typescript": "^7.0.2",
37
37
  "vitest": "5.1.0",
38
- "@internal/types-builder": "0.0.127",
39
- "@internal/lint": "0.0.152",
40
- "@internal/storage-test-utils": "0.0.148",
41
- "@mastra/core": "1.86.0"
38
+ "@internal/lint": "0.0.153",
39
+ "@internal/storage-test-utils": "0.0.149",
40
+ "@internal/types-builder": "0.0.128",
41
+ "@mastra/core": "1.87.0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@mastra/core": ">=1.0.0-0 <2.0.0-0"