@venizia/ignis-helpers 0.0.9-1 → 0.1.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/README.md +41 -204
  2. package/dist/common/constants/http.d.ts +8 -1
  3. package/dist/common/constants/http.d.ts.map +1 -1
  4. package/dist/common/constants/http.js +6 -0
  5. package/dist/common/constants/http.js.map +1 -1
  6. package/dist/common/index.d.ts +1 -0
  7. package/dist/common/index.d.ts.map +1 -1
  8. package/dist/common/index.js +1 -0
  9. package/dist/common/index.js.map +1 -1
  10. package/dist/common/redact.d.ts +21 -0
  11. package/dist/common/redact.d.ts.map +1 -0
  12. package/dist/common/redact.js +77 -0
  13. package/dist/common/redact.js.map +1 -0
  14. package/dist/common/types.d.ts +2 -0
  15. package/dist/common/types.d.ts.map +1 -1
  16. package/dist/common/types.js +4 -3
  17. package/dist/common/types.js.map +1 -1
  18. package/dist/modules/cron/cron.helper.d.ts +9 -1
  19. package/dist/modules/cron/cron.helper.d.ts.map +1 -1
  20. package/dist/modules/cron/cron.helper.js +53 -12
  21. package/dist/modules/cron/cron.helper.js.map +1 -1
  22. package/dist/modules/env/app-env.d.ts +14 -1
  23. package/dist/modules/env/app-env.d.ts.map +1 -1
  24. package/dist/modules/env/app-env.js +24 -3
  25. package/dist/modules/env/app-env.js.map +1 -1
  26. package/dist/modules/env/types.d.ts +4 -1
  27. package/dist/modules/env/types.d.ts.map +1 -1
  28. package/dist/modules/error/app-error.d.ts +12 -1
  29. package/dist/modules/error/app-error.d.ts.map +1 -1
  30. package/dist/modules/error/app-error.js +23 -3
  31. package/dist/modules/error/app-error.js.map +1 -1
  32. package/dist/modules/error/index.d.ts +1 -0
  33. package/dist/modules/error/index.d.ts.map +1 -1
  34. package/dist/modules/error/index.js +1 -0
  35. package/dist/modules/error/index.js.map +1 -1
  36. package/dist/modules/error/message-code.d.ts +18 -0
  37. package/dist/modules/error/message-code.d.ts.map +1 -0
  38. package/dist/modules/error/message-code.js +44 -0
  39. package/dist/modules/error/message-code.js.map +1 -0
  40. package/dist/modules/index.d.ts +0 -1
  41. package/dist/modules/index.d.ts.map +1 -1
  42. package/dist/modules/index.js +0 -1
  43. package/dist/modules/index.js.map +1 -1
  44. package/dist/modules/logger/default-logger.d.ts.map +1 -1
  45. package/dist/modules/logger/default-logger.js +4 -3
  46. package/dist/modules/logger/default-logger.js.map +1 -1
  47. package/dist/modules/logger/formatters/deep-splat.d.ts +23 -0
  48. package/dist/modules/logger/formatters/deep-splat.d.ts.map +1 -0
  49. package/dist/modules/logger/formatters/deep-splat.js +83 -0
  50. package/dist/modules/logger/formatters/deep-splat.js.map +1 -0
  51. package/dist/modules/logger/formatters/index.d.ts +2 -0
  52. package/dist/modules/logger/formatters/index.d.ts.map +1 -0
  53. package/dist/modules/logger/formatters/index.js +18 -0
  54. package/dist/modules/logger/formatters/index.js.map +1 -0
  55. package/dist/modules/logger/index.d.ts +1 -0
  56. package/dist/modules/logger/index.d.ts.map +1 -1
  57. package/dist/modules/logger/index.js +1 -0
  58. package/dist/modules/logger/index.js.map +1 -1
  59. package/dist/modules/network/http-request/fetcher/axios-fetcher.d.ts +3 -3
  60. package/dist/modules/network/http-request/fetcher/axios-fetcher.d.ts.map +1 -1
  61. package/dist/modules/network/http-request/fetcher/axios-fetcher.js +7 -5
  62. package/dist/modules/network/http-request/fetcher/axios-fetcher.js.map +1 -1
  63. package/dist/modules/network/http-request/fetcher/base-fetcher.d.ts +5 -2
  64. package/dist/modules/network/http-request/fetcher/base-fetcher.d.ts.map +1 -1
  65. package/dist/modules/network/http-request/fetcher/base-fetcher.js +11 -8
  66. package/dist/modules/network/http-request/fetcher/base-fetcher.js.map +1 -1
  67. package/dist/modules/network/http-request/fetcher/index.js +3 -0
  68. package/dist/modules/network/http-request/fetcher/index.js.map +1 -1
  69. package/dist/modules/network/http-request/fetcher/node-fetcher.d.ts +4 -1
  70. package/dist/modules/network/http-request/fetcher/node-fetcher.d.ts.map +1 -1
  71. package/dist/modules/network/http-request/fetcher/node-fetcher.js +24 -13
  72. package/dist/modules/network/http-request/fetcher/node-fetcher.js.map +1 -1
  73. package/dist/modules/network/tcp-socket/base-tcp-client.helper.d.ts +6 -0
  74. package/dist/modules/network/tcp-socket/base-tcp-client.helper.d.ts.map +1 -1
  75. package/dist/modules/network/tcp-socket/base-tcp-client.helper.js +24 -19
  76. package/dist/modules/network/tcp-socket/base-tcp-client.helper.js.map +1 -1
  77. package/dist/modules/network/tcp-socket/base-tcp-server.helper.d.ts +24 -1
  78. package/dist/modules/network/tcp-socket/base-tcp-server.helper.d.ts.map +1 -1
  79. package/dist/modules/network/tcp-socket/base-tcp-server.helper.js +117 -7
  80. package/dist/modules/network/tcp-socket/base-tcp-server.helper.js.map +1 -1
  81. package/dist/modules/network/tcp-socket/network-tls-tcp-server.helper.d.ts +4 -2
  82. package/dist/modules/network/tcp-socket/network-tls-tcp-server.helper.d.ts.map +1 -1
  83. package/dist/modules/network/tcp-socket/network-tls-tcp-server.helper.js.map +1 -1
  84. package/dist/modules/network/udp-socket/network-udp-client.helper.d.ts +2 -1
  85. package/dist/modules/network/udp-socket/network-udp-client.helper.d.ts.map +1 -1
  86. package/dist/modules/network/udp-socket/network-udp-client.helper.js +51 -13
  87. package/dist/modules/network/udp-socket/network-udp-client.helper.js.map +1 -1
  88. package/dist/modules/pool/{helper.d.ts → abstract.d.ts} +3 -23
  89. package/dist/modules/pool/abstract.d.ts.map +1 -0
  90. package/dist/modules/pool/{helper.js → abstract.js} +21 -40
  91. package/dist/modules/pool/abstract.js.map +1 -0
  92. package/dist/modules/pool/base.d.ts +24 -0
  93. package/dist/modules/pool/base.d.ts.map +1 -0
  94. package/dist/modules/pool/base.js +35 -0
  95. package/dist/modules/pool/base.js.map +1 -0
  96. package/dist/modules/pool/index.d.ts +2 -1
  97. package/dist/modules/pool/index.d.ts.map +1 -1
  98. package/dist/modules/pool/index.js +2 -1
  99. package/dist/modules/pool/index.js.map +1 -1
  100. package/dist/modules/pool/types.d.ts +2 -2
  101. package/dist/modules/pool/types.d.ts.map +1 -1
  102. package/dist/modules/queue/bullmq/helper.d.ts +10 -1
  103. package/dist/modules/queue/bullmq/helper.d.ts.map +1 -1
  104. package/dist/modules/queue/bullmq/helper.js +71 -30
  105. package/dist/modules/queue/bullmq/helper.js.map +1 -1
  106. package/dist/modules/queue/common/hook.d.ts +24 -0
  107. package/dist/modules/queue/common/hook.d.ts.map +1 -0
  108. package/dist/modules/queue/common/hook.js +36 -0
  109. package/dist/modules/queue/common/hook.js.map +1 -0
  110. package/dist/modules/queue/common/index.d.ts +1 -0
  111. package/dist/modules/queue/common/index.d.ts.map +1 -1
  112. package/dist/modules/queue/common/index.js +1 -0
  113. package/dist/modules/queue/common/index.js.map +1 -1
  114. package/dist/modules/queue/internal/hf/helper.d.ts.map +1 -1
  115. package/dist/modules/queue/internal/hf/helper.js +1 -1
  116. package/dist/modules/queue/internal/hf/helper.js.map +1 -1
  117. package/dist/modules/queue/internal/sequential/helper.d.ts +10 -0
  118. package/dist/modules/queue/internal/sequential/helper.d.ts.map +1 -1
  119. package/dist/modules/queue/internal/sequential/helper.js +43 -9
  120. package/dist/modules/queue/internal/sequential/helper.js.map +1 -1
  121. package/dist/modules/queue/kafka/base.d.ts +6 -1
  122. package/dist/modules/queue/kafka/base.d.ts.map +1 -1
  123. package/dist/modules/queue/kafka/base.js +47 -11
  124. package/dist/modules/queue/kafka/base.js.map +1 -1
  125. package/dist/modules/queue/kafka/bundler/common/constants.d.ts +9 -0
  126. package/dist/modules/queue/kafka/bundler/common/constants.d.ts.map +1 -0
  127. package/dist/modules/queue/kafka/bundler/common/constants.js +14 -0
  128. package/dist/modules/queue/kafka/bundler/common/constants.js.map +1 -0
  129. package/dist/modules/queue/kafka/bundler/common/index.d.ts +2 -0
  130. package/dist/modules/queue/kafka/bundler/common/index.d.ts.map +1 -0
  131. package/dist/modules/{testing → queue/kafka/bundler}/common/index.js +0 -1
  132. package/dist/modules/queue/kafka/bundler/common/index.js.map +1 -0
  133. package/dist/modules/queue/kafka/bundler/index.d.ts +3 -0
  134. package/dist/modules/queue/kafka/bundler/index.d.ts.map +1 -0
  135. package/dist/modules/{testing → queue/kafka/bundler}/index.js +1 -5
  136. package/dist/modules/queue/kafka/bundler/index.js.map +1 -0
  137. package/dist/modules/queue/kafka/bundler/platformatic-wasm.plugin.d.ts +12 -0
  138. package/dist/modules/queue/kafka/bundler/platformatic-wasm.plugin.d.ts.map +1 -0
  139. package/dist/modules/queue/kafka/bundler/platformatic-wasm.plugin.js +38 -0
  140. package/dist/modules/queue/kafka/bundler/platformatic-wasm.plugin.js.map +1 -0
  141. package/dist/modules/queue/kafka/common/constants.d.ts.map +1 -1
  142. package/dist/modules/queue/kafka/common/constants.js +0 -18
  143. package/dist/modules/queue/kafka/common/constants.js.map +1 -1
  144. package/dist/modules/queue/kafka/common/types.d.ts.map +1 -1
  145. package/dist/modules/queue/kafka/consumer.d.ts.map +1 -1
  146. package/dist/modules/queue/kafka/consumer.js +87 -45
  147. package/dist/modules/queue/kafka/consumer.js.map +1 -1
  148. package/dist/modules/queue/kafka/index.d.ts +1 -0
  149. package/dist/modules/queue/kafka/index.d.ts.map +1 -1
  150. package/dist/modules/queue/kafka/index.js +1 -0
  151. package/dist/modules/queue/kafka/index.js.map +1 -1
  152. package/dist/modules/queue/kafka/producer.d.ts.map +1 -1
  153. package/dist/modules/queue/kafka/producer.js +3 -12
  154. package/dist/modules/queue/kafka/producer.js.map +1 -1
  155. package/dist/modules/queue/kafka/schema/registry.d.ts +1 -1
  156. package/dist/modules/queue/kafka/schema/registry.d.ts.map +1 -1
  157. package/dist/modules/queue/kafka/schema/registry.js +2 -2
  158. package/dist/modules/queue/kafka/schema/registry.js.map +1 -1
  159. package/dist/modules/queue/mqtt/helper.d.ts +14 -1
  160. package/dist/modules/queue/mqtt/helper.d.ts.map +1 -1
  161. package/dist/modules/queue/mqtt/helper.js +62 -12
  162. package/dist/modules/queue/mqtt/helper.js.map +1 -1
  163. package/dist/modules/redis/base/abstract.helper.d.ts.map +1 -1
  164. package/dist/modules/redis/base/abstract.helper.js +21 -12
  165. package/dist/modules/redis/base/abstract.helper.js.map +1 -1
  166. package/dist/modules/redis/index.d.ts +3 -2
  167. package/dist/modules/redis/index.d.ts.map +1 -1
  168. package/dist/modules/redis/index.js +3 -2
  169. package/dist/modules/redis/index.js.map +1 -1
  170. package/dist/modules/redis/utility.d.ts +20 -0
  171. package/dist/modules/redis/utility.d.ts.map +1 -0
  172. package/dist/modules/redis/utility.js +66 -0
  173. package/dist/modules/redis/utility.js.map +1 -0
  174. package/dist/modules/socket/socket-io/client/helper.d.ts +2 -1
  175. package/dist/modules/socket/socket-io/client/helper.d.ts.map +1 -1
  176. package/dist/modules/socket/socket-io/client/helper.js +22 -4
  177. package/dist/modules/socket/socket-io/client/helper.js.map +1 -1
  178. package/dist/modules/socket/socket-io/common/types.d.ts +1 -1
  179. package/dist/modules/socket/socket-io/common/types.d.ts.map +1 -1
  180. package/dist/modules/socket/socket-io/server/helper.d.ts +10 -2
  181. package/dist/modules/socket/socket-io/server/helper.d.ts.map +1 -1
  182. package/dist/modules/socket/socket-io/server/helper.js +78 -43
  183. package/dist/modules/socket/socket-io/server/helper.js.map +1 -1
  184. package/dist/modules/socket/websocket/common/types.d.ts +1 -1
  185. package/dist/modules/socket/websocket/common/types.d.ts.map +1 -1
  186. package/dist/modules/socket/websocket/emitter/helper.d.ts +0 -1
  187. package/dist/modules/socket/websocket/emitter/helper.d.ts.map +1 -1
  188. package/dist/modules/socket/websocket/emitter/helper.js +7 -25
  189. package/dist/modules/socket/websocket/emitter/helper.js.map +1 -1
  190. package/dist/modules/socket/websocket/server/helper.d.ts +11 -2
  191. package/dist/modules/socket/websocket/server/helper.d.ts.map +1 -1
  192. package/dist/modules/socket/websocket/server/helper.js +77 -67
  193. package/dist/modules/socket/websocket/server/helper.js.map +1 -1
  194. package/dist/modules/storage/base.d.ts +34 -12
  195. package/dist/modules/storage/base.d.ts.map +1 -1
  196. package/dist/modules/storage/base.js +91 -2
  197. package/dist/modules/storage/base.js.map +1 -1
  198. package/dist/modules/storage/bun-s3/helper.d.ts +6 -12
  199. package/dist/modules/storage/bun-s3/helper.d.ts.map +1 -1
  200. package/dist/modules/storage/bun-s3/helper.js +17 -56
  201. package/dist/modules/storage/bun-s3/helper.js.map +1 -1
  202. package/dist/modules/storage/disk/helper.d.ts +6 -12
  203. package/dist/modules/storage/disk/helper.d.ts.map +1 -1
  204. package/dist/modules/storage/disk/helper.js +11 -53
  205. package/dist/modules/storage/disk/helper.js.map +1 -1
  206. package/dist/modules/storage/minio/helper.d.ts +6 -12
  207. package/dist/modules/storage/minio/helper.d.ts.map +1 -1
  208. package/dist/modules/storage/minio/helper.js +12 -53
  209. package/dist/modules/storage/minio/helper.js.map +1 -1
  210. package/dist/modules/storage/types.d.ts +2 -0
  211. package/dist/modules/storage/types.d.ts.map +1 -1
  212. package/dist/modules/uid/helper.d.ts.map +1 -1
  213. package/dist/modules/uid/helper.js +10 -2
  214. package/dist/modules/uid/helper.js.map +1 -1
  215. package/dist/modules/worker-thread/base.d.ts +9 -0
  216. package/dist/modules/worker-thread/base.d.ts.map +1 -1
  217. package/dist/modules/worker-thread/base.js +46 -10
  218. package/dist/modules/worker-thread/base.js.map +1 -1
  219. package/dist/modules/worker-thread/worker-bus.d.ts +9 -0
  220. package/dist/modules/worker-thread/worker-bus.d.ts.map +1 -1
  221. package/dist/modules/worker-thread/worker-bus.js +39 -18
  222. package/dist/modules/worker-thread/worker-bus.js.map +1 -1
  223. package/dist/modules/worker-thread/worker-pool.d.ts +1 -1
  224. package/dist/modules/worker-thread/worker-pool.d.ts.map +1 -1
  225. package/dist/modules/worker-thread/worker-pool.js +14 -6
  226. package/dist/modules/worker-thread/worker-pool.js.map +1 -1
  227. package/dist/utilities/index.d.ts +1 -0
  228. package/dist/utilities/index.d.ts.map +1 -1
  229. package/dist/utilities/index.js +1 -0
  230. package/dist/utilities/index.js.map +1 -1
  231. package/dist/utilities/parse.utility.d.ts +5 -12
  232. package/dist/utilities/parse.utility.d.ts.map +1 -1
  233. package/dist/utilities/parse.utility.js +49 -110
  234. package/dist/utilities/parse.utility.js.map +1 -1
  235. package/dist/utilities/promise.utility.d.ts +18 -5
  236. package/dist/utilities/promise.utility.d.ts.map +1 -1
  237. package/dist/utilities/promise.utility.js +39 -17
  238. package/dist/utilities/promise.utility.js.map +1 -1
  239. package/dist/utilities/retry.utility.d.ts +97 -0
  240. package/dist/utilities/retry.utility.d.ts.map +1 -0
  241. package/dist/utilities/retry.utility.js +245 -0
  242. package/dist/utilities/retry.utility.js.map +1 -0
  243. package/package.json +10 -10
  244. package/dist/modules/pool/helper.d.ts.map +0 -1
  245. package/dist/modules/pool/helper.js.map +0 -1
  246. package/dist/modules/testing/base-test-plan.d.ts +0 -29
  247. package/dist/modules/testing/base-test-plan.d.ts.map +0 -1
  248. package/dist/modules/testing/base-test-plan.js +0 -73
  249. package/dist/modules/testing/base-test-plan.js.map +0 -1
  250. package/dist/modules/testing/common/constants.d.ts +0 -7
  251. package/dist/modules/testing/common/constants.d.ts.map +0 -1
  252. package/dist/modules/testing/common/constants.js +0 -10
  253. package/dist/modules/testing/common/constants.js.map +0 -1
  254. package/dist/modules/testing/common/index.d.ts +0 -3
  255. package/dist/modules/testing/common/index.d.ts.map +0 -1
  256. package/dist/modules/testing/common/index.js.map +0 -1
  257. package/dist/modules/testing/common/types.d.ts +0 -54
  258. package/dist/modules/testing/common/types.d.ts.map +0 -1
  259. package/dist/modules/testing/common/types.js +0 -3
  260. package/dist/modules/testing/common/types.js.map +0 -1
  261. package/dist/modules/testing/describe.d.ts +0 -16
  262. package/dist/modules/testing/describe.d.ts.map +0 -1
  263. package/dist/modules/testing/describe.js +0 -49
  264. package/dist/modules/testing/describe.js.map +0 -1
  265. package/dist/modules/testing/index.d.ts +0 -7
  266. package/dist/modules/testing/index.d.ts.map +0 -1
  267. package/dist/modules/testing/index.js.map +0 -1
  268. package/dist/modules/testing/test-case.d.ts +0 -21
  269. package/dist/modules/testing/test-case.d.ts.map +0 -1
  270. package/dist/modules/testing/test-case.js +0 -42
  271. package/dist/modules/testing/test-case.js.map +0 -1
  272. package/dist/modules/testing/test-handler.d.ts +0 -27
  273. package/dist/modules/testing/test-handler.d.ts.map +0 -1
  274. package/dist/modules/testing/test-handler.js +0 -52
  275. package/dist/modules/testing/test-handler.js.map +0 -1
  276. package/dist/modules/testing/test-plan.d.ts +0 -6
  277. package/dist/modules/testing/test-plan.d.ts.map +0 -1
  278. package/dist/modules/testing/test-plan.js +0 -11
  279. package/dist/modules/testing/test-plan.js.map +0 -1
