@mrxsys/mrx-core 2.4.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. package/CHANGELOG.md +329 -31
  2. package/README.md +3 -3
  3. package/dist/chunk-1a3wj3m1.js +272 -0
  4. package/dist/chunk-370444pc.js +43 -0
  5. package/dist/chunk-5qtpggzv.js +38 -0
  6. package/dist/chunk-84mqvfsk.js +69 -0
  7. package/dist/chunk-cq973ydc.js +82 -0
  8. package/dist/chunk-f5z7x01b.js +352 -0
  9. package/dist/chunk-pc66jgqv.js +220 -0
  10. package/dist/chunk-s07amdhx.js +77 -0
  11. package/dist/chunk-v8v7982b.js +58 -0
  12. package/dist/chunk-vknq69e0.js +23 -0
  13. package/dist/chunk-yvyahr2h.js +40 -0
  14. package/dist/errors/baseError.d.ts +9 -0
  15. package/dist/errors/enums/httpErrorStatusCodes.d.ts +42 -0
  16. package/dist/errors/httpError.d.ts +14 -0
  17. package/dist/errors/index.d.ts +2 -0
  18. package/dist/errors/index.js +11 -0
  19. package/dist/errors/types/baseErrorOptions.d.ts +15 -0
  20. package/dist/errors/types/httpErrorOptions.d.ts +13 -0
  21. package/dist/errors/types/index.d.ts +2 -0
  22. package/dist/modules/data/data.d.ts +115 -0
  23. package/dist/modules/data/enums/dataErrorKeys.d.ts +3 -0
  24. package/dist/modules/data/index.d.ts +1 -0
  25. package/dist/modules/data/index.js +16 -0
  26. package/dist/modules/data/transformers/camelCase.d.ts +25 -0
  27. package/dist/modules/data/transformers/index.d.ts +4 -0
  28. package/dist/modules/data/transformers/index.js +32 -0
  29. package/dist/modules/data/transformers/kebabCase.d.ts +25 -0
  30. package/dist/modules/data/transformers/pascalCase.d.ts +25 -0
  31. package/dist/modules/data/transformers/snakeCase.d.ts +25 -0
  32. package/dist/modules/data/types/camelCase.d.ts +1 -0
  33. package/dist/modules/data/types/caseTransformer.d.ts +13 -0
  34. package/dist/modules/data/types/index.d.ts +10 -0
  35. package/dist/modules/data/types/kebabCase.d.ts +1 -0
  36. package/dist/modules/data/types/pascalCase.d.ts +2 -0
  37. package/dist/modules/data/types/snakeCase.d.ts +1 -0
  38. package/dist/modules/data/types/transformKeysCamelCase.d.ts +4 -0
  39. package/dist/modules/data/types/transformKeysKebabCase.d.ts +4 -0
  40. package/dist/modules/data/types/transformKeysPascalCase.d.ts +4 -0
  41. package/dist/modules/data/types/transformKeysSnakeCase.d.ts +4 -0
  42. package/dist/modules/data/types/transformObjectKeys.d.ts +9 -0
  43. package/dist/modules/database/enums/databaseErrorKeys.d.ts +28 -0
  44. package/dist/modules/database/enums/mssqlErrorCode.d.ts +25 -0
  45. package/dist/modules/database/events/index.d.ts +2 -0
  46. package/dist/modules/database/events/mssqlEventMap.d.ts +6 -0
  47. package/dist/modules/database/events/tableEventMap.d.ts +7 -0
  48. package/dist/modules/database/index.d.ts +2 -0
  49. package/dist/modules/database/index.js +14 -0
  50. package/dist/{database → modules/database}/mssql.d.ts +21 -25
  51. package/dist/{database → modules/database}/table.d.ts +6 -6
  52. package/dist/modules/database/types/index.d.ts +3 -0
  53. package/dist/{database → modules/database}/types/mssqlDatabaseOption.d.ts +16 -37
  54. package/dist/modules/database/types/mssqlEventLog.d.ts +14 -0
  55. package/dist/modules/database/types/queryContext.d.ts +11 -0
  56. package/dist/modules/elysia/crud/crud.d.ts +46 -0
  57. package/dist/modules/elysia/crud/index.d.ts +1 -0
  58. package/dist/modules/elysia/crud/index.js +299 -0
  59. package/dist/modules/elysia/crud/types/crudOperationBaseOptions.d.ts +6 -0
  60. package/dist/modules/elysia/crud/types/crudOperationCountOptions.d.ts +2 -0
  61. package/dist/modules/elysia/crud/types/crudOperationDeleteOneOptions.d.ts +2 -0
  62. package/dist/modules/elysia/crud/types/crudOperationDeleteOptions.d.ts +2 -0
  63. package/dist/modules/elysia/crud/types/crudOperationFindOneOptions.d.ts +2 -0
  64. package/dist/modules/elysia/crud/types/crudOperationFindOptions.d.ts +2 -0
  65. package/dist/modules/elysia/crud/types/crudOperationInsertOptions.d.ts +2 -0
  66. package/dist/modules/elysia/crud/types/crudOperationUpdateOneOptions.d.ts +2 -0
  67. package/dist/modules/elysia/crud/types/crudOperationUpdateOptions.d.ts +2 -0
  68. package/dist/modules/elysia/crud/types/crudOperationsOptions.d.ts +18 -0
  69. package/dist/modules/elysia/crud/types/crudOptions.d.ts +23 -0
  70. package/dist/modules/elysia/crud/types/index.d.ts +11 -0
  71. package/dist/modules/elysia/crudSchema/crudSchema.d.ts +18 -0
  72. package/dist/modules/elysia/crudSchema/index.d.ts +1 -0
  73. package/dist/modules/elysia/crudSchema/index.js +10 -0
  74. package/dist/modules/elysia/crudSchema/types/adaptiveWhereClauseSchema.d.ts +31 -0
  75. package/dist/modules/elysia/crudSchema/types/crudModelsType.d.ts +14 -0
  76. package/dist/modules/elysia/crudSchema/types/crudSchemaOperations.d.ts +10 -0
  77. package/dist/modules/elysia/crudSchema/types/crudSchemaOptions.d.ts +13 -0
  78. package/dist/modules/elysia/crudSchema/types/index.d.ts +8 -0
  79. package/dist/modules/elysia/crudSchema/types/orderSchema.d.ts +11 -0
  80. package/dist/modules/elysia/crudSchema/types/qSchema.d.ts +15 -0
  81. package/dist/modules/elysia/crudSchema/types/queryOptionsBuilderOptions.d.ts +11 -0
  82. package/dist/modules/elysia/crudSchema/types/selectedFieldSchema.d.ts +6 -0
  83. package/dist/modules/elysia/crudSchema/utils/createAdaptiveWhereClauseSchema.d.ts +17 -0
  84. package/dist/modules/elysia/crudSchema/utils/createCountResponse200Schema.d.ts +11 -0
  85. package/dist/modules/elysia/crudSchema/utils/createCountSchema.d.ts +16 -0
  86. package/dist/modules/elysia/crudSchema/utils/createDeleteSchema.d.ts +18 -0
  87. package/dist/modules/elysia/crudSchema/utils/createFiltersSchema.d.ts +17 -0
  88. package/dist/modules/elysia/crudSchema/utils/createFindSchema.d.ts +22 -0
  89. package/dist/modules/elysia/crudSchema/utils/createIdParamSchema.d.ts +4 -0
  90. package/dist/modules/elysia/crudSchema/utils/createInsertSchema.d.ts +8 -0
  91. package/dist/modules/elysia/crudSchema/utils/createOrderSchema.d.ts +12 -0
  92. package/dist/modules/elysia/crudSchema/utils/createPropertiesSchema.d.ts +12 -0
  93. package/dist/modules/elysia/crudSchema/utils/createQSchema.d.ts +12 -0
  94. package/dist/modules/elysia/crudSchema/utils/createResponse200Schema.d.ts +5 -0
  95. package/dist/modules/elysia/crudSchema/utils/createSelectedFieldsSchema.d.ts +12 -0
  96. package/dist/modules/elysia/crudSchema/utils/createUpdateOneSchema.d.ts +4 -0
  97. package/dist/modules/elysia/crudSchema/utils/createUpdateSchema.d.ts +10 -0
  98. package/dist/modules/elysia/crudSchema/utils/index.d.ts +15 -0
  99. package/dist/modules/elysia/crudSchema/utils/index.js +37 -0
  100. package/dist/modules/elysia/crudSchema/utils/isDateFromElysiaTypeBox.d.ts +2 -0
  101. package/dist/modules/elysia/dbResolver/dbResolver.d.ts +17 -0
  102. package/dist/modules/elysia/dbResolver/enums/dbResolverErrorKeys.d.ts +3 -0
  103. package/dist/modules/elysia/dbResolver/index.d.ts +1 -0
  104. package/dist/modules/elysia/dbResolver/index.js +14 -0
  105. package/dist/modules/elysia/dbResolver/types/dynamicDbOptions.d.ts +7 -0
  106. package/dist/modules/elysia/dbResolver/types/index.d.ts +1 -0
  107. package/dist/modules/elysia/error/error.d.ts +34 -0
  108. package/dist/modules/elysia/error/index.d.ts +1 -0
  109. package/dist/modules/elysia/error/index.js +58 -0
  110. package/dist/modules/elysia/jwt/enums/jwtErrorKeys.d.ts +4 -0
  111. package/dist/modules/elysia/jwt/index.d.ts +1 -0
  112. package/dist/modules/elysia/jwt/index.js +81 -0
  113. package/dist/modules/elysia/jwt/jwt.d.ts +119 -0
  114. package/dist/modules/elysia/jwt/types/index.d.ts +1 -0
  115. package/dist/modules/elysia/jwt/types/jwtOptions.d.ts +98 -0
  116. package/dist/modules/elysia/microservice/index.d.ts +1 -0
  117. package/dist/modules/elysia/microservice/index.js +96 -0
  118. package/dist/{elysia → modules/elysia/microservice}/microservice.d.ts +1 -1
  119. package/dist/modules/elysia/ratelimit/enums/ratelimitErrorKeys.d.ts +3 -0
  120. package/dist/modules/elysia/ratelimit/index.d.ts +1 -0
  121. package/dist/modules/elysia/ratelimit/index.js +55 -0
  122. package/dist/{elysia → modules/elysia/ratelimit}/ratelimit.d.ts +3 -13
  123. package/dist/modules/elysia/ratelimit/types/index.d.ts +1 -0
  124. package/dist/{elysia → modules/elysia/ratelimit}/types/rateLimitOptions.d.ts +6 -16
  125. package/dist/modules/logger/enums/loggerErrorKeys.d.ts +6 -0
  126. package/dist/modules/logger/events/index.d.ts +1 -0
  127. package/dist/modules/logger/events/loggerEvents.d.ts +11 -0
  128. package/dist/modules/logger/index.d.ts +1 -0
  129. package/dist/modules/logger/index.js +139 -0
  130. package/dist/modules/logger/logger.d.ts +189 -0
  131. package/dist/{logger → modules/logger}/strategies/consoleLogger.d.ts +4 -4
  132. package/dist/{logger → modules/logger}/strategies/fileLogger.d.ts +4 -4
  133. package/dist/modules/logger/strategies/index.d.ts +2 -0
  134. package/dist/modules/logger/strategies/index.js +44 -0
  135. package/dist/modules/logger/types/index.d.ts +6 -0
  136. package/dist/modules/logger/types/index.js +1 -0
  137. package/dist/{logger → modules/logger}/types/logStreamChunk.d.ts +4 -4
  138. package/dist/{logger → modules/logger}/types/loggerStrategy.d.ts +1 -1
  139. package/dist/modules/mailer/enums/mailerErrorKeys.d.ts +5 -0
  140. package/dist/modules/mailer/index.d.ts +1 -0
  141. package/dist/modules/mailer/index.js +64 -0
  142. package/dist/{mailer → modules/mailer}/smtp.d.ts +6 -6
  143. package/dist/modules/mailer/types/index.d.ts +3 -0
  144. package/dist/modules/mailer/types/index.js +1 -0
  145. package/dist/{mailer → modules/mailer}/types/smtpCredentials.d.ts +2 -2
  146. package/dist/{mailer → modules/mailer}/types/smtpOptions.d.ts +5 -5
  147. package/dist/{mailer → modules/mailer}/types/smtpPoolOptions.d.ts +1 -1
  148. package/dist/modules/repository/index.d.ts +1 -0
  149. package/dist/modules/repository/index.js +10 -0
  150. package/dist/modules/repository/repository.d.ts +421 -0
  151. package/dist/modules/repository/types/adaptiveWhereClause.d.ts +30 -0
  152. package/dist/modules/repository/types/filter.d.ts +43 -0
  153. package/dist/modules/repository/types/index.d.ts +8 -0
  154. package/dist/modules/repository/types/index.js +1 -0
  155. package/dist/modules/repository/types/orderByItem.d.ts +42 -0
  156. package/dist/modules/repository/types/queryOptions.d.ts +36 -0
  157. package/dist/{repository → modules/repository}/types/queryOptionsExtendPagination.d.ts +2 -2
  158. package/dist/{repository → modules/repository}/types/queryOptionsExtendStream.d.ts +1 -1
  159. package/dist/modules/repository/types/selectedFields.d.ts +37 -0
  160. package/dist/modules/singletonManager/enums/singletonManagerErrorKeys.d.ts +4 -0
  161. package/dist/modules/singletonManager/index.d.ts +1 -0
  162. package/dist/modules/singletonManager/index.js +8 -0
  163. package/dist/modules/singletonManager/singletonManager.d.ts +75 -0
  164. package/dist/modules/typedEventEmitter/index.d.ts +1 -0
  165. package/dist/modules/typedEventEmitter/index.js +7 -0
  166. package/dist/{typedEventEmitter → modules/typedEventEmitter}/typedEventEmitter.d.ts +33 -11
  167. package/dist/modules/typedEventEmitter/types/index.d.ts +1 -0
  168. package/dist/modules/typedEventEmitter/types/index.js +1 -0
  169. package/dist/utils/enums/utilsErrorKeys.d.ts +3 -0
  170. package/dist/utils/env.d.ts +1 -1
  171. package/dist/utils/index.d.ts +3 -3
  172. package/dist/utils/index.js +32 -1
  173. package/dist/utils/isDateString.d.ts +16 -0
  174. package/dist/utils/stream.d.ts +12 -1
  175. package/dist/utils/types/index.d.ts +1 -1
  176. package/dist/utils/types/streamWithAsyncIterable.d.ts +12 -5
  177. package/package.json +157 -128
  178. package/dist/chunk-1c7w5cx7.js +0 -3
  179. package/dist/chunk-40pg2cqx.js +0 -2
  180. package/dist/chunk-4v4tp5qj.js +0 -2
  181. package/dist/chunk-4w7nd4nw.js +0 -2
  182. package/dist/chunk-5nvsx7md.js +0 -2
  183. package/dist/chunk-89mnpfvy.js +0 -2
  184. package/dist/chunk-91srr77d.js +0 -2
  185. package/dist/chunk-9hj714bv.js +0 -2
  186. package/dist/chunk-9rss6865.js +0 -2
  187. package/dist/chunk-df9xr1f5.js +0 -2
  188. package/dist/chunk-dq00mfya.js +0 -2
  189. package/dist/chunk-fnb68m68.js +0 -2
  190. package/dist/chunk-g6a16nyh.js +0 -2
  191. package/dist/chunk-gtgpa8nc.js +0 -2
  192. package/dist/chunk-gxjax5n3.js +0 -2
  193. package/dist/chunk-h9er1sh5.js +0 -2
  194. package/dist/chunk-mwpajm9x.js +0 -2
  195. package/dist/chunk-n5w9cwwg.js +0 -2
  196. package/dist/chunk-pt7wrvtr.js +0 -2
  197. package/dist/chunk-qndyhwdn.js +0 -2
  198. package/dist/chunk-v5dfx8mh.js +0 -2
  199. package/dist/chunk-wgq0yyqw.js +0 -2
  200. package/dist/chunk-wtfcgg9s.js +0 -2
  201. package/dist/chunk-z00b1r18.js +0 -2
  202. package/dist/data/data.d.ts +0 -99
  203. package/dist/data/enums/dataErrorKeys.d.ts +0 -7
  204. package/dist/data/enums/index.d.ts +0 -1
  205. package/dist/data/enums/index.js +0 -2
  206. package/dist/data/index.d.ts +0 -1
  207. package/dist/data/index.js +0 -2
  208. package/dist/data/transformers/camelCase.d.ts +0 -25
  209. package/dist/data/transformers/index.d.ts +0 -4
  210. package/dist/data/transformers/index.js +0 -2
  211. package/dist/data/transformers/kebabCase.d.ts +0 -25
  212. package/dist/data/transformers/pascalCase.d.ts +0 -25
  213. package/dist/data/transformers/snakeCase.d.ts +0 -25
  214. package/dist/data/types/index.d.ts +0 -1
  215. package/dist/data/types/keyTransformer.d.ts +0 -11
  216. package/dist/database/enums/databaseErrorKeys.d.ts +0 -52
  217. package/dist/database/enums/index.d.ts +0 -2
  218. package/dist/database/enums/index.js +0 -2
  219. package/dist/database/enums/mssqlErrorCode.d.ts +0 -25
  220. package/dist/database/events/index.d.ts +0 -2
  221. package/dist/database/events/mssqlEventMap.d.ts +0 -6
  222. package/dist/database/events/tableEventMap.d.ts +0 -7
  223. package/dist/database/index.d.ts +0 -2
  224. package/dist/database/index.js +0 -2
  225. package/dist/database/types/index.d.ts +0 -3
  226. package/dist/database/types/mssqlEventLog.d.ts +0 -29
  227. package/dist/database/types/queryContext.d.ts +0 -11
  228. package/dist/elysia/advancedSearch.d.ts +0 -460
  229. package/dist/elysia/crud.d.ts +0 -609
  230. package/dist/elysia/dynamicDatabaseSelector.d.ts +0 -352
  231. package/dist/elysia/enums/elysiaErrorKeys.d.ts +0 -12
  232. package/dist/elysia/enums/httpStatusCode.d.ts +0 -241
  233. package/dist/elysia/enums/index.d.ts +0 -2
  234. package/dist/elysia/enums/index.js +0 -2
  235. package/dist/elysia/error.d.ts +0 -46
  236. package/dist/elysia/index.d.ts +0 -7
  237. package/dist/elysia/index.js +0 -2
  238. package/dist/elysia/jwt.d.ts +0 -46
  239. package/dist/elysia/schemas/index.d.ts +0 -2
  240. package/dist/elysia/schemas/index.js +0 -2
  241. package/dist/elysia/types/crudOptions.d.ts +0 -126
  242. package/dist/elysia/types/crudRoutes.d.ts +0 -2
  243. package/dist/elysia/types/dynamicDatabaseSelectorPluginOptions.d.ts +0 -30
  244. package/dist/elysia/types/index.d.ts +0 -5
  245. package/dist/elysia/types/jwtOptions.d.ts +0 -92
  246. package/dist/error/coreError.d.ts +0 -89
  247. package/dist/error/index.d.ts +0 -1
  248. package/dist/error/index.js +0 -2
  249. package/dist/error/types/coreErrorOptions.d.ts +0 -21
  250. package/dist/error/types/index.d.ts +0 -1
  251. package/dist/index.d.ts +0 -68
  252. package/dist/index.js +0 -2
  253. package/dist/logger/enums/index.d.ts +0 -1
  254. package/dist/logger/enums/index.js +0 -2
  255. package/dist/logger/enums/loggerErrorKeys.d.ts +0 -6
  256. package/dist/logger/events/index.d.ts +0 -1
  257. package/dist/logger/events/loggerEvents.d.ts +0 -4
  258. package/dist/logger/index.d.ts +0 -1
  259. package/dist/logger/index.js +0 -2
  260. package/dist/logger/logger.d.ts +0 -173
  261. package/dist/logger/strategies/index.d.ts +0 -2
  262. package/dist/logger/strategies/index.js +0 -2
  263. package/dist/logger/types/index.d.ts +0 -6
  264. package/dist/mailer/enums/index.d.ts +0 -1
  265. package/dist/mailer/enums/index.js +0 -2
  266. package/dist/mailer/enums/mailerErrorKeys.d.ts +0 -8
  267. package/dist/mailer/index.d.ts +0 -1
  268. package/dist/mailer/index.js +0 -2
  269. package/dist/mailer/types/index.d.ts +0 -3
  270. package/dist/repository/index.d.ts +0 -1
  271. package/dist/repository/index.js +0 -2
  272. package/dist/repository/repository.d.ts +0 -378
  273. package/dist/repository/types/advancedSearch.d.ts +0 -47
  274. package/dist/repository/types/index.d.ts +0 -8
  275. package/dist/repository/types/orderBy.d.ts +0 -21
  276. package/dist/repository/types/queryOptions.d.ts +0 -33
  277. package/dist/repository/types/selectedFields.d.ts +0 -16
  278. package/dist/repository/types/whereClause.d.ts +0 -15
  279. package/dist/singletonManager/enums/index.d.ts +0 -1
  280. package/dist/singletonManager/enums/index.js +0 -2
  281. package/dist/singletonManager/enums/singletonManagerErrorKeys.d.ts +0 -7
  282. package/dist/singletonManager/index.d.ts +0 -1
  283. package/dist/singletonManager/index.js +0 -2
  284. package/dist/singletonManager/singletonManager.d.ts +0 -112
  285. package/dist/store/index.d.ts +0 -1
  286. package/dist/store/index.js +0 -2
  287. package/dist/store/redis.d.ts +0 -6
  288. package/dist/typedEventEmitter/index.d.ts +0 -1
  289. package/dist/typedEventEmitter/index.js +0 -2
  290. package/dist/typedEventEmitter/types/index.d.ts +0 -1
  291. package/dist/utils/enums/index.d.ts +0 -1
  292. package/dist/utils/enums/index.js +0 -2
  293. package/dist/utils/enums/utilErrorKeys.d.ts +0 -4
  294. package/dist/utils/isIsoDateString.d.ts +0 -1
  295. /package/dist/{data → errors}/types/index.js +0 -0
  296. /package/dist/{database/events → modules/data/types}/index.js +0 -0
  297. /package/dist/{database/types → modules/database/events}/index.js +0 -0
  298. /package/dist/{elysia → modules/database}/types/index.js +0 -0
  299. /package/dist/{error → modules/elysia/crud}/types/index.js +0 -0
  300. /package/dist/{logger/events → modules/elysia/crudSchema/types}/index.js +0 -0
  301. /package/dist/{logger → modules/elysia/dbResolver}/types/index.js +0 -0
  302. /package/dist/{mailer → modules/elysia/jwt}/types/index.js +0 -0
  303. /package/dist/{elysia → modules/elysia/microservice}/schemas/info.d.ts +0 -0
  304. /package/dist/{elysia → modules/elysia/microservice}/schemas/ping.d.ts +0 -0
  305. /package/dist/{repository → modules/elysia/ratelimit}/types/index.js +0 -0
  306. /package/dist/{typedEventEmitter/types → modules/logger/events}/index.js +0 -0
  307. /package/dist/{logger → modules/logger}/types/bodiesIntersection.d.ts +0 -0
  308. /package/dist/{logger → modules/logger}/types/logLevels.d.ts +0 -0
  309. /package/dist/{logger → modules/logger}/types/strategyBody.d.ts +0 -0
  310. /package/dist/{logger → modules/logger}/types/strategyMap.d.ts +0 -0
  311. /package/dist/{repository → modules/repository}/types/transaction.d.ts +0 -0
  312. /package/dist/{typedEventEmitter → modules/typedEventEmitter}/types/eventMap.d.ts +0 -0
