@m4l/gclick-realtime 1.10.0 → 1.11.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/consumer/RealTimeConsumerContext.d.ts +10 -0
- package/consumer/RealTimeConsumerContext.d.ts.map +1 -0
- package/consumer/RealTimeConsumerContext.js +128 -0
- package/consumer/index.d.ts +4 -0
- package/consumer/index.d.ts.map +1 -0
- package/consumer/index.js +7 -0
- package/consumer/types.d.ts +47 -0
- package/consumer/types.d.ts.map +1 -0
- package/consumer/useRealTimeConsumer.d.ts.map +1 -0
- package/{web/consumer → consumer}/useRealTimeConsumer.js +2 -2
- package/contracts/deviceData.d.ts +19 -22
- package/contracts/deviceData.d.ts.map +1 -1
- package/contracts/deviceDetail.d.ts +0 -2
- package/contracts/deviceDetail.d.ts.map +1 -1
- package/contracts/index.d.ts +1 -1
- package/contracts/index.d.ts.map +1 -1
- package/dummy/catalogs/baseDeviceTemplate.d.ts.map +1 -1
- package/dummy/catalogs/baseDeviceTemplate.js +4 -35
- package/dummy/catalogs/blueprints.d.ts +9 -54
- package/dummy/catalogs/blueprints.d.ts.map +1 -1
- package/dummy/catalogs/blueprints.js +25 -42
- package/dummy/catalogs/departments.d.ts +10 -0
- package/dummy/catalogs/departments.d.ts.map +1 -0
- package/dummy/catalogs/departments.js +43 -0
- package/dummy/index.d.ts +3 -3
- package/dummy/index.d.ts.map +1 -1
- package/dummy/index.js +28 -28
- package/dummy/shared/types.d.ts +2 -4
- package/dummy/shared/types.d.ts.map +1 -1
- package/dummy/{runtime → simulation}/simulation.d.ts +1 -1
- package/dummy/simulation/simulation.d.ts.map +1 -0
- package/dummy/{runtime → simulation}/simulation.js +333 -423
- package/dummy/{runtime/dummy.d.ts → source-data/SourceDataDummy.d.ts} +8 -3
- package/dummy/source-data/SourceDataDummy.d.ts.map +1 -0
- package/dummy/{runtime/dummy.js → source-data/SourceDataDummy.js} +117 -128
- package/mobile/index.d.ts +4 -0
- package/mobile/index.d.ts.map +1 -0
- package/mobile/index.js +23 -0
- package/mobile/resourceTypes.d.ts +48 -0
- package/mobile/resourceTypes.d.ts.map +1 -0
- package/mobile/resourceTypes.js +54 -0
- package/mobile/runtime/atmosphere.d.ts +10 -0
- package/mobile/runtime/atmosphere.d.ts.map +1 -0
- package/mobile/runtime/atmosphere.js +16 -0
- package/mobile/runtime/dummy.d.ts +11 -0
- package/mobile/runtime/dummy.d.ts.map +1 -0
- package/mobile/runtime/dummy.js +16 -0
- package/mobile/runtime/index.d.ts +11 -0
- package/mobile/runtime/index.d.ts.map +1 -0
- package/mobile/runtime/runtimeRegistry.d.ts +17 -0
- package/mobile/runtime/runtimeRegistry.d.ts.map +1 -0
- package/mobile/runtime/runtimeRegistry.js +24 -0
- package/mobile/runtime/sourceDataFactory.d.ts +6 -0
- package/mobile/runtime/sourceDataFactory.d.ts.map +1 -0
- package/mobile/runtime/sourceDataFactory.js +29 -0
- package/mobile/runtime/types.d.ts +8 -0
- package/mobile/runtime/types.d.ts.map +1 -0
- package/package.json +37 -1
- package/payload/mergeDevicePayloadWithUpdatedAtGuard.d.ts +1 -1
- package/payload/mergeDevicePayloadWithUpdatedAtGuard.d.ts.map +1 -1
- package/rt_alarms/constants.d.ts +6 -0
- package/rt_alarms/constants.d.ts.map +1 -0
- package/rt_alarms/constants.js +7 -0
- package/rt_alarms/index.d.ts +15 -0
- package/rt_alarms/index.d.ts.map +1 -0
- package/rt_alarms/index.js +18 -0
- package/rt_devices/constants.d.ts +4 -0
- package/rt_devices/constants.d.ts.map +1 -0
- package/rt_devices/constants.js +5 -0
- package/rt_devices/index.d.ts +22 -0
- package/rt_devices/index.d.ts.map +1 -0
- package/rt_devices/index.js +150 -0
- package/rt_devices/resourceTypeMergeStrategies.d.ts +12 -0
- package/rt_devices/resourceTypeMergeStrategies.d.ts.map +1 -0
- package/rt_devices/resourceTypeMergeStrategies.js +19 -0
- package/shared/atmosphereHost.d.ts +5 -0
- package/shared/atmosphereHost.d.ts.map +1 -0
- package/shared/atmosphereHost.js +7 -0
- package/shared/index.d.ts +5 -0
- package/shared/index.d.ts.map +1 -0
- package/shared/index.js +11 -0
- package/shared/performanceMetrics.d.ts +64 -0
- package/shared/performanceMetrics.d.ts.map +1 -0
- package/shared/performanceMetrics.js +73 -0
- package/shared/runtimeRegistry.d.ts +17 -0
- package/shared/runtimeRegistry.d.ts.map +1 -0
- package/shared/runtimeRegistry.js +27 -0
- package/shared/runtimeResourceTypesKey.d.ts +14 -0
- package/shared/runtimeResourceTypesKey.d.ts.map +1 -0
- package/shared/runtimeResourceTypesKey.js +18 -0
- package/shared/startupSnapshots.d.ts +28 -0
- package/shared/startupSnapshots.d.ts.map +1 -0
- package/shared/startupSnapshots.js +29 -0
- package/web/diagnostics/performanceMetrics.d.ts +34 -0
- package/web/diagnostics/performanceMetrics.d.ts.map +1 -0
- package/web/diagnostics/performanceMetrics.js +61 -0
- package/web/host/devicesResourceType.d.ts +3 -11
- package/web/host/devicesResourceType.d.ts.map +1 -1
- package/web/host/devicesResourceType.js +58 -171
- package/web/host/hostRuntime.d.ts +6 -8
- package/web/host/hostRuntime.d.ts.map +1 -1
- package/web/host/hostRuntime.js +29 -38
- package/web/host/index.d.ts +2 -2
- package/web/host/index.d.ts.map +1 -1
- package/web/host/launchContract.d.ts +19 -13
- package/web/host/launchContract.d.ts.map +1 -1
- package/web/host/launchContract.js +82 -76
- package/web/index.d.ts +2 -7
- package/web/index.d.ts.map +1 -1
- package/web/index.js +34 -62
- package/web/runtime/atmosphere.d.ts +12 -0
- package/web/runtime/atmosphere.d.ts.map +1 -0
- package/web/runtime/atmosphere.js +22 -0
- package/web/runtime/dummy.d.ts +11 -0
- package/web/runtime/dummy.d.ts.map +1 -0
- package/web/runtime/dummy.js +22 -0
- package/web/runtime/index.d.ts +8 -9
- package/web/runtime/index.d.ts.map +1 -1
- package/web/runtime/performanceMetricReporter.d.ts +8 -0
- package/web/runtime/performanceMetricReporter.d.ts.map +1 -0
- package/web/runtime/performanceMetricReporter.js +10 -0
- package/web/runtime/runtimeRegistry.d.ts +21 -5
- package/web/runtime/runtimeRegistry.d.ts.map +1 -1
- package/web/runtime/runtimeRegistry.js +22 -7
- package/web/runtime/sourceDataFactory.d.ts +7 -0
- package/web/runtime/sourceDataFactory.d.ts.map +1 -0
- package/web/runtime/sourceDataFactory.js +26 -0
- package/web/{producer → runtime}/types.d.ts +2 -7
- package/web/runtime/types.d.ts.map +1 -0
- package/dummy/catalogs/group.d.ts +0 -10
- package/dummy/catalogs/group.d.ts.map +0 -1
- package/dummy/catalogs/group.js +0 -46
- package/dummy/runtime/dummy.d.ts.map +0 -1
- package/dummy/runtime/simulation.d.ts.map +0 -1
- package/libs/observability/mf/src/browserRuntimeHandles.js +0 -350
- package/libs/observability/mf/src/diagnosticPolicies/catalog.js +0 -12
- package/libs/observability/mf/src/diagnosticPolicies/contracts.js +0 -8
- package/libs/observability/mf/src/diagnosticPolicies/host.js +0 -127
- package/libs/observability/mf/src/diagnosticPolicies/operativeMyGpsDevices.js +0 -79
- package/web/consumer/RealTimeConsumerContext.d.ts +0 -10
- package/web/consumer/RealTimeConsumerContext.d.ts.map +0 -1
- package/web/consumer/RealTimeConsumerContext.js +0 -156
- package/web/consumer/index.d.ts +0 -6
- package/web/consumer/index.d.ts.map +0 -1
- package/web/consumer/store.d.ts +0 -10
- package/web/consumer/store.d.ts.map +0 -1
- package/web/consumer/store.helpers.d.ts +0 -62
- package/web/consumer/store.helpers.d.ts.map +0 -1
- package/web/consumer/store.helpers.js +0 -141
- package/web/consumer/store.js +0 -227
- package/web/consumer/types.d.ts +0 -161
- package/web/consumer/types.d.ts.map +0 -1
- package/web/consumer/useRealTimeConsumer.d.ts.map +0 -1
- package/web/host/startupSnapshots.d.ts +0 -45
- package/web/host/startupSnapshots.d.ts.map +0 -1
- package/web/host/startupSnapshots.js +0 -103
- package/web/producer/RealTimeProducerContext.d.ts +0 -9
- package/web/producer/RealTimeProducerContext.d.ts.map +0 -1
- package/web/producer/RealTimeProducerContext.js +0 -16
- package/web/producer/index.d.ts +0 -7
- package/web/producer/index.d.ts.map +0 -1
- package/web/producer/sourceDataFactory.d.ts +0 -13
- package/web/producer/sourceDataFactory.d.ts.map +0 -1
- package/web/producer/sourceDataFactory.js +0 -32
- package/web/producer/store.d.ts +0 -7
- package/web/producer/store.d.ts.map +0 -1
- package/web/producer/store.js +0 -5
- package/web/producer/types.d.ts.map +0 -1
- package/web/producer/useRealTimeProducer.d.ts +0 -7
- package/web/producer/useRealTimeProducer.d.ts.map +0 -1
- package/web/producer/useRealTimeProducer.js +0 -15
- package/web/runtime/resourceTypeMergeStrategies.d.ts +0 -10
- package/web/runtime/resourceTypeMergeStrategies.d.ts.map +0 -1
- package/web/runtime/resourceTypeMergeStrategies.js +0 -19
- package/web/runtime/runtime.d.ts +0 -16
- package/web/runtime/runtime.d.ts.map +0 -1
- package/web/runtime/runtime.js +0 -28
- package/web/runtime/runtimeAtmosphereOnly.d.ts +0 -11
- package/web/runtime/runtimeAtmosphereOnly.d.ts.map +0 -1
- package/web/runtime/runtimeAtmosphereOnly.js +0 -28
- package/web/runtime/runtimeRegistry.shared.d.ts +0 -23
- package/web/runtime/runtimeRegistry.shared.d.ts.map +0 -1
- package/web/runtime/runtimeRegistry.shared.js +0 -47
- package/web/runtime/runtimeRegistryAtmosphereOnly.d.ts +0 -9
- package/web/runtime/runtimeRegistryAtmosphereOnly.d.ts.map +0 -1
- package/web/runtime/runtimeRegistryAtmosphereOnly.js +0 -13
- package/web/shared/constants.d.ts +0 -11
- package/web/shared/constants.d.ts.map +0 -1
- package/web/shared/constants.js +0 -11
- package/web/shared/index.d.ts +0 -3
- package/web/shared/index.d.ts.map +0 -1
- package/web/shared/performanceMetrics.d.ts +0 -48
- package/web/shared/performanceMetrics.d.ts.map +0 -1
- package/web/shared/performanceMetrics.js +0 -70
- package/web/shared/runtimeTypes.d.ts +0 -4
- package/web/shared/runtimeTypes.d.ts.map +0 -1
- /package/{web/consumer → consumer}/useRealTimeConsumer.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hostRuntime.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/host/hostRuntime.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,oCAAoC,EACpC,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,
|
|
1
|
+
{"version":3,"file":"hostRuntime.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/host/hostRuntime.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,oCAAoC,EACpC,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EACV,0CAA0C,EAC3C,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,+CAA+C,EAChD,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAIL,KAAK,mCAAmC,EACzC,MAAM,+BAA+B,CAAC;AAEvC;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE;QACT,aAAa,CAAC,EAAE,qBAAqB,CAAC;KACvC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,mBAAmB,EAAE,0CAA0C,EAAE,CAAC;IAClE,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACrD;;OAEG;IACH,oBAAoB,CAAC,EAAE,oCAAoC,CAAC;IAC5D,mBAAmB,EAAE,+CAA+C,EAAE,CAAC;IACvE,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,mCAAmC,EAAE,CAAC;CAC1D;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,iCAAiC,GACvC,yBAAyB,CAsB3B;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,sCAAsC,GAC5C,yBAAyB,CA0C3B;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,WAAW,CAAC,EAAE,yBAAyB,GACtC,qBAAqB,CAmBvB"}
|
package/web/host/hostRuntime.js
CHANGED
|
@@ -1,62 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { replayGClickRealtimeStartupSnapshotsOnce as p, replayGClickRealtimeStartupSnapshotsOnReconnect as a } from "./startupSnapshots.js";
|
|
5
|
-
import { disposeGClickRealtimeRuntime as u } from "../runtime/runtimeRegistry.shared.js";
|
|
6
|
-
function h(t) {
|
|
1
|
+
import { getOrCreateGClickAtmosphereRealtimeRuntime as c, disposeGClickRealtimeRuntime as i, getOrCreateGClickDummyRealtimeRuntime as l } from "../runtime/runtimeRegistry.js";
|
|
2
|
+
import { replayGClickRealtimeStartupSnapshotsOnce as m, disposeGClickRealtimeStartupSnapshots as a, replayGClickRealtimeStartupSnapshotsOnReconnect as p } from "../../shared/startupSnapshots.js";
|
|
3
|
+
function R(t) {
|
|
7
4
|
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
resourceTypesConfig: [
|
|
18
|
-
m({
|
|
19
|
-
presetId: e,
|
|
20
|
-
resourceTypeId: r
|
|
21
|
-
})
|
|
22
|
-
]
|
|
5
|
+
resourceTypesConfig: e,
|
|
6
|
+
storeDevtoolsEnabled: n = !1,
|
|
7
|
+
storeId: r,
|
|
8
|
+
runtimeKey: o
|
|
9
|
+
} = t, s = l({
|
|
10
|
+
runtimeKey: o,
|
|
11
|
+
storeId: r,
|
|
12
|
+
storeDevtoolsEnabled: n,
|
|
13
|
+
resourceTypesConfig: e
|
|
23
14
|
});
|
|
24
15
|
return {
|
|
25
16
|
dispose: () => {
|
|
26
|
-
|
|
17
|
+
i(o);
|
|
27
18
|
},
|
|
28
19
|
realtime: {
|
|
29
|
-
producerTools:
|
|
20
|
+
producerTools: s.tools
|
|
30
21
|
}
|
|
31
22
|
};
|
|
32
23
|
}
|
|
33
|
-
function
|
|
34
|
-
const { onTransportReconnect: e, startupSnapshots:
|
|
24
|
+
function d(t) {
|
|
25
|
+
const { onTransportReconnect: e, startupSnapshots: n, ...r } = t;
|
|
35
26
|
let o = null;
|
|
36
|
-
const
|
|
37
|
-
e?.(
|
|
27
|
+
const s = n?.length || e ? (u) => {
|
|
28
|
+
e?.(u), !(!o || !n?.length) && p({
|
|
38
29
|
producerTools: o.tools,
|
|
39
30
|
runtimeKey: t.runtimeKey,
|
|
40
|
-
startupSnapshots:
|
|
31
|
+
startupSnapshots: n
|
|
41
32
|
});
|
|
42
33
|
} : void 0;
|
|
43
|
-
return o =
|
|
44
|
-
...
|
|
45
|
-
onTransportReconnect:
|
|
46
|
-
}),
|
|
34
|
+
return o = c({
|
|
35
|
+
...r,
|
|
36
|
+
onTransportReconnect: s
|
|
37
|
+
}), m({
|
|
47
38
|
producerTools: o.tools,
|
|
48
39
|
runtimeKey: t.runtimeKey,
|
|
49
|
-
startupSnapshots:
|
|
40
|
+
startupSnapshots: n
|
|
50
41
|
}), {
|
|
51
42
|
dispose: () => {
|
|
52
|
-
|
|
43
|
+
a(t.runtimeKey), i(t.runtimeKey);
|
|
53
44
|
},
|
|
54
45
|
realtime: {
|
|
55
46
|
producerTools: o.tools
|
|
56
47
|
}
|
|
57
48
|
};
|
|
58
49
|
}
|
|
59
|
-
function
|
|
50
|
+
function h(t) {
|
|
60
51
|
const e = t?.realtime?.producerTools;
|
|
61
52
|
if (typeof e?.getResourceRuntimeMeta != "function" || typeof e?.getResourceTypeSnapshot != "function" || typeof e?.publishMessages != "function" || typeof e?.subscribe != "function" || typeof e?.subscribeTransportReconnect != "function" || typeof e?.subscribeResourceType != "function" || typeof e?.unsubscribe != "function" || typeof e?.unsubscribeTransportReconnect != "function")
|
|
62
53
|
throw new Error(
|
|
@@ -65,7 +56,7 @@ function b(t) {
|
|
|
65
56
|
return e;
|
|
66
57
|
}
|
|
67
58
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
d as launchGClickAtmosphereHostRuntime,
|
|
60
|
+
R as launchGClickDummyHostRuntime,
|
|
61
|
+
h as resolveGClickRealtimeTools
|
|
71
62
|
};
|
package/web/host/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { createGClickDevicesStartupSnapshot, createGClickDevicesStartupSnapshotMessages, createGClickDevicesAtmosphereResourceType, createGClickDevicesHotStartupSnapshot, } from './devicesResourceType';
|
|
2
2
|
export type { CreateGClickDevicesStartupSnapshotProps, CreateGClickDevicesAtmosphereResourceTypeProps, CreateGClickDevicesHotStartupSnapshotProps, GClickDevicesStartupSnapshotLoader, GClickDevicesHotStartupSnapshotNetworkOperation, GClickDevicesHotStartupSnapshotRequest, } from './devicesResourceType';
|
|
3
3
|
export { launchGClickAtmosphereHostRuntime, launchGClickDummyHostRuntime, resolveGClickRealtimeTools, } from './hostRuntime';
|
|
4
|
-
export type { GClickRealtimeResourceStartupSnapshotConfig, GClickRealtimeStartupSnapshotConfig, GClickRealtimeStartupSnapshotMessagesLoader, } from '
|
|
4
|
+
export type { GClickRealtimeResourceStartupSnapshotConfig, GClickRealtimeStartupSnapshotConfig, GClickRealtimeStartupSnapshotMessagesLoader, } from '../../shared/startupSnapshots';
|
|
5
5
|
export type { GClickRealtimeHostRuntime, LaunchGClickAtmosphereHostRuntimeProps, LaunchGClickDummyHostRuntimeProps, } from './hostRuntime';
|
|
6
6
|
export { createGClickAtmosphereRuntimeConfigs, createGClickAtmosphereRuntimeKey, createGClickAtmosphereStartupSnapshots, createGClickDummyRuntimeKey, launchGClickRealtimeHostRuntime, normalizeGClickRealtimeFallbackTransport, normalizeGClickRealtimeSessionId, resolveGClickRealtimeAtmosphereHost, } from './launchContract';
|
|
7
|
-
export type { GClickRealtimeAtmosphereFallbackTransport, GClickRealtimeAtmosphereHostLaunchContract, GClickRealtimeAtmosphereResourceTypeLaunchConfig, GClickRealtimeDummyHostLaunchContract, GClickRealtimeHostLaunchContract, } from './launchContract';
|
|
7
|
+
export type { GClickRealtimeAtmosphereFallbackTransport, GClickRealtimeAtmosphereHostLaunchContract, GClickRealtimeAtmosphereResourceTypeLaunchConfig, GClickRealtimeDummyHostLaunchContract, GClickRealtimeDummyResourceTypeLaunchConfig, GClickRealtimeHostLaunchContract, } from './launchContract';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/web/host/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/host/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,0CAA0C,EAC1C,yCAAyC,EACzC,qCAAqC,GACtC,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,uCAAuC,EACvC,8CAA8C,EAC9C,0CAA0C,EAC1C,kCAAkC,EAClC,+CAA+C,EAC/C,sCAAsC,GACvC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iCAAiC,EACjC,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,2CAA2C,EAC3C,mCAAmC,EACnC,2CAA2C,GAC5C,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/host/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kCAAkC,EAClC,0CAA0C,EAC1C,yCAAyC,EACzC,qCAAqC,GACtC,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,uCAAuC,EACvC,8CAA8C,EAC9C,0CAA0C,EAC1C,kCAAkC,EAClC,+CAA+C,EAC/C,sCAAsC,GACvC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iCAAiC,EACjC,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,2CAA2C,EAC3C,mCAAmC,EACnC,2CAA2C,GAC5C,MAAM,+BAA+B,CAAC;AACvC,YAAY,EACV,yBAAyB,EACzB,sCAAsC,EACtC,iCAAiC,GAClC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oCAAoC,EACpC,gCAAgC,EAChC,sCAAsC,EACtC,2BAA2B,EAC3B,+BAA+B,EAC/B,wCAAwC,EACxC,gCAAgC,EAChC,mCAAmC,GACpC,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,yCAAyC,EACzC,0CAA0C,EAC1C,gDAAgD,EAChD,qCAAqC,EACrC,2CAA2C,EAC3C,gCAAgC,GACjC,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { RealTimeDummySimulationPresetId } from '../../fixtures/index';
|
|
2
|
+
import { RealTimeDummySimulationConfig } from '../../dummy/index';
|
|
2
3
|
import { OnRealTimeTransportReconnectCallback } from '@m4l/realtime-runtime';
|
|
3
|
-
import { RealTimeResourcePayloadMergeStrategy, RealTimeResourceMessageNormalizeStrategy, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSerialId, RealTimeResourceTypeId } from '
|
|
4
|
-
import { GClickRealtimeResourceStartupSnapshotConfig, GClickRealtimeStartupSnapshotConfig } from '
|
|
4
|
+
import { RealTimeResourceHash, RealTimeResourcePayloadMergeStrategy, RealTimeResourceMessageNormalizeStrategy, RealTimeResourceSourceMechanismConfigAtmosphere, RealTimeResourceSerialId, RealTimeResourceTypeId } from '@m4l/realtime-runtime/shared';
|
|
5
|
+
import { GClickRealtimeResourceStartupSnapshotConfig, GClickRealtimeStartupSnapshotConfig } from '../../shared/startupSnapshots';
|
|
5
6
|
import { GClickRealtimeHostRuntime } from './hostRuntime';
|
|
6
7
|
/**
|
|
7
8
|
* Supported fallback transports for the shared Atmosphere launch contract.
|
|
8
9
|
*/
|
|
9
|
-
export type GClickRealtimeAtmosphereFallbackTransport =
|
|
10
|
+
export type GClickRealtimeAtmosphereFallbackTransport = 'long-polling' | 'websocket';
|
|
10
11
|
/**
|
|
11
12
|
* Resource-type entry requested by one shell-owned Atmosphere subscription.
|
|
12
13
|
*/
|
|
@@ -17,17 +18,25 @@ export interface GClickRealtimeAtmosphereResourceTypeLaunchConfig {
|
|
|
17
18
|
publishParams?: Record<string, unknown>;
|
|
18
19
|
rateLimit?: number;
|
|
19
20
|
resourceTypeId: RealTimeResourceTypeId;
|
|
20
|
-
resourcesId?: Array<RealTimeResourceSerialId |
|
|
21
|
+
resourcesId?: Array<RealTimeResourceSerialId | 'all'>;
|
|
21
22
|
sizeLimit?: number;
|
|
22
23
|
startupSnapshot?: GClickRealtimeResourceStartupSnapshotConfig;
|
|
23
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Resource-type entry requested by one shell-owned deterministic dummy runtime.
|
|
27
|
+
*/
|
|
28
|
+
export interface GClickRealtimeDummyResourceTypeLaunchConfig {
|
|
29
|
+
initialHashResources?: RealTimeResourceHash;
|
|
30
|
+
resourceTypeId: RealTimeResourceTypeId;
|
|
31
|
+
simulation?: RealTimeDummySimulationConfig;
|
|
32
|
+
}
|
|
24
33
|
/**
|
|
25
34
|
* Shared shell-to-runtime contract used when one shell boots a deterministic dummy runtime.
|
|
26
35
|
*/
|
|
27
36
|
export interface GClickRealtimeDummyHostLaunchContract {
|
|
28
|
-
mode:
|
|
37
|
+
mode: 'dummy';
|
|
29
38
|
presetId: RealTimeDummySimulationPresetId;
|
|
30
|
-
|
|
39
|
+
resourceTypes: GClickRealtimeDummyResourceTypeLaunchConfig[];
|
|
31
40
|
runtimeKeyPrefix: string;
|
|
32
41
|
storeDevtoolsEnabled?: boolean;
|
|
33
42
|
}
|
|
@@ -39,7 +48,7 @@ export interface GClickRealtimeAtmosphereHostLaunchContract {
|
|
|
39
48
|
* Optional host-owned callback fired after one Atmosphere transport recovery succeeds.
|
|
40
49
|
*/
|
|
41
50
|
onTransportReconnect?: OnRealTimeTransportReconnectCallback;
|
|
42
|
-
mode:
|
|
51
|
+
mode: 'atmosphere';
|
|
43
52
|
database: string;
|
|
44
53
|
fallbackTransport?: GClickRealtimeAtmosphereFallbackTransport;
|
|
45
54
|
hostApiRemote?: string;
|
|
@@ -70,18 +79,15 @@ export declare function normalizeGClickRealtimeSessionId(sessionId?: string, ses
|
|
|
70
79
|
* Normalize the authenticated account id consumed by the shared launch contract.
|
|
71
80
|
*/
|
|
72
81
|
export declare function normalizeGClickRealtimeAccountId(accountId?: string, accountIdFallback?: string): string;
|
|
73
|
-
|
|
74
|
-
* Resolve the websocket host fragment derived from one backend API URL.
|
|
75
|
-
*/
|
|
76
|
-
export declare function resolveGClickRealtimeAtmosphereHost(hostApiRemote: string): string;
|
|
82
|
+
export { resolveGClickRealtimeAtmosphereHost } from '../../shared/atmosphereHost';
|
|
77
83
|
/**
|
|
78
84
|
* Build the runtime key for one deterministic dummy launch contract.
|
|
79
85
|
*/
|
|
80
|
-
export declare function createGClickDummyRuntimeKey(props: Pick<GClickRealtimeDummyHostLaunchContract,
|
|
86
|
+
export declare function createGClickDummyRuntimeKey(props: Pick<GClickRealtimeDummyHostLaunchContract, 'presetId' | 'resourceTypes' | 'runtimeKeyPrefix'>): string;
|
|
81
87
|
/**
|
|
82
88
|
* Build the runtime key for one Atmosphere-backed launch contract.
|
|
83
89
|
*/
|
|
84
|
-
export declare function createGClickAtmosphereRuntimeKey(props: Pick<GClickRealtimeAtmosphereHostLaunchContract,
|
|
90
|
+
export declare function createGClickAtmosphereRuntimeKey(props: Pick<GClickRealtimeAtmosphereHostLaunchContract, 'fallbackTransport' | 'hostApiRemote' | 'resourceTypes' | 'sessionId' | 'sessionIdFallback' | 'accountId' | 'accountIdFallback' | 'snapshotOnly' | 'runtimeKeyPrefix'>): string;
|
|
85
91
|
/**
|
|
86
92
|
* Build the Atmosphere runtime configs derived from one shared shell launch contract.
|
|
87
93
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"launchContract.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/host/launchContract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AAC5E,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAK,EACV,oCAAoC,EACpC,wCAAwC,EACxC,+CAA+C,EAC/C,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,
|
|
1
|
+
{"version":3,"file":"launchContract.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/host/launchContract.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,120 +1,126 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { createRealTimeDummyResourceTypeConfigFromPreset as u } from "../../dummy/simulation/simulation.js";
|
|
2
|
+
import { resolveGClickRealtimeAtmosphereHost as c } from "../../shared/atmosphereHost.js";
|
|
3
|
+
import { createGClickRealtimeResourceTypesKeySegment as n } from "../../shared/runtimeResourceTypesKey.js";
|
|
4
|
+
import { launchGClickDummyHostRuntime as d, launchGClickAtmosphereHostRuntime as I } from "./hostRuntime.js";
|
|
5
|
+
const f = "long-polling", y = "no-session-id", h = "no-account-id";
|
|
6
|
+
function o(e) {
|
|
7
|
+
return e === "websocket" ? "websocket" : f;
|
|
5
8
|
}
|
|
6
|
-
function
|
|
7
|
-
return e?.trim() ||
|
|
9
|
+
function a(e, s = y) {
|
|
10
|
+
return e?.trim() || s;
|
|
8
11
|
}
|
|
9
|
-
function
|
|
10
|
-
return e?.trim() ||
|
|
12
|
+
function r(e, s = h) {
|
|
13
|
+
return e?.trim() || s;
|
|
11
14
|
}
|
|
12
15
|
function p(e) {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
publishParams: s.publishParams ?? {},
|
|
16
|
-
rateLimit: s.rateLimit ?? 3,
|
|
17
|
-
resourceTypeId: s.resourceTypeId,
|
|
18
|
-
resourcesId: s.resourcesId ?? ["all"],
|
|
19
|
-
sizeLimit: s.sizeLimit ?? null
|
|
20
|
-
})).sort(
|
|
21
|
-
(s, n) => s.resourceTypeId.localeCompare(
|
|
22
|
-
n.resourceTypeId
|
|
23
|
-
)
|
|
16
|
+
const s = n(
|
|
17
|
+
e.resourceTypes
|
|
24
18
|
);
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
function h(e) {
|
|
28
|
-
const t = new URL(e), s = t.pathname.replace(/\/+$/u, ""), n = `${t.host}${s}/wss`;
|
|
29
|
-
return t.protocol === "http:" ? `ws://${n}` : n;
|
|
19
|
+
return `${e.runtimeKeyPrefix}:${e.presetId}:${s}`;
|
|
30
20
|
}
|
|
31
|
-
function
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
function y(e) {
|
|
35
|
-
const t = r(
|
|
21
|
+
function R(e) {
|
|
22
|
+
const s = o(
|
|
36
23
|
e.fallbackTransport
|
|
37
|
-
),
|
|
24
|
+
), t = a(
|
|
38
25
|
e.sessionId,
|
|
39
26
|
e.sessionIdFallback
|
|
40
|
-
),
|
|
27
|
+
), i = n(
|
|
41
28
|
e.resourceTypes
|
|
42
|
-
),
|
|
43
|
-
|
|
29
|
+
), l = e.snapshotOnly ? "snapshot-only" : "live", m = r(
|
|
30
|
+
e.accountId,
|
|
31
|
+
e.accountIdFallback
|
|
32
|
+
);
|
|
33
|
+
return `${e.runtimeKeyPrefix}:${l}:${e.hostApiRemote}:${m}:${t}:${s}:${i}`;
|
|
44
34
|
}
|
|
45
|
-
function
|
|
46
|
-
const { hostApiRemote:
|
|
47
|
-
if (!(!
|
|
48
|
-
return e.resourceTypes.map((
|
|
35
|
+
function g(e) {
|
|
36
|
+
const { hostApiRemote: s } = e;
|
|
37
|
+
if (!(!s || e.resourceTypes.length === 0))
|
|
38
|
+
return e.resourceTypes.map((t) => ({
|
|
49
39
|
sourceDataMechanism: "atmosphere",
|
|
50
|
-
resourceTypeId:
|
|
51
|
-
consumerType:
|
|
40
|
+
resourceTypeId: t.resourceTypeId,
|
|
41
|
+
consumerType: t.consumerType,
|
|
52
42
|
database: e.database,
|
|
53
|
-
fallbackTransport:
|
|
43
|
+
fallbackTransport: o(
|
|
54
44
|
e.fallbackTransport
|
|
55
45
|
),
|
|
56
|
-
host:
|
|
46
|
+
host: c(s),
|
|
57
47
|
port: "wss",
|
|
58
48
|
path: e.path,
|
|
59
|
-
...
|
|
60
|
-
...
|
|
61
|
-
publishParams:
|
|
62
|
-
rateLimit:
|
|
63
|
-
resourcesId:
|
|
64
|
-
sizeLimit:
|
|
49
|
+
...t.mergePayloadStrategy ? { mergePayloadStrategy: t.mergePayloadStrategy } : {},
|
|
50
|
+
...t.normalizeMessageStrategy ? { normalizeMessageStrategy: t.normalizeMessageStrategy } : {},
|
|
51
|
+
publishParams: t.publishParams,
|
|
52
|
+
rateLimit: t.rateLimit,
|
|
53
|
+
resourcesId: t.resourcesId,
|
|
54
|
+
sizeLimit: t.sizeLimit,
|
|
65
55
|
topic: e.topic,
|
|
66
|
-
sessionId:
|
|
56
|
+
sessionId: a(
|
|
67
57
|
e.sessionId,
|
|
68
58
|
e.sessionIdFallback
|
|
69
59
|
),
|
|
70
|
-
accountId:
|
|
60
|
+
accountId: r(
|
|
71
61
|
e.accountId,
|
|
72
|
-
|
|
62
|
+
e.accountIdFallback
|
|
73
63
|
)
|
|
74
64
|
}));
|
|
75
65
|
}
|
|
66
|
+
function k(e) {
|
|
67
|
+
return e.resourceTypes.map((s) => {
|
|
68
|
+
if (s.simulation || s.initialHashResources) {
|
|
69
|
+
const t = {
|
|
70
|
+
resourceTypeId: s.resourceTypeId,
|
|
71
|
+
sourceDataMechanism: "dummy"
|
|
72
|
+
};
|
|
73
|
+
return s.initialHashResources && (t.initialHashResources = s.initialHashResources), s.simulation && (t.simulation = s.simulation), t;
|
|
74
|
+
}
|
|
75
|
+
return u({
|
|
76
|
+
presetId: e.presetId,
|
|
77
|
+
resourceTypeId: s.resourceTypeId
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
}
|
|
76
81
|
function A(e) {
|
|
77
|
-
const
|
|
82
|
+
const s = e.resourceTypes.flatMap((t) => t.startupSnapshot ? [
|
|
78
83
|
{
|
|
79
|
-
...
|
|
80
|
-
resourceTypeId:
|
|
84
|
+
...t.startupSnapshot,
|
|
85
|
+
resourceTypeId: t.resourceTypeId
|
|
81
86
|
}
|
|
82
87
|
] : []);
|
|
83
|
-
return
|
|
88
|
+
return s.length ? s : void 0;
|
|
84
89
|
}
|
|
85
|
-
function
|
|
90
|
+
function D(e) {
|
|
86
91
|
if (e.mode === "dummy") {
|
|
87
|
-
const
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
const i = p(e);
|
|
93
|
+
return d({
|
|
94
|
+
resourceTypesConfig: k(
|
|
95
|
+
e
|
|
96
|
+
),
|
|
97
|
+
runtimeKey: i,
|
|
98
|
+
storeId: i,
|
|
93
99
|
storeDevtoolsEnabled: e.storeDevtoolsEnabled ?? !1
|
|
94
100
|
});
|
|
95
101
|
}
|
|
96
|
-
const
|
|
97
|
-
if (!
|
|
102
|
+
const s = g(e);
|
|
103
|
+
if (!s || !e.hostApiRemote)
|
|
98
104
|
return {};
|
|
99
|
-
const
|
|
100
|
-
return
|
|
105
|
+
const t = R(e);
|
|
106
|
+
return I({
|
|
101
107
|
onTransportReconnect: e.onTransportReconnect,
|
|
102
|
-
runtimeKey:
|
|
103
|
-
storeId:
|
|
108
|
+
runtimeKey: t,
|
|
109
|
+
storeId: t,
|
|
104
110
|
storeDevtoolsEnabled: e.storeDevtoolsEnabled ?? !1,
|
|
105
|
-
resourceTypesConfig:
|
|
111
|
+
resourceTypesConfig: s,
|
|
106
112
|
startSourceData: !e.snapshotOnly,
|
|
107
113
|
startupSnapshots: A(e)
|
|
108
114
|
});
|
|
109
115
|
}
|
|
110
116
|
export {
|
|
111
|
-
|
|
112
|
-
|
|
117
|
+
g as createGClickAtmosphereRuntimeConfigs,
|
|
118
|
+
R as createGClickAtmosphereRuntimeKey,
|
|
113
119
|
A as createGClickAtmosphereStartupSnapshots,
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
p as createGClickDummyRuntimeKey,
|
|
121
|
+
D as launchGClickRealtimeHostRuntime,
|
|
122
|
+
r as normalizeGClickRealtimeAccountId,
|
|
123
|
+
o as normalizeGClickRealtimeFallbackTransport,
|
|
124
|
+
a as normalizeGClickRealtimeSessionId,
|
|
125
|
+
c as resolveGClickRealtimeAtmosphereHost
|
|
120
126
|
};
|
package/web/index.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { recordActiveRealtimeConsumerStoreCount, recordActiveRealtimeConsumerSubscriptionCount, recordWebRealtimePerformanceMetric, } from './diagnostics/performanceMetrics';
|
|
2
|
+
export type { RealtimePerformanceMetric, RealtimePerformanceMetricId, RealtimePerformanceMetricsState, } from './diagnostics/performanceMetrics';
|
|
3
3
|
export * from './runtime/index';
|
|
4
|
-
export * from './shared/index';
|
|
5
4
|
export * from './host/index';
|
|
6
|
-
export { createRealTimeProducerTools } from '../../../../dist/packages/@m4l/realtime-runtime/web';
|
|
7
|
-
export type { RealTimeProducerTools } from '@m4l/realtime-runtime';
|
|
8
|
-
export type { RealTimeDummyCoordinate, RealTimeDummyDeletePhase, RealTimeDummyDeleteSegment, RealTimeDummyDeviceBlueprint, RealTimeDummyDrivePhase, RealTimeDummyDriveSegment, RealTimeDummyExecutionPhase, RealTimeDummyExecutionPhaseBase, RealTimeDummyExecutionPlan, RealTimeDummyExecutionPlanSegment, RealTimeDummyExecutionStateOverrides, RealTimeDummyGeneratedRouteArtifact, RealTimeDummyGeneratedRouteArtifactSampledPoint, RealTimeDummyGeneratedRoutesCatalog, RealTimeDummyGooglePolylineQuality, RealTimeDummyGoogleRoutingPreference, RealTimeDummyGoogleTrafficModel, RealTimeDummyGoogleTrafficSpeedCategory, RealTimeDummyGoogleTravelMode, RealTimeDummyIdlePhase, RealTimeDummyIdleSegment, RealTimeDummyNumericRangeExpectation, RealTimeDummyRouteSeed, RealTimeDummyRouteSeedIntermediate, RealTimeDummyRouteSeedLocation, RealTimeDummyRouteSeedPassThrough, RealTimeDummyRouteTemplate, RealTimeDummyRouteWaypoint, RealTimeDummyScenarioDefinition, RealTimeDummyScenarioDevice, RealTimeDummySimulationConfig, RealTimeDummySimulationPlayback, RealTimeDummySimulationPresetDefinition, } from '../dummy/index';
|
|
9
|
-
export { createRealTimeDummyResourceTypeConfigFromPreset, createRealTimeDummySimulationConfigFromPreset, REAL_TIME_DUMMY_DEFAULT_PRESET_ID, REAL_TIME_DUMMY_SIMULATION_PRESETS, RealTimeDummySimulationPresetId, } from '../dummy/index';
|
|
10
5
|
//# sourceMappingURL=index.d.ts.map
|
package/web/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/web/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/web/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sCAAsC,EACtC,6CAA6C,EAC7C,kCAAkC,GACnC,MAAM,kCAAkC,CAAC;AAC1C,YAAY,EACV,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,kCAAkC,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
|
package/web/index.js
CHANGED
|
@@ -1,64 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { createRealTimeConsumerStore as h } from "./consumer/store.js";
|
|
12
|
-
import { createRealtimeRuntime as M } from "./runtime/runtime.js";
|
|
13
|
-
import { createAtmosphereRealtimeRuntime as d } from "./runtime/runtimeAtmosphereOnly.js";
|
|
14
|
-
import { getOrCreateGClickRealtimeRuntime as v } from "./runtime/runtimeRegistry.js";
|
|
15
|
-
import { createGetOrCreateGClickRealtimeRuntime as U, disposeGClickRealtimeRuntime as g } from "./runtime/runtimeRegistry.shared.js";
|
|
16
|
-
import { getOrCreateGClickAtmosphereRealtimeRuntime as H } from "./runtime/runtimeRegistryAtmosphereOnly.js";
|
|
17
|
-
import { EnumResourceTypesIds as N, PROCCESS_MESSAGES_INTERVAL as z, REALTIME_CONSUMER_SOTORE_ID as K, REALTIME_PRODUCER_SOTORE_ID as V, RESOURCE_TYPE_ALARMS as b, RESOURCE_TYPE_DEVICES as j } from "./shared/constants.js";
|
|
18
|
-
import { createGClickDevicesAtmosphereResourceType as w, createGClickDevicesHotStartupSnapshot as B, createGClickDevicesStartupSnapshot as J, createGClickDevicesStartupSnapshotMessages as Q } from "./host/devicesResourceType.js";
|
|
19
|
-
import { launchGClickAtmosphereHostRuntime as X, launchGClickDummyHostRuntime as Z, resolveGClickRealtimeTools as $ } from "./host/hostRuntime.js";
|
|
20
|
-
import { createGClickAtmosphereRuntimeConfigs as re, createGClickAtmosphereRuntimeKey as te, createGClickAtmosphereStartupSnapshots as oe, createGClickDummyRuntimeKey as me, launchGClickRealtimeHostRuntime as ie, normalizeGClickRealtimeFallbackTransport as ae, normalizeGClickRealtimeSessionId as Re, resolveGClickRealtimeAtmosphereHost as le } from "./host/launchContract.js";
|
|
1
|
+
import { recordActiveRealtimeConsumerStoreCount as r, recordActiveRealtimeConsumerSubscriptionCount as i, recordWebRealtimePerformanceMetric as o } from "./diagnostics/performanceMetrics.js";
|
|
2
|
+
import { createGClickAtmosphereRealtimeRuntime as c } from "./runtime/atmosphere.js";
|
|
3
|
+
import { createGClickDummyRealtimeRuntime as l } from "./runtime/dummy.js";
|
|
4
|
+
import { createGClickRealtimeWebSourceDataFactory as p } from "./runtime/sourceDataFactory.js";
|
|
5
|
+
import { disposeGClickRealtimeRuntime as u, getOrCreateGClickAtmosphereRealtimeRuntime as C, getOrCreateGClickDummyRealtimeRuntime as R } from "./runtime/runtimeRegistry.js";
|
|
6
|
+
import { createGClickDevicesAtmosphereResourceType as G, createGClickDevicesHotStartupSnapshot as h, createGClickDevicesStartupSnapshot as S } from "./host/devicesResourceType.js";
|
|
7
|
+
import { createGClickRtDevicesStartupSnapshotMessages as x } from "../rt_devices/index.js";
|
|
8
|
+
import { launchGClickAtmosphereHostRuntime as D, launchGClickDummyHostRuntime as v, resolveGClickRealtimeTools as y } from "./host/hostRuntime.js";
|
|
9
|
+
import { createGClickAtmosphereRuntimeConfigs as g, createGClickAtmosphereRuntimeKey as H, createGClickAtmosphereStartupSnapshots as b, createGClickDummyRuntimeKey as M, launchGClickRealtimeHostRuntime as T, normalizeGClickRealtimeFallbackTransport as z, normalizeGClickRealtimeSessionId as F } from "./host/launchContract.js";
|
|
10
|
+
import { resolveGClickRealtimeAtmosphereHost as O } from "../shared/atmosphereHost.js";
|
|
21
11
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
C as
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
h as createRealTimeConsumerStore,
|
|
47
|
-
l as createRealTimeDummyResourceTypeConfigFromPreset,
|
|
48
|
-
a as createRealTimeDummySimulationConfigFromPreset,
|
|
49
|
-
S as createRealTimeProducerStore,
|
|
50
|
-
t as createRealTimeProducerTools,
|
|
51
|
-
M as createRealtimeRuntime,
|
|
52
|
-
g as disposeGClickRealtimeRuntime,
|
|
53
|
-
H as getOrCreateGClickAtmosphereRealtimeRuntime,
|
|
54
|
-
v as getOrCreateGClickRealtimeRuntime,
|
|
55
|
-
X as launchGClickAtmosphereHostRuntime,
|
|
56
|
-
Z as launchGClickDummyHostRuntime,
|
|
57
|
-
ie as launchGClickRealtimeHostRuntime,
|
|
58
|
-
ae as normalizeGClickRealtimeFallbackTransport,
|
|
59
|
-
Re as normalizeGClickRealtimeSessionId,
|
|
60
|
-
le as resolveGClickRealtimeAtmosphereHost,
|
|
61
|
-
$ as resolveGClickRealtimeTools,
|
|
62
|
-
D as useRealTimeConsumer,
|
|
63
|
-
T as useRealTimeProducer
|
|
12
|
+
c as createGClickAtmosphereRealtimeRuntime,
|
|
13
|
+
g as createGClickAtmosphereRuntimeConfigs,
|
|
14
|
+
H as createGClickAtmosphereRuntimeKey,
|
|
15
|
+
b as createGClickAtmosphereStartupSnapshots,
|
|
16
|
+
G as createGClickDevicesAtmosphereResourceType,
|
|
17
|
+
h as createGClickDevicesHotStartupSnapshot,
|
|
18
|
+
S as createGClickDevicesStartupSnapshot,
|
|
19
|
+
x as createGClickDevicesStartupSnapshotMessages,
|
|
20
|
+
l as createGClickDummyRealtimeRuntime,
|
|
21
|
+
M as createGClickDummyRuntimeKey,
|
|
22
|
+
p as createGClickRealtimeWebSourceDataFactory,
|
|
23
|
+
u as disposeGClickRealtimeRuntime,
|
|
24
|
+
C as getOrCreateGClickAtmosphereRealtimeRuntime,
|
|
25
|
+
R as getOrCreateGClickDummyRealtimeRuntime,
|
|
26
|
+
D as launchGClickAtmosphereHostRuntime,
|
|
27
|
+
v as launchGClickDummyHostRuntime,
|
|
28
|
+
T as launchGClickRealtimeHostRuntime,
|
|
29
|
+
z as normalizeGClickRealtimeFallbackTransport,
|
|
30
|
+
F as normalizeGClickRealtimeSessionId,
|
|
31
|
+
r as recordActiveRealtimeConsumerStoreCount,
|
|
32
|
+
i as recordActiveRealtimeConsumerSubscriptionCount,
|
|
33
|
+
o as recordWebRealtimePerformanceMetric,
|
|
34
|
+
O as resolveGClickRealtimeAtmosphereHost,
|
|
35
|
+
y as resolveGClickRealtimeTools
|
|
64
36
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CreateRealtimeRuntimeProps, RealtimeRuntimeBundle } from '@m4l/realtime-runtime/web';
|
|
2
|
+
import { RealTimeResourceSourceMechanismConfigAtmosphere } from '@m4l/realtime-runtime/shared';
|
|
3
|
+
export type { RealtimeRuntimeBundle, } from '@m4l/realtime-runtime/web';
|
|
4
|
+
export type CreateGClickAtmosphereRealtimeRuntimeProps = Omit<CreateRealtimeRuntimeProps, 'resourceTypesConfig'> & {
|
|
5
|
+
resourceTypesConfig: RealTimeResourceSourceMechanismConfigAtmosphere[];
|
|
6
|
+
};
|
|
7
|
+
export type GClickRealtimeRuntime = RealtimeRuntimeBundle;
|
|
8
|
+
/**
|
|
9
|
+
* Create the GClick web runtime backed only by Atmosphere source configs.
|
|
10
|
+
*/
|
|
11
|
+
export declare function createGClickAtmosphereRealtimeRuntime(props: CreateGClickAtmosphereRealtimeRuntimeProps): GClickRealtimeRuntime;
|
|
12
|
+
//# sourceMappingURL=atmosphere.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atmosphere.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/runtime/atmosphere.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC3B,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,+CAA+C,EAChD,MAAM,8BAA8B,CAAC;AAStC,YAAY,EACV,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,0CAA0C,GAAG,IAAI,CAC3D,0BAA0B,EAC1B,qBAAqB,CACtB,GAAG;IACF,mBAAmB,EAAE,+CAA+C,EAAE,CAAC;CACxE,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,CAAC;AAE1D;;GAEG;AACH,wBAAgB,qCAAqC,CACnD,KAAK,EAAE,0CAA0C,GAChD,qBAAqB,CAevB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRealtimeRuntimeBundle as t } from "@m4l/realtime-runtime/web";
|
|
2
|
+
import { withGClickResourceTypeMergeStrategies as o } from "../../rt_devices/resourceTypeMergeStrategies.js";
|
|
3
|
+
import { createGClickRealtimeWebSourceDataFactory as i } from "./sourceDataFactory.js";
|
|
4
|
+
import { createGClickRealtimePerformanceMetricReporter as c } from "./performanceMetricReporter.js";
|
|
5
|
+
function l(e) {
|
|
6
|
+
const r = o(
|
|
7
|
+
e.resourceTypesConfig
|
|
8
|
+
);
|
|
9
|
+
return t(
|
|
10
|
+
{
|
|
11
|
+
...e,
|
|
12
|
+
resourceTypesConfig: r,
|
|
13
|
+
onPerformanceMetric: c(
|
|
14
|
+
e.onPerformanceMetric
|
|
15
|
+
)
|
|
16
|
+
},
|
|
17
|
+
i()
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
l as createGClickAtmosphereRealtimeRuntime
|
|
22
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CreateRealtimeRuntimeProps } from '@m4l/realtime-runtime/web';
|
|
2
|
+
import { RealTimeResourceSourceMechanismConfigDummy } from '../../dummy/index';
|
|
3
|
+
import { GClickRealtimeRuntime } from './atmosphere';
|
|
4
|
+
export type CreateGClickDummyRealtimeRuntimeProps = Omit<CreateRealtimeRuntimeProps, 'resourceTypesConfig'> & {
|
|
5
|
+
resourceTypesConfig: RealTimeResourceSourceMechanismConfigDummy[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Create one auxiliary GClick web runtime backed only by dummy source configs.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createGClickDummyRealtimeRuntime(props: CreateGClickDummyRealtimeRuntimeProps): GClickRealtimeRuntime;
|
|
11
|
+
//# sourceMappingURL=dummy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dummy.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/web/runtime/dummy.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EACV,0CAA0C,EAC3C,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAS1D,MAAM,MAAM,qCAAqC,GAAG,IAAI,CACtD,0BAA0B,EAC1B,qBAAqB,CACtB,GAAG;IACF,mBAAmB,EAAE,0CAA0C,EAAE,CAAC;CACnE,CAAC;AAEF;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,qCAAqC,GAC3C,qBAAqB,CAevB"}
|