@venizia/ignis-helpers 0.4.7 → 0.4.8-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 (401) hide show
  1. package/README.md +2 -2
  2. package/dist/esm/common/constants/mime.js.map +1 -1
  3. package/dist/esm/common/redact.js.map +1 -1
  4. package/dist/esm/common/resolvers.js.map +1 -1
  5. package/dist/esm/modules/base.js.map +1 -1
  6. package/dist/esm/modules/cron/helper.js.map +1 -1
  7. package/dist/esm/modules/crypto/algorithms/aes.algorithm.js.map +1 -1
  8. package/dist/esm/modules/crypto/algorithms/aes.engine.js.map +1 -1
  9. package/dist/esm/modules/crypto/algorithms/base.algorithm.js.map +1 -1
  10. package/dist/esm/modules/crypto/algorithms/ecdh.algorithm.js.map +1 -1
  11. package/dist/esm/modules/crypto/algorithms/hash.algorithm.js.map +1 -1
  12. package/dist/esm/modules/crypto/algorithms/rsa.algorithm.js.map +1 -1
  13. package/dist/esm/modules/env/app-env.js.map +1 -1
  14. package/dist/esm/modules/logger/base/base.js.map +1 -1
  15. package/dist/esm/modules/logger/base/console.js.map +1 -1
  16. package/dist/esm/modules/logger/common/constants.js.map +1 -1
  17. package/dist/esm/modules/logger/common/debug-gate.js.map +1 -1
  18. package/dist/esm/modules/logger/factory.js.map +1 -1
  19. package/dist/esm/modules/logger/formatting/error-prettier.js.map +1 -1
  20. package/dist/esm/modules/logger/hf/flusher.js.map +1 -1
  21. package/dist/esm/modules/logger/hf/logger.js.map +1 -1
  22. package/dist/esm/modules/logger/hf/ring.js.map +1 -1
  23. package/dist/esm/modules/logger/pino/backing.js.map +1 -1
  24. package/dist/esm/modules/logger/pino/destination.js.map +1 -1
  25. package/dist/esm/modules/logger/pino/logger.js.map +1 -1
  26. package/dist/esm/modules/logger/winston/formats.js.map +1 -1
  27. package/dist/esm/modules/logger/winston/logger-factory.js.map +1 -1
  28. package/dist/esm/modules/logger/winston/logger.js.map +1 -1
  29. package/dist/esm/modules/logger/winston/transports/dgram.transport.js.map +1 -1
  30. package/dist/esm/modules/network/http-request/base-network-request.helper.js.map +1 -1
  31. package/dist/esm/modules/network/http-request/fetcher/axios-fetcher.js.map +1 -1
  32. package/dist/esm/modules/network/http-request/fetcher/base-fetcher.js.map +1 -1
  33. package/dist/esm/modules/network/http-request/fetcher/node-fetcher.js.map +1 -1
  34. package/dist/esm/modules/network/tcp-socket/base-tcp-client.helper.js.map +1 -1
  35. package/dist/esm/modules/network/tcp-socket/base-tcp-server.helper.js.map +1 -1
  36. package/dist/esm/modules/network/udp-socket/network-udp-client.helper.js.map +1 -1
  37. package/dist/esm/modules/network/utilities/query-string.js.map +1 -1
  38. package/dist/esm/modules/network/utilities/url-safety/ingest.js.map +1 -1
  39. package/dist/esm/modules/network/utilities/url-safety/policy.js.map +1 -1
  40. package/dist/esm/modules/pool/abstract.js.map +1 -1
  41. package/dist/esm/modules/queue/bullmq/helper.js.map +1 -1
  42. package/dist/esm/modules/queue/internal/hf/helper.js.map +1 -1
  43. package/dist/esm/modules/queue/internal/sequential/helper.js.map +1 -1
  44. package/dist/esm/modules/queue/kafka/base.js.map +1 -1
  45. package/dist/esm/modules/queue/kafka/consumer.js.map +1 -1
  46. package/dist/esm/modules/queue/mqtt/helper.js.map +1 -1
  47. package/dist/esm/modules/redis/base/abstract.helper.js.map +1 -1
  48. package/dist/esm/modules/redis/utility.js.map +1 -1
  49. package/dist/esm/modules/retry/helper.js.map +1 -1
  50. package/dist/esm/modules/secrets/base/abstract.helper.js.map +1 -1
  51. package/dist/esm/modules/secrets/dotenv/dotenv.helper.js.map +1 -1
  52. package/dist/esm/modules/secrets/factory.js.map +1 -1
  53. package/dist/esm/modules/secrets/hashicorp/hashicorp.helper.js.map +1 -1
  54. package/dist/esm/modules/secrets/system-envs/system-envs.helper.js.map +1 -1
  55. package/dist/esm/modules/socket/socket-io/client/browser-helper.js.map +1 -1
  56. package/dist/esm/modules/socket/socket-io/server/helper.js.map +1 -1
  57. package/dist/esm/modules/socket/websocket/server/delivery.js.map +1 -1
  58. package/dist/esm/modules/socket/websocket/server/helper.js.map +1 -1
  59. package/dist/esm/modules/storage/base.js.map +1 -1
  60. package/dist/esm/modules/storage/bun-s3/helper.js.map +1 -1
  61. package/dist/esm/modules/storage/bun-s3/utility.js.map +1 -1
  62. package/dist/esm/modules/storage/disk/helper.js.map +1 -1
  63. package/dist/esm/modules/temporal/abstract.js.map +1 -1
  64. package/dist/esm/modules/temporal/adapters/dayjs.js.map +1 -1
  65. package/dist/esm/modules/temporal/adapters/intl.js.map +1 -1
  66. package/dist/esm/modules/temporal/adapters/luxon.js.map +1 -1
  67. package/dist/esm/modules/temporal/adapters/native.js.map +1 -1
  68. package/dist/esm/modules/temporal/calendar/calendar.js.map +1 -1
  69. package/dist/esm/modules/temporal/common/types.js.map +1 -1
  70. package/dist/esm/modules/temporal/duration/duration.js.map +1 -1
  71. package/dist/esm/modules/temporal/helper.js.map +1 -1
  72. package/dist/esm/modules/temporal/locale/locale.js.map +1 -1
  73. package/dist/esm/modules/temporal/pattern/pattern.js.map +1 -1
  74. package/dist/esm/modules/temporal/pattern/tokens.js.map +1 -1
  75. package/dist/esm/modules/tree/builder.js.map +1 -1
  76. package/dist/esm/modules/uid/helper.js.map +1 -1
  77. package/dist/esm/modules/uid/opaque.js.map +1 -1
  78. package/dist/esm/modules/uid/uuid/helper.js.map +1 -1
  79. package/dist/esm/modules/uid/uuid/sha1.js.map +1 -1
  80. package/dist/esm/modules/uid/uuid/v4.js.map +1 -1
  81. package/dist/esm/modules/uid/uuid/v5.js.map +1 -1
  82. package/dist/esm/modules/uid/uuid/v7.js.map +1 -1
  83. package/dist/esm/modules/worker-thread/bus/base.js.map +1 -1
  84. package/dist/esm/modules/worker-thread/thread/base.js.map +1 -1
  85. package/dist/esm/modules/worker-thread/worker/base.js.map +1 -1
  86. package/dist/esm/modules/worker-thread/worker-pool.js.map +1 -1
  87. package/dist/esm/utilities/error.utility.js.map +1 -1
  88. package/dist/esm/utilities/form-body.utility.js.map +1 -1
  89. package/dist/esm/utilities/hr-time.utility.js.map +1 -1
  90. package/dist/esm/utilities/module.utility.js.map +1 -1
  91. package/dist/esm/utilities/parse.utility.js.map +1 -1
  92. package/dist/esm/utilities/performance.utility.js.map +1 -1
  93. package/dist/esm/utilities/promise.utility.js.map +1 -1
  94. package/dist/esm/utilities/request.utility.js.map +1 -1
  95. package/package.json +4 -4
  96. package/dist/esm/common/constants/app.d.ts.map +0 -1
  97. package/dist/esm/common/constants/duration.d.ts.map +0 -1
  98. package/dist/esm/common/constants/grpc.d.ts.map +0 -1
  99. package/dist/esm/common/constants/http.d.ts.map +0 -1
  100. package/dist/esm/common/constants/index.d.ts.map +0 -1
  101. package/dist/esm/common/constants/mime.d.ts.map +0 -1
  102. package/dist/esm/common/index.d.ts.map +0 -1
  103. package/dist/esm/common/jsx.d.ts.map +0 -1
  104. package/dist/esm/common/redact.d.ts.map +0 -1
  105. package/dist/esm/common/resolvers.d.ts.map +0 -1
  106. package/dist/esm/common/types/class.d.ts.map +0 -1
  107. package/dist/esm/common/types/const-value.d.ts.map +0 -1
  108. package/dist/esm/common/types/field-mapping.d.ts.map +0 -1
  109. package/dist/esm/common/types/index.d.ts.map +0 -1
  110. package/dist/esm/common/types/injection.d.ts.map +0 -1
  111. package/dist/esm/common/types/resolver.d.ts.map +0 -1
  112. package/dist/esm/common/types/utility.d.ts.map +0 -1
  113. package/dist/esm/core.d.ts.map +0 -1
  114. package/dist/esm/index.d.ts.map +0 -1
  115. package/dist/esm/modules/base.d.ts.map +0 -1
  116. package/dist/esm/modules/cron/helper.d.ts.map +0 -1
  117. package/dist/esm/modules/cron/index.d.ts.map +0 -1
  118. package/dist/esm/modules/crypto/algorithms/abstract.algorithm.d.ts.map +0 -1
  119. package/dist/esm/modules/crypto/algorithms/aes.algorithm.d.ts.map +0 -1
  120. package/dist/esm/modules/crypto/algorithms/aes.constants.d.ts.map +0 -1
  121. package/dist/esm/modules/crypto/algorithms/aes.engine.d.ts.map +0 -1
  122. package/dist/esm/modules/crypto/algorithms/base.algorithm.d.ts.map +0 -1
  123. package/dist/esm/modules/crypto/algorithms/credential.algorithm.d.ts.map +0 -1
  124. package/dist/esm/modules/crypto/algorithms/ecdh.algorithm.d.ts.map +0 -1
  125. package/dist/esm/modules/crypto/algorithms/hash.algorithm.d.ts.map +0 -1
  126. package/dist/esm/modules/crypto/algorithms/index.d.ts.map +0 -1
  127. package/dist/esm/modules/crypto/algorithms/rsa.algorithm.d.ts.map +0 -1
  128. package/dist/esm/modules/crypto/common/constants.d.ts.map +0 -1
  129. package/dist/esm/modules/crypto/common/index.d.ts.map +0 -1
  130. package/dist/esm/modules/crypto/common/types.d.ts.map +0 -1
  131. package/dist/esm/modules/crypto/index.d.ts.map +0 -1
  132. package/dist/esm/modules/env/app-env.d.ts.map +0 -1
  133. package/dist/esm/modules/env/common/index.d.ts.map +0 -1
  134. package/dist/esm/modules/env/common/types.d.ts.map +0 -1
  135. package/dist/esm/modules/env/index.d.ts.map +0 -1
  136. package/dist/esm/modules/env/names.d.ts.map +0 -1
  137. package/dist/esm/modules/error/index.d.ts.map +0 -1
  138. package/dist/esm/modules/index.d.ts.map +0 -1
  139. package/dist/esm/modules/logger/base/abstract.d.ts.map +0 -1
  140. package/dist/esm/modules/logger/base/base.d.ts.map +0 -1
  141. package/dist/esm/modules/logger/base/console.d.ts.map +0 -1
  142. package/dist/esm/modules/logger/base/index.d.ts.map +0 -1
  143. package/dist/esm/modules/logger/common/constants.d.ts.map +0 -1
  144. package/dist/esm/modules/logger/common/debug-gate.d.ts.map +0 -1
  145. package/dist/esm/modules/logger/common/index.d.ts.map +0 -1
  146. package/dist/esm/modules/logger/common/types.d.ts.map +0 -1
  147. package/dist/esm/modules/logger/factory.d.ts.map +0 -1
  148. package/dist/esm/modules/logger/formatting/deep-splat.d.ts.map +0 -1
  149. package/dist/esm/modules/logger/formatting/error-prettier.d.ts.map +0 -1
  150. package/dist/esm/modules/logger/formatting/index.d.ts.map +0 -1
  151. package/dist/esm/modules/logger/hf/common/constants.d.ts.map +0 -1
  152. package/dist/esm/modules/logger/hf/common/index.d.ts.map +0 -1
  153. package/dist/esm/modules/logger/hf/common/types.d.ts.map +0 -1
  154. package/dist/esm/modules/logger/hf/flusher.d.ts.map +0 -1
  155. package/dist/esm/modules/logger/hf/index.d.ts.map +0 -1
  156. package/dist/esm/modules/logger/hf/logger.d.ts.map +0 -1
  157. package/dist/esm/modules/logger/hf/ring.d.ts.map +0 -1
  158. package/dist/esm/modules/logger/index.d.ts.map +0 -1
  159. package/dist/esm/modules/logger/pino/backing.d.ts.map +0 -1
  160. package/dist/esm/modules/logger/pino/common/constants.d.ts.map +0 -1
  161. package/dist/esm/modules/logger/pino/common/index.d.ts.map +0 -1
  162. package/dist/esm/modules/logger/pino/common/types.d.ts.map +0 -1
  163. package/dist/esm/modules/logger/pino/destination.d.ts.map +0 -1
  164. package/dist/esm/modules/logger/pino/index.d.ts.map +0 -1
  165. package/dist/esm/modules/logger/pino/logger.d.ts.map +0 -1
  166. package/dist/esm/modules/logger/winston/common/constants.d.ts.map +0 -1
  167. package/dist/esm/modules/logger/winston/common/index.d.ts.map +0 -1
  168. package/dist/esm/modules/logger/winston/common/types.d.ts.map +0 -1
  169. package/dist/esm/modules/logger/winston/define.d.ts.map +0 -1
  170. package/dist/esm/modules/logger/winston/formats.d.ts.map +0 -1
  171. package/dist/esm/modules/logger/winston/index.d.ts.map +0 -1
  172. package/dist/esm/modules/logger/winston/logger-factory.d.ts.map +0 -1
  173. package/dist/esm/modules/logger/winston/logger.d.ts.map +0 -1
  174. package/dist/esm/modules/logger/winston/transports/dgram.transport.d.ts.map +0 -1
  175. package/dist/esm/modules/logger/winston/transports/index.d.ts.map +0 -1
  176. package/dist/esm/modules/network/http-request/base-network-request.helper.d.ts.map +0 -1
  177. package/dist/esm/modules/network/http-request/common/constants.d.ts.map +0 -1
  178. package/dist/esm/modules/network/http-request/common/index.d.ts.map +0 -1
  179. package/dist/esm/modules/network/http-request/fetcher/axios-fetcher.d.ts.map +0 -1
  180. package/dist/esm/modules/network/http-request/fetcher/base-fetcher.d.ts.map +0 -1
  181. package/dist/esm/modules/network/http-request/fetcher/common/index.d.ts.map +0 -1
  182. package/dist/esm/modules/network/http-request/fetcher/common/types.d.ts.map +0 -1
  183. package/dist/esm/modules/network/http-request/fetcher/index.d.ts.map +0 -1
  184. package/dist/esm/modules/network/http-request/fetcher/node-fetcher.d.ts.map +0 -1
  185. package/dist/esm/modules/network/http-request/index.d.ts.map +0 -1
  186. package/dist/esm/modules/network/index.d.ts.map +0 -1
  187. package/dist/esm/modules/network/tcp-socket/base-tcp-client.helper.d.ts.map +0 -1
  188. package/dist/esm/modules/network/tcp-socket/base-tcp-server.helper.d.ts.map +0 -1
  189. package/dist/esm/modules/network/tcp-socket/index.d.ts.map +0 -1
  190. package/dist/esm/modules/network/tcp-socket/network-tcp-client.helper.d.ts.map +0 -1
  191. package/dist/esm/modules/network/tcp-socket/network-tcp-server.helper.d.ts.map +0 -1
  192. package/dist/esm/modules/network/tcp-socket/network-tls-tcp-client.helper.d.ts.map +0 -1
  193. package/dist/esm/modules/network/tcp-socket/network-tls-tcp-server.helper.d.ts.map +0 -1
  194. package/dist/esm/modules/network/udp-socket/index.d.ts.map +0 -1
  195. package/dist/esm/modules/network/udp-socket/network-udp-client.helper.d.ts.map +0 -1
  196. package/dist/esm/modules/network/utilities/index.d.ts.map +0 -1
  197. package/dist/esm/modules/network/utilities/query-string.d.ts.map +0 -1
  198. package/dist/esm/modules/network/utilities/url-safety/common/constants.d.ts.map +0 -1
  199. package/dist/esm/modules/network/utilities/url-safety/common/errors.d.ts.map +0 -1
  200. package/dist/esm/modules/network/utilities/url-safety/common/index.d.ts.map +0 -1
  201. package/dist/esm/modules/network/utilities/url-safety/common/types.d.ts.map +0 -1
  202. package/dist/esm/modules/network/utilities/url-safety/index.d.ts.map +0 -1
  203. package/dist/esm/modules/network/utilities/url-safety/ingest.d.ts.map +0 -1
  204. package/dist/esm/modules/network/utilities/url-safety/policy.d.ts.map +0 -1
  205. package/dist/esm/modules/pool/abstract.d.ts.map +0 -1
  206. package/dist/esm/modules/pool/base.d.ts.map +0 -1
  207. package/dist/esm/modules/pool/common/index.d.ts.map +0 -1
  208. package/dist/esm/modules/pool/common/types.d.ts.map +0 -1
  209. package/dist/esm/modules/pool/index.d.ts.map +0 -1
  210. package/dist/esm/modules/queue/bullmq/helper.d.ts.map +0 -1
  211. package/dist/esm/modules/queue/bullmq/index.d.ts.map +0 -1
  212. package/dist/esm/modules/queue/common/constants.d.ts.map +0 -1
  213. package/dist/esm/modules/queue/common/hook.d.ts.map +0 -1
  214. package/dist/esm/modules/queue/common/index.d.ts.map +0 -1
  215. package/dist/esm/modules/queue/index.d.ts.map +0 -1
  216. package/dist/esm/modules/queue/internal/hf/common/index.d.ts.map +0 -1
  217. package/dist/esm/modules/queue/internal/hf/common/types.d.ts.map +0 -1
  218. package/dist/esm/modules/queue/internal/hf/helper.d.ts.map +0 -1
  219. package/dist/esm/modules/queue/internal/hf/index.d.ts.map +0 -1
  220. package/dist/esm/modules/queue/internal/index.d.ts.map +0 -1
  221. package/dist/esm/modules/queue/internal/sequential/common/index.d.ts.map +0 -1
  222. package/dist/esm/modules/queue/internal/sequential/common/types.d.ts.map +0 -1
  223. package/dist/esm/modules/queue/internal/sequential/helper.d.ts.map +0 -1
  224. package/dist/esm/modules/queue/internal/sequential/index.d.ts.map +0 -1
  225. package/dist/esm/modules/queue/kafka/admin.d.ts.map +0 -1
  226. package/dist/esm/modules/queue/kafka/base.d.ts.map +0 -1
  227. package/dist/esm/modules/queue/kafka/bundler/common/constants.d.ts.map +0 -1
  228. package/dist/esm/modules/queue/kafka/bundler/common/index.d.ts.map +0 -1
  229. package/dist/esm/modules/queue/kafka/bundler/index.d.ts.map +0 -1
  230. package/dist/esm/modules/queue/kafka/bundler/plugins.d.ts.map +0 -1
  231. package/dist/esm/modules/queue/kafka/common/constants.d.ts.map +0 -1
  232. package/dist/esm/modules/queue/kafka/common/index.d.ts.map +0 -1
  233. package/dist/esm/modules/queue/kafka/common/types/admin.d.ts.map +0 -1
  234. package/dist/esm/modules/queue/kafka/common/types/callbacks.d.ts.map +0 -1
  235. package/dist/esm/modules/queue/kafka/common/types/connection.d.ts.map +0 -1
  236. package/dist/esm/modules/queue/kafka/common/types/consumer.d.ts.map +0 -1
  237. package/dist/esm/modules/queue/kafka/common/types/index.d.ts.map +0 -1
  238. package/dist/esm/modules/queue/kafka/common/types/producer.d.ts.map +0 -1
  239. package/dist/esm/modules/queue/kafka/consumer.d.ts.map +0 -1
  240. package/dist/esm/modules/queue/kafka/index.d.ts.map +0 -1
  241. package/dist/esm/modules/queue/kafka/producer.d.ts.map +0 -1
  242. package/dist/esm/modules/queue/kafka/schema/index.d.ts.map +0 -1
  243. package/dist/esm/modules/queue/kafka/schema/registry.d.ts.map +0 -1
  244. package/dist/esm/modules/queue/mqtt/helper.d.ts.map +0 -1
  245. package/dist/esm/modules/queue/mqtt/index.d.ts.map +0 -1
  246. package/dist/esm/modules/redis/base/abstract.helper.d.ts.map +0 -1
  247. package/dist/esm/modules/redis/base/index.d.ts.map +0 -1
  248. package/dist/esm/modules/redis/cluster/cluster.helper.d.ts.map +0 -1
  249. package/dist/esm/modules/redis/cluster/index.d.ts.map +0 -1
  250. package/dist/esm/modules/redis/common/constants.d.ts.map +0 -1
  251. package/dist/esm/modules/redis/common/index.d.ts.map +0 -1
  252. package/dist/esm/modules/redis/common/interfaces.d.ts.map +0 -1
  253. package/dist/esm/modules/redis/common/types.d.ts.map +0 -1
  254. package/dist/esm/modules/redis/factory.d.ts.map +0 -1
  255. package/dist/esm/modules/redis/index.d.ts.map +0 -1
  256. package/dist/esm/modules/redis/sentinel/index.d.ts.map +0 -1
  257. package/dist/esm/modules/redis/sentinel/sentinel.helper.d.ts.map +0 -1
  258. package/dist/esm/modules/redis/single/index.d.ts.map +0 -1
  259. package/dist/esm/modules/redis/single/single.helper.d.ts.map +0 -1
  260. package/dist/esm/modules/redis/utility.d.ts.map +0 -1
  261. package/dist/esm/modules/retry/common/constants.d.ts.map +0 -1
  262. package/dist/esm/modules/retry/common/index.d.ts.map +0 -1
  263. package/dist/esm/modules/retry/common/types.d.ts.map +0 -1
  264. package/dist/esm/modules/retry/helper.d.ts.map +0 -1
  265. package/dist/esm/modules/retry/index.d.ts.map +0 -1
  266. package/dist/esm/modules/secrets/base/abstract.helper.d.ts.map +0 -1
  267. package/dist/esm/modules/secrets/base/index.d.ts.map +0 -1
  268. package/dist/esm/modules/secrets/common/constants.d.ts.map +0 -1
  269. package/dist/esm/modules/secrets/common/index.d.ts.map +0 -1
  270. package/dist/esm/modules/secrets/common/types/helper.d.ts.map +0 -1
  271. package/dist/esm/modules/secrets/common/types/index.d.ts.map +0 -1
  272. package/dist/esm/modules/secrets/common/types/lease.d.ts.map +0 -1
  273. package/dist/esm/modules/secrets/common/types/registration.d.ts.map +0 -1
  274. package/dist/esm/modules/secrets/common/types/timer.d.ts.map +0 -1
  275. package/dist/esm/modules/secrets/dotenv/dotenv.helper.d.ts.map +0 -1
  276. package/dist/esm/modules/secrets/dotenv/index.d.ts.map +0 -1
  277. package/dist/esm/modules/secrets/factory.d.ts.map +0 -1
  278. package/dist/esm/modules/secrets/hashicorp/auth.d.ts.map +0 -1
  279. package/dist/esm/modules/secrets/hashicorp/hashicorp.helper.d.ts.map +0 -1
  280. package/dist/esm/modules/secrets/hashicorp/index.d.ts.map +0 -1
  281. package/dist/esm/modules/secrets/index.d.ts.map +0 -1
  282. package/dist/esm/modules/secrets/system-envs/index.d.ts.map +0 -1
  283. package/dist/esm/modules/secrets/system-envs/system-envs.helper.d.ts.map +0 -1
  284. package/dist/esm/modules/slug/common/constants.d.ts.map +0 -1
  285. package/dist/esm/modules/slug/common/index.d.ts.map +0 -1
  286. package/dist/esm/modules/slug/helper.d.ts.map +0 -1
  287. package/dist/esm/modules/slug/index.d.ts.map +0 -1
  288. package/dist/esm/modules/socket/index.d.ts.map +0 -1
  289. package/dist/esm/modules/socket/socket-io/browser.d.ts.map +0 -1
  290. package/dist/esm/modules/socket/socket-io/client/browser-helper.d.ts.map +0 -1
  291. package/dist/esm/modules/socket/socket-io/client/helper.d.ts.map +0 -1
  292. package/dist/esm/modules/socket/socket-io/client/index.d.ts.map +0 -1
  293. package/dist/esm/modules/socket/socket-io/common/constants.d.ts.map +0 -1
  294. package/dist/esm/modules/socket/socket-io/common/index.d.ts.map +0 -1
  295. package/dist/esm/modules/socket/socket-io/common/types/client.d.ts.map +0 -1
  296. package/dist/esm/modules/socket/socket-io/common/types/hooks.d.ts.map +0 -1
  297. package/dist/esm/modules/socket/socket-io/common/types/index.d.ts.map +0 -1
  298. package/dist/esm/modules/socket/socket-io/common/types/server.d.ts.map +0 -1
  299. package/dist/esm/modules/socket/socket-io/index.d.ts.map +0 -1
  300. package/dist/esm/modules/socket/socket-io/server/helper.d.ts.map +0 -1
  301. package/dist/esm/modules/socket/socket-io/server/index.d.ts.map +0 -1
  302. package/dist/esm/modules/socket/websocket/common/constants.d.ts.map +0 -1
  303. package/dist/esm/modules/socket/websocket/common/index.d.ts.map +0 -1
  304. package/dist/esm/modules/socket/websocket/common/types/client.d.ts.map +0 -1
  305. package/dist/esm/modules/socket/websocket/common/types/hooks.d.ts.map +0 -1
  306. package/dist/esm/modules/socket/websocket/common/types/index.d.ts.map +0 -1
  307. package/dist/esm/modules/socket/websocket/common/types/message.d.ts.map +0 -1
  308. package/dist/esm/modules/socket/websocket/common/types/server.d.ts.map +0 -1
  309. package/dist/esm/modules/socket/websocket/emitter/helper.d.ts.map +0 -1
  310. package/dist/esm/modules/socket/websocket/emitter/index.d.ts.map +0 -1
  311. package/dist/esm/modules/socket/websocket/index.d.ts.map +0 -1
  312. package/dist/esm/modules/socket/websocket/server/delivery.d.ts.map +0 -1
  313. package/dist/esm/modules/socket/websocket/server/helper.d.ts.map +0 -1
  314. package/dist/esm/modules/socket/websocket/server/index.d.ts.map +0 -1
  315. package/dist/esm/modules/storage/base.d.ts.map +0 -1
  316. package/dist/esm/modules/storage/bun-s3/helper.d.ts.map +0 -1
  317. package/dist/esm/modules/storage/bun-s3/index.d.ts.map +0 -1
  318. package/dist/esm/modules/storage/bun-s3/utility.d.ts.map +0 -1
  319. package/dist/esm/modules/storage/common/constants.d.ts.map +0 -1
  320. package/dist/esm/modules/storage/common/errors.d.ts.map +0 -1
  321. package/dist/esm/modules/storage/common/index.d.ts.map +0 -1
  322. package/dist/esm/modules/storage/common/types.d.ts.map +0 -1
  323. package/dist/esm/modules/storage/common/utility.d.ts.map +0 -1
  324. package/dist/esm/modules/storage/disk/helper.d.ts.map +0 -1
  325. package/dist/esm/modules/storage/disk/index.d.ts.map +0 -1
  326. package/dist/esm/modules/storage/in-memory/helper.d.ts.map +0 -1
  327. package/dist/esm/modules/storage/in-memory/index.d.ts.map +0 -1
  328. package/dist/esm/modules/storage/index.d.ts.map +0 -1
  329. package/dist/esm/modules/temporal/abstract.d.ts.map +0 -1
  330. package/dist/esm/modules/temporal/adapters/dayjs.d.ts.map +0 -1
  331. package/dist/esm/modules/temporal/adapters/index.d.ts.map +0 -1
  332. package/dist/esm/modules/temporal/adapters/intl.d.ts.map +0 -1
  333. package/dist/esm/modules/temporal/adapters/luxon.d.ts.map +0 -1
  334. package/dist/esm/modules/temporal/adapters/native.d.ts.map +0 -1
  335. package/dist/esm/modules/temporal/calendar/calendar.d.ts.map +0 -1
  336. package/dist/esm/modules/temporal/calendar/index.d.ts.map +0 -1
  337. package/dist/esm/modules/temporal/common/constants.d.ts.map +0 -1
  338. package/dist/esm/modules/temporal/common/index.d.ts.map +0 -1
  339. package/dist/esm/modules/temporal/common/types.d.ts.map +0 -1
  340. package/dist/esm/modules/temporal/duration/duration.d.ts.map +0 -1
  341. package/dist/esm/modules/temporal/duration/index.d.ts.map +0 -1
  342. package/dist/esm/modules/temporal/helper.d.ts.map +0 -1
  343. package/dist/esm/modules/temporal/index.d.ts.map +0 -1
  344. package/dist/esm/modules/temporal/locale/index.d.ts.map +0 -1
  345. package/dist/esm/modules/temporal/locale/locale.d.ts.map +0 -1
  346. package/dist/esm/modules/temporal/pattern/common/constants.d.ts.map +0 -1
  347. package/dist/esm/modules/temporal/pattern/common/index.d.ts.map +0 -1
  348. package/dist/esm/modules/temporal/pattern/common/types.d.ts.map +0 -1
  349. package/dist/esm/modules/temporal/pattern/index.d.ts.map +0 -1
  350. package/dist/esm/modules/temporal/pattern/pattern.d.ts.map +0 -1
  351. package/dist/esm/modules/temporal/pattern/tokens.d.ts.map +0 -1
  352. package/dist/esm/modules/tree/builder.d.ts.map +0 -1
  353. package/dist/esm/modules/tree/common/index.d.ts.map +0 -1
  354. package/dist/esm/modules/tree/common/types.d.ts.map +0 -1
  355. package/dist/esm/modules/tree/index.d.ts.map +0 -1
  356. package/dist/esm/modules/tree/walk.d.ts.map +0 -1
  357. package/dist/esm/modules/uid/common/constants.d.ts.map +0 -1
  358. package/dist/esm/modules/uid/common/index.d.ts.map +0 -1
  359. package/dist/esm/modules/uid/common/types.d.ts.map +0 -1
  360. package/dist/esm/modules/uid/helper.d.ts.map +0 -1
  361. package/dist/esm/modules/uid/index.d.ts.map +0 -1
  362. package/dist/esm/modules/uid/opaque.d.ts.map +0 -1
  363. package/dist/esm/modules/uid/request-id.d.ts.map +0 -1
  364. package/dist/esm/modules/uid/uuid/common/constants.d.ts.map +0 -1
  365. package/dist/esm/modules/uid/uuid/common/index.d.ts.map +0 -1
  366. package/dist/esm/modules/uid/uuid/common/types.d.ts.map +0 -1
  367. package/dist/esm/modules/uid/uuid/helper.d.ts.map +0 -1
  368. package/dist/esm/modules/uid/uuid/index.d.ts.map +0 -1
  369. package/dist/esm/modules/uid/uuid/sha1.d.ts.map +0 -1
  370. package/dist/esm/modules/uid/uuid/v4.d.ts.map +0 -1
  371. package/dist/esm/modules/uid/uuid/v5.d.ts.map +0 -1
  372. package/dist/esm/modules/uid/uuid/v7.d.ts.map +0 -1
  373. package/dist/esm/modules/worker-thread/bus/abstract.d.ts.map +0 -1
  374. package/dist/esm/modules/worker-thread/bus/base.d.ts.map +0 -1
  375. package/dist/esm/modules/worker-thread/bus/handler/abstract.d.ts.map +0 -1
  376. package/dist/esm/modules/worker-thread/bus/handler/base.d.ts.map +0 -1
  377. package/dist/esm/modules/worker-thread/bus/handler/index.d.ts.map +0 -1
  378. package/dist/esm/modules/worker-thread/bus/index.d.ts.map +0 -1
  379. package/dist/esm/modules/worker-thread/common/index.d.ts.map +0 -1
  380. package/dist/esm/modules/worker-thread/common/types.d.ts.map +0 -1
  381. package/dist/esm/modules/worker-thread/index.d.ts.map +0 -1
  382. package/dist/esm/modules/worker-thread/thread/abstract.d.ts.map +0 -1
  383. package/dist/esm/modules/worker-thread/thread/base.d.ts.map +0 -1
  384. package/dist/esm/modules/worker-thread/thread/index.d.ts.map +0 -1
  385. package/dist/esm/modules/worker-thread/worker/abstract.d.ts.map +0 -1
  386. package/dist/esm/modules/worker-thread/worker/base.d.ts.map +0 -1
  387. package/dist/esm/modules/worker-thread/worker/index.d.ts.map +0 -1
  388. package/dist/esm/modules/worker-thread/worker-pool.d.ts.map +0 -1
  389. package/dist/esm/temporal.d.ts.map +0 -1
  390. package/dist/esm/utilities/build-info.utility.d.ts.map +0 -1
  391. package/dist/esm/utilities/error.utility.d.ts.map +0 -1
  392. package/dist/esm/utilities/form-body.utility.d.ts.map +0 -1
  393. package/dist/esm/utilities/hr-time.utility.d.ts.map +0 -1
  394. package/dist/esm/utilities/index.d.ts.map +0 -1
  395. package/dist/esm/utilities/module.utility.d.ts.map +0 -1
  396. package/dist/esm/utilities/parse.utility.d.ts.map +0 -1
  397. package/dist/esm/utilities/performance.utility.d.ts.map +0 -1
  398. package/dist/esm/utilities/project-root.utility.d.ts.map +0 -1
  399. package/dist/esm/utilities/promise.utility.d.ts.map +0 -1
  400. package/dist/esm/utilities/request.utility.d.ts.map +0 -1
  401. package/dist/esm/uuid.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceR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B,IAAI,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,kCAAkC,EAAE,GAAG,CAAC,CAAC;YACzF,OAAO;QACT,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED,YAAY,CAAS,IAAqB;QACxC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAChC,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,MAAM,QAAQ,CAAC;gBACb,OAAO,EAAE,8CAA8C,IAAI,CAAC,GAAG,EAAE;aAClE,CAAC,CAAC;QACL,CAAC;QAED,OAAO,EAAwB,CAAC;IAClC,CAAC;CACF","sourcesContent":["import { getError } from '@/modules/error';\nimport { isMainThread } from 'node:worker_threads';\nimport { type IWorkerBus } from '../common';\nimport { AbstractWorkerThreadHelper } from './abstract';\n\nexport class BaseWorkerThreadHelper extends AbstractWorkerThreadHelper {\n constructor(opts: { scope: string }) {\n const { scope } = opts;\n super({ scope, identifier: scope });\n\n if (isMainThread) {\n throw getError({\n message: '[BaseWorker] Cannot start worker in MAIN_THREAD',\n });\n }\n\n this.buses = Object.create(null);\n }\n\n bindWorkerBus<IC, IP>(opts: { key: string; bus: IWorkerBus<IC, IP> }) {\n if (!this.buses) {\n this.buses = Object.create(null);\n }\n\n const { key, bus } = opts;\n if (this.buses[key]) {\n this.logger.for(this.bindWorkerBus.name).warn('Worker Bus existed | key: %s', key);\n return;\n }\n\n this.buses[key] = bus;\n }\n\n unbindWorkerBus(opts: { key: string }) {\n if (!this.buses) {\n return;\n }\n\n const { key } = opts;\n if (!(key in this.buses)) {\n this.logger.for(this.unbindWorkerBus.name).warn('Worker Bus not existed | key: %s', key);\n return;\n }\n\n this.buses[key]?.port?.removeAllListeners();\n delete this.buses[key];\n }\n\n getWorkerBus<IC, IP>(opts: { key: string }) {\n const rs = this.buses[opts.key];\n if (!rs) {\n throw getError({\n message: `[getWorkerBus] Not found worker bus | key: ${opts.key}`,\n });\n }\n\n return rs as IWorkerBus<IC, IP>;\n }\n}\n"]}
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../src/modules/worker-thread/thread/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAEnD,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAExD,MAAM,OAAO,sBAAuB,SAAQ,0BAA0B;IACpE,YAAY,IAAuB;QACjC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QACvB,KAAK,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;QAEpC,IAAI,YAAY,EAAE,CAAC;YACjB,MAAM,QAAQ,CAAC;gBACb,OAAO,EAAE,iDAAiD;aAC3D,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,aAAa,CAAS,IAA8C;QAClE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;QAED,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAE1B,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YACpB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,8BAA8B,EAAE,GAAG,CAAC,CAAC;YAEnF,OAAO;QACT,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;IACxB,CAAC;IAED,eAAe,CAAC,IAAqB;QACnC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YAChB,OAAO;QACT,CAAC;QAED,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACzB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,kCAAkC,EAAE,GAAG,CAAC,CAAC;YAEzF,OAAO;QACT,CAAC;QAED,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAC;QAC5C,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAED,YAAY,CAAS,IAAqB;QACxC,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEhC,IAAI,CAAC,EAAE,EAAE,CAAC;YACR,MAAM,QAAQ,CAAC;gBACb,OAAO,EAAE,8CAA8C,IAAI,CAAC,GAAG,EAAE;aAClE,CAAC,CAAC;QACL,CAAC;QAED,OAAO,EAAwB,CAAC;IAClC,CAAC;CACF","sourcesContent":["import { getError } from '@/modules/error';\nimport { isMainThread } from 'node:worker_threads';\nimport { type IWorkerBus } from '../common';\nimport { AbstractWorkerThreadHelper } from './abstract';\n\nexport class BaseWorkerThreadHelper extends AbstractWorkerThreadHelper {\n constructor(opts: { scope: string }) {\n const { scope } = opts;\n super({ scope, identifier: scope });\n\n if (isMainThread) {\n throw getError({\n message: '[BaseWorker] Cannot start worker in MAIN_THREAD',\n });\n }\n\n this.buses = Object.create(null);\n }\n\n bindWorkerBus<IC, IP>(opts: { key: string; bus: IWorkerBus<IC, IP> }) {\n if (!this.buses) {\n this.buses = Object.create(null);\n }\n\n const { key, bus } = opts;\n\n if (this.buses[key]) {\n this.logger.for(this.bindWorkerBus.name).warn('Worker Bus existed | key: %s', key);\n\n return;\n }\n\n this.buses[key] = bus;\n }\n\n unbindWorkerBus(opts: { key: string }) {\n if (!this.buses) {\n return;\n }\n\n const { key } = opts;\n\n if (!(key in this.buses)) {\n this.logger.for(this.unbindWorkerBus.name).warn('Worker Bus not existed | key: %s', key);\n\n return;\n }\n\n this.buses[key]?.port?.removeAllListeners();\n delete this.buses[key];\n }\n\n getWorkerBus<IC, IP>(opts: { key: string }) {\n const rs = this.buses[opts.key];\n\n if (!rs) {\n throw getError({\n message: `[getWorkerBus] Not found worker bus | key: ${opts.key}`,\n });\n }\n\n return rs as IWorkerBus<IC, IP>;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../src/modules/worker-thread/worker/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAsB,MAAM,qBAAqB,CAAC;AAGjE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,OAAO,gBAA8B,SAAQ,oBAAiC;IAKlF,YAAY,IAQX;QACC,KAAK,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,aAAa,GAA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EAAE,KAAK,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;aAC1E,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE;YACpC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAC9F,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE;YACvC,IAAI,CAAC,UAAU,CAAC;gBACd,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;gBACxB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,CAAC;aAChD,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { ErrorUtility } from '@/utilities/error.utility';\nimport { PromiseUtility } from '@/utilities/promise.utility';\nimport { Worker, type WorkerOptions } from 'node:worker_threads';\n\nimport { type ValueOrPromise } from '@/common/types';\nimport { getError } from '@/modules/error';\nimport { type IWorker } from '../common';\nimport { AbstractWorkerHelper } from './abstract';\n\nexport class BaseWorkerHelper<MessageType> extends AbstractWorkerHelper<MessageType> {\n protected eventHandlers?: Partial<\n Pick<IWorker<MessageType>, 'onOnline' | 'onExit' | 'onError' | 'onMessage' | 'onMessageError'>\n >;\n\n constructor(opts: {\n scope?: string;\n identifier: string;\n path: string | URL;\n options: WorkerOptions;\n eventHandlers?: Partial<\n Pick<IWorker<MessageType>, 'onOnline' | 'onExit' | 'onError' | 'onMessage' | 'onMessageError'>\n >;\n }) {\n super({ scope: BaseWorkerHelper.name, identifier: opts.identifier });\n this.worker = new Worker(opts.path, opts.options);\n this.eventHandlers = opts.eventHandlers;\n\n this.binding();\n }\n\n /** User handlers run inside worker listeners; a sync throw there is uncaught and kills the process, so wrap it - voidExecution alone can't catch a throw evaluated before it's called. */\n protected invokeHook(opts: { scope: string; execution: () => ValueOrPromise<void> }) {\n const { scope, execution } = opts;\n\n try {\n PromiseUtility.voidExecution({ logger: this.logger, scope, execution: execution() });\n } catch (error) {\n this.logger.for(scope).error('Hook execution FAILED | Error: %s', error);\n }\n }\n\n override onOnline(): ValueOrPromise<void> {\n if (this.eventHandlers?.onOnline) {\n this.invokeHook({\n scope: this.onOnline.name,\n execution: () => this.eventHandlers?.onOnline?.(),\n });\n return;\n }\n\n this.logger.for(this.onOnline.name).info('Worker ONLINE');\n }\n\n override onExit(opts: { code: string | number }): ValueOrPromise<void> {\n if (this.eventHandlers?.onExit) {\n this.invokeHook({\n scope: this.onExit.name,\n execution: () => this.eventHandlers?.onExit?.({ code: opts.code }),\n });\n return;\n }\n\n this.logger.for(this.onExit.name).warn('Worker EXIT | Code: %s', opts.code);\n }\n\n override onError(opts: { error: Error }): ValueOrPromise<void> {\n if (this.eventHandlers?.onError) {\n this.invokeHook({\n scope: this.onError.name,\n execution: () => this.eventHandlers?.onError?.({ error: opts.error }),\n });\n return;\n }\n\n this.logger.for(this.onError.name).error('Worker ERROR | Error: %s', opts.error);\n }\n\n override onMessage(opts: { message: MessageType }): ValueOrPromise<void> {\n if (this.eventHandlers?.onMessage) {\n this.invokeHook({\n scope: this.onMessage.name,\n execution: () => this.eventHandlers?.onMessage?.({ message: opts.message }),\n });\n return;\n }\n\n this.logger.for(this.onMessage.name).error('Worker MESSAGE | message: %j', opts.message);\n }\n\n override onMessageError(opts: { error: Error }): ValueOrPromise<void> {\n if (this.eventHandlers?.onMessageError) {\n this.invokeHook({\n scope: this.onMessageError.name,\n execution: () => this.eventHandlers?.onMessageError?.({ error: opts.error }),\n });\n return;\n }\n\n this.logger.for(this.onMessageError.name).error('Worker MESSAGE_ERROR | Error: %s', opts.error);\n }\n\n binding() {\n if (!this.worker) {\n throw getError({ message: '[binding] Invalid worker instance to bind event handlers' });\n }\n\n this.worker.on('online', () => {\n this.invokeHook({ scope: this.binding.name, execution: () => this.onOnline() });\n });\n\n this.worker.on('exit', (code) => {\n this.invokeHook({ scope: this.binding.name, execution: () => this.onExit({ code }) });\n });\n\n this.worker.on('error', (error) => {\n this.invokeHook({\n scope: this.binding.name,\n execution: () => this.onError({ error: ErrorUtility.toError({ error }) }),\n });\n });\n\n this.worker.on('message', (message) => {\n this.invokeHook({ scope: this.binding.name, execution: () => this.onMessage({ message }) });\n });\n\n this.worker.on('messageerror', (error) => {\n this.invokeHook({\n scope: this.binding.name,\n execution: () => this.onMessageError({ error }),\n });\n });\n }\n}\n"]}
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../../../../src/modules/worker-thread/worker/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAsB,MAAM,qBAAqB,CAAC;AAGjE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,OAAO,gBAA8B,SAAQ,oBAAiC;IAKlF,YAAY,IAQX;QACC,KAAK,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;QACrE,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QAClD,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC;QAExC,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAED,0LAA0L;IAChL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AAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE;YACpC,IAAI,CAAC,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;QAC9F,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE;YACvC,IAAI,CAAC,UAAU,CAAC;gBACd,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;gBACxB,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,CAAC;aAChD,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { ErrorUtility } from '@/utilities/error.utility';\nimport { PromiseUtility } from '@/utilities/promise.utility';\nimport { Worker, type WorkerOptions } from 'node:worker_threads';\n\nimport { type ValueOrPromise } from '@/common/types';\nimport { getError } from '@/modules/error';\nimport { type IWorker } from '../common';\nimport { AbstractWorkerHelper } from './abstract';\n\nexport class BaseWorkerHelper<MessageType> extends AbstractWorkerHelper<MessageType> {\n protected eventHandlers?: Partial<\n Pick<IWorker<MessageType>, 'onOnline' | 'onExit' | 'onError' | 'onMessage' | 'onMessageError'>\n >;\n\n constructor(opts: {\n scope?: string;\n identifier: string;\n path: string | URL;\n options: WorkerOptions;\n eventHandlers?: Partial<\n Pick<IWorker<MessageType>, 'onOnline' | 'onExit' | 'onError' | 'onMessage' | 'onMessageError'>\n >;\n }) {\n super({ scope: BaseWorkerHelper.name, identifier: opts.identifier });\n this.worker = new Worker(opts.path, opts.options);\n this.eventHandlers = opts.eventHandlers;\n\n this.binding();\n }\n\n /** User handlers run inside worker listeners; a sync throw there is uncaught and kills the process, so wrap it - voidExecution alone can't catch a throw evaluated before it's called. */\n protected invokeHook(opts: { scope: string; execution: () => ValueOrPromise<void> }) {\n const { scope, execution } = opts;\n\n try {\n PromiseUtility.voidExecution({ logger: this.logger, scope, execution: execution() });\n } catch (error) {\n this.logger.for(scope).error('Hook execution FAILED | Error: %s', error);\n }\n }\n\n override onOnline(): ValueOrPromise<void> {\n if (this.eventHandlers?.onOnline) {\n this.invokeHook({\n scope: this.onOnline.name,\n execution: () => this.eventHandlers?.onOnline?.(),\n });\n\n return;\n }\n\n this.logger.for(this.onOnline.name).info('Worker ONLINE');\n }\n\n override onExit(opts: { code: string | number }): ValueOrPromise<void> {\n if (this.eventHandlers?.onExit) {\n this.invokeHook({\n scope: this.onExit.name,\n execution: () => this.eventHandlers?.onExit?.({ code: opts.code }),\n });\n\n return;\n }\n\n this.logger.for(this.onExit.name).warn('Worker EXIT | Code: %s', opts.code);\n }\n\n override onError(opts: { error: Error }): ValueOrPromise<void> {\n if (this.eventHandlers?.onError) {\n this.invokeHook({\n scope: this.onError.name,\n execution: () => this.eventHandlers?.onError?.({ error: opts.error }),\n });\n\n return;\n }\n\n this.logger.for(this.onError.name).error('Worker ERROR | Error: %s', opts.error);\n }\n\n override onMessage(opts: { message: MessageType }): ValueOrPromise<void> {\n if (this.eventHandlers?.onMessage) {\n this.invokeHook({\n scope: this.onMessage.name,\n execution: () => this.eventHandlers?.onMessage?.({ message: opts.message }),\n });\n\n return;\n }\n\n this.logger.for(this.onMessage.name).error('Worker MESSAGE | message: %j', opts.message);\n }\n\n override onMessageError(opts: { error: Error }): ValueOrPromise<void> {\n if (this.eventHandlers?.onMessageError) {\n this.invokeHook({\n scope: this.onMessageError.name,\n execution: () => this.eventHandlers?.onMessageError?.({ error: opts.error }),\n });\n\n return;\n }\n\n this.logger.for(this.onMessageError.name).error('Worker MESSAGE_ERROR | Error: %s', opts.error);\n }\n\n binding() {\n if (!this.worker) {\n throw getError({ message: '[binding] Invalid worker instance to bind event handlers' });\n }\n\n this.worker.on('online', () => {\n this.invokeHook({ scope: this.binding.name, execution: () => this.onOnline() });\n });\n\n this.worker.on('exit', (code) => {\n this.invokeHook({ scope: this.binding.name, execution: () => this.onExit({ code }) });\n });\n\n this.worker.on('error', (error) => {\n this.invokeHook({\n scope: this.binding.name,\n execution: () => this.onError({ error: ErrorUtility.toError({ error }) }),\n });\n });\n\n this.worker.on('message', (message) => {\n this.invokeHook({ scope: this.binding.name, execution: () => this.onMessage({ message }) });\n });\n\n this.worker.on('messageerror', (error) => {\n this.invokeHook({\n scope: this.binding.name,\n execution: () => this.onMessageError({ error }),\n });\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"worker-pool.js","sourceRoot":"","sources":["../../../../src/modules/worker-thread/worker-pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,SAAS,CAAC;AAGzB,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAO9C,YAAY,IAAqC;QAC/C,KAAK,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC;QAE5B,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,gBAAgB,GAAG,IAAI,EAAE,gBAAgB,IAAI,KAAK,CAAC;IAC1D,CAAC;IAED,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YAC/B,gBAAgB,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,C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,MAAM;aACR,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;aACvB,IAAI,CAAC,uDAAuD,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QAE1F,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAqB;QACpC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;QAErB,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;YACvB,IAAI,CAAC,MAAM;iBACR,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;iBACzB,IAAI,CAAC,uDAAuD,EAAE,GAAG,CAAC,CAAC;YACtE,OAAO;QACT,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QAErC,gKAAgK;QAChK,IAAI,CAAC;YACH,MAAM,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QACxC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM;iBACR,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;iBACzB,KAAK,CAAC,kDAAkD,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3E,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM;aACR,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;aACzB,IAAI,CAAC,yDAAyD,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC9F,CAAC;CACF","sourcesContent":["import { BaseHelper } from '@/modules/base';\nimport { getError } from '@/modules/error';\nimport os from 'node:os';\nimport { type IWorker } from './common';\n\nexport class WorkerPoolHelper extends BaseHelper {\n private static instance: WorkerPoolHelper;\n protected registry: Map<string | symbol, IWorker<any>>;\n\n private numberOfCPUs: number;\n private ignoreMaxWarning: boolean;\n\n constructor(opts?: { ignoreMaxWarning?: boolean }) {\n super({ scope: WorkerPoolHelper.name });\n this.registry = new Map([]);\n\n const cpus = os.cpus();\n this.numberOfCPUs = cpus.length;\n this.ignoreMaxWarning = opts?.ignoreMaxWarning ?? false;\n }\n\n static getInstance(): WorkerPoolHelper {\n if (!WorkerPoolHelper.instance) {\n WorkerPoolHelper.instance = new WorkerPoolHelper({ ignoreMaxWarning: false });\n }\n\n return WorkerPoolHelper.instance;\n }\n\n size() {\n return this.registry.size;\n }\n\n get<MessageType>(opts: { key: string }) {\n return this.registry.get(opts.key) as IWorker<MessageType> | undefined;\n }\n\n has(opts: { key: string }) {\n return this.registry.has(opts.key);\n }\n\n register<MessageType>(opts: { key: string; worker: IWorker<MessageType> }) {\n if (!this.registry) {\n throw getError({\n message:\n '[register] Invalid worker registry instance | please init registry before register new worker!',\n });\n }\n\n if (this.registry.size >= this.numberOfCPUs && !this.ignoreMaxWarning) {\n this.logger\n .for(this.register.name)\n .warn(\n 'SKIP register worker | Pool size reached maximum number of cores | CPUs: %s | ignoreMaxWarning: %s',\n this.numberOfCPUs,\n this.ignoreMaxWarning,\n );\n return false;\n }\n\n const { key, worker } = opts;\n if (this.registry.has(key)) {\n this.logger\n .for(this.register.name)\n .error('SKIP register worker | Worker key existed in pool | key: %s', key);\n return false;\n }\n\n this.registry.set(key, worker);\n this.logger\n .for(this.register.name)\n .info('Successfully register worker | key: %s | poolSize: %s', key, this.registry.size);\n\n return true;\n }\n\n async unregister(opts: { key: string }) {\n const { key } = opts;\n\n if (!this.has({ key })) {\n this.logger\n .for(this.unregister.name)\n .warn('SKIP unregister worker | Worker not existed | key: %s', key);\n return;\n }\n\n const registered = this.get({ key });\n\n // The registry entry must go even if the thread refuses to die, otherwise the key is unusable forever and the pool never drops back below its max-workers bound\n try {\n await registered?.worker?.terminate();\n } catch (error) {\n this.logger\n .for(this.unregister.name)\n .error('Failed to terminate worker | key: %s | error: %s', key, error);\n }\n\n this.registry.delete(key);\n this.logger\n .for(this.unregister.name)\n .info('Successfully unregister worker | key: %s | poolSize: %s', key, this.registry.size);\n }\n}\n"]}
1
+ {"version":3,"file":"worker-pool.js","sourceRoot":"","sources":["../../../../src/modules/worker-thread/worker-pool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,SAAS,CAAC;AAGzB,MAAM,OAAO,gBAAiB,SAAQ,UAAU;IAO9C,YAAY,IAAqC;QAC/C,KAAK,CAAC,EAAE,KAAK,EAAE,gBAAgB,CAAC,IAAI,EAAE,CAAC,CAAC;QACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,GAAG,CAAC,EAAE,CAAC,CAAC;QAE5B,MAAM,IAAI,GAAG,EAAE,CAAC,IAAI,EAAE,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC;QAChC,IAAI,CAAC,gBAAgB,GAAG,IAAI,EAAE,gBAAgB,IAAI,KAAK,CAAC;IAC1D,CAAC;IAED,MAAM,CAAC,WAAW;QAChB,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YAC/B,gBAAgB,CAAC,QAAQ,GAAG,IAAI,gBAAgB,CAAC,EAAE,gBAAgB,EAAE,KAAK,EAAE,CAAC,CAAC;QAChF,CAAC;QAED,OAAO,gBAAgB,CAAC,QAAQ,CAAC;IACnC,CAAC;IAED,IAAI;QACF,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC5B,CAAC;IAED,GAAG,CAAc,IAAqB;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAqC,CAAC;IACzE,CAAC;IAED,GAAG,CAAC,IAAqB;Q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,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;YACvB,IAAI,CAAC,MAAM;iBACR,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;iBACzB,IAAI,CAAC,uDAAuD,EAAE,GAAG,CAAC,CAAC;YAEtE,OAAO;QACT,CAAC;QAED,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC;QAErC,gKAAgK;QAChK,IAAI,CAAC;YACH,MAAM,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;QACxC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,MAAM;iBACR,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;iBACzB,KAAK,CAAC,kDAAkD,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;QAC3E,CAAC;QAED,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAC1B,IAAI,CAAC,MAAM;aACR,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;aACzB,IAAI,CAAC,yDAAyD,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC9F,CAAC;CACF","sourcesContent":["import { BaseHelper } from '@/modules/base';\nimport { getError } from '@/modules/error';\nimport os from 'node:os';\nimport { type IWorker } from './common';\n\nexport class WorkerPoolHelper extends BaseHelper {\n private static instance: WorkerPoolHelper;\n protected registry: Map<string | symbol, IWorker<any>>;\n\n private numberOfCPUs: number;\n private ignoreMaxWarning: boolean;\n\n constructor(opts?: { ignoreMaxWarning?: boolean }) {\n super({ scope: WorkerPoolHelper.name });\n this.registry = new Map([]);\n\n const cpus = os.cpus();\n this.numberOfCPUs = cpus.length;\n this.ignoreMaxWarning = opts?.ignoreMaxWarning ?? false;\n }\n\n static getInstance(): WorkerPoolHelper {\n if (!WorkerPoolHelper.instance) {\n WorkerPoolHelper.instance = new WorkerPoolHelper({ ignoreMaxWarning: false });\n }\n\n return WorkerPoolHelper.instance;\n }\n\n size() {\n return this.registry.size;\n }\n\n get<MessageType>(opts: { key: string }) {\n return this.registry.get(opts.key) as IWorker<MessageType> | undefined;\n }\n\n has(opts: { key: string }) {\n return this.registry.has(opts.key);\n }\n\n register<MessageType>(opts: { key: string; worker: IWorker<MessageType> }) {\n if (!this.registry) {\n throw getError({\n message:\n '[register] Invalid worker registry instance | please init registry before register new worker!',\n });\n }\n\n if (this.registry.size >= this.numberOfCPUs && !this.ignoreMaxWarning) {\n this.logger\n .for(this.register.name)\n .warn(\n 'SKIP register worker | Pool size reached maximum number of cores | CPUs: %s | ignoreMaxWarning: %s',\n this.numberOfCPUs,\n this.ignoreMaxWarning,\n );\n\n return false;\n }\n\n const { key, worker } = opts;\n\n if (this.registry.has(key)) {\n this.logger\n .for(this.register.name)\n .error('SKIP register worker | Worker key existed in pool | key: %s', key);\n\n return false;\n }\n\n this.registry.set(key, worker);\n this.logger\n .for(this.register.name)\n .info('Successfully register worker | key: %s | poolSize: %s', key, this.registry.size);\n\n return true;\n }\n\n async unregister(opts: { key: string }) {\n const { key } = opts;\n\n if (!this.has({ key })) {\n this.logger\n .for(this.unregister.name)\n .warn('SKIP unregister worker | Worker not existed | key: %s', key);\n\n return;\n }\n\n const registered = this.get({ key });\n\n // The registry entry must go even if the thread refuses to die, otherwise the key is unusable forever and the pool never drops back below its max-workers bound\n try {\n await registered?.worker?.terminate();\n } catch (error) {\n this.logger\n .for(this.unregister.name)\n .error('Failed to terminate worker | key: %s | error: %s', key, error);\n }\n\n this.registry.delete(key);\n this.logger\n .for(this.unregister.name)\n .info('Successfully unregister worker | key: %s | poolSize: %s', key, this.registry.size);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"error.utility.js","sourceRoot":"","sources":["../../../src/utilities/error.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,OAAO,YAAY;IACvB,0GAA0G;IAC1G,MAAM,CAAC,OAAO,CAAC,IAAwB;QACrC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QACvB,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF","sourcesContent":["import { getError } from '@/modules/error';\n\nexport class ErrorUtility {\n /** Normalize an unknown thrown value into an Error instance - an ApplicationError when it was not one. */\n static toError(opts: { error: unknown }): Error {\n const { error } = opts;\n return error instanceof Error ? error : getError({ message: String(error) });\n }\n}\n"]}
1
+ {"version":3,"file":"error.utility.js","sourceRoot":"","sources":["../../../src/utilities/error.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,OAAO,YAAY;IACvB,0GAA0G;IAC1G,MAAM,CAAC,OAAO,CAAC,IAAwB;QACrC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;QAEvB,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF","sourcesContent":["import { getError } from '@/modules/error';\n\nexport class ErrorUtility {\n /** Normalize an unknown thrown value into an Error instance - an ApplicationError when it was not one. */\n static toError(opts: { error: unknown }): Error {\n const { error } = opts;\n\n return error instanceof Error ? error : getError({ message: String(error) });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"form-body.utility.js","sourceRoot":"","sources":["../../../src/utilities/form-body.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAyB,MAAM,iBAAiB,CAAC;AAE/E,yHAAyH;AACzH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,cAAc,EAAE;QACd,OAAO,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,IAAI,EAAE,6BAA6B,EAAE;QAChF,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU;QAC5C,QAAQ,EAAE,WAAW,CAAC,UAAU;KACjC;CACkD,CAAC;AAEtD,MAAM,OAAO,eAAe;IAC1B;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,IAEzB;QACC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;YACzC,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,QAAQ,CAAC;gBACb,KAAK,EAAE,iBAAiB,CAAC,cAAc;gBACvC,OAAO,EAAE,wBAAwB;gBACjC,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF","sourcesContent":["import { HTTP } from '@/common/constants';\nimport { ErrorScopes, getError, type TErrorDefinition } from '@/modules/error';\n\n/** The one definition of a body the runtime cannot parse; the kernel's `RequestErrors.BODY_MALFORMED` is this object. */\nexport const RequestBodyErrors = {\n BODY_MALFORMED: {\n message: { text: 'Malformed body payload', code: 'core.request.body_malformed' },\n statusCode: HTTP.ResultCodes.RS_4.BadRequest,\n category: ErrorScopes.VALIDATION,\n },\n} as const satisfies Record<string, TErrorDefinition>;\n\nexport class FormBodyUtility {\n /**\n * Reads a form body through the request's own cache, so every later reader gets the same\n * `FormData`. A body the runtime cannot parse is the caller's fault: it becomes a 400 here, where\n * the runtime's own error would be a 500 - Bun's carries only a code, Node's carries nothing.\n */\n static async readFormBody(opts: {\n req: { formData: () => Promise<FormData> };\n }): Promise<FormData> {\n try {\n const result = await opts.req.formData();\n return result;\n } catch (error) {\n throw getError({\n error: RequestBodyErrors.BODY_MALFORMED,\n message: 'Malformed Body Payload',\n cause: error,\n });\n }\n }\n}\n"]}
1
+ {"version":3,"file":"form-body.utility.js","sourceRoot":"","sources":["../../../src/utilities/form-body.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAyB,MAAM,iBAAiB,CAAC;AAE/E,yHAAyH;AACzH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,cAAc,EAAE;QACd,OAAO,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE,IAAI,EAAE,6BAA6B,EAAE;QAChF,UAAU,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU;QAC5C,QAAQ,EAAE,WAAW,CAAC,UAAU;KACjC;CACkD,CAAC;AAEtD,MAAM,OAAO,eAAe;IAC1B;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,IAEzB;QACC,IAAI,CAAC;YACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;YAEzC,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,QAAQ,CAAC;gBACb,KAAK,EAAE,iBAAiB,CAAC,cAAc;gBACvC,OAAO,EAAE,wBAAwB;gBACjC,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF","sourcesContent":["import { HTTP } from '@/common/constants';\nimport { ErrorScopes, getError, type TErrorDefinition } from '@/modules/error';\n\n/** The one definition of a body the runtime cannot parse; the kernel's `RequestErrors.BODY_MALFORMED` is this object. */\nexport const RequestBodyErrors = {\n BODY_MALFORMED: {\n message: { text: 'Malformed body payload', code: 'core.request.body_malformed' },\n statusCode: HTTP.ResultCodes.RS_4.BadRequest,\n category: ErrorScopes.VALIDATION,\n },\n} as const satisfies Record<string, TErrorDefinition>;\n\nexport class FormBodyUtility {\n /**\n * Reads a form body through the request's own cache, so every later reader gets the same\n * `FormData`. A body the runtime cannot parse is the caller's fault: it becomes a 400 here, where\n * the runtime's own error would be a 500 - Bun's carries only a code, Node's carries nothing.\n */\n static async readFormBody(opts: {\n req: { formData: () => Promise<FormData> };\n }): Promise<FormData> {\n try {\n const result = await opts.req.formData();\n\n return result;\n } catch (error) {\n throw getError({\n error: RequestBodyErrors.BODY_MALFORMED,\n message: 'Malformed Body Payload',\n cause: error,\n });\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"hr-time.utility.js","sourceRoot":"","sources":["../../../src/utilities/hr-time.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,OAAO,aAAa;IACxB;;;OAGG;IACH,MAAM,CAAC,UAAU;QACf,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QACjC,OAAO,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IACtF,CAAC;CACF","sourcesContent":["import { ParseUtility } from './parse.utility';\n\nexport class HrTimeUtility {\n /**\n * Seconds from the process's high-resolution clock, to nine decimals - for measuring, not for dates.\n * A file of its own: `process.hrtime` is Node-only, and `performance.utility` ships on `/core`.\n */\n static getSeconds() {\n const current = process.hrtime();\n return ParseUtility.toFloat({ input: current[0] + current[1] / 10 ** 9, digit: 9 });\n }\n}\n"]}
1
+ {"version":3,"file":"hr-time.utility.js","sourceRoot":"","sources":["../../../src/utilities/hr-time.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,OAAO,aAAa;IACxB;;;OAGG;IACH,MAAM,CAAC,UAAU;QACf,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QAEjC,OAAO,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC;IACtF,CAAC;CACF","sourcesContent":["import { ParseUtility } from './parse.utility';\n\nexport class HrTimeUtility {\n /**\n * Seconds from the process's high-resolution clock, to nine decimals - for measuring, not for dates.\n * A file of its own: `process.hrtime` is Node-only, and `performance.utility` ships on `/core`.\n */\n static getSeconds() {\n const current = process.hrtime();\n\n return ParseUtility.toFloat({ input: current[0] + current[1] / 10 ** 9, digit: 9 });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"module.utility.js","sourceRoot":"","sources":["../../../src/utilities/module.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;AAE1D,4LAA4L;AAC5L,MAAM,OAAO,aAAa;IACxB,0RAA0R;aAClQ,eAAU,GAAyB,aAAa,CAAC,cAAc,EAAE,CAAC;IAElF,MAAM,CAAC,cAAc;QAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QACjD,MAAM,MAAM,GAAqC,OAAO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E,eAAe,GAAG,KAAK,EAAE,GAAG,IAAI,CAAC;QACzD,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAErC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,IAAI,eAAe,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC;gBACnD,SAAS;YACX,CAAC;YAED,IAAI,CAAC;gBACH,UAAU,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAC7B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;IACH,CAAC","sourcesContent":["import { createRequire } from 'node:module';\nimport path from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { AnyType } from '@/common/types';\nimport { LoggerFactory } from '@/modules/logger';\nimport { getError } from '@/modules/error';\nimport { ProjectRootRegistry } from './project-root.utility';\n\nconst logger = LoggerFactory.getLogger(['ModuleUtility']);\n\n/** Loads an optional peer without letting `Bun.build` see it: every specifier stays a parameter, so there is no literal (nor a `minify.syntax`-folded const) for the bundler to resolve. */\nexport class ModuleUtility {\n /** Peers handed over by the application, keyed by specifier. Checked before any filesystem lookup. The map lives in a globalThis slot because a process (or a compiled bundle) can carry two copies of this module, and a peer registered through one copy must be found by the other. */\n private static readonly registered: Map<string, AnyType> = ModuleUtility.sharedRegistry();\n\n private static sharedRegistry(): Map<string, AnyType> {\n const slot = Symbol.for('ignis:module-registry');\n const shared: Map<string, AnyType> | undefined = Reflect.get(globalThis, slot);\n if (shared) {\n return shared;\n }\n\n const created = new Map<string, AnyType>();\n Reflect.set(globalThis, slot, created);\n\n return created;\n }\n\n /** Called by the application once it knows its root (`configs.projectRoot` or the cwd); every peer lookup below follows it. Delegates to `ProjectRootRegistry`, which a browser Worker host reaches too through `/core` - the two must share ONE slot. */\n static setProjectRoot(opts: { projectRoot: string }): void {\n ProjectRootRegistry.set(opts);\n }\n\n static getProjectRoot(): string {\n return ProjectRootRegistry.getShared() ?? process.cwd();\n }\n\n /** Resolves peers against the APP's node_modules (under the project root), not this package's own `dist/` location. */\n private static appRequire() {\n return createRequire(path.join(this.getProjectRoot(), 'node_modules'));\n }\n\n private static fail(opts: { method: string; module: string; error: unknown; scope?: string }) {\n const { method, module, error, scope } = opts;\n const reason = error instanceof Error ? error.message : String(error);\n\n logger.for(method).error(\"Failed to load '%s' | Error: %s\", module, reason);\n\n return getError({\n message: `[ModuleUtility.${method}] ${module} is required, resolved from ${this.getProjectRoot()}${\n scope ? ` for ${scope}` : ''\n }. Please install '${module}' | Error: ${reason}`,\n });\n }\n\n /**\n * Hands the framework a peer the application already holds, so no filesystem lookup is needed.\n * A `bun build --compile` binary ships without `node_modules`, which leaves runtime resolution\n * nothing to resolve against: the application imports such a peer statically - that import is\n * what gets it into the binary - and registers it here before the consuming component boots.\n *\n * Deliberately does not log. It runs at the entrypoint of exactly the deployment that has no\n * logger provider yet, where `LoggerFactory` throws - and a throw mid-loop would drop every\n * module after the first.\n */\n static register(opts: { modules: Record<string, AnyType> }): void {\n const modulesEntries = Object.entries(opts.modules);\n for (const [module, value] of modulesEntries) {\n this.registered.set(module, value);\n }\n }\n\n /**\n * The file `module` resolves to from the project root under the ES module conditions (`import`), so\n * the peer is the very instance an application's own `import` of it gets. `undefined` when it does not\n * resolve there or the runtime has no resolver: the caller falls back to a plain `import()`.\n */\n private static resolveEsmFile(opts: { module: string }): string | undefined {\n if (typeof Bun === 'undefined') {\n return undefined;\n }\n\n try {\n const file = Bun.resolveSync(opts.module, this.getProjectRoot());\n return path.isAbsolute(file) ? file : undefined;\n // eslint-disable-next-line venizia/no-silent-catch -- documented contract: an unresolvable module is `undefined` and the caller falls back to a plain `import()`\n } catch {\n return undefined;\n }\n }\n\n /**\n * Loads the module as an ES module, resolved from the project root: a peer that ships both builds\n * (`bullmq`, `socket.io-client`) is loaded as the copy the application's own `import` gets, not a second\n * one. A module handed over with {@link register} wins; one that does not resolve from the project root is\n * imported by name as before. Use this everywhere except a constructor, which cannot await - see {@link preload}.\n */\n static async load<T = AnyType>(opts: { module: string }): Promise<T> {\n const { module } = opts;\n\n if (this.registered.has(module)) {\n return this.registered.get(module) as T;\n }\n\n try {\n const file = this.resolveEsmFile({ module });\n const result = await import(file === undefined ? module : pathToFileURL(file).href);\n return result as T;\n } catch (error) {\n throw this.fail({ method: 'load', module, error });\n }\n }\n\n /**\n * The explicit register path for what a constructor needs: loads each module with {@link load} and\n * registers it, so the synchronous {@link loadSync} returns that ES module copy afterwards. Call it once\n * at the entrypoint, before the helpers are constructed. A module already registered is kept; every module\n * is loaded before any is registered, so one that is missing registers nothing.\n */\n static async preload(opts: { modules: Array<string> }): Promise<void> {\n const loaded: Record<string, AnyType> = {};\n\n for (const module of opts.modules) {\n // `load` answers from the registry first, so a module the application handed over comes back as itself.\n const result = await this.load({ module });\n loaded[module] = result;\n }\n\n this.register({ modules: loaded });\n }\n\n /**\n * Sync twin of {@link load}, for a constructor or any path that cannot await. It resolves with\n * `require`, so a peer that ships both builds comes back as its CommonJS copy - a second instance next to\n * the one an application's `import` holds, and `instanceof` across the two fails. `await preload(...)` at the\n * entrypoint registers the ES module copy first, and this returns that.\n */\n static loadSync<T = AnyType>(opts: { module: string }): T {\n const { module } = opts;\n\n if (this.registered.has(module)) {\n return this.registered.get(module) as T;\n }\n\n try {\n return this.appRequire()(module) as T;\n } catch (error) {\n throw this.fail({ method: 'loadSync', module, error });\n }\n }\n\n /**\n * Presence check only - throws naming what to install, without executing the module.\n *\n * `allowRegistered` must be set only where {@link load} or {@link loadSync} is what finally loads\n * the module. Where the consumer resolves the specifier itself - `pino.transport()` inside a\n * worker thread, or any caller with its own `createRequire` - the registry cannot reach it, and\n * counting a registration as installed would replace this precise error with an opaque one.\n */\n static assertInstalled(opts: {\n modules: Array<string>;\n scope?: string;\n allowRegistered?: boolean;\n }): void {\n const { modules, scope, allowRegistered = false } = opts;\n const appRequire = this.appRequire();\n\n for (const module of modules) {\n if (allowRegistered && this.registered.has(module)) {\n continue;\n }\n\n try {\n appRequire.resolve(module);\n } catch (error) {\n throw this.fail({ method: 'assertInstalled', module, error, scope });\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"module.utility.js","sourceRoot":"","sources":["../../../src/utilities/module.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAE7D,MAAM,MAAM,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;AAE1D,4LAA4L;AAC5L,MAAM,OAAO,aAAa;IACxB,0RAA0R;aAClQ,eAAU,GAAyB,aAAa,CAAC,cAAc,EAAE,CAAC;IAElF,MAAM,CAAC,cAAc;QAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;QACjD,MAAM,MAAM,GAAqC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;QAE/E,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,MAAM,OAAO,GAAG,IAAI,GAAG,EAAmB,CAAC;QAC3C,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;QAEvC,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,0PAA0P;IAC1P,MAAM,CAAC,cAAc,CAAC,IAA6B;QACjD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,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,MAAM,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;YACvE,CAAC;QACH,CAAC;IACH,CAAC","sourcesContent":["import { createRequire } from 'node:module';\nimport path from 'node:path';\nimport { pathToFileURL } from 'node:url';\nimport type { AnyType } from '@/common/types';\nimport { LoggerFactory } from '@/modules/logger';\nimport { getError } from '@/modules/error';\nimport { ProjectRootRegistry } from './project-root.utility';\n\nconst logger = LoggerFactory.getLogger(['ModuleUtility']);\n\n/** Loads an optional peer without letting `Bun.build` see it: every specifier stays a parameter, so there is no literal (nor a `minify.syntax`-folded const) for the bundler to resolve. */\nexport class ModuleUtility {\n /** Peers handed over by the application, keyed by specifier. Checked before any filesystem lookup. The map lives in a globalThis slot because a process (or a compiled bundle) can carry two copies of this module, and a peer registered through one copy must be found by the other. */\n private static readonly registered: Map<string, AnyType> = ModuleUtility.sharedRegistry();\n\n private static sharedRegistry(): Map<string, AnyType> {\n const slot = Symbol.for('ignis:module-registry');\n const shared: Map<string, AnyType> | undefined = Reflect.get(globalThis, slot);\n\n if (shared) {\n return shared;\n }\n\n const created = new Map<string, AnyType>();\n Reflect.set(globalThis, slot, created);\n\n return created;\n }\n\n /** Called by the application once it knows its root (`configs.projectRoot` or the cwd); every peer lookup below follows it. Delegates to `ProjectRootRegistry`, which a browser Worker host reaches too through `/core` - the two must share ONE slot. */\n static setProjectRoot(opts: { projectRoot: string }): void {\n ProjectRootRegistry.set(opts);\n }\n\n static getProjectRoot(): string {\n return ProjectRootRegistry.getShared() ?? process.cwd();\n }\n\n /** Resolves peers against the APP's node_modules (under the project root), not this package's own `dist/` location. */\n private static appRequire() {\n return createRequire(path.join(this.getProjectRoot(), 'node_modules'));\n }\n\n private static fail(opts: { method: string; module: string; error: unknown; scope?: string }) {\n const { method, module, error, scope } = opts;\n const reason = error instanceof Error ? error.message : String(error);\n\n logger.for(method).error(\"Failed to load '%s' | Error: %s\", module, reason);\n\n return getError({\n message: `[ModuleUtility.${method}] ${module} is required, resolved from ${this.getProjectRoot()}${\n scope ? ` for ${scope}` : ''\n }. Please install '${module}' | Error: ${reason}`,\n });\n }\n\n /**\n * Hands the framework a peer the application already holds, so no filesystem lookup is needed.\n * A `bun build --compile` binary ships without `node_modules`, which leaves runtime resolution\n * nothing to resolve against: the application imports such a peer statically - that import is\n * what gets it into the binary - and registers it here before the consuming component boots.\n *\n * Deliberately does not log. It runs at the entrypoint of exactly the deployment that has no\n * logger provider yet, where `LoggerFactory` throws - and a throw mid-loop would drop every\n * module after the first.\n */\n static register(opts: { modules: Record<string, AnyType> }): void {\n const modulesEntries = Object.entries(opts.modules);\n\n for (const [module, value] of modulesEntries) {\n this.registered.set(module, value);\n }\n }\n\n /**\n * The file `module` resolves to from the project root under the ES module conditions (`import`), so\n * the peer is the very instance an application's own `import` of it gets. `undefined` when it does not\n * resolve there or the runtime has no resolver: the caller falls back to a plain `import()`.\n */\n private static resolveEsmFile(opts: { module: string }): string | undefined {\n if (typeof Bun === 'undefined') {\n return undefined;\n }\n\n try {\n const file = Bun.resolveSync(opts.module, this.getProjectRoot());\n\n return path.isAbsolute(file) ? file : undefined;\n // eslint-disable-next-line venizia/no-silent-catch -- documented contract: an unresolvable module is `undefined` and the caller falls back to a plain `import()`\n } catch {\n return undefined;\n }\n }\n\n /**\n * Loads the module as an ES module, resolved from the project root: a peer that ships both builds\n * (`bullmq`, `socket.io-client`) is loaded as the copy the application's own `import` gets, not a second\n * one. A module handed over with {@link register} wins; one that does not resolve from the project root is\n * imported by name as before. Use this everywhere except a constructor, which cannot await - see {@link preload}.\n */\n static async load<T = AnyType>(opts: { module: string }): Promise<T> {\n const { module } = opts;\n\n if (this.registered.has(module)) {\n return this.registered.get(module) as T;\n }\n\n try {\n const file = this.resolveEsmFile({ module });\n const result = await import(file === undefined ? module : pathToFileURL(file).href);\n\n return result as T;\n } catch (error) {\n throw this.fail({ method: 'load', module, error });\n }\n }\n\n /**\n * The explicit register path for what a constructor needs: loads each module with {@link load} and\n * registers it, so the synchronous {@link loadSync} returns that ES module copy afterwards. Call it once\n * at the entrypoint, before the helpers are constructed. A module already registered is kept; every module\n * is loaded before any is registered, so one that is missing registers nothing.\n */\n static async preload(opts: { modules: Array<string> }): Promise<void> {\n const loaded: Record<string, AnyType> = {};\n\n for (const module of opts.modules) {\n // `load` answers from the registry first, so a module the application handed over comes back as itself.\n const result = await this.load({ module });\n loaded[module] = result;\n }\n\n this.register({ modules: loaded });\n }\n\n /**\n * Sync twin of {@link load}, for a constructor or any path that cannot await. It resolves with\n * `require`, so a peer that ships both builds comes back as its CommonJS copy - a second instance next to\n * the one an application's `import` holds, and `instanceof` across the two fails. `await preload(...)` at the\n * entrypoint registers the ES module copy first, and this returns that.\n */\n static loadSync<T = AnyType>(opts: { module: string }): T {\n const { module } = opts;\n\n if (this.registered.has(module)) {\n return this.registered.get(module) as T;\n }\n\n try {\n return this.appRequire()(module) as T;\n } catch (error) {\n throw this.fail({ method: 'loadSync', module, error });\n }\n }\n\n /**\n * Presence check only - throws naming what to install, without executing the module.\n *\n * `allowRegistered` must be set only where {@link load} or {@link loadSync} is what finally loads\n * the module. Where the consumer resolves the specifier itself - `pino.transport()` inside a\n * worker thread, or any caller with its own `createRequire` - the registry cannot reach it, and\n * counting a registration as installed would replace this precise error with an opaque one.\n */\n static assertInstalled(opts: {\n modules: Array<string>;\n scope?: string;\n allowRegistered?: boolean;\n }): void {\n const { modules, scope, allowRegistered = false } = opts;\n const appRequire = this.appRequire();\n\n for (const module of modules) {\n if (allowRegistered && this.registered.has(module)) {\n continue;\n }\n\n try {\n appRequire.resolve(module);\n } catch (error) {\n throw this.fail({ method: 'assertInstalled', module, error, scope });\n }\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"parse.utility.js","sourceRoot":"","sources":["../../../src/utilities/parse.utility.ts"],"names":[],"mappings":"AA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QAED,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;IAC9B,CAAC;IAED,oDAAoD;IACpD,MAAM,CAAC,eAAe,CAAO,IAAiC;QAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAClC,IAAI,MAAM,GAAQ,IAAI,CAAC,MAAM,CAAC;QAE9B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACvB,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;gBACnB,MAAM,QAAQ,CAAC,EAAE,OAAO,EAAE,yBAAyB,GAAG,QAAQ,MAAM,EAAE,EAAE,CAAC,CAAC;YAC5E,CAAC;YACD,MAAM,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;QACvB,CAAC;QAED,OAAO,MAAW,CAAC;IACrB,CAAC;CACF","sourcesContent":["import { getError } from '@/modules/error';\n\n/** Number, string and key conversions that tolerate bad input; no node import, so it ships on `/core`. */\nexport class ParseUtility {\n /**\n * Rounds at a decimal precision, shifting the exponent rather than multiplying: `1.005` at 2 is\n * `1.01` here, where `Math.round(1.005 * 100) / 100` gives `1`.\n *\n * Hand-written to keep lodash out of a browser bundle. One deliberate difference from `lodash/round`:\n * a result of negative zero is normalised to `0`. They compare equal, stringify the same and\n * serialise the same, so nothing downstream can tell - checked across 114 value/precision pairs, and\n * the sign of zero was the only disagreement.\n */\n private static round(opts: { value: number; precision?: number }): number {\n const { value, precision = 0 } = opts;\n\n if (!Number.isFinite(value) || precision === 0) {\n return Math.round(value) + 0;\n }\n\n const [mantissa, exponent] = `${value}e`.split('e');\n const shifted = Math.round(Number(`${mantissa}e${Number(exponent) + precision}`));\n const [shiftedMantissa, shiftedExponent] = `${shifted}e`.split('e');\n\n return Number(`${shiftedMantissa}e${Number(shiftedExponent) - precision}`) + 0;\n }\n\n /** Arrays stay arrays - mapping one through the object branch would turn it into an index-keyed object - but their object elements still need their keys camelized. Dates are opaque values. */\n private static camelizeValue(opts: { value: unknown }): unknown {\n const { value } = opts;\n\n if (Array.isArray(value)) {\n return value.map((element) => ParseUtility.camelizeValue({ value: element }));\n }\n\n if (!value || typeof value !== 'object' || value instanceof Date) {\n return value;\n }\n\n const camelized: any = {};\n const valueKeys = Object.keys(value);\n for (const key of valueKeys) {\n camelized[ParseUtility.toCamel({ input: key })] = ParseUtility.camelizeValue({\n value: (value as Record<string, unknown>)[key],\n });\n }\n\n return camelized;\n }\n\n static getUID() {\n return Math.random().toString(36).slice(2).toUpperCase();\n }\n\n static toCamel(opts: { input: string }) {\n return opts.input.replace(/([-_][a-z])/gi, (sub: string) => {\n return sub.toUpperCase().replace('-', '').replace('_', '');\n });\n }\n\n static keysToCamel(opts: { source: object }) {\n const { source } = opts;\n const n: any = {};\n const keys = Object.keys(source);\n\n for (const key of keys) {\n n[ParseUtility.toCamel({ input: key })] = ParseUtility.camelizeValue({\n value: (source as Record<string, unknown>)[key],\n });\n }\n\n return n;\n }\n\n static isInt(opts: { input: any }) {\n const { input } = opts;\n if (isNaN(input)) {\n return false;\n }\n\n return (\n Number.isInteger(input) || Math.floor(Number(input)) === input || Number(input) % 1 === 0\n );\n }\n\n static isFloat(opts: { input: any }) {\n const { input } = opts;\n if (isNaN(input)) {\n return false;\n }\n\n return Number(input) === input || Number(input) % 1 !== 0;\n }\n\n /**\n * Parses an integer, TOTAL by design: it always answers a number, and answers `0` for anything it\n * cannot parse - `undefined`, `''`, `'abc'`.\n *\n * That makes `ParseUtility.toInt({ input }) ?? fallback` dead code, because the left side is never\n * nullish. The fallback belongs INSIDE the call, and for an environment read it belongs in the read\n * itself:\n *\n * ```ts\n * ParseUtility.toInt({ input: applicationEnvironment.get(KEY, { defaultValue: '6379' }) }) // correct\n * ParseUtility.toInt({ input: applicationEnvironment.get(KEY) }) ?? 6379 // always 0 when KEY is unset\n * ```\n *\n * The second form is silent: a missing port reads `0` and a missing retry budget reads `0`, which\n * through `AbstractRedisHelper.buildRetryStrategy` means \"give up after the first failure\".\n */\n static toInt(opts: { input: any }) {\n const { input } = opts;\n if (!input) {\n return 0;\n }\n\n const normalized = input?.toString()?.replace(/,/g, '');\n if (isNaN(normalized)) {\n return 0;\n }\n\n const parsed = Number.parseInt(normalized, 10);\n return Number.isNaN(parsed) ? 0 : parsed;\n }\n\n static toFloat(opts: { input: any; digit?: number }) {\n const { input, digit = 2 } = opts;\n if (!input) {\n return 0;\n }\n\n const normalized = input?.toString()?.replace(/,/g, '');\n if (isNaN(normalized)) {\n return 0;\n }\n\n const parsed = ParseUtility.round({ value: Number.parseFloat(normalized), precision: digit });\n return Number.isNaN(parsed) ? 0 : parsed;\n }\n\n static toBoolean(opts: { input: any }): boolean {\n const { input } = opts;\n return (\n input !== '' &&\n input !== 'false' &&\n input !== '0' &&\n input !== false &&\n input !== 0 &&\n input !== null &&\n input !== undefined\n );\n }\n\n /** Converts an array to a Map keyed by `key`. Last element wins on duplicate keys. */\n static parseArrayToMapWithKey<T extends Record<K, PropertyKey>, K extends keyof T>(opts: {\n items: T[];\n key: K;\n }): Map<T[K], T> {\n const { items, key } = opts;\n const resultMap = new Map<T[K], T>();\n\n if (!items.length) {\n return resultMap;\n }\n\n items.forEach((element) => {\n if (!(key in element)) {\n throw getError({\n message: 'Invalid keyMap',\n });\n }\n resultMap.set(element[key], element);\n });\n\n return resultMap;\n }\n\n /** Splits a delimited string into trimmed, non-empty entries - the transform for list-shaped env values (e.g. `applicationEnvironment.get(KEY, { transform: (input) => ParseUtility.toDelimitedArray({ input }) })`). */\n static toDelimitedArray(opts: { input: unknown; separator?: string }): string[] {\n const { input, separator = ',' } = opts;\n if (input == null) {\n return [];\n }\n\n return String(input)\n .split(separator)\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n }\n\n /**\n * A trimmed value, or `undefined` when the input is absent or carries nothing but whitespace.\n *\n * Written for environment reads. `KEY=` in a deployment file is a pipeline that forgot to export the\n * value, but `process.env.KEY` answers `''` for it, and `''` walks straight past `??`:\n *\n * ```ts\n * process.env.APP_ENV_LOGGER_FORMAT ?? 'text' // '' when the line is blank\n * ParseUtility.blankToUndefined({ input: process.env.APP_ENV_LOGGER_FORMAT }) ?? 'text' // 'text'\n * ```\n *\n * Reach for this rather than `||`, which reads `'0'` as blank as well.\n */\n static blankToUndefined(opts: { input: string | undefined }): string | undefined {\n const trimmed = opts.input?.trim();\n return trimmed === undefined || trimmed.length === 0 ? undefined : trimmed;\n }\n\n /** Trims a possibly-undefined env value to a clean string ('' when absent). */\n static toTrimmed(opts: { input: unknown }): string {\n const { input } = opts;\n if (input == null) {\n return '';\n }\n\n return String(input).trim();\n }\n\n /** Traverse a dotted property path on an object. */\n static getDeepProperty<T, V>(opts: { source: T; path: string }): V {\n const keys = opts.path.split('.');\n let result: any = opts.source;\n\n for (const key of keys) {\n if (result == null) {\n throw getError({ message: `Cannot read property '${key}' of ${result}` });\n }\n result = result[key];\n }\n\n return result as V;\n }\n}\n"]}
1
+ {"version":3,"file":"parse.utility.js","sourceRoot":"","sources":["../../../src/utilities/parse.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,0GAA0G;AAC1G,MAAM,OAAO,YAAY;IACvB;;;;;;;;OAQG;IACK,MAAM,CAAC,KAAK,CAAC,IAA2C;QAC9D,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC;QAEtC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,SAAS,KAAK,CAAC,EAAE,CAAC;YAC/C,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC/B,CAAC;QAED,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,GAAG,KAAK,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACpD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GA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ourcesContent":["import { getError } from '@/modules/error';\n\n/** Number, string and key conversions that tolerate bad input; no node import, so it ships on `/core`. */\nexport class ParseUtility {\n /**\n * Rounds at a decimal precision, shifting the exponent rather than multiplying: `1.005` at 2 is\n * `1.01` here, where `Math.round(1.005 * 100) / 100` gives `1`.\n *\n * Hand-written to keep lodash out of a browser bundle. One deliberate difference from `lodash/round`:\n * a result of negative zero is normalised to `0`. They compare equal, stringify the same and\n * serialise the same, so nothing downstream can tell - checked across 114 value/precision pairs, and\n * the sign of zero was the only disagreement.\n */\n private static round(opts: { value: number; precision?: number }): number {\n const { value, precision = 0 } = opts;\n\n if (!Number.isFinite(value) || precision === 0) {\n return Math.round(value) + 0;\n }\n\n const [mantissa, exponent] = `${value}e`.split('e');\n const shifted = Math.round(Number(`${mantissa}e${Number(exponent) + precision}`));\n const [shiftedMantissa, shiftedExponent] = `${shifted}e`.split('e');\n\n return Number(`${shiftedMantissa}e${Number(shiftedExponent) - precision}`) + 0;\n }\n\n /** Arrays stay arrays - mapping one through the object branch would turn it into an index-keyed object - but their object elements still need their keys camelized. Dates are opaque values. */\n private static camelizeValue(opts: { value: unknown }): unknown {\n const { value } = opts;\n\n if (Array.isArray(value)) {\n return value.map((element) => ParseUtility.camelizeValue({ value: element }));\n }\n\n if (!value || typeof value !== 'object' || value instanceof Date) {\n return value;\n }\n\n const camelized: any = {};\n const valueKeys = Object.keys(value);\n\n for (const key of valueKeys) {\n camelized[ParseUtility.toCamel({ input: key })] = ParseUtility.camelizeValue({\n value: (value as Record<string, unknown>)[key],\n });\n }\n\n return camelized;\n }\n\n static getUID() {\n return Math.random().toString(36).slice(2).toUpperCase();\n }\n\n static toCamel(opts: { input: string }) {\n return opts.input.replace(/([-_][a-z])/gi, (sub: string) => {\n return sub.toUpperCase().replace('-', '').replace('_', '');\n });\n }\n\n static keysToCamel(opts: { source: object }) {\n const { source } = opts;\n const n: any = {};\n const keys = Object.keys(source);\n\n for (const key of keys) {\n n[ParseUtility.toCamel({ input: key })] = ParseUtility.camelizeValue({\n value: (source as Record<string, unknown>)[key],\n });\n }\n\n return n;\n }\n\n static isInt(opts: { input: any }) {\n const { input } = opts;\n\n if (isNaN(input)) {\n return false;\n }\n\n return (\n Number.isInteger(input) || Math.floor(Number(input)) === input || Number(input) % 1 === 0\n );\n }\n\n static isFloat(opts: { input: any }) {\n const { input } = opts;\n\n if (isNaN(input)) {\n return false;\n }\n\n return Number(input) === input || Number(input) % 1 !== 0;\n }\n\n /**\n * Parses an integer, TOTAL by design: it always answers a number, and answers `0` for anything it\n * cannot parse - `undefined`, `''`, `'abc'`.\n *\n * That makes `ParseUtility.toInt({ input }) ?? fallback` dead code, because the left side is never\n * nullish. The fallback belongs INSIDE the call, and for an environment read it belongs in the read\n * itself:\n *\n * ```ts\n * ParseUtility.toInt({ input: applicationEnvironment.get(KEY, { defaultValue: '6379' }) }) // correct\n * ParseUtility.toInt({ input: applicationEnvironment.get(KEY) }) ?? 6379 // always 0 when KEY is unset\n * ```\n *\n * The second form is silent: a missing port reads `0` and a missing retry budget reads `0`, which\n * through `AbstractRedisHelper.buildRetryStrategy` means \"give up after the first failure\".\n */\n static toInt(opts: { input: any }) {\n const { input } = opts;\n\n if (!input) {\n return 0;\n }\n\n const normalized = input?.toString()?.replace(/,/g, '');\n\n if (isNaN(normalized)) {\n return 0;\n }\n\n const parsed = Number.parseInt(normalized, 10);\n\n return Number.isNaN(parsed) ? 0 : parsed;\n }\n\n static toFloat(opts: { input: any; digit?: number }) {\n const { input, digit = 2 } = opts;\n\n if (!input) {\n return 0;\n }\n\n const normalized = input?.toString()?.replace(/,/g, '');\n\n if (isNaN(normalized)) {\n return 0;\n }\n\n const parsed = ParseUtility.round({ value: Number.parseFloat(normalized), precision: digit });\n\n return Number.isNaN(parsed) ? 0 : parsed;\n }\n\n static toBoolean(opts: { input: any }): boolean {\n const { input } = opts;\n\n return (\n input !== '' &&\n input !== 'false' &&\n input !== '0' &&\n input !== false &&\n input !== 0 &&\n input !== null &&\n input !== undefined\n );\n }\n\n /** Converts an array to a Map keyed by `key`. Last element wins on duplicate keys. */\n static parseArrayToMapWithKey<T extends Record<K, PropertyKey>, K extends keyof T>(opts: {\n items: T[];\n key: K;\n }): Map<T[K], T> {\n const { items, key } = opts;\n const resultMap = new Map<T[K], T>();\n\n if (!items.length) {\n return resultMap;\n }\n\n items.forEach((element) => {\n if (!(key in element)) {\n throw getError({\n message: 'Invalid keyMap',\n });\n }\n\n resultMap.set(element[key], element);\n });\n\n return resultMap;\n }\n\n /** Splits a delimited string into trimmed, non-empty entries - the transform for list-shaped env values (e.g. `applicationEnvironment.get(KEY, { transform: (input) => ParseUtility.toDelimitedArray({ input }) })`). */\n static toDelimitedArray(opts: { input: unknown; separator?: string }): string[] {\n const { input, separator = ',' } = opts;\n\n if (input == null) {\n return [];\n }\n\n return String(input)\n .split(separator)\n .map((entry) => entry.trim())\n .filter((entry) => entry.length > 0);\n }\n\n /**\n * A trimmed value, or `undefined` when the input is absent or carries nothing but whitespace.\n *\n * Written for environment reads. `KEY=` in a deployment file is a pipeline that forgot to export the\n * value, but `process.env.KEY` answers `''` for it, and `''` walks straight past `??`:\n *\n * ```ts\n * process.env.APP_ENV_LOGGER_FORMAT ?? 'text' // '' when the line is blank\n * ParseUtility.blankToUndefined({ input: process.env.APP_ENV_LOGGER_FORMAT }) ?? 'text' // 'text'\n * ```\n *\n * Reach for this rather than `||`, which reads `'0'` as blank as well.\n */\n static blankToUndefined(opts: { input: string | undefined }): string | undefined {\n const trimmed = opts.input?.trim();\n\n return trimmed === undefined || trimmed.length === 0 ? undefined : trimmed;\n }\n\n /** Trims a possibly-undefined env value to a clean string ('' when absent). */\n static toTrimmed(opts: { input: unknown }): string {\n const { input } = opts;\n\n if (input == null) {\n return '';\n }\n\n return String(input).trim();\n }\n\n /** Traverse a dotted property path on an object. */\n static getDeepProperty<T, V>(opts: { source: T; path: string }): V {\n const keys = opts.path.split('.');\n let result: any = opts.source;\n\n for (const key of keys) {\n if (result == null) {\n throw getError({ message: `Cannot read property '${key}' of ${result}` });\n }\n\n result = result[key];\n }\n\n return result as V;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"performance.utility.js","sourceRoot":"","sources":["../../../src/utilities/performance.utility.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAItC,MAAM,OAAO,kBAAkB;IAC7B,MAAM,CAAC,aAAa;QAClB,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAAsC;QACvD,OAAO,YAAY,CAAC,OAAO,CAAC;YAC1B,KAAK,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI;YACpC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,2BAA2B;SACjD,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,kBAAkB,CAAU,IAOlC;QACC,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACxC,MAAM,CAAC,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;YAC5B,MAAM,EACJ,MAAM,GAAG,OAAO,EAChB,KAAK,GAAG,OAAO,EACf,KAAK,EACL,WAAW,GAAG,WAAW,EACzB,IAAI,EACJ,IAAI,GACL,GAAG,IAAI,CAAC;YAET,sIAAsI;YACtI,MAAM,MAAM,GAAe,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YACtD,MAAM,GAAG,GAAG,CAAC,OAAe,EAAE,GAAG,MAAsB,EAAE,EAAE,CACzD,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;YAE1C,IAAI,IAAI,EAAE,CAAC;gBACT,GAAG,CAAC,+BAA+B,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;YACjE,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,qBAAqB,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;YACjD,CAAC;YAED,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;iBACpB,IAAI,CAAC,OAAO,CAAC;iBACb,KAAK,CAAC,MAAM,CAAC;iBACb,OAAO,CAAC,GAAG,EAAE;gBACZ,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;gBACnC,IAAI,IAAI,EAAE,CAAC;oBACT,GAAG,CAAC,2CAA2C,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBACnF,CAAC;qBAAM,CAAC;oBACN,GAAG,CAAC,gCAAgC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;gBAClE,CAAC;YACH,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { type AnyType } from '@/common/types';\nimport { type ILogger } from '@/modules/logger';\nimport { ParseUtility } from './parse.utility';\n\nconst DEFAULT_PERFORMANCE_DECIMAL = 6;\n\ntype TLogMethod = (message: string, ...args: Array<AnyType>) => void;\n\nexport class PerformanceUtility {\n static getCheckpoint() {\n return performance.now();\n }\n\n static getExecuted(opts: { from: number; digit?: number }) {\n return ParseUtility.toFloat({\n input: performance.now() - opts.from,\n digit: opts.digit ?? DEFAULT_PERFORMANCE_DECIMAL,\n });\n }\n\n static executeWithMeasure<R = any>(opts: {\n logger?: ILogger;\n level?: string;\n description?: string;\n args?: any;\n scope: string;\n task: Function;\n }) {\n return new Promise<R>((resolve, reject) => {\n const t = performance.now();\n const {\n logger = console,\n level = 'debug',\n scope,\n description = 'Executing',\n args,\n task,\n } = opts;\n\n // `level` names a method on whichever logger was passed, so it is looked up, not indexed; the call keeps `this` bound to that logger.\n const method: TLogMethod = Reflect.get(logger, level);\n const log = (message: string, ...params: Array<AnyType>) =>\n method.call(logger, message, ...params);\n\n if (args) {\n log('[%s] START | %s... | Args: %j', scope, description, args);\n } else {\n log('[%s] START | %s ...', scope, description);\n }\n\n Promise.resolve(task())\n .then(resolve)\n .catch(reject)\n .finally(() => {\n const took = performance.now() - t;\n if (args) {\n log('[%s] DONE | %s | Args: %j | Took: %s (ms)', scope, description, args, took);\n } else {\n log('[%s] DONE | %s | Took: %s (ms)', scope, description, took);\n }\n });\n });\n }\n}\n"]}
1
+ {"version":3,"file":"performance.utility.js","sourceRoot":"","sources":["../../../src/utilities/performance.utility.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,2BAA2B,GAAG,CAAC,CAAC;AAItC,MAAM,OAAO,kBAAkB;IAC7B,MAAM,CAAC,aAAa;QAClB,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC;IAC3B,CAAC;IAED,MAAM,CAAC,WAAW,CAAC,IAAsC;QACvD,OAAO,YAAY,CAAC,OAAO,CAAC;YAC1B,KAAK,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,IAAI;YACpC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,2BAA2B;SACjD,CAAC,CAAC;IACL,CAAC;IAED,MAAM,CAAC,kBAAkB,CAAU,IAOlC;QACC,OAAO,IAAI,OAAO,CAAI,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACxC,MAAM,CAAC,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;YAC5B,MAAM,EACJ,MAAM,GAAG,OAAO,EAChB,KAAK,GAAG,OAAO,EACf,KAAK,EACL,WAAW,GAAG,WAAW,EACzB,IAAI,EACJ,IAAI,GACL,GAAG,IAAI,CAAC;YAET,sIAAsI;YACtI,MAAM,MAAM,GAAe,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YACtD,MAAM,GAAG,GAAG,CAAC,OAAe,EAAE,GAAG,MAAsB,EAAE,EAAE,CACzD,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;YAE1C,IAAI,IAAI,EAAE,CAAC;gBACT,GAAG,CAAC,+BAA+B,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;YACjE,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,qBAAqB,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;YACjD,CAAC;YAED,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;iBACpB,IAAI,CAAC,OAAO,CAAC;iBACb,KAAK,CAAC,MAAM,CAAC;iBACb,OAAO,CAAC,GAAG,EAAE;gBACZ,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;gBAEnC,IAAI,IAAI,EAAE,CAAC;oBACT,GAAG,CAAC,2CAA2C,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBACnF,CAAC;qBAAM,CAAC;oBACN,GAAG,CAAC,gCAAgC,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;gBAClE,CAAC;YACH,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { type AnyType } from '@/common/types';\nimport { type ILogger } from '@/modules/logger';\nimport { ParseUtility } from './parse.utility';\n\nconst DEFAULT_PERFORMANCE_DECIMAL = 6;\n\ntype TLogMethod = (message: string, ...args: Array<AnyType>) => void;\n\nexport class PerformanceUtility {\n static getCheckpoint() {\n return performance.now();\n }\n\n static getExecuted(opts: { from: number; digit?: number }) {\n return ParseUtility.toFloat({\n input: performance.now() - opts.from,\n digit: opts.digit ?? DEFAULT_PERFORMANCE_DECIMAL,\n });\n }\n\n static executeWithMeasure<R = any>(opts: {\n logger?: ILogger;\n level?: string;\n description?: string;\n args?: any;\n scope: string;\n task: Function;\n }) {\n return new Promise<R>((resolve, reject) => {\n const t = performance.now();\n const {\n logger = console,\n level = 'debug',\n scope,\n description = 'Executing',\n args,\n task,\n } = opts;\n\n // `level` names a method on whichever logger was passed, so it is looked up, not indexed; the call keeps `this` bound to that logger.\n const method: TLogMethod = Reflect.get(logger, level);\n const log = (message: string, ...params: Array<AnyType>) =>\n method.call(logger, message, ...params);\n\n if (args) {\n log('[%s] START | %s... | Args: %j', scope, description, args);\n } else {\n log('[%s] START | %s ...', scope, description);\n }\n\n Promise.resolve(task())\n .then(resolve)\n .catch(reject)\n .finally(() => {\n const took = performance.now() - t;\n\n if (args) {\n log('[%s] DONE | %s | Args: %j | Took: %s (ms)', scope, description, args, took);\n } else {\n log('[%s] DONE | %s | Took: %s (ms)', scope, description, took);\n }\n });\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"promise.utility.js","sourceRoot":"","sources":["../../../src/utilities/promise.utility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK3C,qCAAqC;AACrC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAI,KAAyB,EAA2B,EAAE;IACrF,OAAO,CACL,CAAC,CAAC,KAAK;QACP,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAC;QAC1D,OAAQ,KAAwB,CAAC,IAAI,KAAK,UAAU,CACrD,CAAC;AACJ,CAAC,CAAC;AAEF,gRAAgR;AAChR,MAAM,OAAO,cAAc;IACzB,MAAM,CAAC,KAAK,CAAC,IAAoB;QAC/B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,oDAAoD;IACpD,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAI,IAIhC;QACC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE1C,IAAI,CAAC,MAA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AC;gBACX,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,0DAA0D,EAAE,KAAK,CAAC,CAAC;gBAC3F,OAAO;YACT,CAAC;YAED,OAAO,CAAC,KAAK,CAAC,mDAAmD,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;QACnF,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["import { type ValueOrPromise } from '@/common';\nimport { getError } from '@/modules/error';\nimport type { ILogger } from '@/modules/logger';\n\nexport type TTask<T> = (...args: any[]) => Promise<T>;\n\n/** Check if a value is a promise. */\nexport const isPromiseLike = <T>(value: T | PromiseLike<T>): value is PromiseLike<T> => {\n return (\n !!value &&\n (typeof value === 'object' || typeof value === 'function') &&\n typeof (value as PromiseLike<T>).then === 'function'\n );\n};\n\n/** Waiting, bounded concurrency and fire-and-forget. `voidExecution` is not a `BaseHelper` member: TS cannot emit protected members on an exported ANONYMOUS class (TS4094), which is what factory-built controllers return; a static on a separate class has no such limit. */\nexport class PromiseUtility {\n static sleep(opts: { ms: number }): Promise<unknown> {\n return new Promise((resolve) => setTimeout(resolve, opts.ms));\n }\n\n /** Execute async tasks with bounded concurrency. */\n static async executeWithLimit<T>(opts: {\n tasks: Array<TTask<T>>;\n limit: number;\n onTaskDone?: <R>(opts: { result: R }) => ValueOrPromise<void>;\n }) {\n const { tasks, limit, onTaskDone } = opts;\n\n if (!Number.isInteger(limit) || limit < 1) {\n throw getError({\n message: `[executePromiseWithLimit] limit must be a positive integer | received: ${limit}`,\n });\n }\n\n const results: Promise<T>[] = [];\n const executing = new Set();\n\n for (const task of tasks) {\n const promise = task().then((result) => {\n executing.delete(promise);\n return result;\n });\n\n executing.add(promise);\n results.push(promise);\n\n if (executing.size >= limit) {\n const done = await Promise.race(executing);\n await onTaskDone?.({ result: done });\n }\n }\n\n await Promise.all(executing);\n return Promise.all(results);\n }\n\n /** Fire-and-forget: routes rejection to `logger` (or console.error), passes sync results through untouched. */\n static voidExecution(opts: {\n logger?: ILogger;\n scope: string;\n execution: ValueOrPromise<unknown>;\n }): void {\n const { logger, scope, execution } = opts;\n\n if (!isPromiseLike(execution)) {\n return;\n }\n\n Promise.resolve(execution).catch((error: unknown) => {\n if (logger) {\n logger.for(scope).error('Unhandled error in fire-and-forget execution | Error: %s', error);\n return;\n }\n\n console.error('[%s] Unhandled error in fire-and-forget execution', scope, error);\n });\n }\n}\n"]}
1
+ {"version":3,"file":"promise.utility.js","sourceRoot":"","sources":["../../../src/utilities/promise.utility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAK3C,qCAAqC;AACrC,MAAM,CAAC,MAAM,aAAa,GAAG,CAAI,KAAyB,EAA2B,EAAE;IACrF,OAAO,CACL,CAAC,CAAC,KAAK;QACP,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,UAAU,CAAC;QAC1D,OAAQ,KAAwB,CAAC,IAAI,KAAK,UAAU,CACrD,CAAC;AACJ,CAAC,CAAC;AAEF,gRAAgR;AAChR,MAAM,OAAO,cAAc;IACzB,MAAM,CAAC,KAAK,CAAC,IAAoB;QAC/B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,oDAAoD;IACpD,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAI,IAIhC;QACC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE1C,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC,EAAE,CAAC;YAC1C,MAAM,QAAQ,CAAC;gBACb,OAAO,EAAE,0EAA0E,KAAK,EAAE;aAC3F,CAAC,CAAC;QACL,CAAC;QAED,MAAM,OAAO,GAAiB,EAAE,CAAC;QACjC,MAAM,SAA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AC;IACL,CAAC;CACF","sourcesContent":["import { type ValueOrPromise } from '@/common';\nimport { getError } from '@/modules/error';\nimport type { ILogger } from '@/modules/logger';\n\nexport type TTask<T> = (...args: any[]) => Promise<T>;\n\n/** Check if a value is a promise. */\nexport const isPromiseLike = <T>(value: T | PromiseLike<T>): value is PromiseLike<T> => {\n return (\n !!value &&\n (typeof value === 'object' || typeof value === 'function') &&\n typeof (value as PromiseLike<T>).then === 'function'\n );\n};\n\n/** Waiting, bounded concurrency and fire-and-forget. `voidExecution` is not a `BaseHelper` member: TS cannot emit protected members on an exported ANONYMOUS class (TS4094), which is what factory-built controllers return; a static on a separate class has no such limit. */\nexport class PromiseUtility {\n static sleep(opts: { ms: number }): Promise<unknown> {\n return new Promise((resolve) => setTimeout(resolve, opts.ms));\n }\n\n /** Execute async tasks with bounded concurrency. */\n static async executeWithLimit<T>(opts: {\n tasks: Array<TTask<T>>;\n limit: number;\n onTaskDone?: <R>(opts: { result: R }) => ValueOrPromise<void>;\n }) {\n const { tasks, limit, onTaskDone } = opts;\n\n if (!Number.isInteger(limit) || limit < 1) {\n throw getError({\n message: `[executePromiseWithLimit] limit must be a positive integer | received: ${limit}`,\n });\n }\n\n const results: Promise<T>[] = [];\n const executing = new Set();\n\n for (const task of tasks) {\n const promise = task().then((result) => {\n executing.delete(promise);\n\n return result;\n });\n\n executing.add(promise);\n results.push(promise);\n\n if (executing.size >= limit) {\n const done = await Promise.race(executing);\n await onTaskDone?.({ result: done });\n }\n }\n\n await Promise.all(executing);\n\n return Promise.all(results);\n }\n\n /** Fire-and-forget: routes rejection to `logger` (or console.error), passes sync results through untouched. */\n static voidExecution(opts: {\n logger?: ILogger;\n scope: string;\n execution: ValueOrPromise<unknown>;\n }): void {\n const { logger, scope, execution } = opts;\n\n if (!isPromiseLike(execution)) {\n return;\n }\n\n Promise.resolve(execution).catch((error: unknown) => {\n if (logger) {\n logger.for(scope).error('Unhandled error in fire-and-forget execution | Error: %s', error);\n\n return;\n }\n\n console.error('[%s] Unhandled error in fire-and-forget execution', scope, error);\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"request.utility.js","sourceRoot":"","sources":["../../../src/utilities/request.utility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAS7B,4HAA4H;AAC5H,MAAM,OAAO,iBAAiB;aACZ,WAAM,GAAG,QAAQ,CAAC;aAClB,SAAI,GAAG,MAAM,CAAC;aAEd,eAAU,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvE,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AA6BH,8SAA8S;AAC9S,MAAM,+BAA+B,GAAG,gCAAgC,CAAC;AACzE,MAAM,YAAY,GAAG,MAAM,CAAC;AAE5B,4EAA4E;AAC5E,MAAM,OAAO,uBAAuB;aAClB,eAAU,GAAG,YAAY,CAAC;aAC1B,WAAM,GAAG,QAAQ,CAAC;aAElB,eAAU,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAE7E,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AAMH,MAAM,OAAO,cAAc;IACzB,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAC7B,IAA+B;QAE/B,MAAM,EAAE,OAAO,GAAG,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,WAAW,EAAE,OAAO,EAAE,GA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AE,GAAG,IAAI,CAAC;QAExB,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;QAEvD,0FAA0F;QAC1F,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC3D,IAAI,QAAQ,EAAE,CAAC;YACb,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YACjC,8FAA8F;YAC9F,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;YAExD,IAAI,CAAC;gBACH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;gBACvD,8JAA8J;YAChK,CAAC;YAAC,MAAM,CAAC;gBACP,0FAA0F;YAC5F,CAAC;QACH,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACzD,IAAI,MAAM,EAAE,CAAC;YACX,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;QACvC,CAAC;QAED,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;QACrD,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;IAC/D,CAAC;CACF","sourcesContent":["import type { TConstValue } from '@/common/types';\nimport { getError } from '@/modules/error';\nimport { FormBodyUtility } from './form-body.utility';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nexport interface IRequestedRemark {\n id: string;\n url: string;\n method: string;\n [extra: string | symbol]: any;\n}\n\n/** Where `RequestUtility.parseMultipartBody` keeps an uploaded file: MEMORY (a buffer) or DISK (spooled to `uploadDir`). */\nexport class MultipartStorages {\n static readonly MEMORY = 'memory';\n static readonly DISK = 'disk';\n\n static readonly SCHEME_SET = new Set<string>([this.MEMORY, this.DISK]);\n\n static isValid(value: string): boolean {\n return this.SCHEME_SET.has(value);\n }\n}\n\n/** Valid multipart storage values. */\nexport type TMultipartStorage = TConstValue<typeof MultipartStorages>;\n\ninterface IParseMultipartOptions<C extends { req: any } = { req: any }> {\n storage?: TMultipartStorage;\n uploadDir?: string;\n context: C;\n}\n\ninterface IParsedFile {\n fieldname: string;\n originalname: string;\n encoding: string;\n mimetype: string;\n size: number;\n buffer?: Buffer;\n filename?: string;\n path?: string;\n}\n\n/** Files and the text fields posted beside them - dropping the second silently loses what the client sent. */\nexport interface IParsedMultipartBody {\n files: IParsedFile[];\n fields: Record<string, string>;\n}\n\n/** Control, format (bidi overrides, zero-width space) and lone surrogate characters: a format character reorders the name a client shows, a lone surrogate makes `encodeURIComponent` throw. The zero-width joiner and non-joiner stay: they build emoji sequences and Persian words, and reorder nothing. */\nconst UNENCODABLE_FILENAME_CHARACTERS = /(?![‌‍])[\\p{Cc}\\p{Cf}\\p{Cs}]/gu;\nconst LEADING_DOTS = /^\\.+/;\n\n/** How a client treats a download: ATTACHMENT saves it, INLINE shows it. */\nexport class ContentDispositionTypes {\n static readonly ATTACHMENT = 'attachment';\n static readonly INLINE = 'inline';\n\n static readonly SCHEME_SET = new Set<string>([this.ATTACHMENT, this.INLINE]);\n\n static isValid(value: string): boolean {\n return this.SCHEME_SET.has(value);\n }\n}\n\n/** Valid Content-Disposition type values. */\nexport type TContentDispositionType = TConstValue<typeof ContentDispositionTypes>;\n\nexport class RequestUtility {\n static async parseMultipartBody<C extends { req: any } = { req: any }>(\n opts: IParseMultipartOptions<C>,\n ): Promise<IParsedMultipartBody> {\n const { storage = MultipartStorages.MEMORY, uploadDir = './uploads', context } = opts;\n\n if (storage === MultipartStorages.DISK && !fs.existsSync(uploadDir)) {\n fs.mkdirSync(uploadDir, { recursive: true });\n }\n\n const formData = await FormBodyUtility.readFormBody({ req: context.req });\n const files: IParsedFile[] = [];\n const fields: Record<string, string> = {};\n\n const entries = formData.entries();\n for (const [fieldname, value] of entries) {\n if (typeof value === 'string') {\n // Last one wins, like a repeated query parameter.\n fields[fieldname] = value;\n continue;\n }\n\n const file = value as File;\n const arrayBuffer = await file.arrayBuffer();\n const buffer = Buffer.from(arrayBuffer);\n\n const parsedFile: IParsedFile = {\n fieldname,\n originalname: file.name,\n encoding: 'utf8',\n mimetype: file.type,\n size: file.size,\n };\n\n switch (storage) {\n case MultipartStorages.MEMORY: {\n parsedFile.buffer = buffer;\n break;\n }\n case MultipartStorages.DISK: {\n const timestamp = Date.now();\n const randomString = Math.random().toString(36).substring(7);\n // Sanitize filename to prevent path traversal\n const sanitizedName = path.basename(file.name).replace(/[^a-zA-Z0-9._-]/g, '_');\n const filename = `${timestamp}-${randomString}-${sanitizedName}`;\n const filepath = path.join(uploadDir, filename);\n\n fs.writeFileSync(filepath, buffer);\n\n parsedFile.filename = filename;\n parsedFile.path = filepath;\n break;\n }\n default: {\n throw getError({\n message: `[parseMultipartBody] storage: ${storage} | Invalid storage type | Valids: ['memory', 'disk']`,\n });\n }\n }\n\n files.push(parsedFile);\n }\n\n return { files, fields };\n }\n\n /** Sanitizes a filename by removing path components and dangerous characters. The result is printable ASCII. */\n static sanitizeFilename(opts: { filename: string }): string {\n const basename = path.basename(opts.filename);\n let sanitized = basename.replace(/[^\\w .-]/g, '_');\n sanitized = sanitized.replace(/^\\.+/, '');\n sanitized = sanitized.replace(/\\.{2,}/g, '.');\n sanitized = sanitized.replace(/\\.\\./g, '.');\n if (!sanitized || sanitized === '.' || sanitized.includes('..')) {\n sanitized = 'download';\n }\n return sanitized;\n }\n\n static encodeRfc5987(opts: { filename: string }): string {\n return encodeURIComponent(opts.filename)\n .replace(/['()]/g, (c) => '%' + c.charCodeAt(0).toString(16).toUpperCase())\n .replace(/\\*/g, '%2A');\n }\n\n static buildContentDispositionHeader(opts: {\n filename: string;\n type: TContentDispositionType;\n }): string {\n const { filename, type } = opts;\n const sanitized = RequestUtility.sanitizeFilename({ filename });\n const extendedName = path\n .basename(filename)\n .replace(UNENCODABLE_FILENAME_CHARACTERS, '_')\n .replace(LEADING_DOTS, '');\n const encoded = RequestUtility.encodeRfc5987({ filename: extendedName || sanitized });\n\n // filename= is the ASCII fallback for old browsers, filename*= the UTF-8 form for modern ones.\n return `${type}; filename=\"${sanitized}\"; filename*=UTF-8''${encoded}`;\n }\n\n /**\n * Reads a filename out of a `Content-Disposition` value.\n *\n * Three forms, in the order the RFC gives them precedence: `filename*=UTF-8''...` (percent-encoded,\n * and the one hand-rolled parsers miss), a quoted `filename=\"...\"`, and a bare `filename=...`.\n * Splitting on `filename=` alone returns the percent-encoded bytes for any non-ASCII name, which in\n * a product with non-English filenames is most of them.\n *\n * The pair of {@link RequestUtility.buildContentDispositionHeader}: one writes the header, this one reads it.\n */\n static parseContentDisposition(opts: { header: string | null | undefined }): {\n type?: string;\n filename?: string;\n } {\n const { header } = opts;\n\n if (!header) {\n return {};\n }\n\n const type = header.split(';')[0]?.trim() || undefined;\n\n // `filename*` wins when both are present - it is the one that can carry a non-ASCII name.\n const extended = header.match(/filename\\*\\s*=\\s*([^;]+)/i);\n if (extended) {\n const value = extended[1].trim();\n // `UTF-8''name` or `UTF-8'lang'name`; anything before the last quote is charset and language.\n const encoded = value.slice(value.lastIndexOf(\"'\") + 1);\n\n try {\n return { type, filename: decodeURIComponent(encoded) };\n // eslint-disable-next-line venizia/no-silent-catch -- a malformed `filename*` falls through to the plain `filename` parameter; only the extended name is lost\n } catch {\n // A malformed sequence is not worth failing a download over - fall through to `filename`.\n }\n }\n\n const quoted = header.match(/filename\\s*=\\s*\"([^\"]*)\"/i);\n if (quoted) {\n return { type, filename: quoted[1] };\n }\n\n const bare = header.match(/filename\\s*=\\s*([^;]+)/i);\n return { type, filename: bare ? bare[1].trim() : undefined };\n }\n}\n"]}
1
+ {"version":3,"file":"request.utility.js","sourceRoot":"","sources":["../../../src/utilities/request.utility.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAS7B,4HAA4H;AAC5H,MAAM,OAAO,iBAAiB;aACZ,WAAM,GAAG,QAAQ,CAAC;aAClB,SAAI,GAAG,MAAM,CAAC;aAEd,eAAU,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvE,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AA6BH,8SAA8S;AAC9S,MAAM,+BAA+B,GAAG,gCAAgC,CAAC;AACzE,MAAM,YAAY,GAAG,MAAM,CAAC;AAE5B,4EAA4E;AAC5E,MAAM,OAAO,uBAAuB;aAClB,eAAU,GAAG,YAAY,CAAC;aAC1B,WAAM,GAAG,QAAQ,CAAC;aAElB,eAAU,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAE7E,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AAMH,MAAM,OAAO,cAAc;IACzB,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAC7B,IAA+B;QAE/B,MAAM,EAAE,OAAO,GAAG,iBAAiB,CAAC,MAA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ormBodyUtility } from './form-body.utility';\nimport fs from 'node:fs';\nimport path from 'node:path';\n\nexport interface IRequestedRemark {\n id: string;\n url: string;\n method: string;\n [extra: string | symbol]: any;\n}\n\n/** Where `RequestUtility.parseMultipartBody` keeps an uploaded file: MEMORY (a buffer) or DISK (spooled to `uploadDir`). */\nexport class MultipartStorages {\n static readonly MEMORY = 'memory';\n static readonly DISK = 'disk';\n\n static readonly SCHEME_SET = new Set<string>([this.MEMORY, this.DISK]);\n\n static isValid(value: string): boolean {\n return this.SCHEME_SET.has(value);\n }\n}\n\n/** Valid multipart storage values. */\nexport type TMultipartStorage = TConstValue<typeof MultipartStorages>;\n\ninterface IParseMultipartOptions<C extends { req: any } = { req: any }> {\n storage?: TMultipartStorage;\n uploadDir?: string;\n context: C;\n}\n\ninterface IParsedFile {\n fieldname: string;\n originalname: string;\n encoding: string;\n mimetype: string;\n size: number;\n buffer?: Buffer;\n filename?: string;\n path?: string;\n}\n\n/** Files and the text fields posted beside them - dropping the second silently loses what the client sent. */\nexport interface IParsedMultipartBody {\n files: IParsedFile[];\n fields: Record<string, string>;\n}\n\n/** Control, format (bidi overrides, zero-width space) and lone surrogate characters: a format character reorders the name a client shows, a lone surrogate makes `encodeURIComponent` throw. The zero-width joiner and non-joiner stay: they build emoji sequences and Persian words, and reorder nothing. */\nconst UNENCODABLE_FILENAME_CHARACTERS = /(?![‌‍])[\\p{Cc}\\p{Cf}\\p{Cs}]/gu;\nconst LEADING_DOTS = /^\\.+/;\n\n/** How a client treats a download: ATTACHMENT saves it, INLINE shows it. */\nexport class ContentDispositionTypes {\n static readonly ATTACHMENT = 'attachment';\n static readonly INLINE = 'inline';\n\n static readonly SCHEME_SET = new Set<string>([this.ATTACHMENT, this.INLINE]);\n\n static isValid(value: string): boolean {\n return this.SCHEME_SET.has(value);\n }\n}\n\n/** Valid Content-Disposition type values. */\nexport type TContentDispositionType = TConstValue<typeof ContentDispositionTypes>;\n\nexport class RequestUtility {\n static async parseMultipartBody<C extends { req: any } = { req: any }>(\n opts: IParseMultipartOptions<C>,\n ): Promise<IParsedMultipartBody> {\n const { storage = MultipartStorages.MEMORY, uploadDir = './uploads', context } = opts;\n\n if (storage === MultipartStorages.DISK && !fs.existsSync(uploadDir)) {\n fs.mkdirSync(uploadDir, { recursive: true });\n }\n\n const formData = await FormBodyUtility.readFormBody({ req: context.req });\n const files: IParsedFile[] = [];\n const fields: Record<string, string> = {};\n\n const entries = formData.entries();\n\n for (const [fieldname, value] of entries) {\n if (typeof value === 'string') {\n // Last one wins, like a repeated query parameter.\n fields[fieldname] = value;\n continue;\n }\n\n const file = value as File;\n const arrayBuffer = await file.arrayBuffer();\n const buffer = Buffer.from(arrayBuffer);\n\n const parsedFile: IParsedFile = {\n fieldname,\n originalname: file.name,\n encoding: 'utf8',\n mimetype: file.type,\n size: file.size,\n };\n\n switch (storage) {\n case MultipartStorages.MEMORY: {\n parsedFile.buffer = buffer;\n break;\n }\n case MultipartStorages.DISK: {\n const timestamp = Date.now();\n const randomString = Math.random().toString(36).substring(7);\n // Sanitize filename to prevent path traversal\n const sanitizedName = path.basename(file.name).replace(/[^a-zA-Z0-9._-]/g, '_');\n const filename = `${timestamp}-${randomString}-${sanitizedName}`;\n const filepath = path.join(uploadDir, filename);\n\n fs.writeFileSync(filepath, buffer);\n\n parsedFile.filename = filename;\n parsedFile.path = filepath;\n break;\n }\n default: {\n throw getError({\n message: `[parseMultipartBody] storage: ${storage} | Invalid storage type | Valids: ['memory', 'disk']`,\n });\n }\n }\n\n files.push(parsedFile);\n }\n\n return { files, fields };\n }\n\n /** Sanitizes a filename by removing path components and dangerous characters. The result is printable ASCII. */\n static sanitizeFilename(opts: { filename: string }): string {\n const basename = path.basename(opts.filename);\n let sanitized = basename.replace(/[^\\w .-]/g, '_');\n sanitized = sanitized.replace(/^\\.+/, '');\n sanitized = sanitized.replace(/\\.{2,}/g, '.');\n sanitized = sanitized.replace(/\\.\\./g, '.');\n\n if (!sanitized || sanitized === '.' || sanitized.includes('..')) {\n sanitized = 'download';\n }\n\n return sanitized;\n }\n\n static encodeRfc5987(opts: { filename: string }): string {\n return encodeURIComponent(opts.filename)\n .replace(/['()]/g, (c) => '%' + c.charCodeAt(0).toString(16).toUpperCase())\n .replace(/\\*/g, '%2A');\n }\n\n static buildContentDispositionHeader(opts: {\n filename: string;\n type: TContentDispositionType;\n }): string {\n const { filename, type } = opts;\n const sanitized = RequestUtility.sanitizeFilename({ filename });\n const extendedName = path\n .basename(filename)\n .replace(UNENCODABLE_FILENAME_CHARACTERS, '_')\n .replace(LEADING_DOTS, '');\n const encoded = RequestUtility.encodeRfc5987({ filename: extendedName || sanitized });\n\n // filename= is the ASCII fallback for old browsers, filename*= the UTF-8 form for modern ones.\n return `${type}; filename=\"${sanitized}\"; filename*=UTF-8''${encoded}`;\n }\n\n /**\n * Reads a filename out of a `Content-Disposition` value.\n *\n * Three forms, in the order the RFC gives them precedence: `filename*=UTF-8''...` (percent-encoded,\n * and the one hand-rolled parsers miss), a quoted `filename=\"...\"`, and a bare `filename=...`.\n * Splitting on `filename=` alone returns the percent-encoded bytes for any non-ASCII name, which in\n * a product with non-English filenames is most of them.\n *\n * The pair of {@link RequestUtility.buildContentDispositionHeader}: one writes the header, this one reads it.\n */\n static parseContentDisposition(opts: { header: string | null | undefined }): {\n type?: string;\n filename?: string;\n } {\n const { header } = opts;\n\n if (!header) {\n return {};\n }\n\n const type = header.split(';')[0]?.trim() || undefined;\n\n // `filename*` wins when both are present - it is the one that can carry a non-ASCII name.\n const extended = header.match(/filename\\*\\s*=\\s*([^;]+)/i);\n\n if (extended) {\n const value = extended[1].trim();\n // `UTF-8''name` or `UTF-8'lang'name`; anything before the last quote is charset and language.\n const encoded = value.slice(value.lastIndexOf(\"'\") + 1);\n\n try {\n return { type, filename: decodeURIComponent(encoded) };\n // eslint-disable-next-line venizia/no-silent-catch -- a malformed `filename*` falls through to the plain `filename` parameter; only the extended name is lost\n } catch {\n // A malformed sequence is not worth failing a download over - fall through to `filename`.\n }\n }\n\n const quoted = header.match(/filename\\s*=\\s*\"([^\"]*)\"/i);\n\n if (quoted) {\n return { type, filename: quoted[1] };\n }\n\n const bare = header.match(/filename\\s*=\\s*([^;]+)/i);\n\n return { type, filename: bare ? bare[1].trim() : undefined };\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@venizia/ignis-helpers",
3
- "version": "0.4.7",
3
+ "version": "0.4.8-0",
4
4
  "description": "Production-ready TypeScript utility library: pluggable logging (winston or pino behind one ILogger contract), Redis single/cluster/sentinel with pub/sub, BullMQ/MQTT/Kafka message queues, MinIO/Disk/Bun-S3 object storage, AES-256/RSA/ECDH cryptography, Snowflake UID generation, cron scheduling, Socket.IO/WebSocket, TCP/TLS/UDP networking, HTTP clients, secrets/Vault, worker thread pools, and environment management. Sub-path imports isolate optional peer dependencies so the root barrel never forces a peer into your bundle.",
5
5
  "keywords": [
6
6
  "aes",
@@ -38,7 +38,6 @@
38
38
  "message-queue",
39
39
  "mqtt",
40
40
  "network",
41
- "nodejs",
42
41
  "object-storage",
43
42
  "pino",
44
43
  "production-ready",
@@ -93,6 +92,7 @@
93
92
  "LICENSE.md",
94
93
  "dist",
95
94
  "!**/__tests__",
95
+ "!**/*.d.ts.map",
96
96
  "!**/*.tsbuildinfo"
97
97
  ],
98
98
  "sideEffects": [
@@ -176,7 +176,7 @@
176
176
  "force-update": "sh ../../scripts/build/force-update.sh"
177
177
  },
178
178
  "dependencies": {
179
- "@venizia/ignis-inversion": "0.4.6",
179
+ "@venizia/ignis-inversion": "0.4.7-0",
180
180
  "reflect-metadata": "^0.2.2",
181
181
  "zod": "^4.6.7"
182
182
  },
@@ -188,7 +188,7 @@
188
188
  "@socket.io/redis-emitter": "^5.1.0",
189
189
  "@types/bun": "^1.4.3",
190
190
  "@types/luxon": "^3.7.6",
191
- "@venizia/dev-configs": "0.4.7",
191
+ "@venizia/dev-configs": "0.4.8-0",
192
192
  "axios": "^1.20.0",
193
193
  "bullmq": "^6.4.0",
194
194
  "cron": "^4.4.0",
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,qBAAa,QAAQ;IACnB,MAAM,CAAC,QAAQ,CAAC,gBAAgB,SAA8D;IAE9F,MAAM,CAAC,QAAQ,CAAC,WAAW,MAAM;IACjC,MAAM,CAAC,QAAQ,CAAC,YAAY,KAAK;CAClC;AAED,2HAA2H;AAC3H,qBAAa,cAAc;IACzB,MAAM,CAAC,QAAQ,CAAC,GAAG,SAAS;IAE5B,MAAM,CAAC,MAAM,IAAI,cAAc,GAAG,SAAS;IAI3C,MAAM,CAAC,KAAK,IAAI,OAAO;CAGxB;AACD,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC,OAAO,cAAc,CAAC,CAAC;AAEhE,qBAAa,SAAS;IACpB,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY;IAClC,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAC9B,MAAM,CAAC,QAAQ,CAAC,OAAO,aAAa;IAEpC,MAAM,CAAC,QAAQ,CAAC,UAAU,cAMvB;IAEH,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO;CAGzC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/duration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,qEAAqE;AACrE,qBAAa,aAAa;IACxB,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAiB;IAC5C,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY;IAClC,MAAM,CAAC,QAAQ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,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"mime.d.ts","sourceRoot":"","sources":["../../../../src/common/constants/mime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,qBAAa,SAAS;IACpB,MAAM,CAAC,QAAQ,CAAC,OAAO,aAAa;IACpC,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAChC,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAChC,MAAM,CAAC,QAAQ,CAAC,IAAI,UAAU;IAE9B,MAAM,CAAC,QAAQ,CAAC,UAAU,cAAsE;IAEhG,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGvC;AACD,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,CAAC;AAEvD,wEAAwE;AACxE,qBAAa,cAAc;IACzB,MAAM,CAAC,QAAQ,CAAC,GAAG,UAAU;IAC7B,MAAM,CAAC,QAAQ,CAAC,GAAG,UAAU;IAC7B,MAAM,CAAC,QAAQ,CAAC,IAAI,WAAW;IAC/B,MAAM,CAAC,QAAQ,CAAC,GAAG,UAAU;IAC7B,MAAM,CAAC,QAAQ,CAAC,IAAI,WAAW;IAC/B,MAAM,CAAC,QAAQ,CAAC,GAAG,UAAU;IAC7B,MAAM,CAAC,QAAQ,CAAC,GAAG,UAAU;IAC7B,MAAM,CAAC,QAAQ,CAAC,IAAI,WAAW;IAC/B,MAAM,CAAC,QAAQ,CAAC,GAAG,UAAU;IA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,6FAA6F;IAC7F,MAAM,CAAC,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,CA4BlB;IAE3D;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,YAAY;CAOzD;AAED,gGAAgG;AAChG,eAAO,MAAM,yBAAyB,iDAAgC,CAAC"}
@@ -1 +0,0 @@
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,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsx.d.ts","sourceRoot":"","sources":["../../../src/common/jsx.ts"],"names":[],"mappings":"AAAA,2XAA2X;AAC3X,YAAY,EAAE,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../../src/common/redact.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,QAAQ,eAAe,CAAC;AA0HrC,qBAAa,aAAa;IACxB;;;;;;;;OAQG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO;IAe/F,4dAA4d;IAC5d,MAAM,CAAC,UAAU,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO;IAWpE,oQAAoQ;IACpQ,MAAM,CAAC,oBAAoB,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;CAsB3D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolvers.d.ts","sourceRoot":"","sources":["../../../src/common/resolvers.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAKjD,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEnF,qBAAa,aAAa;IACxB,6EAA6E;IAC7E,MAAM,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE;QAC3B,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC;KAChD,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,MAAM;CAQvB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"class.d.ts","sourceRoot":"","sources":["../../../../src/common/types/class.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,KAAK,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AACxD,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,QAAQ,MAAM,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AACzE,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC;AACtE,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,oBAAoB,CAAC,CAAC,CAAC,GAAG;IAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAC;AAEtF,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,YAAY,CAAC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,CAAC;AACrE,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI,oBAAoB,CAAC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"const-value.d.ts","sourceRoot":"","sources":["../../../../src/common/types/const-value.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOzC,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC;AACxF,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC;AACxF,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"field-mapping.d.ts","sourceRoot":"","sources":["../../../../src/common/types/field-mapping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,6CAA6C;AAC7C,qBAAa,qBAAqB;IAChC,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY;IAClC,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY;IAClC,MAAM,CAAC,QAAQ,CAAC,OAAO,aAAa;IACpC,MAAM,CAAC,QAAQ,CAAC,OAAO,aAAa;IACpC,MAAM,CAAC,QAAQ,CAAC,OAAO,aAAa;IAEpC,MAAM,CAAC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E,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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../../../src/common/types/injection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../../src/common/types/resolver.ts"],"names":[],"mappings":"AAGA,YAAY,EACV,cAAc,EACd,SAAS,EACT,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,0BAA0B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../../../src/common/types/utility.ts"],"names":[],"mappings":"AAAA,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;AAEpC,MAAM,MAAM,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AACnF,MAAM,MAAM,mBAAmB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEzF,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,EAAE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":"AAA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AM,qBAAqB,CAAC;AAMjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAKvE,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM,4CAA4C,CAAC;AAClE,YAAY,EACV,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,4CAA4C,CAAC;AAKpD,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,YAAY,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,YAAY,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAE1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../src/modules/base.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAY7D,qBAAa,UAAU;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;gBAEP,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE;IAKxD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MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,OAAO,CAAA;KAAE;IAwBrE,SAAS,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE;CAcrC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/cron/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"abstract.algorithm.d.ts","sourceRoot":"","sources":["../../../../../src/modules/crypto/algorithms/abstract.algorithm.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;;;;GAKG;AACH,8BAAsB,uBAAuB,CAC3C,aAAa,SAAS,MAAM,EAC5B,gBAAgB,GAAG,OAAO,EAC1B,gBAAgB,GAAG,OAAO,EAC1B,aAAa,GAAG,OAAO,EACvB,iBAAiB,GAAG,OAAO,EAC3B,iBAAiB,GAAG,OAAO,EAC3B,YAAY,GAAG,OAAO,CAEtB,SAAQ,UACR,YACE,gBAAgB,CACd,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,CACb;IAEH,SAAS,EAAE,aAAa,CAAC;IAEzB,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE;QACrB,OAAO,EAAE,gBAAgB,CAAC;QAC1B,MAAM,EAAE,aAAa,CAAC;QACtB,IAAI,CAAC,EAAE,YAAY,CAAC;KACrB,GAAG,iBAAiB;IAErB,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE;QACrB,OAAO,EAAE,gBAAgB,CAAC;QAC1B,MAAM,EAAE,aAAa,CAAC;QACtB,IAAI,CAAC,EAAE,YAAY,CAAC;KACrB,GAAG,iBAAiB;CACtB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"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O;CAGvC;AAED,kCAAkC;AAClC,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"aes.engine.d.ts","sourceRoot":"","sources":["../../../../../src/modules/crypto/algorithms/aes.engine.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAavE;;;;;;GAMG;AACH,qBAAa,SAAS;WACP,IAAI,CAAC,IAAI,EAAE;QACtB,SAAS,EAAE,gBAAgB,CAAC;QAC5B,GAAG,EAAE,UAAU,CAAC;QAChB,EAAE,EAAE,UAAU,CAAC;QACf,KAAK,EAAE,UAAU,CAAC;KACnB,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,UAAU,CAAC;QAAC,OAAO,EAAE,UAAU,GAAG,IAAI,CAAA;KAAE,CAAC;IAoBnE,6HAA6H;WAChH,IAAI,CAAC,IAAI,EAAE;QACtB,SAAS,EAAE,gBAAgB,CAAC;QAC5B,GAAG,EAAE,UAAU,CAAC;QAChB,EAAE,EAAE,UAAU,CAAC;QACf,UAAU,EAAE,UAAU,CAAC;QACvB,OAAO,EAAE,UAAU,GAAG,IAAI,CAAC;KAC5B,GAAG,OAAO,CAAC,UAAU,CAAC;IAyBvB,sIAAsI;mBACjH,SAAS;IAuB9B,OAAO,CAAC,MAAM,CAAC,OAAO;IAItB,OAAO,CAAC,MAAM,CAAC,SAAS;CAoBzB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"base.algorithm.d.ts","sourceRoot":"","sources":["../../../../../src/modules/crypto/algorithms/base.algorithm.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAU/D,8BAAsB,mBAAmB,CACvC,aAAa,SAAS,MAAM,EAC5B,gBAAgB,GAAG,OAAO,EAC1B,gBAAgB,GAAG,OAAO,EAC1B,aAAa,GAAG,OAAO,EACvB,iBAAiB,GAAG,OAAO,EAC3B,iBAAiB,GAAG,OAAO,EAC3B,YAAY,GAAG,OAAO,CACtB,SAAQ,uBAAuB,CAC/B,aAAa,EACb,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,iBAAiB,EACjB,YAAY,CACb;gBACa,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,aAAa,CAAA;KAAE;IAU7D,qBAAqB,CAAC,IAAI,EAAE;QAAE,SAAS,EAAE,aAAa,CAAA;KAAE;IAUxD;;;OAGG;IACG,kBAAkB,CAAC,IAAI,EAAE;QAC7B,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,GAAG,OAAO,CAAC,MAAM,CAAC;IAwBnB,kHAAkH;IAClH,OAAO,CAAC,UAAU;YAmBJ,YAAY;IA4B1B,uJAAuJ;IACvJ,OAAO,CAAC,eAAe;IAWvB,mBAAmB;CAIpB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"credential.algorithm.d.ts","sourceRoot":"","sources":["../../../../../src/modules/crypto/algorithms/credential.algorithm.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,WAAW,CAAC;AAWnB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,gBAAgB;IAC3B;;;;OAIG;WACU,IAAI,CAAC,IAAI,EAAE;QACtB,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,oBAAoB,CAAC;QACjC,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,GAAG,OAAO,CAAC,MAAM,CAAC;IAsCnB;;;;OAIG;WACU,MAAM,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,IAAI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