@mastra/upstash 1.5.0 → 1.5.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.
@@ -3,7 +3,7 @@ name: mastra-upstash
3
3
  description: Documentation for @mastra/upstash. Use when working with @mastra/upstash APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/upstash"
6
- version: "1.5.0"
6
+ version: "1.5.1-alpha.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.0",
2
+ "version": "1.5.1-alpha.1",
3
3
  "package": "@mastra/upstash",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -5,7 +5,6 @@ let _mastra_core_storage = require("@mastra/core/storage");
5
5
  let _mastra_core_error = require("@mastra/core/error");
6
6
  let _mastra_core_agent = require("@mastra/core/agent");
7
7
  let _mastra_core_evals = require("@mastra/core/evals");
8
- let crypto$1 = require("crypto");
9
8
  let _mastra_core_vector = require("@mastra/core/vector");
10
9
  let _upstash_vector = require("@upstash/vector");
11
10
  let _mastra_core_vector_filter = require("@mastra/core/vector/filter");
@@ -2176,6 +2175,7 @@ var UpstashFilterTranslator = class extends _mastra_core_vector_filter.BaseFilte
2176
2175
  if (op === "$contains") return `${path} NOT CONTAINS ${this.formatValue(val)}`;
2177
2176
  if (op === "$regex") return `${path} NOT GLOB ${this.formatValue(val)}`;
2178
2177
  if (op === "$in") return `${path} NOT IN (${this.formatArray(val)})`;
2178
+ if (op === "$nin") return `${path} IN (${this.formatArray(val)})`;
2179
2179
  if (op === "$exists") return val ? `HAS NOT FIELD ${path}` : `HAS FIELD ${path}`;
2180
2180
  if (op === "$and" || op === "$or") {
2181
2181
  const newOp = op === "$and" ? "$or" : "$and";
@@ -2240,7 +2240,7 @@ var UpstashVector = class extends _mastra_core_vector.MastraVector {
2240
2240
  * @returns {Promise<string[]>} A promise that resolves to the IDs of the upserted vectors.
2241
2241
  */
2242
2242
  async upsert({ indexName: namespace, vectors, metadata, ids, sparseVectors }) {
2243
- const generatedIds = ids || vectors.map(() => (0, crypto$1.randomUUID)());
2243
+ const generatedIds = ids || vectors.map(() => globalThis.crypto.randomUUID());
2244
2244
  const points = vectors.map((vector, index) => ({
2245
2245
  id: generatedIds[index],
2246
2246
  vector,