package/README.md CHANGED
@@ -20,7 +20,7 @@ Logging, Redis, queues (BullMQ/MQTT/Kafka), storage (MinIO/Disk/Memory), cryptog
20
20
  | :---: | :--- | :--- |
21
21
  | **1** | **14+ Production Modules** | Logger, Redis, Queue, Storage, Crypto, Network, and more |
22
22
  | **2** | **Pluggable Architecture** | Install only what you use via optional peer deps |
23
- | **3** | **Sub-Path Imports** | Tree-shake heavy modules with `@venizia/ignis-helpers/redis` |
23
+ | **3** | **Sub-Path Imports** | Tree-shake heavy modules with `@venizia/ignis-helpers/bullmq`, `/minio`, `/kafka`, etc. |
24
24
  | **4** | **Consistent API** | Every helper extends `BaseHelper` with scoped logging |
25
25
  | **5** | **HfLogger** | Zero-allocation ring buffer logger for hot paths (~100-300ns) |
26
26
  | **6** | **Snowflake UID** | 70-bit distributed IDs at ~4M/sec/worker |
@@ -32,11 +32,9 @@ Logging, Redis, queues (BullMQ/MQTT/Kafka), storage (MinIO/Disk/Memory), cryptog
32
32
  The 5 most common imports:
