@mastra/pg 1.31.1-alpha.0 → 1.31.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/dist/index.js CHANGED
@@ -25127,25 +25127,9 @@ var WorkflowsPG = class WorkflowsPG extends WorkflowsStorage {
25127
25127
  schemaName: getSchemaName(this.#schema)
25128
25128
  });
25129
25129
  const existingSnapshotResult = await t.oneOrNone(`SELECT snapshot FROM ${tableName} WHERE workflow_name = $1 AND run_id = $2 FOR UPDATE`, [workflowName, runId]);
25130
- let snapshot;
25131
- if (!existingSnapshotResult) snapshot = {
25132
- context: {},
25133
- activePaths: [],
25134
- timestamp: Date.now(),
25135
- suspendedPaths: {},
25136
- activeStepsPath: {},
25137
- resumeLabels: {},
25138
- serializedStepGraph: [],
25139
- status: "pending",
25140
- value: {},
25141
- waitingPaths: {},
25142
- runId,
25143
- requestContext: {}
25144
- };
25145
- else {
25146
- const existingSnapshot = existingSnapshotResult.snapshot;
25147
- snapshot = typeof existingSnapshot === "string" ? JSON.parse(existingSnapshot) : existingSnapshot;
25148
- }
25130
+ if (!existingSnapshotResult) return {};
25131
+ const existingSnapshot = existingSnapshotResult.snapshot;
25132
+ const snapshot = typeof existingSnapshot === "string" ? JSON.parse(existingSnapshot) : existingSnapshot;
25149
25133
  mergeWorkflowStepResult({
25150
25134
  snapshot,
25151
25135
  stepId,