@mastra/dynamodb 1.4.0 → 1.4.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-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.4.0"
6
+ version: "1.4.1"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.4.0",
2
+ "version": "1.4.1",
3
3
  "package": "@mastra/dynamodb",
4
4
  "exports": {},
5
5
  "modules": {}
package/dist/index.cjs CHANGED
@@ -2622,7 +2622,7 @@ var WorkflowStorageDynamoDB = class extends _mastra_core_storage.WorkflowsStorag
2622
2622
  const jitter = Math.random() * backoff * .5;
2623
2623
  await new Promise((resolve) => setTimeout(resolve, backoff + jitter));
2624
2624
  }
2625
- async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext }) {
2625
+ async updateWorkflowResults({ workflowName, runId, stepId, result, requestContext, state }) {
2626
2626
  for (let attempt = 0; attempt < MAX_RETRIES; attempt++) try {
2627
2627
  const existingRecord = await this.service.entities.workflow_snapshot.get({
2628
2628
  entity: "workflow_snapshot",
@@ -2651,6 +2651,7 @@ var WorkflowStorageDynamoDB = class extends _mastra_core_storage.WorkflowsStorag
2651
2651
  previousUpdatedAt = existingRecord.data.updatedAt;
2652
2652
  }
2653
2653
  snapshot.context[stepId] = result;
2654
+ if (state !== void 0) snapshot.context.__state = state;
2654
2655
  snapshot.requestContext = {
2655
2656
  ...snapshot.requestContext,
2656
2657
  ...requestContext