33
33
 
34
34
  ```typescript
35
- import { LoggerFactory } from '@venizia/ignis-helpers';
36
- import { RedisHelper } from '@venizia/ignis-helpers/redis';
35
+ import { LoggerFactory, RedisSingleHelper, AES } from '@venizia/ignis-helpers';
37
36
  import { BullMQHelper } from '@venizia/ignis-helpers/bullmq';
38
37
  import { MinioHelper } from '@venizia/ignis-helpers/minio';
39
- import { CryptoHelper } from '@venizia/ignis-helpers/crypto';
40
38
  ```
41
39
 
42
40
  ---
@@ -751,7 +749,7 @@ Additionally, the client logs `reconnecting` events automatically.
751
749
 
752
750
  ### Reconnection Behavior
753
751
 
754
- The `RedisHelper` uses exponential backoff for reconnection:
752
+ The Redis helper (`AbstractRedisHelper`) uses exponential backoff for reconnection:
755
753
 
756
754
  ```
757
755
  Strategy: Math.max(Math.min(attempt * 2000, 5000), 1000) ms
@@ -840,7 +838,7 @@ await worker.close();
840
838
  - `removeOnComplete: true` -- clean up completed jobs automatically
841
839
  - `removeOnFail: true` -- clean up failed jobs automatically
842
840
 
843
- **Redis connection note:** BullMQ requires `maxRetriesPerRequest: null`. The `RedisHelper` sets this automatically. The BullMQ helper calls `redisConnection.getClient().duplicate()` for both queue and worker connections so they don't interfere with your main Redis client.
841
+ **Redis connection note:** BullMQ requires `maxRetriesPerRequest: null`. The Redis helper sets this automatically. The BullMQ helper calls `redisConnection.getClient().duplicate()` for both queue and worker connections so they don't interfere with your main Redis client.
844
842
 
845
843
  **Supported roles:**
846
844
 
@@ -953,27 +951,7 @@ The MQTT client auto-connects on construction. If the client is already establis
953
951
 
954
952
  ### Kafka (Experimental)
955
953
 
956
- Apache Kafka helpers built on `@platformatic/kafka`. Import from the `@venizia/ignis-helpers/kafka` sub-path.
957
-
958
- **Constants and defaults:**
959
-
960
- | Constant | Default | Description |
961
- | -------------------------------- | -------------- | ------------------------------------- |
962
- | `KafkaDefaults.CLIENT_ID` | `ignis-kafka` | Default client ID |
963
- | `KafkaDefaults.SESSION_TIMEOUT` | `30000` | Consumer session timeout (ms) |
964
- | `KafkaDefaults.HEARTBEAT_INTERVAL` | `3000` | Consumer heartbeat interval (ms) |
965
- | `KafkaDefaults.MAX_WAIT_TIME` | `5000` | Max wait time for fetch (ms) |
966
- | `KafkaDefaults.HIGH_WATER_MARK` | `1024` | Stream high water mark |
967
-
968
- **Ack levels (`KafkaAcks`):**
969
-
970
- | Constant | Value | Behavior |
971
- | ------------------ | ----- | ---------------------- |
972
- | `KafkaAcks.NONE` | `0` | No acknowledgment |
973
- | `KafkaAcks.LEADER` | `1` | Leader only |
974
- | `KafkaAcks.ALL` | `-1` | All in-sync replicas |
975
-
976
- **Producer:**
954
+ Apache Kafka helpers built on `@platformatic/kafka`, imported from the `@venizia/ignis-helpers/kafka` sub-path: `KafkaProducerHelper`, `KafkaConsumerHelper`, `KafkaAdminHelper`, and `KafkaSchemaRegistryHelper`, all extending a shared `BaseKafkaHelper` (scoped logging, per-broker health tracking, graceful shutdown, `newInstance()` factory pattern).
977
955
 
978
956
  ```typescript
