@aigne/sqlite 0.1.1 → 0.3.0
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/CHANGELOG.md +14 -0
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.node.d.ts +1 -1
- package/lib/cjs/index.node.js +7 -1
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.node.d.ts +1 -1
- package/lib/esm/index.node.js +7 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.3.0](https://github.com/AIGNE-io/aigne-framework/compare/sqlite-v0.2.0...sqlite-v0.3.0) (2025-07-04)
|
4
|
+
|
5
|
+
|
6
|
+
### Features
|
7
|
+
|
8
|
+
* **core:** add standard userId/sessionId in userContext ([#219](https://github.com/AIGNE-io/aigne-framework/issues/219)) ([58e5804](https://github.com/AIGNE-io/aigne-framework/commit/58e5804cf08b1d2fa6e232646fadd70b5db2e007))
|
9
|
+
|
10
|
+
## [0.2.0](https://github.com/AIGNE-io/aigne-framework/compare/sqlite-v0.1.1...sqlite-v0.2.0) (2025-07-03)
|
11
|
+
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
* upgrade dependencies and adapt code to breaking changes ([#216](https://github.com/AIGNE-io/aigne-framework/issues/216)) ([f215ced](https://github.com/AIGNE-io/aigne-framework/commit/f215cedc1a57e321164064c33316e496eae8d25f))
|
16
|
+
|
3
17
|
## [0.1.1](https://github.com/AIGNE-io/aigne-framework/compare/sqlite-v0.1.0...sqlite-v0.1.1) (2025-06-05)
|
4
18
|
|
5
19
|
|
package/lib/cjs/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export interface InitDatabaseOptions {
|
2
2
|
url?: string;
|
3
|
+
wal?: boolean;
|
3
4
|
}
|
4
5
|
export declare function initDatabase(options?: InitDatabaseOptions): Promise<import("drizzle-orm/libsql/driver-core.js").LibSQLDatabase<Record<string, never>> | import("drizzle-orm/sqlite-proxy/driver.js").SqliteRemoteDatabase<Record<string, never>>>;
|
package/lib/cjs/index.node.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
import { type LibSQLDatabase } from "drizzle-orm/libsql";
|
2
2
|
import type { InitDatabaseOptions } from "./index.js";
|
3
|
-
export declare function initDatabase({ url, }?: InitDatabaseOptions): Promise<LibSQLDatabase>;
|
3
|
+
export declare function initDatabase({ url, wal, }?: InitDatabaseOptions): Promise<LibSQLDatabase>;
|
package/lib/cjs/index.node.js
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.initDatabase = initDatabase;
|
4
|
+
const client_1 = require("@libsql/client");
|
4
5
|
const libsql_1 = require("drizzle-orm/libsql");
|
5
|
-
async function initDatabase({ url = ":memory:", } = {}) {
|
6
|
+
async function initDatabase({ url = ":memory:", wal = false, } = {}) {
|
7
|
+
if (wal) {
|
8
|
+
const client = (0, client_1.createClient)({ url });
|
9
|
+
await client.execute("PRAGMA journal_mode=WAL;");
|
10
|
+
return (0, libsql_1.drizzle)(client);
|
11
|
+
}
|
6
12
|
return (0, libsql_1.drizzle)(url);
|
7
13
|
}
|
package/lib/esm/index.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
export interface InitDatabaseOptions {
|
2
2
|
url?: string;
|
3
|
+
wal?: boolean;
|
3
4
|
}
|
4
5
|
export declare function initDatabase(options?: InitDatabaseOptions): Promise<import("drizzle-orm/libsql").LibSQLDatabase<Record<string, never>> | import("drizzle-orm/sqlite-proxy").SqliteRemoteDatabase<Record<string, never>>>;
|
package/lib/esm/index.node.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
import { type LibSQLDatabase } from "drizzle-orm/libsql";
|
2
2
|
import type { InitDatabaseOptions } from "./index.js";
|
3
|
-
export declare function initDatabase({ url, }?: InitDatabaseOptions): Promise<LibSQLDatabase>;
|
3
|
+
export declare function initDatabase({ url, wal, }?: InitDatabaseOptions): Promise<LibSQLDatabase>;
|
package/lib/esm/index.node.js
CHANGED
@@ -1,4 +1,10 @@
|
|
1
|
+
import { createClient } from "@libsql/client";
|
1
2
|
import { drizzle } from "drizzle-orm/libsql";
|
2
|
-
export async function initDatabase({ url = ":memory:", } = {}) {
|
3
|
+
export async function initDatabase({ url = ":memory:", wal = false, } = {}) {
|
4
|
+
if (wal) {
|
5
|
+
const client = createClient({ url });
|
6
|
+
await client.execute("PRAGMA journal_mode=WAL;");
|
7
|
+
return drizzle(client);
|
8
|
+
}
|
3
9
|
return drizzle(url);
|
4
10
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@aigne/sqlite",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.3.0",
|
4
4
|
"description": "AIGNE SQLite database library for building AI-powered applications",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -45,13 +45,13 @@
|
|
45
45
|
}
|
46
46
|
},
|
47
47
|
"dependencies": {
|
48
|
-
"@libsql/client": "^0.15.
|
49
|
-
"drizzle-orm": "^0.
|
48
|
+
"@libsql/client": "^0.15.9",
|
49
|
+
"drizzle-orm": "^0.44.2",
|
50
50
|
"sqlocal": "^0.14.1"
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
53
|
-
"@types/bun": "^1.2.
|
54
|
-
"@types/node": "^
|
53
|
+
"@types/bun": "^1.2.17",
|
54
|
+
"@types/node": "^24.0.10",
|
55
55
|
"npm-run-all": "^4.1.5",
|
56
56
|
"rimraf": "^6.0.1",
|
57
57
|
"typescript": "^5.8.3"
|