@m4l/realtime-runtime 1.3.0 → 1.4.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 +27 -0
- package/contracts/types.d.ts.map +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/transport/atmosphere/SourceDataAtmosphere.d.ts +15 -4
- package/transport/atmosphere/SourceDataAtmosphere.d.ts.map +1 -1
- package/transport/atmosphere/SourceDataAtmosphere.js +144 -81
- package/transport/atmosphere/createAtmosphereSourceData.d.ts +3 -3
- package/transport/atmosphere/createAtmosphereSourceData.d.ts.map +1 -1
- package/transport/atmosphere/createAtmosphereSourceData.js +28 -20
- package/web/store.d.ts +2 -2
- package/web/store.d.ts.map +1 -1
- package/web/store.js +44 -42
- package/web/types.d.ts +6 -2
- package/web/types.d.ts.map +1 -1
package/contracts/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export type { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback, OnRealTimeConsumerMessageCallback, OnRealtimeConsumerSubscribeCallback, RealTimeMessage, RealTimeMessageIngressReason, RealTimeResourceMessageNormalizeContext, RealTimeResourceMessageNormalizeStrategy, RealTimeMessagePayload, RealTimeProducerTools, RealTimeProducerMetricName, RealTimeReadonlyResourceHash, RealTimeResourceMergeContext, RealTimeResourceHash, RealTimeResourcePayloadMergeStrategy, RealTimeResourceRuntimeMeta, RealTimeResourceSerialId, RealTimeResourceSourceMechanismConfig, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSourceMechanismConfigBase, 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, 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,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,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,gBAAgB,EAChB,4BAA4B,EAC5B,UAAU,GACX,MAAM,SAAS,CAAC"}
|
package/contracts/types.d.ts
CHANGED
|
@@ -290,6 +290,33 @@ export interface RealTimeResourceType {
|
|
|
290
290
|
* Callback used by realtime source mechanisms to forward messages into the store.
|
|
291
291
|
*/
|
|
292
292
|
export type OnMessagesStoreCallback = (resourceTypeId: RealTimeResourceTypeId, message: RealTimeMessage[]) => void;
|
|
293
|
+
/**
|
|
294
|
+
* Low-cardinality reconnect reasons emitted by browser realtime transports.
|
|
295
|
+
*/
|
|
296
|
+
export type RealTimeTransportReconnectReason = 'browser_recovery' | 'failure_to_reconnect' | 'open_timeout' | 'transport_closed' | 'transport_error' | 'transport_failure';
|
|
297
|
+
/**
|
|
298
|
+
* Browser lifecycle triggers that can force one stale transport recovery.
|
|
299
|
+
*/
|
|
300
|
+
export type RealTimeTransportBrowserRecoveryTrigger = 'focus' | 'online' | 'visibilitychange';
|
|
301
|
+
/**
|
|
302
|
+
* Host-owned reconnect event emitted when one browser realtime transport recovers.
|
|
303
|
+
*/
|
|
304
|
+
export interface RealTimeTransportReconnectEvent {
|
|
305
|
+
browserRecoveryTrigger?: RealTimeTransportBrowserRecoveryTrigger;
|
|
306
|
+
reconnectDurationMs: number;
|
|
307
|
+
reconnectReason: RealTimeTransportReconnectReason;
|
|
308
|
+
resourceTypeIds: RealTimeResourceTypeId[];
|
|
309
|
+
responseError?: string;
|
|
310
|
+
responseReason?: string;
|
|
311
|
+
responseState?: string;
|
|
312
|
+
sourceDataMechanism: 'atmosphere';
|
|
313
|
+
transport?: string;
|
|
314
|
+
transportAttempt: number;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Optional callback used by browser runtimes to report one recovered transport.
|
|
318
|
+
*/
|
|
319
|
+
export type OnRealTimeTransportReconnectCallback = (event: RealTimeTransportReconnectEvent) => void;
|
|
293
320
|
/**
|
|
294
321
|
* Producer-runtime metric names emitted by the generic engine.
|
|
295
322
|
*/
|
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,WAAW,GACX,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;I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GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,MAAM,EAAE,qCAAqC,CAAC;IAC9C;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,eAAe,EAAE,cAAc,CAAC;IAChC;;OAEG;IACH,YAAY,EAAE,oBAAoB,CAAC;IACnC;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,cAAc,EAAE,sBAAsB,EACtC,OAAO,EAAE,eAAe,EAAE,KACvB,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"}
|
|
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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CAAC;IACvB,mBAAmB,EAAE,YAAY,CAAC;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;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/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, OnRealTimeConsumerMessageCallback, OnRealtimeConsumerSubscribeCallback, RealTimeMessage, RealTimeMessageIngressReason, RealTimeResourceMessageNormalizeContext, RealTimeResourceMessageNormalizeStrategy, RealTimeMessagePayload, RealTimeProducerTools, RealTimeProducerMetricName, RealTimeReadonlyResourceHash, RealTimeResourceMergeContext, RealTimeResourceHash, RealTimeResourcePayloadMergeStrategy, RealTimeResourceRuntimeMeta, RealTimeResourceSerialId, RealTimeResourceSourceMechanismConfig, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSourceMechanismConfigBase, 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, 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,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,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,gBAAgB,EAChB,4BAA4B,EAC5B,UAAU,GACX,MAAM,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { OnRealTimeProducerMetricCallback, OnMessagesStoreCallback, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceTypeId } from '../../contracts';
|
|
1
|
+
import { OnRealTimeProducerMetricCallback, OnRealTimeTransportReconnectCallback, OnMessagesStoreCallback, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceTypeId } from '../../contracts';
|
|
2
2
|
import { SourceDataBase } from '../SourceDataBase';
|
|
3
3
|
/**
|
|
4
4
|
* Normalize the Atmosphere request base URL so websocket upgrades and HTTP fallback transports share one safe origin.
|
|
@@ -10,13 +10,16 @@ declare function resolveAtmosphereRequestUrl(config: RealTimeResourceSourceMecha
|
|
|
10
10
|
export declare class SharedAtmosphereTransport {
|
|
11
11
|
private readonly onMessages;
|
|
12
12
|
private readonly onPerformanceMetric?;
|
|
13
|
+
private readonly onTransportReconnect?;
|
|
13
14
|
private subSocket;
|
|
14
15
|
private reconnectTimeout;
|
|
15
16
|
private transportOpenTimeout;
|
|
16
17
|
private transportAttempt;
|
|
17
18
|
private browserRecoveryListenersBound;
|
|
18
19
|
private isTransportOpen;
|
|
20
|
+
private hasCompletedOneTransportOpen;
|
|
19
21
|
private lastMessageTime;
|
|
22
|
+
private pendingReconnect;
|
|
20
23
|
private connectionSignature;
|
|
21
24
|
private readonly activeConfigs;
|
|
22
25
|
/**
|
|
@@ -31,7 +34,7 @@ export declare class SharedAtmosphereTransport {
|
|
|
31
34
|
* Recheck the current transport when the tab becomes visible again.
|
|
32
35
|
*/
|
|
33
36
|
private readonly handleBrowserVisibilityChange;
|
|
34
|
-
constructor(onMessages: OnMessagesStoreCallback, onPerformanceMetric?: OnRealTimeProducerMetricCallback | undefined);
|
|
37
|
+
constructor(onMessages: OnMessagesStoreCallback, onPerformanceMetric?: OnRealTimeProducerMetricCallback | undefined, onTransportReconnect?: OnRealTimeTransportReconnectCallback | undefined);
|
|
35
38
|
/**
|
|
36
39
|
* Register one resource type in the active shared transport group.
|
|
37
40
|
*/
|
|
@@ -84,6 +87,14 @@ export declare class SharedAtmosphereTransport {
|
|
|
84
87
|
* Mark the transport as healthy again after one successful open or message.
|
|
85
88
|
*/
|
|
86
89
|
private markTransportHealthy;
|
|
90
|
+
/**
|
|
91
|
+
* Remember why the next successful open should count as one recovered transport.
|
|
92
|
+
*/
|
|
93
|
+
private armPendingReconnect;
|
|
94
|
+
/**
|
|
95
|
+
* Emit one host-owned reconnect event after the transport becomes healthy again.
|
|
96
|
+
*/
|
|
97
|
+
private emitTransportReconnect;
|
|
87
98
|
/**
|
|
88
99
|
* Force one fresh reconnect when the current transport never reaches onOpen.
|
|
89
100
|
*/
|
|
@@ -110,7 +121,7 @@ export declare class SharedAtmosphereTransport {
|
|
|
110
121
|
*/
|
|
111
122
|
export declare class SourceDataAtmosphere extends SourceDataBase {
|
|
112
123
|
private readonly sharedTransport;
|
|
113
|
-
constructor(config: RealTimeResourceSourceMechanismConfigAtmosphere, onMessages: OnMessagesStoreCallback, sharedTransport?: SharedAtmosphereTransport, onPerformanceMetric?: OnRealTimeProducerMetricCallback);
|
|
124
|
+
constructor(config: RealTimeResourceSourceMechanismConfigAtmosphere, onMessages: OnMessagesStoreCallback, sharedTransport?: SharedAtmosphereTransport, onPerformanceMetric?: OnRealTimeProducerMetricCallback, onTransportReconnect?: OnRealTimeTransportReconnectCallback);
|
|
114
125
|
/**
|
|
115
126
|
* Start the realtime transport connection.
|
|
116
127
|
*/
|
|
@@ -121,5 +132,5 @@ export declare class SourceDataAtmosphere extends SourceDataBase {
|
|
|
121
132
|
stop(): void;
|
|
122
133
|
}
|
|
123
134
|
export default SourceDataAtmosphere;
|
|
124
|
-
export { resolveAtmosphereRequestUrl
|
|
135
|
+
export { resolveAtmosphereRequestUrl };
|
|
125
136
|
//# sourceMappingURL=SourceDataAtmosphere.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SourceDataAtmosphere.d.ts","sourceRoot":"","sources":["../../../../../../packages/realtime-runtime/src/transport/atmosphere/SourceDataAtmosphere.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,uBAAuB,
|
|
1
|
+
{"version":3,"file":"SourceDataAtmosphere.d.ts","sourceRoot":"","sources":["../../../../../../packages/realtime-runtime/src/transport/atmosphere/SourceDataAtmosphere.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,oCAAoC,EACpC,uBAAuB,EAIvB,+CAA+C,EAC/C,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA+GnD;;GAEG;AACH,iBAAS,2BAA2B,CAClC,MAAM,EAAE,+CAA+C,UA0BxD;AAED;;GAEG;AACH,qBAAa,yBAAyB;IA6ClC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAC;IACrC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IA9CxC,OAAO,CAAC,SAAS,CAAmC;IACpD,OAAO,CAAC,gBAAgB,CACjB;IACP,OAAO,CAAC,oBAAoB,CAEZ;IAChB,OAAO,CAAC,gBAAgB,CAAK;IAC7B,OAAO,CAAC,6BAA6B,CAAS;IAC9C,OAAO,CAAC,eAAe,CAAS;IAChC,OAAO,CAAC,4BAA4B,CAAS;IAC7C,OAAO,CAAC,eAAe,CAAiC;IACxD,OAAO,CAAC,gBAAgB,CAA0C;IAClE,OAAO,CAAC,mBAAmB,CAAuB;IAClD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAG1B;IAEJ;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAEjC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B,EAC3C,mBAAmB,CAAC,EAAE,gCAAgC,EACtD,oBAAoB,CAAC,EAAE,oCAAoC;IAY7D;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb;;OAEG;IACH,IAAI,IAAI,IAAI;CAGb;AAED,eAAe,oBAAoB,CAAC;AACpC,OAAO,EAAE,2BAA2B,EAAE,CAAC"}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { SourceDataBase as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { SourceDataBase as g } from "../SourceDataBase.js";
|
|
2
|
+
import * as w from "atmosphere.js";
|
|
3
|
+
import y from "camelcase-keys";
|
|
4
|
+
const A = "warn", S = 2e3, O = 1e4, M = 6e4, f = "2.0.0";
|
|
5
5
|
function E() {
|
|
6
|
-
const t =
|
|
6
|
+
const t = w;
|
|
7
7
|
return t.subscribe ?? t.default?.subscribe;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function o() {
|
|
10
10
|
return typeof globalThis.performance?.now == "function" ? globalThis.performance.now() : Date.now();
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
return t ?
|
|
12
|
+
function u(t) {
|
|
13
|
+
return t ? o() : 0;
|
|
14
14
|
}
|
|
15
|
-
function
|
|
15
|
+
function p(t, e, s) {
|
|
16
16
|
t && t(
|
|
17
17
|
e,
|
|
18
|
-
Math.max(0,
|
|
18
|
+
Math.max(0, o() - s)
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function C(t) {
|
|
22
22
|
return {
|
|
23
23
|
action: t.action,
|
|
24
24
|
session_id: t.sessionId,
|
|
@@ -36,23 +36,23 @@ function L(t) {
|
|
|
36
36
|
}))
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function d(t) {
|
|
40
40
|
return JSON.stringify({
|
|
41
41
|
database: t.database,
|
|
42
42
|
fallbackTransport: t.fallbackTransport ?? "long-polling",
|
|
43
43
|
requestUrl: T(t),
|
|
44
44
|
sessionId: t.sessionId,
|
|
45
45
|
accountId: t.accountId,
|
|
46
|
-
version: t.version ??
|
|
46
|
+
version: t.version ?? f
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
function T(t) {
|
|
50
50
|
const e = t.host.trim(), r = `${e.endsWith(t.path) ? "" : t.path}${t.topic}`;
|
|
51
51
|
return e ? e.startsWith("wss://") ? `https://${e.slice(6)}${r}` : e.startsWith("ws://") ? `http://${e.slice(5)}${r}` : e.startsWith("https://") || e.startsWith("http://") ? `${e}${r}` : `https://${e}${r}` : `${t.path}${t.topic}`;
|
|
52
52
|
}
|
|
53
|
-
class
|
|
54
|
-
constructor(e, s) {
|
|
55
|
-
this.onMessages = e, this.onPerformanceMetric = s;
|
|
53
|
+
class L {
|
|
54
|
+
constructor(e, s, r) {
|
|
55
|
+
this.onMessages = e, this.onPerformanceMetric = s, this.onTransportReconnect = r;
|
|
56
56
|
}
|
|
57
57
|
subSocket = null;
|
|
58
58
|
reconnectTimeout = null;
|
|
@@ -60,7 +60,9 @@ class B {
|
|
|
60
60
|
transportAttempt = 0;
|
|
61
61
|
browserRecoveryListenersBound = !1;
|
|
62
62
|
isTransportOpen = !1;
|
|
63
|
-
|
|
63
|
+
hasCompletedOneTransportOpen = !1;
|
|
64
|
+
lastMessageTime = o();
|
|
65
|
+
pendingReconnect = null;
|
|
64
66
|
connectionSignature = null;
|
|
65
67
|
activeConfigs = /* @__PURE__ */ new Map();
|
|
66
68
|
/**
|
|
@@ -86,7 +88,7 @@ class B {
|
|
|
86
88
|
*/
|
|
87
89
|
start(e) {
|
|
88
90
|
const s = this.activeConfigs.size === 0;
|
|
89
|
-
if (this.assertCompatibleConfig(e), this.activeConfigs.set(e.resourceTypeId, e), this.connectionSignature = this.connectionSignature ??
|
|
91
|
+
if (this.assertCompatibleConfig(e), this.activeConfigs.set(e.resourceTypeId, e), this.connectionSignature = this.connectionSignature ?? d(e), s) {
|
|
90
92
|
this.bindBrowserRecoveryListeners(), this.connect();
|
|
91
93
|
return;
|
|
92
94
|
}
|
|
@@ -102,7 +104,7 @@ class B {
|
|
|
102
104
|
* Keep one shared transport restricted to a single Atmosphere connection contract per runtime.
|
|
103
105
|
*/
|
|
104
106
|
assertCompatibleConfig(e) {
|
|
105
|
-
if (!(!this.connectionSignature ||
|
|
107
|
+
if (!(!this.connectionSignature || d(e) === this.connectionSignature))
|
|
106
108
|
throw new Error(
|
|
107
109
|
"Atmosphere runtime factory only supports one shared Atmosphere connection per runtime. Received one incompatible resource config that would require a second socket."
|
|
108
110
|
);
|
|
@@ -114,7 +116,7 @@ class B {
|
|
|
114
116
|
const e = this.getRepresentativeConfig();
|
|
115
117
|
if (!e || !this.subSocket)
|
|
116
118
|
return;
|
|
117
|
-
this.lastMessageTime =
|
|
119
|
+
this.lastMessageTime = o();
|
|
118
120
|
const s = {
|
|
119
121
|
action: "subscribe",
|
|
120
122
|
database: e.database,
|
|
@@ -128,11 +130,11 @@ class B {
|
|
|
128
130
|
})),
|
|
129
131
|
sessionId: e.sessionId,
|
|
130
132
|
accountId: e.accountId,
|
|
131
|
-
version: e.version ??
|
|
133
|
+
version: e.version ?? f
|
|
132
134
|
};
|
|
133
|
-
this.subSocket.push?.(
|
|
134
|
-
|
|
135
|
-
)
|
|
135
|
+
this.subSocket.push?.(
|
|
136
|
+
JSON.stringify(C(s))
|
|
137
|
+
);
|
|
136
138
|
}
|
|
137
139
|
/**
|
|
138
140
|
* Return the current compatibility config that defines the shared connection details.
|
|
@@ -174,26 +176,62 @@ class B {
|
|
|
174
176
|
* Attach browser lifecycle listeners that can recover one stale tab transport.
|
|
175
177
|
*/
|
|
176
178
|
bindBrowserRecoveryListeners() {
|
|
177
|
-
this.browserRecoveryListenersBound || !this.hasBrowserRecoverySupport() || (window.addEventListener("focus", this.handleBrowserFocus), window.addEventListener("online", this.handleBrowserOnline), document.addEventListener(
|
|
179
|
+
this.browserRecoveryListenersBound || !this.hasBrowserRecoverySupport() || (window.addEventListener("focus", this.handleBrowserFocus), window.addEventListener("online", this.handleBrowserOnline), document.addEventListener(
|
|
180
|
+
"visibilitychange",
|
|
181
|
+
this.handleBrowserVisibilityChange
|
|
182
|
+
), this.browserRecoveryListenersBound = !0);
|
|
178
183
|
}
|
|
179
184
|
/**
|
|
180
185
|
* Remove browser lifecycle listeners during transport shutdown.
|
|
181
186
|
*/
|
|
182
187
|
unbindBrowserRecoveryListeners() {
|
|
183
|
-
!this.browserRecoveryListenersBound || !this.hasBrowserRecoverySupport() || (window.removeEventListener("focus", this.handleBrowserFocus), window.removeEventListener("online", this.handleBrowserOnline), document.removeEventListener(
|
|
188
|
+
!this.browserRecoveryListenersBound || !this.hasBrowserRecoverySupport() || (window.removeEventListener("focus", this.handleBrowserFocus), window.removeEventListener("online", this.handleBrowserOnline), document.removeEventListener(
|
|
189
|
+
"visibilitychange",
|
|
190
|
+
this.handleBrowserVisibilityChange
|
|
191
|
+
), this.browserRecoveryListenersBound = !1);
|
|
184
192
|
}
|
|
185
193
|
/**
|
|
186
194
|
* Mark the transport as healthy again after one successful open or message.
|
|
187
195
|
*/
|
|
188
196
|
markTransportHealthy() {
|
|
189
|
-
this.isTransportOpen = !0, this.lastMessageTime =
|
|
197
|
+
this.isTransportOpen = !0, this.lastMessageTime = o(), this.clearTransportOpenTimeout(), this.clearReconnectTimeout();
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Remember why the next successful open should count as one recovered transport.
|
|
201
|
+
*/
|
|
202
|
+
armPendingReconnect(e, s = {}) {
|
|
203
|
+
this.pendingReconnect || (this.pendingReconnect = {
|
|
204
|
+
reconnectReason: e,
|
|
205
|
+
startedAtMs: o(),
|
|
206
|
+
...s
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Emit one host-owned reconnect event after the transport becomes healthy again.
|
|
211
|
+
*/
|
|
212
|
+
emitTransportReconnect(e) {
|
|
213
|
+
if (!this.pendingReconnect)
|
|
214
|
+
return;
|
|
215
|
+
const s = this.pendingReconnect;
|
|
216
|
+
this.pendingReconnect = null, this.onTransportReconnect?.({
|
|
217
|
+
...s,
|
|
218
|
+
reconnectDurationMs: Math.max(
|
|
219
|
+
0,
|
|
220
|
+
o() - s.startedAtMs
|
|
221
|
+
),
|
|
222
|
+
resourceTypeIds: Array.from(this.activeConfigs.keys()),
|
|
223
|
+
sourceDataMechanism: "atmosphere",
|
|
224
|
+
transportAttempt: e
|
|
225
|
+
});
|
|
190
226
|
}
|
|
191
227
|
/**
|
|
192
228
|
* Force one fresh reconnect when the current transport never reaches onOpen.
|
|
193
229
|
*/
|
|
194
230
|
armTransportOpenTimeout(e) {
|
|
195
231
|
this.clearTransportOpenTimeout(), this.transportOpenTimeout = setTimeout(() => {
|
|
196
|
-
this.transportOpenTimeout = null, this.isActiveAttempt(e) && (console.warn(
|
|
232
|
+
this.transportOpenTimeout = null, this.isActiveAttempt(e) && (console.warn(
|
|
233
|
+
"Atmosphere: transport open timed out; scheduling reconnect"
|
|
234
|
+
), this.armPendingReconnect("open_timeout"), this.tryReconnect());
|
|
197
235
|
}, O);
|
|
198
236
|
}
|
|
199
237
|
/**
|
|
@@ -203,15 +241,25 @@ class B {
|
|
|
203
241
|
if (!this.activeConfigs.size)
|
|
204
242
|
return;
|
|
205
243
|
if (!this.subSocket) {
|
|
206
|
-
console.warn(
|
|
207
|
-
|
|
244
|
+
console.warn(
|
|
245
|
+
"Atmosphere: browser recovery found no active socket; scheduling reconnect",
|
|
246
|
+
{
|
|
247
|
+
reason: e
|
|
248
|
+
}
|
|
249
|
+
), this.armPendingReconnect("browser_recovery", {
|
|
250
|
+
browserRecoveryTrigger: e
|
|
208
251
|
}), this.tryReconnect();
|
|
209
252
|
return;
|
|
210
253
|
}
|
|
211
|
-
const s =
|
|
212
|
-
s < M || (console.warn(
|
|
213
|
-
|
|
214
|
-
|
|
254
|
+
const s = o() - this.lastMessageTime;
|
|
255
|
+
s < M || (console.warn(
|
|
256
|
+
"Atmosphere: browser recovery found one stale transport; scheduling reconnect",
|
|
257
|
+
{
|
|
258
|
+
reason: e,
|
|
259
|
+
silenceDurationMs: s
|
|
260
|
+
}
|
|
261
|
+
), this.armPendingReconnect("browser_recovery", {
|
|
262
|
+
browserRecoveryTrigger: e
|
|
215
263
|
}), this.tryReconnect());
|
|
216
264
|
}
|
|
217
265
|
/**
|
|
@@ -223,10 +271,10 @@ class B {
|
|
|
223
271
|
return;
|
|
224
272
|
const s = T(e), r = this.transportAttempt + 1;
|
|
225
273
|
this.transportAttempt = r, this.isTransportOpen = !1;
|
|
226
|
-
const
|
|
274
|
+
const l = {
|
|
227
275
|
url: s,
|
|
228
276
|
contentType: "application/json",
|
|
229
|
-
logLevel:
|
|
277
|
+
logLevel: A,
|
|
230
278
|
transport: "websocket",
|
|
231
279
|
fallbackTransport: e.fallbackTransport ?? "long-polling",
|
|
232
280
|
reconnectInterval: 2e3,
|
|
@@ -234,13 +282,13 @@ class B {
|
|
|
234
282
|
* Resubscribe as soon as the connection opens.
|
|
235
283
|
*/
|
|
236
284
|
onOpen: () => {
|
|
237
|
-
this.isActiveAttempt(r) && (this.markTransportHealthy(), this.sendSubscribe());
|
|
285
|
+
this.isActiveAttempt(r) && (this.markTransportHealthy(), this.sendSubscribe(), this.hasCompletedOneTransportOpen ? this.emitTransportReconnect(r) : this.hasCompletedOneTransportOpen = !0);
|
|
238
286
|
},
|
|
239
287
|
/**
|
|
240
288
|
* Resubscribe after an Atmosphere reconnect event.
|
|
241
289
|
*/
|
|
242
290
|
onReopen: () => {
|
|
243
|
-
this.isActiveAttempt(r) && (this.markTransportHealthy(), this.sendSubscribe());
|
|
291
|
+
this.isActiveAttempt(r) && (this.markTransportHealthy(), this.sendSubscribe(), this.hasCompletedOneTransportOpen || (this.hasCompletedOneTransportOpen = !0), this.emitTransportReconnect(r));
|
|
244
292
|
},
|
|
245
293
|
/**
|
|
246
294
|
* Decode one transport message and forward event batches into the producer store.
|
|
@@ -249,64 +297,64 @@ class B {
|
|
|
249
297
|
if (!this.isActiveAttempt(r))
|
|
250
298
|
return;
|
|
251
299
|
this.markTransportHealthy();
|
|
252
|
-
const
|
|
300
|
+
const i = u(
|
|
253
301
|
this.onPerformanceMetric
|
|
254
302
|
);
|
|
255
303
|
try {
|
|
256
|
-
let
|
|
257
|
-
const v =
|
|
304
|
+
let h;
|
|
305
|
+
const v = u(
|
|
258
306
|
this.onPerformanceMetric
|
|
259
307
|
);
|
|
260
308
|
try {
|
|
261
|
-
|
|
309
|
+
h = JSON.parse(n.responseBody ?? "");
|
|
262
310
|
} finally {
|
|
263
|
-
|
|
311
|
+
p(
|
|
264
312
|
this.onPerformanceMetric,
|
|
265
313
|
"producerTransportParseDurationMs",
|
|
266
314
|
v
|
|
267
315
|
);
|
|
268
316
|
}
|
|
269
|
-
const b =
|
|
317
|
+
const b = u(
|
|
270
318
|
this.onPerformanceMetric
|
|
271
|
-
),
|
|
272
|
-
|
|
319
|
+
), a = y(
|
|
320
|
+
h,
|
|
273
321
|
{ deep: !0 }
|
|
274
322
|
);
|
|
275
|
-
if (
|
|
323
|
+
if (p(
|
|
276
324
|
this.onPerformanceMetric,
|
|
277
325
|
"producerTransportNormalizeDurationMs",
|
|
278
326
|
b
|
|
279
|
-
),
|
|
280
|
-
const
|
|
281
|
-
if (!
|
|
327
|
+
), a.type === "event") {
|
|
328
|
+
const m = this.getRepresentativeConfig()?.resourceTypeId;
|
|
329
|
+
if (!m) {
|
|
282
330
|
console.error(
|
|
283
331
|
"Atmosphere: received one event batch without any active runtime resourceTypeId context.",
|
|
284
|
-
|
|
332
|
+
a
|
|
285
333
|
);
|
|
286
334
|
return;
|
|
287
335
|
}
|
|
288
|
-
const
|
|
336
|
+
const R = u(
|
|
289
337
|
this.onPerformanceMetric
|
|
290
338
|
);
|
|
291
339
|
this.onMessages(
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
),
|
|
340
|
+
m,
|
|
341
|
+
a.data.messages
|
|
342
|
+
), p(
|
|
295
343
|
this.onPerformanceMetric,
|
|
296
344
|
"producerTransportEmitDurationMs",
|
|
297
|
-
|
|
345
|
+
R
|
|
298
346
|
);
|
|
299
|
-
} else
|
|
300
|
-
`Atmosphere: subscription error after ${
|
|
301
|
-
|
|
347
|
+
} else a.type !== "success" && console.error(
|
|
348
|
+
`Atmosphere: subscription error after ${o() - this.lastMessageTime}ms`,
|
|
349
|
+
a
|
|
302
350
|
);
|
|
303
|
-
} catch (
|
|
304
|
-
console.error("Atmosphere: invalid JSON message",
|
|
351
|
+
} catch (h) {
|
|
352
|
+
console.error("Atmosphere: invalid JSON message", h);
|
|
305
353
|
} finally {
|
|
306
|
-
|
|
354
|
+
p(
|
|
307
355
|
this.onPerformanceMetric,
|
|
308
356
|
"producerTransportMessageDurationMs",
|
|
309
|
-
|
|
357
|
+
i
|
|
310
358
|
);
|
|
311
359
|
}
|
|
312
360
|
},
|
|
@@ -318,6 +366,10 @@ class B {
|
|
|
318
366
|
reason: n?.reasonPhrase,
|
|
319
367
|
state: n?.state,
|
|
320
368
|
transport: n?.transport
|
|
369
|
+
}), this.armPendingReconnect("transport_closed", {
|
|
370
|
+
responseReason: n?.reasonPhrase,
|
|
371
|
+
responseState: n?.state,
|
|
372
|
+
transport: n?.transport
|
|
321
373
|
}), this.tryReconnect());
|
|
322
374
|
},
|
|
323
375
|
/**
|
|
@@ -329,24 +381,34 @@ class B {
|
|
|
329
381
|
reason: n?.reasonPhrase,
|
|
330
382
|
state: n?.state,
|
|
331
383
|
transport: n?.transport
|
|
384
|
+
}), this.armPendingReconnect("transport_error", {
|
|
385
|
+
responseError: n?.error,
|
|
386
|
+
responseReason: n?.reasonPhrase,
|
|
387
|
+
responseState: n?.state,
|
|
388
|
+
transport: n?.transport
|
|
332
389
|
}), this.tryReconnect());
|
|
333
390
|
},
|
|
334
391
|
/**
|
|
335
392
|
* Schedule one fresh reconnect when Atmosphere cannot preserve the transport.
|
|
336
393
|
*/
|
|
337
|
-
onTransportFailure: (n,
|
|
394
|
+
onTransportFailure: (n, i) => {
|
|
338
395
|
this.isActiveAttempt(r) && (this.isTransportOpen = !1, console.warn("Atmosphere: transport failure", {
|
|
339
396
|
reason: n,
|
|
340
|
-
responseError:
|
|
341
|
-
responseState:
|
|
342
|
-
transport:
|
|
397
|
+
responseError: i?.error,
|
|
398
|
+
responseState: i?.state,
|
|
399
|
+
transport: i?.transport
|
|
400
|
+
}), this.armPendingReconnect("transport_failure", {
|
|
401
|
+
responseError: i?.error,
|
|
402
|
+
responseReason: n,
|
|
403
|
+
responseState: i?.state,
|
|
404
|
+
transport: i?.transport
|
|
343
405
|
}), this.tryReconnect());
|
|
344
406
|
},
|
|
345
407
|
/**
|
|
346
408
|
* Trigger one fresh reconnect after Atmosphere gives up on its own retry loop.
|
|
347
409
|
*/
|
|
348
410
|
onFailureToReconnect: () => {
|
|
349
|
-
this.isActiveAttempt(r) && (this.isTransportOpen = !1, this.tryReconnect());
|
|
411
|
+
this.isActiveAttempt(r) && (this.isTransportOpen = !1, this.armPendingReconnect("failure_to_reconnect"), this.tryReconnect());
|
|
350
412
|
}
|
|
351
413
|
};
|
|
352
414
|
if (this.subSocket) {
|
|
@@ -356,11 +418,11 @@ class B {
|
|
|
356
418
|
}
|
|
357
419
|
this.subSocket = null;
|
|
358
420
|
}
|
|
359
|
-
const
|
|
360
|
-
if (
|
|
361
|
-
this.lastMessageTime =
|
|
421
|
+
const c = E();
|
|
422
|
+
if (c) {
|
|
423
|
+
this.lastMessageTime = o(), this.armTransportOpenTimeout(r);
|
|
362
424
|
try {
|
|
363
|
-
this.subSocket =
|
|
425
|
+
this.subSocket = c(l);
|
|
364
426
|
} catch (n) {
|
|
365
427
|
console.error("Atmosphere: failed to subscribe", n), this.tryReconnect();
|
|
366
428
|
}
|
|
@@ -372,13 +434,13 @@ class B {
|
|
|
372
434
|
tryReconnect() {
|
|
373
435
|
this.activeConfigs.size && (this.clearTransportOpenTimeout(), !this.reconnectTimeout && (this.reconnectTimeout = setTimeout(() => {
|
|
374
436
|
this.reconnectTimeout = null, this.connect();
|
|
375
|
-
},
|
|
437
|
+
}, S)));
|
|
376
438
|
}
|
|
377
439
|
/**
|
|
378
440
|
* Stop the shared transport and cancel any pending reconnect attempt.
|
|
379
441
|
*/
|
|
380
442
|
shutdownTransport() {
|
|
381
|
-
if (this.transportAttempt += 1, this.isTransportOpen = !1, this.unbindBrowserRecoveryListeners(), this.clearReconnectTimeout(), this.clearTransportOpenTimeout(), this.subSocket) {
|
|
443
|
+
if (this.transportAttempt += 1, this.isTransportOpen = !1, this.pendingReconnect = null, this.unbindBrowserRecoveryListeners(), this.clearReconnectTimeout(), this.clearTransportOpenTimeout(), this.subSocket) {
|
|
382
444
|
try {
|
|
383
445
|
this.subSocket.close?.();
|
|
384
446
|
} catch {
|
|
@@ -387,12 +449,13 @@ class B {
|
|
|
387
449
|
}
|
|
388
450
|
}
|
|
389
451
|
}
|
|
390
|
-
class
|
|
452
|
+
class B extends g {
|
|
391
453
|
sharedTransport;
|
|
392
|
-
constructor(e, s, r,
|
|
393
|
-
super(e, s), this.sharedTransport = r ?? new
|
|
454
|
+
constructor(e, s, r, l, c) {
|
|
455
|
+
super(e, s), this.sharedTransport = r ?? new L(
|
|
394
456
|
s,
|
|
395
|
-
|
|
457
|
+
l,
|
|
458
|
+
c
|
|
396
459
|
);
|
|
397
460
|
}
|
|
398
461
|
/**
|
|
@@ -411,8 +474,8 @@ class _ extends y {
|
|
|
411
474
|
}
|
|
412
475
|
}
|
|
413
476
|
export {
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
477
|
+
L as SharedAtmosphereTransport,
|
|
478
|
+
B as SourceDataAtmosphere,
|
|
479
|
+
B as default,
|
|
417
480
|
T as resolveAtmosphereRequestUrl
|
|
418
481
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback, RealTimeResourceSourceMechanismConfig } from '../../contracts';
|
|
1
|
+
import { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback, OnRealTimeTransportReconnectCallback, RealTimeResourceSourceMechanismConfig } from '../../contracts';
|
|
2
2
|
import { SourceDataBase } from '../SourceDataBase';
|
|
3
3
|
/**
|
|
4
4
|
* Create one dedicated source mechanism restricted to the real Atmosphere transport.
|
|
5
5
|
*/
|
|
6
|
-
export declare function createAtmosphereSourceData(config: RealTimeResourceSourceMechanismConfig, onMessages: OnMessagesStoreCallback, onPerformanceMetric?: OnRealTimeProducerMetricCallback): SourceDataBase;
|
|
6
|
+
export declare function createAtmosphereSourceData(config: RealTimeResourceSourceMechanismConfig, onMessages: OnMessagesStoreCallback, onPerformanceMetric?: OnRealTimeProducerMetricCallback, onTransportReconnect?: OnRealTimeTransportReconnectCallback): SourceDataBase;
|
|
7
7
|
/**
|
|
8
8
|
* Create one runtime-scoped Atmosphere source factory that reuses a single shared socket for the whole app/runtime.
|
|
9
9
|
*/
|
|
10
|
-
export declare function createAtmosphereSourceDataFactory(): (config: RealTimeResourceSourceMechanismConfig, onMessages: OnMessagesStoreCallback, onPerformanceMetric?: OnRealTimeProducerMetricCallback) => SourceDataBase;
|
|
10
|
+
export declare function createAtmosphereSourceDataFactory(): (config: RealTimeResourceSourceMechanismConfig, onMessages: OnMessagesStoreCallback, onPerformanceMetric?: OnRealTimeProducerMetricCallback, onTransportReconnect?: OnRealTimeTransportReconnectCallback) => SourceDataBase;
|
|
11
11
|
//# sourceMappingURL=createAtmosphereSourceData.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createAtmosphereSourceData.d.ts","sourceRoot":"","sources":["../../../../../../packages/realtime-runtime/src/transport/atmosphere/createAtmosphereSourceData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,gCAAgC,
|
|
1
|
+
{"version":3,"file":"createAtmosphereSourceData.d.ts","sourceRoot":"","sources":["../../../../../../packages/realtime-runtime/src/transport/atmosphere/createAtmosphereSourceData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,uBAAuB,EACvB,gCAAgC,EAChC,oCAAoC,EAEpC,qCAAqC,EACtC,MAAM,iBAAiB,CAAC;AAKzB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,qCAAqC,EAC7C,UAAU,EAAE,uBAAuB,EACnC,mBAAmB,CAAC,EAAE,gCAAgC,EACtD,oBAAoB,CAAC,EAAE,oCAAoC,GAC1D,cAAc,CAchB;AAED;;GAEG;AACH,wBAAgB,iCAAiC,KAQ7C,QAAQ,qCAAqC,EAC7C,YAAY,uBAAuB,EACnC,sBAAsB,gCAAgC,EACtD,uBAAuB,oCAAoC,KAC1D,cAAc,CA+BlB"}
|
|
@@ -1,40 +1,48 @@
|
|
|
1
|
-
import { SourceDataAtmosphere as
|
|
2
|
-
function
|
|
1
|
+
import { SourceDataAtmosphere as c, SharedAtmosphereTransport as p } from "./SourceDataAtmosphere.js";
|
|
2
|
+
function i(e, r, t, s) {
|
|
3
3
|
if (e.sourceDataMechanism !== "atmosphere")
|
|
4
4
|
throw new Error(
|
|
5
5
|
"Atmosphere-only realtime runtime does not support non-atmosphere resource types."
|
|
6
6
|
);
|
|
7
|
-
return new
|
|
7
|
+
return new c(
|
|
8
8
|
e,
|
|
9
9
|
r,
|
|
10
10
|
void 0,
|
|
11
|
-
|
|
11
|
+
t,
|
|
12
|
+
s
|
|
12
13
|
);
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
-
let e = null, r = null;
|
|
16
|
-
return function(
|
|
17
|
-
if (
|
|
15
|
+
function h() {
|
|
16
|
+
let e = null, r = null, t;
|
|
17
|
+
return function(n, o, u, a) {
|
|
18
|
+
if (n.sourceDataMechanism !== "atmosphere")
|
|
18
19
|
throw new Error(
|
|
19
20
|
"Atmosphere-only realtime runtime does not support non-atmosphere resource types."
|
|
20
21
|
);
|
|
21
22
|
if (!e)
|
|
22
|
-
r = t, e = new
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
r = o, t = a, e = new p(
|
|
24
|
+
o,
|
|
25
|
+
u,
|
|
26
|
+
a
|
|
25
27
|
);
|
|
26
|
-
else
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
a
|
|
32
|
-
|
|
28
|
+
else {
|
|
29
|
+
if (r !== o)
|
|
30
|
+
throw new Error(
|
|
31
|
+
"Atmosphere source-data factory is scoped to one runtime callback and cannot be reused across runtimes."
|
|
32
|
+
);
|
|
33
|
+
if (t !== a)
|
|
34
|
+
throw new Error(
|
|
35
|
+
"Atmosphere source-data factory is scoped to one transport reconnect callback and cannot be reused across runtimes."
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
return new c(
|
|
39
|
+
n,
|
|
40
|
+
o,
|
|
33
41
|
e
|
|
34
42
|
);
|
|
35
43
|
};
|
|
36
44
|
}
|
|
37
45
|
export {
|
|
38
|
-
|
|
39
|
-
|
|
46
|
+
i as createAtmosphereSourceData,
|
|
47
|
+
h as createAtmosphereSourceDataFactory
|
|
40
48
|
};
|
package/web/store.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback } from '../contracts';
|
|
1
|
+
import { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback, OnRealTimeTransportReconnectCallback } from '../contracts';
|
|
2
2
|
import { SourceDataBase } from '../transport/SourceDataBase';
|
|
3
3
|
import { CreateRealTimeStoreProps, CreateRealtimeRuntimeProps, InitialRealTimeProducerStoreProps, RealTimeProducerStoreStateWithActions } from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Factory contract used to create one source mechanism without forcing one global implementation.
|
|
6
6
|
*/
|
|
7
|
-
export type CreateRealTimeSourceData = (config: InitialRealTimeProducerStoreProps['resourceTypesConfig'][number], onMessages: OnMessagesStoreCallback, onPerformanceMetric?: OnRealTimeProducerMetricCallback) => SourceDataBase;
|
|
7
|
+
export type CreateRealTimeSourceData = (config: InitialRealTimeProducerStoreProps['resourceTypesConfig'][number], onMessages: OnMessagesStoreCallback, onPerformanceMetric?: OnRealTimeProducerMetricCallback, onTransportReconnect?: OnRealTimeTransportReconnectCallback) => SourceDataBase;
|
|
8
8
|
/**
|
|
9
9
|
* Create the producer-side realtime store.
|
|
10
10
|
*/
|
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,
|
|
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;;EAgc3C;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 x } from "zustand";
|
|
2
|
+
import { immer as H } from "zustand/middleware/immer";
|
|
3
|
+
import { ObjectQueue as L } 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 N, drainQueuedMessages as $, sanitizeProducerMessage as U, createRealtimePatchedResourceSnapshot as W, applyProducerMessage as F, notifySubscribersWithBatch as G, groupMessagesByResourceTypeId as J, normalizeProducerMessage as K } from "./store.helpers.js";
|
|
7
7
|
function Q() {
|
|
8
8
|
return typeof globalThis.performance?.now == "function" ? globalThis.performance.now() : Date.now();
|
|
9
9
|
}
|
|
10
10
|
function T(d) {
|
|
11
11
|
return d ? Q() : 0;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function m(d, p, M) {
|
|
14
14
|
d?.(p, M);
|
|
15
15
|
}
|
|
16
16
|
function P(d, p, M) {
|
|
@@ -22,19 +22,20 @@ 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 se(d, p = !1, M) {
|
|
26
26
|
const {
|
|
27
27
|
onPerformanceMetric: o,
|
|
28
|
-
|
|
28
|
+
onTransportReconnect: k,
|
|
29
|
+
startSourceData: v = !0,
|
|
29
30
|
...w
|
|
30
|
-
} = d,
|
|
31
|
+
} = d, j = {
|
|
31
32
|
...w,
|
|
32
33
|
hasResourcesTypes: {}
|
|
33
34
|
}, A = {}, C = {};
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
...
|
|
35
|
+
return x(
|
|
36
|
+
N(
|
|
37
|
+
H((S, a) => ({
|
|
38
|
+
...j,
|
|
38
39
|
realTimeProducerActions: {
|
|
39
40
|
/**
|
|
40
41
|
* Initialize the configured resources and start their source mechanisms.
|
|
@@ -56,21 +57,22 @@ function ee(d, p = !1, M) {
|
|
|
56
57
|
sourceDataClass: M(
|
|
57
58
|
r,
|
|
58
59
|
s,
|
|
59
|
-
o
|
|
60
|
+
o,
|
|
61
|
+
k
|
|
60
62
|
),
|
|
61
63
|
status: "init",
|
|
62
64
|
hasResources: n,
|
|
63
65
|
subscribedClients: {}
|
|
64
66
|
}, A[r.resourceTypeId] = {
|
|
65
67
|
messagesToProcces: [],
|
|
66
|
-
messagesQueue: new
|
|
68
|
+
messagesQueue: new L(),
|
|
67
69
|
statusProccesing: !1
|
|
68
70
|
}, C[r.resourceTypeId] = new Map(
|
|
69
71
|
Object.entries(n).map(([l, u]) => [
|
|
70
72
|
O(l, u),
|
|
71
73
|
c
|
|
72
74
|
])
|
|
73
|
-
),
|
|
75
|
+
), v && i.hasResourcesTypes[r.resourceTypeId].sourceDataClass.start();
|
|
74
76
|
}
|
|
75
77
|
});
|
|
76
78
|
},
|
|
@@ -127,11 +129,11 @@ function ee(d, p = !1, M) {
|
|
|
127
129
|
* Enqueue one incoming batch with explicit ingress metadata and start draining the matching queues.
|
|
128
130
|
*/
|
|
129
131
|
ingestMessages: (e, t, s) => {
|
|
130
|
-
|
|
132
|
+
m(
|
|
131
133
|
o,
|
|
132
134
|
"producerIncomingBatch",
|
|
133
135
|
t.length
|
|
134
|
-
),
|
|
136
|
+
), J(
|
|
135
137
|
e,
|
|
136
138
|
t,
|
|
137
139
|
s
|
|
@@ -149,7 +151,7 @@ function ee(d, p = !1, M) {
|
|
|
149
151
|
return;
|
|
150
152
|
}
|
|
151
153
|
c.forEach((u) => {
|
|
152
|
-
const f = l ?
|
|
154
|
+
const f = l ? K(
|
|
153
155
|
u.message,
|
|
154
156
|
l,
|
|
155
157
|
u.reason
|
|
@@ -158,7 +160,7 @@ function ee(d, p = !1, M) {
|
|
|
158
160
|
...u,
|
|
159
161
|
message: f
|
|
160
162
|
});
|
|
161
|
-
}),
|
|
163
|
+
}), m(
|
|
162
164
|
o,
|
|
163
165
|
"producerQueueLength",
|
|
164
166
|
n.messagesQueue.size()
|
|
@@ -192,51 +194,51 @@ function ee(d, p = !1, M) {
|
|
|
192
194
|
if (s.statusProccesing)
|
|
193
195
|
return;
|
|
194
196
|
s.statusProccesing = !0;
|
|
195
|
-
const c =
|
|
197
|
+
const c = $(s.messagesQueue);
|
|
196
198
|
if (!c.length) {
|
|
197
199
|
s.statusProccesing = !1;
|
|
198
200
|
return;
|
|
199
201
|
}
|
|
200
|
-
|
|
202
|
+
m(
|
|
201
203
|
o,
|
|
202
204
|
"producerDrainSet",
|
|
203
205
|
c.length
|
|
204
206
|
);
|
|
205
207
|
const r = Date.now(), n = a().hasResourcesTypes[e], l = /* @__PURE__ */ new Map();
|
|
206
208
|
c.forEach(({ message: h }) => {
|
|
207
|
-
const
|
|
209
|
+
const R = h.resourceSerialId;
|
|
208
210
|
l.set(
|
|
209
|
-
|
|
210
|
-
(l.get(
|
|
211
|
+
R,
|
|
212
|
+
(l.get(R) ?? 0) + 1
|
|
211
213
|
);
|
|
212
214
|
});
|
|
213
215
|
let u = 0;
|
|
214
216
|
l.forEach((h) => {
|
|
215
217
|
h > 1 && (u += 1);
|
|
216
|
-
}),
|
|
218
|
+
}), m(
|
|
217
219
|
o,
|
|
218
220
|
"producerRepeatedResourceCount",
|
|
219
221
|
u
|
|
220
|
-
), o &&
|
|
222
|
+
), o && m(
|
|
221
223
|
o,
|
|
222
224
|
"producerSubscriberCount",
|
|
223
225
|
Object.keys(n.subscribedClients).length
|
|
224
226
|
);
|
|
225
|
-
const f = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Set(),
|
|
227
|
+
const f = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Set(), I = T(
|
|
226
228
|
o
|
|
227
229
|
), E = c.map(({
|
|
228
230
|
message: h,
|
|
229
|
-
reason:
|
|
231
|
+
reason: R
|
|
230
232
|
}) => {
|
|
231
|
-
const g = h.resourceSerialId, D = b.has(g) ? f.get(g) : n.hasResources[g], y =
|
|
233
|
+
const g = h.resourceSerialId, D = b.has(g) ? f.get(g) : n.hasResources[g], y = U(
|
|
232
234
|
D,
|
|
233
235
|
h,
|
|
234
236
|
n.config,
|
|
235
|
-
|
|
237
|
+
R
|
|
236
238
|
);
|
|
237
239
|
return (l.get(g) ?? 0) > 1 && (b.add(g), y.type === "delete" ? f.set(g, void 0) : f.set(
|
|
238
240
|
g,
|
|
239
|
-
|
|
241
|
+
W(
|
|
240
242
|
D ?? {},
|
|
241
243
|
y.payload,
|
|
242
244
|
g
|
|
@@ -246,7 +248,7 @@ function ee(d, p = !1, M) {
|
|
|
246
248
|
P(
|
|
247
249
|
o,
|
|
248
250
|
"producerSanitizeDurationMs",
|
|
249
|
-
|
|
251
|
+
I
|
|
250
252
|
);
|
|
251
253
|
try {
|
|
252
254
|
const h = T(
|
|
@@ -254,11 +256,11 @@ function ee(d, p = !1, M) {
|
|
|
254
256
|
);
|
|
255
257
|
S((g) => {
|
|
256
258
|
const y = g.hasResourcesTypes[e].hasResources;
|
|
257
|
-
E.forEach((
|
|
258
|
-
|
|
259
|
+
E.forEach((B) => {
|
|
260
|
+
F(
|
|
259
261
|
y,
|
|
260
262
|
i,
|
|
261
|
-
|
|
263
|
+
B,
|
|
262
264
|
r
|
|
263
265
|
);
|
|
264
266
|
});
|
|
@@ -266,22 +268,22 @@ function ee(d, p = !1, M) {
|
|
|
266
268
|
o,
|
|
267
269
|
"producerApplyDurationMs",
|
|
268
270
|
h
|
|
269
|
-
), o &&
|
|
271
|
+
), o && m(
|
|
270
272
|
o,
|
|
271
273
|
"producerResourceCount",
|
|
272
274
|
Object.keys(a().hasResourcesTypes[e].hasResources).length
|
|
273
275
|
);
|
|
274
|
-
const
|
|
276
|
+
const R = T(
|
|
275
277
|
o
|
|
276
278
|
);
|
|
277
|
-
|
|
279
|
+
G(
|
|
278
280
|
e,
|
|
279
281
|
a().hasResourcesTypes[e].subscribedClients,
|
|
280
282
|
E
|
|
281
283
|
), P(
|
|
282
284
|
o,
|
|
283
285
|
"producerNotifyDurationMs",
|
|
284
|
-
|
|
286
|
+
R
|
|
285
287
|
);
|
|
286
288
|
} finally {
|
|
287
289
|
P(
|
|
@@ -319,10 +321,10 @@ function ee(d, p = !1, M) {
|
|
|
319
321
|
}
|
|
320
322
|
}
|
|
321
323
|
})),
|
|
322
|
-
{ name: `${
|
|
324
|
+
{ name: `${_}: ${w.storeId}`, enabled: p }
|
|
323
325
|
)
|
|
324
326
|
);
|
|
325
327
|
}
|
|
326
328
|
export {
|
|
327
|
-
|
|
329
|
+
se as createRealTimeStore
|
|
328
330
|
};
|
package/web/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ObjectQueue } from '../engine/ObjectQueue';
|
|
2
|
-
import { OnMessagesStoreCallback, OnRealTimeProducerMetricCallback, 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, SubscribeResourceTypeOptions } from '../contracts';
|
|
3
3
|
/**
|
|
4
4
|
* Internal queued message entry that preserves the ingress reason across async producer draining.
|
|
5
5
|
*/
|
|
@@ -125,12 +125,16 @@ export interface RealTimeProducerStoreStateWithActions extends RealTimeProducerS
|
|
|
125
125
|
/**
|
|
126
126
|
* Initial store props accepted by the current web adapter store factory.
|
|
127
127
|
*/
|
|
128
|
-
export type InitialRealTimeProducerStoreProps = Omit<RealTimeProducerStoreState,
|
|
128
|
+
export type InitialRealTimeProducerStoreProps = Omit<RealTimeProducerStoreState, "hasResourcesTypes">;
|
|
129
129
|
/**
|
|
130
130
|
* Input contract used to create one generic producer store.
|
|
131
131
|
*/
|
|
132
132
|
export interface CreateRealTimeStoreProps extends InitialRealTimeProducerStoreProps {
|
|
133
133
|
onPerformanceMetric?: OnRealTimeProducerMetricCallback;
|
|
134
|
+
/**
|
|
135
|
+
* Optional host-owned callback fired when the active browser transport recovers after a reconnect path.
|
|
136
|
+
*/
|
|
137
|
+
onTransportReconnect?: OnRealTimeTransportReconnectCallback;
|
|
134
138
|
/**
|
|
135
139
|
* Whether resource source mechanisms should start during store initialization.
|
|
136
140
|
*/
|
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,uBAAuB,EACvB,gCAAgC,EAChC,eAAe,EACf,4BAA4B,EAC5B,4BAA4B,EAC5B,oBAAoB,EACpB,qCAAqC,EACrC,sBAAsB,EACtB,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,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;;OAEG;IACH,iBAAiB,EAAE,MAAM,
|
|
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,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,iBA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