979
957
  import { KafkaProducerHelper, KafkaAcks } from '@venizia/ignis-helpers/kafka';
@@ -981,173 +959,17 @@ import { KafkaProducerHelper, KafkaAcks } from '@venizia/ignis-helpers/kafka';
981
959
  const producer = KafkaProducerHelper.newInstance({
982
960
  identifier: 'my-producer',
983
961
  bootstrapBrokers: ['localhost:9092'],
984
- clientId: 'my-app', // Default: 'ignis-kafka'
985
- acks: KafkaAcks.ALL, // -1 = all replicas
986
- timeout: 30000, // Connection timeout
987
- retries: 5, // Connection retries
988
- retryDelay: 100, // Delay between retries
989
- autocreateTopics: true, // Auto-create topics on send
990
- onConnected: () => console.log('Producer connected'),
991
- onDisconnected: () => console.log('Producer disconnected'),
992
- onError: ({ error }) => console.error('Producer error:', error),
962
+ acks: KafkaAcks.ALL, // -1 = all in-sync replicas
993
963
  });
994
964
 
995
- // Send messages
996
965
  await producer.send({
997
- messages: [
998
- { topic: 'events', key: 'user-1', value: JSON.stringify({ action: 'login' }) },
999
- { topic: 'events', key: 'user-2', value: JSON.stringify({ action: 'signup' }) },
1000
- ],
1001
- acks: KafkaAcks.ALL,
1002
- });
1003
-
1004
- // Send batch (grouped by topic)
1005
- await producer.sendBatch({
1006
- topicMessages: [
1007
- {
1008
- topic: 'orders',
1009
- messages: [
1010
- { key: 'order-1', value: JSON.stringify({ total: 99.99 }) },
1011
- { key: 'order-2', value: JSON.stringify({ total: 149.50 }) },
1012
- ],
1013
- },
1014
- {
1015
- topic: 'notifications',
1016
- messages: [
1017
- { key: 'notif-1', value: JSON.stringify({ type: 'email' }) },
1018
- ],
1019
- },
1020
- ],
966
+ messages: [{ topic: 'events', key: 'user-1', value: JSON.stringify({ action: 'login' }) }],
1021
967
  });
1022
968
 
1023
- // Access underlying @platformatic/kafka Producer
1024
- const rawProducer = producer.getProducer();
1025
-
1026
969
  await producer.close();
