@scpxl/nodejs-framework 1.0.22 → 1.0.25

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 (326) hide show
  1. package/README.md +264 -26
  2. package/dist/api-requester/api-requester.d.ts +32 -0
  3. package/dist/api-requester/api-requester.d.ts.map +1 -0
  4. package/dist/api-requester/api-requester.js +2 -1
  5. package/dist/api-requester/api-requester.js.map +2 -2
  6. package/dist/api-requester/index.d.ts +3 -0
  7. package/dist/api-requester/index.d.ts.map +1 -0
  8. package/dist/application/base-application.d.ts +106 -0
  9. package/dist/application/base-application.d.ts.map +1 -0
  10. package/dist/application/base-application.interface.d.ts +162 -0
  11. package/dist/application/base-application.interface.d.ts.map +1 -0
  12. package/dist/application/base-application.js +7 -3
  13. package/dist/application/base-application.js.map +2 -2
  14. package/dist/application/command-application.d.ts +18 -0
  15. package/dist/application/command-application.d.ts.map +1 -0
  16. package/dist/application/command-application.interface.d.ts +26 -0
  17. package/dist/application/command-application.interface.d.ts.map +1 -0
  18. package/dist/application/index.d.ts +5 -0
  19. package/dist/application/index.d.ts.map +1 -0
  20. package/dist/application/web-application.d.ts +43 -0
  21. package/dist/application/web-application.d.ts.map +1 -0
  22. package/dist/application/web-application.interface.d.ts +21 -0
  23. package/dist/application/web-application.interface.d.ts.map +1 -0
  24. package/dist/application/web-application.js +1 -0
  25. package/dist/application/web-application.js.map +2 -2
  26. package/dist/auth/index.d.ts +2 -0
  27. package/dist/auth/index.d.ts.map +1 -0
  28. package/dist/auth/jwt.d.ts +25 -0
  29. package/dist/auth/jwt.d.ts.map +1 -0
  30. package/dist/cache/index.d.ts +2 -0
  31. package/dist/cache/index.d.ts.map +1 -0
  32. package/dist/cache/manager.d.ts +107 -0
  33. package/dist/cache/manager.d.ts.map +1 -0
  34. package/dist/cache/manager.js +2 -1
  35. package/dist/cache/manager.js.map +2 -2
  36. package/dist/cli/index.d.ts +2 -0
  37. package/dist/cli/index.d.ts.map +1 -0
  38. package/dist/cli/index.js +12591 -0
  39. package/dist/cli/index.js.map +7 -0
  40. package/dist/cluster/cluster-manager.d.ts +18 -0
  41. package/dist/cluster/cluster-manager.d.ts.map +1 -0
  42. package/dist/cluster/cluster-manager.interface.d.ts +23 -0
  43. package/dist/cluster/cluster-manager.interface.d.ts.map +1 -0
  44. package/dist/cluster/cluster-manager.js +45 -8
  45. package/dist/cluster/cluster-manager.js.map +2 -2
  46. package/dist/cluster/index.d.ts +2 -0
  47. package/dist/cluster/index.d.ts.map +1 -0
  48. package/dist/command/command-manager.d.ts +19 -0
  49. package/dist/command/command-manager.d.ts.map +1 -0
  50. package/dist/command/command.d.ts +27 -0
  51. package/dist/command/command.d.ts.map +1 -0
  52. package/dist/command/command.interface.d.ts +11 -0
  53. package/dist/command/command.interface.d.ts.map +1 -0
  54. package/dist/command/index.d.ts +3 -0
  55. package/dist/command/index.d.ts.map +1 -0
  56. package/dist/config/env.d.ts +11 -0
  57. package/dist/config/env.d.ts.map +1 -0
  58. package/dist/config/index.d.ts +3 -0
  59. package/dist/config/index.d.ts.map +1 -0
  60. package/dist/config/schema.d.ts +432 -0
  61. package/dist/config/schema.d.ts.map +1 -0
  62. package/dist/database/dynamic-entity-form-decorators.d.ts +31 -0
  63. package/dist/database/dynamic-entity-form-decorators.d.ts.map +1 -0
  64. package/dist/database/dynamic-entity-form-decorators.js.map +1 -1
  65. package/dist/database/dynamic-entity.d.ts +18 -0
  66. package/dist/database/dynamic-entity.d.ts.map +1 -0
  67. package/dist/database/dynamic-entity.js +11 -1
  68. package/dist/database/dynamic-entity.js.map +2 -2
  69. package/dist/database/index.d.ts +5 -0
  70. package/dist/database/index.d.ts.map +1 -0
  71. package/dist/database/instance.d.ts +36 -0
  72. package/dist/database/instance.d.ts.map +1 -0
  73. package/dist/database/instance.interface.d.ts +5 -0
  74. package/dist/database/instance.interface.d.ts.map +1 -0
  75. package/dist/database/manager.d.ts +27 -0
  76. package/dist/database/manager.d.ts.map +1 -0
  77. package/dist/database/manager.interface.d.ts +18 -0
  78. package/dist/database/manager.interface.d.ts.map +1 -0
  79. package/dist/database/manager.js +3 -2
  80. package/dist/database/manager.js.map +2 -2
  81. package/dist/error/error-reporter.d.ts +109 -0
  82. package/dist/error/error-reporter.d.ts.map +1 -0
  83. package/dist/error/error-reporter.js +32 -29
  84. package/dist/error/error-reporter.js.map +2 -2
  85. package/dist/error/error.interface.d.ts +126 -0
  86. package/dist/error/error.interface.d.ts.map +1 -0
  87. package/dist/error/framework-errors.d.ts +113 -0
  88. package/dist/error/framework-errors.d.ts.map +1 -0
  89. package/dist/error/index.d.ts +6 -0
  90. package/dist/error/index.d.ts.map +1 -0
  91. package/dist/error/index.js +3 -2
  92. package/dist/error/index.js.map +2 -2
  93. package/dist/event/controller/base.d.ts +23 -0
  94. package/dist/event/controller/base.d.ts.map +1 -0
  95. package/dist/event/controller/base.interface.d.ts +11 -0
  96. package/dist/event/controller/base.interface.d.ts.map +1 -0
  97. package/dist/event/controller/base.js +2 -1
  98. package/dist/event/controller/base.js.map +2 -2
  99. package/dist/event/index.d.ts +5 -0
  100. package/dist/event/index.d.ts.map +1 -0
  101. package/dist/event/manager.d.ts +21 -0
  102. package/dist/event/manager.d.ts.map +1 -0
  103. package/dist/event/manager.interface.d.ts +137 -0
  104. package/dist/event/manager.interface.d.ts.map +1 -0
  105. package/dist/event/manager.js +5 -4
  106. package/dist/event/manager.js.map +2 -2
  107. package/dist/index.d.ts +22 -0
  108. package/dist/index.d.ts.map +1 -0
  109. package/dist/lifecycle/exit.d.ts +11 -0
  110. package/dist/lifecycle/exit.d.ts.map +1 -0
  111. package/dist/lifecycle/exit.js.map +2 -2
  112. package/dist/lifecycle/index.d.ts +7 -0
  113. package/dist/lifecycle/index.d.ts.map +1 -0
  114. package/dist/lifecycle/lifecycle-manager.d.ts +66 -0
  115. package/dist/lifecycle/lifecycle-manager.d.ts.map +1 -0
  116. package/dist/lifecycle/lifecycle-manager.js +6 -11
  117. package/dist/lifecycle/lifecycle-manager.js.map +2 -2
  118. package/dist/lifecycle/shutdown-controller.d.ts +15 -0
  119. package/dist/lifecycle/shutdown-controller.d.ts.map +1 -0
  120. package/dist/lifecycle/types.d.ts +28 -0
  121. package/dist/lifecycle/types.d.ts.map +1 -0
  122. package/dist/logger/index.d.ts +2 -0
  123. package/dist/logger/index.d.ts.map +1 -0
  124. package/dist/logger/logger.d.ts +59 -0
  125. package/dist/logger/logger.d.ts.map +1 -0
  126. package/dist/logger/logger.interface.d.ts +2 -0
  127. package/dist/logger/logger.interface.d.ts.map +1 -0
  128. package/dist/logger/logger.js +11 -3
  129. package/dist/logger/logger.js.map +2 -2
  130. package/dist/performance/cache-performance.d.ts +64 -0
  131. package/dist/performance/cache-performance.d.ts.map +1 -0
  132. package/dist/performance/database-performance.d.ts +40 -0
  133. package/dist/performance/database-performance.d.ts.map +1 -0
  134. package/dist/performance/index.d.ts +8 -0
  135. package/dist/performance/index.d.ts.map +1 -0
  136. package/dist/performance/performance-monitor.d.ts +68 -0
  137. package/dist/performance/performance-monitor.d.ts.map +1 -0
  138. package/dist/performance/performance-monitor.js +10 -3
  139. package/dist/performance/performance-monitor.js.map +2 -2
  140. package/dist/performance/performance-monitor.plugin.d.ts +24 -0
  141. package/dist/performance/performance-monitor.plugin.d.ts.map +1 -0
  142. package/dist/performance/queue-performance.d.ts +46 -0
  143. package/dist/performance/queue-performance.d.ts.map +1 -0
  144. package/dist/performance/webserver-performance.d.ts +69 -0
  145. package/dist/performance/webserver-performance.d.ts.map +1 -0
  146. package/dist/performance/websocket-performance.d.ts +44 -0
  147. package/dist/performance/websocket-performance.d.ts.map +1 -0
  148. package/dist/queue/index.d.ts +6 -0
  149. package/dist/queue/index.d.ts.map +1 -0
  150. package/dist/queue/index.interface.d.ts +10 -0
  151. package/dist/queue/index.interface.d.ts.map +1 -0
  152. package/dist/queue/job.interface.d.ts +43 -0
  153. package/dist/queue/job.interface.d.ts.map +1 -0
  154. package/dist/queue/manager.d.ts +44 -0
  155. package/dist/queue/manager.d.ts.map +1 -0
  156. package/dist/queue/manager.interface.d.ts +18 -0
  157. package/dist/queue/manager.interface.d.ts.map +1 -0
  158. package/dist/queue/processor/base.d.ts +29 -0
  159. package/dist/queue/processor/base.d.ts.map +1 -0
  160. package/dist/queue/processor/base.js +2 -1
  161. package/dist/queue/processor/base.js.map +2 -2
  162. package/dist/queue/processor/processor.interface.d.ts +16 -0
  163. package/dist/queue/processor/processor.interface.d.ts.map +1 -0
  164. package/dist/queue/worker.d.ts +14 -0
  165. package/dist/queue/worker.d.ts.map +1 -0
  166. package/dist/queue/worker.interface.d.ts +13 -0
  167. package/dist/queue/worker.interface.d.ts.map +1 -0
  168. package/dist/redis/index.d.ts +3 -0
  169. package/dist/redis/index.d.ts.map +1 -0
  170. package/dist/redis/instance.d.ts +32 -0
  171. package/dist/redis/instance.d.ts.map +1 -0
  172. package/dist/redis/instance.interface.d.ts +9 -0
  173. package/dist/redis/instance.interface.d.ts.map +1 -0
  174. package/dist/redis/manager.d.ts +15 -0
  175. package/dist/redis/manager.d.ts.map +1 -0
  176. package/dist/redis/manager.interface.d.ts +8 -0
  177. package/dist/redis/manager.interface.d.ts.map +1 -0
  178. package/dist/redis/manager.js +16 -16
  179. package/dist/redis/manager.js.map +2 -2
  180. package/dist/request-context/index.d.ts +3 -0
  181. package/dist/request-context/index.d.ts.map +1 -0
  182. package/dist/request-context/request-context.d.ts +108 -0
  183. package/dist/request-context/request-context.d.ts.map +1 -0
  184. package/dist/request-context/request-context.interface.d.ts +46 -0
  185. package/dist/request-context/request-context.interface.d.ts.map +1 -0
  186. package/dist/schemas/common.d.ts +197 -0
  187. package/dist/schemas/common.d.ts.map +1 -0
  188. package/dist/schemas/common.js +108 -0
  189. package/dist/schemas/common.js.map +7 -0
  190. package/dist/schemas/index.d.ts +6 -0
  191. package/dist/schemas/index.d.ts.map +1 -0
  192. package/dist/schemas/index.js +2 -0
  193. package/dist/schemas/index.js.map +7 -0
  194. package/dist/services/aws/index.d.ts +2 -0
  195. package/dist/services/aws/index.d.ts.map +1 -0
  196. package/dist/services/aws/s3.d.ts +54 -0
  197. package/dist/services/aws/s3.d.ts.map +1 -0
  198. package/dist/services/aws/s3.interface.d.ts +14 -0
  199. package/dist/services/aws/s3.interface.d.ts.map +1 -0
  200. package/dist/services/index.d.ts +2 -0
  201. package/dist/services/index.d.ts.map +1 -0
  202. package/dist/util/file.d.ts +58 -0
  203. package/dist/util/file.d.ts.map +1 -0
  204. package/dist/util/helper.d.ts +51 -0
  205. package/dist/util/helper.d.ts.map +1 -0
  206. package/dist/util/helper.js +72 -10
  207. package/dist/util/helper.js.map +2 -2
  208. package/dist/util/image.d.ts +12 -0
  209. package/dist/util/image.d.ts.map +1 -0
  210. package/dist/util/index.d.ts +11 -0
  211. package/dist/util/index.d.ts.map +1 -0
  212. package/dist/util/loader.d.ts +21 -0
  213. package/dist/util/loader.d.ts.map +1 -0
  214. package/dist/util/loader.js +5 -2
  215. package/dist/util/loader.js.map +2 -2
  216. package/dist/util/num.d.ts +13 -0
  217. package/dist/util/num.d.ts.map +1 -0
  218. package/dist/util/os.d.ts +6 -0
  219. package/dist/util/os.d.ts.map +1 -0
  220. package/dist/util/str.d.ts +39 -0
  221. package/dist/util/str.d.ts.map +1 -0
  222. package/dist/util/time.d.ts +19 -0
  223. package/dist/util/time.d.ts.map +1 -0
  224. package/dist/util/time.interface.d.ts +12 -0
  225. package/dist/util/time.interface.d.ts.map +1 -0
  226. package/dist/util/timing.d.ts +36 -0
  227. package/dist/util/timing.d.ts.map +1 -0
  228. package/dist/util/timing.interface.d.ts +47 -0
  229. package/dist/util/timing.interface.d.ts.map +1 -0
  230. package/dist/util/url.d.ts +7 -0
  231. package/dist/util/url.d.ts.map +1 -0
  232. package/dist/webserver/controller/auth-middleware.d.ts +21 -0
  233. package/dist/webserver/controller/auth-middleware.d.ts.map +1 -0
  234. package/dist/webserver/controller/base.d.ts +41 -0
  235. package/dist/webserver/controller/base.d.ts.map +1 -0
  236. package/dist/webserver/controller/base.interface.d.ts +50 -0
  237. package/dist/webserver/controller/base.interface.d.ts.map +1 -0
  238. package/dist/webserver/controller/base.js +4 -4
  239. package/dist/webserver/controller/base.js.map +2 -2
  240. package/dist/webserver/controller/entity.d.ts +94 -0
  241. package/dist/webserver/controller/entity.d.ts.map +1 -0
  242. package/dist/webserver/controller/entity.js.map +2 -2
  243. package/dist/webserver/controller/example-auth.d.ts +12 -0
  244. package/dist/webserver/controller/example-auth.d.ts.map +1 -0
  245. package/dist/webserver/controller/health.d.ts +13 -0
  246. package/dist/webserver/controller/health.d.ts.map +1 -0
  247. package/dist/webserver/controller/health.js +0 -14
  248. package/dist/webserver/controller/health.js.map +2 -2
  249. package/dist/webserver/define-action.d.ts +26 -0
  250. package/dist/webserver/define-action.d.ts.map +1 -0
  251. package/dist/webserver/define-action.js +16 -0
  252. package/dist/webserver/define-action.js.map +7 -0
  253. package/dist/webserver/define-route.d.ts +53 -0
  254. package/dist/webserver/define-route.d.ts.map +1 -0
  255. package/dist/webserver/define-route.js +11 -6
  256. package/dist/webserver/define-route.js.map +2 -2
  257. package/dist/webserver/index.d.ts +14 -0
  258. package/dist/webserver/index.d.ts.map +1 -0
  259. package/dist/webserver/index.js +2 -0
  260. package/dist/webserver/index.js.map +2 -2
  261. package/dist/webserver/util.d.ts +10 -0
  262. package/dist/webserver/util.d.ts.map +1 -0
  263. package/dist/webserver/util.js +5 -2
  264. package/dist/webserver/util.js.map +2 -2
  265. package/dist/webserver/webserver.d.ts +93 -0
  266. package/dist/webserver/webserver.d.ts.map +1 -0
  267. package/dist/webserver/webserver.interface.d.ts +181 -0
  268. package/dist/webserver/webserver.interface.d.ts.map +1 -0
  269. package/dist/webserver/webserver.interface.js.map +1 -1
  270. package/dist/webserver/webserver.js +30 -33
  271. package/dist/webserver/webserver.js.map +2 -2
  272. package/dist/websocket/controller/client/base.d.ts +12 -0
  273. package/dist/websocket/controller/client/base.d.ts.map +1 -0
  274. package/dist/websocket/controller/client/base.interface.d.ts +12 -0
  275. package/dist/websocket/controller/client/base.interface.d.ts.map +1 -0
  276. package/dist/websocket/controller/server/base.d.ts +13 -0
  277. package/dist/websocket/controller/server/base.d.ts.map +1 -0
  278. package/dist/websocket/controller/server/base.interface.d.ts +13 -0
  279. package/dist/websocket/controller/server/base.interface.d.ts.map +1 -0
  280. package/dist/websocket/controllers/client/system.d.ts +6 -0
  281. package/dist/websocket/controllers/client/system.d.ts.map +1 -0
  282. package/dist/websocket/controllers/server/system.d.ts +7 -0
  283. package/dist/websocket/controllers/server/system.d.ts.map +1 -0
  284. package/dist/websocket/index.d.ts +9 -0
  285. package/dist/websocket/index.d.ts.map +1 -0
  286. package/dist/websocket/index.js +2 -0
  287. package/dist/websocket/index.js.map +2 -2
  288. package/dist/websocket/routes/client/system.d.ts +3 -0
  289. package/dist/websocket/routes/client/system.d.ts.map +1 -0
  290. package/dist/websocket/routes/server/system.d.ts +3 -0
  291. package/dist/websocket/routes/server/system.d.ts.map +1 -0
  292. package/dist/websocket/utils.d.ts +9 -0
  293. package/dist/websocket/utils.d.ts.map +1 -0
  294. package/dist/websocket/websocket-auth.d.ts +17 -0
  295. package/dist/websocket/websocket-auth.d.ts.map +1 -0
  296. package/dist/websocket/websocket-auth.js +46 -0
  297. package/dist/websocket/websocket-auth.js.map +7 -0
  298. package/dist/websocket/websocket-base.d.ts +19 -0
  299. package/dist/websocket/websocket-base.d.ts.map +1 -0
  300. package/dist/websocket/websocket-client-manager.d.ts +53 -0
  301. package/dist/websocket/websocket-client-manager.d.ts.map +1 -0
  302. package/dist/websocket/websocket-client-manager.interface.d.ts +8 -0
  303. package/dist/websocket/websocket-client-manager.interface.d.ts.map +1 -0
  304. package/dist/websocket/websocket-client-manager.js +6 -5
  305. package/dist/websocket/websocket-client-manager.js.map +2 -2
  306. package/dist/websocket/websocket-client.d.ts +64 -0
  307. package/dist/websocket/websocket-client.d.ts.map +1 -0
  308. package/dist/websocket/websocket-client.interface.d.ts +14 -0
  309. package/dist/websocket/websocket-client.interface.d.ts.map +1 -0
  310. package/dist/websocket/websocket-client.js +97 -3
  311. package/dist/websocket/websocket-client.js.map +2 -2
  312. package/dist/websocket/websocket-room-manager.d.ts +32 -0
  313. package/dist/websocket/websocket-room-manager.d.ts.map +1 -0
  314. package/dist/websocket/websocket-server.d.ts +102 -0
  315. package/dist/websocket/websocket-server.d.ts.map +1 -0
  316. package/dist/websocket/websocket-server.interface.d.ts +16 -0
  317. package/dist/websocket/websocket-server.interface.d.ts.map +1 -0
  318. package/dist/websocket/websocket-server.js +62 -50
  319. package/dist/websocket/websocket-server.js.map +2 -2
  320. package/dist/websocket/websocket-service.d.ts +44 -0
  321. package/dist/websocket/websocket-service.d.ts.map +1 -0
  322. package/dist/websocket/websocket.interface.d.ts +137 -0
  323. package/dist/websocket/websocket.interface.d.ts.map +1 -0
  324. package/dist/websocket/websocket.interface.js.map +2 -2
  325. package/package.json +21 -24
  326. package/pxl.js +0 -4
