@natsail/rxjs 0.3.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 +20 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +77 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -8,7 +8,26 @@ pnpm add rxjs @natsail/core @natsail/session @natsail/jetstream @natsail/rxjs
|
|
|
8
8
|
|
|
9
9
|
The adapter uses the framework-neutral session registry. React and RxJS consumers can share one source without a bridge package.
|
|
10
10
|
|
|
11
|
-
`observeNatsJetStreamSubscription()` emits full deliveries from the same keyed session that React hooks use. `observeNatsJetStreamReducer()` consumes the same validated atomic state definition as `useNatsJetStreamReducer()
|
|
11
|
+
`observeNatsJetStreamSubscription()` emits full deliveries from the same keyed session that React hooks use. `observeNatsJetStreamReducer()` consumes the same validated atomic state definition as `useNatsJetStreamReducer()` and exposes exact session lifecycle snapshots.
|
|
12
|
+
|
|
13
|
+
For rendering cumulative application state, prefer `observeNatsJetStreamState()`. It removes duplicate session-lifecycle notifications, emits replay and the first hydrated live state immediately, and coalesces subsequent cumulative live states to the latest value once per 16ms window:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { distinctUntilChanged, map } from 'rxjs'
|
|
17
|
+
|
|
18
|
+
import { observeNatsJetStreamState } from '@natsail/rxjs'
|
|
19
|
+
|
|
20
|
+
const conversation$ = observeNatsJetStreamState(sessions, conversationDefinition, {
|
|
21
|
+
liveBatchMs: 16,
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const messageCount$ = conversation$.pipe(
|
|
25
|
+
map((snapshot) => snapshot.data.messages.length),
|
|
26
|
+
distinctUntilChanged()
|
|
27
|
+
)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Every JetStream delivery is still applied serially by the validated reducer. Only cumulative state presentation is coalesced, so a slow or busy browser does not lose events. The initial history rebuild remains one atomic hydrated state instead of hundreds of partial conversation states. Set `liveBatchMs: 0` when every reduced live state must be observed. A custom RxJS scheduler may be supplied for host integration or deterministic tests.
|
|
12
31
|
|
|
13
32
|
`observeNatsSession()` and `observeNatsSessionValues()` accept validated definitions as well as the legacy key/source pair. `observeNatsSessionEvents()` adapts registry lifecycle and reference-count diagnostics into a cancellable Observable.
|
|
14
33
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
+
import type { SchedulerLike } from 'rxjs';
|
|
2
3
|
import type { CoreSubscriptionOptions, NatsRuntime, NatsRuntimeEvent, NatsRuntimeStatusEvent } from '@natsail/core';
|
|
3
4
|
import { type JetStreamDelivery, type JetStreamSessionSourceOptions, type JetStreamStateSnapshot } from '@natsail/jetstream';
|
|
4
5
|
import type { SessionDefinition, SessionRegistryEvent, SessionRegistry, SessionSnapshot, SessionSource } from '@natsail/session';
|
|
@@ -14,6 +15,22 @@ export declare function observeNatsCoreSubscription<T>(registry: SessionRegistry
|
|
|
14
15
|
export declare function observeNatsJetStreamSubscription<T>(registry: SessionRegistry, runtime: NatsRuntime, key: string, options: JetStreamSessionSourceOptions<T>): Observable<JetStreamDelivery<T>>;
|
|
15
16
|
/** Emits one atomic replay/live reduced state from a validated shared definition. */
|
|
16
17
|
export declare function observeNatsJetStreamReducer<State>(registry: SessionRegistry, definition: SessionDefinition<JetStreamStateSnapshot<State>>): Observable<SessionSnapshot<JetStreamStateSnapshot<State>>>;
|
|
18
|
+
export interface NatsailJetStreamStateOptions {
|
|
19
|
+
/**
|
|
20
|
+
* Maximum time that subsequent cumulative live states are coalesced. The
|
|
21
|
+
* initial replaying and hydrated live states remain immediate. Defaults to
|
|
22
|
+
* 16ms; use 0 to observe every reduced live state.
|
|
23
|
+
*/
|
|
24
|
+
readonly liveBatchMs?: number;
|
|
25
|
+
/** Overrides the RxJS async scheduler, primarily for tests or custom hosts. */
|
|
26
|
+
readonly scheduler?: SchedulerLike;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Emits cumulative reduced JetStream state without duplicate session-lifecycle
|
|
30
|
+
* notifications. Replay and recovery phase changes are immediate; subsequent
|
|
31
|
+
* live states are coalesced to one latest value per bounded render window.
|
|
32
|
+
*/
|
|
33
|
+
export declare function observeNatsJetStreamState<State>(registry: SessionRegistry, definition: SessionDefinition<JetStreamStateSnapshot<State>>, options?: NatsailJetStreamStateOptions): Observable<JetStreamStateSnapshot<State>>;
|
|
17
34
|
/**
|
|
18
35
|
* Creates a cold Observable over one keyed logical session.
|
|
19
36
|
*
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgD,UAAU,EAAE,MAAM,MAAM,CAAA;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,MAAM,CAAA;AAEvD,OAAO,KAAK,EACV,uBAAuB,EACvB,WAAW,EACX,gBAAgB,EAChB,sBAAsB,EACvB,MAAM,eAAe,CAAA;AACtB,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,6BAA6B,EAClC,KAAK,sBAAsB,EAC5B,MAAM,oBAAoB,CAAA;AAE3B,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,aAAa,EACd,MAAM,kBAAkB,CAAA;AAEzB,iGAAiG;AACjG,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,eAAe,GACxB,UAAU,CAAC,oBAAoB,CAAC,CA2BlC;AAED,yEAAyE;AACzE,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,WAAW,GAAG,UAAU,CAAC,gBAAgB,CAAC,CA2B3F;AAED,4EAA4E;AAC5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GAC/B,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAA;AACjC,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,QAAQ,EAAE,eAAe,EACzB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GACvB,UAAU,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAA;AA4BjC;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC/B,UAAU,CAAC,CAAC,CAAC,CAAA;AAChB,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,QAAQ,EAAE,eAAe,EACzB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,GACvB,UAAU,CAAC,CAAC,CAAC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { distinctUntilChanged, filter, Observable } from 'rxjs';
|
|
1
|
+
import { asyncScheduler, distinctUntilChanged, filter, Observable } from 'rxjs';
|
|
2
2
|
import { createJetStreamSessionSource, } from '@natsail/jetstream';
|
|
3
3
|
import { createCoreSessionSource } from '@natsail/session';
|
|
4
4
|
/** Converts registry lifecycle and reference-count diagnostics into a cancellable Observable. */
|
|
@@ -79,6 +79,82 @@ export function observeNatsJetStreamSubscription(registry, runtime, key, options
|
|
|
79
79
|
export function observeNatsJetStreamReducer(registry, definition) {
|
|
80
80
|
return observeNatsSession(registry, definition);
|
|
81
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Emits cumulative reduced JetStream state without duplicate session-lifecycle
|
|
84
|
+
* notifications. Replay and recovery phase changes are immediate; subsequent
|
|
85
|
+
* live states are coalesced to one latest value per bounded render window.
|
|
86
|
+
*/
|
|
87
|
+
export function observeNatsJetStreamState(registry, definition, options = {}) {
|
|
88
|
+
const liveBatchMs = options.liveBatchMs ?? 16;
|
|
89
|
+
if (!Number.isFinite(liveBatchMs) || liveBatchMs < 0) {
|
|
90
|
+
throw new TypeError('NATSail RxJS liveBatchMs must be a finite non-negative number');
|
|
91
|
+
}
|
|
92
|
+
const values = observeNatsSessionValues(registry, definition);
|
|
93
|
+
if (liveBatchMs === 0)
|
|
94
|
+
return values;
|
|
95
|
+
const scheduler = options.scheduler ?? asyncScheduler;
|
|
96
|
+
return new Observable((subscriber) => {
|
|
97
|
+
let seenLive = false;
|
|
98
|
+
let pendingLive;
|
|
99
|
+
let scheduledFlush;
|
|
100
|
+
const flush = () => {
|
|
101
|
+
scheduledFlush = undefined;
|
|
102
|
+
if (pendingLive === undefined)
|
|
103
|
+
return;
|
|
104
|
+
const value = pendingLive;
|
|
105
|
+
pendingLive = undefined;
|
|
106
|
+
subscriber.next(value);
|
|
107
|
+
};
|
|
108
|
+
const cancelFlush = () => {
|
|
109
|
+
scheduledFlush?.unsubscribe();
|
|
110
|
+
scheduledFlush = undefined;
|
|
111
|
+
};
|
|
112
|
+
const scheduleFlush = () => {
|
|
113
|
+
if (scheduledFlush !== undefined)
|
|
114
|
+
return;
|
|
115
|
+
let ranSynchronously = false;
|
|
116
|
+
const scheduled = scheduler.schedule(() => {
|
|
117
|
+
ranSynchronously = true;
|
|
118
|
+
flush();
|
|
119
|
+
}, liveBatchMs);
|
|
120
|
+
if (!ranSynchronously)
|
|
121
|
+
scheduledFlush = scheduled;
|
|
122
|
+
};
|
|
123
|
+
const source = values.subscribe({
|
|
124
|
+
next: (value) => {
|
|
125
|
+
if (value.phase !== 'live') {
|
|
126
|
+
cancelFlush();
|
|
127
|
+
flush();
|
|
128
|
+
seenLive = false;
|
|
129
|
+
subscriber.next(value);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (!seenLive) {
|
|
133
|
+
seenLive = true;
|
|
134
|
+
subscriber.next(value);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
pendingLive = value;
|
|
138
|
+
scheduleFlush();
|
|
139
|
+
},
|
|
140
|
+
error: (error) => {
|
|
141
|
+
cancelFlush();
|
|
142
|
+
flush();
|
|
143
|
+
subscriber.error(error);
|
|
144
|
+
},
|
|
145
|
+
complete: () => {
|
|
146
|
+
cancelFlush();
|
|
147
|
+
flush();
|
|
148
|
+
subscriber.complete();
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
return () => {
|
|
152
|
+
cancelFlush();
|
|
153
|
+
pendingLive = undefined;
|
|
154
|
+
source.unsubscribe();
|
|
155
|
+
};
|
|
156
|
+
});
|
|
157
|
+
}
|
|
82
158
|
export function observeNatsSession(registry, definitionOrKey, source) {
|
|
83
159
|
return new Observable((subscriber) => {
|
|
84
160
|
const handle = typeof definitionOrKey === 'string'
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAA;AAS/E,OAAO,EACL,4BAA4B,GAI7B,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAS1D,iGAAiG;AACjG,MAAM,UAAU,wBAAwB,CACtC,QAAyB;IAEzB,OAAO,IAAI,UAAU,CAAC,CAAC,UAAU,EAAE,EAAE;QACnC,MAAM,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,CAAA;QACxD,IAAI,SAAS,GAAG,KAAK,CAAA;QAErB,KAAK,CAAC,KAAK,IAAI,EAAE;YACf,IAAI,CAAC;gBACH,OAAO,CAAC,SAAS,EAAE,C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AC;YACvC,IAAI,EAAE,CAAC,QAAQ,EAAE,EAAE;gBACjB,IACE,QAAQ,CAAC,aAAa,KAAK,aAAa;oBACxC,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,EACvD,CAAC;oBACD,aAAa,GAAG,QAAQ,CAAC,aAAa,CAAA;oBACtC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAU,CAAC,CAAA;gBACtC,CAAC;gBAED,IAAI,QAAQ,CAAC,KAAK,KAAK,OAAO,EAAE,CAAC;oBAC/B,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;gBAClC,CAAC;qBAAM,IAAI,QAAQ,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;oBACvC,UAAU,CAAC,QAAQ,EAAE,CAAA;gBACvB,CAAC;YACH,CAAC;YACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC;YACzC,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,QAAQ,EAAE;SACtC,CAAC,CAAA;QAEF,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,CAAA;IACzC,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@natsail/rxjs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "RxJS Observables for NATSail runtimes and shared sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nats",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"registry": "https://registry.npmjs.org/"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@natsail/
|
|
42
|
-
"@natsail/
|
|
43
|
-
"@natsail/
|
|
41
|
+
"@natsail/jetstream": "^0.4.0",
|
|
42
|
+
"@natsail/session": "^0.3.0",
|
|
43
|
+
"@natsail/core": "^0.2.1"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"rxjs": "^7.8.0"
|