@mastra/libsql 1.30.0-alpha.1 → 1.30.0-alpha.3
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 +29 -29
- package/dist/index.cjs +24 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -4
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/schedules/index.d.ts.map +1 -1
- package/dist/storage/domains/workflows/index.d.ts.map +1 -1
- package/dist/vector/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1447,8 +1447,9 @@ var LibSQLVector = class extends MastraVector {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
1449
|
async _doTruncateIndex({ indexName }) {
|
|
1450
|
+
const parsedIndexName = parseSqlIdentifier(indexName, "index name");
|
|
1450
1451
|
await this.turso.execute({
|
|
1451
|
-
sql: `DELETE FROM ${
|
|
1452
|
+
sql: `DELETE FROM ${parsedIndexName} WHERE rowid IS NOT NULL`,
|
|
1452
1453
|
args: []
|
|
1453
1454
|
});
|
|
1454
1455
|
}
|
|
@@ -12989,6 +12990,8 @@ function rowToSchedule(row) {
|
|
|
12989
12990
|
if (metadata !== void 0) schedule.metadata = metadata;
|
|
12990
12991
|
if (row.owner_type != null) schedule.ownerType = String(row.owner_type);
|
|
12991
12992
|
if (row.owner_id != null) schedule.ownerId = String(row.owner_id);
|
|
12993
|
+
if (row.run_at != null) schedule.runAt = toNumber(row.run_at);
|
|
12994
|
+
if (row.end_at != null) schedule.endAt = toNumber(row.end_at);
|
|
12992
12995
|
return schedule;
|
|
12993
12996
|
}
|
|
12994
12997
|
function rowToTrigger(row) {
|
|
@@ -13037,6 +13040,15 @@ var SchedulesLibSQL = class SchedulesLibSQL extends SchedulesStorage {
|
|
|
13037
13040
|
tableName: TABLE_SCHEDULES,
|
|
13038
13041
|
schema: TABLE_SCHEMAS[TABLE_SCHEDULES]
|
|
13039
13042
|
});
|
|
13043
|
+
for (const column of ["run_at", "end_at"]) try {
|
|
13044
|
+
await this.#db.alterTable({
|
|
13045
|
+
tableName: TABLE_SCHEDULES,
|
|
13046
|
+
schema: TABLE_SCHEMAS[TABLE_SCHEDULES],
|
|
13047
|
+
ifNotExists: [column]
|
|
13048
|
+
});
|
|
13049
|
+
} catch (error) {
|
|
13050
|
+
if (!await this.#db.hasColumn(TABLE_SCHEDULES, column)) throw error;
|
|
13051
|
+
}
|
|
13040
13052
|
await this.#db.createTable({
|
|
13041
13053
|
tableName: TABLE_SCHEDULE_TRIGGERS,
|
|
13042
13054
|
schema: TABLE_SCHEMAS[TABLE_SCHEDULE_TRIGGERS]
|
|
@@ -13130,7 +13142,9 @@ var SchedulesLibSQL = class SchedulesLibSQL extends SchedulesStorage {
|
|
|
13130
13142
|
updated_at: schedule.updatedAt,
|
|
13131
13143
|
metadata: schedule.metadata ?? null,
|
|
13132
13144
|
owner_type: schedule.ownerType ?? null,
|
|
13133
|
-
owner_id: schedule.ownerId ?? null
|
|
13145
|
+
owner_id: schedule.ownerId ?? null,
|
|
13146
|
+
run_at: schedule.runAt ?? null,
|
|
13147
|
+
end_at: schedule.endAt ?? null
|
|
13134
13148
|
}
|
|
13135
13149
|
});
|
|
13136
13150
|
return schedule;
|
|
@@ -13222,6 +13236,14 @@ var SchedulesLibSQL = class SchedulesLibSQL extends SchedulesStorage {
|
|
|
13222
13236
|
setClauses.push("owner_id = ?");
|
|
13223
13237
|
params.push(patch.ownerId ?? null);
|
|
13224
13238
|
}
|
|
13239
|
+
if ("runAt" in patch) {
|
|
13240
|
+
setClauses.push("run_at = ?");
|
|
13241
|
+
params.push(patch.runAt ?? null);
|
|
13242
|
+
}
|
|
13243
|
+
if ("endAt" in patch) {
|
|
13244
|
+
setClauses.push("end_at = ?");
|
|
13245
|
+
params.push(patch.endAt ?? null);
|
|
13246
|
+
}
|
|
13225
13247
|
setClauses.push("updated_at = ?");
|
|
13226
13248
|
params.push(Date.now());
|
|
13227
13249
|
params.push(id);
|
|
@@ -16040,8 +16062,6 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends WorkflowsStorage {
|
|
|
16040
16062
|
}
|
|
16041
16063
|
async setupPragmaSettings() {
|
|
16042
16064
|
try {
|
|
16043
|
-
await this.#client.execute("PRAGMA busy_timeout = 10000;");
|
|
16044
|
-
this.logger.debug("LibSQL Workflows: PRAGMA busy_timeout=10000 set.");
|
|
16045
16065
|
try {
|
|
16046
16066
|
await this.#client.execute("PRAGMA journal_mode = WAL;");
|
|
16047
16067
|
this.logger.debug("LibSQL Workflows: PRAGMA journal_mode=WAL set.");
|