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/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -165,6 +165,8 @@ function openDatabaseWithSync(options = {}) {
|
|
|
165
165
|
const syncUrl = db.prepare("SELECT value FROM user_config WHERE key = ?").get("turso.url");
|
|
166
166
|
const authToken = db.prepare("SELECT value FROM user_config WHERE key = ?").get("turso.token");
|
|
167
167
|
if (!syncUrl || !authToken) return db;
|
|
168
|
+
db.pragma("wal_checkpoint(TRUNCATE)");
|
|
169
|
+
db.pragma("journal_mode = DELETE");
|
|
168
170
|
db.close();
|
|
169
171
|
return openDatabase({ ...options, syncUrl: syncUrl.value, authToken: authToken.value });
|
|
170
172
|
}
|