@@ -0,0 +1,108 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
+ import { z } from "zod";
4
+ const NumericIdSchema = z.coerce.number().int().positive();
5
+ const UuidSchema = z.string().uuid();
6
+ const OptionalNumericIdSchema = NumericIdSchema.optional();
7
+ const PaginationQuerySchema = z.object({
8
+ page: z.coerce.number().int().positive().default(1),
9
+ limit: z.coerce.number().int().positive().max(100).default(20)
10
+ });
11
+ const createPaginatedResponseSchema = /* @__PURE__ */ __name((itemSchema) => {
12
+ return z.object({
13
+ data: z.array(itemSchema),
14
+ total_items: z.number().int().nonnegative(),
15
+ page: z.number().int().positive(),
16
+ total_pages: z.number().int().nonnegative(),
17
+ limit: z.number().int().positive()
18
+ });
19
+ }, "createPaginatedResponseSchema");
20
+ const SortOrderSchema = z.enum(["ASC", "DESC", "asc", "desc"]).default("ASC");
21
+ const SortQuerySchema = z.object({
22
+ sort: z.string().optional(),
23
+ "sort-order": SortOrderSchema.optional()
24
+ });
25
+ const SearchQuerySchema = z.object({
26
+ search: z.string().min(1).optional()
27
+ });
28
+ const ListQuerySchema = PaginationQuerySchema.merge(SortQuerySchema).merge(SearchQuerySchema);
29
+ const createSuccessResponseSchema = /* @__PURE__ */ __name((dataSchema) => {
30
+ return z.object({
31
+ data: dataSchema
32
+ });
33
+ }, "createSuccessResponseSchema");
34
+ const ErrorResponseSchema = z.object({
35
+ error: z.string(),
36
+ message: z.string().optional(),
37
+ statusCode: z.number().int().optional(),
38
+ details: z.record(z.string(), z.unknown()).optional()
39
+ });
40
+ const createApiResponseSchema = /* @__PURE__ */ __name((dataSchema) => {
41
+ return z.union([createSuccessResponseSchema(dataSchema), ErrorResponseSchema]);
42
+ }, "createApiResponseSchema");
43
+ const EmailSchema = z.string().email();
44
+ const UrlSchema = z.string().url();
45
+ const PhoneSchema = z.string().regex(/^\+?[1-9]\d{1,14}$/);
46
+ const DateStringSchema = z.string().datetime();
47
+ const NonEmptyStringSchema = z.string().min(1);
48
+ const TrimmedStringSchema = z.string().trim().min(1);
49
+ const BooleanSchema = z.union([z.boolean(), z.string()]).transform((val) => {
50
+ return typeof val === "string" ? val === "true" : val;
51
+ });
52
+ const TimestampSchema = z.object({
53
+ createdAt: z.date(),
54
+ updatedAt: z.date()
55
+ });
56
+ const OptionalTimestampSchema = z.object({
57
+ createdAt: z.date().optional(),
58
+ updatedAt: z.date().optional()
59
+ });
60
+ const CommaSeparatedStringSchema = z.string().transform((val) => {
61
+ return val.split(",").map((item) => item.trim());
62
+ });
63
+ const JsonStringSchema = z.string().transform((str, _ctx) => {
64
+ try {
65
+ return JSON.parse(str);
66
+ } catch {
67
+ _ctx.addIssue({ code: "custom", message: "Invalid JSON string" });
68
+ return z.NEVER;
69
+ }
70
+ });
71
+ const HealthCheckResponseSchema = z.object({
72
+ status: z.enum(["healthy", "unhealthy", "degraded"]),
73
+ timestamp: z.string().datetime(),
74
+ services: z.record(
75
+ z.string(),
76
+ z.object({
77
+ status: z.enum(["up", "down", "degraded"]),
78
+ message: z.string().optional()
79
+ })
80
+ ).optional()
81
+ });
82
+ export {
83
+ BooleanSchema,
84
+ CommaSeparatedStringSchema,
85
+ DateStringSchema,
86
+ EmailSchema,
87
+ ErrorResponseSchema,
88
+ HealthCheckResponseSchema,
89
+ JsonStringSchema,
90
+ ListQuerySchema,
91
+ NonEmptyStringSchema,
92
+ NumericIdSchema,
93
+ OptionalNumericIdSchema,
94
+ OptionalTimestampSchema,
95
+ PaginationQuerySchema,
96
+ PhoneSchema,
97
+ SearchQuerySchema,
98
+ SortOrderSchema,
99
+ SortQuerySchema,
100
+ TimestampSchema,
101
+ TrimmedStringSchema,
102
+ UrlSchema,
103
+ UuidSchema,
104
+ createApiResponseSchema,
105
+ createPaginatedResponseSchema,
106
+ createSuccessResponseSchema
107
+ };
108
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/schemas/common.ts"],
4
+ "sourcesContent": ["import { z } from 'zod';\n\n/**\n * Common Zod schemas for reuse across the framework\n */\n\n// ============================================================================\n// ID Schemas\n// ============================================================================\n\n/**\n * Numeric ID schema (positive integer)\n */\nexport const NumericIdSchema = z.coerce.number().int().positive();\n\n/**\n * UUID v4 schema\n */\nexport const UuidSchema = z.string().uuid();\n\n/**\n * Optional numeric ID (for updates where ID may not be required)\n */\nexport const OptionalNumericIdSchema = NumericIdSchema.optional();\n\n// ============================================================================\n// Pagination Schemas\n// ============================================================================\n\n/**\n * Pagination query parameters schema\n */\nexport const PaginationQuerySchema = z.object({\n page: z.coerce.number().int().positive().default(1),\n limit: z.coerce.number().int().positive().max(100).default(20),\n});\n\n/**\n * Inferred type for pagination query\n */\nexport type PaginationQuery = z.infer<typeof PaginationQuerySchema>;\n\n/**\n * Paginated response wrapper schema\n */\nexport const createPaginatedResponseSchema = <T extends z.ZodTypeAny>(itemSchema: T) => {\n return z.object({\n data: z.array(itemSchema),\n total_items: z.number().int().nonnegative(),\n page: z.number().int().positive(),\n total_pages: z.number().int().nonnegative(),\n limit: z.number().int().positive(),\n });\n};\n\n/**\n * Helper type for paginated response\n */\nexport type PaginatedResponse<T> = {\n data: T[];\n total_items: number;\n page: number;\n total_pages: number;\n limit: number;\n};\n\n// ============================================================================\n// Sorting & Filtering Schemas\n// ============================================================================\n\n/**\n * Sort order schema\n */\nexport const SortOrderSchema = z.enum(['ASC', 'DESC', 'asc', 'desc']).default('ASC');\n\n/**\n * Generic sort query schema\n */\nexport const SortQuerySchema = z.object({\n sort: z.string().optional(),\n 'sort-order': SortOrderSchema.optional(),\n});\n\n/**\n * Search query schema\n */\nexport const SearchQuerySchema = z.object({\n search: z.string().min(1).optional(),\n});\n\n/**\n * Combined list query schema (pagination + sorting + search)\n */\nexport const ListQuerySchema = PaginationQuerySchema.merge(SortQuerySchema).merge(SearchQuerySchema);\n\n/**\n * Inferred type for list query\n */\nexport type ListQuery = z.infer<typeof ListQuerySchema>;\n\n// ============================================================================\n// Response Schemas\n// ============================================================================\n\n/**\n * Success response wrapper schema\n */\nexport const createSuccessResponseSchema = <T extends z.ZodTypeAny>(dataSchema: T) => {\n return z.object({\n data: dataSchema,\n });\n};\n\n/**\n * Error response schema\n */\nexport const ErrorResponseSchema = z.object({\n error: z.string(),\n message: z.string().optional(),\n statusCode: z.number().int().optional(),\n details: z.record(z.string(), z.unknown()).optional(),\n});\n\n/**\n * Inferred type for error response\n */\nexport type ErrorResponse = z.infer<typeof ErrorResponseSchema>;\n\n/**\n * Generic API response schema (success or error)\n */\nexport const createApiResponseSchema = <T extends z.ZodTypeAny>(dataSchema: T) => {\n return z.union([createSuccessResponseSchema(dataSchema), ErrorResponseSchema]);\n};\n\n// ============================================================================\n// Common Field Schemas\n// ============================================================================\n\n/**\n * Email schema\n */\nexport const EmailSchema = z.string().email();\n\n/**\n * URL schema\n */\nexport const UrlSchema = z.string().url();\n\n/**\n * Phone number schema (basic validation)\n */\nexport const PhoneSchema = z.string().regex(/^\\+?[1-9]\\d{1,14}$/);\n\n/**\n * Date string schema (ISO 8601)\n */\nexport const DateStringSchema = z.string().datetime();\n\n/**\n * Non-empty string schema\n */\nexport const NonEmptyStringSchema = z.string().min(1);\n\n/**\n * Trimmed non-empty string schema\n */\nexport const TrimmedStringSchema = z.string().trim().min(1);\n\n/**\n * Boolean schema with string coercion\n */\nexport const BooleanSchema = z.union([z.boolean(), z.string()]).transform(val => {\n return typeof val === 'string' ? val === 'true' : val;\n});\n\n// ============================================================================\n// Timestamp Schemas\n// ============================================================================\n\n/**\n * Created/Updated timestamp schema\n */\nexport const TimestampSchema = z.object({\n createdAt: z.date(),\n updatedAt: z.date(),\n});\n\n/**\n * Optional timestamp schema\n */\nexport const OptionalTimestampSchema = z.object({\n createdAt: z.date().optional(),\n updatedAt: z.date().optional(),\n});\n\n// ============================================================================\n// Utility Schemas\n// ============================================================================\n\n/**\n * Comma-separated string to array transformer\n */\nexport const CommaSeparatedStringSchema = z.string().transform(val => {\n return val.split(',').map(item => item.trim());\n});\n\n/**\n * JSON string schema (parses JSON string to object)\n */\nexport const JsonStringSchema = z.string().transform((str, _ctx) => {\n try {\n return JSON.parse(str);\n } catch {\n _ctx.addIssue({ code: 'custom', message: 'Invalid JSON string' });\n return z.NEVER;\n }\n});\n\n// ============================================================================\n// Health Check Schemas\n// ============================================================================\n\n/**\n * Health check response schema\n */\nexport const HealthCheckResponseSchema = z.object({\n status: z.enum(['healthy', 'unhealthy', 'degraded']),\n timestamp: z.string().datetime(),\n services: z\n .record(\n z.string(),\n z.object({\n status: z.enum(['up', 'down', 'degraded']),\n message: z.string().optional(),\n }),\n )\n .optional(),\n});\n\n/**\n * Inferred type for health check response\n */\nexport type HealthCheckResponse = z.infer<typeof HealthCheckResponseSchema>;\n"],
5
+ "mappings": ";;AAAA,SAAS,SAAS;AAaX,MAAM,kBAAkB,EAAE,OAAO,OAAO,EAAE,IAAI,EAAE,SAAS;AAKzD,MAAM,aAAa,EAAE,OAAO,EAAE,KAAK;AAKnC,MAAM,0BAA0B,gBAAgB,SA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CAAC;AASM,MAAM,4BAA4B,EAAE,OAAO;AAAA,EAChD,QAAQ,EAAE,KAAK,CAAC,WAAW,aAAa,UAAU,CAAC;AAAA,EACnD,WAAW,EAAE,OAAO,EAAE,SAAS;AAAA,EAC/B,UAAU,EACP;AAAA,IACC,EAAE,OAAO;AAAA,IACT,EAAE,OAAO;AAAA,MACP,QAAQ,EAAE,KAAK,CAAC,MAAM,QAAQ,UAAU,CAAC;AAAA,MACzC,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,IAC/B,CAAC;AAAA,EACH,EACC,SAAS;AACd,CAAC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Common Zod schemas for validation and type inference
3
+ * @module schemas
4
+ */
5
+ export * from './common.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,aAAa,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./common.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/schemas/index.ts"],
4
+ "sourcesContent": ["/**\n * Common Zod schemas for validation and type inference\n * @module schemas\n */\n\nexport * from './common.js';\n"],
5
+ "mappings": "AAKA,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ export { default as AwsS3 } from './s3.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/aws/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,54 @@
1
+ import { S3Client } from '@aws-sdk/client-s3';
2
+ import type { AwsS3ConstructorOptions } from './s3.interface.js';
3
+ interface DownloadFileOptions {
4
+ bucketName: string;
5
+ key: string;
6
+ destinationFilePath: string;
7
+ }
8
+ export default class AwsS3 {
9
+ client: S3Client;
10
+ private options;
11
+ constructor(options: Partial<AwsS3ConstructorOptions>);
12
+ private getBucketUrl;
13
+ uploadFile({ bucketName, path, body, contentType, forceDownload, publicRead, }: {
14
+ bucketName: string;
15
+ path: string;
16
+ body: Buffer;
17
+ contentType?: string;
18
+ forceDownload?: boolean;
19
+ publicRead?: boolean;
20
+ }): Promise<string>;
21
+ startMultipartUpload({ bucketName, path, publicRead, }: {
22
+ bucketName: string;
23
+ path: string;
24
+ publicRead?: boolean;
25
+ }): Promise<string | undefined>;
26
+ uploadPart({ bucketName, path, partNumber, uploadId, body, }: {
27
+ bucketName: string;
28
+ path: string;
29
+ partNumber: number;
30
+ uploadId: string;
31
+ body: any;
32
+ }): Promise<string | undefined>;
33
+ completeMultipartUpload({ bucketName, path, uploadId, parts, }: {
34
+ bucketName: string;
35
+ path: string;
36
+ uploadId: string;
37
+ parts: {
38
+ PartNumber: number;
39
+ ETag: string;
40
+ }[];
41
+ }): Promise<string>;
42
+ downloadFile({ bucketName, key, destinationFilePath, onStart, onProgress, onComplete, onError, }: DownloadFileOptions & {
43
+ onStart?: () => void;
44
+ onProgress?: (progress: number) => void;
45
+ onComplete?: () => void;
46
+ onError?: (error: Error) => void;
47
+ }): Promise<void>;
48
+ generateSignedUrl({ bucket, key }: {
49
+ bucket: string;
50
+ key: string;
51
+ }): Promise<string>;
52
+ }
53
+ export {};
54
+ //# sourceMappingURL=s3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3.d.ts","sourceRoot":"","sources":["../../../src/services/aws/s3.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,QAAQ,EAGT,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AASjE,UAAU,mBAAmB;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,MAAM,CAA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AAA;SAAE,EAAE,CAAC;KAC/C;IA0BK,YAAY,CAAC,EACjB,UAAU,EACV,GAAG,EACH,mBAAmB,EACnB,OAAO,EACP,UAAU,EACV,UAAU,EACV,OAAO,GACR,EAAE,mBAAmB,GAAG;QACvB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;QACxC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;QACxB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;KAClC,GAAG,OAAO,CAAC,IAAI,CAAC;IA+EJ,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC;CA2BlG"}
@@ -0,0 +1,14 @@
1
+ export interface AwsS3LocalstackOptions {
2
+ enabled?: boolean;
3
+ port?: number;
4
+ }
5
+ export interface AwsS3ConstructorOptions {
6
+ region: string;
7
+ localstack: AwsS3LocalstackOptions;
8
+ credentials?: {
9
+ accessKeyId?: string;
10
+ secretAccessKey?: string;
11
+ };
12
+ endpoint?: string;
13
+ }
14
+ //# sourceMappingURL=s3.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3.interface.d.ts","sourceRoot":"","sources":["../../../src/services/aws/s3.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,sBAAsB,CAAC;IACnC,WAAW,CAAC,EAAE;QACZ,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,2 @@
1
+ export * from './aws/index.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Check if a file or directory exists asynchronously
3
+ * @param pathToCheck - Path to check
4
+ * @returns Promise<boolean> - true if exists, false otherwise
5
+ */
6
+ declare function pathExists(pathToCheck: string): Promise<boolean>;
7
+ /**
8
+ * Ensure directory exists, create if it doesn't
9
+ * @param dirPath - Directory path to ensure
10
+ */
11
+ declare function ensureDir(dirPath: string): Promise<void>;
12
+ declare function convertFile({ inputFilePath, outputFilePath, format, }: {
13
+ inputFilePath: string;
14
+ outputFilePath: string;
15
+ format: string;
16
+ }): Promise<void>;
17
+ /**
18
+ * Copy a file or directory synchronously
19
+ *
20
+ * @param src The source path
21
+ * @param dest The destination path
22
+ */
23
+ declare function copySync(src: string, dest: string): void;
24
+ /**
25
+ * Download file from URL
26
+ *
27
+ * @param url The URL to download the file from
28
+ * @param destinationPath The path to save the downloaded file
29
+ */
30
+ declare function downloadFile({ url, destinationPath }: {
31
+ url: string;
32
+ destinationPath: string;
33
+ }): Promise<void>;
34
+ /**
35
+ * Format file size.
36
+ *
37
+ * @param bytes The file size in bytes
38
+ */
39
+ declare function formatFileSize({ bytes }: {
40
+ bytes: number;
41
+ }): string;
42
+ /**
43
+ * Remove a file or directory synchronously
44
+ *
45
+ * @param target The path to the file or directory to remove
46
+ */
47
+ declare function removeSync(target: string): void;
48
+ declare const _default: {
49
+ convertFile: typeof convertFile;
50
+ copySync: typeof copySync;
51
+ downloadFile: typeof downloadFile;
52
+ formatFileSize: typeof formatFileSize;
53
+ removeSync: typeof removeSync;
54
+ pathExists: typeof pathExists;
55
+ ensureDir: typeof ensureDir;
56
+ };
57
+ export default _default;
58
+ //# sourceMappingURL=file.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/util/file.ts"],"names":[],"mappings":"AAUA;;;;GAIG;AACH,iBAAe,UAAU,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO/D;AAED;;;GAGG;AACH,iBAAe,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMvD;AAED,iBAAe,WAAW,CAAC,EACzB,aAAa,EACb,cAAc,EACd,MAAM,GACP,EAAE;IACD,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsBhB;AAED;;;;;GAKG;AACH,iBAAS,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAmBjD;AAED;;;;;GAKG;AACH,iBAAe,YAAY,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA4B7G;AAED;;;;GAIG;AACH,iBAAS,cAAc,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAyB5D;AAED;;;;GAIG;AACH,iBAAS,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAoBxC;;;;;;;;;;AAED,wBAQE"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * Deep merge objects with defaults, preventing prototype pollution.
3
+ *
4
+ * This function:
5
+ * - Recursively merges source objects into the target
6
+ * - Preserves existing values in target (acts like defaults)
7
+ * - Sanitizes sources to remove dangerous keys (__proto__, constructor, prototype)
8
+ * - Prevents prototype pollution attacks
9
+ *
10
+ * @param target - The target object to merge into
11
+ * @param sources - Source objects providing default values
12
+ * @returns The merged target object (mutated)
13
+ *
14
+ * @example
15
+ * const userConfig = { host: 'localhost' };
16
+ * const defaults = { host: '0.0.0.0', port: 3001 };
17
+ * const merged = defaultsDeep(userConfig, defaults);
18
+ * // merged = { host: 'localhost', port: 3001 }
19
+ */
20
+ declare function defaultsDeep<T extends object>(target: T, ...sources: Array<Partial<T>>): T;
21
+ /**
22
+ * Check if a value is an object.
23
+ */
24
+ declare function isObject(item: unknown): item is Record<string, unknown>;
25
+ type AnyObject = Record<string, unknown>;
26
+ /**
27
+ * Retrieves the value from an object using a dotted key path safely.
28
+ *
29
+ * @param obj - The object to retrieve the value from.
30
+ * @param path - The dotted key path (e.g., 'user.email').
31
+ * @returns The value at the specified key path or undefined if not found.
32
+ */
33
+ declare function getValueFromObject(obj: AnyObject, path: string): unknown;
34
+ /**
35
+ * Retrieves the value from an array of objects using a dotted key path.
36
+ *
37
+ * @param arr - The array of objects.
38
+ * @param path - The dotted key path (e.g., 'user.email').
39
+ * @returns An array of values at the specified key path from each object.
40
+ */
41
+ declare function getValueFromArray(arr: AnyObject[], path: string): unknown[];
42
+ declare function getScriptFileExtension(): string;
43
+ declare const _default: {
44
+ defaultsDeep: typeof defaultsDeep;
45
+ isObject: typeof isObject;
46
+ getValueFromArray: typeof getValueFromArray;
47
+ getValueFromObject: typeof getValueFromObject;
48
+ getScriptFileExtension: typeof getScriptFileExtension;
49
+ };
50
+ export default _default;
51
+ //# sourceMappingURL=helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helper.d.ts","sourceRoot":"","sources":["../../src/util/helper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,GAAG,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAgBnF;AA0HD;;GAEG;AACH,iBAAS,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEhE;AAED,KAAK,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEzC;;;;;;GAMG;AACH,iBAAS,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAWjE;AAED;;;;;;GAMG;AACH,iBAAS,iBAAiB,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,EAAE,CAEpE;AAED,iBAAS,sBAAsB,IAAI,MAAM,CAExC;;;;;;;;AAED,wBAME"}
@@ -1,18 +1,80 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import lodashDefaultsDeep from "lodash.defaultsdeep";
4
3
  function defaultsDeep(target, ...sources) {
5
- const sanitizedSources = sources.map((source) => {
6
- if (!isObject(source)) return source;
7
- const sanitized = { ...source };
8
- delete sanitized["__proto__"];
9
- delete sanitized["constructor"];
10
- delete sanitized["prototype"];
11
- return sanitized;
12
- });
13
- return lodashDefaultsDeep(target, ...sanitizedSources);
4
+ let result = target;
5
+ if (target === null || target === void 0) {
6
+ result = {};
7
+ }
8
+ for (const source of sources) {
9
+ if (!isObject(source) && !Array.isArray(source)) continue;
10
+ mergeObjects(result, source);
11
+ }
12
+ return result;
14
13
  }
