mqtt-plus 1.4.0 → 1.4.2

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.
Files changed (73) hide show
  1. package/AGENTS.md +55 -44
  2. package/CHANGELOG.md +14 -0
  3. package/README.md +4 -3
  4. package/doc/mqtt-plus-api.md +693 -680
  5. package/doc/mqtt-plus-architecture.d2 +139 -0
  6. package/doc/mqtt-plus-architecture.md +10 -0
  7. package/doc/mqtt-plus-architecture.svg +95 -0
  8. package/doc/mqtt-plus-broker-setup.md +9 -3
  9. package/doc/mqtt-plus-comm.md +73 -0
  10. package/doc/mqtt-plus-internals.md +3 -3
  11. package/dst-stage1/mqtt-plus-base.d.ts +3 -2
  12. package/dst-stage1/mqtt-plus-base.js +53 -22
  13. package/dst-stage1/mqtt-plus-event.d.ts +0 -2
  14. package/dst-stage1/mqtt-plus-event.js +6 -26
  15. package/dst-stage1/mqtt-plus-meta.d.ts +2 -2
  16. package/dst-stage1/mqtt-plus-meta.js +2 -2
  17. package/dst-stage1/mqtt-plus-msg.d.ts +2 -0
  18. package/dst-stage1/mqtt-plus-msg.js +17 -0
  19. package/dst-stage1/mqtt-plus-service.d.ts +0 -5
  20. package/dst-stage1/mqtt-plus-service.js +12 -48
  21. package/dst-stage1/mqtt-plus-sink.d.ts +0 -10
  22. package/dst-stage1/mqtt-plus-sink.js +25 -92
  23. package/dst-stage1/mqtt-plus-source.d.ts +0 -10
  24. package/dst-stage1/mqtt-plus-source.js +23 -88
  25. package/dst-stage1/mqtt-plus-subscription.d.ts +20 -0
  26. package/dst-stage1/mqtt-plus-subscription.js +126 -0
  27. package/dst-stage1/mqtt-plus-timer.d.ts +8 -0
  28. package/dst-stage1/mqtt-plus-timer.js +57 -0
  29. package/dst-stage1/mqtt-plus-topic.d.ts +20 -0
  30. package/dst-stage1/mqtt-plus-topic.js +112 -0
  31. package/dst-stage1/mqtt-plus-trace.js +2 -0
  32. package/dst-stage1/mqtt-plus-util.d.ts +0 -13
  33. package/dst-stage1/mqtt-plus-util.js +1 -77
  34. package/dst-stage1/mqtt-plus-version.d.ts +0 -1
  35. package/dst-stage1/mqtt-plus-version.js +0 -6
  36. package/dst-stage1/tsc.tsbuildinfo +1 -1
  37. package/dst-stage2/mqtt-plus.cjs.js +242 -292
  38. package/dst-stage2/mqtt-plus.esm.js +240 -290
  39. package/dst-stage2/mqtt-plus.umd.js +12 -12
  40. package/etc/knip.jsonc +1 -1
  41. package/etc/stx.conf +6 -4
  42. package/package.json +1 -1
  43. package/src/mqtt-plus-base.ts +56 -26
  44. package/src/mqtt-plus-event.ts +8 -24
  45. package/src/mqtt-plus-meta.ts +3 -3
  46. package/src/mqtt-plus-msg.ts +28 -0
  47. package/src/mqtt-plus-service.ts +12 -50
  48. package/src/mqtt-plus-sink.ts +32 -105
  49. package/src/mqtt-plus-source.ts +29 -99
  50. package/src/mqtt-plus-subscription.ts +141 -0
  51. package/src/mqtt-plus-timer.ts +61 -0
  52. package/src/mqtt-plus-trace.ts +4 -0
  53. package/src/mqtt-plus-util.ts +1 -81
  54. package/src/mqtt-plus-version.ts +0 -7
  55. package/tst/mqtt-plus-0-fixture.ts +2 -2
  56. package/tst/mqtt-plus-0-mosquitto.ts +5 -0
  57. package/tst/mqtt-plus-1-api.spec.ts +1 -1
  58. package/tst/mqtt-plus-2-event.spec.ts +0 -6
  59. package/tst/mqtt-plus-3-service.spec.ts +3 -7
  60. package/tst/mqtt-plus-4-sink.spec.ts +14 -9
  61. package/tst/mqtt-plus-5-source.spec.ts +11 -5
  62. package/tst/mqtt-plus-6-misc.spec.ts +23 -23
  63. package/tst/tsc.json +1 -1
  64. package/doc/mqtt-plus-communication.md +0 -68
  65. /package/doc/{mqtt-plus-1-event-emission.d2 → mqtt-plus-comm-event-emission.d2} +0 -0
  66. /package/doc/{mqtt-plus-1-event-emission.svg → mqtt-plus-comm-event-emission.svg} +0 -0
  67. /package/doc/{mqtt-plus-2-service-call.d2 → mqtt-plus-comm-service-call.d2} +0 -0
  68. /package/doc/{mqtt-plus-2-service-call.svg → mqtt-plus-comm-service-call.svg} +0 -0
  69. /package/doc/{mqtt-plus-3-sink-push.d2 → mqtt-plus-comm-sink-push.d2} +0 -0
  70. /package/doc/{mqtt-plus-3-sink-push.svg → mqtt-plus-comm-sink-push.svg} +0 -0
  71. /package/doc/{mqtt-plus-4-source-fetch.d2 → mqtt-plus-comm-source-fetch.d2} +0 -0
  72. /package/doc/{mqtt-plus-4-source-fetch.svg → mqtt-plus-comm-source-fetch.svg} +0 -0
  73. /package/{doc/theme.d2 → etc/d2.theme.d2} +0 -0
