@mastra/upstash 0.1.0 → 0.1.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/.turbo/turbo-build.log +5 -5
- package/CHANGELOG.md +24 -0
- package/dist/index.js +9 -9
- package/package.json +2 -2
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/upstash@0.1.
|
|
2
|
+
> @mastra/upstash@0.1.1-alpha.0 build C:\Users\Ward\projects\mastra\mastra\stores\upstash
|
|
3
3
|
> tsup src/index.ts --format esm --experimental-dts --clean --treeshake
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts
|
|
6
6
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
7
|
[34mCLI[39m tsup v8.3.6
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 3166ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.7.3
|
|
13
13
|
[36mWriting package typings: C:\Users\Ward\projects\mastra\mastra\stores\upstash\dist\_tsup-dts-rollup.d.ts[39m
|
|
14
|
-
[32mDTS[39m ⚡️ Build success in
|
|
14
|
+
[32mDTS[39m ⚡️ Build success in 3861ms
|
|
15
15
|
[34mCLI[39m Cleaning output folder
|
|
16
16
|
[34mESM[39m Build start
|
|
17
|
-
[32mESM[39m [1mdist\index.js [22m[
|
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
|
17
|
+
[32mESM[39m [1mdist\index.js [22m[32m16.11 KB[39m
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 417ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @mastra/upstash
|
|
2
2
|
|
|
3
|
+
## 0.1.1
|
|
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
|
|
14
|
+
|
|
15
|
+
## 0.1.1-alpha.0
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies [d59f1a8]
|
|
20
|
+
- Updated dependencies [91ef439]
|
|
21
|
+
- Updated dependencies [4a25be4]
|
|
22
|
+
- Updated dependencies [bf2e88f]
|
|
23
|
+
- Updated dependencies [2f0d707]
|
|
24
|
+
- Updated dependencies [aac1667]
|
|
25
|
+
- @mastra/core@0.2.1-alpha.0
|
|
26
|
+
|
|
3
27
|
## 0.1.0
|
|
4
28
|
|
|
5
29
|
### 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
|
|
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
|
|
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 !==
|
|
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
|
|
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 ===
|
|
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 ===
|
|
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 ===
|
|
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 ===
|
|
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 ===
|
|
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.
|
|
3
|
+
"version": "0.1.1",
|
|
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.
|
|
20
|
+
"@mastra/core": "^0.2.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@microsoft/api-extractor": "^7.49.2",
|