15
14
  __name(defaultsDeep, "defaultsDeep");
15
+ function mergeObjects(target, source) {
16
+ if (Array.isArray(source)) {
17
+ if (!Array.isArray(target)) {
18
+ for (let i = 0; i < source.length; i++) {
19
+ const key = String(i);
20
+ if (key === "__proto__" || key === "constructor" || key === "prototype") continue;
21
+ const sourceValue = source[i];
22
+ const targetValue = target[key];
23
+ const keyExists = key in target;
24
+ if (keyExists && isObject(targetValue) && isObject(sourceValue)) {
25
+ mergeObjects(targetValue, sourceValue);
26
+ } else if (!keyExists || targetValue === void 0) {
27
+ target[key] = isObject(sourceValue) ? deepClone(sourceValue) : sourceValue;
28
+ }
29
+ }
30
+ return;
31
+ }
32
+ for (let i = 0; i < source.length; i++) {
33
+ const sourceValue = source[i];
34
+ const targetValue = target[i];
35
+ const indexExists = i in target;
36
+ if (indexExists && isObject(targetValue) && isObject(sourceValue)) {
37
+ mergeObjects(targetValue, sourceValue);
38
+ } else if (!indexExists || targetValue === void 0) {
39
+ target[i] = isObject(sourceValue) ? deepClone(sourceValue) : sourceValue;
40
+ }
41
+ }
42
+ return;
43
+ }
44
+ for (const key of Object.keys(source)) {
45
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
46
+ continue;
47
+ }
48
+ if (!Object.prototype.hasOwnProperty.call(source, key)) {
49
+ continue;
50
+ }
51
+ const sourceValue = source[key];
52
+ const targetValue = target[key];
53
+ if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {
54
+ mergeObjects(targetValue, sourceValue);
55
+ } else if (isObject(targetValue) && Array.isArray(sourceValue)) {
56
+ mergeObjects(targetValue, sourceValue);
57
+ } else if (targetValue !== void 0 && isObject(targetValue) && isObject(sourceValue)) {
58
+ mergeObjects(targetValue, sourceValue);
59
+ } else if (targetValue === void 0) {
60
+ target[key] = isObject(sourceValue) || Array.isArray(sourceValue) ? deepClone(sourceValue) : sourceValue;
61
+ }
62
+ }
63
+ }
64
+ __name(mergeObjects, "mergeObjects");
65
+ function deepClone(obj) {
66
+ if (!isObject(obj)) return obj;
67
+ const cloned = Array.isArray(obj) ? [] : {};
68
+ for (const key of Object.keys(obj)) {
69
+ if (key === "__proto__" || key === "constructor" || key === "prototype") {
70
+ continue;
71
+ }
72
+ const value = obj[key];
73
+ cloned[key] = isObject(value) ? deepClone(value) : value;
74
+ }
75
+ return cloned;
76
+ }
77
+ __name(deepClone, "deepClone");
16
78
  function isObject(item) {
17
79
  return item !== null && typeof item === "object" && !Array.isArray(item);
18
80
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/util/helper.ts"],
4
- "sourcesContent": ["import lodashDefaultsDeep from 'lodash.defaultsdeep';\n\n/**\n * Deep merge objects with defaults, preventing prototype pollution.\n *\n * This is a secure wrapper around lodash.defaultsdeep that:\n * - Sanitizes sources to remove dangerous keys (__proto__, constructor, prototype)\n * - Delegates to battle-tested lodash.defaultsdeep for merge logic\n * - Maintains backward compatibility with existing usage\n *\n * @param target - The target object to merge into\n * @param sources - Source objects providing default values\n * @returns The merged target object (mutated)\n *\n * @example\n * const userConfig = { host: 'localhost' };\n * const defaults = { host: '0.0.0.0', port: 3001 };\n * const merged = defaultsDeep(userConfig, defaults);\n * // merged = { host: 'localhost', port: 3001 }\n */\nfunction defaultsDeep<T extends object>(target: T, ...sources: Array<Partial<T>>): T {\n // Sanitize sources to prevent prototype pollution\n const sanitizedSources = sources.map(source => {\n if (!isObject(source)) return source;\n\n // Create a copy and remove dangerous properties\n const sanitized: Record<string, unknown> = { ...source };\n delete sanitized['__proto__'];\n delete sanitized['constructor'];\n delete sanitized['prototype'];\n return sanitized;\n });\n\n // Delegate to lodash.defaultsdeep with sanitized sources\n return lodashDefaultsDeep(target, ...sanitizedSources) as T;\n}\n\n/**\n * Check if a value is an object.\n */\nfunction isObject(item: unknown): item is Record<string, unknown> {\n return item !== null && typeof item === 'object' && !Array.isArray(item);\n}\n\ntype AnyObject = Record<string, unknown>;\n\n/**\n * Retrieves the value from an object using a dotted key path safely.\n *\n * @param obj - The object to retrieve the value from.\n * @param path - The dotted key path (e.g., 'user.email').\n * @returns The value at the specified key path or undefined if not found.\n */\nfunction getValueFromObject(obj: AnyObject, path: string): unknown {\n const parts = path.split('.');\n let current: any = obj;\n for (const part of parts) {\n if (part === '__proto__' || part === 'constructor' || part === 'prototype') return undefined;\n if (!current || !Object.prototype.hasOwnProperty.call(current, part)) return undefined;\n // Access guarded by ownProperty check and blocked prototype keys\n // eslint-disable-next-line security/detect-object-injection\n current = (current as Record<string, any>)[part];\n }\n return current;\n}\n\n/**\n * Retrieves the value from an array of objects using a dotted key path.\n *\n * @param arr - The array of objects.\n * @param path - The dotted key path (e.g., 'user.email').\n * @returns An array of values at the specified key path from each object.\n */\nfunction getValueFromArray(arr: AnyObject[], path: string): unknown[] {\n return arr.map(obj => getValueFromObject(obj, path));\n}\n\nfunction getScriptFileExtension(): string {\n return process.env.NODE_ENV === 'development' ? 'ts' : 'js';\n}\n\nexport default {\n defaultsDeep,\n isObject,\n getValueFromArray,\n getValueFromObject,\n getScriptFileExtension,\n};\n"],
5
- "mappings": ";;AAAA,OAAO,wBAAwB;AAoB/B,SAAS,aAA+B,WAAc,SAA+B;AAEnF,QAAM,mBAAmB,QAAQ,IAAI,YAAU;AAC7C,QAAI,CAAC,SAAS,MAAM,EAAG,QAAO;AAG9B,UAAM,YAAqC,EAAE,GAAG,OAAO;AACvD,WAAO,UAAU,WAAW;AAC5B,WAAO,UAAU,aAAa;AAC9B,WAAO,UAAU,WAAW;AAC5B,WAAO;AAAA,EACT,CAAC;AAGD,SAAO,mBAAmB,QAAQ,GAAG,gBAAgB;AACvD;AAfS;AAoBT,SAAS,SAAS,MAAgD;AAChE,SAAO,SAAS,QAAQ,OAAO,SAAS,YAAY,CAAC,MAAM,QAAQ,IAAI;AACzE;AAFS;AAaT,SAAS,mBAAmB,KAAgB,MAAuB;AACjE,QAAM,QAAQ,KAAK,MAAM,GAAG;AAC5B,MAAI,UAAe;AACnB,aAAW,QAAQ,OAAO;AACxB,QAAI,SAAS,eAAe,SAAS,iBAAiB,SAAS,YAAa,QAAO;AACnF,QAAI,CAAC,WAAW,CAAC,OAAO,UAAU,eAAe,KAAK,SAAS,IAAI,EAAG,QAAO;AAG7E,cAAW,QAAgC,IAAI;AAAA,EACjD;AACA,SAAO;AACT;AAXS;AAoBT,SAAS,kBAAkB,KAAkB,MAAyB;AACpE,SAAO,IAAI,IAAI,SAAO,mBAAmB,KAAK,IAAI,CAAC;AACrD;AAFS;AAIT,SAAS,yBAAiC;AACxC,SAAO,QAAQ,IAAI,aAAa,gBAAgB,OAAO;AACzD;AAFS;AAIT,IAAO,iBAAQ;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
4
+ "sourcesContent": ["/**\n * Deep merge objects with defaults, preventing prototype pollution.\n *\n * This function:\n * - Recursively merges source objects into the target\n * - Preserves existing values in target (acts like defaults)\n * - Sanitizes sources to remove dangerous keys (__proto__, constructor, prototype)\n * - Prevents prototype pollution attacks\n *\n * @param target - The target object to merge into\n * @param sources - Source objects providing default values\n * @returns The merged target object (mutated)\n *\n * @example\n * const userConfig = { host: 'localhost' };\n * const defaults = { host: '0.0.0.0', port: 3001 };\n * const merged = defaultsDeep(userConfig, defaults);\n * // merged = { host: 'localhost', port: 3001 }\n */\nfunction defaultsDeep<T extends object>(target: T, ...sources: Array<Partial<T>>): T {\n // Handle null/undefined target by converting to empty object\n let result = target;\n if (target === null || target === undefined) {\n result = {} as T;\n }\n\n // Process each source\n for (const source of sources) {\n if (!isObject(source) && !Array.isArray(source)) continue;\n\n // Recursively merge source into target\n mergeObjects(result, source);\n }\n\n return result;\n}\n\n/**\n * Recursively merge source into target, preserving target values.\n * This acts like defaultsDeep - only fills in missing values from source.\n */\nfunction mergeObjects(target: any, source: any): void {\n // Handle arrays specially - merge by index\n if (Array.isArray(source)) {\n // If target is not an array but source is, treat target as object with numeric keys\n if (!Array.isArray(target)) {\n // Merge array into object-like target\n for (let i = 0; i < source.length; i++) {\n const key = String(i);\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') continue;\n\n // eslint-disable-next-line security/detect-object-injection\n const sourceValue = source[i];\n // eslint-disable-next-line security/detect-object-injection\n const targetValue = target[key];\n\n // Check if key exists in target\n const keyExists = key in target;\n\n if (keyExists && isObject(targetValue) && isObject(sourceValue)) {\n mergeObjects(targetValue, sourceValue);\n } else if (!keyExists || targetValue === undefined) {\n // eslint-disable-next-line security/detect-object-injection\n target[key] = isObject(sourceValue) ? deepClone(sourceValue) : sourceValue;\n }\n }\n return;\n }\n\n // Both are arrays - merge by index\n for (let i = 0; i < source.length; i++) {\n // eslint-disable-next-line security/detect-object-injection\n const sourceValue = source[i];\n // eslint-disable-next-line security/detect-object-injection\n const targetValue = target[i];\n\n // Check if index exists in target (not just if value is undefined)\n const indexExists = i in target;\n\n // If index exists and both values are objects, merge them\n if (indexExists && isObject(targetValue) && isObject(sourceValue)) {\n mergeObjects(targetValue, sourceValue);\n }\n // If index doesn't exist or value is undefined, fill from source\n else if (!indexExists || targetValue === undefined) {\n // eslint-disable-next-line security/detect-object-injection\n target[i] = isObject(sourceValue) ? deepClone(sourceValue) : sourceValue;\n }\n // Otherwise, keep target's existing value\n }\n return;\n }\n\n // Regular object merging\n for (const key of Object.keys(source)) {\n // Block dangerous keys to prevent prototype pollution\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n continue;\n }\n\n // Only use hasOwnProperty for safer property access\n if (!Object.prototype.hasOwnProperty.call(source, key)) {\n continue;\n }\n\n // Access guarded by ownProperty check and blocked prototype keys\n // eslint-disable-next-line security/detect-object-injection\n const sourceValue = source[key];\n\n // eslint-disable-next-line security/detect-object-injection\n const targetValue = target[key];\n\n // If both are arrays, merge them by index\n if (Array.isArray(targetValue) && Array.isArray(sourceValue)) {\n mergeObjects(targetValue, sourceValue);\n }\n // If target is object and source is array, merge array into object by numeric keys\n else if (isObject(targetValue) && Array.isArray(sourceValue)) {\n mergeObjects(targetValue, sourceValue);\n }\n // If target value exists and both are objects (not arrays), recurse\n else if (targetValue !== undefined && isObject(targetValue) && isObject(sourceValue)) {\n mergeObjects(targetValue, sourceValue);\n }\n // If target doesn't have this key, set it from source\n else if (targetValue === undefined) {\n // eslint-disable-next-line security/detect-object-injection\n target[key] = isObject(sourceValue) || Array.isArray(sourceValue) ? deepClone(sourceValue) : sourceValue;\n }\n // Otherwise, keep target's existing value (defaultsDeep behavior)\n }\n}\n\n/**\n * Deep clone an object to avoid reference sharing.\n */\nfunction deepClone<T>(obj: T): T {\n if (!isObject(obj)) return obj;\n\n const cloned: any = Array.isArray(obj) ? [] : {};\n\n for (const key of Object.keys(obj)) {\n // Block dangerous keys\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n continue;\n }\n\n // eslint-disable-next-line security/detect-object-injection\n const value = (obj as any)[key];\n\n // eslint-disable-next-line security/detect-object-injection\n cloned[key] = isObject(value) ? deepClone(value) : value;\n }\n\n return cloned;\n}\n\n/**\n * Check if a value is an object.\n */\nfunction isObject(item: unknown): item is Record<string, unknown> {\n return item !== null && typeof item === 'object' && !Array.isArray(item);\n}\n\ntype AnyObject = Record<string, unknown>;\n\n/**\n * Retrieves the value from an object using a dotted key path safely.\n *\n * @param obj - The object to retrieve the value from.\n * @param path - The dotted key path (e.g., 'user.email').\n * @returns The value at the specified key path or undefined if not found.\n */\nfunction getValueFromObject(obj: AnyObject, path: string): unknown {\n const parts = path.split('.');\n let current: any = obj;\n for (const part of parts) {\n if (part === '__proto__' || part === 'constructor' || part === 'prototype') return undefined;\n if (!current || !Object.prototype.hasOwnProperty.call(current, part)) return undefined;\n // Access guarded by ownProperty check and blocked prototype keys\n // eslint-disable-next-line security/detect-object-injection\n current = (current as Record<string, any>)[part];\n }\n return current;\n}\n\n/**\n * Retrieves the value from an array of objects using a dotted key path.\n *\n * @param arr - The array of objects.\n * @param path - The dotted key path (e.g., 'user.email').\n * @returns An array of values at the specified key path from each object.\n */\nfunction getValueFromArray(arr: AnyObject[], path: string): unknown[] {\n return arr.map(obj => getValueFromObject(obj, path));\n}\n\nfunction getScriptFileExtension(): string {\n return process.env.NODE_ENV === 'development' ? 'ts' : 'js';\n}\n\nexport default {\n defaultsDeep,\n isObject,\n getValueFromArray,\n getValueFromObject,\n getScriptFileExtension,\n};\n"],
5
+ "mappings": ";;AAmBA,SAAS,aAA+B,WAAc,SAA+B;AAEnF,MAAI,SAAS;AACb,MAAI,WAAW,QAAQ,WAAW,QAAW;AAC3C,aAAS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AAO,UAAU,eAAe,KAAK,SAAS,IAAI,EAAG,QAAO;AAG7E,cAAW,QAAgC,IAAI;AAAA,EACjD;AACA,SAAO;AACT;AAXS;AAoBT,SAAS,kBAAkB,KAAkB,MAAyB;AACpE,SAAO,IAAI,IAAI,SAAO,mBAAmB,KAAK,IAAI,CAAC;AACrD;AAFS;AAIT,SAAS,yBAAiC;AACxC,SAAO,QAAQ,IAAI,aAAa,gBAAgB,OAAO;AACzD;AAFS;AAIT,IAAO,iBAAQ;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,12 @@
1
+ declare function extractMimeType({ base64 }: {
2
+ base64: string;
3
+ }): string | undefined;
4
+ declare function mimeTypeToExtension({ mimeType }: {
5
+ mimeType: string;
6
+ }): string | undefined;
7
+ declare const _default: {
8
+ extractMimeType: typeof extractMimeType;
9
+ mimeTypeToExtension: typeof mimeTypeToExtension;
10
+ };
11
+ export default _default;
12
+ //# sourceMappingURL=image.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/util/image.ts"],"names":[],"mappings":"AAAA,iBAAS,eAAe,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,GAAG,SAAS,CAO3E;AAED,iBAAS,mBAAmB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,GAAG,SAAS,CAenF;;;;;AAED,wBAGE"}
@@ -0,0 +1,11 @@
1
+ export { default as Time } from './time.js';
2
+ export { default as Timing } from './timing.js';
3
+ export { default as File } from './file.js';
4
+ export { default as Helper } from './helper.js';
5
+ export { default as Image } from './image.js';
6
+ export { default as Loader } from './loader.js';
7
+ export { default as Num } from './num.js';
8
+ export { default as OS } from './os.js';
9
+ export { default as Str } from './str.js';
10
+ export { default as URL } from './url.js';
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,21 @@
1
+ export interface ModuleMap<T = unknown> {
2
+ [key: string]: T;
3
+ }
4
+ export type EntityClass<T = unknown> = new (...args: unknown[]) => T;
5
+ declare const _default: {
6
+ loadModulesInDirectory: <T = unknown>({ directory, extensions, }: {
7
+ directory: string;
8
+ extensions?: string[];
9
+ }) => Promise<ModuleMap<T>>;
10
+ loadEntityModule: <T = unknown>({ entitiesDirectory, entityName, }: {
11
+ entitiesDirectory: string;
12
+ entityName: string;
13
+ }) => Promise<EntityClass<T>>;
14
+ clearModuleCache: () => void;
15
+ getCacheStats: () => {
16
+ modulesCached: number;
17
+ entitiesCached: number;
18
+ };
19
+ };
20
+ export default _default;
21
+ //# sourceMappingURL=loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/util/loader.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,SAAS,CAAC,CAAC,GAAG,OAAO;IACpC,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;CAClB;AAiFD,MAAM,MAAM,WAAW,CAAC,CAAC,GAAG,OAAO,IAAI,KAAK,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;;6BAnE/B,CAAC,wCAGpC;QACD,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;KACvB,KAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;uBA+DO,CAAC,gDAG9B;QACD,iBAAiB,EAAE,MAAM,CAAC;QAC1B,UAAU,EAAE,MAAM,CAAC;KACpB,KAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;4BAkCE,IAAI;yBAKP;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE;;AAO3E,wBAKE"}
@@ -41,10 +41,13 @@ const loadModulesInDirectory = /* @__PURE__ */ __name(async ({
41
41
  }
42
42
  const moduleName = path.basename(file, ext);
43
43
  const filePath = path.join(directory, file);
44
+ const absolutePath = path.isAbsolute(filePath) ? filePath : path.resolve(filePath);
45
+ const fileUrl = `file://${absolutePath.replace(/\\/g, "/")}`;
44
46
  try {
45
- const importedModule = await import(filePath);
47
+ const importedModule = await import(fileUrl);
46
48
  if (moduleName !== "__proto__" && moduleName !== "constructor" && moduleName !== "prototype") {
47
- Reflect.set(loadedModules, moduleName, importedModule.default);
49
+ const moduleExport = importedModule.default ?? importedModule;
50
+ Reflect.set(loadedModules, moduleName, moduleExport);
48
51
  }
49
52
  } catch (error) {
50
53
  console.error(`Failed to import module ${filePath}:`, error);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/util/loader.ts"],
4
- "sourcesContent": ["import fs from 'fs';\nimport path from 'path';\nimport { LRUCache } from 'lru-cache';\nimport { Helper } from './index.js';\n\n// Type for a map of loaded modules\nexport interface ModuleMap<T = unknown> {\n [key: string]: T;\n}\n\n// Cache for loaded modules to avoid repeated imports\n// Using LRU cache to prevent unbounded memory growth in long-running processes\nconst moduleCache = new LRUCache<string, ModuleMap>({\n max: 100, // Max 100 directories cached\n ttl: 1000 * 60 * 10, // 10 minutes\n});\n\nconst entityCache = new LRUCache<string, EntityClass>({\n max: 500, // Max 500 entities cached (accessed more frequently than modules)\n ttl: 1000 * 60 * 10, // 10 minutes\n});\n\nconst loadModulesInDirectory = async <T = unknown>({\n directory,\n extensions,\n}: {\n directory: string;\n extensions?: string[];\n}): Promise<ModuleMap<T>> => {\n // Create cache key based on directory and extensions\n const cacheKey = `${directory}:${extensions?.join(',') ?? 'all'}`;\n\n // Check cache first\n if (moduleCache.has(cacheKey)) {\n const cachedModule = moduleCache.get(cacheKey);\n if (cachedModule) {\n return cachedModule as ModuleMap<T>;\n }\n }\n\n const loadedModules: ModuleMap<T> = {};\n\n // Use readdir with withFileTypes option to avoid separate stat calls\n const dirents = await fs.promises.readdir(directory, { withFileTypes: true });\n\n for (const dirent of dirents) {\n // Skip directories without needing stat call\n if (dirent.isDirectory()) {\n continue;\n }\n\n const file = dirent.name;\n const ext = path.extname(file);\n const isDeclarationFile = file.endsWith('.d.ts');\n\n // Skip files that are not in the specified extensions or are .d.ts files\n if ((extensions && extensions.length > 0 && !extensions.includes(ext)) || isDeclarationFile) {\n continue;\n }\n\n const moduleName = path.basename(file, ext);\n const filePath = path.join(directory, file);\n\n try {\n const importedModule = await import(filePath);\n\n // Use safe property assignment to prevent prototype pollution\n if (moduleName !== '__proto__' && moduleName !== 'constructor' && moduleName !== 'prototype') {\n Reflect.set(loadedModules, moduleName, importedModule.default);\n }\n } catch (error) {\n console.error(`Failed to import module ${filePath}:`, error);\n }\n }\n\n // Cache the results for future use\n moduleCache.set(cacheKey, loadedModules);\n\n return loadedModules;\n};\n\n// Type constraint for entity classes (must be constructable)\nexport type EntityClass<T = unknown> = new (...args: unknown[]) => T;\n\nconst loadEntityModule = async <T = unknown>({\n entitiesDirectory,\n entityName,\n}: {\n entitiesDirectory: string;\n entityName: string;\n}): Promise<EntityClass<T>> => {\n // Create cache key based on directory and entity name\n const cacheKey = `${entitiesDirectory}:${entityName}`;\n\n // Check cache first\n if (entityCache.has(cacheKey)) {\n return entityCache.get(cacheKey) as EntityClass<T>;\n }\n\n // Define entity module path\n const entityModulePath = path.join(entitiesDirectory, `${entityName}.${Helper.getScriptFileExtension()}`);\n\n // Import entity module\n const entityModule = await import(entityModulePath);\n\n // Safe property access to prevent prototype pollution\n if (entityName === '__proto__' || entityName === 'constructor' || entityName === 'prototype') {\n throw new Error(`Invalid entity name (Entity: ${entityName})`);\n }\n\n if (!entityModule || !Object.prototype.hasOwnProperty.call(entityModule, entityName)) {\n throw new Error(`Entity not found (Entity: ${entityName})`);\n }\n\n // Get entity class\n const EntityClass = Reflect.get(entityModule, entityName);\n\n // Cache the entity for future use\n entityCache.set(cacheKey, EntityClass);\n\n return EntityClass;\n};\n\n// Cache management functions for development/testing\nconst clearModuleCache = (): void => {\n moduleCache.clear();\n entityCache.clear();\n};\n\nconst getCacheStats = (): { modulesCached: number; entitiesCached: number } => {\n return {\n modulesCached: moduleCache.size,\n entitiesCached: entityCache.size,\n };\n};\n\nexport default {\n loadModulesInDirectory,\n loadEntityModule,\n clearModuleCache,\n getCacheStats,\n};\n"],
5
- "mappings": ";;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,SAAS,gBAAgB;AACzB,SAAS,cAAc;AASvB,MAAM,cAAc,IAAI,SAA4B;AAAA,EAClD,KAAK;AAAA;AAAA,EACL,KAAK,MAAO,KAAK;AAAA;AACnB,CAAC;AAED,MAAM,cAAc,IAAI,SAA8B;AAAA,EACpD,KAAK;AAAA;AAAA,EACL,KAAK,MAAO,KAAK;AAAA;AACnB,CAAC;AAED,MAAM,yBAAyB,8BAAoB;AAAA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AU,IAAI,OAAO,uBAAuB,CAAC,EAAE;AAGxG,QAAM,eAAe,MAAM,OAAO;AAGlC,MAAI,eAAe,eAAe,eAAe,iBAAiB,eAAe,aAAa;AAC5F,UAAM,IAAI,MAAM,gCAAgC,UAAU,GAAG;AAAA,EAC/D;AAEA,MAAI,CAAC,gBAAgB,CAAC,OAAO,UAAU,eAAe,KAAK,cAAc,UAAU,GAAG;AACpF,UAAM,IAAI,MAAM,6BAA6B,UAAU,GAAG;AAAA,EAC5D;AAGA,QAAM,cAAc,QAAQ,IAAI,cAAc,UAAU;AAGxD,cAAY,IAAI,UAAU,WAAW;AAErC,SAAO;AACT,GArCyB;AAwCzB,MAAM,mBAAmB,6BAAY;AACnC,cAAY,MAAM;AAClB,cAAY,MAAM;AACpB,GAHyB;AAKzB,MAAM,gBAAgB,6BAAyD;AAC7E,SAAO;AAAA,IACL,eAAe,YAAY;AAAA,IAC3B,gBAAgB,YAAY;AAAA,EAC9B;AACF,GALsB;AAOtB,IAAO,iBAAQ;AAAA,EACb;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
4
+ "sourcesContent": ["import fs from 'fs';\nimport path from 'path';\nimport { LRUCache } from 'lru-cache';\nimport { Helper } from './index.js';\n\n// Type for a map of loaded modules\nexport interface ModuleMap<T = unknown> {\n [key: string]: T;\n}\n\n// Cache for loaded modules to avoid repeated imports\n// Using LRU cache to prevent unbounded memory growth in long-running processes\nconst moduleCache = new LRUCache<string, ModuleMap>({\n max: 100, // Max 100 directories cached\n ttl: 1000 * 60 * 10, // 10 minutes\n});\n\nconst entityCache = new LRUCache<string, EntityClass>({\n max: 500, // Max 500 entities cached (accessed more frequently than modules)\n ttl: 1000 * 60 * 10, // 10 minutes\n});\n\nconst loadModulesInDirectory = async <T = unknown>({\n directory,\n extensions,\n}: {\n directory: string;\n extensions?: string[];\n}): Promise<ModuleMap<T>> => {\n // Create cache key based on directory and extensions\n const cacheKey = `${directory}:${extensions?.join(',') ?? 'all'}`;\n\n // Check cache first\n if (moduleCache.has(cacheKey)) {\n const cachedModule = moduleCache.get(cacheKey);\n if (cachedModule) {\n return cachedModule as ModuleMap<T>;\n }\n }\n\n const loadedModules: ModuleMap<T> = {};\n\n // Use readdir with withFileTypes option to avoid separate stat calls\n const dirents = await fs.promises.readdir(directory, { withFileTypes: true });\n\n for (const dirent of dirents) {\n // Skip directories without needing stat call\n if (dirent.isDirectory()) {\n continue;\n }\n\n const file = dirent.name;\n const ext = path.extname(file);\n const isDeclarationFile = file.endsWith('.d.ts');\n\n // Skip files that are not in the specified extensions or are .d.ts files\n if ((extensions && extensions.length > 0 && !extensions.includes(ext)) || isDeclarationFile) {\n continue;\n }\n\n const moduleName = path.basename(file, ext);\n const filePath = path.join(directory, file);\n // Convert to absolute path for ESM import\n const absolutePath = path.isAbsolute(filePath) ? filePath : path.resolve(filePath);\n // Use file:// URL for Windows compatibility\n const fileUrl = `file://${absolutePath.replace(/\\\\/g, '/')}`;\n\n try {\n const importedModule = await import(fileUrl);\n\n // Use safe property assignment to prevent prototype pollution\n if (moduleName !== '__proto__' && moduleName !== 'constructor' && moduleName !== 'prototype') {\n // Prefer default export, but fall back to the entire module if no default\n const moduleExport = importedModule.default ?? importedModule;\n Reflect.set(loadedModules, moduleName, moduleExport);\n }\n } catch (error) {\n // Note: console.error used here as Logger may not be initialized during early bootstrap\n console.error(`Failed to import module ${filePath}:`, error);\n }\n }\n\n // Cache the results for future use\n moduleCache.set(cacheKey, loadedModules);\n\n return loadedModules;\n};\n\n// Type constraint for entity classes (must be constructable)\nexport type EntityClass<T = unknown> = new (...args: unknown[]) => T;\n\nconst loadEntityModule = async <T = unknown>({\n entitiesDirectory,\n entityName,\n}: {\n entitiesDirectory: string;\n entityName: string;\n}): Promise<EntityClass<T>> => {\n // Create cache key based on directory and entity name\n const cacheKey = `${entitiesDirectory}:${entityName}`;\n\n // Check cache first\n if (entityCache.has(cacheKey)) {\n return entityCache.get(cacheKey) as EntityClass<T>;\n }\n\n // Define entity module path\n const entityModulePath = path.join(entitiesDirectory, `${entityName}.${Helper.getScriptFileExtension()}`);\n\n // Import entity module\n const entityModule = await import(entityModulePath);\n\n // Safe property access to prevent prototype pollution\n if (entityName === '__proto__' || entityName === 'constructor' || entityName === 'prototype') {\n throw new Error(`Invalid entity name (Entity: ${entityName})`);\n }\n\n if (!entityModule || !Object.prototype.hasOwnProperty.call(entityModule, entityName)) {\n throw new Error(`Entity not found (Entity: ${entityName})`);\n }\n\n // Get entity class\n const EntityClass = Reflect.get(entityModule, entityName);\n\n // Cache the entity for future use\n entityCache.set(cacheKey, EntityClass);\n\n return EntityClass;\n};\n\n// Cache management functions for development/testing\nconst clearModuleCache = (): void => {\n moduleCache.clear();\n entityCache.clear();\n};\n\nconst getCacheStats = (): { modulesCached: number; entitiesCached: number } => {\n return {\n modulesCached: moduleCache.size,\n entitiesCached: entityCache.size,\n };\n};\n\nexport default {\n loadModulesInDirectory,\n loadEntityModule,\n clearModuleCache,\n getCacheStats,\n};\n"],
5
+ "mappings": ";;AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,SAAS,gBAAgB;AACzB,SAAS,cAAc;AASvB,MAAM,cAAc,IAAI,SAA4B;AAAA,EAClD,KAAK;AAAA;AAAA,EACL,KAAK,MAAO,KAAK;AAAA;AACnB,CAAC;AAED,MAAM,cAAc,IAAI,SAA8B;AAAA,EACpD,KAAK;AAAA;AAAA,EACL,KAAK,MAAO,KAAK;AAAA;AACnB,CAAC;AAED,MAAM,yBAAyB,8BAAoB;AAAA,EACjD;AAAA,EACA;AACF,MAG6B;AAE3B,QAAM,WAAW,GAAG,SAAS,IAAI,YAAY,KAAK,GAAG,KAAK,KAAK;AAG/D,MAAI,YAAY,IAAI,QAAQ,GAAG;AAC7B,UAAM,eAAe,YAAY,IAAI,QAAQ;AAC7C,QAAI,cAAc;AAChB,aAAO;AAAA,IACT;AAAA,EACF;AAEA,QAAM,gBAA8B,CAAC;AAGrC,QAAM,UAAU,MAAM,GAAG,SAAS,Q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