@ultimat3/realtime 31.25.0 → 31.26.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 +1 -1
- package/package.json +5 -5
- package/src/channel-registry.ts +10 -0
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -89,7 +89,7 @@ class — stay on `.`.
|
|
|
89
89
|
| a socket's identity | `./server` | `SyncAuthenticator`, `SyncGrant`, `GrantBook`, `sweepGrants`, `DEFAULT_REAUTH_INTERVAL_MS` |
|
|
90
90
|
| hooks | `.` | `useQuery` (and `pollEvery` for its `poll`), `useRecord`, `useRecords` (by key, or a whole type: `RecordSelection`), `useRecordChanges`, `useMutation`, `useMutationQueue`, `useOutbox`, `useConnection`, `useChannel`, `usePresence`, `hasPageSocket`, `installRealtime`, `resetPageRealtime` (tests) |
|
|
91
91
|
| channel records, no replicator | `./server` | `recordPublisher` — an app's committed rows as channel `records`, sequenced per producer ([below](#channel-records-with-no-replicator)) |
|
|
92
|
-
| channels | `.` | `channel`, `channelRef`, `ChannelHandle`, `topic`, `readPresence`, the channel frame types |
|
|
92
|
+
| channels | `.` | `channel`, `channelRef`, `ChannelHandle`, `topic`, `readPresence`, the channel frame types; `registeredChannels`, and `clearChannels` / `restoreChannels(snapshot)` (tests — `@ultimat3/testing`'s file boundary restores the snapshot) |
|
|
93
93
|
| first paint | `.` | `holdFirstPaint`, `FIRST_PAINT_HOLD_MS` (1 s) — what the island bootstrap awaits before `mount`, for an island that reads the store or the outbox: the boot's restore and the open outbox, capped (#506). An island taking only `useChannel` / `usePresence` / `useConnection` never awaits it and is never hidden, nor is one taking `useQuery` / `useRecord` in an app that declares no `persist: true` entity |
|
|
94
94
|
| offline | `.` | `pageOutbox`, `localOutbox`, `listenForDrain`; the durable store is `./adapter`'s |
|
|
95
95
|
| the socket's worker | `./sync-worker` | the SharedWorker entry — no exports |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ultimat3/realtime",
|
|
3
|
-
"version": "31.
|
|
3
|
+
"version": "31.26.0",
|
|
4
4
|
"description": "Three-tier realtime: channels, live queries, local-first sync — one protocol, one mutator shape",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ultimate",
|
|
@@ -52,10 +52,10 @@
|
|
|
52
52
|
"test": "bun test"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@ultimat3/core": "31.
|
|
56
|
-
"@ultimat3/entity": "31.
|
|
57
|
-
"@ultimat3/policy": "31.
|
|
58
|
-
"@ultimat3/query": "31.
|
|
55
|
+
"@ultimat3/core": "31.26.0",
|
|
56
|
+
"@ultimat3/entity": "31.26.0",
|
|
57
|
+
"@ultimat3/policy": "31.26.0",
|
|
58
|
+
"@ultimat3/query": "31.26.0",
|
|
59
59
|
"nats": "2.29.3"
|
|
60
60
|
}
|
|
61
61
|
}
|
package/src/channel-registry.ts
CHANGED
|
@@ -33,3 +33,13 @@ export function registeredChannels(): readonly Channel[] {
|
|
|
33
33
|
export function clearChannels(): void {
|
|
34
34
|
channels.clear();
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Test seam: exactly `declared` again — what `registeredChannels()` answered earlier. A REPLACE,
|
|
39
|
+
* never a reset: a module-scope `channel()` evaluates once per process, so a cleared one is gone
|
|
40
|
+
* for every later file. `@ultimat3/testing`'s file boundary is the caller.
|
|
41
|
+
*/
|
|
42
|
+
export function restoreChannels(declared: readonly Channel[]): void {
|
|
43
|
+
channels.clear();
|
|
44
|
+
for (const each of declared) channels.set(each.name, each);
|
|
45
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -26,7 +26,7 @@ export { type PresenceEvent, type PresenceOp, readPresence } from './channel-pre
|
|
|
26
26
|
// The client half of a channel an island holds — no entity, no policy (`channel-ref.ts`).
|
|
27
27
|
export { type ChannelHandle, channelRef, type Topic, topic } from './channel-ref';
|
|
28
28
|
// The process's channel table: what a hub serves by default. `describeChannels` is `./server`'s.
|
|
29
|
-
export { clearChannels, registeredChannels } from './channel-registry';
|
|
29
|
+
export { clearChannels, registeredChannels, restoreChannels } from './channel-registry';
|
|
30
30
|
export type {
|
|
31
31
|
ChannelAdopt,
|
|
32
32
|
ChannelEventsFrame,
|