@@ -0,0 +1,139 @@
1
+ // @bun
2
+ import {
3
+ TypedEventEmitter
4
+ } from "../../chunk-yvyahr2h.js";
5
+ import {
6
+ BaseError
7
+ } from "../../chunk-vknq69e0.js";
8
+
9
+ // source/modules/logger/logger.ts
10
+ import { once } from "events";
11
+ import { Transform } from "stream";
12
+
13
+ // source/modules/logger/enums/loggerErrorKeys.ts
14
+ var LOGGER_ERROR_KEYS = {
15
+ STRATEGY_ALREADY_ADDED: "logger.error.strategy_already_added",
16
+ STRATEGY_NOT_FOUND: "logger.error.strategy_not_found",
17
+ NO_STRATEGY_ADDED: "logger.error.no_strategy_added",
18
+ STRATEGY_ERROR: "logger.error.strategy_error"
19
+ };
20
+
21
+ // source/modules/logger/logger.ts
22
+ class Logger extends TypedEventEmitter {
23
+ _strategies;
24
+ _logStream;
25
+ _pendingLogs = [];
26
+ _maxPendingLogs;
27
+ _isWriting = false;
28
+ constructor(strategies = {}, maxPendingLogs = 1e4) {
29
+ super();
30
+ this._strategies = strategies;
31
+ this._maxPendingLogs = maxPendingLogs;
32
+ this._logStream = new Transform({
33
+ objectMode: true,
34
+ transform: (chunk, _, callback) => {
35
+ this._executeStrategies(chunk.level, new Date(chunk.date), chunk.object, chunk.strategiesNames).then(() => callback()).catch((error) => {
36
+ this.emit("error", error);
37
+ callback();
38
+ });
39
+ }
40
+ });
41
+ }
42
+ registerStrategy(name, strategy) {
43
+ if (this._strategies[name])
44
+ throw new BaseError({
45
+ message: LOGGER_ERROR_KEYS.STRATEGY_ALREADY_ADDED,
46
+ cause: { strategyName: name }
47
+ });
48
+ return new Logger({
49
+ ...this._strategies,
50
+ [name]: strategy
51
+ }, this._maxPendingLogs);
52
+ }
53
+ unregisterStrategy(name) {
54
+ if (!(name in this._strategies))
55
+ throw new BaseError({
56
+ message: LOGGER_ERROR_KEYS.STRATEGY_NOT_FOUND,
57
+ cause: { strategyName: name }
58
+ });
59
+ const { [name]: _, ...rest } = this._strategies;
60
+ return new Logger(rest, this._maxPendingLogs);
61
+ }
62
+ registerStrategies(strategies) {
63
+ return strategies.reduce((logger, [name, strategy]) => logger.registerStrategy(name, strategy), this);
64
+ }
65
+ unregisterStrategies(names) {
66
+ let logger = this;
67
+ for (const name of names)
68
+ logger = logger.unregisterStrategy(name);
69
+ return logger;
70
+ }
71
+ clearStrategies() {
72
+ return new Logger({}, this._maxPendingLogs);
73
+ }
74
+ error(object, strategiesNames) {
75
+ this._out("ERROR", object, strategiesNames);
76
+ }
77
+ warn(object, strategiesNames) {
78
+ this._out("WARN", object, strategiesNames);
79
+ }
80
+ info(object, strategiesNames) {
81
+ this._out("INFO", object, strategiesNames);
82
+ }
83
+ debug(object, strategiesNames) {
84
+ this._out("DEBUG", object, strategiesNames);
85
+ }
86
+ log(object, strategiesNames) {
87
+ this._out("LOG", object, strategiesNames);
88
+ }
89
+ async _executeStrategies(level, date, object, strategiesNames) {
90
+ await Promise.all(strategiesNames.map(async (name) => {
91
+ try {
92
+ await this._strategies[name]?.log(level, date, object);
93
+ } catch (error) {
94
+ throw new BaseError({
95
+ message: LOGGER_ERROR_KEYS.STRATEGY_ERROR,
96
+ cause: { strategyName: name, object, error }
97
+ });
98
+ }
99
+ }));
100
+ }
101
+ _out(level, object, strategiesNames) {
102
+ const strategyKeys = Object.keys(this._strategies);
103
+ if (strategyKeys.length === 0)
104
+ throw new BaseError({
105
+ message: LOGGER_ERROR_KEYS.NO_STRATEGY_ADDED,
106
+ cause: { level, object }
107
+ });
108
+ if (this._pendingLogs.length >= this._maxPendingLogs)
109
+ return;
110
+ const log = {
111
+ date: new Date().toISOString(),
112
+ level,
113
+ object,
114
+ strategiesNames: strategiesNames ? strategiesNames : strategyKeys
115
+ };
116
+ this._pendingLogs.push(log);
117
+ if (!this._isWriting) {
118
+ this._isWriting = true;
119
+ setImmediate(() => {
120
+ this._writeLog();
121
+ });
122
+ }
123
+ }
124
+ async _writeLog() {
125
+ while (this._pendingLogs.length > 0) {
126
+ const pendingLog = this._pendingLogs.shift();
127
+ if (!pendingLog)
128
+ continue;
129
+ const canWrite = this._logStream.write(pendingLog);
130
+ if (!canWrite)
131
+ await once(this._logStream, "drain");
132
+ }
133
+ this._isWriting = false;
134
+ this.emit("end");
135
+ }
136
+ }
137
+ export {
138
+ Logger
139
+ };
@@ -0,0 +1,189 @@
1
+ import { TypedEventEmitter } from '../../modules/typedEventEmitter/typedEventEmitter';
2
+ import type { LoggerEvent } from './events/loggerEvents';
3
+ import type { BodiesIntersection } from './types/bodiesIntersection';
4
+ import type { LoggerStrategy } from './types/loggerStrategy';
5
+ import type { StrategyMap } from './types/strategyMap';
6
+ /**
7
+ * Logger provides a flexible, type-safe logging system that allows multiple strategies for log output.
8
+ * The logger uses a transform stream to process log entries and execute the logging strategies.
9
+ *
10
+ * Logger extends the TypedEventEmitter class to emit typed events when an error occurs or when the logger ends.
11
+ * The logger can log messages with different levels: error, warn, info, debug, and log.
12
+ *
13
+ * @template TStrategies - The map of strategy names to LoggerStrategy types.
14
+ */
15
+ export declare class Logger<TStrategies extends StrategyMap = {}> extends TypedEventEmitter<LoggerEvent> {
16
+ /**
17
+ * The map of strategies.
18
+ */
19
+ private readonly _strategies;
20
+ /**
21
+ * The transform stream for processing log entries.
22
+ */
23
+ private readonly _logStream;
24
+ /**
25
+ * The queue of pending log entries.
26
+ */
27
+ private readonly _pendingLogs;
28
+ /**
29
+ * The maximum number of pending logs.
30
+ * @defaultValue 10_000
31
+ */
32
+ private readonly _maxPendingLogs;
33
+ /**
34
+ * Flag to indicate if the logger is currently writing logs.
35
+ */
36
+ private _isWriting;
37
+ /**
38
+ * Construct a Logger.
39
+ *
40
+ * @template TStrategies - The map of strategy names to LoggerStrategy types.
41
+ *
42
+ * @param strategies - Initial strategies map.
43
+ *
44
+ * @param maxPendingLogs - Maximum number of logs in the queue (default: 10_000)
45
+ */
46
+ constructor(strategies?: TStrategies, maxPendingLogs?: number);
47
+ /**
48
+ * Register a new logging strategy.
49
+ *
50
+ * @template Key - The name of the strategy.
51
+ * @template Strategy - The strategy type.
52
+ *
53
+ * @param name - The name of the strategy.
54
+ * @param strategy - The strategy to add. It must implement {@link LoggerStrategy}.
55
+ *
56
+ * @throws ({@link BaseError}) - If the strategy is already added.
57
+ *
58
+ * @returns A new Logger instance with the added strategy.
59
+ */
60
+ registerStrategy<Key extends string, Strategy extends LoggerStrategy>(name: Key, strategy: Strategy): Logger<TStrategies & Record<Key, Strategy>>;
61
+ /**
62
+ * Unregister a logging strategy.
63
+ *
64
+ * @template Key - The name of the strategy.
65
+ *
66
+ * @param name - The name of the strategy to remove.
67
+ *
68
+ * @throws ({@link BaseError}) - If the strategy is not found.
69
+ *
70
+ * @returns A new Logger instance without the removed strategy.
71
+ */
72
+ unregisterStrategy<Key extends keyof TStrategies>(name: Key): Logger<Omit<TStrategies, Key>>;
73
+ /**
74
+ * Register multiple strategies at once.
75
+ *
76
+ * @template TNew - The new strategies to add.
77
+ *
78
+ * @param strategies - An array of tuples where each tuple contains the strategy name and the strategy instance.
79
+ *
80
+ * @throws ({@link BaseError}) - If any strategy is already added.
81
+ *
82
+ * @returns A new Logger instance with the added strategies.
83
+ */
84
+ registerStrategies<TNew extends [string, LoggerStrategy][] = [string, LoggerStrategy][]>(strategies: TNew): Logger<TStrategies & {
85
+ [K in TNew[number][0]]: Extract<TNew[number], [K, LoggerStrategy]>[1];
86
+ }>;
87
+ /**
88
+ * Unregister multiple strategies at once.
89
+ *
90
+ * @template Keys - The names of the strategies to remove.
91
+ *
92
+ * @param names - An array of strategy names to remove.
93
+ *
94
+ * @throws ({@link BaseError}) - If any strategy is not found.
95
+ *
96
+ * @returns A new Logger instance without the removed strategies.
97
+ */
98
+ unregisterStrategies<Keys extends Extract<keyof TStrategies, string>>(names: Keys[]): Logger<Omit<TStrategies, Keys>>;
99
+ /**
100
+ * Remove all strategies.
101
+ *
102
+ * @returns A new Logger instance without any strategies.
103
+ */
104
+ clearStrategies(): Logger;
105
+ /**
106
+ * Log an error message.
107
+ *
108
+ * @template SNames - The names of the strategies to use.
109
+ *
110
+ * @param object - The object to log.
111
+ * @param strategiesNames - The names of the strategies to use. If not provided, all strategies will be used.
112
+ *
113
+ * @throws ({@link BaseError}) - If no strategy is added.
114
+ */
115
+ error<SNames extends (keyof TStrategies)[] = (keyof TStrategies)[]>(object: BodiesIntersection<TStrategies, SNames[number]>, strategiesNames?: SNames): void;
116
+ /**
117
+ * Log a warning message.
118
+ *
119
+ * @template SNames - The names of the strategies to use.
120
+ *
121
+ * @param object - The object to log.
122
+ * @param strategiesNames - The names of the strategies to use. If not provided, all strategies will be used.
123
+ *
124
+ * @throws ({@link BaseError}) - If no strategy is added.
125
+ */
126
+ warn<SNames extends (keyof TStrategies)[] = (keyof TStrategies)[]>(object: BodiesIntersection<TStrategies, SNames[number]>, strategiesNames?: SNames): void;
127
+ /**
128
+ * Log an info message.
129
+ *
130
+ * @template SNames - The names of the strategies to use.
131
+ *
132
+ * @param object - The object to log.
133
+ * @param strategiesNames - The names of the strategies to use. If not provided, all strategies will be used.
134
+ *
135
+ * @throws ({@link BaseError}) - If no strategy is added.
136
+ */
137
+ info<SNames extends (keyof TStrategies)[] = (keyof TStrategies)[]>(object: BodiesIntersection<TStrategies, SNames[number]>, strategiesNames?: SNames): void;
138
+ /**
139
+ * Log a debug message.
140
+ *
141
+ * @template SNames - The names of the strategies to use.
142
+ *
143
+ * @param object - The object to log.
144
+ * @param strategiesNames - The names of the strategies to use. If not provided, all strategies will be used.
145
+ *
146
+ * @throws ({@link BaseError}) - If no strategy is added.
147
+ */
148
+ debug<SNames extends (keyof TStrategies)[] = (keyof TStrategies)[]>(object: BodiesIntersection<TStrategies, SNames[number]>, strategiesNames?: SNames): void;
149
+ /**
150
+ * Log a generic message.
151
+ *
152
+ * @template SNames - The names of the strategies to use.
153
+ *
154
+ * @param object - The object to log.
155
+ * @param strategiesNames - The names of the strategies to use. If not provided, all strategies will be used.
156
+ *
157
+ * @throws ({@link BaseError}) - If no strategy is added.
158
+ */
159
+ log<SNames extends (keyof TStrategies)[] = (keyof TStrategies)[]>(object: BodiesIntersection<TStrategies, SNames[number]>, strategiesNames?: SNames): void;
160
+ /**
161
+ * Internal: execute all strategies for a log event.
162
+ *
163
+ * @template TLogObject - The type of the log object.
164
+ *
165
+ * @param level - The log level.
166
+ * @param date - The date of the log event.
167
+ * @param object - The object to log.
168
+ * @param strategiesNames - The names of the strategies to use. If not provided, all strategies will be used.
169
+ *
170
+ * @throws ({@link BaseError}) - If a strategy throws.
171
+ */
172
+ private _executeStrategies;
173
+ /**
174
+ * Internal: queue a log event and start writing if not already.
175
+ *
176
+ * @template TLogObject - The type of the log object.
177
+ *
178
+ * @param level - The log level.
179
+ * @param object - The object to log.
180
+ * @param strategiesNames - The names of the strategies to use. If not provided, all strategies will be used.
181
+ *
182
+ * @throws ({@link BaseError}) - If no strategy is added.
183
+ */
184
+ private _out;
185
+ /**
186
+ * Internal: process the log queue and emit 'end' when done.
187
+ */
188
+ private _writeLog;
189
+ }
@@ -1,7 +1,7 @@
1
- import type { LoggerStrategy } from '../../logger/types/loggerStrategy';
2
- import type { LogLevels } from '../../logger/types/logLevels';
1
+ import type { LoggerStrategy } from '../../../modules/logger/types/loggerStrategy';
2
+ import type { LogLevels } from '../../../modules/logger/types/logLevels';
3
3
  /**
4
- * ConsoleLoggerStrategy implements LoggerStrategy to provide logging functionality to the console. ({@link LoggerStrategy})
4
+ * ConsoleLoggerStrategy implements {@link LoggerStrategy} to provide logging functionality to the console.
5
5
  */
