@xiboplayer/xmr 0.6.9 → 0.6.11
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/CHANGELOG.md +40 -14
- package/LICENSE +661 -0
- package/README.md +32 -1
- package/docs/XMR_COMMANDS.md +16 -10
- package/docs/XMR_TESTING.md +20 -12
- package/package.json +2 -3
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/test-utils.js +5 -3
- package/src/xmr-client.js +179 -0
- package/src/xmr-client.test.js +387 -0
- package/src/xmr-wrapper.js +7 -5
- package/src/xmr-wrapper.test.js +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,13 +5,42 @@ All notable changes to @xiboplayer/xmr will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [0.
|
|
8
|
+
## [0.10.0] - 2026-03-12
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Replaced @xibosignage/xibo-communication-framework with native XmrClient**
|
|
13
|
+
- Native `xmr-client.js` (~180 lines) replaces the upstream library entirely
|
|
14
|
+
- Generic action dispatcher: `emit(message.action, message)` — every CMS action works
|
|
15
|
+
automatically, no hardcoded if-else chain
|
|
16
|
+
- Upstream only dispatched 5 of ~14 CMS actions; the rest fell through to
|
|
17
|
+
`console.error('unknown action')`. Native client handles all actions generically.
|
|
18
|
+
- TTL check uses native `Date.parse()` instead of luxon (eliminated 68KB dependency)
|
|
19
|
+
- Event emitter uses built-in `Map<Set>` instead of nanoevents
|
|
20
|
+
- Bundle size reduced by ~70KB
|
|
9
21
|
|
|
10
22
|
### Added
|
|
11
23
|
|
|
12
|
-
- **
|
|
13
|
-
-
|
|
14
|
-
-
|
|
24
|
+
- **XmrClient unit tests** (26 tests)
|
|
25
|
+
- WebSocket open/close/error lifecycle
|
|
26
|
+
- Heartbeat handling
|
|
27
|
+
- JSON action dispatch with TTL validation
|
|
28
|
+
- Generic dispatch for unknown/future actions
|
|
29
|
+
- `isActive()` 15min silence check
|
|
30
|
+
- Reconnect interval (60s health check)
|
|
31
|
+
- `stop()` cleanup
|
|
32
|
+
- `on()`/`emit()` with unsubscribe and error isolation
|
|
33
|
+
|
|
34
|
+
### Removed
|
|
35
|
+
|
|
36
|
+
- `@xibosignage/xibo-communication-framework` dependency (from both `@xiboplayer/xmr`
|
|
37
|
+
and `@xiboplayer/core` package.json)
|
|
38
|
+
- `luxon` (68KB) — no longer pulled in transitively
|
|
39
|
+
- `nanoevents` — no longer pulled in transitively
|
|
40
|
+
|
|
41
|
+
## [0.9.0] - 2026-02-10
|
|
42
|
+
|
|
43
|
+
### Added
|
|
15
44
|
|
|
16
45
|
- **New Commands**
|
|
17
46
|
- `criteriaUpdate`: Updates display criteria and triggers re-collection
|
|
@@ -75,9 +104,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
75
104
|
|
|
76
105
|
### Initial Implementation
|
|
77
106
|
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
- Automatic reconnection with
|
|
107
|
+
- Full XMR protocol implementation with WebSocket connection lifecycle
|
|
108
|
+
- All CMS commands: collectNow, screenShot, changeLayout, overlayLayout, revertToSchedule, purgeAll, commandAction, triggerWebhook, dataUpdate, rekeyAction, criteriaUpdate, currentGeoLocation, licenceCheck
|
|
109
|
+
- Automatic reconnection with 60s health-check interval
|
|
81
110
|
- Connection lifecycle management
|
|
82
111
|
- Event-based command handling
|
|
83
112
|
|
|
@@ -145,18 +174,15 @@ await xmr.stop(); // Clean shutdown, no reconnection
|
|
|
145
174
|
|
|
146
175
|
## Dependencies
|
|
147
176
|
|
|
148
|
-
###
|
|
177
|
+
### Removed
|
|
149
178
|
|
|
150
|
-
- `@xibosignage/xibo-communication-framework
|
|
179
|
+
- `@xibosignage/xibo-communication-framework` — replaced by native `XmrClient`
|
|
151
180
|
|
|
152
|
-
###
|
|
181
|
+
### Current
|
|
153
182
|
|
|
183
|
+
- `@xiboplayer/utils`: workspace:* (logger)
|
|
154
184
|
- `vitest`: ^2.0.0 (dev dependency)
|
|
155
185
|
|
|
156
|
-
### Unchanged
|
|
157
|
-
|
|
158
|
-
- `@xiboplayer/utils`: file:../utils
|
|
159
|
-
|
|
160
186
|
## Support
|
|
161
187
|
|
|
162
188
|
- **Documentation**: [README.md](./README.md)
|