1027
970
  ```
1028
971
 
1029
- **Consumer:**
1030
-
1031
- ```typescript
1032
- import { KafkaConsumerHelper } from '@venizia/ignis-helpers/kafka';
1033
-
1034
- const consumer = KafkaConsumerHelper.newInstance({
1035
- identifier: 'my-consumer',
1036
- bootstrapBrokers: ['localhost:9092'],
1037
- groupId: 'my-group',
1038
- topics: ['events'],
1039
- mode: 'latest', // 'latest' | 'earliest' | 'committed'
1040
- autocommit: true, // Auto-commit offsets (default: true)
1041
- sessionTimeout: 30_000,
1042
- heartbeatInterval: 3_000,
1043
- highWaterMark: 1024,
1044
- maxWaitTime: 5_000,
1045
-
1046
- onMessage: async ({ message }) => {
1047
- console.log(`[${message.topic}:${message.partition}]`, message.value);
1048
- console.log(' key:', message.key);
1049
- console.log(' offset:', message.offset);
1050
- console.log(' timestamp:', message.timestamp);
1051
- console.log(' headers:', message.headers);
1052
-
1053
- // Manual commit (when autocommit: false)
1054
- // await message.commit();
1055
- },
1056
- onError: ({ error }) => console.error('Consumer error:', error),
1057
- onConnected: () => console.log('Consumer connected'),
1058
- onDisconnected: () => console.log('Consumer disconnected'),
1059
- onGroupJoin: ({ groupId, memberId }) => console.log(`Joined ${groupId} as ${memberId}`),
1060
- onGroupLeave: () => console.log('Left consumer group'),
1061
- onRebalance: () => console.log('Rebalance triggered'),
1062
- onLag: ({ offsets }) => console.log('Consumer lag:', offsets),
1063
- });
1064
-
1065
- // Start consuming (fires up the async consume loop)
1066
- await consumer.start();
1067
-
1068
- // Flow control
1069
- consumer.pause(); // Pause the message stream
1070
- consumer.resume(); // Resume the message stream
1071
- consumer.isPaused(); // Check if paused
1072
- consumer.isConsuming(); // Check if actively consuming
1073
-
1074
- // Manual commit (when autocommit: false)
1075
- await consumer.commit({
1076
- offsets: [{ topic: 'events', partition: 0, offset: 42n, leaderEpoch: 0 }],
1077
- });
1078
-
1079
- // Lag monitoring
1080
- consumer.startLagMonitoring({ interval: 10_000 }); // Check every 10s
1081
- consumer.stopLagMonitoring();
1082
-
1083
- // Access underlying @platformatic/kafka Consumer
1084
- const rawConsumer = consumer.getConsumer();
1085
-
1086
- await consumer.close();
1087
- ```
1088
-
1089
- **Admin:**
1090
-
1091
- ```typescript
1092
- import { KafkaAdminHelper, KafkaConfigResourceTypes } from '@venizia/ignis-helpers/kafka';
1093
-
1094
- const admin = KafkaAdminHelper.newInstance({
1095
- identifier: 'my-admin',
1096
- bootstrapBrokers: ['localhost:9092'],
1097
- onConnected: () => console.log('Admin connected'),
1098
- });
1099
-
1100
- // Topic management
1101
- await admin.createTopics({ topics: ['events', 'orders'], partitions: 3, replicas: 1 });
1102
- await admin.deleteTopics({ topics: ['old-topic'] });
1103
- const topics = await admin.listTopics(); // string[]
1104
- const topicsWithInternal = await admin.listTopics({ includeInternals: true });
1105
- const metadata = await admin.metadata({ topics: ['events'] });
1106
-
1107
- // Partition management
1108
- await admin.createPartitions({
1109
- topics: [{ name: 'events', count: 6 }], // Increase to 6 partitions
1110
- validateOnly: false,
1111
- });
1112
-
1113
- // Consumer group management
1114
- const groups = await admin.listGroups({ states: ['Stable'] });
1115
- const groupInfo = await admin.describeGroups({ groups: ['my-group'] });
1116
- await admin.deleteGroups({ groups: ['old-group'] });
1117
-
1118
- // Offset management
1119
- const offsets = await admin.listConsumerGroupOffsets({ groups: ['my-group'] });
1120
- await admin.alterConsumerGroupOffsets({
1121
- groupId: 'my-group',
1122
- topics: [{
1123
- name: 'events',
1124
- partitionOffsets: [{ partition: 0, offset: 100n }],
1125
- }],
1126
- });
1127
-
1128
- // Config management
1129
- const configs = await admin.describeConfigs({
1130
- resources: [{
1131
- resourceType: KafkaConfigResourceTypes.TOPIC, // 2
1132
- resourceName: 'events',
1133
- }],
1134
- includeSynonyms: false,
1135
- includeDocumentation: true,
1136
- });
1137
-
1138
- await admin.alterConfigs({
1139
- resources: [{
1140
- resourceType: KafkaConfigResourceTypes.TOPIC,
1141
- resourceName: 'events',
1142
- configs: [{ name: 'retention.ms', value: '604800000' }], // 7 days
1143
- }],
1144
- });
1145
-
1146
- // Access underlying @platformatic/kafka Admin
1147
- const rawAdmin = admin.getAdmin();
1148
-
1149
- await admin.close();
1150
- ```
972
+ Consumers support consumer groups, lag monitoring, and manual/auto commit; admin covers topic/partition/group/config management. Full API, constants, and examples: [Kafka reference](https://github.com/VENIZIA-AI/ignis/blob/main/docs/wiki/content/extensions/helpers/kafka/index.md) ([producer](https://github.com/VENIZIA-AI/ignis/blob/main/docs/wiki/content/extensions/helpers/kafka/producer.md), [consumer](https://github.com/VENIZIA-AI/ignis/blob/main/docs/wiki/content/extensions/helpers/kafka/consumer.md), [admin](https://github.com/VENIZIA-AI/ignis/blob/main/docs/wiki/content/extensions/helpers/kafka/admin.md)).
1151
973
 
1152
974
  ---
1153
975
 
@@ -2906,13 +2728,14 @@ The helpers package is designed to integrate with the IGNIS framework's IoC cont
2906
2728
  **Binding helpers in the application lifecycle:**
2907
2729
 
2908
2730
  ```typescript
2909
- import { BaseApplication, BootMixin } from '@venizia/ignis';
2910
- import { RedisSingleHelper, Logger } from '@venizia/ignis-helpers';
2731
+ import { BaseApplication } from '@venizia/ignis';
2732
+ import { BootMixin } from '@venizia/ignis-boot';
2733
+ import { RedisSingleHelper } from '@venizia/ignis-helpers';
2911
2734
 