6
6
  export declare class ConsoleLoggerStrategy implements LoggerStrategy {
7
7
  private readonly _colorize;
@@ -14,7 +14,7 @@ export declare class ConsoleLoggerStrategy implements LoggerStrategy {
14
14
  /**
15
15
  * Logs a message to the console with the specified log level.
16
16
  *
17
- * @param level - The log level at which the message should be logged. ({@link LogLevels})
17
+ * @param level - The log level at which the message should be logged.
18
18
  * @param date - The date at which the message was logged.
19
19
  * @param object - The object to log.
20
20
  */
@@ -1,7 +1,7 @@
1
- import type { LoggerStrategy } from '../../logger/types/loggerStrategy';
2
- import type { LogLevels } from '../../logger/types/logLevels';
1
+ import type { LoggerStrategy } from '../../../modules/logger/types/loggerStrategy';
2
+ import type { LogLevels } from '../../../modules/logger/types/logLevels';
3
3
  /**
4
- * FileLoggerStrategy implements LoggerStrategy to provide logging functionality to the file system. ({@link LoggerStrategy})
4
+ * FileLoggerStrategy implements {@link LoggerStrategy} to provide logging functionality to the file system.
5
5
  */
6
6
  export declare class FileLoggerStrategy implements LoggerStrategy {
7
7
  /**
@@ -17,7 +17,7 @@ export declare class FileLoggerStrategy implements LoggerStrategy {
17
17
  /**
18
18
  * Logs a message to the file system with the specified log level.
19
19
  *
20
- * @param level - The log level at which the message should be logged. {@link LogLevels}
20
+ * @param level - The log level at which the message should be logged.
21
21
  * @param date - The date at which the message was logged.
22
22
  * @param object - The object to log.
23
23
  */
@@ -0,0 +1,2 @@
1
+ export { ConsoleLoggerStrategy } from './consoleLogger.ts';
2
+ export { FileLoggerStrategy } from './fileLogger.ts';
@@ -0,0 +1,44 @@
1
+ // @bun
2
+ // source/modules/logger/strategies/consoleLogger.ts
3
+ class ConsoleLoggerStrategy {
4
+ _colorize;
5
+ constructor(colorize = false) {
6
+ this._colorize = colorize;
7
+ }
8
+ log(level, date, object) {
9
+ const colors = {
10
+ ERROR: "\x1B[31m",
11
+ WARN: "\x1B[33m",
12
+ INFO: "\x1B[36m",
13
+ DEBUG: "\x1B[34m",
14
+ LOG: "\x1B[35m"
15
+ };
16
+ const dateColor = this._colorize ? "\x1B[33m" : "";
17
+ const colorReset = this._colorize ? "\x1B[0m" : "";
18
+ const logLevelColor = this._colorize ? colors[level] : "";
19
+ const sanitizedObject = typeof object === "string" ? object : JSON.stringify(object);
20
+ const prefixDate = `[${dateColor}${date.toISOString().replace(/T/, " ").replace(/\..+/, "")}${colorReset}]`;
21
+ const message = `${prefixDate} ${logLevelColor}${level}${colorReset} : ${sanitizedObject}`;
22
+ console[level.toLowerCase()](message);
23
+ }
24
+ }
25
+ // source/modules/logger/strategies/fileLogger.ts
26
+ import { appendFile } from "fs/promises";
27
+
28
+ class FileLoggerStrategy {
29
+ _path;
30
+ constructor(path) {
31
+ this._path = path;
32
+ }
33
+ async log(level, date, object) {
34
+ const prefixDate = `[${date.toISOString().replace(/T/, " ").replace(/\..+/, "")}]`;
35
+ const sanitizedObject = typeof object === "string" ? object : JSON.stringify(object);
36
+ const message = `${prefixDate} ${level} : ${sanitizedObject}`;
37
+ await appendFile(this._path, `${message}
38
+ `);
39
+ }
40
+ }
41
+ export {
42
+ FileLoggerStrategy,
43
+ ConsoleLoggerStrategy
44
+ };
@@ -0,0 +1,6 @@
1
+ export type { BodiesIntersection } from './bodiesIntersection.ts';
2
+ export type { LoggerStrategy } from './loggerStrategy.ts';
3
+ export type { LogLevels } from './logLevels.ts';
4
+ export type { LogStreamChunk } from './logStreamChunk.ts';
5
+ export type { StrategyBody } from './strategyBody.ts';
6
+ export type { StrategyMap } from './strategyMap.ts';
@@ -0,0 +1 @@
1
+ // @bun
@@ -5,11 +5,11 @@ import type { StrategyMap } from './strategyMap';
5
5
  */
6
6
  export interface LogStreamChunk<TLogObject, TStrategies extends StrategyMap> {
7
7
  /** ISO date string of the log event. */
8
- date: string;
8
+ readonly date: string;
9
9
  /** Log level. */
10
- level: LogLevels;
10
+ readonly level: LogLevels;
11
11
  /** The object to log. */
12
- object: TLogObject;
12
+ readonly object: TLogObject;
13
13
  /** Names of strategies to use. */
14
- strategiesNames: (keyof TStrategies)[];
14
+ readonly strategiesNames: (keyof TStrategies)[];
15
15
  }
@@ -3,7 +3,7 @@ export interface LoggerStrategy<TLogObject = unknown> {
3
3
  /**
4
4
  * Logs a message with the strategy's implementation.
5
5
  *
6
- * @param level - The log level at which the message should be logged. ({@link LogLevels})
6
+ * @param level - The log level at which the message should be logged.
7
7
  * @param date - The date at which the message was logged.
8
8
  * @param object - The object to log.
9
9
  */
@@ -0,0 +1,5 @@
1
+ export declare const MAILER_ERROR_KEYS: {
2
+ readonly SMTP_CONNECTION_ERROR: "mailer.error.smtp.connection_error";
3
+ readonly SMTP_NOT_CONNECTED: "mailer.error.smtp.not_connected";
4
+ readonly SMTP_ALREADY_CONNECTED: "mailer.error.smtp.already_connected";
5
+ };
@@ -0,0 +1 @@
1
+ export { SMTP } from './smtp';
@@ -0,0 +1,64 @@
1
+ // @bun
2
+ import {
3
+ BaseError
4
+ } from "../../chunk-vknq69e0.js";
5
+
6
+ // source/modules/mailer/smtp.ts
7
+ import { createTransport } from "nodemailer";
8
+
9
+ // source/modules/mailer/enums/mailerErrorKeys.ts
10
+ var MAILER_ERROR_KEYS = {
11
+ SMTP_CONNECTION_ERROR: "mailer.error.smtp.connection_error",
12
+ SMTP_NOT_CONNECTED: "mailer.error.smtp.not_connected",
13
+ SMTP_ALREADY_CONNECTED: "mailer.error.smtp.already_connected"
14
+ };
15
+
16
+ // source/modules/mailer/smtp.ts
17
+ class SMTP {
18
+ _config;
19
+ _transporter = null;
20
+ constructor(config) {
21
+ this._config = {
22
+ port: 587,
23
+ secure: false,
24
+ ...config
25
+ };
26
+ }
27
+ async connect() {
28
+ if (this._transporter)
29
+ throw new BaseError({ message: MAILER_ERROR_KEYS.SMTP_ALREADY_CONNECTED });
30
+ this._transporter = createTransport({
31
+ host: this._config.host,
32
+ port: this._config.port,
33
+ secure: this._config.secure,
34
+ auth: {
35
+ user: this._config.credentials.user,
36
+ pass: this._config.credentials.pass
37
+ },
38
+ pool: true,
39
+ maxConnections: this._config.pool?.maxConnections ?? 5
40
+ });
41
+ try {
42
+ await this._transporter.verify();
43
+ } catch (error) {
44
+ throw new BaseError({
45
+ message: MAILER_ERROR_KEYS.SMTP_CONNECTION_ERROR,
46
+ cause: error
47
+ });
48
+ }
49
+ }
50
+ disconnect() {
51
+ if (this._transporter) {
52
+ this._transporter.close();
53
+ this._transporter = null;
54
+ }
55
+ }
56
+ async sendMail(options) {
57
+ if (!this._transporter)
58
+ throw new BaseError({ message: MAILER_ERROR_KEYS.SMTP_NOT_CONNECTED });
59
+ return this._transporter.sendMail(options);
60
+ }
61
+ }
62
+ export {
63
+ SMTP
64
+ };
@@ -4,10 +4,10 @@ import type { SMTPOptions } from './types/smtpOptions';
4
4
  * The `SMTP` class manages the connection and operations with an SMTP server.
5
5
  *
6
6
  * This class provides methods to connect, disconnect, and send emails using
7
- * the Nodemailer library. It supports connection pooling and error handling ({@link CoreError}).
7
+ * the Nodemailer library. It supports connection pooling and error handling ({@link BaseError}).
8
8
  *
9
9
  * @example
10
- * ```typescript
10
+ * ```ts
11
11
  * const smtp = new SMTP({
12
12
  * host: 'smtp.example.com',
13
13
  * credentials: { user: 'user', pass: 'pass' }
@@ -29,7 +29,7 @@ export declare class SMTP {
29
29
  /**
30
30
  * Creates an instance of the SMTP class.
31
31
  *
32
- * @param config - The configuration options for the SMTP connection. (see {@link SMTPOptions}).
32
+ * @param config - The configuration options for the SMTP connection.
33
33
  */
34
34
  constructor(config: SMTPOptions);
35
35
  /**
@@ -39,8 +39,8 @@ export declare class SMTP {
39
39
  * It enables connection pooling for efficient resource usage and sets the maximum number of
40
40
  * concurrent connections as specified in the configuration (default: 5).
41
41
  *
42
- * @throws ({@link CoreError}): If the transporter is already connected. ({@link mailerErrorKeys.smtpAlreadyConnected})
43
- * @throws ({@link CoreError}): If the connection or verification fails. ({@link mailerErrorKeys.smtpConnectionError})
42
+ * @throws ({@link BaseError}) - If the transporter is already connected.
43
+ * @throws ({@link BaseError}) - If the connection or verification fails.
44
44
  */
45
45
  connect(): Promise<void>;
46
46
  /**
@@ -54,7 +54,7 @@ export declare class SMTP {
54
54
  *
55
55
  * @param options - The mail options, such as recipient, subject, and content.
56
56
  *
57
- * @throws ({@link CoreError}) - If the transporter is not connected. ({@link mailerErrorKeys.smtpNotConnected})
57
+ * @throws ({@link BaseError}) - If the transporter is not connected.
58
58
  *
59
59
  * @returns A promise resolving to the result of the send operation.
60
60
  */
@@ -0,0 +1,3 @@
1
+ export type { SMTPCredentials } from './smtpCredentials';
2
+ export type { SMTPOptions } from './smtpOptions';
3
+ export type { SMTPPoolOptions } from './smtpPoolOptions';
@@ -0,0 +1 @@
1
+ // @bun
@@ -2,9 +2,9 @@ export interface SMTPCredentials {
2
2
  /**
3
3
  * The username for SMTP authentication.
4
4
  */
5
- user: string;
5
+ readonly user: string;
6
6
  /**
7
7
  * The password for SMTP authentication.
8
8
  */
9
- pass: string;
9
+ readonly pass: string;
10
10
  }
@@ -4,23 +4,23 @@ export interface SMTPOptions {
4
4
  /**
5
5
  * The hostname or IP address of the SMTP server.
6
6
  */
7
- host: string;
7
+ readonly host: string;
8
8
  /**
9
9
  * The port number to connect to.
10
10
  * @defaultValue 587
11
11
  */
12
- port?: number;
12
+ readonly port?: number;
13
13
  /**
14
14
  * Whether to use a secure (TLS) connection.
15
15
  * @defaultValue false
16
16
  */
17
- secure?: boolean;
17
+ readonly secure?: boolean;
18
18
  /**
19
19
  * The credentials for SMTP authentication.
20
20
  */
21
- credentials: SMTPCredentials;
21
+ readonly credentials: SMTPCredentials;
22
22
  /**
23
23
  * Optional pool configuration.
24
24
  */
25
- pool?: SMTPPoolOptions;
25
+ readonly pool?: SMTPPoolOptions;
26
26
  }
@@ -3,5 +3,5 @@ export interface SMTPPoolOptions {
3
3
  * The maximum number of concurrent SMTP connections.
4
4
  * @defaultValue 5
5
5
  */
6
- maxConnections?: number;
6
+ readonly maxConnections?: number;
7
7
  }
@@ -0,0 +1 @@
1
+ export { Repository } from './repository';
@@ -0,0 +1,10 @@
1
+ // @bun
2
+ import {
3
+ Repository
4
+ } from "../../chunk-1a3wj3m1.js";
5
+ import"../../chunk-5qtpggzv.js";
6
+ import"../../chunk-84mqvfsk.js";
7
+ import"../../chunk-vknq69e0.js";
8
+ export {
9
+ Repository
10
+ };