@mastra/upstash 0.1.0 → 0.1.1-alpha.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @mastra/upstash
2
2
 
3
+ ## 0.1.1-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [d59f1a8]
8
+ - Updated dependencies [91ef439]
9
+ - Updated dependencies [4a25be4]
10
+ - Updated dependencies [bf2e88f]
11
+ - Updated dependencies [2f0d707]
12
+ - Updated dependencies [aac1667]
13
+ - @mastra/core@0.2.1-alpha.0
14
+
3
15
  ## 0.1.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.js CHANGED
@@ -36,11 +36,11 @@ var UpstashStore = class extends MastraStorage {
36
36
  return `${tableName}:${keyParts.join(":")}`;
37
37
  }
38
38
  ensureDate(date) {
39
- if (!date) return undefined;
39
+ if (!date) return void 0;
40
40
  return date instanceof Date ? date : new Date(date);
41
41
  }
42
42
  serializeDate(date) {
43
- if (!date) return undefined;
43
+ if (!date) return void 0;
44
44
  const dateObj = this.ensureDate(date);
45
45
  return dateObj?.toISOString();
46
46
  }
@@ -151,7 +151,7 @@ var UpstashStore = class extends MastraStorage {
151
151
  }));
152
152
  for (const message of messagesWithIndex) {
153
153
  const key = this.getMessageKey(message.threadId, message.id);
154
- const score = message._index !== undefined ? message._index : new Date(message.createdAt).getTime();
154
+ const score = message._index !== void 0 ? message._index : new Date(message.createdAt).getTime();
155
155
  pipeline.set(key, message);
156
156
  pipeline.zadd(this.getThreadMessagesKey(message.threadId), {
157
157
  score,
@@ -229,7 +229,7 @@ var UpstashFilterTranslator = class extends BaseFilterTranslator {
229
229
  };
230
230
  }
231
231
  translate(filter) {
232
- if (this.isEmpty(filter)) return undefined;
232
+ if (this.isEmpty(filter)) return void 0;
233
233
  this.validateFilter(filter);
234
234
  return this.translateNode(filter);
235
235
  }
@@ -237,11 +237,11 @@ var UpstashFilterTranslator = class extends BaseFilterTranslator {
237
237
  if (this.isRegex(node)) {
238
238
  throw new Error("Direct regex pattern format is not supported in Upstash");
239
239
  }
240
- if (node === null || node === undefined) {
240
+ if (node === null || node === void 0) {
241
241
  throw new Error("Filtering for null/undefined values is not supported by Upstash Vector");
242
242
  }
243
243
  if (this.isPrimitive(node)) {
244
- if (node === null || node === undefined) {
244
+ if (node === null || node === void 0) {
245
245
  throw new Error("Filtering for null/undefined values is not supported by Upstash Vector");
246
246
  }
247
247
  return this.formatComparison(path, "=", node);
@@ -260,7 +260,7 @@ var UpstashFilterTranslator = class extends BaseFilterTranslator {
260
260
  conditions.push(this.translateOperator(key, value, path));
261
261
  } else if (typeof value === "object" && value !== null) {
262
262
  conditions.push(this.translateNode(value, newPath));
263
- } else if (value === null || value === undefined) {
263
+ } else if (value === null || value === void 0) {
264
264
  throw new Error("Filtering for null/undefined values is not supported by Upstash Vector");
265
265
  } else {
266
266
  conditions.push(this.formatComparison(newPath, "=", value));
@@ -372,7 +372,7 @@ var UpstashFilterTranslator = class extends BaseFilterTranslator {
372
372
  return `${path} != ${this.formatValue(val)}`;
373
373
  }
374
374
  formatValue(value) {
375
- if (value === null || value === undefined) {
375
+ if (value === null || value === void 0) {
376
376
  throw new Error("Filtering for null/undefined values is not supported by Upstash Vector");
377
377
  }
378
378
  if (typeof value === "string") {
@@ -396,7 +396,7 @@ var UpstashFilterTranslator = class extends BaseFilterTranslator {
396
396
  }
397
397
  formatArray(values) {
398
398
  return values.map((value) => {
399
- if (value === null || value === undefined) {
399
+ if (value === null || value === void 0) {
400
400
  throw new Error("Filtering for null/undefined values is not supported by Upstash Vector");
401
401
  }
402
402
  return this.formatValue(value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/upstash",
3
- "version": "0.1.0",
3
+ "version": "0.1.1-alpha.0",
4
4
  "description": "Upstash provider for Mastra - includes both vector and db storage capabilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,7 +17,7 @@
17
17
  "dependencies": {
18
18
  "@upstash/redis": "^1.28.3",
19
19
  "@upstash/vector": "^1.1.7",
20
- "@mastra/core": "^0.2.0"
20
+ "@mastra/core": "^0.2.1-alpha.0"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@microsoft/api-extractor": "^7.49.2",