2912
2735
  class MyApplication extends BootMixin(BaseApplication) {
2913
2736
  async preConfigure() {
2914
- // Register Redis as a singleton binding
2915
- this.container.bind('datasources.Redis').to(
2737
+ // BaseApplication extends the IoC Container directly -- bind on `this`, not `this.container`.
2738
+ this.bind({ key: 'datasources.Redis' }).toValue(
2916
2739
  new RedisSingleHelper({
2917
2740
  name: 'main',
2918
2741
  host: process.env.REDIS_HOST,
@@ -2931,12 +2754,15 @@ class MyApplication extends BootMixin(BaseApplication) {
2931
2754
 
2932
2755
  ```typescript
2933
2756
  import { inject } from '@venizia/ignis-inversion';
2934
- import { RedisHelper } from '@venizia/ignis-helpers';
2757
+ import { BaseService } from '@venizia/ignis';
2758
+ import { IRedisHelper } from '@venizia/ignis-helpers';
2935
2759
 
2936
- export class CacheService {
2760
+ export class CacheService extends BaseService {
2937
2761
  constructor(
2938
- @inject({ key: 'datasources.Redis' }) private redis: RedisHelper,
2939
- ) {}
2762
+ @inject({ key: 'datasources.Redis' }) private redis: IRedisHelper,
2763
+ ) {
2764
+ super({ scope: CacheService.name });
2765
+ }
2940
2766
 
2941
2767
  async getCached(key: string) {
2942
2768
  return this.redis.getObject({ key });
@@ -2947,19 +2773,30 @@ export class CacheService {
2947
2773
  **Using helpers in controllers:**
2948
2774
 
2949
2775
  ```typescript
2950
- import { controller, get } from '@venizia/ignis';
2776
+ import { BaseRestController, controller, get, jsonResponse, TRouteContext } from '@venizia/ignis';
2951
2777
  import { inject } from '@venizia/ignis-inversion';
2778
+ import { IRedisHelper } from '@venizia/ignis-helpers';
2779
+ import { z } from '@hono/zod-openapi';
2952
2780
 
2953
2781
  @controller({ path: '/health' })
2954
- export class HealthController extends BaseController {
2782
+ export class HealthController extends BaseRestController {
2955
2783
  constructor(
2956
- @inject({ key: 'datasources.Redis' }) private redis: RedisHelper,
2957
- ) { super(); }
2784
+ @inject({ key: 'datasources.Redis' }) private redis: IRedisHelper,
2785
+ ) {
2786
+ super({ scope: HealthController.name });
2787
+ }
2788
+
2789
+ override binding() {}
2958
2790
 
2959
- @get('/')
2960
- async check() {
2791
+ @get({
2792
+ configs: {
2793
+ path: '/',
2794
+ responses: jsonResponse({ schema: z.object({ redis: z.string() }) }),
2795
+ },
2796
+ })
2797
+ async check(context: TRouteContext) {
2961
2798
  const ping = await this.redis.ping();
2962
- return { redis: ping === 'PONG' ? 'up' : 'down' };
2799
+ return context.json({ redis: ping === 'PONG' ? 'up' : 'down' }, 200);
2963
2800
  }
2964
2801
  }
2965
2802
  ```
@@ -3077,7 +2914,7 @@ try {
3077
2914
 
3078
2915
  ### Redis Connection Pooling
3079
2916
 
3080
- - `RedisHelper` creates a single IoRedis connection by default. For high-throughput, consider multiple `RedisHelper` instances with different roles (read vs write).
2917
+ - Each Redis helper instance creates a single IoRedis connection by default. For high-throughput, consider multiple instances with different roles (read vs write).
3081
2918
  - BullMQ calls `.duplicate()` automatically -- it does not share your main connection.
3082
2919
  - The `maxRetriesPerRequest: null` setting prevents blocking on failed requests.
3083
2920
  - Use `autoConnect: false` (lazy connect) when you need to control connection timing.
@@ -3123,8 +2960,8 @@ IGNIS brings together the structured, enterprise development experience of **Loo
3123
2960
  ## Documentation
3124
2961
 
3125
2962
  - [IGNIS Repository](https://github.com/VENIZIA-AI/ignis)
3126
- - [Getting Started](https://github.com/VENIZIA-AI/ignis/blob/main/docs/wiki/content/get-started/index.md)
3127
- - [Helpers Reference](https://github.com/VENIZIA-AI/ignis/blob/main/docs/wiki/content/references/helpers/index.md)
2963
+ - [Getting Started](https://github.com/VENIZIA-AI/ignis/blob/main/docs/wiki/content/guides/get-started/5-minute-quickstart.md)
2964
+ - [Reference Index](https://github.com/VENIZIA-AI/ignis/blob/main/docs/wiki/content/references/index.md)
3128
2965
 
3129
2966
  ## License
3130
2967
 
@@ -92,6 +92,12 @@ export declare class HTTP {
92
92
  readonly DELETE: "delete";
93
93
  readonly HEAD: "head";
94
94
  readonly OPTIONS: "options";
95
+ readonly QUERY: "query";
96
+ };
97
+ /** Standard HTTP protocols (lowercase). */
98
+ static readonly Protocols: {
99
+ readonly HTTP: "http";
100
+ readonly HTTPS: "https";
95
101
  };
96
102
  /** HTTP status codes grouped by class (1xx–5xx). */
97
103
  static readonly ResultCodes: {
@@ -163,6 +169,7 @@ export declare class HTTP {
163
169
  };
164
170
  };
165
171
  }
166
- export type THttpMethod = ValueOf<typeof HTTP.Methods>;
172
+ export type THttpMethod = ValueOf<typeof HTTP.Methods> | Uppercase<ValueOf<typeof HTTP.Methods>>;
173
+ export type THttpProtocol = ValueOf<typeof HTTP.Protocols> | Uppercase<ValueOf<typeof HTTP.Protocols>>;
167
174
  export type THttpResultCode = ValueOf<typeof HTTP.ResultCodes>;
168
175
  //# sourceMappingURL=http.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/common/constants/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,qBAAa,IAAI;IACf,0EAA0E;IAC1E,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuEZ;IAEX,yCAAyC;IACzC,MAAM,CAAC,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;MAgCjB;IAEX,yCAAyC;IACzC,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;MAQZ;IAEX,oDAAoD;IACpD,MAAM,CAAC,QAAQ,CAAC,WAAW;QACzB,2BAA2B;;;;;;QAO3B,qBAAqB;;;;;;;;;;;QAYrB,yBAAyB;;;;;;;;QASzB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA8B1B,0BAA0B;;;;;;;;;;;;MAYjB;CACZ;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AACvD,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/common/constants/http.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAEnC,qBAAa,IAAI;IACf,0EAA0E;IAC1E,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAuEZ;IAEX,yCAAyC;IACzC,MAAM,CAAC,QAAQ,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;MAgCjB;IAEX,yCAAyC;IACzC,MAAM,CAAC,QAAQ,CAAC,OAAO;;;;;;;;;MASZ;IAEX,2CAA2C;IAC3C,MAAM,CAAC,QAAQ,CAAC,SAAS;;;MAGd;IAEX,oDAAoD;IACpD,MAAM,CAAC,QAAQ,CAAC,WAAW;QACzB,2BAA2B;;;;;;QAO3B,qBAAqB;;;;;;;;;;;QAYrB,yBAAyB;;;;;;;;QASzB,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA8B1B,0BAA0B;;;;;;;;;;;;MAYjB;CACZ;AAED,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;AACjG,MAAM,MAAM,aAAa,GACvB,OAAO,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,OAAO,CAAC,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;AAC7E,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC"}
@@ -107,6 +107,12 @@ class HTTP {
107
107
  DELETE: 'delete',
108
108
  HEAD: 'head',
109
109
  OPTIONS: 'options',
110
+ QUERY: 'query',
111
+ }; }
112
+ /** Standard HTTP protocols (lowercase). */
113
+ static { this.Protocols = {
114
+ HTTP: 'http',
115
+ HTTPS: 'https',
110
116
  }; }
111
117
  /** HTTP status codes grouped by class (1xx–5xx). */
112
118
  static { this.ResultCodes = {
@@ -1 +1 @@
1
- {"version":3,"file":"http.js","sourceRoot":"","sources":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B,iBAAiB,EAAE,GAAG;SACvB;QAED,0BAA0B;QAC1B,IAAI,EAAE;YACJ,UAAU,EAAE,GAAG;YACf,YAAY,EAAE,GAAG;YACjB,eAAe,EAAE,GAAG;YACpB,SAAS,EAAE,GAAG;YACd,QAAQ,EAAE,GAAG;YACb,gBAAgB,EAAE,GAAG;YACrB,aAAa,EAAE,GAAG;YAClB,cAAc,EAAE,GAAG;YACnB,QAAQ,EAAE,GAAG;YACb,IAAI,EAAE,GAAG;YACT,cAAc,EAAE,GAAG;YACnB,kBAAkB,EAAE,GAAG;YACvB,eAAe,EAAE,GAAG;YACpB,UAAU,EAAE,GAAG;YACf,oBAAoB,EAAE,GAAG;YACzB,mBAAmB,EAAE,GAAG;YACxB,iBAAiB,EAAE,GAAG;YACtB,mBAAmB,EAAE,GAAG;YACxB,MAAM,EAAE,GAAG;YACX,gBAAgB,EAAE,GAAG;YACrB,QAAQ,EAAE,GAAG;YACb,eAAe,EAAE,GAAG;YACpB,oBAAoB,EAAE,GAAG;YACzB,eAAe,EAAE,GAAG;YACpB,2BAA2B,EAAE,GAAG;YAChC,0BAA0B,EAAE,GAAG;SAChC;QAED,0BAA0B;QAC1B,IAAI,EAAE;YACJ,mBAAmB,EAAE,GAAG;YACxB,cAAc,EAAE,GAAG;YACnB,UAAU,EAAE,GAAG;YACf,kBAAkB,EAAE,GAAG;YACvB,cAAc,EAAE,GAAG;YACnB,uBAAuB,EAAE,GAAG;YAC5B,mBAAmB,EAAE,GAAG;YACxB,YAAY,EAAE,GAAG;YACjB,6BAA6B,EAAE,GAAG;SACnC;KACO,CAAC;;AAxMb,oBAyMC"}
@@ -1,3 +1,4 @@
1
1
  export * from './constants';
2
+ export * from './redact';
2
3
  export * from './types';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
@@ -15,5 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./constants"), exports);
18
+ __exportStar(require("./redact"), exports);
18
19
  __exportStar(require("./types"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB"}
@@ -0,0 +1,21 @@
1
+ export declare const REDACTED = "[REDACTED]";
2
+ /**
3
+ * Returns a copy of `value` with every secret-looking key replaced by `[REDACTED]`, so an options
4
+ * object can be logged without spilling a TLS private key, an SMTP password or a bearer token.
5
+ *
6
+ * Redaction is by KEY NAME, not by value shape: a secret is whatever a caller named like one, and
7
+ * that is the only signal available at this layer. Buffers and typed arrays are summarized rather
8
+ * than serialized - a `key: Buffer` is still a private key.
9
+ */
10
+ export declare const redactSecrets: (value: unknown, seen?: WeakSet<object>) => unknown;
11
+ /**
12
+ * Strips the credentials out of a connection URL: `mqtts://user:hunter2@broker:8883` becomes
13
+ * `mqtts://user:[REDACTED]@broker:8883`. A broker/database URL is routinely logged at boot, and the
14
+ * password sits in the authority section where {@link redactSecrets} - which matches on KEY names -
15
+ * cannot see it.
16
+ *
17
+ * A value that does not parse as a URL is returned unchanged: it carries no authority section, so
18
+ * there is nothing to strip, and blanking it would hide the very thing the log line is about.
19
+ */
20
+ export declare const redactUrlCredentials: (url: string) => string;
21
+ //# sourceMappingURL=redact.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../src/common/redact.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,QAAQ,eAAe,CAAC;AAErC;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,EAAE,sBAA4B,KAAG,OA+B5E,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,MAAM,KAAG,MAelD,CAAC"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.redactUrlCredentials = exports.redactSecrets = exports.REDACTED = void 0;
4
+ /**
5
+ * Keys whose VALUES must never reach a log line, a log aggregator or a crash report. Matched
6
+ * case-insensitively on the key name, at any depth.
7
+ */
8
+ const SECRET_KEY_PATTERN = new RegExp([
9
+ // Options-object spellings (camelCase / snake_case).
10
+ '^(pass|password|passphrase|secret|token|apiKey|api_key|accessKey|access_key',
11
+ '|secretKey|secret_key|privateKey|private_key|key|cert|ca|pfx|credentials',
12
+ '|authorization|auth|jwtSecret|applicationSecret|connectionString)$',
13
+ // HTTP HEADER spellings. A header set is logged on every outbound request, and its names are
14
+ // kebab-case and often `x-`-prefixed - none of which the camelCase list above matches.
15
+ '|^(x-)?(api|auth|access|secret|session|csrf|xsrf)-(key|token|secret|id)$',
16
+ '|^(cookie|set-cookie|proxy-authorization|www-authenticate)$',
17
+ ].join(''), 'i');
18
+ exports.REDACTED = '[REDACTED]';
19
+ /**
20
+ * Returns a copy of `value` with every secret-looking key replaced by `[REDACTED]`, so an options
21
+ * object can be logged without spilling a TLS private key, an SMTP password or a bearer token.
22
+ *
23
+ * Redaction is by KEY NAME, not by value shape: a secret is whatever a caller named like one, and
24
+ * that is the only signal available at this layer. Buffers and typed arrays are summarized rather
25
+ * than serialized - a `key: Buffer` is still a private key.
26
+ */
27
+ const redactSecrets = (value, seen = new WeakSet()) => {
28
+ if (value === null || typeof value !== 'object') {
29
+ return value;
30
+ }
31
+ if (seen.has(value)) {
32
+ return '[Circular]';
33
+ }
34
+ seen.add(value);
35
+ if (Array.isArray(value)) {
36
+ return value.map(entry => (0, exports.redactSecrets)(entry, seen));
37
+ }
38
+ if (ArrayBuffer.isView(value) || value instanceof ArrayBuffer) {
39
+ return `[Binary ${value.byteLength ?? 0} bytes]`;
40
+ }
41
+ const source = value;
42
+ const result = {};
43
+ for (const key of Object.keys(source)) {
44
+ if (SECRET_KEY_PATTERN.test(key)) {
45
+ result[key] = exports.REDACTED;
46
+ continue;
47
+ }
48
+ result[key] = (0, exports.redactSecrets)(source[key], seen);
49
+ }
50
+ return result;
51
+ };
52
+ exports.redactSecrets = redactSecrets;
53
+ /**
54
+ * Strips the credentials out of a connection URL: `mqtts://user:hunter2@broker:8883` becomes
55
+ * `mqtts://user:[REDACTED]@broker:8883`. A broker/database URL is routinely logged at boot, and the
56
+ * password sits in the authority section where {@link redactSecrets} - which matches on KEY names -
57
+ * cannot see it.
58
+ *
59
+ * A value that does not parse as a URL is returned unchanged: it carries no authority section, so
60
+ * there is nothing to strip, and blanking it would hide the very thing the log line is about.
61
+ */
62
+ const redactUrlCredentials = (url) => {
63
+ let parsed;
64
+ try {
65
+ parsed = new URL(url);
66
+ }
67
+ catch {
68
+ return url;
69
+ }
70
+ if (!parsed.password) {
71
+ return url;
72
+ }
73
+ parsed.password = exports.REDACTED;
74
+ return decodeURIComponent(parsed.toString());
75
+ };
76
+ exports.redactUrlCredentials = redactUrlCredentials;
77
+ //# sourceMappingURL=redact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact.js","sourceRoot":"","sources":["../../src/common/redact.ts"],"names":[],"mappings":";;;AAEA;;;GAGG;AACH,MAAM,kBAAkB,GAAG,IAAI,MAAM,CACnC;IACE,qDAAqD;IACrD,6EAA6E;IAC7E,0EAA0E;IAC1E,oEAAoE;IAEpE,6FAA6F;IAC7F,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AED,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AA/BW,QAAA,aAAa,iBA+BxB;AAEF;;;;;;;;GAQG;AACI,MAAM,oBAAoB,GAAG,CAAC,GAAW,EAAU,EAAE;IAC1D,IAAI,MAAW,CAAC;IAEhB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,GAAG,CAAC;IACb,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACrB,OAAO,GAAG,CAAC;IACb,CAAC;IAED,MAAM,CAAC,QAAQ,GAAG,gBAAQ,CAAC;IAC3B,OAAO,kBAAkB,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;AAC/C,CAAC,CAAC;AAfW,QAAA,oBAAoB,wBAe/B"}
@@ -1,3 +1,5 @@
1
+ import { isClass } from '@venizia/ignis-inversion';
2
+ export { isClass };
1
3
  export type TNullable<T> = T | undefined | null;
2
4
  export type AnyType = any;
3
5
  export type AnyObject = Record<string | symbol | number, any>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;AAEhD,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC;AAC1B,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAC;AAE9D,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,GAAG,EAAE,IAAI,CAAC,CAAC;AAEhD,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;AAC/C,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC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AAG,MAAM,GAAG,GAAG,CAAA;KAAE,GAClE,MAAM,GACN,CAAC,SAAS;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,IAAI,EAAE,SAAS,CAAC;QAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAA;KAAE,GACnE,OAAO,GACP,CAAC,SAAS;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,IAAI,EAAE,SAAS,CAAC;QAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAA;KAAE,GACnE,MAAM,EAAE,GACR,CAAC,SAAS;QACN,IAAI,EAAE,CAAC,CAAC;QACR,IAAI,EAAE,SAAS,CAAC;QAChB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;KAC/B,GACD,MAAM,EAAE,GACR,KAAK;CAClB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE;IAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,KAAK,CAAC,CAAC;AAExE,MAAM,WAAW,aAAa,CAAC,OAAO,SAAS,MAAM,GAAG,GAAG,EAAE,MAAM,GAAG,GAAG;IACvE,SAAS,CAAC,IAAI,CAAC,EAAE,OAAO,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;CACnD;AAED,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveClass = exports.resolveValueAsync = exports.resolveValue = void 0;
3
+ exports.resolveClass = exports.resolveValueAsync = exports.resolveValue = exports.isClass = void 0;
4
4
  const ignis_inversion_1 = require("@venizia/ignis-inversion");
5
+ Object.defineProperty(exports, "isClass", { enumerable: true, get: function () { return ignis_inversion_1.isClass; } });
5
6
  /** Resolves a value-or-resolver, returning class constructors as-is. */
6
7
  const resolveValue = (valueOrResolver) => {
7
8
  if (typeof valueOrResolver !== 'function') {
8
9
  return valueOrResolver;
9
10
  }
10
- if ((0, ignis_inversion_1.isClassConstructor)(valueOrResolver)) {
11
+ if ((0, ignis_inversion_1.isClass)(valueOrResolver)) {
11
12
  return valueOrResolver;
12
13
  }
13
14
  return valueOrResolver();
@@ -18,7 +19,7 @@ const resolveValueAsync = async (valueOrResolver) => {
18
19
  if (typeof valueOrResolver !== 'function') {
19
20
  return valueOrResolver;
20
21
  }
21
- if ((0, ignis_inversion_1.isClassConstructor)(valueOrResolver)) {
22
+ if ((0, ignis_inversion_1.isClass)(valueOrResolver)) {
22
23
  return valueOrResolver;
23
24
  }
24
25
  return valueOrResolver();
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":";;;AAAA,8DAA8D;AAkC9D,wEAAwE;AACjE,MAAM,YAAY,GAAG,CAAI,eAAoC,EAAK,EAAE;IACzE,IAAI,OAAO,eAAe,KAAK,UAAU,EAAE,CAAC;QAC1C,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,IAAI,IAAA,oCAAkB,EAAC,eAA2B,CAAC,EAAE,CAAC;QACpD,OAAO,eAAoB,CAAC;IAC9B,CAAC;IAED,OAAQ,eAAgC,EAAE,CAAC;AAC7C,CAAC,CAAC;AAVW,QAAA,YAAY,gBAUvB;AAEF,qCAAqC;AAC9B,MAAM,iBAAiB,GAAG,KAAK,EACpC,eAAyC,EAC7B,EAAE;IACd,IAAI,OAAO,eAAe,KAAK,UAAU,EAAE,CAAC;QAC1C,OAAO,eAAe,CAAC;IACzB,CAAC;IAED,IAAI,IAAA,oCAAkB,EAAC,eAA2B,CAAC,EAAE,CAAC;QACpD,OAAO,eAAoB,CAAC;IAC9B,CAAC;IAED,OAAQ,eAAqC,EAAE,CAAC;AAClD,CAAC,CAAC;AAZW,QAAA,iBAAiB,qBAY5B;AAEF,6EAA6E;AACtE,MAAM,YAAY,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+18,16 @@ export declare class CronHelper extends BaseHelper {
18
18
  instance: CronJob;
19
19
  constructor(opts: ICronHelperOptions);
20
20
  static newInstance(opts: ICronHelperOptions): CronHelper;
21
- configure(): void;
21
+ /** Builds the job. Synchronous, so the constructor still THROWS on a bad cronTime. */
22
+ protected buildInstance(): void;
23
+ /**
24
+ * Async because `CronJob.stop()` resolves only once an IN-FLIGHT tick has finished. Fire-and-
25
+ * forgetting it lets the replacement job start while the old handler is still running - the very
26
+ * double-fire this stop exists to prevent.
27
+ */
28
+ configure(): Promise<void>;
22
29
  start(): void;
30
+ stop(): Promise<void>;
23
31
  modifyCronTime(opts: {
24
32
  cronTime: string;
25
33
  shouldFireOnTick?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"cron.helper.d.ts","sourceRoot":"","sources":["../../../src/modules/cron/cron.helper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,qBAAqB,EAAY,MAAM,MAAM,CAAC;AAIhE,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,WAAW,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAAC;CAChD;AAED,qBAAa,UAAW,SAAQ,UAAU;IACxC,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAA6B;IAC3C,OAAO,CAAC,WAAW,CAAC,CAA+B;IACnD,OAAO,CAAC,SAAS,CAAU;IAC3B,OAAO,CAAC,EAAE,CAAC,CAAS;IACpB,OAAO,CAAC,YAAY,CAAC,CAAkC;IAEhD,QAAQ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