@seriousme/opifex 1.9.4 → 1.10.1

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 (304) hide show
  1. package/README.md +37 -26
  2. package/bin/conformanceServer.ts +3 -2
  3. package/bin/demoServer.ts +3 -2
  4. package/bin/mqtt.ts +126 -117
  5. package/client/client.ts +35 -15
  6. package/client/context.ts +42 -22
  7. package/client/deps.ts +5 -0
  8. package/client/handlers/handleConnack.ts +17 -5
  9. package/client/handlers/handlePublish.ts +4 -1
  10. package/client/handlers/handlePubrec.ts +3 -1
  11. package/client/handlers/handlePubrel.ts +3 -1
  12. package/client/handlers/handleSuback.ts +3 -1
  13. package/client/mod.ts +8 -1
  14. package/client/store/memoryStore.ts +2 -1
  15. package/dev_utils/dummyConn.ts +17 -2
  16. package/dist/bin/conformanceServer.js +3 -2
  17. package/dist/bin/conformanceServer.js.map +1 -1
  18. package/dist/bin/demoServer.js +3 -2
  19. package/dist/bin/demoServer.js.map +1 -1
  20. package/dist/bin/mqtt.d.ts +29 -0
  21. package/dist/bin/mqtt.d.ts.map +1 -1
  22. package/dist/bin/mqtt.js +101 -96
  23. package/dist/bin/mqtt.js.map +1 -1
  24. package/dist/client/client.d.ts +7 -4
  25. package/dist/client/client.d.ts.map +1 -1
  26. package/dist/client/client.js +17 -9
  27. package/dist/client/client.js.map +1 -1
  28. package/dist/client/context.d.ts +3 -1
  29. package/dist/client/context.d.ts.map +1 -1
  30. package/dist/client/context.js +27 -13
  31. package/dist/client/context.js.map +1 -1
  32. package/dist/client/deps.d.ts +3 -2
  33. package/dist/client/deps.d.ts.map +1 -1
  34. package/dist/client/deps.js +2 -1
  35. package/dist/client/deps.js.map +1 -1
  36. package/dist/client/handlers/handleConnack.d.ts +1 -1
  37. package/dist/client/handlers/handleConnack.d.ts.map +1 -1
  38. package/dist/client/handlers/handleConnack.js +14 -5
  39. package/dist/client/handlers/handleConnack.js.map +1 -1
  40. package/dist/client/handlers/handlePublish.d.ts +1 -1
  41. package/dist/client/handlers/handlePublish.d.ts.map +1 -1
  42. package/dist/client/handlers/handlePublish.js +2 -0
  43. package/dist/client/handlers/handlePublish.js.map +1 -1
  44. package/dist/client/handlers/handlePubrec.d.ts +1 -1
  45. package/dist/client/handlers/handlePubrec.d.ts.map +1 -1
  46. package/dist/client/handlers/handlePubrec.js +1 -0
  47. package/dist/client/handlers/handlePubrec.js.map +1 -1
  48. package/dist/client/handlers/handlePubrel.d.ts +1 -1
  49. package/dist/client/handlers/handlePubrel.d.ts.map +1 -1
  50. package/dist/client/handlers/handlePubrel.js +1 -0
  51. package/dist/client/handlers/handlePubrel.js.map +1 -1
  52. package/dist/client/handlers/handleSuback.d.ts.map +1 -1
  53. package/dist/client/handlers/handleSuback.js +3 -1
  54. package/dist/client/handlers/handleSuback.js.map +1 -1
  55. package/dist/client/mod.d.ts +3 -1
  56. package/dist/client/mod.d.ts.map +1 -1
  57. package/dist/client/mod.js +2 -1
  58. package/dist/client/mod.js.map +1 -1
  59. package/dist/client/store/memoryStore.d.ts +1 -1
  60. package/dist/client/store/memoryStore.d.ts.map +1 -1
  61. package/dist/client/store/memoryStore.js.map +1 -1
  62. package/dist/mqttConn/mqttConn.d.ts +13 -8
  63. package/dist/mqttConn/mqttConn.d.ts.map +1 -1
  64. package/dist/mqttConn/mqttConn.js +27 -12
  65. package/dist/mqttConn/mqttConn.js.map +1 -1
  66. package/dist/mqttPacket/PacketType.d.ts +1 -0
  67. package/dist/mqttPacket/PacketType.d.ts.map +1 -1
  68. package/dist/mqttPacket/PacketType.js +1 -0
  69. package/dist/mqttPacket/PacketType.js.map +1 -1
  70. package/dist/mqttPacket/Properties.d.ts +157 -0
  71. package/dist/mqttPacket/Properties.d.ts.map +1 -0
  72. package/dist/mqttPacket/Properties.js +177 -0
  73. package/dist/mqttPacket/Properties.js.map +1 -0
  74. package/dist/mqttPacket/ReasonCode.d.ts +74 -0
  75. package/dist/mqttPacket/ReasonCode.d.ts.map +1 -0
  76. package/dist/mqttPacket/ReasonCode.js +230 -0
  77. package/dist/mqttPacket/ReasonCode.js.map +1 -0
  78. package/dist/mqttPacket/RetainHandling.d.ts +12 -0
  79. package/dist/mqttPacket/RetainHandling.d.ts.map +1 -0
  80. package/dist/mqttPacket/RetainHandling.js +12 -0
  81. package/dist/mqttPacket/RetainHandling.js.map +1 -0
  82. package/dist/mqttPacket/auth.d.ts +21 -0
  83. package/dist/mqttPacket/auth.d.ts.map +1 -0
  84. package/dist/mqttPacket/auth.js +34 -0
  85. package/dist/mqttPacket/auth.js.map +1 -0
  86. package/dist/mqttPacket/connack.d.ts +15 -7
  87. package/dist/mqttPacket/connack.d.ts.map +1 -1
  88. package/dist/mqttPacket/connack.js +43 -15
  89. package/dist/mqttPacket/connack.js.map +1 -1
  90. package/dist/mqttPacket/connect.d.ts +27 -8
  91. package/dist/mqttPacket/connect.d.ts.map +1 -1
  92. package/dist/mqttPacket/connect.js +106 -30
  93. package/dist/mqttPacket/connect.js.map +1 -1
  94. package/dist/mqttPacket/decoder.d.ts +42 -3
  95. package/dist/mqttPacket/decoder.d.ts.map +1 -1
  96. package/dist/mqttPacket/decoder.js +135 -4
  97. package/dist/mqttPacket/decoder.js.map +1 -1
  98. package/dist/mqttPacket/disconnect.d.ts +13 -7
  99. package/dist/mqttPacket/disconnect.d.ts.map +1 -1
  100. package/dist/mqttPacket/disconnect.js +45 -6
  101. package/dist/mqttPacket/disconnect.js.map +1 -1
  102. package/dist/mqttPacket/encoder.d.ts +57 -8
  103. package/dist/mqttPacket/encoder.d.ts.map +1 -1
  104. package/dist/mqttPacket/encoder.js +185 -13
  105. package/dist/mqttPacket/encoder.js.map +1 -1
  106. package/dist/mqttPacket/length.d.ts.map +1 -1
  107. package/dist/mqttPacket/length.js +3 -2
  108. package/dist/mqttPacket/length.js.map +1 -1
  109. package/dist/mqttPacket/mod.d.ts +56 -91
  110. package/dist/mqttPacket/mod.d.ts.map +1 -1
  111. package/dist/mqttPacket/mod.js +22 -29
  112. package/dist/mqttPacket/mod.js.map +1 -1
  113. package/dist/mqttPacket/pingreq.d.ts +4 -6
  114. package/dist/mqttPacket/pingreq.d.ts.map +1 -1
  115. package/dist/mqttPacket/pingreq.js +5 -4
  116. package/dist/mqttPacket/pingreq.js.map +1 -1
  117. package/dist/mqttPacket/pingres.d.ts +4 -6
  118. package/dist/mqttPacket/pingres.d.ts.map +1 -1
  119. package/dist/mqttPacket/pingres.js +7 -5
  120. package/dist/mqttPacket/pingres.js.map +1 -1
  121. package/dist/mqttPacket/protocolLevels.d.ts +11 -0
  122. package/dist/mqttPacket/protocolLevels.d.ts.map +1 -0
  123. package/dist/mqttPacket/protocolLevels.js +11 -0
  124. package/dist/mqttPacket/protocolLevels.js.map +1 -0
  125. package/dist/mqttPacket/pubblishAcks.d.ts +35 -0
  126. package/dist/mqttPacket/pubblishAcks.d.ts.map +1 -0
  127. package/dist/mqttPacket/pubblishAcks.js +56 -0
  128. package/dist/mqttPacket/pubblishAcks.js.map +1 -0
  129. package/dist/mqttPacket/publish.d.ts +19 -8
  130. package/dist/mqttPacket/publish.d.ts.map +1 -1
  131. package/dist/mqttPacket/publish.js +26 -7
  132. package/dist/mqttPacket/publish.js.map +1 -1
  133. package/dist/mqttPacket/suback.d.ts +14 -7
  134. package/dist/mqttPacket/suback.d.ts.map +1 -1
  135. package/dist/mqttPacket/suback.js +41 -20
  136. package/dist/mqttPacket/suback.js.map +1 -1
  137. package/dist/mqttPacket/subscribe.d.ts +24 -9
  138. package/dist/mqttPacket/subscribe.d.ts.map +1 -1
  139. package/dist/mqttPacket/subscribe.js +71 -15
  140. package/dist/mqttPacket/subscribe.js.map +1 -1
  141. package/dist/mqttPacket/types.d.ts +33 -0
  142. package/dist/mqttPacket/types.d.ts.map +1 -1
  143. package/dist/mqttPacket/unsuback.d.ts +14 -7
  144. package/dist/mqttPacket/unsuback.d.ts.map +1 -1
  145. package/dist/mqttPacket/unsuback.js +29 -6
  146. package/dist/mqttPacket/unsuback.js.map +1 -1
  147. package/dist/mqttPacket/unsubscribe.d.ts +14 -7
  148. package/dist/mqttPacket/unsubscribe.d.ts.map +1 -1
  149. package/dist/mqttPacket/unsubscribe.js +24 -8
  150. package/dist/mqttPacket/unsubscribe.js.map +1 -1
  151. package/dist/node/wrapNodeSocket.d.ts.map +1 -1
  152. package/dist/node/wrapNodeSocket.js.map +1 -1
  153. package/dist/persistence/deps.d.ts +1 -1
  154. package/dist/persistence/deps.d.ts.map +1 -1
  155. package/dist/persistence/deps.js +1 -1
  156. package/dist/persistence/deps.js.map +1 -1
  157. package/dist/server/context.d.ts +3 -1
  158. package/dist/server/context.d.ts.map +1 -1
  159. package/dist/server/context.js +8 -2
  160. package/dist/server/context.js.map +1 -1
  161. package/dist/server/deps.d.ts +2 -2
  162. package/dist/server/deps.d.ts.map +1 -1
  163. package/dist/server/deps.js +1 -1
  164. package/dist/server/deps.js.map +1 -1
  165. package/dist/server/handlers/handleConnect.d.ts +1 -1
  166. package/dist/server/handlers/handleConnect.d.ts.map +1 -1
  167. package/dist/server/handlers/handleConnect.js +9 -1
  168. package/dist/server/handlers/handleConnect.js.map +1 -1
  169. package/dist/server/handlers/handlePacket.d.ts +1 -1
  170. package/dist/server/handlers/handlePacket.d.ts.map +1 -1
  171. package/dist/server/handlers/handlePacket.js +1 -1
  172. package/dist/server/handlers/handlePacket.js.map +1 -1
  173. package/dist/server/handlers/handlePingreq.d.ts.map +1 -1
  174. package/dist/server/handlers/handlePingreq.js +1 -0
  175. package/dist/server/handlers/handlePingreq.js.map +1 -1
  176. package/dist/server/handlers/handlePublish.d.ts +2 -2
  177. package/dist/server/handlers/handlePublish.d.ts.map +1 -1
  178. package/dist/server/handlers/handlePublish.js +2 -0
  179. package/dist/server/handlers/handlePublish.js.map +1 -1
  180. package/dist/server/handlers/handlePubrec.d.ts +1 -1
  181. package/dist/server/handlers/handlePubrec.d.ts.map +1 -1
  182. package/dist/server/handlers/handlePubrec.js +1 -0
  183. package/dist/server/handlers/handlePubrec.js.map +1 -1
  184. package/dist/server/handlers/handlePubrel.d.ts +1 -1
  185. package/dist/server/handlers/handlePubrel.d.ts.map +1 -1
  186. package/dist/server/handlers/handlePubrel.js +1 -0
  187. package/dist/server/handlers/handlePubrel.js.map +1 -1
  188. package/dist/server/handlers/handleSubscribe.d.ts +1 -1
  189. package/dist/server/handlers/handleSubscribe.d.ts.map +1 -1
  190. package/dist/server/handlers/handleSubscribe.js +2 -1
  191. package/dist/server/handlers/handleSubscribe.js.map +1 -1
  192. package/dist/server/handlers/handleUnsubscribe.d.ts +1 -1
  193. package/dist/server/handlers/handleUnsubscribe.d.ts.map +1 -1
  194. package/dist/server/handlers/handleUnsubscribe.js +1 -0
  195. package/dist/server/handlers/handleUnsubscribe.js.map +1 -1
  196. package/dist/server/server.d.ts +2 -2
  197. package/dist/server/server.d.ts.map +1 -1
  198. package/dist/server/server.js +5 -3
  199. package/dist/server/server.js.map +1 -1
  200. package/dist/socket/socket.d.ts.map +1 -1
  201. package/dist/socket/socket.js +6 -1
  202. package/dist/socket/socket.js.map +1 -1
  203. package/dist/utils/assert.d.ts +0 -3
  204. package/dist/utils/assert.d.ts.map +1 -1
  205. package/dist/utils/assert.js +0 -7
  206. package/dist/utils/assert.js.map +1 -1
  207. package/dist/utils/mod.d.ts +0 -3
  208. package/dist/utils/mod.d.ts.map +1 -1
  209. package/dist/utils/mod.js +0 -2
  210. package/dist/utils/mod.js.map +1 -1
  211. package/mqttConn/mqttConn.test.ts +27 -12
  212. package/mqttConn/mqttConn.ts +45 -14
  213. package/mqttPacket/PacketType.ts +1 -0
  214. package/mqttPacket/Properties.ts +276 -0
  215. package/mqttPacket/ReasonCode.test.ts +22 -0
  216. package/mqttPacket/ReasonCode.ts +256 -0
  217. package/mqttPacket/RetainHandling.ts +11 -0
  218. package/mqttPacket/auth.test.ts +112 -0
  219. package/mqttPacket/auth.ts +72 -0
  220. package/mqttPacket/connack.test.ts +84 -64
  221. package/mqttPacket/connack.ts +84 -20
  222. package/mqttPacket/connect.test.ts +497 -18
  223. package/mqttPacket/connect.ts +167 -36
  224. package/mqttPacket/decoder.test.ts +33 -16
  225. package/mqttPacket/decoder.ts +173 -5
  226. package/mqttPacket/disconnect.test.ts +97 -18
  227. package/mqttPacket/disconnect.ts +82 -10
  228. package/mqttPacket/encoder.test.ts +32 -8
  229. package/mqttPacket/encoder.ts +236 -11
  230. package/mqttPacket/length.ts +3 -2
  231. package/mqttPacket/mod.ts +75 -39
  232. package/mqttPacket/pingreq.test.ts +52 -4
  233. package/mqttPacket/pingreq.ts +20 -7
  234. package/mqttPacket/pingres.test.ts +52 -4
  235. package/mqttPacket/pingres.ts +22 -8
  236. package/mqttPacket/properties.test.ts +193 -0
  237. package/mqttPacket/protocolLevels.ts +13 -0
  238. package/mqttPacket/pubblishAcks.ts +117 -0
  239. package/mqttPacket/publish.test.ts +212 -133
  240. package/mqttPacket/publish.ts +69 -14
  241. package/mqttPacket/publishAcks.test.ts +128 -0
  242. package/mqttPacket/suback.test.ts +71 -27
  243. package/mqttPacket/suback.ts +78 -26
  244. package/mqttPacket/subscribe.test.ts +132 -43
  245. package/mqttPacket/subscribe.ts +125 -22
  246. package/mqttPacket/types.ts +40 -0
  247. package/mqttPacket/unsuback.test.ts +80 -30
  248. package/mqttPacket/unsuback.ts +65 -10
  249. package/mqttPacket/unsubscribe.test.ts +59 -34
  250. package/mqttPacket/unsubscribe.ts +61 -14
  251. package/node/wrapNodeSocket.ts +2 -1
  252. package/package.json +2 -2
  253. package/persistence/deps.ts +1 -1
  254. package/persistence/memory/memoryPersistence.test.ts +5 -1
  255. package/server/context.ts +23 -10
  256. package/server/deps.ts +2 -0
  257. package/server/handlers/handleConnect.ts +12 -9
  258. package/server/handlers/handlePacket.ts +10 -11
  259. package/server/handlers/handlePingreq.ts +1 -0
  260. package/server/handlers/handlePublish.ts +6 -2
  261. package/server/handlers/handlePubrec.ts +3 -1
  262. package/server/handlers/handlePubrel.ts +3 -1
  263. package/server/handlers/handleSubscribe.ts +3 -6
  264. package/server/handlers/handleUnsubscribe.ts +3 -1
  265. package/server/server.ts +8 -12
  266. package/server/test/handleConnect.test.ts +2 -1
  267. package/server/test/test-handlers.ts +2 -1
  268. package/socket/socket.ts +5 -1
  269. package/utils/assert.ts +0 -18
  270. package/utils/mod.ts +0 -3
  271. package/dist/mqttPacket/puback.d.ts +0 -16
  272. package/dist/mqttPacket/puback.d.ts.map +0 -1
  273. package/dist/mqttPacket/puback.js +0 -21
  274. package/dist/mqttPacket/puback.js.map +0 -1
  275. package/dist/mqttPacket/pubcomp.d.ts +0 -17
  276. package/dist/mqttPacket/pubcomp.d.ts.map +0 -1
  277. package/dist/mqttPacket/pubcomp.js +0 -21
  278. package/dist/mqttPacket/pubcomp.js.map +0 -1
  279. package/dist/mqttPacket/pubrec.d.ts +0 -17
  280. package/dist/mqttPacket/pubrec.d.ts.map +0 -1
  281. package/dist/mqttPacket/pubrec.js +0 -21
  282. package/dist/mqttPacket/pubrec.js.map +0 -1
  283. package/dist/mqttPacket/pubrel.d.ts +0 -17
  284. package/dist/mqttPacket/pubrel.d.ts.map +0 -1
  285. package/dist/mqttPacket/pubrel.js +0 -21
  286. package/dist/mqttPacket/pubrel.js.map +0 -1
  287. package/dist/utils/args.d.ts +0 -28
  288. package/dist/utils/args.d.ts.map +0 -1
  289. package/dist/utils/args.js +0 -76
  290. package/dist/utils/args.js.map +0 -1
  291. package/dist/utils/platform.d.ts +0 -5
  292. package/dist/utils/platform.d.ts.map +0 -1
  293. package/dist/utils/platform.js +0 -8
  294. package/dist/utils/platform.js.map +0 -1
  295. package/mqttPacket/puback.test.ts +0 -55
  296. package/mqttPacket/puback.ts +0 -34
  297. package/mqttPacket/pubcomp.test.ts +0 -55
  298. package/mqttPacket/pubcomp.ts +0 -35
  299. package/mqttPacket/pubrec.test.ts +0 -55
  300. package/mqttPacket/pubrec.ts +0 -35
  301. package/mqttPacket/pubrel.test.ts +0 -55
  302. package/mqttPacket/pubrel.ts +0 -35
  303. package/utils/args.ts +0 -103
  304. package/utils/platform.ts +0 -8
