@agi-cli/database 0.1.86 → 0.1.87
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/package.json +2 -2
- package/src/index.ts +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agi-cli/database",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.87",
|
|
4
4
|
"description": "Database and persistence layer for AGI CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"typecheck": "tsc --noEmit"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@agi-cli/sdk": "0.1.
|
|
25
|
+
"@agi-cli/sdk": "0.1.87",
|
|
26
26
|
"drizzle-orm": "^0.44.5"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -17,6 +17,11 @@ export async function getDb(projectRootInput?: string) {
|
|
|
17
17
|
if (cached) return cached;
|
|
18
18
|
|
|
19
19
|
const sqlite = new Database(dbPath, { create: true });
|
|
20
|
+
|
|
21
|
+
sqlite.exec('PRAGMA journal_mode = WAL');
|
|
22
|
+
sqlite.exec('PRAGMA busy_timeout = 5000');
|
|
23
|
+
sqlite.exec('PRAGMA synchronous = NORMAL');
|
|
24
|
+
|
|
20
25
|
const db = drizzle(sqlite, { schema });
|
|
21
26
|
|
|
22
27
|
// Run migrations once per db path (apply any not yet applied)
|