@mastra/libsql 1.30.0-alpha.2 → 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 +14 -14
- package/dist/index.cjs +22 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -3
- 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/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -12990,6 +12990,8 @@ function rowToSchedule(row) {
|
|
|
12990
12990
|
if (metadata !== void 0) schedule.metadata = metadata;
|
|
12991
12991
|
if (row.owner_type != null) schedule.ownerType = String(row.owner_type);
|
|
12992
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);
|
|
12993
12995
|
return schedule;
|
|
12994
12996
|
}
|
|
12995
12997
|
function rowToTrigger(row) {
|
|
@@ -13038,6 +13040,15 @@ var SchedulesLibSQL = class SchedulesLibSQL extends SchedulesStorage {
|
|
|
13038
13040
|
tableName: TABLE_SCHEDULES,
|
|
13039
13041
|
schema: TABLE_SCHEMAS[TABLE_SCHEDULES]
|
|
13040
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
|
+
}
|
|
13041
13052
|
await this.#db.createTable({
|
|
13042
13053
|
tableName: TABLE_SCHEDULE_TRIGGERS,
|
|
13043
13054
|
schema: TABLE_SCHEMAS[TABLE_SCHEDULE_TRIGGERS]
|
|
@@ -13131,7 +13142,9 @@ var SchedulesLibSQL = class SchedulesLibSQL extends SchedulesStorage {
|
|
|
13131
13142
|
updated_at: schedule.updatedAt,
|
|
13132
13143
|
metadata: schedule.metadata ?? null,
|
|
13133
13144
|
owner_type: schedule.ownerType ?? null,
|
|
13134
|
-
owner_id: schedule.ownerId ?? null
|
|
13145
|
+
owner_id: schedule.ownerId ?? null,
|
|
13146
|
+
run_at: schedule.runAt ?? null,
|
|
13147
|
+
end_at: schedule.endAt ?? null
|
|
13135
13148
|
}
|
|
13136
13149
|
});
|
|
13137
13150
|
return schedule;
|
|
@@ -13223,6 +13236,14 @@ var SchedulesLibSQL = class SchedulesLibSQL extends SchedulesStorage {
|
|
|
13223
13236
|
setClauses.push("owner_id = ?");
|
|
13224
13237
|
params.push(patch.ownerId ?? null);
|
|
13225
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
|
+
}
|
|
13226
13247
|
setClauses.push("updated_at = ?");
|
|
13227
13248
|
params.push(Date.now());
|
|
13228
13249
|
params.push(id);
|
|
@@ -16041,8 +16062,6 @@ var WorkflowsLibSQL = class WorkflowsLibSQL extends WorkflowsStorage {
|
|
|
16041
16062
|
}
|
|
16042
16063
|
async setupPragmaSettings() {
|
|
16043
16064
|
try {
|
|
16044
|
-
await this.#client.execute("PRAGMA busy_timeout = 10000;");
|
|
16045
|
-
this.logger.debug("LibSQL Workflows: PRAGMA busy_timeout=10000 set.");
|
|
16046
16065
|
try {
|
|
16047
16066
|
await this.#client.execute("PRAGMA journal_mode = WAL;");
|
|
16048
16067
|
this.logger.debug("LibSQL Workflows: PRAGMA journal_mode=WAL set.");
|