@mastra/dynamodb 1.1.0-alpha.0 → 1.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 +20 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +21 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +21 -3
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @mastra/dynamodb
|
|
2
2
|
|
|
3
|
+
## 1.1.1-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed workflow runs preserving their original creation time when re-persisted in DynamoDB storage, including concurrent saves. ([#18004](https://github.com/mastra-ai/mastra/pull/18004))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`bf3fe49`](https://github.com/mastra-ai/mastra/commit/bf3fe49f9467dbbdb8f9eaf74e0f7971ffb19559), [`24ceaea`](https://github.com/mastra-ai/mastra/commit/24ceaea0bdd8609cabbab764380608ca6621a194), [`6ccf67b`](https://github.com/mastra-ai/mastra/commit/6ccf67bf075753754927a57bc2e1734ba2c820c5), [`825d8de`](https://github.com/mastra-ai/mastra/commit/825d8def9fa64c2bcc3d8dd6b49e09342c3ac5c7), [`ffa09e7`](https://github.com/mastra-ai/mastra/commit/ffa09e772a5c92270eabe2090fc42d45bd8ec4b7), [`461a7c5`](https://github.com/mastra-ai/mastra/commit/461a7c501449295287f4f0ee4b0b42344f39fcf8), [`4211472`](https://github.com/mastra-ai/mastra/commit/4211472a5a2bd319c60cd2e42d9109c3eef7ac1c), [`9e45902`](https://github.com/mastra-ai/mastra/commit/9e4590208e745055cecca202e2db0e5c65e17d3c), [`5c0df77`](https://github.com/mastra-ai/mastra/commit/5c0df776c40efa420f8c07a2f3ee66010296618e)]:
|
|
10
|
+
- @mastra/core@1.47.0-alpha.3
|
|
11
|
+
|
|
12
|
+
## 1.1.0
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- Random bump ([#18178](https://github.com/mastra-ai/mastra/pull/18178))
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`7c0d868`](https://github.com/mastra-ai/mastra/commit/7c0d868d97d0fdbc04c14d0166dbf44d4c5a4a62), [`d9d2273`](https://github.com/mastra-ai/mastra/commit/d9d2273c702690c9a26eab2aebea879701d4355a), [`b04369d`](https://github.com/mastra-ai/mastra/commit/b04369d6b167c698ef103981171a8bf92808e756), [`8f3c262`](https://github.com/mastra-ai/mastra/commit/8f3c262587b335588a02d96b17fd6aca34c885b3)]:
|
|
21
|
+
- @mastra/core@1.45.0
|
|
22
|
+
|
|
3
23
|
## 1.1.0-alpha.0
|
|
4
24
|
|
|
5
25
|
### Minor Changes
|
package/dist/docs/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: mastra-dynamodb
|
|
|
3
3
|
description: Documentation for @mastra/dynamodb. Use when working with @mastra/dynamodb APIs, configuration, or implementation.
|
|
4
4
|
metadata:
|
|
5
5
|
package: "@mastra/dynamodb"
|
|
6
|
-
version: "1.1.
|
|
6
|
+
version: "1.1.1-alpha.0"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## When to use
|
package/dist/index.cjs
CHANGED
|
@@ -2782,17 +2782,35 @@ var WorkflowStorageDynamoDB = class extends storage.WorkflowsStorage {
|
|
|
2782
2782
|
this.logger.debug("Persisting workflow snapshot", { workflowName, runId });
|
|
2783
2783
|
try {
|
|
2784
2784
|
const now = /* @__PURE__ */ new Date();
|
|
2785
|
+
const createdAtValue = (createdAt ?? now).toISOString();
|
|
2786
|
+
const updatedAtValue = (updatedAt ?? now).toISOString();
|
|
2785
2787
|
const data = {
|
|
2786
2788
|
entity: "workflow_snapshot",
|
|
2787
2789
|
workflow_name: workflowName,
|
|
2788
2790
|
run_id: runId,
|
|
2789
2791
|
snapshot: JSON.stringify(snapshot),
|
|
2790
|
-
createdAt:
|
|
2791
|
-
updatedAt:
|
|
2792
|
+
createdAt: createdAtValue,
|
|
2793
|
+
updatedAt: updatedAtValue,
|
|
2792
2794
|
resourceId,
|
|
2793
2795
|
...getTtlProps("workflow_snapshot", this.ttlConfig)
|
|
2794
2796
|
};
|
|
2795
|
-
|
|
2797
|
+
try {
|
|
2798
|
+
await this.service.entities.workflow_snapshot.create(data).where((attr, op) => op.notExists(attr.run_id)).go();
|
|
2799
|
+
} catch (error) {
|
|
2800
|
+
if (!this.isConditionalCheckFailed(error)) {
|
|
2801
|
+
throw error;
|
|
2802
|
+
}
|
|
2803
|
+
await this.service.entities.workflow_snapshot.update({
|
|
2804
|
+
entity: "workflow_snapshot",
|
|
2805
|
+
workflow_name: workflowName,
|
|
2806
|
+
run_id: runId
|
|
2807
|
+
}).set({
|
|
2808
|
+
snapshot: JSON.stringify(snapshot),
|
|
2809
|
+
updatedAt: updatedAtValue,
|
|
2810
|
+
resourceId,
|
|
2811
|
+
...getTtlProps("workflow_snapshot", this.ttlConfig)
|
|
2812
|
+
}).go();
|
|
2813
|
+
}
|
|
2796
2814
|
} catch (error$1) {
|
|
2797
2815
|
throw new error.MastraError(
|
|
2798
2816
|
{
|