@@ -0,0 +1,157 @@
1
+ import type { InvertRecord, UTF8StringPair } from "./types.ts";
2
+ export declare const PropertySetType: {
3
+ readonly will: 100;
4
+ readonly reserved: 0;
5
+ readonly connect: 1;
6
+ readonly connack: 2;
7
+ readonly publish: 3;
8
+ readonly puback: 4;
9
+ readonly pubrec: 5;
10
+ readonly pubrel: 6;
11
+ readonly pubcomp: 7;
12
+ readonly subscribe: 8;
13
+ readonly suback: 9;
14
+ readonly unsubscribe: 10;
15
+ readonly unsuback: 11;
16
+ readonly pingreq: 12;
17
+ readonly pingres: 13;
18
+ readonly disconnect: 14;
19
+ readonly auth: 15;
20
+ };
21
+ export type TPropertySetType = typeof PropertySetType[keyof typeof PropertySetType];
22
+ export declare const propertyKind: {
23
+ readonly boolean: 0;
24
+ readonly byte: 1;
25
+ readonly int16: 2;
26
+ readonly int32: 3;
27
+ readonly varInt: 4;
28
+ readonly byteArray: 5;
29
+ readonly utf8string: 6;
30
+ readonly utf8StringPairs: 7;
31
+ readonly varIntArray: 8;
32
+ };
33
+ export declare const propertyToId: {
34
+ readonly payloadFormatIndicator: 1;
35
+ readonly messageExpiryInterval: 2;
36
+ readonly contentType: 3;
37
+ readonly responseTopic: 8;
38
+ readonly correlationData: 9;
39
+ readonly subscriptionIdentifier: 11;
40
+ readonly subscriptionIdentifiers: 255;
41
+ readonly sessionExpiryInterval: 17;
42
+ readonly assignedClientIdentifier: 18;
43
+ readonly serverKeepAlive: 19;
44
+ readonly authenticationMethod: 21;
45
+ readonly authenticationData: 22;
46
+ readonly requestProblemInformation: 23;
47
+ readonly willDelayInterval: 24;
48
+ readonly requestResponseInformation: 25;
49
+ readonly responseInformation: 26;
50
+ readonly serverReference: 28;
51
+ readonly reasonString: 31;
52
+ readonly receiveMaximum: 33;
53
+ readonly topicAliasMaximum: 34;
54
+ readonly topicAlias: 35;
55
+ readonly maximumQos: 36;
56
+ readonly retainAvailable: 37;
57
+ readonly userProperty: 38;
58
+ readonly maximumPacketSize: 39;
59
+ readonly wildcardSubscriptionAvailable: 40;
60
+ readonly subscriptionIdentifierAvailable: 41;
61
+ readonly sharedSubscriptionAvailable: 42;
62
+ };
63
+ type PropertyNames = keyof typeof propertyToId;
64
+ export declare const propertyToKind: {
65
+ readonly 1: 0;
66
+ readonly 2: 3;
67
+ readonly 3: 6;
68
+ readonly 8: 6;
69
+ readonly 9: 5;
70
+ readonly 11: 4;
71
+ readonly 255: 8;
72
+ readonly 17: 3;
73
+ readonly 18: 6;
74
+ readonly 19: 2;
75
+ readonly 21: 6;
76
+ readonly 22: 5;
77
+ readonly 23: 0;
78
+ readonly 24: 3;
79
+ readonly 25: 0;
80
+ readonly 26: 6;
81
+ readonly 28: 6;
82
+ readonly 31: 6;
83
+ readonly 33: 2;
84
+ readonly 34: 2;
85
+ readonly 35: 2;
86
+ readonly 36: 1;
87
+ readonly 37: 0;
88
+ readonly 38: 7;
89
+ readonly 39: 3;
90
+ readonly 40: 0;
91
+ readonly 41: 0;
92
+ readonly 42: 0;
93
+ };
94
+ export type UserPropertyType = Array<UTF8StringPair>;
95
+ export type SubscriptionIdentifiersType = Array<number>;
96
+ type PropertyKindMap = {
97
+ [propertyKind.boolean]: boolean;
98
+ [propertyKind.byte]: number;
99
+ [propertyKind.int16]: number;
100
+ [propertyKind.int32]: number;
101
+ [propertyKind.varInt]: number;
102
+ [propertyKind.byteArray]: Uint8Array;
103
+ [propertyKind.utf8string]: string;
104
+ [propertyKind.utf8StringPairs]: UserPropertyType;
105
+ [propertyKind.varIntArray]: SubscriptionIdentifiersType;
106
+ };
107
+ type Mqttv5PropertyType<K extends number> = K extends keyof PropertyKindMap ? PropertyKindMap[K] : never;
108
+ export type Mqttv5PropertyTypes = PropertyKindMap[keyof PropertyKindMap];
109
+ export type Mqttv5PropertyTypesNoUser = Exclude<Mqttv5PropertyTypes, UserPropertyType>;
110
+ export type ValidPropertyNumber = (typeof propertyToId)[keyof typeof propertyToId];
111
+ type AllMqttv5Properties = {
112
+ [K in PropertyNames]?: Mqttv5PropertyType<typeof propertyToKind[typeof propertyToId[K]]>;
113
+ };
114
+ type PropertyByNumberType = InvertRecord<typeof propertyToId>;
115
+ export declare const propertyByNumber: PropertyByNumberType;
116
+ export declare const PropertyByPropertySetType: {
117
+ readonly 0: readonly [];
118
+ readonly 1: readonly [17, 21, 22, 23, 25, 33, 34, 38, 39];
119
+ readonly 2: readonly [17, 18, 19, 21, 22, 26, 28, 31, 33, 34, 36, 37, 38, 39, 40, 41, 42];
120
+ readonly 3: readonly [1, 2, 3, 8, 9, 255, 35, 38];
121
+ readonly 8: readonly [11, 38];
122
+ readonly 10: readonly [38];
123
+ readonly 14: readonly [17, 28, 31, 38];
124
+ readonly 15: readonly [21, 22, 31, 38];
125
+ readonly 4: readonly [31, 38];
126
+ readonly 5: readonly [31, 38];
127
+ readonly 6: readonly [31, 38];
128
+ readonly 7: readonly [31, 38];
129
+ readonly 9: readonly [31, 38];
130
+ readonly 11: readonly [31, 38];
131
+ readonly 12: readonly [];
132
+ readonly 13: readonly [];
133
+ readonly 100: readonly [1, 2, 3, 8, 9, 24, 38];
134
+ };
135
+ type PropertyIdsToKeys<T extends readonly ValidPropertyNumber[]> = {
136
+ [K in T[number]]: (typeof propertyByNumber)[K];
137
+ }[T[number]];
138
+ type GeneratePacketTypeProperties<T extends readonly ValidPropertyNumber[]> = Pick<AllMqttv5Properties, PropertyIdsToKeys<T>>;
139
+ export type PropsByPacketSetType = {
140
+ [K in TPropertySetType]: GeneratePacketTypeProperties<typeof PropertyByPropertySetType[K]>;
141
+ };
142
+ export type ConnectProperties = PropsByPacketSetType[typeof PropertySetType.connect];
143
+ export type ConnackProperties = PropsByPacketSetType[typeof PropertySetType.connack];
144
+ export type PublishProperties = PropsByPacketSetType[typeof PropertySetType.publish];
145
+ export type PubackProperties = PropsByPacketSetType[typeof PropertySetType.puback];
146
+ export type PubrecProperties = PropsByPacketSetType[typeof PropertySetType.pubrec];
147
+ export type PubrelProperties = PropsByPacketSetType[typeof PropertySetType.pubrel];
148
+ export type PubcompProperties = PropsByPacketSetType[typeof PropertySetType.pubcomp];
149
+ export type SubscribeProperties = PropsByPacketSetType[typeof PropertySetType.subscribe];
150
+ export type SubackProperties = PropsByPacketSetType[typeof PropertySetType.suback];
151
+ export type UnsubscribeProperties = PropsByPacketSetType[typeof PropertySetType.unsubscribe];
152
+ export type UnsubackProperties = PropsByPacketSetType[typeof PropertySetType.unsuback];
153
+ export type DisconnectProperties = PropsByPacketSetType[typeof PropertySetType.disconnect];
154
+ export type AuthProperties = PropsByPacketSetType[typeof PropertySetType.auth];
155
+ export type WillProperties = PropsByPacketSetType[typeof PropertySetType.will];
156
+ export {};
157
+ //# sourceMappingURL=Properties.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Properties.d.ts","sourceRoot":"","sources":["../../mqttPacket/Properties.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE/D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;CAGlB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,OAAO,eAAe,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAEvD,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC;AAEX,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Bf,CAAC;AAEX,KAAK,aAAa,GAAG,MAAM,OAAO,YAAY,CAAC;AAG/C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BjB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,CAAC;AACrD,MAAM,MAAM,2BAA2B,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAExD,KAAK,eAAe,GAAG;IACrB,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAChC,CAAC,YAAY,CA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,GAC5B,oBAAoB,CAAC,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;AACxD,MAAM,MAAM,oBAAoB,GAC9B,oBAAoB,CAAC,OAAO,eAAe,CAAC,UAAU,CAAC,CAAC;AAC1D,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/E,MAAM,MAAM,cAAc,GAAG,oBAAoB,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC"}
@@ -0,0 +1,177 @@
1
+ import { PacketType } from "./PacketType.js";
2
+ export const PropertySetType = {
3
+ ...PacketType,
4
+ will: 100,
5
+ };
6
+ export const propertyKind = {
7
+ boolean: 0, // its a byte in the MQTT standard, but for convenience we convert to boolean
8
+ byte: 1,
9
+ int16: 2,
10
+ int32: 3,
11
+ varInt: 4,
12
+ byteArray: 5,
13
+ utf8string: 6,
14
+ utf8StringPairs: 7,
15
+ varIntArray: 8,
16
+ };
17
+ export const propertyToId = {
18
+ payloadFormatIndicator: 0x01,
19
+ messageExpiryInterval: 0x02,
20
+ contentType: 0x03,
21
+ responseTopic: 0x08,
22
+ correlationData: 0x09,
23
+ subscriptionIdentifier: 0x0b,
24
+ // special case,placeholder to encode decode multiple subscription identifiers
25
+ subscriptionIdentifiers: 0xff,
26
+ sessionExpiryInterval: 0x11,
27
+ assignedClientIdentifier: 0x12,
28
+ serverKeepAlive: 0x13,
29
+ authenticationMethod: 0x15,
30
+ authenticationData: 0x16,
31
+ requestProblemInformation: 0x17,
32
+ willDelayInterval: 0x18,
33
+ requestResponseInformation: 0x19,
34
+ responseInformation: 0x1a,
35
+ serverReference: 0x1c,
36
+ reasonString: 0x1f,
37
+ receiveMaximum: 0x21,
38
+ topicAliasMaximum: 0x22,
39
+ topicAlias: 0x23,
40
+ maximumQos: 0x24,
41
+ retainAvailable: 0x25,
42
+ userProperty: 0x26,
43
+ maximumPacketSize: 0x27,
44
+ wildcardSubscriptionAvailable: 0x28,
45
+ subscriptionIdentifierAvailable: 0x29,
46
+ sharedSubscriptionAvailable: 0x2a,
47
+ };
48
+ // A helper type to convert a tuple of numbers to a union of strings
49
+ export const propertyToKind = {
50
+ [propertyToId.payloadFormatIndicator]: propertyKind.boolean,
51
+ [propertyToId.messageExpiryInterval]: propertyKind.int32,
52
+ [propertyToId.contentType]: propertyKind.utf8string,
53
+ [propertyToId.responseTopic]: propertyKind.utf8string,
54
+ [propertyToId.correlationData]: propertyKind.byteArray,
55
+ [propertyToId.subscriptionIdentifier]: propertyKind.varInt,
56
+ [propertyToId.subscriptionIdentifiers]: propertyKind.varIntArray,
57
+ [propertyToId.sessionExpiryInterval]: propertyKind.int32,
58
+ [propertyToId.assignedClientIdentifier]: propertyKind.utf8string,
59
+ [propertyToId.serverKeepAlive]: propertyKind.int16,
60
+ [propertyToId.authenticationMethod]: propertyKind.utf8string,
61
+ [propertyToId.authenticationData]: propertyKind.byteArray,
62
+ [propertyToId.requestProblemInformation]: propertyKind.boolean,
63
+ [propertyToId.willDelayInterval]: propertyKind.int32,
64
+ [propertyToId.requestResponseInformation]: propertyKind.boolean,
65
+ [propertyToId.responseInformation]: propertyKind.utf8string,
66
+ [propertyToId.serverReference]: propertyKind.utf8string,
67
+ [propertyToId.reasonString]: propertyKind.utf8string,
68
+ [propertyToId.receiveMaximum]: propertyKind.int16,
69
+ [propertyToId.topicAliasMaximum]: propertyKind.int16,
70
+ [propertyToId.topicAlias]: propertyKind.int16,
71
+ [propertyToId.maximumQos]: propertyKind.byte,
72
+ [propertyToId.retainAvailable]: propertyKind.boolean,
73
+ [propertyToId.userProperty]: propertyKind.utf8StringPairs,
74
+ [propertyToId.maximumPacketSize]: propertyKind.int32,
75
+ [propertyToId.wildcardSubscriptionAvailable]: propertyKind.boolean,
76
+ [propertyToId.subscriptionIdentifierAvailable]: propertyKind.boolean,
77
+ [propertyToId.sharedSubscriptionAvailable]: propertyKind.boolean,
78
+ };
79
+ export const propertyByNumber = Object.fromEntries(Object.entries(propertyToId).map(([k, v]) => [v, k]));
80
+ export const PropertyByPropertySetType = {
81
+ [PropertySetType.reserved]: [],
82
+ [PropertySetType.connect]: [
83
+ propertyToId.sessionExpiryInterval,
84
+ propertyToId.authenticationMethod,
85
+ propertyToId.authenticationData,
86
+ propertyToId.requestProblemInformation,
87
+ propertyToId.requestResponseInformation,
88
+ propertyToId.receiveMaximum,
89
+ propertyToId.topicAliasMaximum,
90
+ propertyToId.userProperty,
91
+ propertyToId.maximumPacketSize,
92
+ ],
93
+ [PropertySetType.connack]: [
94
+ propertyToId.sessionExpiryInterval,
95
+ propertyToId.assignedClientIdentifier,
96
+ propertyToId.serverKeepAlive,
97
+ propertyToId.authenticationMethod,
98
+ propertyToId.authenticationData,
99
+ propertyToId.responseInformation,
100
+ propertyToId.serverReference,
101
+ propertyToId.reasonString,
102
+ propertyToId.receiveMaximum,
103
+ propertyToId.topicAliasMaximum,
104
+ propertyToId.maximumQos,
105
+ propertyToId.retainAvailable,
106
+ propertyToId.userProperty,
107
+ propertyToId.maximumPacketSize,
108
+ propertyToId.wildcardSubscriptionAvailable,
109
+ propertyToId.subscriptionIdentifierAvailable,
110
+ propertyToId.sharedSubscriptionAvailable,
111
+ ],
112
+ [PropertySetType.publish]: [
113
+ propertyToId.payloadFormatIndicator,
114
+ propertyToId.messageExpiryInterval,
115
+ propertyToId.contentType,
116
+ propertyToId.responseTopic,
117
+ propertyToId.correlationData,
118
+ propertyToId.subscriptionIdentifiers,
119
+ propertyToId.topicAlias,
120
+ propertyToId.userProperty,
121
+ ],
122
+ [PropertySetType.subscribe]: [
123
+ propertyToId.subscriptionIdentifier,
124
+ propertyToId.userProperty,
125
+ ],
126
+ [PropertySetType.unsubscribe]: [
127
+ propertyToId.userProperty,
128
+ ],
129
+ [PropertySetType.disconnect]: [
130
+ propertyToId.sessionExpiryInterval,
131
+ propertyToId.serverReference,
132
+ propertyToId.reasonString,
133
+ propertyToId.userProperty,
134
+ ],
135
+ [PropertySetType.auth]: [
136
+ propertyToId.authenticationMethod,
137
+ propertyToId.authenticationData,
138
+ propertyToId.reasonString,
139
+ propertyToId.userProperty,
140
+ ],
141
+ [PropertySetType.puback]: [
142
+ propertyToId.reasonString,
143
+ propertyToId.userProperty,
144
+ ],
145
+ [PropertySetType.pubrec]: [
146
+ propertyToId.reasonString,
147
+ propertyToId.userProperty,
148
+ ],
149
+ [PropertySetType.pubrel]: [
150
+ propertyToId.reasonString,
151
+ propertyToId.userProperty,
152
+ ],
153
+ [PropertySetType.pubcomp]: [
154
+ propertyToId.reasonString,
155
+ propertyToId.userProperty,
156
+ ],
157
+ [PropertySetType.suback]: [
158
+ propertyToId.reasonString,
159
+ propertyToId.userProperty,
160
+ ],
161
+ [PropertySetType.unsuback]: [
162
+ propertyToId.reasonString,
163
+ propertyToId.userProperty,
164
+ ],
165
+ [PropertySetType.pingreq]: [],
166
+ [PropertySetType.pingres]: [],
167
+ [PropertySetType.will]: [
168
+ propertyToId.payloadFormatIndicator,
169
+ propertyToId.messageExpiryInterval,
170
+ propertyToId.contentType,
171
+ propertyToId.responseTopic,
172
+ propertyToId.correlationData,
173
+ propertyToId.willDelayInterval,
174
+ propertyToId.userProperty,
175
+ ],
176
+ };
177
+ //# sourceMappingURL=Properties.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Properties.js","sourceRoot":"","sources":["../../mqttPacket/Properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,GAAG,UAAU;IACb,IAAI,EAAE,GAAG;CACD,CAAC;AAKX,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,CAAC,EAAE,6EAA6E;IACzF,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,SAAS,EAAE,CAAC;IACZ,UAAU,EAAE,CAAC;IACb,eAAe,EAAE,CAA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C,eAAe,CAAC,QAAQ,CAAC,EAAE;QAC1B,YAAY,CAAC,YAAY;QACzB,YAAY,CAAC,YAAY;KAC1B;IACD,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,EAAE;IAC7B,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,EAAE;IAE7B,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE;QACtB,YAAY,CAAC,sBAAsB;QACnC,YAAY,CAAC,qBAAqB;QAClC,YAAY,CAAC,WAAW;QACxB,YAAY,CAAC,aAAa;QAC1B,YAAY,CAAC,eAAe;QAC5B,YAAY,CAAC,iBAAiB;QAC9B,YAAY,CAAC,YAAY;KAC1B;CACO,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Possible MQTT V5 reason codes
3
+ */
4
+ import { PacketType } from "./PacketType.ts";
5
+ import type { InvertRecord } from "./types.ts";
6
+ export declare const ReasonCode: {
7
+ readonly success: 0;
8
+ readonly normalDisconnection: 0;
9
+ readonly grantedQos0: 0;
10
+ readonly grantedQos1: 1;
11
+ readonly grantedQos2: 2;
12
+ readonly disconnectWithWillMessage: 4;
13
+ readonly noMatchingSubscribers: 16;
14
+ readonly noSubscriptionExisted: 17;
15
+ readonly continueAuthentication: 24;
16
+ readonly reAuthenticate: 25;
17
+ readonly unspecifiedError: 128;
18
+ readonly malformedPacket: 129;
19
+ readonly protocolError: 130;
20
+ readonly implementationSpecificError: 131;
21
+ readonly unsupportedProtocolVersion: 132;
22
+ readonly clientIdentifierNotValid: 133;
23
+ readonly badUserNameOrPassword: 134;
24
+ readonly notAuthorized: 135;
25
+ readonly serverUnavailable: 136;
26
+ readonly serverBusy: 137;
27
+ readonly banned: 138;
28
+ readonly serverShuttingDown: 139;
29
+ readonly badAuthenticationMethod: 140;
30
+ readonly keepAliveTimeout: 141;
31
+ readonly sessionTakenOver: 142;
32
+ readonly topicFilterInvalid: 143;
33
+ readonly topicNameInvalid: 144;
34
+ readonly packetIdentifierInUse: 145;
35
+ readonly packetIdentifierNotFound: 146;
36
+ readonly receiveMaximumExceeded: 147;
37
+ readonly topicAliasInvalid: 148;
38
+ readonly packetTooLarge: 149;
39
+ readonly messageRateTooHigh: 150;
40
+ readonly quotaExceeded: 151;
41
+ readonly administrativeAction: 152;
42
+ readonly payloadFormatInvalid: 153;
43
+ readonly retainNotSupported: 154;
44
+ readonly qosNotSupported: 155;
45
+ readonly useAnotherServer: 156;
46
+ readonly serverMoved: 157;
47
+ readonly sharedSubscriptionsNotSupported: 158;
48
+ readonly connectionRateExceeded: 159;
49
+ readonly maximumConnectTime: 160;
50
+ readonly subscriptionIdentifiersNotSupported: 161;
51
+ readonly wildcardSubscriptionsNotSupported: 162;
52
+ };
53
+ /**
54
+ * Reverse lookup for ReasonCode
55
+ */
56
+ export type ReasonCodeByNumberType = InvertRecord<typeof ReasonCode>;
57
+ export declare const ReasonCodeByNumber: ReasonCodeByNumberType;
58
+ export declare const ReasonCodebyPacket: {
59
+ readonly 2: readonly [0, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 140, 144, 149, 151, 153, 154, 155, 156, 157, 159];
60
+ readonly 4: readonly [0, 16, 128, 131, 135, 144, 145, 151, 153];
61
+ readonly 5: readonly [0, 16, 128, 131, 135, 144, 145, 151, 153];
62
+ readonly 6: readonly [0, 146];
63
+ readonly 7: readonly [0, 146];
64
+ readonly 11: readonly [0, 17, 128, 131, 135, 143, 145];
65
+ readonly 15: readonly [0, 24, 25];
66
+ readonly 14: readonly [0, 4, 128, 129, 130, 131, 135, 137, 139, 140, 141, 142, 143, 144, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162];
67
+ readonly 9: readonly [0, 1, 2, 128, 131, 135, 143, 145, 151, 158, 161, 162];
68
+ };
69
+ type TPacketType = typeof PacketType[keyof typeof PacketType];
70
+ export type TReasonCode = typeof ReasonCode[keyof typeof ReasonCode];
71
+ export declare function reasonCodeToString(packetType: TPacketType, code: TReasonCode): string;
72
+ export declare function isValidReasonCode(packetType: TPacketType, code: number): boolean;
73
+ export {};
74
+ //# sourceMappingURL=ReasonCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReasonCode.d.ts","sourceRoot":"","sources":["../../mqttPacket/ReasonCode.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8Cb,CAAC;AAEX;;GAEG;AAEH,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;AACrE,eAAO,MAAM,kBAAkB,EAGxB,sBAAsB,CAAC;AAE9B,eAAO,MAAM,kBAAkB;;;;;;;;;;CAmHrB,CAAC;AAiDX,KAAK,WAAW,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAC9D,MAAM,MAAM,WAAW,GAAG,OAAO,UAAU,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAGrE,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,WAAW,EACvB,IAAI,EAAE,WAAW,GAChB,MAAM,CAUR;AAED,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,WAAW,EACvB,IAAI,EAAE,MAAM,GACX,OAAO,CAIT"}
@@ -0,0 +1,230 @@
1
+ /**
2
+ * Possible MQTT V5 reason codes
3
+ */
4
+ import { PacketType } from "./PacketType.js";
5
+ export const ReasonCode = {
6
+ success: 0x00,
7
+ normalDisconnection: 0x00,
8
+ grantedQos0: 0x00,
9
+ grantedQos1: 0x01,
10
+ grantedQos2: 0x02,
11
+ disconnectWithWillMessage: 0x04,
12
+ noMatchingSubscribers: 0x10,
13
+ noSubscriptionExisted: 0x11,
14
+ continueAuthentication: 0x18,
15
+ reAuthenticate: 0x19,
16
+ unspecifiedError: 0x80,
17
+ malformedPacket: 0x81,
18
+ protocolError: 0x82,
19
+ implementationSpecificError: 0x83,
20
+ unsupportedProtocolVersion: 0x84,
21
+ clientIdentifierNotValid: 0x85,
22
+ badUserNameOrPassword: 0x86,
23
+ notAuthorized: 0x87,
24
+ serverUnavailable: 0x88,
25
+ serverBusy: 0x89,
26
+ banned: 0x8a,
27
+ serverShuttingDown: 0x8b,
28
+ badAuthenticationMethod: 0x8c,
29
+ keepAliveTimeout: 0x8d,
30
+ sessionTakenOver: 0x8e,
31
+ topicFilterInvalid: 0x8f,
32
+ topicNameInvalid: 0x90,
33
+ packetIdentifierInUse: 0x91,
34
+ packetIdentifierNotFound: 0x92,
35
+ receiveMaximumExceeded: 0x93,
36
+ topicAliasInvalid: 0x94,
37
+ packetTooLarge: 0x95,
38
+ messageRateTooHigh: 0x96,
39
+ quotaExceeded: 0x97,
40
+ administrativeAction: 0x98,
41
+ payloadFormatInvalid: 0x99,
42
+ retainNotSupported: 0x9a,
43
+ qosNotSupported: 0x9b,
44
+ useAnotherServer: 0x9c,
45
+ serverMoved: 0x9d,
46
+ sharedSubscriptionsNotSupported: 0x9e,
47
+ connectionRateExceeded: 0x9f,
48
+ maximumConnectTime: 0xa0,
49
+ subscriptionIdentifiersNotSupported: 0xa1,
50
+ wildcardSubscriptionsNotSupported: 0xa2,
51
+ };
52
+ export const ReasonCodeByNumber = Object
53
+ .fromEntries(Object.entries(ReasonCode).map(([k, v]) => [v, k]));
54
+ export const ReasonCodebyPacket = {
55
+ [PacketType.connack]: [
56
+ ReasonCode.success,
57
+ ReasonCode.unspecifiedError,
58
+ ReasonCode.malformedPacket,
59
+ ReasonCode.protocolError,
60
+ ReasonCode.implementationSpecificError,
61
+ ReasonCode.unsupportedProtocolVersion,
62
+ ReasonCode.clientIdentifierNotValid,
63
+ ReasonCode.badUserNameOrPassword,
64
+ ReasonCode.notAuthorized,
65
+ ReasonCode.serverUnavailable,
66
+ ReasonCode.serverBusy,
67
+ ReasonCode.banned,
68
+ ReasonCode.badAuthenticationMethod,
69
+ ReasonCode.topicNameInvalid,
70
+ ReasonCode.packetTooLarge,
71
+ ReasonCode.quotaExceeded,
72
+ ReasonCode.payloadFormatInvalid,
73
+ ReasonCode.retainNotSupported,
74
+ ReasonCode.qosNotSupported,
75
+ ReasonCode.useAnotherServer,
76
+ ReasonCode.serverMoved,
77
+ ReasonCode.connectionRateExceeded,
78
+ ],
79
+ [PacketType.puback]: [
80
+ ReasonCode.success,
81
+ ReasonCode.noMatchingSubscribers,
82
+ ReasonCode.unspecifiedError,
83
+ ReasonCode.implementationSpecificError,
84
+ ReasonCode.notAuthorized,
85
+ ReasonCode.topicNameInvalid,
86
+ ReasonCode.packetIdentifierInUse,
87
+ ReasonCode.quotaExceeded,
88
+ ReasonCode.payloadFormatInvalid,
89
+ ],
90
+ [PacketType.pubrec]: [
91
+ ReasonCode.success,
92
+ ReasonCode.noMatchingSubscribers,
93
+ ReasonCode.unspecifiedError,
94
+ ReasonCode.implementationSpecificError,
95
+ ReasonCode.notAuthorized,
96
+ ReasonCode.topicNameInvalid,
97
+ ReasonCode.packetIdentifierInUse,
98
+ ReasonCode.quotaExceeded,
99
+ ReasonCode.payloadFormatInvalid,
100
+ ],
101
+ [PacketType.pubrel]: [
102
+ ReasonCode.success,
103
+ ReasonCode.packetIdentifierNotFound,
104
+ ],
105
+ [PacketType.pubcomp]: [
106
+ ReasonCode.success,
107
+ ReasonCode.packetIdentifierNotFound,
108
+ ],
109
+ [PacketType.unsuback]: [
110
+ ReasonCode.success,
111
+ ReasonCode.noSubscriptionExisted,
112
+ ReasonCode.unspecifiedError,
113
+ ReasonCode.implementationSpecificError,
114
+ ReasonCode.notAuthorized,
115
+ ReasonCode.topicFilterInvalid,
116
+ ReasonCode.packetIdentifierInUse,
117
+ ],
118
+ [PacketType.auth]: [
119
+ ReasonCode.success,
120
+ ReasonCode.continueAuthentication,
121
+ ReasonCode.reAuthenticate,
122
+ ],
123
+ [PacketType.disconnect]: [
124
+ ReasonCode.normalDisconnection,
125
+ ReasonCode.disconnectWithWillMessage,
126
+ ReasonCode.unspecifiedError,
127
+ ReasonCode.malformedPacket,
128
+ ReasonCode.protocolError,
129
+ ReasonCode.implementationSpecificError,
130
+ ReasonCode.notAuthorized,
131
+ ReasonCode.serverBusy,
132
+ ReasonCode.serverShuttingDown,
133
+ ReasonCode.badAuthenticationMethod,
134
+ ReasonCode.keepAliveTimeout,
135
+ ReasonCode.sessionTakenOver,
136
+ ReasonCode.topicFilterInvalid,
137
+ ReasonCode.topicNameInvalid,
138
+ ReasonCode.receiveMaximumExceeded,
139
+ ReasonCode.topicAliasInvalid,
140
+ ReasonCode.packetTooLarge,
141
+ ReasonCode.messageRateTooHigh,
142
+ ReasonCode.quotaExceeded,
143
+ ReasonCode.administrativeAction,
144
+ ReasonCode.payloadFormatInvalid,
145
+ ReasonCode.retainNotSupported,
146
+ ReasonCode.qosNotSupported,
147
+ ReasonCode.useAnotherServer,
148
+ ReasonCode.serverMoved,
149
+ ReasonCode.sharedSubscriptionsNotSupported,
150
+ ReasonCode.connectionRateExceeded,
151
+ ReasonCode.maximumConnectTime,
152
+ ReasonCode.subscriptionIdentifiersNotSupported,
153
+ ReasonCode.wildcardSubscriptionsNotSupported,
154
+ ],
155
+ [PacketType.suback]: [
156
+ ReasonCode.grantedQos0,
157
+ ReasonCode.grantedQos1,
158
+ ReasonCode.grantedQos2,
159
+ ReasonCode.unspecifiedError,
160
+ ReasonCode.implementationSpecificError,
161
+ ReasonCode.notAuthorized,
162
+ ReasonCode.topicFilterInvalid,
163
+ ReasonCode.packetIdentifierInUse,
164
+ ReasonCode.quotaExceeded,
165
+ ReasonCode.sharedSubscriptionsNotSupported,
166
+ ReasonCode.subscriptionIdentifiersNotSupported,
167
+ ReasonCode.wildcardSubscriptionsNotSupported,
168
+ ],
169
+ };
170
+ const reasonCodesToString = {
171
+ [0x00]: "Success",
172
+ [0x01]: "Granted QoS 1",
173
+ [0x02]: "Granted QoS 2",
174
+ [0x04]: "Disconnect with Will Message",
175
+ [0x10]: "No matching subscribers",
176
+ [0x11]: "No subscription existed",
177
+ [0x18]: "Continue authentication",
178
+ [0x19]: "Re-authenticate",
179
+ [0x80]: "Unspecified error",
180
+ [0x81]: "Malformed Packet",
181
+ [0x82]: "Protocol Error",
182
+ [0x83]: "Implementation specific error",
183
+ [0x84]: "Unsupported Protocol Version",
184
+ [0x85]: "Client Identifier not valid",
185
+ [0x86]: "Bad User Name or Password",
186
+ [0x87]: "Not authorized",
187
+ [0x88]: "Server unavailable",
188
+ [0x89]: "Server busy",
189
+ [0x8a]: "Banned",
190
+ [0x8b]: "Server shutting down",
191
+ [0x8c]: "Bad authentication method",
192
+ [0x8d]: "Keep Alive timeout",
193
+ [0x8e]: "Session taken over",
194
+ [0x8f]: "Topic Filter invalid",
195
+ [0x90]: "Topic Name invalid",
196
+ [0x91]: "Packet Identifier in use",
197
+ [0x92]: "Packet Identifier not found",
198
+ [0x93]: "Receive Maximum exceeded",
199
+ [0x94]: "Topic Alias invalid",
200
+ [0x95]: "Packet too large",
201
+ [0x96]: "Message rate too high",
202
+ [0x97]: "Quota exceeded",
203
+ [0x98]: "Administrative action",
204
+ [0x99]: "Payload format invalid",
205
+ [0x9a]: "Retain not supported",
206
+ [0x9b]: "QoS not supported",
207
+ [0x9c]: "Use another server",
208
+ [0x9d]: "Server moved",
209
+ [0x9e]: "Shared Subscriptions not supported",
210
+ [0x9f]: "Connection rate exceeded",
211
+ [0xa0]: "Maximum connect time",
212
+ [0xa1]: "Subscription Identifiers not supported",
213
+ [0xa2]: "Wildcard Subscriptions not supported",
214
+ };
215
+ export function reasonCodeToString(packetType, code) {
216
+ if (code === 0) {
217
+ if (packetType === PacketType.disconnect) {
218
+ return "Normal disconnection";
219
+ }
220
+ if (packetType === PacketType.suback) {
221
+ return "Granted QoS 0";
222
+ }
223
+ }
224
+ return reasonCodesToString[code];
225
+ }
226
+ export function isValidReasonCode(packetType, code) {
227
+ const validReasonCodes = ReasonCodebyPacket[packetType];
228
+ return validReasonCodes.includes(code);
229
+ }
230
+ //# sourceMappingURL=ReasonCode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReasonCode.js","sourceRoot":"","sources":["../../mqttPacket/ReasonCode.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,OAAO,EAAE,IAAI;IACb,mBAAmB,EAAE,IAAI;IACzB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;IACjB,WAAW,EAAE,IAAI;IACjB,yBAAyB,EAAE,IAAI;IAC/B,qBAAqB,EAAE,IAAI;IAC3B,qBAAqB,EAAE,IAAI;IAC3B,sBAAsB,EAAE,IAAI;IAC5B,cAAc,EAAE,IAAI;IACpB,gBAAgB,EAAE,IAAI;IACtB,eAAe,EAAE,IAAI;IACrB,aAAa,EAAE,IAAI;IACnB,2BAA2B,EAAE,IAAI;IACjC,0BAA0B,EAAE,IAAI;IAChC,wBAAwB,EAAE,IAAI;IAC9B,qBAAqB,EAAE,IAAI;IAC3B,aAAa,EAAE,IAAI;IACnB,iBAAiB,EAAE,IAAI;IACvB,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,IAAI;IACZ,kBAAkB,EAAE,IAAI;IACxB,uBAAuB,EAAE,IAAI;IAC7B,gBAAgB,EAAE,IAAI;IACtB,gBAAgB,EAAE,IAAI;IACtB,kBAAkB,EAAE,IAAI;IACxB,gBAAgB,EAAE,IAAI;IACtB,qBAAqB,EAAE,IAAI;IAC3B,wBAAwB,EAAE,IAAI;IAC9B,sBAAsB,EAAE,IAAI;IAC5B,iBAAiB,EAAE,IAAI;IACvB,cAAc,EAAE,IAAI;IACpB,kBAAkB,EAAE,IAAI;IACxB,aAAa,EAAE,IAAI;IACnB,oBAAoB,EAAE,IAAI;IAC1B,oBAAoB,EAAE,IAAI;IAC1B,kBAA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