@@ -1,68 +0,0 @@
1
-
2
- Communication Patterns
3
- ----------------------
4
-
5
- - **Event Emission**:
6
-
7
- Event Emission is a *uni-directional* communication pattern.
8
- An Event is the combination of an event name and optionally zero or more parameters.
9
- You *register* for events.
10
- When an event is *emitted*, either a single particular receiver (in
11
- case of a directed event emission) or *all* receivers are called and
12
- receive the parameters as extra information.
13
-
14
- > In contrast to the regular MQTT message publish/subscribe, this
15
- > pattern allows to direct the event to particular receivers,
16
- > provides optional information about the sender and receiver to
17
- > receivers, supports authentication and meta-data, etc.
18
-
19
- ![Event Emission](mqtt-plus-1-event-emission.svg)
20
-
21
- - **Service Call**:
22
-
23
- Service Call is a *bi-directional* communication pattern.
24
- A Service is the combination of a service name and optionally zero or more parameters.
25
- You *register* a service.
26
- When a service is *called*, a single particular receiver (in case
27
- of a directed service call) or *one* arbitrary receiver is called and
28
- receives the arguments as the request. The receiver then has to
29
- provide the service response.
30
-
31
- > In contrast to the regular uni-directional MQTT message
32
- > publish/subscribe communication, this allows a bi-directional [Remote
33
- > Procedure Call](https://en.wikipedia.org/wiki/Remote_procedure_call)
34
- > (RPC) style communication, supports authentication and meta-data, etc.
35
-
36
- ![Service Call](mqtt-plus-2-service-call.svg)
37
-
38
- - **Sink Push**:
39
-
40
- Sink Push is a *bi-directional* communication pattern for pushing data.
41
- A Sink is the combination of a sink name and optionally zero or more parameters.
42
- You *register* a *sink* for receiving pushed data chunks.
43
- When data is *pushed*, a single particular sink (in case of a directed
44
- sink push) or *one* arbitrary sink is called and receives the data
45
- chunks as a stream with arguments.
46
-
47
- > In contrast to the regular MQTT message publish/subscribe, this
48
- > pattern allows to transfer arbitrary amounts of arbitrary data by
49
- > chunking the data via a stream. Additionally, it supports authentication
50
- > and meta-data, etc.
51
-
52
- ![Sink Push](mqtt-plus-3-sink-push.svg)
53
-
54
- - **Source Fetch**:
55
-
56
- Source Fetch is a *bi-directional* communication pattern for fetching data.
57
- A Source is the combination of a source name and optionally zero or more parameters.
58
- You *register* a *source* for sending data chunks.
59
- When data is *fetched*, a single particular source (in case of a
60
- directed source fetch) or *one* arbitrary source is called and sends the
61
- data chunks as a stream with arguments.
62
-
63
- > In contrast to the regular MQTT message publish/subscribe, this
64
- > pattern allows to transfer arbitrary amounts of arbitrary data by
65
- > chunking the data via a stream. Additionally, it supports
66
- > authentication and meta-data, etc.
67
-
68
- ![Source Fetch](mqtt-plus-4-source-fetch.svg)
File without changes