@mastra/libsql 1.14.1 → 1.14.2
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 +18 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +16 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -13
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -12041,19 +12041,22 @@ var WorkflowsLibSQL = class extends WorkflowsStorage {
|
|
|
12041
12041
|
updatedAt
|
|
12042
12042
|
}) {
|
|
12043
12043
|
const now = /* @__PURE__ */ new Date();
|
|
12044
|
-
const
|
|
12045
|
-
|
|
12046
|
-
|
|
12047
|
-
|
|
12048
|
-
|
|
12049
|
-
|
|
12050
|
-
|
|
12051
|
-
|
|
12052
|
-
|
|
12053
|
-
|
|
12054
|
-
|
|
12055
|
-
|
|
12056
|
-
|
|
12044
|
+
const createdAtValue = (createdAt ?? now).toISOString();
|
|
12045
|
+
const updatedAtValue = (updatedAt ?? now).toISOString();
|
|
12046
|
+
this.logger.debug("Persisting workflow snapshot", { workflowName, runId });
|
|
12047
|
+
await this.executeWithRetry(
|
|
12048
|
+
() => withClientWriteLock(
|
|
12049
|
+
this.#client,
|
|
12050
|
+
() => this.#client.execute({
|
|
12051
|
+
sql: `INSERT INTO ${TABLE_WORKFLOW_SNAPSHOT} (workflow_name, run_id, resourceId, snapshot, createdAt, updatedAt)
|
|
12052
|
+
VALUES (?, ?, ?, jsonb(?), ?, ?)
|
|
12053
|
+
ON CONFLICT(workflow_name, run_id)
|
|
12054
|
+
DO UPDATE SET resourceId = excluded.resourceId, snapshot = excluded.snapshot, updatedAt = excluded.updatedAt`,
|
|
12055
|
+
args: [workflowName, runId, resourceId ?? null, safeStringify(snapshot), createdAtValue, updatedAtValue]
|
|
12056
|
+
})
|
|
12057
|
+
),
|
|
12058
|
+
"persistWorkflowSnapshot"
|
|
12059
|
+
);
|
|
12057
12060
|
}
|
|
12058
12061
|
async loadWorkflowSnapshot({
|
|
12059
12062
|
workflowName,
|