@storecraft/database-turso 1.0.10 → 1.0.11
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/README.md +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
@@ -5,7 +5,8 @@
|
|
5
5
|
width='90%' />
|
6
6
|
</div><hr/><br/>
|
7
7
|
|
8
|
-
Official `
|
8
|
+
Official `libSql` / `Turso` driver for `StoreCraft` on any platforms.
|
9
|
+
Includes a vector store.
|
9
10
|
|
10
11
|
```bash
|
11
12
|
npm i @storecraft/database-turso
|
@@ -29,7 +30,7 @@ import http from "node:http";
|
|
29
30
|
import { App } from '@storecraft/core'
|
30
31
|
import { NodePlatform } from '@storecraft/core/platform/node';
|
31
32
|
import { NodeLocalStorage } from '@storecraft/core/storage/node'
|
32
|
-
import { Turso } from '@storecraft/database-turso'
|
33
|
+
import { Turso, LibSQLVectorStore } from '@storecraft/database-turso'
|
33
34
|
import { migrateToLatest } from '@storecraft/database-turso/migrate.js'
|
34
35
|
|
35
36
|
const app = new App(
|
@@ -53,6 +54,13 @@ const app = new App(
|
|
53
54
|
)
|
54
55
|
)
|
55
56
|
.withStorage(new NodeLocalStorage('storage'))
|
57
|
+
.withVectorStore(
|
58
|
+
new LibSQLVectorStore(
|
59
|
+
{
|
60
|
+
embedder: new OpenAIEmbedder()
|
61
|
+
}
|
62
|
+
)
|
63
|
+
)
|
56
64
|
|
57
65
|
await app.init();
|
58
66
|
await migrateToLatest(app.db, false);
|
package/package.json
CHANGED