@concavejs/docstore-better-sqlite3 0.0.1-alpha.10

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.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * SQLite-based DocStore implementation using better-sqlite3
3
+ *
4
+ * Implements full MVCC (Multi-Version Concurrency Control) document storage
5
+ * using better-sqlite3's synchronous API. Compatible with Electron and
6
+ * standard Node.js environments without --experimental-sqlite.
7
+ */
8
+ import { BaseSqliteDocStore } from "@concavejs/docstore-sqlite-base";
9
+ export type SqliteDurabilityMode = "balanced" | "strict";
10
+ export interface SqliteDocStoreOptions {
11
+ durability?: SqliteDurabilityMode;
12
+ }
13
+ /**
14
+ * better-sqlite3 DocStore with MVCC support
15
+ */
16
+ export declare class SqliteDocStore extends BaseSqliteDocStore {
17
+ private db;
18
+ constructor(dbPath?: string, options?: SqliteDocStoreOptions);
19
+ close(): Promise<void>;
20
+ }
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "@concavejs/docstore-better-sqlite3",
3
+ "version": "0.0.1-alpha.10",
4
+ "license": "FSL-1.1-Apache-2.0",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "type": "module",
9
+ "description": "SQLite document storage for Concave using better-sqlite3 (Electron-compatible)",
10
+ "types": "./dist/index.d.ts",
11
+ "exports": {
12
+ ".": {
13
+ "types": "./dist/index.d.ts",
14
+ "default": "./dist/index.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist"
19
+ ],
20
+ "scripts": {
21
+ "build": "rm -rf dist && bun build ./src/index.ts --outfile dist/index.js --target node --format esm --external better-sqlite3 && tsc -p tsconfig.json --emitDeclarationOnly --declaration --declarationMap false --outDir dist",
22
+ "test": "vitest --run --passWithNoTests"
23
+ },
24
+ "dependencies": {
25
+ "@concavejs/core": "0.0.1-alpha.10",
26
+ "@concavejs/docstore-sqlite-base": "0.0.1-alpha.10",
27
+ "better-sqlite3": "^11.0.0",
28
+ "convex": "^1.27.3"
29
+ },
30
+ "devDependencies": {
31
+ "@types/better-sqlite3": "^7.6.12",
32
+ "@types/node": "^24.9.1"
33
+ }
34
+ }