@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,5 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { RealTimeResourceSerialId, SourceDataBase } from '@m4l/realtime-runtime/shared';
|
|
2
|
+
declare const gclickRealtimeDummyPlaybackDriverHandle: Readonly<{
|
|
3
|
+
readonly id: "gclick-realtime.dummy-playback-driver";
|
|
4
|
+
readonly key: "globalThis.__M4L_TEST_DUMMY_PLAYBACK_DRIVER__";
|
|
5
|
+
readonly property: "__M4L_TEST_DUMMY_PLAYBACK_DRIVER__";
|
|
6
|
+
readonly purpose: "Expose the dummy realtime playback driver for deterministic probes and tests.";
|
|
7
|
+
}>;
|
|
3
8
|
type DummyPlaybackDriverState = 'paused' | 'running' | 'stopped';
|
|
4
9
|
type DummyPlaybackResumeOptions = {
|
|
5
10
|
flushImmediately?: boolean;
|
|
@@ -65,4 +70,4 @@ export declare class SourceDataDummy extends SourceDataBase {
|
|
|
65
70
|
stop(): void;
|
|
66
71
|
}
|
|
67
72
|
export default SourceDataDummy;
|
|
68
|
-
//# sourceMappingURL=
|
|
73
|
+
//# sourceMappingURL=SourceDataDummy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SourceDataDummy.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/dummy/source-data/SourceDataDummy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,wBAAwB,EACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AA+B9D,QAAA,MAAM,uCAAuC;;;;;EAKyC,CAAC;AAsBvF,KAAK,wBAAwB,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AASjE,KAAK,0BAA0B,GAAG;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,wBAAwB,CAAC;CAC5C,CAAC;AASF,KAAK,uBAAuB,GAAG;IAC7B,eAAe,EAAE,CACf,gBAAgB,EAAE,wBAAwB,KACvC,yBAAyB,GAAG,IAAI,CAAC;IACtC,QAAQ,EAAE,MAAM,wBAAwB,CAAC;IACzC,KAAK,EAAE,MAAM,wBAAwB,CAAC;IACtC,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,0BAA0B,KAAK,wBAAwB,CAAC;CAC5E,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,UAAU;QAClB,CAAC,uCAAuC,CAAC,QAAQ,CAAC,CAAC,EACjD,uBAAuB,CAAC;KAC3B;CACF;AAicD;;GAEG;AACH,qBAAa,eAAgB,SAAQ,cAAc;IACjD,OAAO,CAAC,kBAAkB,CAAuD;IAEjF,OAAO,CAAC,gBAAgB,CAAS;IAEjC,OAAO,CAAC,eAAe,CAAqC;IAE5D;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAQ7B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAU9B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IAwB/B;;OAEG;IACH,OAAO,CAAC,yBAAyB;IA+BjC;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAkC7B;;OAEG;IACH,OAAO,CAAC,aAAa;IASrB;;OAEG;IACH,OAAO,CAAC,cAAc;IAsBtB;;OAEG;IACH,KAAK,IAAI,IAAI;IAoDb;;OAEG;IACH,IAAI,IAAI,IAAI;CASb;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import S from "../../node_modules/lodash-es/cloneDeep.js";
|
|
6
|
-
const h = [
|
|
1
|
+
import { SourceDataBase as S } from "@m4l/realtime-runtime/shared";
|
|
2
|
+
import { buildRealTimeDummyRuntimeModel as R } from "../simulation/simulation.js";
|
|
3
|
+
import I from "../../node_modules/lodash-es/cloneDeep.js";
|
|
4
|
+
const k = [
|
|
7
5
|
"gnssCourse",
|
|
8
6
|
"gnssLatitude",
|
|
9
7
|
"gnssLongitude",
|
|
10
8
|
"gnssSpeed"
|
|
11
|
-
],
|
|
9
|
+
], b = [
|
|
12
10
|
"adcPowerBackupLevel",
|
|
13
11
|
"adcPowerBackupStatus",
|
|
14
12
|
"adcPowerBackupVolt",
|
|
@@ -16,30 +14,35 @@ const h = [
|
|
|
16
14
|
"adcPowerMainStatus",
|
|
17
15
|
"adcPowerMainVolt",
|
|
18
16
|
"adcPowerSrcMainBatteryType"
|
|
19
|
-
],
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
], p = Object.freeze({
|
|
18
|
+
id: "gclick-realtime.dummy-playback-driver",
|
|
19
|
+
key: "globalThis.__M4L_TEST_DUMMY_PLAYBACK_DRIVER__",
|
|
20
|
+
property: "__M4L_TEST_DUMMY_PLAYBACK_DRIVER__",
|
|
21
|
+
purpose: "Expose the dummy realtime playback driver for deterministic probes and tests."
|
|
22
|
+
}), d = globalThis;
|
|
23
|
+
let y = null;
|
|
24
|
+
function T() {
|
|
25
|
+
return d[p.property] || (d[p.property] = {
|
|
23
26
|
getDeviceCursor(e) {
|
|
24
|
-
return
|
|
27
|
+
return y?.getDeviceCursor(e) ?? null;
|
|
25
28
|
},
|
|
26
29
|
getState() {
|
|
27
|
-
return
|
|
30
|
+
return y?.getState() ?? "stopped";
|
|
28
31
|
},
|
|
29
32
|
/** Pauses the active dummy playback controller and returns its current state. */
|
|
30
33
|
pause() {
|
|
31
|
-
return
|
|
34
|
+
return y?.pause(), d[p.property]?.getState() ?? "stopped";
|
|
32
35
|
},
|
|
33
36
|
/** Resumes the active dummy playback controller with the given options and returns its current state. */
|
|
34
37
|
resume(e) {
|
|
35
|
-
return
|
|
38
|
+
return y?.resume(e), d[p.property]?.getState() ?? "stopped";
|
|
36
39
|
}
|
|
37
|
-
}, d[
|
|
40
|
+
}), d[p.property];
|
|
38
41
|
}
|
|
39
42
|
function g(e) {
|
|
40
|
-
|
|
43
|
+
y = e, T();
|
|
41
44
|
}
|
|
42
|
-
function
|
|
45
|
+
function u(e, t) {
|
|
43
46
|
return {
|
|
44
47
|
updatedAtMs: t,
|
|
45
48
|
value: e
|
|
@@ -48,122 +51,108 @@ function o(e, t) {
|
|
|
48
51
|
function D(e) {
|
|
49
52
|
return new Date(e).toISOString();
|
|
50
53
|
}
|
|
51
|
-
function
|
|
54
|
+
function m(e) {
|
|
52
55
|
return typeof e == "object" && e !== null && "value" in e;
|
|
53
56
|
}
|
|
54
|
-
function
|
|
57
|
+
function M(e, t) {
|
|
55
58
|
return {
|
|
56
59
|
adcPowerByKey: Object.fromEntries(
|
|
57
|
-
|
|
60
|
+
b.flatMap((s) => {
|
|
58
61
|
const a = e.current.vpts?.vptAdcPower?.[s];
|
|
59
|
-
return
|
|
62
|
+
return m(a) ? [[
|
|
60
63
|
s,
|
|
61
|
-
|
|
64
|
+
u(a.value, t)
|
|
62
65
|
]] : [];
|
|
63
66
|
})
|
|
64
67
|
),
|
|
65
68
|
diXByKey: Object.fromEntries(
|
|
66
69
|
Object.entries(e.current.vpts?.vptDiX ?? {}).map(([s, a]) => [
|
|
67
70
|
s,
|
|
68
|
-
|
|
71
|
+
u(a.diXValue?.value, t)
|
|
69
72
|
])
|
|
70
73
|
),
|
|
71
74
|
doXByKey: Object.fromEntries(
|
|
72
75
|
Object.entries(e.current.vpts?.vptDoX ?? {}).map(([s, a]) => [
|
|
73
76
|
s,
|
|
74
|
-
|
|
77
|
+
u(a.diXValue?.value, t)
|
|
75
78
|
])
|
|
76
79
|
),
|
|
77
80
|
gnssByKey: Object.fromEntries(
|
|
78
|
-
|
|
81
|
+
k.flatMap((s) => {
|
|
79
82
|
const a = e.current.vpts?.vptGnss?.[s];
|
|
80
|
-
return
|
|
83
|
+
return m(a) ? [[
|
|
81
84
|
s,
|
|
82
|
-
|
|
85
|
+
u(a.value, t)
|
|
83
86
|
]] : [];
|
|
84
87
|
})
|
|
85
88
|
),
|
|
86
|
-
ignition:
|
|
89
|
+
ignition: u(
|
|
87
90
|
e.current.vpts?.vptIgnition?.ignitionValue?.value,
|
|
88
91
|
t
|
|
89
92
|
),
|
|
90
|
-
motionStatus:
|
|
93
|
+
motionStatus: u(
|
|
91
94
|
e.current.vpts?.vptGnss?.gnssMotionStatus?.value,
|
|
92
95
|
t
|
|
93
96
|
),
|
|
94
|
-
signal:
|
|
97
|
+
signal: u(
|
|
95
98
|
e.current.vpts?.vptGnss?.gnssSignal?.value,
|
|
96
99
|
t
|
|
97
100
|
)
|
|
98
101
|
};
|
|
99
102
|
}
|
|
100
|
-
function
|
|
103
|
+
function c(e, t, s) {
|
|
101
104
|
return e.value !== t && (e.value = t, e.updatedAtMs = s), D(e.updatedAtMs);
|
|
102
105
|
}
|
|
103
|
-
function
|
|
106
|
+
function h(e, t, s) {
|
|
104
107
|
const a = D(s);
|
|
105
|
-
return e.
|
|
106
|
-
|
|
107
|
-
updatedAt
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
...e.reportProfiles.generalEvents.reportProfileLastEventId,
|
|
111
|
-
updatedAt: a
|
|
112
|
-
}), e.reportProfiles?.systemEvents?.reportProfileLastEventDate && (e.reportProfiles.systemEvents.reportProfileLastEventDate = {
|
|
113
|
-
...e.reportProfiles.systemEvents.reportProfileLastEventDate,
|
|
114
|
-
updatedAt: a,
|
|
115
|
-
value: a
|
|
116
|
-
}), e.reportProfiles?.systemEvents?.reportProfileLastEventId && (e.reportProfiles.systemEvents.reportProfileLastEventId = {
|
|
117
|
-
...e.reportProfiles.systemEvents.reportProfileLastEventId,
|
|
118
|
-
updatedAt: a
|
|
119
|
-
}), Object.entries(e.vpts?.vptDiX ?? {}).forEach(([r, n]) => {
|
|
120
|
-
const i = t.diXByKey[r] ?? o(n.diXValue?.value, s);
|
|
121
|
-
t.diXByKey[r] = i, n.diXStatus && (n.diXStatus.updatedAt = l(
|
|
122
|
-
i,
|
|
123
|
-
n.diXValue?.value,
|
|
108
|
+
return Object.entries(e.vpts?.vptDiX ?? {}).forEach(([r, i]) => {
|
|
109
|
+
const n = t.diXByKey[r] ?? u(i.diXValue?.value, s);
|
|
110
|
+
t.diXByKey[r] = n, i.diXStatus && (i.diXStatus.updatedAt = c(
|
|
111
|
+
n,
|
|
112
|
+
i.diXValue?.value,
|
|
124
113
|
s
|
|
125
|
-
)),
|
|
126
|
-
|
|
127
|
-
|
|
114
|
+
)), i.diXValue && (i.diXValue.updatedAt = c(
|
|
115
|
+
n,
|
|
116
|
+
i.diXValue.value,
|
|
128
117
|
s
|
|
129
118
|
));
|
|
130
|
-
}), Object.entries(e.vpts?.vptDoX ?? {}).forEach(([r,
|
|
131
|
-
const
|
|
132
|
-
t.doXByKey[r] =
|
|
133
|
-
|
|
134
|
-
|
|
119
|
+
}), Object.entries(e.vpts?.vptDoX ?? {}).forEach(([r, i]) => {
|
|
120
|
+
const n = t.doXByKey[r] ?? u(i.diXValue?.value, s);
|
|
121
|
+
t.doXByKey[r] = n, i.diXValue && (i.diXValue.updatedAt = c(
|
|
122
|
+
n,
|
|
123
|
+
i.diXValue.value,
|
|
135
124
|
s
|
|
136
125
|
));
|
|
137
|
-
}), e.vpts?.vptGnss?.gnssMotionStatus && (e.vpts.vptGnss.gnssMotionStatus.updatedAt =
|
|
126
|
+
}), e.vpts?.vptGnss?.gnssMotionStatus && (e.vpts.vptGnss.gnssMotionStatus.updatedAt = c(
|
|
138
127
|
t.motionStatus,
|
|
139
128
|
e.vpts.vptGnss.gnssMotionStatus.value,
|
|
140
129
|
s
|
|
141
|
-
)), e.vpts?.vptGnss?.gnssSignal && (e.vpts.vptGnss.gnssSignal.updatedAt =
|
|
130
|
+
)), e.vpts?.vptGnss?.gnssSignal && (e.vpts.vptGnss.gnssSignal.updatedAt = c(
|
|
142
131
|
t.signal,
|
|
143
132
|
e.vpts.vptGnss.gnssSignal.value,
|
|
144
133
|
s
|
|
145
|
-
)), e.vpts?.vptIgnition?.ignitionValue && (e.vpts.vptIgnition.ignitionValue.updatedAt =
|
|
134
|
+
)), e.vpts?.vptIgnition?.ignitionValue && (e.vpts.vptIgnition.ignitionValue.updatedAt = c(
|
|
146
135
|
t.ignition,
|
|
147
136
|
e.vpts.vptIgnition.ignitionValue.value,
|
|
148
137
|
s
|
|
149
|
-
)),
|
|
150
|
-
const
|
|
151
|
-
if (!
|
|
138
|
+
)), b.forEach((r) => {
|
|
139
|
+
const i = e.vpts?.vptAdcPower?.[r];
|
|
140
|
+
if (!m(i))
|
|
152
141
|
return;
|
|
153
|
-
const
|
|
154
|
-
t.adcPowerByKey[r] =
|
|
155
|
-
|
|
156
|
-
|
|
142
|
+
const n = t.adcPowerByKey[r] ?? u(i.value, s);
|
|
143
|
+
t.adcPowerByKey[r] = n, i.updatedAt = c(
|
|
144
|
+
n,
|
|
145
|
+
i.value,
|
|
157
146
|
s
|
|
158
147
|
);
|
|
159
|
-
}),
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
148
|
+
}), k.forEach((r) => {
|
|
149
|
+
const i = e.vpts?.vptGnss?.[r];
|
|
150
|
+
if (!m(i))
|
|
162
151
|
return;
|
|
163
|
-
const
|
|
164
|
-
t.gnssByKey[r] =
|
|
165
|
-
|
|
166
|
-
|
|
152
|
+
const n = t.gnssByKey[r] ?? u(i.value, s);
|
|
153
|
+
t.gnssByKey[r] = n, i.updatedAt = c(
|
|
154
|
+
n,
|
|
155
|
+
i.value,
|
|
167
156
|
s
|
|
168
157
|
);
|
|
169
158
|
}), e.vpts?.vptNetwork && (e.vpts.vptNetwork.networkLastConnectionDate && (e.vpts.vptNetwork.networkLastConnectionDate = {
|
|
@@ -176,65 +165,65 @@ function P(e, t, s) {
|
|
|
176
165
|
value: a
|
|
177
166
|
})), e;
|
|
178
167
|
}
|
|
179
|
-
function
|
|
168
|
+
function w(e, t, s) {
|
|
180
169
|
if (e.type === "delete")
|
|
181
170
|
return e;
|
|
182
171
|
if (e.type === "new") {
|
|
183
172
|
const a = e.payload;
|
|
184
|
-
return
|
|
173
|
+
return h(a.current, t, s), e;
|
|
185
174
|
}
|
|
186
|
-
return
|
|
175
|
+
return h(
|
|
187
176
|
e.payload.current,
|
|
188
177
|
t,
|
|
189
178
|
s
|
|
190
179
|
), e;
|
|
191
180
|
}
|
|
192
|
-
function
|
|
181
|
+
function v(e, t) {
|
|
193
182
|
return e.initialHashResources?.[t.resourceSerialId] ? t.initialMessageIndex : 0;
|
|
194
183
|
}
|
|
195
|
-
function
|
|
184
|
+
function E(e, t) {
|
|
196
185
|
return e.emissionOffsetMs <= 0 ? t : e.emissionOffsetMs;
|
|
197
186
|
}
|
|
198
|
-
function
|
|
199
|
-
const
|
|
200
|
-
let
|
|
201
|
-
for (let
|
|
202
|
-
if (
|
|
187
|
+
function _(e, t, s, a, r) {
|
|
188
|
+
const i = [];
|
|
189
|
+
let n = s.get(t.resourceSerialId) ?? v(e, t);
|
|
190
|
+
for (let o = 0; o < a; o += 1) {
|
|
191
|
+
if (n >= t.messages.length) {
|
|
203
192
|
if (!r)
|
|
204
193
|
break;
|
|
205
|
-
|
|
194
|
+
n = 0;
|
|
206
195
|
}
|
|
207
|
-
const
|
|
208
|
-
if (!
|
|
196
|
+
const l = t.messages[n];
|
|
197
|
+
if (!l)
|
|
209
198
|
break;
|
|
210
|
-
|
|
199
|
+
i.push(I(l)), n += 1;
|
|
211
200
|
}
|
|
212
|
-
return s.set(t.resourceSerialId,
|
|
201
|
+
return s.set(t.resourceSerialId, n), i;
|
|
213
202
|
}
|
|
214
|
-
function
|
|
203
|
+
function x(e, t) {
|
|
215
204
|
return e.every((s) => (t.get(s.resourceSerialId) ?? 0) >= s.messages.length);
|
|
216
205
|
}
|
|
217
|
-
function
|
|
218
|
-
const
|
|
206
|
+
function X(e, t, s, a, r, i, n) {
|
|
207
|
+
const o = Date.now(), l = _(
|
|
219
208
|
e,
|
|
220
209
|
t,
|
|
221
210
|
s,
|
|
222
211
|
r,
|
|
223
|
-
|
|
212
|
+
i
|
|
224
213
|
);
|
|
225
|
-
if (
|
|
226
|
-
const
|
|
227
|
-
|
|
214
|
+
if (l.length) {
|
|
215
|
+
const f = a.get(t.resourceSerialId);
|
|
216
|
+
n(
|
|
228
217
|
e.resourceTypeId,
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
)) :
|
|
218
|
+
f ? l.map((P) => w(
|
|
219
|
+
P,
|
|
220
|
+
f,
|
|
221
|
+
o
|
|
222
|
+
)) : l
|
|
234
223
|
);
|
|
235
224
|
}
|
|
236
225
|
}
|
|
237
|
-
class
|
|
226
|
+
class C extends S {
|
|
238
227
|
deviceSchedulerIds = /* @__PURE__ */ new Map();
|
|
239
228
|
isPlaybackPaused = !1;
|
|
240
229
|
playbackRuntime = null;
|
|
@@ -261,7 +250,7 @@ class G extends E {
|
|
|
261
250
|
const s = this.playbackRuntime.runtime.devices.find((a) => a.resourceSerialId === t);
|
|
262
251
|
return s ? {
|
|
263
252
|
messageCount: s.messages.length,
|
|
264
|
-
nextMessageIndex: this.playbackRuntime.nextMessageIndexes.get(t) ??
|
|
253
|
+
nextMessageIndex: this.playbackRuntime.nextMessageIndexes.get(t) ?? v(this.playbackRuntime.config, s),
|
|
265
254
|
resourceSerialId: t
|
|
266
255
|
} : null;
|
|
267
256
|
}
|
|
@@ -272,13 +261,13 @@ class G extends E {
|
|
|
272
261
|
const a = this.playbackRuntime;
|
|
273
262
|
if (!a)
|
|
274
263
|
return;
|
|
275
|
-
const r = a.nextMessageIndexes.get(t.resourceSerialId) ??
|
|
264
|
+
const r = a.nextMessageIndexes.get(t.resourceSerialId) ?? v(a.config, t);
|
|
276
265
|
if (!a.runtime.playback.loop && r >= t.messages.length)
|
|
277
266
|
return;
|
|
278
|
-
const
|
|
267
|
+
const i = setTimeout(() => {
|
|
279
268
|
this.deviceSchedulerIds.delete(t.resourceSerialId), !(this.isPlaybackPaused || !this.playbackRuntime) && this.emitRuntimeDeviceTick(t);
|
|
280
269
|
}, s);
|
|
281
|
-
this.deviceSchedulerIds.set(t.resourceSerialId,
|
|
270
|
+
this.deviceSchedulerIds.set(t.resourceSerialId, i);
|
|
282
271
|
}
|
|
283
272
|
/**
|
|
284
273
|
* Emit one runtime-device batch immediately and schedule the next cadence tick when needed.
|
|
@@ -286,7 +275,7 @@ class G extends E {
|
|
|
286
275
|
emitRuntimeDeviceTick(t) {
|
|
287
276
|
const s = this.playbackRuntime;
|
|
288
277
|
if (s) {
|
|
289
|
-
if (
|
|
278
|
+
if (X(
|
|
290
279
|
s.config,
|
|
291
280
|
t,
|
|
292
281
|
s.nextMessageIndexes,
|
|
@@ -294,7 +283,7 @@ class G extends E {
|
|
|
294
283
|
s.runtime.playback.framesPerTick,
|
|
295
284
|
s.runtime.playback.loop,
|
|
296
285
|
this.onMessages
|
|
297
|
-
), !s.runtime.playback.loop &&
|
|
286
|
+
), !s.runtime.playback.loop && x(
|
|
298
287
|
s.runtime.devices,
|
|
299
288
|
s.nextMessageIndexes
|
|
300
289
|
)) {
|
|
@@ -336,17 +325,17 @@ class G extends E {
|
|
|
336
325
|
*/
|
|
337
326
|
start() {
|
|
338
327
|
this.stop();
|
|
339
|
-
const t = this.config, s = t.wallClockStartAtMs ?? Date.now(), a =
|
|
328
|
+
const t = this.config, s = t.wallClockStartAtMs ?? Date.now(), a = R(t.simulation, {
|
|
340
329
|
resourceTypeId: t.resourceTypeId,
|
|
341
330
|
wallClockStartAtMs: s
|
|
342
331
|
}), r = new Map(
|
|
343
|
-
a.devices.map((
|
|
344
|
-
),
|
|
345
|
-
a.devices.map((
|
|
346
|
-
const
|
|
332
|
+
a.devices.map((n) => [n.resourceSerialId, v(t, n)])
|
|
333
|
+
), i = new Map(
|
|
334
|
+
a.devices.map((n) => {
|
|
335
|
+
const o = t.initialHashResources?.[n.resourceSerialId] ?? n.initialResource;
|
|
347
336
|
return [
|
|
348
|
-
|
|
349
|
-
|
|
337
|
+
n.resourceSerialId,
|
|
338
|
+
M(o, s)
|
|
350
339
|
];
|
|
351
340
|
})
|
|
352
341
|
);
|
|
@@ -354,29 +343,29 @@ class G extends E {
|
|
|
354
343
|
config: t,
|
|
355
344
|
nextMessageIndexes: r,
|
|
356
345
|
runtime: a,
|
|
357
|
-
timestampStates:
|
|
346
|
+
timestampStates: i
|
|
358
347
|
}, g({
|
|
359
|
-
getDeviceCursor: (
|
|
348
|
+
getDeviceCursor: (n) => this.getPlaybackDeviceCursor(n),
|
|
360
349
|
getState: () => this.getPlaybackDriverState(),
|
|
361
350
|
pause: () => {
|
|
362
351
|
this.pausePlayback();
|
|
363
352
|
},
|
|
364
|
-
resume: (
|
|
365
|
-
this.resumePlayback(
|
|
353
|
+
resume: (n) => {
|
|
354
|
+
this.resumePlayback(n);
|
|
366
355
|
}
|
|
367
|
-
}), a.devices.forEach((
|
|
368
|
-
const
|
|
369
|
-
this.scheduleRuntimeDeviceTick(
|
|
356
|
+
}), a.devices.forEach((n) => {
|
|
357
|
+
const o = E(n, a.playback.intervalMs);
|
|
358
|
+
this.scheduleRuntimeDeviceTick(n, o);
|
|
370
359
|
});
|
|
371
360
|
}
|
|
372
361
|
/**
|
|
373
362
|
* Stop the deterministic dummy playback loop.
|
|
374
363
|
*/
|
|
375
364
|
stop() {
|
|
376
|
-
this.clearDeviceSchedulers(), this.isPlaybackPaused = !1, this.playbackRuntime = null,
|
|
365
|
+
this.clearDeviceSchedulers(), this.isPlaybackPaused = !1, this.playbackRuntime = null, y?.getState() !== "stopped" && g(null);
|
|
377
366
|
}
|
|
378
367
|
}
|
|
379
368
|
export {
|
|
380
|
-
|
|
381
|
-
|
|
369
|
+
C as SourceDataDummy,
|
|
370
|
+
C as default
|
|
382
371
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from './runtime/index';
|
|
2
|
+
export { createGClickRealtimeMobileResourceTypesConfig, createGClickRealtimeMobileResourceTypesKeySegment, createGClickRtAlarmsAtmosphereMobileResourceTypeConfig, createGClickRtDevicesAtmosphereMobileResourceTypeConfig, resolveGClickRealtimeAtmosphereHost, } from './resourceTypes';
|
|
3
|
+
export type { CreateGClickRtAlarmsAtmosphereMobileResourceTypeConfigProps, CreateGClickRtDevicesAtmosphereMobileResourceTypeConfigProps, GClickRealtimeAtmosphereMobileResourceTypeConfig, GClickRealtimeMobileAtmosphereConnectionConfig, GClickRtAlarmsAtmosphereMobileResourceTypeConfig, GClickRtDevicesAtmosphereMobileResourceTypeConfig, } from './resourceTypes';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/mobile/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,6CAA6C,EAC7C,iDAAiD,EACjD,sDAAsD,EACtD,uDAAuD,EACvD,mCAAmC,GACpC,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,2DAA2D,EAC3D,4DAA4D,EAC5D,gDAAgD,EAChD,8CAA8C,EAC9C,gDAAgD,EAChD,iDAAiD,GAClD,MAAM,iBAAiB,CAAC"}
|
package/mobile/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createGClickRealtimeMobileResourceTypesConfig as i, createGClickRealtimeMobileResourceTypesKeySegment as o, createGClickRtAlarmsAtmosphereMobileResourceTypeConfig as r, createGClickRtDevicesAtmosphereMobileResourceTypeConfig as l } from "./resourceTypes.js";
|
|
2
|
+
import { resolveGClickRealtimeAtmosphereHost as a } from "../shared/atmosphereHost.js";
|
|
3
|
+
import { createGClickAtmosphereRealtimeMobileRuntime as p } from "./runtime/atmosphere.js";
|
|
4
|
+
import { createGClickDummyRealtimeMobileRuntime as R } from "./runtime/dummy.js";
|
|
5
|
+
import { createGClickRealtimeMobileSourceDataFactory as n } from "./runtime/sourceDataFactory.js";
|
|
6
|
+
import { disposeGClickRealtimeMobileRuntime as k, getOrCreateGClickAtmosphereRealtimeMobileRuntime as G, getOrCreateGClickDummyRealtimeMobileRuntime as b } from "./runtime/runtimeRegistry.js";
|
|
7
|
+
import { disposeGClickRealtimeStartupSnapshots as y, replayGClickRealtimeStartupSnapshotsOnReconnect as M, replayGClickRealtimeStartupSnapshotsOnce as h } from "../shared/startupSnapshots.js";
|
|
8
|
+
export {
|
|
9
|
+
p as createGClickAtmosphereRealtimeMobileRuntime,
|
|
10
|
+
R as createGClickDummyRealtimeMobileRuntime,
|
|
11
|
+
i as createGClickRealtimeMobileResourceTypesConfig,
|
|
12
|
+
o as createGClickRealtimeMobileResourceTypesKeySegment,
|
|
13
|
+
n as createGClickRealtimeMobileSourceDataFactory,
|
|
14
|
+
r as createGClickRtAlarmsAtmosphereMobileResourceTypeConfig,
|
|
15
|
+
l as createGClickRtDevicesAtmosphereMobileResourceTypeConfig,
|
|
16
|
+
k as disposeGClickRealtimeMobileRuntime,
|
|
17
|
+
y as disposeGClickRealtimeStartupSnapshots,
|
|
18
|
+
G as getOrCreateGClickAtmosphereRealtimeMobileRuntime,
|
|
19
|
+
b as getOrCreateGClickDummyRealtimeMobileRuntime,
|
|
20
|
+
M as replayGClickRealtimeStartupSnapshotsOnReconnect,
|
|
21
|
+
h as replayGClickRealtimeStartupSnapshotsOnce,
|
|
22
|
+
a as resolveGClickRealtimeAtmosphereHost
|
|
23
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { RealTimeResourceSerialId, RealTimeResourceSourceMechanismConfigAtmosphere } from '@m4l/realtime-runtime/mobile';
|
|
2
|
+
import { GCLICK_RT_ALARMS_ATMOSPHERE_CONSUMER_TYPE, GCLICK_RT_ALARMS_RESOURCE_TYPE_ID } from '../rt_alarms/index';
|
|
3
|
+
import { GCLICK_RT_DEVICES_RESOURCE_TYPE_ID } from '../rt_devices/index';
|
|
4
|
+
import { resolveGClickRealtimeAtmosphereHost } from '../shared/atmosphereHost';
|
|
5
|
+
export interface GClickRealtimeMobileAtmosphereConnectionConfig {
|
|
6
|
+
accountId: string;
|
|
7
|
+
database: string;
|
|
8
|
+
fallbackTransport?: RealTimeResourceSourceMechanismConfigAtmosphere['fallbackTransport'];
|
|
9
|
+
host: string;
|
|
10
|
+
path: string;
|
|
11
|
+
port?: string;
|
|
12
|
+
sessionId: string;
|
|
13
|
+
topic: string;
|
|
14
|
+
version?: RealTimeResourceSourceMechanismConfigAtmosphere['version'];
|
|
15
|
+
}
|
|
16
|
+
export interface CreateGClickRtDevicesAtmosphereMobileResourceTypeConfigProps extends GClickRealtimeMobileAtmosphereConnectionConfig {
|
|
17
|
+
resourcesId?: Array<RealTimeResourceSerialId | 'all'>;
|
|
18
|
+
}
|
|
19
|
+
export interface CreateGClickRtAlarmsAtmosphereMobileResourceTypeConfigProps extends GClickRealtimeMobileAtmosphereConnectionConfig {
|
|
20
|
+
resourcesId?: Array<RealTimeResourceSerialId | 'all'>;
|
|
21
|
+
}
|
|
22
|
+
export type GClickRtDevicesAtmosphereMobileResourceTypeConfig = RealTimeResourceSourceMechanismConfigAtmosphere & {
|
|
23
|
+
resourceTypeId: typeof GCLICK_RT_DEVICES_RESOURCE_TYPE_ID;
|
|
24
|
+
};
|
|
25
|
+
export type GClickRtAlarmsAtmosphereMobileResourceTypeConfig = RealTimeResourceSourceMechanismConfigAtmosphere & {
|
|
26
|
+
consumerType: typeof GCLICK_RT_ALARMS_ATMOSPHERE_CONSUMER_TYPE;
|
|
27
|
+
rateLimit: 1;
|
|
28
|
+
resourceTypeId: typeof GCLICK_RT_ALARMS_RESOURCE_TYPE_ID;
|
|
29
|
+
};
|
|
30
|
+
export type GClickRealtimeAtmosphereMobileResourceTypeConfig = GClickRtDevicesAtmosphereMobileResourceTypeConfig | GClickRtAlarmsAtmosphereMobileResourceTypeConfig;
|
|
31
|
+
/**
|
|
32
|
+
* Create the GClick mobile Atmosphere resource config for stateful device data.
|
|
33
|
+
*/
|
|
34
|
+
export declare function createGClickRtDevicesAtmosphereMobileResourceTypeConfig(props: CreateGClickRtDevicesAtmosphereMobileResourceTypeConfigProps): GClickRtDevicesAtmosphereMobileResourceTypeConfig;
|
|
35
|
+
/**
|
|
36
|
+
* Create the GClick mobile Atmosphere resource config for alarm invalidation signals.
|
|
37
|
+
*/
|
|
38
|
+
export declare function createGClickRtAlarmsAtmosphereMobileResourceTypeConfig(props: CreateGClickRtAlarmsAtmosphereMobileResourceTypeConfigProps): GClickRtAlarmsAtmosphereMobileResourceTypeConfig;
|
|
39
|
+
/**
|
|
40
|
+
* Create the default grouped GClick mobile Atmosphere resources used by Guardian.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createGClickRealtimeMobileResourceTypesConfig(props: GClickRealtimeMobileAtmosphereConnectionConfig): GClickRealtimeAtmosphereMobileResourceTypeConfig[];
|
|
43
|
+
/**
|
|
44
|
+
* Build the mobile resource-types signature used to partition cached GClick runtimes.
|
|
45
|
+
*/
|
|
46
|
+
export declare function createGClickRealtimeMobileResourceTypesKeySegment(resourceTypes: GClickRealtimeAtmosphereMobileResourceTypeConfig[]): string;
|
|
47
|
+
export { resolveGClickRealtimeAtmosphereHost };
|
|
48
|
+
//# sourceMappingURL=resourceTypes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resourceTypes.d.ts","sourceRoot":"","sources":["../../../../../packages/gclick-realtime/src/mobile/resourceTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,wBAAwB,EACxB,+CAA+C,EAChD,MAAM,8BAA8B,CAAC;AAItC,OAAO,EACL,yCAAyC,EACzC,iCAAiC,EAClC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,kCAAkC,EAEnC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mCAAmC,EAAE,MAAM,0BAA0B,CAAC;AAG/E,MAAM,WAAW,8CAA8C;IAC7D,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,+CAA+C,CAAC,mBAAmB,CAAC,CAAC;IACzF,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,+CAA+C,CAAC,SAAS,CAAC,CAAC;CACtE;AAED,MAAM,WAAW,4DACf,SAAQ,8CAA8C;IACtD,WAAW,CAAC,EAAE,KAAK,CAAC,wBAAwB,GAAG,KAAK,CAAC,CAAC;CACvD;AAED,MAAM,WAAW,2DACf,SAAQ,8CAA8C;IACtD,WAAW,CAAC,EAAE,KAAK,CAAC,wBAAwB,GAAG,KAAK,CAAC,CAAC;CACvD;AAED,MAAM,MAAM,iDAAiD,GAC3D,+CAA+C,GAAG;IAChD,cAAc,EAAE,OAAO,kCAAkC,CAAC;CAC3D,CAAC;AAEJ,MAAM,MAAM,gDAAgD,GAC1D,+CAA+C,GAAG;IAChD,YAAY,EAAE,OAAO,yCAAyC,CAAC;IAC/D,SAAS,EAAE,CAAC,CAAC;IACb,cAAc,EAAE,OAAO,iCAAiC,CAAC;CAC1D,CAAC;AAEJ,MAAM,MAAM,gDAAgD,GACxD,iDAAiD,GACjD,gDAAgD,CAAC;AA6CrD;;GAEG;AACH,wBAAgB,uDAAuD,CACrE,KAAK,EAAE,4DAA4D,GAClE,iDAAiD,CAQnD;AAED;;GAEG;AACH,wBAAgB,sDAAsD,CACpE,KAAK,EAAE,2DAA2D,GACjE,gDAAgD,CAQlD;AAED;;GAEG;AACH,wBAAgB,6CAA6C,CAC3D,KAAK,EAAE,8CAA8C,GACpD,gDAAgD,EAAE,CAKpD;AAED;;GAEG;AACH,wBAAgB,iDAAiD,CAC/D,aAAa,EAAE,gDAAgD,EAAE,UAGlE;AAED,OAAO,EAAE,mCAAmC,EAAE,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { mergeDevicePayloadWithUpdatedAtGuard as o } from "../payload/mergeDevicePayloadWithUpdatedAtGuard.js";
|
|
2
|
+
import { GCLICK_RT_ALARMS_RESOURCE_TYPE_ID as i, GCLICK_RT_ALARMS_ATMOSPHERE_CONSUMER_TYPE as a } from "../rt_alarms/constants.js";
|
|
3
|
+
import { normalizeGClickRtDevicesRealtimeMessage as c } from "../rt_devices/index.js";
|
|
4
|
+
import { resolveGClickRealtimeAtmosphereHost as g } from "../shared/atmosphereHost.js";
|
|
5
|
+
import { createGClickRealtimeResourceTypesKeySegment as s } from "../shared/runtimeResourceTypesKey.js";
|
|
6
|
+
import { GCLICK_RT_DEVICES_RESOURCE_TYPE_ID as n } from "../rt_devices/constants.js";
|
|
7
|
+
function r(e) {
|
|
8
|
+
const t = {
|
|
9
|
+
accountId: e.accountId,
|
|
10
|
+
database: e.database,
|
|
11
|
+
host: e.host,
|
|
12
|
+
initialHashResources: {},
|
|
13
|
+
path: e.path,
|
|
14
|
+
port: e.port ?? "wss",
|
|
15
|
+
sessionId: e.sessionId,
|
|
16
|
+
sourceDataMechanism: "atmosphere",
|
|
17
|
+
topic: e.topic
|
|
18
|
+
};
|
|
19
|
+
return e.fallbackTransport && (t.fallbackTransport = e.fallbackTransport), e.version !== void 0 && (t.version = e.version), t;
|
|
20
|
+
}
|
|
21
|
+
function l(e) {
|
|
22
|
+
return {
|
|
23
|
+
...r(e),
|
|
24
|
+
mergePayloadStrategy: o,
|
|
25
|
+
normalizeMessageStrategy: c,
|
|
26
|
+
resourceTypeId: n,
|
|
27
|
+
resourcesId: e.resourcesId ?? ["all"]
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function m(e) {
|
|
31
|
+
return {
|
|
32
|
+
...r(e),
|
|
33
|
+
consumerType: a,
|
|
34
|
+
rateLimit: 1,
|
|
35
|
+
resourceTypeId: i,
|
|
36
|
+
resourcesId: e.resourcesId ?? ["all"]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function T(e) {
|
|
40
|
+
return [
|
|
41
|
+
l(e),
|
|
42
|
+
m(e)
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
function I(e) {
|
|
46
|
+
return s(e);
|
|
47
|
+
}
|
|
48
|
+
export {
|
|
49
|
+
T as createGClickRealtimeMobileResourceTypesConfig,
|
|
50
|
+
I as createGClickRealtimeMobileResourceTypesKeySegment,
|
|
51
|
+
m as createGClickRtAlarmsAtmosphereMobileResourceTypeConfig,
|
|
52
|
+
l as createGClickRtDevicesAtmosphereMobileResourceTypeConfig,
|
|
53
|
+
g as resolveGClickRealtimeAtmosphereHost
|
|
54
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CreateRealtimeMobileRuntimeProps, RealTimeResourceSourceMechanismConfigAtmosphere, RealtimeMobileRuntime } from '@m4l/realtime-runtime/mobile';
|
|
2
|
+
export type GClickRealtimeMobileRuntime = RealtimeMobileRuntime;
|
|
3
|
+
export type CreateGClickAtmosphereRealtimeMobileRuntimeProps = Omit<CreateRealtimeMobileRuntimeProps<RealTimeResourceSourceMechanismConfigAtmosphere>, 'createSourceData' | 'resourceTypesConfig'> & {
|
|
4
|
+
resourceTypesConfig: RealTimeResourceSourceMechanismConfigAtmosphere[];
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Create the GClick mobile runtime backed only by Atmosphere source configs.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createGClickAtmosphereRealtimeMobileRuntime(props: CreateGClickAtmosphereRealtimeMobileRuntimeProps): GClickRealtimeMobileRuntime;
|
|
10
|
+
//# sourceMappingURL=atmosphere.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atmosphere.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/mobile/runtime/atmosphere.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gCAAgC,EAChC,+CAA+C,EAC/C,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AAStC,MAAM,MAAM,2BAA2B,GAAG,qBAAqB,CAAC;AAEhE,MAAM,MAAM,gDAAgD,GAAG,IAAI,CACjE,gCAAgC,CAAC,+CAA+C,CAAC,EACjF,kBAAkB,GAAG,qBAAqB,CAC3C,GAAG;IACF,mBAAmB,EAAE,+CAA+C,EAAE,CAAC;CACxE,CAAC;AAEF;;GAEG;AACH,wBAAgB,2CAA2C,CACzD,KAAK,EAAE,gDAAgD,GACtD,2BAA2B,CAU7B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createRealtimeMobileRuntime as t } from "@m4l/realtime-runtime/mobile";
|
|
2
|
+
import { withGClickResourceTypeMergeStrategies as o } from "../../rt_devices/resourceTypeMergeStrategies.js";
|
|
3
|
+
import { createGClickRealtimeMobileSourceDataFactory as i } from "./sourceDataFactory.js";
|
|
4
|
+
function l(e) {
|
|
5
|
+
const r = o(
|
|
6
|
+
e.resourceTypesConfig
|
|
7
|
+
);
|
|
8
|
+
return t({
|
|
9
|
+
...e,
|
|
10
|
+
createSourceData: i(),
|
|
11
|
+
resourceTypesConfig: r
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
l as createGClickAtmosphereRealtimeMobileRuntime
|
|
16
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CreateRealtimeMobileRuntimeProps } from '@m4l/realtime-runtime/mobile';
|
|
2
|
+
import { RealTimeResourceSourceMechanismConfigDummy } from '../../dummy/index';
|
|
3
|
+
import { GClickRealtimeMobileRuntime } from './atmosphere';
|
|
4
|
+
export type CreateGClickDummyRealtimeMobileRuntimeProps = Omit<CreateRealtimeMobileRuntimeProps<RealTimeResourceSourceMechanismConfigDummy>, 'createSourceData' | 'resourceTypesConfig'> & {
|
|
5
|
+
resourceTypesConfig: RealTimeResourceSourceMechanismConfigDummy[];
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Create one auxiliary GClick mobile runtime backed only by dummy source configs.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createGClickDummyRealtimeMobileRuntime(props: CreateGClickDummyRealtimeMobileRuntimeProps): GClickRealtimeMobileRuntime;
|
|
11
|
+
//# sourceMappingURL=dummy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dummy.d.ts","sourceRoot":"","sources":["../../../../../../packages/gclick-realtime/src/mobile/runtime/dummy.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EACV,0CAA0C,EAC3C,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAGhE,MAAM,MAAM,2CAA2C,GAAG,IAAI,CAC5D,gCAAgC,CAAC,0CAA0C,CAAC,EAC5E,kBAAkB,GAAG,qBAAqB,CAC3C,GAAG;IACF,mBAAmB,EAAE,0CAA0C,EAAE,CAAC;CACnE,CAAC;AAEF;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,KAAK,EAAE,2CAA2C,GACjD,2BAA2B,CAU7B"}
|