@mastra/upstash 0.1.12 → 0.1.13-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/.turbo/turbo-build.log +7 -7
- package/CHANGELOG.md +10 -0
- package/dist/index.cjs +3 -3
- package/dist/index.js +3 -3
- package/package.json +2 -2
- package/src/storage/index.ts +5 -3
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
> @mastra/upstash@0.1.
|
|
2
|
+
> @mastra/upstash@0.1.13-alpha.0 build /home/runner/work/mastra/mastra/stores/upstash
|
|
3
3
|
> tsup src/index.ts --format esm,cjs --experimental-dts --clean --treeshake=smallest --splitting
|
|
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.4.0
|
|
8
8
|
[34mTSC[39m Build start
|
|
9
|
-
[32mTSC[39m ⚡️ Build success in
|
|
9
|
+
[32mTSC[39m ⚡️ Build success in 9737ms
|
|
10
10
|
[34mDTS[39m Build start
|
|
11
11
|
[34mCLI[39m Target: es2022
|
|
12
12
|
Analysis will use the bundled TypeScript version 5.8.2
|
|
13
13
|
[36mWriting package typings: /home/runner/work/mastra/mastra/stores/upstash/dist/_tsup-dts-rollup.d.ts[39m
|
|
14
14
|
Analysis will use the bundled TypeScript version 5.8.2
|
|
15
15
|
[36mWriting package typings: /home/runner/work/mastra/mastra/stores/upstash/dist/_tsup-dts-rollup.d.cts[39m
|
|
16
|
-
[32mDTS[39m ⚡️ Build success in
|
|
16
|
+
[32mDTS[39m ⚡️ Build success in 10952ms
|
|
17
17
|
[34mCLI[39m Cleaning output folder
|
|
18
18
|
[34mESM[39m Build start
|
|
19
19
|
[34mCJS[39m Build start
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
[
|
|
23
|
-
[
|
|
20
|
+
[32mCJS[39m [1mdist/index.cjs [22m[32m16.31 KB[39m
|
|
21
|
+
[32mCJS[39m ⚡️ Build success in 711ms
|
|
22
|
+
[32mESM[39m [1mdist/index.js [22m[32m16.19 KB[39m
|
|
23
|
+
[32mESM[39m ⚡️ Build success in 717ms
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @mastra/upstash
|
|
2
2
|
|
|
3
|
+
## 0.1.13-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 7911ddf: Sanitize redis keys on workflow snapshot storage
|
|
8
|
+
- Updated dependencies [fb68a80]
|
|
9
|
+
- Updated dependencies [b56a681]
|
|
10
|
+
- Updated dependencies [248cb07]
|
|
11
|
+
- @mastra/core@0.6.4-alpha.0
|
|
12
|
+
|
|
3
13
|
## 0.1.12
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -26,7 +26,7 @@ var UpstashStore = class extends storage.MastraStorage {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
getKey(tableName, keys) {
|
|
29
|
-
const keyParts = Object.entries(keys).map(([key, value]) => `${key}:${value}`);
|
|
29
|
+
const keyParts = Object.entries(keys).filter(([_, value]) => value !== void 0).map(([key, value]) => `${key}:${value}`);
|
|
30
30
|
return `${tableName}:${keyParts.join(":")}`;
|
|
31
31
|
}
|
|
32
32
|
ensureDate(date) {
|
|
@@ -192,7 +192,7 @@ var UpstashStore = class extends storage.MastraStorage {
|
|
|
192
192
|
return messages.map(({ _index, ...message }) => message);
|
|
193
193
|
}
|
|
194
194
|
async persistWorkflowSnapshot(params) {
|
|
195
|
-
const { namespace, workflowName, runId, snapshot } = params;
|
|
195
|
+
const { namespace = "workflows", workflowName, runId, snapshot } = params;
|
|
196
196
|
const key = this.getKey(storage.MastraStorage.TABLE_WORKFLOW_SNAPSHOT, {
|
|
197
197
|
namespace,
|
|
198
198
|
workflow_name: workflowName,
|
|
@@ -201,7 +201,7 @@ var UpstashStore = class extends storage.MastraStorage {
|
|
|
201
201
|
await this.redis.set(key, snapshot);
|
|
202
202
|
}
|
|
203
203
|
async loadWorkflowSnapshot(params) {
|
|
204
|
-
const { namespace, workflowName, runId } = params;
|
|
204
|
+
const { namespace = "workflows", workflowName, runId } = params;
|
|
205
205
|
const key = this.getKey(storage.MastraStorage.TABLE_WORKFLOW_SNAPSHOT, {
|
|
206
206
|
namespace,
|
|
207
207
|
workflow_name: workflowName,
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,7 @@ var UpstashStore = class extends MastraStorage {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
getKey(tableName, keys) {
|
|
27
|
-
const keyParts = Object.entries(keys).map(([key, value]) => `${key}:${value}`);
|
|
27
|
+
const keyParts = Object.entries(keys).filter(([_, value]) => value !== void 0).map(([key, value]) => `${key}:${value}`);
|
|
28
28
|
return `${tableName}:${keyParts.join(":")}`;
|
|
29
29
|
}
|
|
30
30
|
ensureDate(date) {
|
|
@@ -190,7 +190,7 @@ var UpstashStore = class extends MastraStorage {
|
|
|
190
190
|
return messages.map(({ _index, ...message }) => message);
|
|
191
191
|
}
|
|
192
192
|
async persistWorkflowSnapshot(params) {
|
|
193
|
-
const { namespace, workflowName, runId, snapshot } = params;
|
|
193
|
+
const { namespace = "workflows", workflowName, runId, snapshot } = params;
|
|
194
194
|
const key = this.getKey(MastraStorage.TABLE_WORKFLOW_SNAPSHOT, {
|
|
195
195
|
namespace,
|
|
196
196
|
workflow_name: workflowName,
|
|
@@ -199,7 +199,7 @@ var UpstashStore = class extends MastraStorage {
|
|
|
199
199
|
await this.redis.set(key, snapshot);
|
|
200
200
|
}
|
|
201
201
|
async loadWorkflowSnapshot(params) {
|
|
202
|
-
const { namespace, workflowName, runId } = params;
|
|
202
|
+
const { namespace = "workflows", workflowName, runId } = params;
|
|
203
203
|
const key = this.getKey(MastraStorage.TABLE_WORKFLOW_SNAPSHOT, {
|
|
204
204
|
namespace,
|
|
205
205
|
workflow_name: workflowName,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/upstash",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13-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",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@upstash/redis": "^1.34.5",
|
|
23
23
|
"@upstash/vector": "^1.2.1",
|
|
24
|
-
"@mastra/core": "^0.6.
|
|
24
|
+
"@mastra/core": "^0.6.4-alpha.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@microsoft/api-extractor": "^7.52.1",
|
package/src/storage/index.ts
CHANGED
|
@@ -36,7 +36,9 @@ export class UpstashStore extends MastraStorage {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
private getKey(tableName: TABLE_NAMES, keys: Record<string, any>): string {
|
|
39
|
-
const keyParts = Object.entries(keys)
|
|
39
|
+
const keyParts = Object.entries(keys)
|
|
40
|
+
.filter(([_, value]) => value !== undefined)
|
|
41
|
+
.map(([key, value]) => `${key}:${value}`);
|
|
40
42
|
return `${tableName}:${keyParts.join(':')}`;
|
|
41
43
|
}
|
|
42
44
|
|
|
@@ -272,7 +274,7 @@ export class UpstashStore extends MastraStorage {
|
|
|
272
274
|
runId: string;
|
|
273
275
|
snapshot: WorkflowRunState;
|
|
274
276
|
}): Promise<void> {
|
|
275
|
-
const { namespace, workflowName, runId, snapshot } = params;
|
|
277
|
+
const { namespace = 'workflows', workflowName, runId, snapshot } = params;
|
|
276
278
|
const key = this.getKey(MastraStorage.TABLE_WORKFLOW_SNAPSHOT, {
|
|
277
279
|
namespace,
|
|
278
280
|
workflow_name: workflowName,
|
|
@@ -286,7 +288,7 @@ export class UpstashStore extends MastraStorage {
|
|
|
286
288
|
workflowName: string;
|
|
287
289
|
runId: string;
|
|
288
290
|
}): Promise<WorkflowRunState | null> {
|
|
289
|
-
const { namespace, workflowName, runId } = params;
|
|
291
|
+
const { namespace = 'workflows', workflowName, runId } = params;
|
|
290
292
|
const key = this.getKey(MastraStorage.TABLE_WORKFLOW_SNAPSHOT, {
|
|
291
293
|
namespace,
|
|
292
294
|
workflow_name: workflowName,
|