@noy-db/in-devtools 0.3.0-pre.8 → 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/README.md +41 -0
- package/package.json +6 -5
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# @noy-db/in-devtools
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@noy-db/in-devtools)
|
|
4
|
+
|
|
5
|
+
> Framework-agnostic, read-only inspector for a live [noy-db](https://github.com/vLannaAi/noy-db) — vaults, collections, schema, stats, records, and live writes.
|
|
6
|
+
|
|
7
|
+
Part of [**`@noy-db/hub`**](https://www.npmjs.com/package/@noy-db/hub) — the zero-knowledge, offline-first, encrypted document store.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @noy-db/hub @noy-db/in-devtools
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## What it is
|
|
16
|
+
|
|
17
|
+
`createInspector(db, { meter? })` turns a live `Noydb` instance into serializable, read-only views for a CLI, a browser panel, or the terminal TUI ([`@noy-db/in-devtools-tui`](https://www.npmjs.com/package/@noy-db/in-devtools-tui)). It is a pure consumer of public hub APIs — read-only and zero-knowledge-respecting: it never holds passphrases and shows only what the caller's unlocked session can already read.
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { createInspector } from '@noy-db/in-devtools'
|
|
21
|
+
|
|
22
|
+
const inspector = createInspector(db)
|
|
23
|
+
|
|
24
|
+
inspector.listVaults() // accessible vaults
|
|
25
|
+
inspector.snapshot(vault) // collections: fields, indexes, refs, stats
|
|
26
|
+
inspector.records(vault, 'invoices', { limit: 50 }) // page decrypted rows (default 50, ceiling 500)
|
|
27
|
+
inspector.subscribe((e) => console.log(e)) // live write events
|
|
28
|
+
inspector.pendingWrites() // write-queue state
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Pass a [`@noy-db/to-meter`](https://www.npmjs.com/package/@noy-db/to-meter) handle as `meter` to also expose `meterSnapshot()`.
|
|
32
|
+
|
|
33
|
+
## Documentation
|
|
34
|
+
|
|
35
|
+
- Guide — [`content/docs/families/in/devtools.md`](https://github.com/vLannaAi/noy-db-docs/blob/main/content/docs/families/in/devtools.md)
|
|
36
|
+
- Source — [`packages/in-devtools`](https://github.com/vLannaAi/noy-db/tree/main/packages/in-devtools)
|
|
37
|
+
- Issues — [github.com/vLannaAi/noy-db/issues](https://github.com/vLannaAi/noy-db/issues)
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@noy-db/in-devtools",
|
|
3
|
-
"version": "0.3.0
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Framework-agnostic read-only inspector for a live noy-db — vaults, collections, schema, stats, records, and live writes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -13,14 +13,15 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
|
-
"dist"
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
17
18
|
],
|
|
18
19
|
"peerDependencies": {
|
|
19
|
-
"@noy-db/hub": "0.3.0
|
|
20
|
+
"@noy-db/hub": "0.3.0"
|
|
20
21
|
},
|
|
21
22
|
"devDependencies": {
|
|
22
|
-
"@noy-db/
|
|
23
|
-
"@noy-db/
|
|
23
|
+
"@noy-db/to-meter": "0.3.0",
|
|
24
|
+
"@noy-db/hub": "0.3.0"
|
|
24
25
|
},
|
|
25
26
|
"engines": {
|
|
26
27
|
"node": ">=22.0.0"
|