@elsikora/cladi 1.0.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 (213) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +325 -0
  3. package/dist/cjs/domain/enum/index.d.ts +3 -0
  4. package/dist/cjs/domain/enum/index.d.ts.map +1 -0
  5. package/dist/cjs/domain/enum/logger-log-level.enum.d.ts +11 -0
  6. package/dist/cjs/domain/enum/logger-log-level.enum.d.ts.map +1 -0
  7. package/dist/cjs/domain/enum/logger-log-level.enum.js +14 -0
  8. package/dist/cjs/domain/enum/logger-log-level.enum.js.map +1 -0
  9. package/dist/cjs/domain/enum/service-token.enum.d.ts +10 -0
  10. package/dist/cjs/domain/enum/service-token.enum.d.ts.map +1 -0
  11. package/dist/cjs/domain/enum/service-token.enum.js +13 -0
  12. package/dist/cjs/domain/enum/service-token.enum.js.map +1 -0
  13. package/dist/cjs/domain/index.d.ts +3 -0
  14. package/dist/cjs/domain/index.d.ts.map +1 -0
  15. package/dist/cjs/domain/interface/container.interface.d.ts +55 -0
  16. package/dist/cjs/domain/interface/container.interface.d.ts.map +1 -0
  17. package/dist/cjs/domain/interface/error.interface.d.ts +18 -0
  18. package/dist/cjs/domain/interface/error.interface.d.ts.map +1 -0
  19. package/dist/cjs/domain/interface/factory.interface.d.ts +19 -0
  20. package/dist/cjs/domain/interface/factory.interface.d.ts.map +1 -0
  21. package/dist/cjs/domain/interface/index.d.ts +6 -0
  22. package/dist/cjs/domain/interface/index.d.ts.map +1 -0
  23. package/dist/cjs/domain/interface/logger/index.d.ts +3 -0
  24. package/dist/cjs/domain/interface/logger/index.d.ts.map +1 -0
  25. package/dist/cjs/domain/interface/logger/interface.d.ts +37 -0
  26. package/dist/cjs/domain/interface/logger/interface.d.ts.map +1 -0
  27. package/dist/cjs/domain/interface/logger/method-options.interface.d.ts +14 -0
  28. package/dist/cjs/domain/interface/logger/method-options.interface.d.ts.map +1 -0
  29. package/dist/cjs/domain/interface/registry.interface.d.ts +54 -0
  30. package/dist/cjs/domain/interface/registry.interface.d.ts.map +1 -0
  31. package/dist/cjs/index.d.ts +4 -0
  32. package/dist/cjs/index.d.ts.map +1 -0
  33. package/dist/cjs/index.js +38 -0
  34. package/dist/cjs/index.js.map +1 -0
  35. package/dist/cjs/infrastructure/class/base/container.class.d.ts +67 -0
  36. package/dist/cjs/infrastructure/class/base/container.class.d.ts.map +1 -0
  37. package/dist/cjs/infrastructure/class/base/container.class.js +193 -0
  38. package/dist/cjs/infrastructure/class/base/container.class.js.map +1 -0
  39. package/dist/cjs/infrastructure/class/base/error.class.d.ts +18 -0
  40. package/dist/cjs/infrastructure/class/base/error.class.d.ts.map +1 -0
  41. package/dist/cjs/infrastructure/class/base/error.class.js +30 -0
  42. package/dist/cjs/infrastructure/class/base/error.class.js.map +1 -0
  43. package/dist/cjs/infrastructure/class/base/factory.class.d.ts +38 -0
  44. package/dist/cjs/infrastructure/class/base/factory.class.d.ts.map +1 -0
  45. package/dist/cjs/infrastructure/class/base/factory.class.js +79 -0
  46. package/dist/cjs/infrastructure/class/base/factory.class.js.map +1 -0
  47. package/dist/cjs/infrastructure/class/base/index.d.ts +5 -0
  48. package/dist/cjs/infrastructure/class/base/index.d.ts.map +1 -0
  49. package/dist/cjs/infrastructure/class/base/registry.class.d.ts +73 -0
  50. package/dist/cjs/infrastructure/class/base/registry.class.d.ts.map +1 -0
  51. package/dist/cjs/infrastructure/class/base/registry.class.js +221 -0
  52. package/dist/cjs/infrastructure/class/base/registry.class.js.map +1 -0
  53. package/dist/cjs/infrastructure/constant/console-logger-default-options.constant.d.ts +6 -0
  54. package/dist/cjs/infrastructure/constant/console-logger-default-options.constant.d.ts.map +1 -0
  55. package/dist/cjs/infrastructure/constant/console-logger-default-options.constant.js +12 -0
  56. package/dist/cjs/infrastructure/constant/console-logger-default-options.constant.js.map +1 -0
  57. package/dist/cjs/infrastructure/constant/index.d.ts +2 -0
  58. package/dist/cjs/infrastructure/constant/index.d.ts.map +1 -0
  59. package/dist/cjs/infrastructure/factory/core.factory.d.ts +51 -0
  60. package/dist/cjs/infrastructure/factory/core.factory.d.ts.map +1 -0
  61. package/dist/cjs/infrastructure/factory/core.factory.js +85 -0
  62. package/dist/cjs/infrastructure/factory/core.factory.js.map +1 -0
  63. package/dist/cjs/infrastructure/factory/index.d.ts +2 -0
  64. package/dist/cjs/infrastructure/factory/index.d.ts.map +1 -0
  65. package/dist/cjs/infrastructure/index.d.ts +6 -0
  66. package/dist/cjs/infrastructure/index.d.ts.map +1 -0
  67. package/dist/cjs/infrastructure/interface/base/container-options.interface.d.ts +11 -0
  68. package/dist/cjs/infrastructure/interface/base/container-options.interface.d.ts.map +1 -0
  69. package/dist/cjs/infrastructure/interface/base/error-options.interface.d.ts +22 -0
  70. package/dist/cjs/infrastructure/interface/base/error-options.interface.d.ts.map +1 -0
  71. package/dist/cjs/infrastructure/interface/base/factory-options.interface.d.ts +21 -0
  72. package/dist/cjs/infrastructure/interface/base/factory-options.interface.d.ts.map +1 -0
  73. package/dist/cjs/infrastructure/interface/base/index.d.ts +5 -0
  74. package/dist/cjs/infrastructure/interface/base/index.d.ts.map +1 -0
  75. package/dist/cjs/infrastructure/interface/base/registry-options.interface.d.ts +11 -0
  76. package/dist/cjs/infrastructure/interface/base/registry-options.interface.d.ts.map +1 -0
  77. package/dist/cjs/infrastructure/interface/console-logger-options.interface.d.ts +15 -0
  78. package/dist/cjs/infrastructure/interface/console-logger-options.interface.d.ts.map +1 -0
  79. package/dist/cjs/infrastructure/interface/core-factory-options.interface.d.ts +11 -0
  80. package/dist/cjs/infrastructure/interface/core-factory-options.interface.d.ts.map +1 -0
  81. package/dist/cjs/infrastructure/interface/index.d.ts +4 -0
  82. package/dist/cjs/infrastructure/interface/index.d.ts.map +1 -0
  83. package/dist/cjs/infrastructure/service/console-logger.service.d.ts +71 -0
  84. package/dist/cjs/infrastructure/service/console-logger.service.d.ts.map +1 -0
  85. package/dist/cjs/infrastructure/service/console-logger.service.js +130 -0
  86. package/dist/cjs/infrastructure/service/console-logger.service.js.map +1 -0
  87. package/dist/cjs/infrastructure/service/index.d.ts +2 -0
  88. package/dist/cjs/infrastructure/service/index.d.ts.map +1 -0
  89. package/dist/cjs/package.json +3 -0
  90. package/dist/cjs/presentation/utility/create/container.utility.d.ts +9 -0
  91. package/dist/cjs/presentation/utility/create/container.utility.d.ts.map +1 -0
  92. package/dist/cjs/presentation/utility/create/container.utility.js +18 -0
  93. package/dist/cjs/presentation/utility/create/container.utility.js.map +1 -0
  94. package/dist/cjs/presentation/utility/create/factory.utility.d.ts +10 -0
  95. package/dist/cjs/presentation/utility/create/factory.utility.d.ts.map +1 -0
  96. package/dist/cjs/presentation/utility/create/factory.utility.js +19 -0
  97. package/dist/cjs/presentation/utility/create/factory.utility.js.map +1 -0
  98. package/dist/cjs/presentation/utility/create/index.d.ts +5 -0
  99. package/dist/cjs/presentation/utility/create/index.d.ts.map +1 -0
  100. package/dist/cjs/presentation/utility/create/logger.utility.d.ts +9 -0
  101. package/dist/cjs/presentation/utility/create/logger.utility.d.ts.map +1 -0
  102. package/dist/cjs/presentation/utility/create/logger.utility.js +16 -0
  103. package/dist/cjs/presentation/utility/create/logger.utility.js.map +1 -0
  104. package/dist/cjs/presentation/utility/create/registry.utility.d.ts +12 -0
  105. package/dist/cjs/presentation/utility/create/registry.utility.d.ts.map +1 -0
  106. package/dist/cjs/presentation/utility/create/registry.utility.js +19 -0
  107. package/dist/cjs/presentation/utility/create/registry.utility.js.map +1 -0
  108. package/dist/esm/domain/enum/index.d.ts +3 -0
  109. package/dist/esm/domain/enum/index.d.ts.map +1 -0
  110. package/dist/esm/domain/enum/logger-log-level.enum.d.ts +11 -0
  111. package/dist/esm/domain/enum/logger-log-level.enum.d.ts.map +1 -0
  112. package/dist/esm/domain/enum/logger-log-level.enum.js +14 -0
  113. package/dist/esm/domain/enum/logger-log-level.enum.js.map +1 -0
  114. package/dist/esm/domain/enum/service-token.enum.d.ts +10 -0
  115. package/dist/esm/domain/enum/service-token.enum.d.ts.map +1 -0
  116. package/dist/esm/domain/enum/service-token.enum.js +13 -0
  117. package/dist/esm/domain/enum/service-token.enum.js.map +1 -0
  118. package/dist/esm/domain/index.d.ts +3 -0
  119. package/dist/esm/domain/index.d.ts.map +1 -0
  120. package/dist/esm/domain/interface/container.interface.d.ts +55 -0
  121. package/dist/esm/domain/interface/container.interface.d.ts.map +1 -0
  122. package/dist/esm/domain/interface/error.interface.d.ts +18 -0
  123. package/dist/esm/domain/interface/error.interface.d.ts.map +1 -0
  124. package/dist/esm/domain/interface/factory.interface.d.ts +19 -0
  125. package/dist/esm/domain/interface/factory.interface.d.ts.map +1 -0
  126. package/dist/esm/domain/interface/index.d.ts +6 -0
  127. package/dist/esm/domain/interface/index.d.ts.map +1 -0
  128. package/dist/esm/domain/interface/logger/index.d.ts +3 -0
  129. package/dist/esm/domain/interface/logger/index.d.ts.map +1 -0
  130. package/dist/esm/domain/interface/logger/interface.d.ts +37 -0
  131. package/dist/esm/domain/interface/logger/interface.d.ts.map +1 -0
  132. package/dist/esm/domain/interface/logger/method-options.interface.d.ts +14 -0
  133. package/dist/esm/domain/interface/logger/method-options.interface.d.ts.map +1 -0
  134. package/dist/esm/domain/interface/registry.interface.d.ts +54 -0
  135. package/dist/esm/domain/interface/registry.interface.d.ts.map +1 -0
  136. package/dist/esm/index.d.ts +4 -0
  137. package/dist/esm/index.d.ts.map +1 -0
  138. package/dist/esm/index.js +14 -0
  139. package/dist/esm/index.js.map +1 -0
  140. package/dist/esm/infrastructure/class/base/container.class.d.ts +67 -0
  141. package/dist/esm/infrastructure/class/base/container.class.d.ts.map +1 -0
  142. package/dist/esm/infrastructure/class/base/container.class.js +191 -0
  143. package/dist/esm/infrastructure/class/base/container.class.js.map +1 -0
  144. package/dist/esm/infrastructure/class/base/error.class.d.ts +18 -0
  145. package/dist/esm/infrastructure/class/base/error.class.d.ts.map +1 -0
  146. package/dist/esm/infrastructure/class/base/error.class.js +28 -0
  147. package/dist/esm/infrastructure/class/base/error.class.js.map +1 -0
  148. package/dist/esm/infrastructure/class/base/factory.class.d.ts +38 -0
  149. package/dist/esm/infrastructure/class/base/factory.class.d.ts.map +1 -0
  150. package/dist/esm/infrastructure/class/base/factory.class.js +77 -0
  151. package/dist/esm/infrastructure/class/base/factory.class.js.map +1 -0
  152. package/dist/esm/infrastructure/class/base/index.d.ts +5 -0
  153. package/dist/esm/infrastructure/class/base/index.d.ts.map +1 -0
  154. package/dist/esm/infrastructure/class/base/registry.class.d.ts +73 -0
  155. package/dist/esm/infrastructure/class/base/registry.class.d.ts.map +1 -0
  156. package/dist/esm/infrastructure/class/base/registry.class.js +219 -0
  157. package/dist/esm/infrastructure/class/base/registry.class.js.map +1 -0
  158. package/dist/esm/infrastructure/constant/console-logger-default-options.constant.d.ts +6 -0
  159. package/dist/esm/infrastructure/constant/console-logger-default-options.constant.d.ts.map +1 -0
  160. package/dist/esm/infrastructure/constant/console-logger-default-options.constant.js +10 -0
  161. package/dist/esm/infrastructure/constant/console-logger-default-options.constant.js.map +1 -0
  162. package/dist/esm/infrastructure/constant/index.d.ts +2 -0
  163. package/dist/esm/infrastructure/constant/index.d.ts.map +1 -0
  164. package/dist/esm/infrastructure/factory/core.factory.d.ts +51 -0
  165. package/dist/esm/infrastructure/factory/core.factory.d.ts.map +1 -0
  166. package/dist/esm/infrastructure/factory/core.factory.js +83 -0
  167. package/dist/esm/infrastructure/factory/core.factory.js.map +1 -0
  168. package/dist/esm/infrastructure/factory/index.d.ts +2 -0
  169. package/dist/esm/infrastructure/factory/index.d.ts.map +1 -0
  170. package/dist/esm/infrastructure/index.d.ts +6 -0
  171. package/dist/esm/infrastructure/index.d.ts.map +1 -0
  172. package/dist/esm/infrastructure/interface/base/container-options.interface.d.ts +11 -0
  173. package/dist/esm/infrastructure/interface/base/container-options.interface.d.ts.map +1 -0
  174. package/dist/esm/infrastructure/interface/base/error-options.interface.d.ts +22 -0
  175. package/dist/esm/infrastructure/interface/base/error-options.interface.d.ts.map +1 -0
  176. package/dist/esm/infrastructure/interface/base/factory-options.interface.d.ts +21 -0
  177. package/dist/esm/infrastructure/interface/base/factory-options.interface.d.ts.map +1 -0
  178. package/dist/esm/infrastructure/interface/base/index.d.ts +5 -0
  179. package/dist/esm/infrastructure/interface/base/index.d.ts.map +1 -0
  180. package/dist/esm/infrastructure/interface/base/registry-options.interface.d.ts +11 -0
  181. package/dist/esm/infrastructure/interface/base/registry-options.interface.d.ts.map +1 -0
  182. package/dist/esm/infrastructure/interface/console-logger-options.interface.d.ts +15 -0
  183. package/dist/esm/infrastructure/interface/console-logger-options.interface.d.ts.map +1 -0
  184. package/dist/esm/infrastructure/interface/core-factory-options.interface.d.ts +11 -0
  185. package/dist/esm/infrastructure/interface/core-factory-options.interface.d.ts.map +1 -0
  186. package/dist/esm/infrastructure/interface/index.d.ts +4 -0
  187. package/dist/esm/infrastructure/interface/index.d.ts.map +1 -0
  188. package/dist/esm/infrastructure/service/console-logger.service.d.ts +71 -0
  189. package/dist/esm/infrastructure/service/console-logger.service.d.ts.map +1 -0
  190. package/dist/esm/infrastructure/service/console-logger.service.js +128 -0
  191. package/dist/esm/infrastructure/service/console-logger.service.js.map +1 -0
  192. package/dist/esm/infrastructure/service/index.d.ts +2 -0
  193. package/dist/esm/infrastructure/service/index.d.ts.map +1 -0
  194. package/dist/esm/package.json +3 -0
  195. package/dist/esm/presentation/utility/create/container.utility.d.ts +9 -0
  196. package/dist/esm/presentation/utility/create/container.utility.d.ts.map +1 -0
  197. package/dist/esm/presentation/utility/create/container.utility.js +16 -0
  198. package/dist/esm/presentation/utility/create/container.utility.js.map +1 -0
  199. package/dist/esm/presentation/utility/create/factory.utility.d.ts +10 -0
  200. package/dist/esm/presentation/utility/create/factory.utility.d.ts.map +1 -0
  201. package/dist/esm/presentation/utility/create/factory.utility.js +17 -0
  202. package/dist/esm/presentation/utility/create/factory.utility.js.map +1 -0
  203. package/dist/esm/presentation/utility/create/index.d.ts +5 -0
  204. package/dist/esm/presentation/utility/create/index.d.ts.map +1 -0
  205. package/dist/esm/presentation/utility/create/logger.utility.d.ts +9 -0
  206. package/dist/esm/presentation/utility/create/logger.utility.d.ts.map +1 -0
  207. package/dist/esm/presentation/utility/create/logger.utility.js +14 -0
  208. package/dist/esm/presentation/utility/create/logger.utility.js.map +1 -0
  209. package/dist/esm/presentation/utility/create/registry.utility.d.ts +12 -0
  210. package/dist/esm/presentation/utility/create/registry.utility.d.ts.map +1 -0
  211. package/dist/esm/presentation/utility/create/registry.utility.js +17 -0
  212. package/dist/esm/presentation/utility/create/registry.utility.js.map +1 -0
  213. package/package.json +89 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core-factory-options.interface.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/interface/core-factory-options.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACjB"}
