@gobing-ai/ts-db 0.5.27 → 0.5.29
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bun-sqlite.d.ts","sourceRoot":"","sources":["../../src/adapters/bun-sqlite.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAW,MAAM,wBAAwB,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAS5C;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,OAAO,CAAC,EAAE;QACN,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;CACL;AAWD;;GAEG;AACH,qBAAa,gBAAiB,YAAW,SAAS;IAC9C,OAAO,CAAC,MAAM,CAAW;IACzB,OAAO,CAAC,SAAS,CAAmC;IACpD;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA0C;IAEpE,OAAO,CAAC,YAAY;gBAUR,OAAO,CAAC,EAAE,gBAAgB;
|
|
1
|
+
{"version":3,"file":"bun-sqlite.d.ts","sourceRoot":"","sources":["../../src/adapters/bun-sqlite.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAW,MAAM,wBAAwB,CAAC;AACzE,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACnE,OAAO,KAAK,MAAM,MAAM,mBAAmB,CAAC;AAS5C;;GAEG;AACH,MAAM,WAAW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|
|
40
40
|
this.sqlite = new Database(dbPath, { create: true });
|
|
41
|
+
// busy_timeout FIRST: the journal_mode pragma below itself blocks (and throws
|
|
42
|
+
// SQLITE_BUSY without a busy handler) when another connection holds the file —
|
|
43
|
+
// e.g. a pipeline process with the DB open while a guard child opens the same DB
|
|
44
|
+
// (spur-new gate flake 2026-10-14, FeatureLifecycleAdapter strict-check child).
|
|
45
|
+
this.sqlite.run(pragmas.busyTimeout);
|
|
41
46
|
this.sqlite.run(pragmas.journalMode);
|
|
42
47
|
this.sqlite.run(pragmas.synchronous);
|
|
43
48
|
this.sqlite.run(pragmas.foreignKeys);
|
|
44
|
-
this.sqlite.run(pragmas.busyTimeout);
|
|
45
49
|
this.drizzleDb = drizzle({ client: this.sqlite, schema });
|
|
46
50
|
}
|
|
47
51
|
/** The internal typed drizzle database (ts-db DAO layer + migrations only). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gobing-ai/ts-db",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.29",
|
|
4
4
|
"description": "@gobing-ai/ts-db — a drizzle-free database facade: typed DAOs over Bun SQLite / Cloudflare D1, a small predicate query spec, single-source-of-truth tables, and migrations. Drizzle stays an internal detail.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"release": "echo 'Manual publish is disabled. Releases go through GitHub Actions via Trusted Publishing — push a tag: git tag @gobing-ai/ts-db-v<version> && git push --tags' && exit 1"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"@gobing-ai/ts-runtime": "^0.5.
|
|
70
|
-
"@gobing-ai/ts-utils": "^0.5.
|
|
69
|
+
"@gobing-ai/ts-runtime": "^0.5.29",
|
|
70
|
+
"@gobing-ai/ts-utils": "^0.5.29"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"drizzle-orm": ">=0.38.0",
|
|
@@ -69,10 +69,14 @@ export class BunSqliteAdapter implements DbAdapter {
|
|
|
69
69
|
|
|
70
70
|
this.sqlite = new Database(dbPath, { create: true });
|
|
71
71
|
|
|
72
|
+
// busy_timeout FIRST: the journal_mode pragma below itself blocks (and throws
|
|
73
|
+
// SQLITE_BUSY without a busy handler) when another connection holds the file —
|
|
74
|
+
// e.g. a pipeline process with the DB open while a guard child opens the same DB
|
|
75
|
+
// (spur-new gate flake 2026-10-14, FeatureLifecycleAdapter strict-check child).
|
|
76
|
+
this.sqlite.run(pragmas.busyTimeout);
|
|
72
77
|
this.sqlite.run(pragmas.journalMode);
|
|
73
78
|
this.sqlite.run(pragmas.synchronous);
|
|
74
79
|
this.sqlite.run(pragmas.foreignKeys);
|
|
75
|
-
this.sqlite.run(pragmas.busyTimeout);
|
|
76
80
|
|
|
77
81
|
this.drizzleDb = drizzle({ client: this.sqlite, schema });
|
|
78
82
|
}
|