@cero-base/cero 0.4.0 → 0.4.1
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 -7
- package/package.json +18 -6
package/README.md
CHANGED
|
@@ -206,7 +206,7 @@ const inviteStr = await room.invite()
|
|
|
206
206
|
cero.watch(room.messages).on('data', ({ data }) => render(data))
|
|
207
207
|
```
|
|
208
208
|
|
|
209
|
-
The same `spec/index.js` is imported on both sides.
|
|
209
|
+
The same `spec/index.js` is imported on both sides. `@cero-base/cero/build` emits one file; its imports (hyperdb/runtime, hyperdispatch/runtime, hyperschema/runtime) are all pure JS — no native deps — so bundlers like vite handle the renderer bundle fine.
|
|
210
210
|
|
|
211
211
|
### What you can do over RPC
|
|
212
212
|
|
|
@@ -263,12 +263,12 @@ const remote = await connect(c, spec)
|
|
|
263
263
|
|
|
264
264
|
## Exports
|
|
265
265
|
|
|
266
|
-
| Path
|
|
267
|
-
|
|
|
268
|
-
|
|
|
269
|
-
|
|
|
270
|
-
|
|
|
271
|
-
|
|
|
266
|
+
| Path | What you get |
|
|
267
|
+
| ------------------------ | ------------------------------------------------------------------------ |
|
|
268
|
+
| `@cero-base/cero` | factory + operators + schema DSL |
|
|
269
|
+
| `@cero-base/cero/client` | `connect(ipc, spec)` — talk to a cero running in another process |
|
|
270
|
+
| `@cero-base/cero/server` | `serve(ipc, { storage, spec })` — run + expose a cero over an IPC stream |
|
|
271
|
+
| `@cero-base/cero/build` | `build(specDir, schema)` — generate the on-disk spec |
|
|
272
272
|
|
|
273
273
|
## Tests
|
|
274
274
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cero-base/cero",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "The ideal p2p API — everything is a handle, handles contain refs, refs contain rows.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -15,10 +15,22 @@
|
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
17
|
"exports": {
|
|
18
|
-
".":
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/index.d.ts",
|
|
20
|
+
"default": "./src/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./build": {
|
|
23
|
+
"types": "./types/builder.d.ts",
|
|
24
|
+
"default": "./src/builder.js"
|
|
25
|
+
},
|
|
26
|
+
"./server": {
|
|
27
|
+
"types": "./types/rpc/server.d.ts",
|
|
28
|
+
"default": "./src/rpc/server.js"
|
|
29
|
+
},
|
|
30
|
+
"./client": {
|
|
31
|
+
"types": "./types/rpc/client.d.ts",
|
|
32
|
+
"default": "./src/rpc/client.js"
|
|
33
|
+
}
|
|
22
34
|
},
|
|
23
35
|
"typesVersions": {
|
|
24
36
|
"*": {
|
|
@@ -55,7 +67,7 @@
|
|
|
55
67
|
"test": "ls test/*.test.js | xargs -P2 -n1 brittle-node"
|
|
56
68
|
},
|
|
57
69
|
"dependencies": {
|
|
58
|
-
"@cero-base/core": "^0.4.
|
|
70
|
+
"@cero-base/core": "^0.4.1",
|
|
59
71
|
"b4a": "^1.8.1",
|
|
60
72
|
"bare-crypto": "^1.13.7",
|
|
61
73
|
"bare-fs": "^4.7.1",
|