@@ -0,0 +1,4 @@
1
+ export type * from "./base";
2
+ export type { IConsoleLoggerOptions } from "./console-logger-options.interface";
3
+ export type { ICoreFactoryOptions } from "./core-factory-options.interface";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/interface/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,QAAQ,CAAC;AAC5B,YAAY,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAChF,YAAY,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,71 @@
1
+ import type { ILogger, ILoggerMethodOptions } from '../../src/domain/interface/index';
2
+ import type { IConsoleLoggerOptions } from '../../src/infrastructure/interface/index';
3
+ /**
4
+ * Console logger implementation.
5
+ */
6
+ export declare class ConsoleLoggerService implements ILogger {
7
+ /**
8
+ * Current log level. Messages below this level will not be logged.
9
+ */
10
+ private readonly LEVEL;
11
+ /**
12
+ * Default source identifier.
13
+ */
14
+ private readonly SOURCE?;
15
+ /**
16
+ * Create a new console logger.
17
+ * @param {IConsoleLoggerOptions} options - The options to use for the logger.
18
+ */
19
+ constructor(options?: IConsoleLoggerOptions);
20
+ /**
21
+ * Log a debug message.
22
+ * @param {string} message Message to log.
23
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
24
+ */
25
+ debug(message: string, options?: ILoggerMethodOptions): void;
26
+ /**
27
+ * Log an error message.
28
+ * @param {string} message Message to log.
29
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
30
+ */
31
+ error(message: string, options?: ILoggerMethodOptions): void;
32
+ /**
33
+ * Log an info message.
34
+ * @param {string} message Message to log.
35
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
36
+ */
37
+ info(message: string, options?: ILoggerMethodOptions): void;
38
+ /**
39
+ * Log a trace message.
40
+ * @param {string} message Message to log.
41
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
42
+ */
43
+ trace(message: string, options?: ILoggerMethodOptions): void;
44
+ /**
45
+ * Log a warning message.
46
+ * @param {string} message Message to log.
47
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
48
+ */
49
+ warn(message: string, options?: ILoggerMethodOptions): void;
50
+ /**
51
+ * Combines source from options with class source.
52
+ * @param {string} [optionsSource] Source from options.
53
+ * @returns {string|undefined} Combined source or undefined if both sources are undefined.
54
+ */
55
+ private combineSource;
56
+ /**
57
+ * Format a message for logging.
58
+ * @param {ELoggerLogLevel} level Log level.
59
+ * @param {string} message Message to log.
60
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
61
+ * @returns {string} Formatted message.
62
+ */
63
+ private formatMessage;
64
+ /**
65
+ * Check if the given level should be logged.
66
+ * @param {ELoggerLogLevel} level Level to check.
67
+ * @returns {boolean} True if the level should be logged.
68
+ */
69
+ private shouldLog;
70
+ }
71
+ //# sourceMappingURL=console-logger.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console-logger.service.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/service/console-logger.service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAKvE;;GAEG;AACH,qBAAa,oBAAqB,YAAW,OAAO;IACnD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IAExC;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAS;IAEjC;;;OAGG;gBACS,OAAO,GAAE,qBAAsD;IAK3E;;;;OAIG;IACI,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI;IAMnE;;;;OAIG;IACI,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI;IAMnE;;;;OAIG;IACI,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI;IAMlE;;;;OAIG;IACI,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI;IAMnE;;;;OAIG;IACI,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI;IAMlE;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAoBrB;;;;;;OAMG;IACH,OAAO,CAAC,aAAa;IAmBrB;;;;OAIG;IACH,OAAO,CAAC,SAAS;CAKjB"}
@@ -0,0 +1,130 @@
1
+ 'use strict';
2
+
3
+ var loggerLogLevel_enum = require('../../domain/enum/logger-log-level.enum.js');
4
+ require('../../domain/enum/service-token.enum.js');
5
+ var consoleLoggerDefaultOptions_constant = require('../constant/console-logger-default-options.constant.js');
6
+
7
+ /**
8
+ * Console logger implementation.
9
+ */
10
+ class ConsoleLoggerService {
11
+ /**
12
+ * Current log level. Messages below this level will not be logged.
13
+ */
14
+ LEVEL;
15
+ /**
16
+ * Default source identifier.
17
+ */
18
+ SOURCE;
19
+ /**
20
+ * Create a new console logger.
21
+ * @param {IConsoleLoggerOptions} options - The options to use for the logger.
22
+ */
23
+ constructor(options = consoleLoggerDefaultOptions_constant.CONSOLE_LOGGER_DEFAULT_OPTIONS) {
24
+ this.LEVEL = options.level;
25
+ this.SOURCE = options.source;
26
+ }
27
+ /**
28
+ * Log a debug message.
29
+ * @param {string} message Message to log.
30
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
31
+ */
32
+ debug(message, options) {
33
+ if (this.shouldLog(loggerLogLevel_enum.ELoggerLogLevel.DEBUG)) {
34
+ console.debug(this.formatMessage(loggerLogLevel_enum.ELoggerLogLevel.DEBUG, message, options));
35
+ }
36
+ }
37
+ /**
38
+ * Log an error message.
39
+ * @param {string} message Message to log.
40
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
41
+ */
42
+ error(message, options) {
43
+ if (this.shouldLog(loggerLogLevel_enum.ELoggerLogLevel.ERROR)) {
44
+ console.error(this.formatMessage(loggerLogLevel_enum.ELoggerLogLevel.ERROR, message, options));
45
+ }
46
+ }
47
+ /**
48
+ * Log an info message.
49
+ * @param {string} message Message to log.
50
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
51
+ */
52
+ info(message, options) {
53
+ if (this.shouldLog(loggerLogLevel_enum.ELoggerLogLevel.INFO)) {
54
+ console.info(this.formatMessage(loggerLogLevel_enum.ELoggerLogLevel.INFO, message, options));
55
+ }
56
+ }
57
+ /**
58
+ * Log a trace message.
59
+ * @param {string} message Message to log.
60
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
61
+ */
62
+ trace(message, options) {
63
+ if (this.shouldLog(loggerLogLevel_enum.ELoggerLogLevel.TRACE)) {
64
+ console.trace(this.formatMessage(loggerLogLevel_enum.ELoggerLogLevel.TRACE, message, options));
65
+ }
66
+ }
67
+ /**
68
+ * Log a warning message.
69
+ * @param {string} message Message to log.
70
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
71
+ */
72
+ warn(message, options) {
73
+ if (this.shouldLog(loggerLogLevel_enum.ELoggerLogLevel.WARN)) {
74
+ console.warn(this.formatMessage(loggerLogLevel_enum.ELoggerLogLevel.WARN, message, options));
75
+ }
76
+ }
77
+ /**
78
+ * Combines source from options with class source.
79
+ * @param {string} [optionsSource] Source from options.
80
+ * @returns {string|undefined} Combined source or undefined if both sources are undefined.
81
+ */
82
+ combineSource(optionsSource) {
83
+ if (!this.SOURCE && !optionsSource) {
84
+ return undefined;
85
+ }
86
+ if (!this.SOURCE && optionsSource) {
87
+ return `[${optionsSource}]`;
88
+ }
89
+ if (this.SOURCE && !optionsSource) {
90
+ return `[${this.SOURCE}]`;
91
+ }
92
+ if (this.SOURCE && optionsSource) {
93
+ return `[${this.SOURCE} → ${optionsSource}]`;
94
+ }
95
+ return undefined;
96
+ }
97
+ /**
98
+ * Format a message for logging.
99
+ * @param {ELoggerLogLevel} level Log level.
100
+ * @param {string} message Message to log.
101
+ * @param {ILoggerMethodOptions} [options] Optional logging options.
102
+ * @returns {string} Formatted message.
103
+ */
104
+ formatMessage(level, message, options) {
105
+ const timestamp = new Date().toISOString();
106
+ // Safely extract context from options
107
+ let context;
108
+ let source;
109
+ if (options) {
110
+ context = options.context;
111
+ source = options.source;
112
+ }
113
+ const formattedContext = context ? ` ${JSON.stringify(context)}` : "";
114
+ const formattedSource = this.combineSource(source) ?? "";
115
+ const sourceWithSpace = formattedSource ? `${formattedSource} ` : "";
116
+ return `[${timestamp}] ${level.toUpperCase()}: ${sourceWithSpace}${message}${formattedContext}`;
117
+ }
118
+ /**
119
+ * Check if the given level should be logged.
120
+ * @param {ELoggerLogLevel} level Level to check.
121
+ * @returns {boolean} True if the level should be logged.
122
+ */
123
+ shouldLog(level) {
124
+ const levels = [loggerLogLevel_enum.ELoggerLogLevel.ERROR, loggerLogLevel_enum.ELoggerLogLevel.WARN, loggerLogLevel_enum.ELoggerLogLevel.INFO, loggerLogLevel_enum.ELoggerLogLevel.DEBUG, loggerLogLevel_enum.ELoggerLogLevel.TRACE];
125
+ return levels.indexOf(level) <= levels.indexOf(this.LEVEL);
126
+ }
127
+ }
128
+
129
+ exports.ConsoleLoggerService = ConsoleLoggerService;
130
+ //# sourceMappingURL=console-logger.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"console-logger.service.js","sources":["../../../../../src/infrastructure/service/console-logger.service.ts"],"sourcesContent":[null],"names":["CONSOLE_LOGGER_DEFAULT_OPTIONS","ELoggerLogLevel"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export { ConsoleLoggerService } from "./console-logger.service";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/infrastructure/service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,9 @@
1
+ import type { IContainer } from '../../../src/domain/interface/index';
2
+ import { type IBaseContainerOptions } from '../../../src/infrastructure/index';
3
+ /**
4
+ * Creates a new container instance.
5
+ * @param {IBaseContainerOptions} options - The options to use for the container.
6
+ * @returns {IContainer} A new container instance.
7
+ */
8
+ export declare function createContainer(options: IBaseContainerOptions): IContainer;
9
+ //# sourceMappingURL=container.utility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.utility.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/utility/create/container.utility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAiB,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAElF;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,qBAAqB,GAAG,UAAU,CAE1E"}
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ var container_class = require('../../../infrastructure/class/base/container.class.js');
4
+ require('../../../domain/enum/logger-log-level.enum.js');
5
+ require('../../../domain/enum/service-token.enum.js');
6
+ require('../../../infrastructure/constant/console-logger-default-options.constant.js');
7
+
8
+ /**
9
+ * Creates a new container instance.
10
+ * @param {IBaseContainerOptions} options - The options to use for the container.
11
+ * @returns {IContainer} A new container instance.
12
+ */
13
+ function createContainer(options) {
14
+ return new container_class.BaseContainer(options);
15
+ }
16
+
17
+ exports.createContainer = createContainer;
18
+ //# sourceMappingURL=container.utility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.utility.js","sources":["../../../../../../src/presentation/utility/create/container.utility.ts"],"sourcesContent":[null],"names":["BaseContainer"],"mappings":";;;;;;;AAIA;;;;AAIG;AACG,SAAU,eAAe,CAAC,OAA8B,EAAA;AAC7D,IAAA,OAAO,IAAIA,6BAAa,CAAC,OAAO,CAAC;AAClC;;;;"}
@@ -0,0 +1,10 @@
1
+ import type { IFactory } from '../../../src/domain/interface/index';
2
+ import type { IBaseFactoryOptions } from '../../../src/infrastructure/index';
3
+ /**
4
+ * Creates a new factory instance.
5
+ * @param {IBaseFactoryOptions<T>} options - The options to use for the factory.
6
+ * @returns {IFactory<T>} A new factory instance.
7
+ * @template T The type of items created by the factory.
8
+ */
9
+ export declare function createFactory<T>(options: IBaseFactoryOptions<T>): IFactory<T>;
10
+ //# sourceMappingURL=factory.utility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.utility.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/utility/create/factory.utility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAIjE;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,OAAO,EAAE,mBAAmB,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAE7E"}
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ require('../../../domain/enum/logger-log-level.enum.js');
4
+ require('../../../domain/enum/service-token.enum.js');
5
+ require('../../../infrastructure/constant/console-logger-default-options.constant.js');
6
+ var factory_class = require('../../../infrastructure/class/base/factory.class.js');
7
+
8
+ /**
9
+ * Creates a new factory instance.
10
+ * @param {IBaseFactoryOptions<T>} options - The options to use for the factory.
11
+ * @returns {IFactory<T>} A new factory instance.
12
+ * @template T The type of items created by the factory.
13
+ */
14
+ function createFactory(options) {
15
+ return new factory_class.BaseFactory(options);
16
+ }
17
+
18
+ exports.createFactory = createFactory;
19
+ //# sourceMappingURL=factory.utility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.utility.js","sources":["../../../../../../src/presentation/utility/create/factory.utility.ts"],"sourcesContent":[null],"names":["BaseFactory"],"mappings":";;;;;;;AAKA;;;;;AAKG;AACG,SAAU,aAAa,CAAI,OAA+B,EAAA;AAC/D,IAAA,OAAO,IAAIA,yBAAW,CAAI,OAAO,CAAC;AACnC;;;;"}
@@ -0,0 +1,5 @@
1
+ export { createContainer } from "./container.utility";
2
+ export { createFactory } from "./factory.utility";
3
+ export { createLogger } from "./logger.utility";
4
+ export { createRegistry } from "./registry.utility";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/utility/create/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { ILogger } from '../../../src/domain/interface/index';
2
+ import { type IConsoleLoggerOptions } from '../../../src/infrastructure/index';
3
+ /**
4
+ * Creates a new logger instance.
5
+ * @param {IConsoleLoggerOptions} options - The options to use for the logger.
6
+ * @returns {ILogger} A new logger instance.
7
+ */
8
+ export declare function createLogger(options?: IConsoleLoggerOptions): ILogger;
9
+ //# sourceMappingURL=logger.utility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.utility.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/utility/create/logger.utility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAwD,KAAK,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEzH;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,GAAE,qBAAsD,GAAG,OAAO,CAErG"}
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var consoleLogger_service = require('../../../infrastructure/service/console-logger.service.js');
4
+ var consoleLoggerDefaultOptions_constant = require('../../../infrastructure/constant/console-logger-default-options.constant.js');
5
+
6
+ /**
7
+ * Creates a new logger instance.
8
+ * @param {IConsoleLoggerOptions} options - The options to use for the logger.
9
+ * @returns {ILogger} A new logger instance.
10
+ */
11
+ function createLogger(options = consoleLoggerDefaultOptions_constant.CONSOLE_LOGGER_DEFAULT_OPTIONS) {
12
+ return new consoleLogger_service.ConsoleLoggerService(options);
13
+ }
14
+
15
+ exports.createLogger = createLogger;
16
+ //# sourceMappingURL=logger.utility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.utility.js","sources":["../../../../../../src/presentation/utility/create/logger.utility.ts"],"sourcesContent":[null],"names":["CONSOLE_LOGGER_DEFAULT_OPTIONS","ConsoleLoggerService"],"mappings":";;;;;AAIA;;;;AAIG;AACa,SAAA,YAAY,CAAC,OAAA,GAAiCA,mEAA8B,EAAA;AAC3F,IAAA,OAAO,IAAIC,0CAAoB,CAAC,OAAO,CAAC;AACzC;;;;"}
@@ -0,0 +1,12 @@
1
+ import type { IRegistry } from '../../../src/domain/interface/index';
2
+ import type { IBaseRegistryOptions } from '../../../src/infrastructure/index';
3
+ /**
4
+ * Creates a new registry instance.
5
+ * @param {IBaseRegistryOptions} options - The options to use for the registry.
6
+ * @returns {IRegistry<T>} A new registry instance.
7
+ * @template T The type of items stored in the registry.
8
+ */
9
+ export declare function createRegistry<T extends {
10
+ name: string;
11
+ }>(options: IBaseRegistryOptions): IRegistry<T>;
12
+ //# sourceMappingURL=registry.utility.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.utility.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/utility/create/registry.utility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAIlE;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,OAAO,EAAE,oBAAoB,GAAG,SAAS,CAAC,CAAC,CAAC,CAEtG"}
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ require('../../../domain/enum/logger-log-level.enum.js');
4
+ require('../../../domain/enum/service-token.enum.js');
5
+ require('../../../infrastructure/constant/console-logger-default-options.constant.js');
6
+ var registry_class = require('../../../infrastructure/class/base/registry.class.js');
7
+
8
+ /**
9
+ * Creates a new registry instance.
10
+ * @param {IBaseRegistryOptions} options - The options to use for the registry.
11
+ * @returns {IRegistry<T>} A new registry instance.
12
+ * @template T The type of items stored in the registry.
13
+ */
14
+ function createRegistry(options) {
15
+ return new registry_class.BaseRegistry(options);
16
+ }
17
+
18
+ exports.createRegistry = createRegistry;
19
+ //# sourceMappingURL=registry.utility.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.utility.js","sources":["../../../../../../src/presentation/utility/create/registry.utility.ts"],"sourcesContent":[null],"names":["BaseRegistry"],"mappings":";;;;;;;AAKA;;;;;AAKG;AACG,SAAU,cAAc,CAA6B,OAA6B,EAAA;AACvF,IAAA,OAAO,IAAIA,2BAAY,CAAI,OAAO,CAAC;AACpC;;;;"}
@@ -0,0 +1,3 @@
1
+ export { ELoggerLogLevel } from "./logger-log-level.enum";
2
+ export { EServiceToken } from "./service-token.enum";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/domain/enum/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Log levels.
3
+ */
4
+ export declare enum ELoggerLogLevel {
5
+ DEBUG = "debug",
6
+ ERROR = "error",
7
+ INFO = "info",
8
+ TRACE = "trace",
9
+ WARN = "warn"
10
+ }
11
+ //# sourceMappingURL=logger-log-level.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger-log-level.enum.d.ts","sourceRoot":"","sources":["../../../../src/domain/enum/logger-log-level.enum.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,eAAe;IAC1B,KAAK,UAAU;IACf,KAAK,UAAU;IACf,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;CACb"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Log levels.
3
+ */
4
+ var ELoggerLogLevel;
5
+ (function (ELoggerLogLevel) {
6
+ ELoggerLogLevel["DEBUG"] = "debug";
7
+ ELoggerLogLevel["ERROR"] = "error";
8
+ ELoggerLogLevel["INFO"] = "info";
9
+ ELoggerLogLevel["TRACE"] = "trace";
10
+ ELoggerLogLevel["WARN"] = "warn";
11
+ })(ELoggerLogLevel || (ELoggerLogLevel = {}));
12
+
13
+ export { ELoggerLogLevel };
14
+ //# sourceMappingURL=logger-log-level.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger-log-level.enum.js","sources":["../../../../../src/domain/enum/logger-log-level.enum.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;AAEG;IACS;AAAZ,CAAA,UAAY,eAAe,EAAA;AAC1B,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,eAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,eAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACd,CAAC,EANW,eAAe,KAAf,eAAe,GAM1B,EAAA,CAAA,CAAA;;;;"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Service tokens for dependency injection.
3
+ */
4
+ export declare enum EServiceToken {
5
+ CONTAINER = "container",
6
+ FACTORY = "factory",
7
+ LOGGER = "logger",
8
+ REGISTRY = "registry"
9
+ }
10
+ //# sourceMappingURL=service-token.enum.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-token.enum.d.ts","sourceRoot":"","sources":["../../../../src/domain/enum/service-token.enum.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,aAAa;IACxB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACrB"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Service tokens for dependency injection.
3
+ */
4
+ var EServiceToken;
5
+ (function (EServiceToken) {
6
+ EServiceToken["CONTAINER"] = "container";
7
+ EServiceToken["FACTORY"] = "factory";
8
+ EServiceToken["LOGGER"] = "logger";
9
+ EServiceToken["REGISTRY"] = "registry";
10
+ })(EServiceToken || (EServiceToken = {}));
11
+
12
+ export { EServiceToken };
13
+ //# sourceMappingURL=service-token.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-token.enum.js","sources":["../../../../../src/domain/enum/service-token.enum.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;AAEG;IACS;AAAZ,CAAA,UAAY,aAAa,EAAA;AACxB,IAAA,aAAA,CAAA,WAAA,CAAA,GAAA,WAAuB;AACvB,IAAA,aAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,aAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACtB,CAAC,EALW,aAAa,KAAb,aAAa,GAKxB,EAAA,CAAA,CAAA;;;;"}
@@ -0,0 +1,3 @@
1
+ export * from "./enum";
2
+ export type * from "./interface";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,mBAAmB,aAAa,CAAC"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Simple dependency injection container interface.
3
+ */
4
+ export interface IContainer {
5
+ /**
6
+ * Clear all dependencies from the container.
7
+ */
8
+ clear(): void;
9
+ /**
10
+ * Get a dependency from the container.
11
+ * @param token Token that identifies the dependency.
12
+ * @returns The dependency, or undefined if it doesn't exist.
13
+ */
14
+ get<T>(token: symbol): T | undefined;
15
+ /**
16
+ * Get all dependencies from the container.
17
+ * @returns An array of all dependencies.
18
+ */
19
+ getAll(): Array<unknown>;
20
+ /**
21
+ * Get multiple dependencies from the container.
22
+ * @param tokens Tokens that identify the dependencies.
23
+ * @returns An array of dependencies.
24
+ */
25
+ getMany<T>(tokens: Array<symbol>): Array<T>;
26
+ /**
27
+ * Check if a dependency exists in the container.
28
+ * @param token Token that identifies the dependency.
29
+ * @returns True if the dependency exists, false otherwise.
30
+ */
31
+ has(token: symbol): boolean;
32
+ /**
33
+ * Register a dependency in the container.
34
+ * @param {symbol} token Token that identifies the dependency.
35
+ * @param {T} implementation Implementation of the dependency.
36
+ */
37
+ register<T>(token: symbol, implementation: T): void;
38
+ /**
39
+ * Register a dependency in the container.
40
+ * @param {Array<symbol>} tokens Tokens that identify the dependencies.
41
+ * @param {Record<symbol, T>} implementations Implementations of the dependencies.
42
+ */
43
+ registerMany<T>(tokens: Array<symbol>, implementations: Record<symbol, T>): void;
44
+ /**
45
+ * Unregister a dependency from the container.
46
+ * @param token Token that identifies the dependency.
47
+ */
48
+ unregister(token: symbol): void;
49
+ /**
50
+ * Unregister multiple dependencies from the container.
51
+ * @param tokens Tokens that identify the dependencies.
52
+ */
53
+ unregisterMany(tokens: Array<symbol>): void;
54
+ }
55
+ //# sourceMappingURL=container.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container.interface.d.ts","sourceRoot":"","sources":["../../../../src/domain/interface/container.interface.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,MAAM,WAAW,UAAU;IAC1B;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;IAEd;;;;OAIG;IACH,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAAC;IAErC;;;OAGG;IACH,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC;IAEzB;;;;OAIG;IACH,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;IAE5C;;;;OAIG;IACH,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IAE5B;;;;OAIG;IACH,QAAQ,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,GAAG,IAAI,CAAC;IAEpD;;;;OAIG;IACH,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;IAEjF;;;OAGG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC;;;OAGG;IACH,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAC5C"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Standard error interface for all application errors.
3
+ */
4
+ export interface IError extends Error {
5
+ /**
6
+ * Original error that caused this error, if any.
7
+ */
8
+ CAUSE?: Error;
9
+ /**
10
+ * Error code to uniquely identify error types.
11
+ */
12
+ CODE: string;
13
+ /**
14
+ * Additional context about the error.
15
+ */
16
+ context?: Record<string, unknown>;
17
+ }
18
+ //# sourceMappingURL=error.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.interface.d.ts","sourceRoot":"","sources":["../../../../src/domain/interface/error.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,MAAO,SAAQ,KAAK;IACpC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IAEd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC"}
@@ -0,0 +1,19 @@
1
+ import type { IRegistry } from "./registry.interface";
2
+ /**
3
+ * Generic factory interface for creating items by name.
4
+ * @template T The type of items created by the factory.
5
+ */
6
+ export interface IFactory<T> {
7
+ /**
8
+ * Create an item by name.
9
+ * @param name The name of the item to create.
10
+ * @returns The created item.
11
+ */
12
+ create(name: string): T;
13
+ /**
14
+ * Get the registry associated with this factory.
15
+ * @returns The registry instance.
16
+ */
17
+ getRegistry(): IRegistry<T>;
18
+ }
19
+ //# sourceMappingURL=factory.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"factory.interface.d.ts","sourceRoot":"","sources":["../../../../src/domain/interface/factory.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC;IAC1B;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,CAAC;IAExB;;;OAGG;IACH,WAAW,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC;CAC5B"}
@@ -0,0 +1,6 @@
1
+ export type { IContainer } from "./container.interface";
2
+ export type { IError } from "./error.interface";
3
+ export type { IFactory } from "./factory.interface";
4
+ export type * from "./logger/index";
5
+ export type { IRegistry } from "./registry.interface";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/domain/interface/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,mBAAmB,gBAAgB,CAAC;AACpC,YAAY,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { type ILogger } from "./interface";
2
+ export { type ILoggerMethodOptions } from "./method-options.interface";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/domain/interface/logger/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAC"}