zam-core 0.3.1 → 0.3.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/dist/index.js CHANGED
@@ -157,6 +157,8 @@ function openDatabaseWithSync(options = {}) {
157
157
  const syncUrl = db.prepare("SELECT value FROM user_config WHERE key = ?").get("turso.url");
158
158
  const authToken = db.prepare("SELECT value FROM user_config WHERE key = ?").get("turso.token");
159
159
  if (!syncUrl || !authToken) return db;
160
+ db.pragma("wal_checkpoint(TRUNCATE)");
161
+ db.pragma("journal_mode = DELETE");
160
162
  db.close();
161
163
  return openDatabase({ ...options, syncUrl: syncUrl.value, authToken: authToken.value });
162
164
  }