apache-iggy 0.5.0-edge.1 → 0.5.0-edge.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 (264) hide show
  1. package/README.md +5 -5
  2. package/dist/{src/wire → wire}/client/client.utils.js +2 -0
  3. package/dist/{src/wire → wire}/stream/stream.utils.js +2 -0
  4. package/dist/{src/wire → wire}/topic/create-topic.command.d.ts +2 -2
  5. package/dist/{src/wire → wire}/topic/create-topic.command.js +2 -2
  6. package/dist/{src/wire → wire}/topic/index.d.ts +1 -0
  7. package/dist/{src/wire → wire}/topic/index.js +1 -0
  8. package/dist/{src/wire → wire}/topic/topic.utils.d.ts +4 -4
  9. package/dist/{src/wire → wire}/topic/topic.utils.js +2 -2
  10. package/dist/{src/wire → wire}/topic/update-topic.command.d.ts +2 -2
  11. package/dist/{src/wire → wire}/topic/update-topic.command.js +2 -2
  12. package/dist/{src/wire → wire}/user/user.utils.js +2 -0
  13. package/package.json +3 -3
  14. package/dist/src/bdd/auth.d.ts +0 -20
  15. package/dist/src/bdd/auth.js +0 -38
  16. package/dist/src/bdd/message.d.ts +0 -20
  17. package/dist/src/bdd/message.js +0 -70
  18. package/dist/src/bdd/stream.d.ts +0 -20
  19. package/dist/src/bdd/stream.js +0 -39
  20. package/dist/src/bdd/topic.d.ts +0 -20
  21. package/dist/src/bdd/topic.js +0 -36
  22. package/dist/src/bdd/world.d.ts +0 -30
  23. package/dist/src/bdd/world.js +0 -21
  24. /package/dist/{src/client → client}/client.connection.d.ts +0 -0
  25. /package/dist/{src/client → client}/client.connection.js +0 -0
  26. /package/dist/{src/client → client}/client.d.ts +0 -0
  27. /package/dist/{src/client → client}/client.debug.d.ts +0 -0
  28. /package/dist/{src/client → client}/client.debug.js +0 -0
  29. /package/dist/{src/client → client}/client.js +0 -0
  30. /package/dist/{src/client → client}/client.socket.d.ts +0 -0
  31. /package/dist/{src/client → client}/client.socket.js +0 -0
  32. /package/dist/{src/client → client}/client.type.d.ts +0 -0
  33. /package/dist/{src/client → client}/client.type.js +0 -0
  34. /package/dist/{src/client → client}/client.utils.d.ts +0 -0
  35. /package/dist/{src/client → client}/client.utils.js +0 -0
  36. /package/dist/{src/client → client}/index.d.ts +0 -0
  37. /package/dist/{src/client → client}/index.js +0 -0
  38. /package/dist/{src/client.e2e.d.ts → client.e2e.d.ts} +0 -0
  39. /package/dist/{src/client.e2e.js → client.e2e.js} +0 -0
  40. /package/dist/{src/debug-send.d.ts → debug-send.d.ts} +0 -0
  41. /package/dist/{src/debug-send.js → debug-send.js} +0 -0
  42. /package/dist/{src/debug.d.ts → debug.d.ts} +0 -0
  43. /package/dist/{src/debug.js → debug.js} +0 -0
  44. /package/dist/{src/e2e → e2e}/tcp.client.e2e.d.ts +0 -0
  45. /package/dist/{src/e2e → e2e}/tcp.client.e2e.js +0 -0
  46. /package/dist/{src/e2e → e2e}/tcp.consumer-group.e2e.d.ts +0 -0
  47. /package/dist/{src/e2e → e2e}/tcp.consumer-group.e2e.js +0 -0
  48. /package/dist/{src/e2e → e2e}/tcp.consumer-stream.e2e.d.ts +0 -0
  49. /package/dist/{src/e2e → e2e}/tcp.consumer-stream.e2e.js +0 -0
  50. /package/dist/{src/e2e → e2e}/tcp.parallel.e2e.d.ts +0 -0
  51. /package/dist/{src/e2e → e2e}/tcp.parallel.e2e.js +0 -0
  52. /package/dist/{src/e2e → e2e}/tcp.send-message.e2e.d.ts +0 -0
  53. /package/dist/{src/e2e → e2e}/tcp.send-message.e2e.js +0 -0
  54. /package/dist/{src/e2e → e2e}/tcp.stream.e2e.d.ts +0 -0
  55. /package/dist/{src/e2e → e2e}/tcp.stream.e2e.js +0 -0
  56. /package/dist/{src/e2e → e2e}/tcp.system.e2e.d.ts +0 -0
  57. /package/dist/{src/e2e → e2e}/tcp.system.e2e.js +0 -0
  58. /package/dist/{src/e2e → e2e}/tcp.token.e2e.d.ts +0 -0
  59. /package/dist/{src/e2e → e2e}/tcp.token.e2e.js +0 -0
  60. /package/dist/{src/e2e → e2e}/tcp.topic.e2e.d.ts +0 -0
  61. /package/dist/{src/e2e → e2e}/tcp.topic.e2e.js +0 -0
  62. /package/dist/{src/e2e → e2e}/tcp.user.e2e.d.ts +0 -0
  63. /package/dist/{src/e2e → e2e}/tcp.user.e2e.js +0 -0
  64. /package/dist/{src/e2e → e2e}/test-client.utils.d.ts +0 -0
  65. /package/dist/{src/e2e → e2e}/test-client.utils.js +0 -0
  66. /package/dist/{src/index.d.ts → index.d.ts} +0 -0
  67. /package/dist/{src/index.js → index.js} +0 -0
  68. /package/dist/{src/stream → stream}/consumer-stream.d.ts +0 -0
  69. /package/dist/{src/stream → stream}/consumer-stream.js +0 -0
  70. /package/dist/{src/stream → stream}/index.d.ts +0 -0
  71. /package/dist/{src/stream → stream}/index.js +0 -0
  72. /package/dist/{src/tcp.e2e.d.ts → tcp.e2e.d.ts} +0 -0
  73. /package/dist/{src/tcp.e2e.js → tcp.e2e.js} +0 -0
  74. /package/dist/{src/tcp.sm.utils.d.ts → tcp.sm.utils.d.ts} +0 -0
  75. /package/dist/{src/tcp.sm.utils.js → tcp.sm.utils.js} +0 -0
  76. /package/dist/{src/tls.system.e2e.d.ts → tls.system.e2e.d.ts} +0 -0
  77. /package/dist/{src/tls.system.e2e.js → tls.system.e2e.js} +0 -0
  78. /package/dist/{src/type.utils.d.ts → type.utils.d.ts} +0 -0
  79. /package/dist/{src/type.utils.js → type.utils.js} +0 -0
  80. /package/dist/{src/wire → wire}/client/client.utils.d.ts +0 -0
  81. /package/dist/{src/wire → wire}/client/get-client.command.d.ts +0 -0
  82. /package/dist/{src/wire → wire}/client/get-client.command.js +0 -0
  83. /package/dist/{src/wire → wire}/client/get-clients.command.d.ts +0 -0
  84. /package/dist/{src/wire → wire}/client/get-clients.command.js +0 -0
  85. /package/dist/{src/wire → wire}/client/get-me.command.d.ts +0 -0
  86. /package/dist/{src/wire → wire}/client/get-me.command.js +0 -0
  87. /package/dist/{src/wire → wire}/client/index.d.ts +0 -0
  88. /package/dist/{src/wire → wire}/client/index.js +0 -0
  89. /package/dist/{src/wire → wire}/command-set.d.ts +0 -0
  90. /package/dist/{src/wire → wire}/command-set.js +0 -0
  91. /package/dist/{src/wire → wire}/command.code.d.ts +0 -0
  92. /package/dist/{src/wire → wire}/command.code.js +0 -0
  93. /package/dist/{src/wire → wire}/command.utils.d.ts +0 -0
  94. /package/dist/{src/wire → wire}/command.utils.js +0 -0
  95. /package/dist/{src/wire → wire}/consumer-group/create-group.command.d.ts +0 -0
  96. /package/dist/{src/wire → wire}/consumer-group/create-group.command.js +0 -0
  97. /package/dist/{src/wire → wire}/consumer-group/create-group.command.test.d.ts +0 -0
  98. /package/dist/{src/wire → wire}/consumer-group/create-group.command.test.js +0 -0
  99. /package/dist/{src/wire → wire}/consumer-group/delete-group.command.d.ts +0 -0
  100. /package/dist/{src/wire → wire}/consumer-group/delete-group.command.js +0 -0
  101. /package/dist/{src/wire → wire}/consumer-group/get-group.command.d.ts +0 -0
  102. /package/dist/{src/wire → wire}/consumer-group/get-group.command.js +0 -0
  103. /package/dist/{src/wire → wire}/consumer-group/get-groups.command.d.ts +0 -0
  104. /package/dist/{src/wire → wire}/consumer-group/get-groups.command.js +0 -0
  105. /package/dist/{src/wire → wire}/consumer-group/group.command.test.d.ts +0 -0
  106. /package/dist/{src/wire → wire}/consumer-group/group.command.test.js +0 -0
  107. /package/dist/{src/wire → wire}/consumer-group/group.utils.d.ts +0 -0
  108. /package/dist/{src/wire → wire}/consumer-group/group.utils.js +0 -0
  109. /package/dist/{src/wire → wire}/consumer-group/index.d.ts +0 -0
  110. /package/dist/{src/wire → wire}/consumer-group/index.js +0 -0
  111. /package/dist/{src/wire → wire}/consumer-group/join-group.command.d.ts +0 -0
  112. /package/dist/{src/wire → wire}/consumer-group/join-group.command.js +0 -0
  113. /package/dist/{src/wire → wire}/consumer-group/leave-group.command.d.ts +0 -0
  114. /package/dist/{src/wire → wire}/consumer-group/leave-group.command.js +0 -0
  115. /package/dist/{src/wire → wire}/error.code.d.ts +0 -0
  116. /package/dist/{src/wire → wire}/error.code.js +0 -0
  117. /package/dist/{src/wire → wire}/error.utils.d.ts +0 -0
  118. /package/dist/{src/wire → wire}/error.utils.js +0 -0
  119. /package/dist/{src/wire → wire}/identifier.utils.d.ts +0 -0
  120. /package/dist/{src/wire → wire}/identifier.utils.js +0 -0
  121. /package/dist/{src/wire → wire}/identifier.utils.test.d.ts +0 -0
  122. /package/dist/{src/wire → wire}/identifier.utils.test.js +0 -0
  123. /package/dist/{src/wire → wire}/index.d.ts +0 -0
  124. /package/dist/{src/wire → wire}/index.js +0 -0
  125. /package/dist/{src/wire → wire}/message/flush-unsaved-buffers.command.d.ts +0 -0
  126. /package/dist/{src/wire → wire}/message/flush-unsaved-buffers.command.js +0 -0
  127. /package/dist/{src/wire → wire}/message/header.type.d.ts +0 -0
  128. /package/dist/{src/wire → wire}/message/header.type.js +0 -0
  129. /package/dist/{src/wire → wire}/message/header.utils.d.ts +0 -0
  130. /package/dist/{src/wire → wire}/message/header.utils.js +0 -0
  131. /package/dist/{src/wire → wire}/message/header.utils.test.d.ts +0 -0
  132. /package/dist/{src/wire → wire}/message/header.utils.test.js +0 -0
  133. /package/dist/{src/wire → wire}/message/iggy-header.utils.d.ts +0 -0
  134. /package/dist/{src/wire → wire}/message/iggy-header.utils.js +0 -0
  135. /package/dist/{src/wire → wire}/message/index.d.ts +0 -0
  136. /package/dist/{src/wire → wire}/message/index.js +0 -0
  137. /package/dist/{src/wire → wire}/message/message.utils.d.ts +0 -0
  138. /package/dist/{src/wire → wire}/message/message.utils.js +0 -0
  139. /package/dist/{src/wire → wire}/message/partitioning.utils.d.ts +0 -0
  140. /package/dist/{src/wire → wire}/message/partitioning.utils.js +0 -0
  141. /package/dist/{src/wire → wire}/message/poll-messages.command.d.ts +0 -0
  142. /package/dist/{src/wire → wire}/message/poll-messages.command.js +0 -0
  143. /package/dist/{src/wire → wire}/message/poll.utils.d.ts +0 -0
  144. /package/dist/{src/wire → wire}/message/poll.utils.js +0 -0
  145. /package/dist/{src/wire → wire}/message/send-messages.command.d.ts +0 -0
  146. /package/dist/{src/wire → wire}/message/send-messages.command.js +0 -0
  147. /package/dist/{src/wire → wire}/message/send-messages.command.test.d.ts +0 -0
  148. /package/dist/{src/wire → wire}/message/send-messages.command.test.js +0 -0
  149. /package/dist/{src/wire → wire}/number.utils.d.ts +0 -0
  150. /package/dist/{src/wire → wire}/number.utils.js +0 -0
  151. /package/dist/{src/wire → wire}/offset/delete-offset.command.d.ts +0 -0
  152. /package/dist/{src/wire → wire}/offset/delete-offset.command.js +0 -0
  153. /package/dist/{src/wire → wire}/offset/get-offset.command.d.ts +0 -0
  154. /package/dist/{src/wire → wire}/offset/get-offset.command.js +0 -0
  155. /package/dist/{src/wire → wire}/offset/index.d.ts +0 -0
  156. /package/dist/{src/wire → wire}/offset/index.js +0 -0
  157. /package/dist/{src/wire → wire}/offset/offset.utils.d.ts +0 -0
  158. /package/dist/{src/wire → wire}/offset/offset.utils.js +0 -0
  159. /package/dist/{src/wire → wire}/offset/store-offset.command.d.ts +0 -0
  160. /package/dist/{src/wire → wire}/offset/store-offset.command.js +0 -0
  161. /package/dist/{src/wire → wire}/partition/create-partition.command.d.ts +0 -0
  162. /package/dist/{src/wire → wire}/partition/create-partition.command.js +0 -0
  163. /package/dist/{src/wire → wire}/partition/delete-partition.command.d.ts +0 -0
  164. /package/dist/{src/wire → wire}/partition/delete-partition.command.js +0 -0
  165. /package/dist/{src/wire → wire}/partition/index.d.ts +0 -0
  166. /package/dist/{src/wire → wire}/partition/index.js +0 -0
  167. /package/dist/{src/wire → wire}/partition/partition.utils.d.ts +0 -0
  168. /package/dist/{src/wire → wire}/partition/partition.utils.js +0 -0
  169. /package/dist/{src/wire → wire}/partition/partition.utils.test.d.ts +0 -0
  170. /package/dist/{src/wire → wire}/partition/partition.utils.test.js +0 -0
  171. /package/dist/{src/wire → wire}/segment/delete-segments.command.d.ts +0 -0
  172. /package/dist/{src/wire → wire}/segment/delete-segments.command.js +0 -0
  173. /package/dist/{src/wire → wire}/segment/index.d.ts +0 -0
  174. /package/dist/{src/wire → wire}/segment/index.js +0 -0
  175. /package/dist/{src/wire → wire}/segment/segment.utils.d.ts +0 -0
  176. /package/dist/{src/wire → wire}/segment/segment.utils.js +0 -0
  177. /package/dist/{src/wire → wire}/serialize.utils.d.ts +0 -0
  178. /package/dist/{src/wire → wire}/serialize.utils.js +0 -0
  179. /package/dist/{src/wire → wire}/session/index.d.ts +0 -0
  180. /package/dist/{src/wire → wire}/session/index.js +0 -0
  181. /package/dist/{src/wire → wire}/session/login-with-token.command.d.ts +0 -0
  182. /package/dist/{src/wire → wire}/session/login-with-token.command.js +0 -0
  183. /package/dist/{src/wire → wire}/session/login-with-token.command.test.d.ts +0 -0
  184. /package/dist/{src/wire → wire}/session/login-with-token.command.test.js +0 -0
  185. /package/dist/{src/wire → wire}/session/login.command.d.ts +0 -0
  186. /package/dist/{src/wire → wire}/session/login.command.js +0 -0
  187. /package/dist/{src/wire → wire}/session/login.command.test.d.ts +0 -0
  188. /package/dist/{src/wire → wire}/session/login.command.test.js +0 -0
  189. /package/dist/{src/wire → wire}/session/login.utils.d.ts +0 -0
  190. /package/dist/{src/wire → wire}/session/login.utils.js +0 -0
  191. /package/dist/{src/wire → wire}/session/logout.command.d.ts +0 -0
  192. /package/dist/{src/wire → wire}/session/logout.command.js +0 -0
  193. /package/dist/{src/wire → wire}/stream/create-stream.command.d.ts +0 -0
  194. /package/dist/{src/wire → wire}/stream/create-stream.command.js +0 -0
  195. /package/dist/{src/wire → wire}/stream/create-stream.command.test.d.ts +0 -0
  196. /package/dist/{src/wire → wire}/stream/create-stream.command.test.js +0 -0
  197. /package/dist/{src/wire → wire}/stream/delete-stream.command.d.ts +0 -0
  198. /package/dist/{src/wire → wire}/stream/delete-stream.command.js +0 -0
  199. /package/dist/{src/wire → wire}/stream/get-stream.command.d.ts +0 -0
  200. /package/dist/{src/wire → wire}/stream/get-stream.command.js +0 -0
  201. /package/dist/{src/wire → wire}/stream/get-streams.command.d.ts +0 -0
  202. /package/dist/{src/wire → wire}/stream/get-streams.command.js +0 -0
  203. /package/dist/{src/wire → wire}/stream/index.d.ts +0 -0
  204. /package/dist/{src/wire → wire}/stream/index.js +0 -0
  205. /package/dist/{src/wire → wire}/stream/purge-stream.command.d.ts +0 -0
  206. /package/dist/{src/wire → wire}/stream/purge-stream.command.js +0 -0
  207. /package/dist/{src/wire → wire}/stream/stream.utils.d.ts +0 -0
  208. /package/dist/{src/wire → wire}/stream/update-stream.command.d.ts +0 -0
  209. /package/dist/{src/wire → wire}/stream/update-stream.command.js +0 -0
  210. /package/dist/{src/wire → wire}/system/get-stats.command.d.ts +0 -0
  211. /package/dist/{src/wire → wire}/system/get-stats.command.js +0 -0
  212. /package/dist/{src/wire → wire}/system/index.d.ts +0 -0
  213. /package/dist/{src/wire → wire}/system/index.js +0 -0
  214. /package/dist/{src/wire → wire}/system/ping.command.d.ts +0 -0
  215. /package/dist/{src/wire → wire}/system/ping.command.js +0 -0
  216. /package/dist/{src/wire → wire}/token/create-token.command.d.ts +0 -0
  217. /package/dist/{src/wire → wire}/token/create-token.command.js +0 -0
  218. /package/dist/{src/wire → wire}/token/create-token.command.test.d.ts +0 -0
  219. /package/dist/{src/wire → wire}/token/create-token.command.test.js +0 -0
  220. /package/dist/{src/wire → wire}/token/delete-token.command.d.ts +0 -0
  221. /package/dist/{src/wire → wire}/token/delete-token.command.js +0 -0
  222. /package/dist/{src/wire → wire}/token/delete-token.command.test.d.ts +0 -0
  223. /package/dist/{src/wire → wire}/token/delete-token.command.test.js +0 -0
  224. /package/dist/{src/wire → wire}/token/get-tokens.command.d.ts +0 -0
  225. /package/dist/{src/wire → wire}/token/get-tokens.command.js +0 -0
  226. /package/dist/{src/wire → wire}/token/index.d.ts +0 -0
  227. /package/dist/{src/wire → wire}/token/index.js +0 -0
  228. /package/dist/{src/wire → wire}/token/token.utils.d.ts +0 -0
  229. /package/dist/{src/wire → wire}/token/token.utils.js +0 -0
  230. /package/dist/{src/wire → wire}/topic/create-topic.command.test.d.ts +0 -0
  231. /package/dist/{src/wire → wire}/topic/create-topic.command.test.js +0 -0
  232. /package/dist/{src/wire → wire}/topic/delete-topic.command.d.ts +0 -0
  233. /package/dist/{src/wire → wire}/topic/delete-topic.command.js +0 -0
  234. /package/dist/{src/wire → wire}/topic/get-topic.command.d.ts +0 -0
  235. /package/dist/{src/wire → wire}/topic/get-topic.command.js +0 -0
  236. /package/dist/{src/wire → wire}/topic/get-topics.command.d.ts +0 -0
  237. /package/dist/{src/wire → wire}/topic/get-topics.command.js +0 -0
  238. /package/dist/{src/wire → wire}/topic/purge-topic.command.d.ts +0 -0
  239. /package/dist/{src/wire → wire}/topic/purge-topic.command.js +0 -0
  240. /package/dist/{src/wire → wire}/user/change-password.command.d.ts +0 -0
  241. /package/dist/{src/wire → wire}/user/change-password.command.js +0 -0
  242. /package/dist/{src/wire → wire}/user/create-user.command.d.ts +0 -0
  243. /package/dist/{src/wire → wire}/user/create-user.command.js +0 -0
  244. /package/dist/{src/wire → wire}/user/create-user.command.test.d.ts +0 -0
  245. /package/dist/{src/wire → wire}/user/create-user.command.test.js +0 -0
  246. /package/dist/{src/wire → wire}/user/delete-user.command.d.ts +0 -0
  247. /package/dist/{src/wire → wire}/user/delete-user.command.js +0 -0
  248. /package/dist/{src/wire → wire}/user/get-user.command.d.ts +0 -0
  249. /package/dist/{src/wire → wire}/user/get-user.command.js +0 -0
  250. /package/dist/{src/wire → wire}/user/get-users.command.d.ts +0 -0
  251. /package/dist/{src/wire → wire}/user/get-users.command.js +0 -0
  252. /package/dist/{src/wire → wire}/user/index.d.ts +0 -0
  253. /package/dist/{src/wire → wire}/user/index.js +0 -0
  254. /package/dist/{src/wire → wire}/user/permissions.utils.d.ts +0 -0
  255. /package/dist/{src/wire → wire}/user/permissions.utils.js +0 -0
  256. /package/dist/{src/wire → wire}/user/permissions.utils.test.d.ts +0 -0
  257. /package/dist/{src/wire → wire}/user/permissions.utils.test.js +0 -0
  258. /package/dist/{src/wire → wire}/user/update-permissions.command.d.ts +0 -0
  259. /package/dist/{src/wire → wire}/user/update-permissions.command.js +0 -0
  260. /package/dist/{src/wire → wire}/user/update-user.command.d.ts +0 -0
  261. /package/dist/{src/wire → wire}/user/update-user.command.js +0 -0
  262. /package/dist/{src/wire → wire}/user/user.utils.d.ts +0 -0
  263. /package/dist/{src/wire → wire}/uuid.utils.d.ts +0 -0
  264. /package/dist/{src/wire → wire}/uuid.utils.js +0 -0
