@mastra/libsql 1.26.1-alpha.0 → 1.26.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/docs/references/docs-deployment-workers.md +1 -1
- package/dist/docs/references/docs-memory-multi-user-threads.md +1 -1
- package/dist/docs/references/reference-storage-composite.md +34 -0
- package/dist/docs/references/reference-vectors-libsql.md +1 -1
- package/dist/index.cjs +5 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -19
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/storage/factory-storage.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -15425,25 +15425,12 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends WorkflowsStorage {
|
|
|
15425
15425
|
sql: `SELECT json(snapshot) as snapshot FROM ${TABLE_WORKFLOW_SNAPSHOT} WHERE workflow_name = ? AND run_id = ?`,
|
|
15426
15426
|
args: [workflowName, runId]
|
|
15427
15427
|
});
|
|
15428
|
-
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
activePaths: [],
|
|
15432
|
-
timestamp: Date.now(),
|
|
15433
|
-
suspendedPaths: {},
|
|
15434
|
-
activeStepsPath: {},
|
|
15435
|
-
resumeLabels: {},
|
|
15436
|
-
serializedStepGraph: [],
|
|
15437
|
-
status: "pending",
|
|
15438
|
-
value: {},
|
|
15439
|
-
waitingPaths: {},
|
|
15440
|
-
runId,
|
|
15441
|
-
requestContext: {}
|
|
15442
|
-
};
|
|
15443
|
-
else {
|
|
15444
|
-
const existingSnapshot = existingSnapshotResult.rows[0].snapshot;
|
|
15445
|
-
snapshot = typeof existingSnapshot === "string" ? JSON.parse(existingSnapshot) : existingSnapshot;
|
|
15428
|
+
if (!existingSnapshotResult.rows?.[0]) {
|
|
15429
|
+
await tx.rollback();
|
|
15430
|
+
return {};
|
|
15446
15431
|
}
|
|
15432
|
+
const existingSnapshot = existingSnapshotResult.rows[0].snapshot;
|
|
15433
|
+
const snapshot = typeof existingSnapshot === "string" ? JSON.parse(existingSnapshot) : existingSnapshot;
|
|
15447
15434
|
mergeWorkflowStepResult({
|
|
15448
15435
|
snapshot,
|
|
15449
15436
|
stepId,
|
|
@@ -16479,7 +16466,6 @@ var LibSQLFactoryStorage = class extends FactoryStorage {
|
|
|
16479
16466
|
}
|
|
16480
16467
|
async withTransaction(fn) {
|
|
16481
16468
|
return withClientWriteLock(this.#client, async () => {
|
|
16482
|
-
if (this.#config.url.includes(":memory:")) return fn(new LibSQLFactoryStorageOps(this.#client, this.#schemas, runWithoutWriteLock));
|
|
16483
16469
|
const transaction = await this.#client.transaction("write");
|
|
16484
16470
|
try {
|
|
16485
16471
|
const result = await fn(new LibSQLFactoryStorageOps(transaction, this.#schemas, runWithoutWriteLock));
|