@moltendb-web/query 0.4.0 → 0.5.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/README.md +7 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -25,12 +25,12 @@ import { MoltenDB } from '@moltendb-web/core';
|
|
|
25
25
|
import { MoltenDBClient, WorkerTransport } from '@moltendb-web/query';
|
|
26
26
|
|
|
27
27
|
// 1. Initialize the Core Engine (boots WASM worker)
|
|
28
|
-
const
|
|
29
|
-
const db = new MoltenDB('moltendb_demo', { syncEnabled: false, workerUrl });
|
|
28
|
+
const db = new MoltenDB('moltendb_demo');
|
|
30
29
|
await db.init();
|
|
31
30
|
|
|
32
31
|
// 2. Connect the Query Builder to the worker
|
|
33
|
-
const client = new MoltenDBClient(
|
|
32
|
+
const client = new MoltenDBClient(db);
|
|
33
|
+
|
|
34
34
|
// SET — insert / upsert
|
|
35
35
|
await client.collection('laptops')
|
|
36
36
|
.set({
|
|
@@ -214,7 +214,7 @@ class FetchTransport implements MoltenTransport {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
const db = new MoltenDBClient(new FetchTransport('https://
|
|
217
|
+
const db = new MoltenDBClient(new FetchTransport('[https://api.mydomain.com](https://api.mydomain.com)', myToken));
|
|
218
218
|
```
|
|
219
219
|
|
|
220
220
|
---
|
|
@@ -222,7 +222,9 @@ const db = new MoltenDBClient(new FetchTransport('https://localhost:1538', myTok
|
|
|
222
222
|
## Build
|
|
223
223
|
|
|
224
224
|
```bash
|
|
225
|
-
npm run
|
|
225
|
+
npm run build # Builds CJS, ESM, and type declarations
|
|
226
|
+
npm run typecheck # Type-check without emitting
|
|
227
|
+
npm run test # Run the Jest test suite
|
|
226
228
|
```
|
|
227
229
|
|
|
228
230
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moltendb-web/query",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Type-safe query builder for MoltenDB — chainable API for get, set, update and delete operations.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -28,6 +28,6 @@
|
|
|
28
28
|
"keywords": ["moltendb", "database", "query-builder", "nosql", "wasm"],
|
|
29
29
|
"license": "MIT OR Apache-2.0",
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"typescript": "^6.0.
|
|
31
|
+
"typescript": "^6.0.2"
|
|
32
32
|
}
|
|
33
33
|
}
|