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