@mastra/convex 1.6.0 → 1.6.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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +13 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/dist/storage/db/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -395,13 +395,19 @@ var ConvexDB = class extends _mastra_core_base.MastraBase {
|
|
|
395
395
|
return JSON.parse(context);
|
|
396
396
|
}
|
|
397
397
|
async mergeWorkflowState({ workflowName, runId, opts }) {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
398
|
+
let snapshot;
|
|
399
|
+
try {
|
|
400
|
+
snapshot = await this.client.callStorage({
|
|
401
|
+
op: "mergeWorkflowState",
|
|
402
|
+
tableName: _mastra_core_storage.TABLE_WORKFLOW_SNAPSHOT,
|
|
403
|
+
workflowName,
|
|
404
|
+
runId,
|
|
405
|
+
opts: JSON.stringify(opts)
|
|
406
|
+
});
|
|
407
|
+
} catch (error) {
|
|
408
|
+
if (error instanceof Error && error.message.startsWith("Workflow snapshot not found for runId")) return;
|
|
409
|
+
throw error;
|
|
410
|
+
}
|
|
405
411
|
if (snapshot === "") return;
|
|
406
412
|
if (!snapshot) throw new Error(`Convex workflow state merge returned no snapshot for runId ${runId}`);
|
|
407
413
|
return JSON.parse(snapshot);
|