package/README.md CHANGED
@@ -4,30 +4,30 @@ Apache Iggy Node.js client written in typescript, it currently only supports tcp
4
4
 
5
5
  diclaimer: although all iggy commands & basic client/stream are implemented this is still a WIP, provided as is, and has still a long way to go to be considered "battle tested".
6
6
 
7
- note: This lib started as _iggy-bin_ ( [github](https://github.com/T1B0/iggy-bin) / [npm](https://www.npmjs.com/package/iggy-bin)) before migrating under iggy-rs org. package iggy-bin@v1.3.4 is equivalent to @iggy.rs/sdk@v1.0.3 and migrating again under apache iggy monorepo ( [github](https://github.com/apache/iggy/tree/master/foreign/node) and is now published on npmjs as @apache-iggy/node-sdk
7
+ note: This lib started as _iggy-bin_ ( [github](https://github.com/T1B0/iggy-bin) / [npm](https://www.npmjs.com/package/iggy-bin)) before migrating under iggy-rs org. package iggy-bin@v1.3.4 is equivalent to @iggy.rs/sdk@v1.0.3 and migrating again under apache iggy monorepo ( [github](https://github.com/apache/iggy/tree/master/foreign/node) and is now published on npmjs as apache-iggy
8
8
 
9
9
  note: previous works on node.js http client has been moved to [iggy-node-http-client](<https://github.com/iggy-rs/iggy-node-http-client>) (moved on 04 July 2024)
10
10
 
11
11
  ## install
12
12
 
13
13
  ```bash
14
- npm i --save @apache-iggy/node-sdk
14
+ npm i --save apache-iggy
15
15
  ```
16
16
 
17
17
  ## basic usage
18
18
 
19
19
  ```ts
20
- import { Client } from "@apache-iggy/node-sdk";
20
+ import { Client } from "apache-iggy";
21
21
 
22
22
  const credentials = { username: "iggy", password: "iggy" };
23
23
 
24
- const c = new Client({
24
+ const client = new Client({
25
25
  transport: "TCP",
26
26
  options: { port: 8090, host: "127.0.0.1" },
27
27
  credentials,
28
28
  });
29
29
 
30
- const stats = await c.system.getStats();
30
+ const stats = await client.system.getStats();
31
31
  ```
32
32
 
33
33
  ## use sources
@@ -33,6 +33,8 @@ export const deserializeClient = (r, pos = 0) => {
33
33
  * 13 - x string - adress
34
34
  * x - x+4 u32 - consumerGroupCount
35
35
  */
36
+ if (r.length < 17)
37
+ throw new Error('Client does not exist');
36
38
  const addressLength = r.readUInt32LE(pos + 9);
37
39
  return {
38
40
  bytesRead: 13 + addressLength + 4,
@@ -18,6 +18,8 @@
18
18
  */
19
19
  import { toDate } from '../serialize.utils.js';
20
20
  export const deserializeToStream = (r, pos = 0) => {
21
+ if (r.length === 0)
22
+ throw new Error('Steam does not exist');
21
23
  const id = r.readUInt32LE(pos);
22
24
  const createdAt = toDate(r.readBigUint64LE(pos + 4));
23
25
  const topicsCount = r.readUInt32LE(pos + 12);
@@ -18,13 +18,13 @@
18
18
  */
19
19
  import type { CommandResponse } from '../../client/client.type.js';
20
20
  import { type Id } from '../identifier.utils.js';
21
- import { type Topic, type CompressionAlgorithm } from './topic.utils.js';
21
+ import { type Topic, type CompressionAlgorithm as CompressionAlgorithmT } from './topic.utils.js';
22
22
  export type CreateTopic = {
23
23
  streamId: Id;
24
24
  topicId: number;
25
25
  name: string;
26
26
  partitionCount: number;
27
- compressionAlgorithm: CompressionAlgorithm;
27
+ compressionAlgorithm: CompressionAlgorithmT;
28
28
  messageExpiry?: bigint;
29
29
  maxTopicSize?: bigint;
30
30
  replicationFactor?: number;
@@ -19,10 +19,10 @@
19
19
  import { serializeIdentifier } from '../identifier.utils.js';
20
20
  import { wrapCommand } from '../command.utils.js';
21
21
  import { COMMAND_CODE } from '../command.code.js';
22
- import { isValidCompressionAlgorithm, CompressionAlgorithmKind, deserializeTopic } from './topic.utils.js';
22
+ import { isValidCompressionAlgorithm, CompressionAlgorithm, deserializeTopic } from './topic.utils.js';
23
23
  export const CREATE_TOPIC = {
24
24
  code: COMMAND_CODE.CreateTopic,
25
- serialize: ({ streamId, topicId, name, partitionCount, compressionAlgorithm = CompressionAlgorithmKind.None, messageExpiry = 0n, maxTopicSize = 0n, replicationFactor = 1 }) => {
25
+ serialize: ({ streamId, topicId, name, partitionCount, compressionAlgorithm = CompressionAlgorithm.None, messageExpiry = 0n, maxTopicSize = 0n, replicationFactor = 1 }) => {
26
26
  const streamIdentifier = serializeIdentifier(streamId);
27
27
  const bName = Buffer.from(name);
28
28
  if (replicationFactor < 1 || replicationFactor > 255)
@@ -22,4 +22,5 @@ export * from './get-topic.command.js';
22
22
  export * from './get-topics.command.js';
23
23
  export * from './purge-topic.command.js';
24
24
  export * from './update-topic.command.js';
25
+ export { CompressionAlgorithm } from './topic.utils.js';
25
26
  //# sourceMappingURL=index.d.ts.map
@@ -22,4 +22,5 @@ export * from './get-topic.command.js';
22
22
  export * from './get-topics.command.js';
23
23
  export * from './purge-topic.command.js';
24
24
  export * from './update-topic.command.js';
25
+ export { CompressionAlgorithm } from './topic.utils.js';
25
26
  //# sourceMappingURL=index.js.map
@@ -52,13 +52,13 @@ type BaseTopicSerialized = {
52
52
  type TopicSerialized = {
53
53
  data: Topic;
54
54
  } & Serialized;
55
- export declare const CompressionAlgorithmKind: {
55
+ export declare const CompressionAlgorithm: {
56
56
  None: number;
57
57
  Gzip: number;
58
58
  };
59
- export type CompressionAlgorithmKind = typeof CompressionAlgorithmKind;
60
- export type CompressionAlgorithmKindId = keyof CompressionAlgorithmKind;
61
- export type CompressionAlgorithmKindValue = ValueOf<CompressionAlgorithmKind>;
59
+ export type CompressionAlgorithmKind = typeof CompressionAlgorithm;
60
+ export type CompressionAlgorithmKindId = keyof CompressionAlgorithm;
61
+ export type CompressionAlgorithmKindValue = ValueOf<CompressionAlgorithm>;
62
62
  export type CompressionAlgorithmNone = CompressionAlgorithmKind['None'];
63
63
  export type CompressionAlgorithmGzip = CompressionAlgorithmKind['Gzip'];
64
64
  export type CompressionAlgorithm = CompressionAlgorithmNone | CompressionAlgorithmGzip;
@@ -17,11 +17,11 @@
17
17
  * under the License.
18
18
  */
19
19
  import { toDate } from '../serialize.utils.js';
20
- export const CompressionAlgorithmKind = {
20
+ export const CompressionAlgorithm = {
21
21
  None: 1,
22
22
  Gzip: 2
23
23
  };
24
- export const isValidCompressionAlgorithm = (ca) => Object.values(CompressionAlgorithmKind).includes(ca);
24
+ export const isValidCompressionAlgorithm = (ca) => Object.values(CompressionAlgorithm).includes(ca);
25
25
  export const deserializeBaseTopic = (p, pos = 0) => {
26
26
  const id = p.readUInt32LE(pos);
27
27
  const createdAt = toDate(p.readBigUint64LE(pos + 4));
@@ -17,12 +17,12 @@
17
17
  * under the License.
18
18
  */
19
19
  import { type Id } from '../identifier.utils.js';
20
- import { type CompressionAlgorithm } from './topic.utils.js';
20
+ import { type CompressionAlgorithm as CompressionAlgorithmT } from './topic.utils.js';
21
21
  export type UpdateTopic = {
22
22
  streamId: Id;
23
23
  topicId: Id;
24
24
  name: string;
25
- compressionAlgorithm?: CompressionAlgorithm;
25
+ compressionAlgorithm?: CompressionAlgorithmT;
26
26
  messageExpiry?: bigint;
27
27
  maxTopicSize?: bigint;
28
28
  replicationFactor?: number;
@@ -20,10 +20,10 @@ import { serializeIdentifier } from '../identifier.utils.js';
20
20
  import { deserializeVoidResponse } from '../../client/client.utils.js';
21
21
  import { wrapCommand } from '../command.utils.js';
22
22
  import { COMMAND_CODE } from '../command.code.js';
23
- import { CompressionAlgorithmKind, isValidCompressionAlgorithm } from './topic.utils.js';
23
+ import { CompressionAlgorithm, isValidCompressionAlgorithm } from './topic.utils.js';
24
24
  export const UPDATE_TOPIC = {
25
25
  code: COMMAND_CODE.UpdateTopic,
26
- serialize: ({ streamId, topicId, name, compressionAlgorithm = CompressionAlgorithmKind.None, messageExpiry = 0n, maxTopicSize = 0n, replicationFactor = 1, }) => {
26
+ serialize: ({ streamId, topicId, name, compressionAlgorithm = CompressionAlgorithm.None, messageExpiry = 0n, maxTopicSize = 0n, replicationFactor = 1, }) => {
27
27
  const streamIdentifier = serializeIdentifier(streamId);
28
28
  const topicIdentifier = serializeIdentifier(topicId);
29
29
  const bName = Buffer.from(name);
@@ -33,6 +33,8 @@ const statusString = (t) => {
33
33
  }
34
34
  };
35
35
  export const deserializeBaseUser = (p, pos = 0) => {
36
+ if (p.length === 0)
37
+ throw new Error('User does not exist');
36
38
  const id = p.readUInt32LE(pos);
37
39
  const createdAt = toDate(p.readBigUInt64LE(pos + 4));
38
40
  const status = statusString(p.readUInt8(pos + 12));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "apache-iggy",
3
3
  "type": "module",
4
- "version": "0.5.0-edge.1",
4
+ "version": "0.5.0-edge.2",
5
5
  "description": "Official Apache Iggy NodeJS SDK",
6
6
  "keywords": [
7
7
  "iggy",
@@ -19,8 +19,8 @@
19
19
  },
20
20
  "publishConfig": {
21
21
  "access": "public",
22
- "main": "dist/src/index.js",
23
- "types": "dist/src/index.d.ts"
22
+ "main": "dist/index.js",
23
+ "types": "dist/index.d.ts"
24
24
  },
25
25
  "homepage": "https://iggy.apache.org",
26
26
  "files": [
@@ -1,20 +0,0 @@
1
- /**
2
- * Licensed to the Apache Software Foundation (ASF) under one
3
- * or more contributor license agreements. See the NOTICE file
4
- * distributed with this work for additional information
5
- * regarding copyright ownership. The ASF licenses this file
6
- * to you under the Apache License, Version 2.0 (the
7
- * "License"); you may not use this file except in compliance
8
- * with the License. You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
- export {};
20
- //# sourceMappingURL=auth.d.ts.map
@@ -1,38 +0,0 @@
1
- /**
2
- * Licensed to the Apache Software Foundation (ASF) under one
3
- * or more contributor license agreements. See the NOTICE file
4
- * distributed with this work for additional information
5
- * regarding copyright ownership. The ASF licenses this file
6
- * to you under the Apache License, Version 2.0 (the
7
- * "License"); you may not use this file except in compliance
8
- * with the License. You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
- import assert from 'node:assert/strict';
20
- import { Client } from '../client/index.js';
21
- import { Given } from "@cucumber/cucumber";
22
- import { getIggyAddress } from '../tcp.sm.utils.js';
23
- const credentials = { username: 'iggy', password: 'iggy' };
24
- const [host, port] = getIggyAddress();
25
- const opt = {
26
- transport: 'TCP',
27
- options: { host, port },
28
- credentials
29
- };
30
- Given('I have a running Iggy server', function () {
31
- return true;
32
- });
33
- Given('I am authenticated as the root user', async function () {
34
- this.client = new Client(opt);
35
- assert.deepEqual({ userId: 1 }, await this.client.session.login(credentials));
36
- assert.equal(true, await this.client.system.ping());
37
- });
38
- //# sourceMappingURL=auth.js.map
@@ -1,20 +0,0 @@
1
- /**
2
- * Licensed to the Apache Software Foundation (ASF) under one
3
- * or more contributor license agreements. See the NOTICE file
4
- * distributed with this work for additional information
5
- * regarding copyright ownership. The ASF licenses this file
6
- * to you under the Apache License, Version 2.0 (the
7
- * "License"); you may not use this file except in compliance
8
- * with the License. You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
- export {};
20
- //# sourceMappingURL=message.d.ts.map
@@ -1,70 +0,0 @@
1
- /**
2
- * Licensed to the Apache Software Foundation (ASF) under one
3
- * or more contributor license agreements. See the NOTICE file
4
- * distributed with this work for additional information
5
- * regarding copyright ownership. The ASF licenses this file
6
- * to you under the Apache License, Version 2.0 (the
7
- * "License"); you may not use this file except in compliance
8
- * with the License. You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
- import assert from 'node:assert/strict';
20
- import { When, Then } from "@cucumber/cucumber";
21
- import { Consumer, PollingStrategy, Partitioning } from '../wire/index.js';
22
- import { someMessageContent } from '../tcp.sm.utils.js';
23
- const generateTestMessages = (count = 1) => {
24
- return [...Array(count)].map((_, i) => ({ id: i + 1, ...someMessageContent() }));
25
- };
26
- When('I send {int} messages to stream {int}, topic {int}, partition {int}', async function (msgCount, streamId, topicId, partitionId) {
27
- this.sendMessages = generateTestMessages(msgCount);
28
- assert.ok(await this.client.message.send({
29
- streamId,
30
- topicId,
31
- messages: this.sendMessages,
32
- partition: Partitioning.PartitionId(partitionId)
33
- }));
34
- });
35
- Then('all messages should be sent successfully', () => true);
36
- When('I poll messages from stream {int}, topic {int}, partition {int} starting from offset {int}', async function (streamId, topicId, partitionId, offset) {
37
- const pollReq = {
38
- streamId,
39
- topicId,
40
- consumer: Consumer.Single,
41
- partitionId,
42
- pollingStrategy: PollingStrategy.Offset(BigInt(offset)),
43
- count: 100,
44
- autocommit: true
45
- };
46
- const { messages } = await this.client.message.poll(pollReq);
47
- this.polledMessages = messages;
48
- assert.equal(this.polledMessages.length, this.sendMessages.length);
49
- });
50
- Then('I should receive {int} messages', function (msgCount) {
51
- assert.equal(this.polledMessages.length, msgCount);
52
- });
53
- Then('the messages should have sequential offsets from {int} to {int}', function (from, to) {
54
- for (let i = from; i < to; i++) {
55
- assert.equal(BigInt(i), this.polledMessages[i].headers.offset);
56
- }
57
- });
58
- Then('each message should have the expected payload content', function () {
59
- this.sendMessages.forEach((msg, i) => {
60
- assert.deepEqual(msg.payload.toString(), this.polledMessages[i].payload.toString());
61
- assert.equal(BigInt(msg.id || 0), this.polledMessages[i].headers.id);
62
- });
63
- });
64
- Then('the last polled message should match the last sent message', function () {
65
- const lastSent = this.sendMessages[this.sendMessages.length - 1];
66
- const lastPoll = this.polledMessages[this.polledMessages.length - 1];
67
- assert.deepEqual(lastSent.payload.toString(), lastPoll.payload.toString());
68
- assert.deepEqual(lastSent.headers || {}, lastPoll.userHeaders);
69
- });
70
- //# sourceMappingURL=message.js.map
@@ -1,20 +0,0 @@
1
- /**
2
- * Licensed to the Apache Software Foundation (ASF) under one
3
- * or more contributor license agreements. See the NOTICE file
4
- * distributed with this work for additional information
5
- * regarding copyright ownership. The ASF licenses this file
6
- * to you under the Apache License, Version 2.0 (the
7
- * "License"); you may not use this file except in compliance
8
- * with the License. You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
- export {};
20
- //# sourceMappingURL=stream.d.ts.map
@@ -1,39 +0,0 @@
1
- /**
2
- * Licensed to the Apache Software Foundation (ASF) under one
3
- * or more contributor license agreements. See the NOTICE file
4
- * distributed with this work for additional information
5
- * regarding copyright ownership. The ASF licenses this file
6
- * to you under the Apache License, Version 2.0 (the
7
- * "License"); you may not use this file except in compliance
8
- * with the License. You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
- import assert from 'node:assert/strict';
20
- import { Given, When, Then } from "@cucumber/cucumber";
21
- Given('I have no streams in the system', async function () {
22
- assert.deepEqual([], await this.client.stream.list());
23
- });
24
- When('I create a stream with ID {int} and name {string}', async function (streamId, name) {
25
- this.stream = await this.client.stream.create({ streamId, name });
26
- return this.stream;
27
- });
28
- Then('the stream should be created successfully', function () {
29
- assert.ok(this.stream);
30
- });
31
- Then('the stream should have ID {int} and name {string}', async function (streamId, name) {
32
- assert.equal(this.stream.id, streamId);
33
- assert.equal(this.stream.name, name);
34
- });
35
- // Cleanup: delete stream after test
36
- Then('I can delete stream with ID {int}', async function (streamId) {
37
- assert.ok(await this.client.stream.delete({ streamId }));
38
- });
39
- //# sourceMappingURL=stream.js.map
@@ -1,20 +0,0 @@
1
- /**
2
- * Licensed to the Apache Software Foundation (ASF) under one
3
- * or more contributor license agreements. See the NOTICE file
4
- * distributed with this work for additional information
5
- * regarding copyright ownership. The ASF licenses this file
6
- * to you under the Apache License, Version 2.0 (the
7
- * "License"); you may not use this file except in compliance
8
- * with the License. You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
- export {};
20
- //# sourceMappingURL=topic.d.ts.map
@@ -1,36 +0,0 @@
1
- /**
2
- * Licensed to the Apache Software Foundation (ASF) under one
3
- * or more contributor license agreements. See the NOTICE file
4
- * distributed with this work for additional information
5
- * regarding copyright ownership. The ASF licenses this file
6
- * to you under the Apache License, Version 2.0 (the
7
- * "License"); you may not use this file except in compliance
8
- * with the License. You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
- import assert from 'node:assert/strict';
20
- import { When, Then } from "@cucumber/cucumber";
21
- When('I create a topic with ID {int} and name {string} in stream {int} with {int} partitions', async function (topicId, name, streamId, partitionCount) {
22
- this.topic = await this.client.topic.create({
23
- topicId, name, streamId, partitionCount, compressionAlgorithm: 1
24
- });
25
- });
26
- Then('the topic should be created successfully', function () {
27
- assert.ok(this.topic);
28
- });
29
- Then('the topic should have ID {int} and name {string}', function (topicId, name) {
30
- assert.equal(this.topic.id, topicId);
31
- assert.equal(this.topic.name, name);
32
- });
33
- Then('the topic should have {int} partitions', function (partitionCount) {
34
- assert.equal(this.topic.partitionsCount, partitionCount);
35
- });
36
- //# sourceMappingURL=topic.js.map
@@ -1,30 +0,0 @@
1
- /**
2
- * Licensed to the Apache Software Foundation (ASF) under one
3
- * or more contributor license agreements. See the NOTICE file
4
- * distributed with this work for additional information
5
- * regarding copyright ownership. The ASF licenses this file
6
- * to you under the Apache License, Version 2.0 (the
7
- * "License"); you may not use this file except in compliance
8
- * with the License. You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
- import type { Stream } from '../wire/stream/stream.utils.js';
20
- import type { Topic } from '../wire/topic/topic.utils.js';
21
- import type { CreateMessage, Message } from 'src/wire/index.js';
22
- import type { Client } from '../client/index.js';
23
- export interface TestWorld {
24
- client: Client;
25
- stream: Stream;
26
- topic: Topic;
27
- sendMessages: CreateMessage[];
28
- polledMessages: Message[];
29
- }
30
- //# sourceMappingURL=world.d.ts.map
@@ -1,21 +0,0 @@
1
- /**
2
- * Licensed to the Apache Software Foundation (ASF) under one
3
- * or more contributor license agreements. See the NOTICE file
4
- * distributed with this work for additional information
5
- * regarding copyright ownership. The ASF licenses this file
6
- * to you under the Apache License, Version 2.0 (the
7
- * "License"); you may not use this file except in compliance
8
- * with the License. You may obtain a copy of the License at
9
- *
10
- * http://www.apache.org/licenses/LICENSE-2.0
11
- *
12
- * Unless required by applicable law or agreed to in writing,
13
- * software distributed under the License is distributed on an
14
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- * KIND, either express or implied. See the License for the
16
- * specific language governing permissions and limitations
17
- * under the License.
18
- */
19
- ;
20
- export {};
21
- //# sourceMappingURL=world.js.map
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes