@m4l/realtime-runtime 1.4.0 → 1.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/contracts/index.d.ts +1 -1
- package/contracts/index.d.ts.map +1 -1
- package/contracts/types.d.ts +23 -2
- package/contracts/types.d.ts.map +1 -1
- package/engine/runtimeCore.d.ts +3 -1
- package/engine/runtimeCore.d.ts.map +1 -1
- package/engine/runtimeCore.js +11 -9
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/web/runtime.d.ts.map +1 -1
- package/web/runtime.js +23 -17
- package/web/store.d.ts.map +1 -1
- package/web/store.js +134 -104
- package/web/tools.d.ts.map +1 -1
- package/web/tools.js +10 -4
- package/web/types.d.ts +9 -1
- package/web/types.d.ts.map +1 -1
package/contracts/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback, OnRealTimeTransportReconnectCallback, OnRealTimeConsumerMessageCallback, OnRealtimeConsumerSubscribeCallback, RealTimeMessage, RealTimeMessageIngressReason, RealTimeResourceMessageNormalizeContext, RealTimeResourceMessageNormalizeStrategy, RealTimeMessagePayload, RealTimeProducerTools, RealTimeProducerMetricName, RealTimeReadonlyResourceHash, RealTimeResourceMergeContext, RealTimeResourceHash, RealTimeResourcePayloadMergeStrategy, RealTimeResourceRuntimeMeta, RealTimeResourceSerialId, RealTimeResourceSourceMechanismConfig, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSourceMechanismConfigBase, RealTimeTransportBrowserRecoveryTrigger, RealTimeTransportReconnectEvent, RealTimeTransportReconnectReason, RealTimeResourceType, RealTimeResourceTypeId, RealTimeStatus, ResourceTypeSourceDataMechanism, SubscribeOptions, SubscribeResourceTypeOptions, Subscriber, } from './types';
|
|
1
|
+
export type { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback, OnRealTimeTransportReconnectCallback, OnRealTimeConsumerMessageCallback, OnRealtimeConsumerSubscribeCallback, RealTimeMessage, RealTimeMessageIngressReason, RealTimeResourceMessageNormalizeContext, RealTimeResourceMessageNormalizeStrategy, RealTimeMessagePayload, RealTimeProducerTools, RealTimeProducerMetricName, RealTimeReadonlyResourceHash, RealTimeResourceMergeContext, RealTimeResourceHash, RealTimeResourcePayloadMergeStrategy, RealTimeResourceRuntimeMeta, RealTimeResourceSerialId, RealTimeResourceSourceMechanismConfig, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSourceMechanismConfigBase, RealTimeTransportBrowserRecoveryTrigger, RealTimeTransportReconnectEvent, RealTimeTransportReconnectReason, RealTimeResourceType, RealTimeResourceTypeId, RealTimeStatus, ResourceTypeSourceDataMechanism, SubscribeTransportReconnectOptions, SubscribeOptions, SubscribeResourceTypeOptions, Subscriber, } from './types';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/contracts/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,uBAAuB,EACvB,gCAAgC,EAChC,oCAAoC,EACpC,iCAAiC,EACjC,mCAAmC,EACnC,eAAe,EACf,4BAA4B,EAC5B,uCAAuC,EACvC,wCAAwC,EACxC,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,oCAAoC,EACpC,2BAA2B,EAC3B,wBAAwB,EACxB,qCAAqC,EACrC,+CAA+C,EAC/C,yCAAyC,EACzC,uCAAuC,EACvC,+BAA+B,EAC/B,gCAAgC,EAChC,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,+BAA+B,EAC/B,gBAAgB,EAChB,4BAA4B,EAC5B,UAAU,GACX,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/contracts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,uBAAuB,EACvB,gCAAgC,EAChC,oCAAoC,EACpC,iCAAiC,EACjC,mCAAmC,EACnC,eAAe,EACf,4BAA4B,EAC5B,uCAAuC,EACvC,wCAAwC,EACxC,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,oCAAoC,EACpC,2BAA2B,EAC3B,wBAAwB,EACxB,qCAAqC,EACrC,+CAA+C,EAC/C,yCAAyC,EACzC,uCAAuC,EACvC,+BAA+B,EAC/B,gCAAgC,EAChC,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,+BAA+B,EAC/B,kCAAkC,EAClC,gBAAgB,EAChB,4BAA4B,EAC5B,UAAU,GACX,MAAM,SAAS,CAAC"}
|
package/contracts/types.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export type RealTimeMessagePayload = Record<string | number, unknown>;
|
|
|
18
18
|
/**
|
|
19
19
|
* Producer ingress source used when one realtime payload reaches the shared resource pipeline.
|
|
20
20
|
*/
|
|
21
|
-
export type RealTimeMessageIngressReason = 'transport' | '
|
|
21
|
+
export type RealTimeMessageIngressReason = 'transport' | 'first_snapshot' | 'reconnect_snapshot' | 'publish' | 'cleanup';
|
|
22
22
|
/**
|
|
23
23
|
* Context shared with optional resource-specific payload merge strategies.
|
|
24
24
|
*/
|
|
@@ -79,6 +79,19 @@ export interface RealTimeMessage {
|
|
|
79
79
|
}
|
|
80
80
|
export type OnRealTimeConsumerMessageCallback = (resourceTypeId: RealTimeResourceTypeId, messages: RealTimeMessage[]) => void;
|
|
81
81
|
export type OnRealtimeConsumerSubscribeCallback = (resourceTypeId: RealTimeResourceTypeId, initialHashResources: RealTimeResourceHash) => void;
|
|
82
|
+
/**
|
|
83
|
+
* Input contract used to subscribe one consumer to recovered transport events.
|
|
84
|
+
*/
|
|
85
|
+
export interface SubscribeTransportReconnectOptions {
|
|
86
|
+
/**
|
|
87
|
+
* Stable consumer identifier used to replace or remove one reconnect listener.
|
|
88
|
+
*/
|
|
89
|
+
clientId: string;
|
|
90
|
+
/**
|
|
91
|
+
* Callback fired after the realtime transport successfully recovers.
|
|
92
|
+
*/
|
|
93
|
+
onReconnectCallback: OnRealTimeTransportReconnectCallback;
|
|
94
|
+
}
|
|
82
95
|
export type Subscriber = {
|
|
83
96
|
clientId: string;
|
|
84
97
|
/**
|
|
@@ -138,11 +151,19 @@ export interface RealTimeProducerTools {
|
|
|
138
151
|
/**
|
|
139
152
|
* Publish one synthetic realtime batch through the shared producer pipeline.
|
|
140
153
|
*/
|
|
141
|
-
publishMessages: (resourceTypeId: RealTimeResourceTypeId, messages: RealTimeMessage[], reason?: Extract<RealTimeMessageIngressReason, '
|
|
154
|
+
publishMessages: (resourceTypeId: RealTimeResourceTypeId, messages: RealTimeMessage[], reason?: Extract<RealTimeMessageIngressReason, 'first_snapshot' | 'reconnect_snapshot' | 'publish'>) => void;
|
|
142
155
|
/**
|
|
143
156
|
* Read the current runtime metadata for one resource type.
|
|
144
157
|
*/
|
|
145
158
|
getResourceRuntimeMeta: (resourceTypeId: RealTimeResourceTypeId) => RealTimeResourceRuntimeMeta | null;
|
|
159
|
+
/**
|
|
160
|
+
* Subscribe one consumer client to recovered transport events emitted by the current runtime.
|
|
161
|
+
*/
|
|
162
|
+
subscribeTransportReconnect: (options: SubscribeTransportReconnectOptions) => void;
|
|
163
|
+
/**
|
|
164
|
+
* Remove one transport reconnect listener owned by the current consumer client.
|
|
165
|
+
*/
|
|
166
|
+
unsubscribeTransportReconnect: (clientId: string) => void;
|
|
146
167
|
}
|
|
147
168
|
/**
|
|
148
169
|
* Realtime connection state.
|
package/contracts/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/contracts/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,MAAM,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,4BAA4B,GACpC,WAAW,GACX,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/contracts/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,+BAA+B,GAAG,MAAM,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,EAAE,OAAO,CAAC,CAAC;AAEtE;;GAEG;AACH,MAAM,MAAM,4BAA4B,GACpC,WAAW,GACX,gBAAgB,GAChB,oBAAoB,GACpB,SAAS,GACT,SAAS,CAAC;AAEd;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C;;OAEG;IACH,MAAM,EAAE,4BAA4B,CAAC;IACrC;;OAEG;IACH,cAAc,EAAE,sBAAsB,CAAC;IACvC;;OAEG;IACH,gBAAgB,EAAE,wBAAwB,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,uCAAuC;IACtD;;OAEG;IACH,MAAM,EAAE,4BAA4B,CAAC;IACrC;;OAEG;IACH,cAAc,EAAE,sBAAsB,CAAC;CACxC;A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C;IACnB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG,CACjD,KAAK,EAAE,+BAA+B,KACnC,IAAI,CAAC;AAEV;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAClC,uBAAuB,GACvB,kBAAkB,GAClB,qBAAqB,GACrB,uBAAuB,GACvB,yBAAyB,GACzB,+BAA+B,GAC/B,4BAA4B,GAC5B,yBAAyB,GACzB,0BAA0B,GAC1B,2BAA2B,GAC3B,kCAAkC,GAClC,sCAAsC,GACtC,iCAAiC,GACjC,oCAAoC,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,gCAAgC,GAAG,CAC7C,UAAU,EAAE,0BAA0B,EACtC,KAAK,CAAC,EAAE,MAAM,KACX,IAAI,CAAC"}
|
package/engine/runtimeCore.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RealTimeReadonlyResourceHash, RealTimeResourceHash, RealTimeResourceTypeId, RealTimeStatus, SubscribeOptions, SubscribeResourceTypeOptions } from '../contracts';
|
|
1
|
+
import { SubscribeTransportReconnectOptions, RealTimeReadonlyResourceHash, RealTimeResourceHash, RealTimeResourceTypeId, RealTimeStatus, SubscribeOptions, SubscribeResourceTypeOptions } from '../contracts';
|
|
2
2
|
/**
|
|
3
3
|
* Neutral runtime API that should remain usable beyond one specific UI store adapter.
|
|
4
4
|
*/
|
|
@@ -9,7 +9,9 @@ export interface RealtimeRuntime {
|
|
|
9
9
|
getStatus: (resourceTypeId: RealTimeResourceTypeId) => RealTimeStatus | undefined;
|
|
10
10
|
subscribe: (resourceTypeId: RealTimeResourceTypeId, options: SubscribeOptions) => void;
|
|
11
11
|
subscribeResourceType: (resourceTypeId: RealTimeResourceTypeId, options: SubscribeResourceTypeOptions) => RealTimeReadonlyResourceHash;
|
|
12
|
+
subscribeTransportReconnect: (options: SubscribeTransportReconnectOptions) => void;
|
|
12
13
|
unsubscribe: (resourceTypeId: RealTimeResourceTypeId, clientId: string) => void;
|
|
14
|
+
unsubscribeTransportReconnect: (clientId: string) => void;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* Build the neutral runtime API from one adapter that already satisfies the runtime contract.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtimeCore.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/engine/runtimeCore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,4BAA4B,EAC7B,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,uBAAuB,EAAE,CAAC,cAAc,EAAE,sBAAsB,KAAK,4BAA4B,CAAC;IAClG,WAAW,EAAE,CAAC,cAAc,EAAE,sBAAsB,KAAK,oBAAoB,CAAC;IAC9E,SAAS,EAAE,CAAC,cAAc,EAAE,sBAAsB,KAAK,cAAc,GAAG,SAAS,CAAC;IAClF,SAAS,EAAE,CAAC,cAAc,EAAE,sBAAsB,EAAE,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACvF,qBAAqB,EAAE,CACrB,cAAc,EAAE,sBAAsB,EACtC,OAAO,EAAE,4BAA4B,KAClC,4BAA4B,CAAC;IAClC,WAAW,EAAE,CAAC,cAAc,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"runtimeCore.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/engine/runtimeCore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kCAAkC,EAClC,4BAA4B,EAC5B,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,4BAA4B,EAC7B,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,uBAAuB,EAAE,CAAC,cAAc,EAAE,sBAAsB,KAAK,4BAA4B,CAAC;IAClG,WAAW,EAAE,CAAC,cAAc,EAAE,sBAAsB,KAAK,oBAAoB,CAAC;IAC9E,SAAS,EAAE,CAAC,cAAc,EAAE,sBAAsB,KAAK,cAAc,GAAG,SAAS,CAAC;IAClF,SAAS,EAAE,CAAC,cAAc,EAAE,sBAAsB,EAAE,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACvF,qBAAqB,EAAE,CACrB,cAAc,EAAE,sBAAsB,EACtC,OAAO,EAAE,4BAA4B,KAClC,4BAA4B,CAAC;IAClC,2BAA2B,EAAE,CAC3B,OAAO,EAAE,kCAAkC,KACxC,IAAI,CAAC;IACV,WAAW,EAAE,CAAC,cAAc,EAAE,sBAAsB,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAChF,6BAA6B,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3D;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,eAAe,GACvB,eAAe,CAYjB"}
|
package/engine/runtimeCore.js
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
function s
|
|
1
|
+
function e(s) {
|
|
2
2
|
return {
|
|
3
|
-
dispose:
|
|
4
|
-
getResourceTypeSnapshot:
|
|
5
|
-
getSnapshot:
|
|
6
|
-
getStatus:
|
|
7
|
-
subscribe:
|
|
8
|
-
subscribeResourceType:
|
|
9
|
-
|
|
3
|
+
dispose: s.dispose,
|
|
4
|
+
getResourceTypeSnapshot: s.getResourceTypeSnapshot,
|
|
5
|
+
getSnapshot: s.getSnapshot,
|
|
6
|
+
getStatus: s.getStatus,
|
|
7
|
+
subscribe: s.subscribe,
|
|
8
|
+
subscribeResourceType: s.subscribeResourceType,
|
|
9
|
+
subscribeTransportReconnect: s.subscribeTransportReconnect,
|
|
10
|
+
unsubscribe: s.unsubscribe,
|
|
11
|
+
unsubscribeTransportReconnect: s.unsubscribeTransportReconnect
|
|
10
12
|
};
|
|
11
13
|
}
|
|
12
14
|
export {
|
|
13
|
-
|
|
15
|
+
e as createRealtimeRuntimeApi
|
|
14
16
|
};
|
package/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export { createAtmosphereSourceData } from './transport';
|
|
|
6
6
|
export { createAtmosphereSourceDataFactory } from './transport';
|
|
7
7
|
export { SourceDataAtmosphere } from './transport';
|
|
8
8
|
export type { AtmosphereMessage } from './transport';
|
|
9
|
-
export type { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback, OnRealTimeTransportReconnectCallback, OnRealTimeConsumerMessageCallback, OnRealtimeConsumerSubscribeCallback, RealTimeMessage, RealTimeMessageIngressReason, RealTimeResourceMessageNormalizeContext, RealTimeResourceMessageNormalizeStrategy, RealTimeMessagePayload, RealTimeProducerTools, RealTimeProducerMetricName, RealTimeReadonlyResourceHash, RealTimeResourceMergeContext, RealTimeResourceHash, RealTimeResourcePayloadMergeStrategy, RealTimeResourceRuntimeMeta, RealTimeResourceSerialId, RealTimeResourceSourceMechanismConfig, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSourceMechanismConfigBase, RealTimeTransportBrowserRecoveryTrigger, RealTimeTransportReconnectEvent, RealTimeTransportReconnectReason, RealTimeResourceType, RealTimeResourceTypeId, RealTimeStatus, ResourceTypeSourceDataMechanism, SubscribeOptions, SubscribeResourceTypeOptions, Subscriber, } from './contracts';
|
|
9
|
+
export type { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback, OnRealTimeTransportReconnectCallback, OnRealTimeConsumerMessageCallback, OnRealtimeConsumerSubscribeCallback, RealTimeMessage, RealTimeMessageIngressReason, RealTimeResourceMessageNormalizeContext, RealTimeResourceMessageNormalizeStrategy, RealTimeMessagePayload, RealTimeProducerTools, RealTimeProducerMetricName, RealTimeReadonlyResourceHash, RealTimeResourceMergeContext, RealTimeResourceHash, RealTimeResourcePayloadMergeStrategy, RealTimeResourceRuntimeMeta, RealTimeResourceSerialId, RealTimeResourceSourceMechanismConfig, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSourceMechanismConfigBase, RealTimeTransportBrowserRecoveryTrigger, RealTimeTransportReconnectEvent, RealTimeTransportReconnectReason, RealTimeResourceType, RealTimeResourceTypeId, RealTimeStatus, ResourceTypeSourceDataMechanism, SubscribeTransportReconnectOptions, SubscribeOptions, SubscribeResourceTypeOptions, Subscriber, } from './contracts';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/realtime-runtime/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EACL,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,YAAY,EACV,uBAAuB,EACvB,gCAAgC,EAChC,oCAAoC,EACpC,iCAAiC,EACjC,mCAAmC,EACnC,eAAe,EACf,4BAA4B,EAC5B,uCAAuC,EACvC,wCAAwC,EACxC,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,oCAAoC,EACpC,2BAA2B,EAC3B,wBAAwB,EACxB,qCAAqC,EACrC,+CAA+C,EAC/C,yCAAyC,EACzC,uCAAuC,EACvC,+BAA+B,EAC/B,gCAAgC,EAChC,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,+BAA+B,EAC/B,gBAAgB,EAChB,4BAA4B,EAC5B,UAAU,GACX,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/realtime-runtime/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EACL,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,YAAY,EACV,uBAAuB,EACvB,gCAAgC,EAChC,oCAAoC,EACpC,iCAAiC,EACjC,mCAAmC,EACnC,eAAe,EACf,4BAA4B,EAC5B,uCAAuC,EACvC,wCAAwC,EACxC,sBAAsB,EACtB,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,oCAAoC,EACpC,2BAA2B,EAC3B,wBAAwB,EACxB,qCAAqC,EACrC,+CAA+C,EAC/C,yCAAyC,EACzC,uCAAuC,EACvC,+BAA+B,EAC/B,gCAAgC,EAChC,oBAAoB,EACpB,sBAAsB,EACtB,cAAc,EACd,+BAA+B,EAC/B,kCAAkC,EAClC,gBAAgB,EAChB,4BAA4B,EAC5B,UAAU,GACX,MAAM,aAAa,CAAC"}
|
package/package.json
CHANGED
package/web/runtime.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/web/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,sBAAsB,EACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,EACjC,mBAAmB,EACnB,iCAAiC,EACjC,0BAA0B,EAC1B,qCAAqC,EACtC,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,KAAK,EAAE,iBAAiB,CAAC;IACzB,KAAK,EAAE,qBAAqB,CAAC;CAC9B;AAED,MAAM,WAAW,+BACf,SAAQ,IAAI,CAAC,0BAA0B,EAAE,SAAS,CAAC;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/web/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EACvB,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,sBAAsB,EACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,EACjC,mBAAmB,EACnB,iCAAiC,EACjC,0BAA0B,EAC1B,qCAAqC,EACtC,MAAM,SAAS,CAAC;AAQjB;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,KAAK,EAAE,iBAAiB,CAAC;IACzB,KAAK,EAAE,qBAAqB,CAAC;CAC9B;AAED,MAAM,WAAW,+BACf,SAAQ,IAAI,CAAC,0BAA0B,EAAE,SAAS,CAAC;IACnD,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAuID;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,0BAA0B,EACjC,gBAAgB,EAAE,wBAAwB,GACzC,eAAe,CAKjB;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,0BAA0B,EACjC,gBAAgB,EAAE,wBAAwB,GACzC,qBAAqB,CASvB;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,SAAS,qBAAqB,EAEtC,aAAa,EAAE,CAAC,KAAK,EAAE,0BAA0B,KAAK,QAAQ,IAQ5D,OAAO,+BAA+B,KACrC,QAAQ,CAWZ;AACD,YAAY,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,EACjC,mBAAmB,EACnB,iCAAiC,EACjC,0BAA0B,EAC1B,qCAAqC,GACtC,CAAC;AAEF,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
package/web/runtime.js
CHANGED
|
@@ -3,31 +3,31 @@ import { createRealTimeStore as m } from "./store.js";
|
|
|
3
3
|
import { createGetOrCreateRuntime as p } from "../engine/runtimeRegistry.js";
|
|
4
4
|
import { disposeRealtimeRuntime as A } from "../engine/runtimeRegistry.js";
|
|
5
5
|
import { createRealtimeRuntimeApi as R } from "../engine/runtimeCore.js";
|
|
6
|
-
import { createRealTimeProducerTools as
|
|
7
|
-
function
|
|
6
|
+
import { createRealTimeProducerTools as b } from "./tools.js";
|
|
7
|
+
function T(s, r) {
|
|
8
8
|
return r.reduce((n, e) => {
|
|
9
9
|
const t = e.staleResourceTtlMs;
|
|
10
10
|
if (t === void 0 || t <= 0)
|
|
11
11
|
return n;
|
|
12
|
-
const
|
|
12
|
+
const u = e.staleResourceCleanupIntervalMs ?? Math.max(5e3, Math.min(t, 3e4)), o = globalThis.setInterval(() => {
|
|
13
13
|
s.getState().realTimeProducerActions.cleanupStaleResources(
|
|
14
14
|
e.resourceTypeId
|
|
15
15
|
);
|
|
16
|
-
},
|
|
17
|
-
return n.push(
|
|
16
|
+
}, u);
|
|
17
|
+
return n.push(o), n;
|
|
18
18
|
}, []);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function d(s) {
|
|
21
21
|
Object.values(s.getState().hasResourcesTypes).forEach((r) => {
|
|
22
22
|
r.sourceDataClass.stop();
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function f(s, r) {
|
|
26
26
|
let n = !1;
|
|
27
27
|
return function() {
|
|
28
28
|
n || (n = !0, r.forEach((t) => {
|
|
29
29
|
globalThis.clearInterval(t);
|
|
30
|
-
}),
|
|
30
|
+
}), d(s));
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
33
|
function h(s, r, n) {
|
|
@@ -42,34 +42,40 @@ function h(s, r, n) {
|
|
|
42
42
|
r.subscribe(e, t);
|
|
43
43
|
},
|
|
44
44
|
subscribeResourceType: (e, t) => r.subscribeResourceType(e, t),
|
|
45
|
+
subscribeTransportReconnect: (e) => {
|
|
46
|
+
r.subscribeTransportReconnect(e);
|
|
47
|
+
},
|
|
45
48
|
unsubscribe: (e, t) => {
|
|
46
49
|
r.unsubscribe(e, t);
|
|
50
|
+
},
|
|
51
|
+
unsubscribeTransportReconnect: (e) => {
|
|
52
|
+
r.unsubscribeTransportReconnect(e);
|
|
47
53
|
}
|
|
48
54
|
});
|
|
49
55
|
}
|
|
50
|
-
function
|
|
56
|
+
function c(s, r) {
|
|
51
57
|
const { storeDevtoolsEnabled: n = !1, ...e } = s, t = m(
|
|
52
58
|
e,
|
|
53
59
|
n,
|
|
54
60
|
r
|
|
55
|
-
),
|
|
61
|
+
), u = T(
|
|
56
62
|
t,
|
|
57
63
|
e.resourceTypesConfig
|
|
58
|
-
),
|
|
64
|
+
), o = f(t, u), i = b(t), a = h(t, i, o);
|
|
59
65
|
return t.getState().realTimeProducerActions.init(), {
|
|
60
|
-
runtime:
|
|
66
|
+
runtime: a,
|
|
61
67
|
store: t,
|
|
62
68
|
tools: i
|
|
63
69
|
};
|
|
64
70
|
}
|
|
65
71
|
function P(s, r) {
|
|
66
|
-
return
|
|
72
|
+
return c(
|
|
67
73
|
s,
|
|
68
74
|
r
|
|
69
75
|
).runtime;
|
|
70
76
|
}
|
|
71
77
|
function C(s, r) {
|
|
72
|
-
const { runtime: n, store: e, tools: t } =
|
|
78
|
+
const { runtime: n, store: e, tools: t } = c(s, r);
|
|
73
79
|
return {
|
|
74
80
|
...n,
|
|
75
81
|
store: e,
|
|
@@ -79,11 +85,11 @@ function C(s, r) {
|
|
|
79
85
|
function M(s) {
|
|
80
86
|
const r = p(s);
|
|
81
87
|
return function(e) {
|
|
82
|
-
const { runtimeKey: t, ...
|
|
88
|
+
const { runtimeKey: t, ...u } = e;
|
|
83
89
|
return r({
|
|
84
90
|
createProps: {
|
|
85
|
-
...
|
|
86
|
-
storeId:
|
|
91
|
+
...u,
|
|
92
|
+
storeId: u.storeId ?? t
|
|
87
93
|
},
|
|
88
94
|
runtimeKey: t
|
|
89
95
|
});
|
package/web/store.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/web/store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,uBAAuB,EACvB,gCAAgC,EAChC,oCAAoC,EAOrC,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAYlE,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,EAIjC,qCAAqC,EACtC,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACrC,MAAM,EAAE,iCAAiC,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,EACxE,UAAU,EAAE,uBAAuB,EACnC,mBAAmB,CAAC,EAAE,gCAAgC,EACtD,oBAAoB,CAAC,EAAE,oCAAoC,KACxD,cAAc,CAAC;AAoEpB;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,wBAAwB,EACnC,oBAAoB,qBAAQ,EAC5B,gBAAgB,EAAE,wBAAwB;;
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/web/store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,uBAAuB,EACvB,gCAAgC,EAChC,oCAAoC,EAOrC,MAAM,cAAc,CAAC;AAKtB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAYlE,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,EAIjC,qCAAqC,EACtC,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,CACrC,MAAM,EAAE,iCAAiC,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,EACxE,UAAU,EAAE,uBAAuB,EACnC,mBAAmB,CAAC,EAAE,gCAAgC,EACtD,oBAAoB,CAAC,EAAE,oCAAoC,KACxD,cAAc,CAAC;AAoEpB;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,wBAAwB,EACnC,oBAAoB,qBAAQ,EAC5B,gBAAgB,EAAE,wBAAwB;;EAwe3C;AACD,MAAM,MAAM,iBAAiB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACvE,YAAY,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,iCAAiC,GAClC,CAAC"}
|
package/web/store.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { createStore as
|
|
2
|
-
import { immer as
|
|
3
|
-
import { ObjectQueue as
|
|
4
|
-
import { REALTIME_PRODUCER_STORE_ID as
|
|
1
|
+
import { createStore as L } from "zustand";
|
|
2
|
+
import { immer as _ } from "zustand/middleware/immer";
|
|
3
|
+
import { ObjectQueue as N } from "../engine/ObjectQueue.js";
|
|
4
|
+
import { REALTIME_PRODUCER_STORE_ID as $ } from "./constants.js";
|
|
5
5
|
import { cloneDeep as z } from "lodash-es";
|
|
6
|
-
import { createProducerDevtools as
|
|
6
|
+
import { createProducerDevtools as U, drainQueuedMessages as W, sanitizeProducerMessage as F, createRealtimePatchedResourceSnapshot as G, applyProducerMessage as J, notifySubscribersWithBatch as K, groupMessagesByResourceTypeId as V, normalizeProducerMessage as X } from "./store.helpers.js";
|
|
7
7
|
function Q() {
|
|
8
8
|
return typeof globalThis.performance?.now == "function" ? globalThis.performance.now() : Date.now();
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function S(d) {
|
|
11
11
|
return d ? Q() : 0;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function b(d, p, M) {
|
|
14
14
|
d?.(p, M);
|
|
15
15
|
}
|
|
16
16
|
function P(d, p, M) {
|
|
@@ -22,33 +22,48 @@ function P(d, p, M) {
|
|
|
22
22
|
function O(d, p) {
|
|
23
23
|
return typeof p == "object" && p !== null && "resourceSerialId" in p && typeof p.resourceSerialId == "string" ? p.resourceSerialId : d;
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function oe(d, p = !1, M) {
|
|
26
26
|
const {
|
|
27
|
-
onPerformanceMetric:
|
|
28
|
-
onTransportReconnect:
|
|
29
|
-
startSourceData:
|
|
30
|
-
...
|
|
31
|
-
} = d,
|
|
32
|
-
...
|
|
27
|
+
onPerformanceMetric: t,
|
|
28
|
+
onTransportReconnect: I,
|
|
29
|
+
startSourceData: j = !0,
|
|
30
|
+
...E
|
|
31
|
+
} = d, v = {
|
|
32
|
+
...E,
|
|
33
33
|
hasResourcesTypes: {}
|
|
34
|
-
}, A = {},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
}, C = {}, A = {}, D = /* @__PURE__ */ new Map(), B = (R) => {
|
|
35
|
+
I?.(R), D.forEach((a, e) => {
|
|
36
|
+
try {
|
|
37
|
+
a(R);
|
|
38
|
+
} catch (o) {
|
|
39
|
+
console.error(
|
|
40
|
+
"[realtime-runtime] Transport reconnect subscriber failed.",
|
|
41
|
+
{
|
|
42
|
+
clientId: e,
|
|
43
|
+
event: R
|
|
44
|
+
},
|
|
45
|
+
o
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
return L(
|
|
51
|
+
U(
|
|
52
|
+
_((R, a) => ({
|
|
53
|
+
...v,
|
|
39
54
|
realTimeProducerActions: {
|
|
40
55
|
/**
|
|
41
56
|
* Initialize the configured resources and start their source mechanisms.
|
|
42
57
|
*/
|
|
43
58
|
init: () => {
|
|
44
|
-
const { resourceTypesConfig: e, realTimeProducerActions:
|
|
45
|
-
|
|
59
|
+
const { resourceTypesConfig: e, realTimeProducerActions: o } = a(), s = (i, c) => {
|
|
60
|
+
o.ingestMessages(
|
|
46
61
|
i,
|
|
47
62
|
c,
|
|
48
63
|
"transport"
|
|
49
64
|
);
|
|
50
65
|
};
|
|
51
|
-
|
|
66
|
+
R((i) => {
|
|
52
67
|
const c = Date.now();
|
|
53
68
|
for (const r of e) {
|
|
54
69
|
const n = r.initialHashResources ? z(r.initialHashResources) : {};
|
|
@@ -57,22 +72,22 @@ function se(d, p = !1, M) {
|
|
|
57
72
|
sourceDataClass: M(
|
|
58
73
|
r,
|
|
59
74
|
s,
|
|
60
|
-
|
|
61
|
-
|
|
75
|
+
t,
|
|
76
|
+
B
|
|
62
77
|
),
|
|
63
78
|
status: "init",
|
|
64
79
|
hasResources: n,
|
|
65
80
|
subscribedClients: {}
|
|
66
|
-
},
|
|
81
|
+
}, C[r.resourceTypeId] = {
|
|
67
82
|
messagesToProcces: [],
|
|
68
|
-
messagesQueue: new
|
|
83
|
+
messagesQueue: new N(),
|
|
69
84
|
statusProccesing: !1
|
|
70
|
-
},
|
|
85
|
+
}, A[r.resourceTypeId] = new Map(
|
|
71
86
|
Object.entries(n).map(([l, u]) => [
|
|
72
87
|
O(l, u),
|
|
73
88
|
c
|
|
74
89
|
])
|
|
75
|
-
),
|
|
90
|
+
), j && i.hasResourcesTypes[r.resourceTypeId].sourceDataClass.start();
|
|
76
91
|
}
|
|
77
92
|
});
|
|
78
93
|
},
|
|
@@ -88,14 +103,14 @@ function se(d, p = !1, M) {
|
|
|
88
103
|
/**
|
|
89
104
|
* Subscribe one MF client and return the current producer hash without cloning it.
|
|
90
105
|
*/
|
|
91
|
-
subscribeResourceType: (e,
|
|
92
|
-
e in s.hasResourcesTypes && (s.hasResourcesTypes[e].subscribedClients[
|
|
106
|
+
subscribeResourceType: (e, o) => (R((s) => {
|
|
107
|
+
e in s.hasResourcesTypes && (s.hasResourcesTypes[e].subscribedClients[o.clientId] = o);
|
|
93
108
|
}), a().realTimeProducerActions.getResourceTypeSnapshot(e)),
|
|
94
109
|
/**
|
|
95
110
|
* Subscribe one MF client and send the current producer hash through callbacks.
|
|
96
111
|
*/
|
|
97
|
-
subscribe: (e,
|
|
98
|
-
const { onSubscribeCallbacks: s, ...i } =
|
|
112
|
+
subscribe: (e, o) => {
|
|
113
|
+
const { onSubscribeCallbacks: s, ...i } = o, c = a().realTimeProducerActions.subscribeResourceType(
|
|
99
114
|
e,
|
|
100
115
|
i
|
|
101
116
|
);
|
|
@@ -110,35 +125,50 @@ function se(d, p = !1, M) {
|
|
|
110
125
|
/**
|
|
111
126
|
* Unsubscribe one MF client from the current resource type.
|
|
112
127
|
*/
|
|
113
|
-
unsubscribe: (e,
|
|
114
|
-
|
|
115
|
-
delete s.hasResourcesTypes[e].subscribedClients[
|
|
128
|
+
unsubscribe: (e, o) => {
|
|
129
|
+
R((s) => {
|
|
130
|
+
delete s.hasResourcesTypes[e].subscribedClients[o];
|
|
116
131
|
});
|
|
117
132
|
},
|
|
133
|
+
/**
|
|
134
|
+
* Register one listener for future recovered-transport events.
|
|
135
|
+
*/
|
|
136
|
+
subscribeTransportReconnect: (e) => {
|
|
137
|
+
D.set(
|
|
138
|
+
e.clientId,
|
|
139
|
+
e.onReconnectCallback
|
|
140
|
+
);
|
|
141
|
+
},
|
|
142
|
+
/**
|
|
143
|
+
* Remove one recovered-transport listener.
|
|
144
|
+
*/
|
|
145
|
+
unsubscribeTransportReconnect: (e) => {
|
|
146
|
+
D.delete(e);
|
|
147
|
+
},
|
|
118
148
|
/**
|
|
119
149
|
* Enqueue one incoming realtime batch and start draining the queue.
|
|
120
150
|
*/
|
|
121
|
-
onMessages: (e,
|
|
151
|
+
onMessages: (e, o) => {
|
|
122
152
|
a().realTimeProducerActions.ingestMessages(
|
|
123
153
|
e,
|
|
124
|
-
|
|
154
|
+
o,
|
|
125
155
|
"transport"
|
|
126
156
|
);
|
|
127
157
|
},
|
|
128
158
|
/**
|
|
129
159
|
* Enqueue one incoming batch with explicit ingress metadata and start draining the matching queues.
|
|
130
160
|
*/
|
|
131
|
-
ingestMessages: (e,
|
|
132
|
-
|
|
133
|
-
|
|
161
|
+
ingestMessages: (e, o, s) => {
|
|
162
|
+
b(
|
|
163
|
+
t,
|
|
134
164
|
"producerIncomingBatch",
|
|
135
|
-
|
|
136
|
-
),
|
|
165
|
+
o.length
|
|
166
|
+
), V(
|
|
137
167
|
e,
|
|
138
|
-
|
|
168
|
+
o,
|
|
139
169
|
s
|
|
140
170
|
).forEach((c, r) => {
|
|
141
|
-
const n =
|
|
171
|
+
const n = C[r], l = a().hasResourcesTypes[r]?.config;
|
|
142
172
|
if (!n) {
|
|
143
173
|
console.error(
|
|
144
174
|
"Realtime producer received one batch for an unknown resourceTypeId; dropping those messages.",
|
|
@@ -151,17 +181,17 @@ function se(d, p = !1, M) {
|
|
|
151
181
|
return;
|
|
152
182
|
}
|
|
153
183
|
c.forEach((u) => {
|
|
154
|
-
const
|
|
184
|
+
const g = l ? X(
|
|
155
185
|
u.message,
|
|
156
186
|
l,
|
|
157
187
|
u.reason
|
|
158
188
|
) : u.message;
|
|
159
|
-
|
|
189
|
+
g && n.messagesQueue.enqueue({
|
|
160
190
|
...u,
|
|
161
|
-
message:
|
|
191
|
+
message: g
|
|
162
192
|
});
|
|
163
|
-
}),
|
|
164
|
-
|
|
193
|
+
}), b(
|
|
194
|
+
t,
|
|
165
195
|
"producerQueueLength",
|
|
166
196
|
n.messagesQueue.size()
|
|
167
197
|
), a().realTimeProducerActions.processMessages(r);
|
|
@@ -188,108 +218,108 @@ function se(d, p = !1, M) {
|
|
|
188
218
|
* messages enqueued during apply/notify are deferred to the next drain instead of being interleaved.
|
|
189
219
|
*/
|
|
190
220
|
processMessages: (e) => {
|
|
191
|
-
const
|
|
192
|
-
|
|
193
|
-
), s =
|
|
221
|
+
const o = S(
|
|
222
|
+
t
|
|
223
|
+
), s = C[e], i = A[e];
|
|
194
224
|
if (s.statusProccesing)
|
|
195
225
|
return;
|
|
196
226
|
s.statusProccesing = !0;
|
|
197
|
-
const c =
|
|
227
|
+
const c = W(s.messagesQueue);
|
|
198
228
|
if (!c.length) {
|
|
199
229
|
s.statusProccesing = !1;
|
|
200
230
|
return;
|
|
201
231
|
}
|
|
202
|
-
|
|
203
|
-
|
|
232
|
+
b(
|
|
233
|
+
t,
|
|
204
234
|
"producerDrainSet",
|
|
205
235
|
c.length
|
|
206
236
|
);
|
|
207
237
|
const r = Date.now(), n = a().hasResourcesTypes[e], l = /* @__PURE__ */ new Map();
|
|
208
238
|
c.forEach(({ message: h }) => {
|
|
209
|
-
const
|
|
239
|
+
const m = h.resourceSerialId;
|
|
210
240
|
l.set(
|
|
211
|
-
|
|
212
|
-
(l.get(
|
|
241
|
+
m,
|
|
242
|
+
(l.get(m) ?? 0) + 1
|
|
213
243
|
);
|
|
214
244
|
});
|
|
215
245
|
let u = 0;
|
|
216
246
|
l.forEach((h) => {
|
|
217
247
|
h > 1 && (u += 1);
|
|
218
|
-
}),
|
|
219
|
-
|
|
248
|
+
}), b(
|
|
249
|
+
t,
|
|
220
250
|
"producerRepeatedResourceCount",
|
|
221
251
|
u
|
|
222
|
-
),
|
|
223
|
-
|
|
252
|
+
), t && b(
|
|
253
|
+
t,
|
|
224
254
|
"producerSubscriberCount",
|
|
225
255
|
Object.keys(n.subscribedClients).length
|
|
226
256
|
);
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
),
|
|
257
|
+
const g = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Set(), x = S(
|
|
258
|
+
t
|
|
259
|
+
), k = c.map(({
|
|
230
260
|
message: h,
|
|
231
|
-
reason:
|
|
261
|
+
reason: m
|
|
232
262
|
}) => {
|
|
233
|
-
const
|
|
234
|
-
|
|
263
|
+
const f = h.resourceSerialId, w = y.has(f) ? g.get(f) : n.hasResources[f], T = F(
|
|
264
|
+
w,
|
|
235
265
|
h,
|
|
236
266
|
n.config,
|
|
237
|
-
|
|
267
|
+
m
|
|
238
268
|
);
|
|
239
|
-
return (l.get(
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
269
|
+
return (l.get(f) ?? 0) > 1 && (y.add(f), T.type === "delete" ? g.set(f, void 0) : g.set(
|
|
270
|
+
f,
|
|
271
|
+
G(
|
|
272
|
+
w ?? {},
|
|
273
|
+
T.payload,
|
|
274
|
+
f
|
|
245
275
|
)
|
|
246
|
-
)),
|
|
276
|
+
)), T;
|
|
247
277
|
});
|
|
248
278
|
P(
|
|
249
|
-
|
|
279
|
+
t,
|
|
250
280
|
"producerSanitizeDurationMs",
|
|
251
|
-
|
|
281
|
+
x
|
|
252
282
|
);
|
|
253
283
|
try {
|
|
254
|
-
const h =
|
|
255
|
-
|
|
284
|
+
const h = S(
|
|
285
|
+
t
|
|
256
286
|
);
|
|
257
|
-
|
|
258
|
-
const
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
287
|
+
R((f) => {
|
|
288
|
+
const T = f.hasResourcesTypes[e].hasResources;
|
|
289
|
+
k.forEach((H) => {
|
|
290
|
+
J(
|
|
291
|
+
T,
|
|
262
292
|
i,
|
|
263
|
-
|
|
293
|
+
H,
|
|
264
294
|
r
|
|
265
295
|
);
|
|
266
296
|
});
|
|
267
297
|
}), P(
|
|
268
|
-
|
|
298
|
+
t,
|
|
269
299
|
"producerApplyDurationMs",
|
|
270
300
|
h
|
|
271
|
-
),
|
|
272
|
-
|
|
301
|
+
), t && b(
|
|
302
|
+
t,
|
|
273
303
|
"producerResourceCount",
|
|
274
304
|
Object.keys(a().hasResourcesTypes[e].hasResources).length
|
|
275
305
|
);
|
|
276
|
-
const
|
|
277
|
-
|
|
306
|
+
const m = S(
|
|
307
|
+
t
|
|
278
308
|
);
|
|
279
|
-
|
|
309
|
+
K(
|
|
280
310
|
e,
|
|
281
311
|
a().hasResourcesTypes[e].subscribedClients,
|
|
282
|
-
|
|
312
|
+
k
|
|
283
313
|
), P(
|
|
284
|
-
|
|
314
|
+
t,
|
|
285
315
|
"producerNotifyDurationMs",
|
|
286
|
-
|
|
316
|
+
m
|
|
287
317
|
);
|
|
288
318
|
} finally {
|
|
289
319
|
P(
|
|
290
|
-
|
|
320
|
+
t,
|
|
291
321
|
"producerProcessDurationMs",
|
|
292
|
-
|
|
322
|
+
o
|
|
293
323
|
), s.statusProccesing = !1;
|
|
294
324
|
}
|
|
295
325
|
s.messagesQueue.isEmpty() || a().realTimeProducerActions.processMessages(e);
|
|
@@ -297,16 +327,16 @@ function se(d, p = !1, M) {
|
|
|
297
327
|
/**
|
|
298
328
|
* Emit delete messages for resources that have not received updates inside the configured TTL window.
|
|
299
329
|
*/
|
|
300
|
-
cleanupStaleResources: (e,
|
|
301
|
-
const s = a().hasResourcesTypes[e], i = s?.config.staleResourceTtlMs, c =
|
|
330
|
+
cleanupStaleResources: (e, o = Date.now()) => {
|
|
331
|
+
const s = a().hasResourcesTypes[e], i = s?.config.staleResourceTtlMs, c = A[e];
|
|
302
332
|
if (!s || !c || i === void 0 || i <= 0)
|
|
303
333
|
return 0;
|
|
304
334
|
const r = Object.keys(s.hasResources).reduce((n, l) => {
|
|
305
|
-
const u = s.hasResources[l],
|
|
335
|
+
const u = s.hasResources[l], g = O(
|
|
306
336
|
l,
|
|
307
337
|
u
|
|
308
|
-
),
|
|
309
|
-
return
|
|
338
|
+
), y = c.get(g);
|
|
339
|
+
return y !== void 0 && o - y > i && n.push(g), n;
|
|
310
340
|
}, []);
|
|
311
341
|
return r.length ? (a().realTimeProducerActions.ingestMessages(
|
|
312
342
|
e,
|
|
@@ -321,10 +351,10 @@ function se(d, p = !1, M) {
|
|
|
321
351
|
}
|
|
322
352
|
}
|
|
323
353
|
})),
|
|
324
|
-
{ name: `${
|
|
354
|
+
{ name: `${$}: ${E.storeId}`, enabled: p }
|
|
325
355
|
)
|
|
326
356
|
);
|
|
327
357
|
}
|
|
328
358
|
export {
|
|
329
|
-
|
|
359
|
+
oe as createRealTimeStore
|
|
330
360
|
};
|
package/web/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/web/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,iBAAiB,GACvB,qBAAqB,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/web/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,KAAK,EACV,qBAAqB,EACtB,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,iBAAiB,GACvB,qBAAqB,CA2EvB"}
|
package/web/tools.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function
|
|
1
|
+
function p(t) {
|
|
2
2
|
return {
|
|
3
3
|
getResourceTypeSnapshot: (e) => t.getState().realTimeProducerActions.getResourceTypeSnapshot(
|
|
4
4
|
e
|
|
@@ -10,25 +10,31 @@ function b(t) {
|
|
|
10
10
|
sourceDataMechanism: s.config.sourceDataMechanism
|
|
11
11
|
} : null;
|
|
12
12
|
},
|
|
13
|
-
publishMessages: (e, s,
|
|
13
|
+
publishMessages: (e, s, c = "publish") => {
|
|
14
14
|
t.getState().realTimeProducerActions.ingestMessages(
|
|
15
15
|
e,
|
|
16
16
|
s,
|
|
17
|
-
|
|
17
|
+
c
|
|
18
18
|
);
|
|
19
19
|
},
|
|
20
20
|
subscribe: (e, s) => {
|
|
21
21
|
t.getState().realTimeProducerActions.subscribe(e, s);
|
|
22
22
|
},
|
|
23
|
+
subscribeTransportReconnect: (e) => {
|
|
24
|
+
t.getState().realTimeProducerActions.subscribeTransportReconnect(e);
|
|
25
|
+
},
|
|
23
26
|
subscribeResourceType: (e, s) => t.getState().realTimeProducerActions.subscribeResourceType(
|
|
24
27
|
e,
|
|
25
28
|
s
|
|
26
29
|
),
|
|
27
30
|
unsubscribe: (e, s) => {
|
|
28
31
|
t.getState().realTimeProducerActions.unsubscribe(e, s);
|
|
32
|
+
},
|
|
33
|
+
unsubscribeTransportReconnect: (e) => {
|
|
34
|
+
t.getState().realTimeProducerActions.unsubscribeTransportReconnect(e);
|
|
29
35
|
}
|
|
30
36
|
};
|
|
31
37
|
}
|
|
32
38
|
export {
|
|
33
|
-
|
|
39
|
+
p as createRealTimeProducerTools
|
|
34
40
|
};
|
package/web/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ObjectQueue } from '../engine/ObjectQueue';
|
|
2
|
-
import { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback, OnRealTimeTransportReconnectCallback, RealTimeMessage, RealTimeMessageIngressReason, RealTimeReadonlyResourceHash, RealTimeResourceHash, RealTimeResourceSourceMechanismConfig, RealTimeResourceTypeId, RealTimeStatus, Subscriber, SubscribeOptions, SubscribeResourceTypeOptions } from '../contracts';
|
|
2
|
+
import { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback, OnRealTimeTransportReconnectCallback, RealTimeMessage, RealTimeMessageIngressReason, RealTimeReadonlyResourceHash, RealTimeResourceHash, RealTimeResourceSourceMechanismConfig, RealTimeResourceTypeId, RealTimeStatus, Subscriber, SubscribeOptions, SubscribeTransportReconnectOptions, SubscribeResourceTypeOptions } from '../contracts';
|
|
3
3
|
/**
|
|
4
4
|
* Internal queued message entry that preserves the ingress reason across async producer draining.
|
|
5
5
|
*/
|
|
@@ -104,6 +104,14 @@ export interface RealTimeProducerStoreStateWithActions extends RealTimeProducerS
|
|
|
104
104
|
* Unsubscribe a client from realtime updates.
|
|
105
105
|
*/
|
|
106
106
|
unsubscribe: (resourceTypeId: RealTimeResourceTypeId, clientId: string) => void;
|
|
107
|
+
/**
|
|
108
|
+
* Register one listener for recovered transport events.
|
|
109
|
+
*/
|
|
110
|
+
subscribeTransportReconnect: (options: SubscribeTransportReconnectOptions) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Remove one recovered-transport listener.
|
|
113
|
+
*/
|
|
114
|
+
unsubscribeTransportReconnect: (clientId: string) => void;
|
|
107
115
|
/**
|
|
108
116
|
* Accept a raw incoming batch and enqueue it for producer-side processing.
|
|
109
117
|
*/
|
package/web/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/web/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EACV,uB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|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../packages/realtime-runtime/src/web/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,KAAK,EACV,uBAAuB,EACvB,gCAAgC,EAChC,oCAAoC,EACpC,eAAe,EACf,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,qCAAqC,EACrC,sBAAsB,EACtB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,kCAAkC,EAClC,4BAA4B,EAC7B,MAAM,cAAc,CAAC;AAEtB;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,OAAO,EAAE,eAAe,CAAC;IACzB;;OAEG;IACH,MAAM,EAAE,4BAA4B,CAAC;CACtC;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB,CAAC,QAAQ,GAAG,eAAe;IAC7D;;OAEG;IACH,iBAAiB,EAAE,eAAe,EAAE,CAAC;IACrC;;OAEG;IACH,aAAa,EAAE,WAAW,CAAC,QAAQ,CAAC,CAAC;IACrC;;OAEG;IACH,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,MAAM,EAAE,qCAAqC,CAAC;IAC9C;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,eAAe,EAAE;QACf,KAAK,IAAI,IAAI,CAAC;QACd,IAAI,IAAI,IAAI,CAAC;KACd,CAAC;IACF;;OAEG;IACH,YAAY,EAAE,oBAAoB,CAAC;IACnC;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,mBAAmB,EAAE,qCAAqC,EAAE,CAAC;IAC7D;;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