@org-quicko/core 1.0.3 → 1.1.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 (122) hide show
  1. package/dist/browser/beans/index.js +2 -0
  2. package/dist/browser/beans/index.js.map +1 -0
  3. package/dist/browser/build/browser/index.js +1 -2
  4. package/dist/browser/build/browser/index.js.map +1 -1
  5. package/dist/browser/exceptions/BadRequestException.js.map +1 -1
  6. package/dist/browser/exceptions/ClientException.js.map +1 -1
  7. package/dist/browser/exceptions/ConverterException.js.map +1 -1
  8. package/dist/browser/exceptions/ForbiddenAccessException.js.map +1 -1
  9. package/dist/browser/exceptions/HTTPException.js.map +1 -1
  10. package/dist/browser/exceptions/IllegalArgumentException.js.map +1 -1
  11. package/dist/browser/exceptions/UnauthorizedException.js.map +1 -1
  12. package/dist/browser/exceptions/index.js +9 -0
  13. package/dist/browser/exceptions/index.js.map +1 -0
  14. package/dist/browser/types/JSONObject.js +6 -6
  15. package/dist/browser/types/JSONObject.js.map +1 -1
  16. package/dist/browser/types/index.js +4 -0
  17. package/dist/browser/types/index.js.map +1 -0
  18. package/dist/browser/utils/date/DateUtil.js +6 -1
  19. package/dist/browser/utils/date/DateUtil.js.map +1 -1
  20. package/dist/browser/utils/date/index.js +2 -0
  21. package/dist/browser/utils/date/index.js.map +1 -0
  22. package/dist/browser/utils/index.js +2 -0
  23. package/dist/browser/utils/index.js.map +1 -0
  24. package/dist/cjs/beans/index.cjs +8 -0
  25. package/dist/cjs/beans/index.cjs.map +1 -0
  26. package/dist/cjs/build/node/index.cjs +5 -11
  27. package/dist/cjs/build/node/index.cjs.map +1 -1
  28. package/dist/cjs/exceptions/BadRequestException.cjs.map +1 -1
  29. package/dist/cjs/exceptions/ClientException.cjs.map +1 -1
  30. package/dist/cjs/exceptions/ConverterException.cjs.map +1 -1
  31. package/dist/cjs/exceptions/ForbiddenAccessException.cjs.map +1 -1
  32. package/dist/cjs/exceptions/HTTPException.cjs.map +1 -1
  33. package/dist/cjs/exceptions/IllegalArgumentException.cjs.map +1 -1
  34. package/dist/cjs/exceptions/UnauthorizedException.cjs.map +1 -1
  35. package/dist/cjs/exceptions/index.cjs +22 -0
  36. package/dist/cjs/exceptions/index.cjs.map +1 -0
  37. package/dist/cjs/logger/LoggerFactory.cjs +44 -0
  38. package/dist/cjs/logger/LoggerFactory.cjs.map +1 -0
  39. package/dist/cjs/logger/index.cjs +9 -0
  40. package/dist/cjs/logger/index.cjs.map +1 -0
  41. package/dist/cjs/types/JSONObject.cjs +6 -6
  42. package/dist/cjs/types/JSONObject.cjs.map +1 -1
  43. package/dist/cjs/types/index.cjs +19 -0
  44. package/dist/cjs/types/index.cjs.map +1 -0
  45. package/dist/cjs/utils/date/DateUtil.cjs +5 -0
  46. package/dist/cjs/utils/date/DateUtil.cjs.map +1 -1
  47. package/dist/cjs/utils/date/index.cjs +8 -0
  48. package/dist/cjs/utils/date/index.cjs.map +1 -0
  49. package/dist/cjs/utils/index.cjs +8 -0
  50. package/dist/cjs/utils/index.cjs.map +1 -0
  51. package/dist/esm/beans/index.js +2 -0
  52. package/dist/esm/beans/index.js.map +1 -0
  53. package/dist/esm/build/node/index.js +2 -5
  54. package/dist/esm/build/node/index.js.map +1 -1
  55. package/dist/esm/exceptions/BadRequestException.js.map +1 -1
  56. package/dist/esm/exceptions/ClientException.js.map +1 -1
  57. package/dist/esm/exceptions/ConverterException.js.map +1 -1
  58. package/dist/esm/exceptions/ForbiddenAccessException.js.map +1 -1
  59. package/dist/esm/exceptions/HTTPException.js.map +1 -1
  60. package/dist/esm/exceptions/IllegalArgumentException.js.map +1 -1
  61. package/dist/esm/exceptions/UnauthorizedException.js.map +1 -1
  62. package/dist/esm/exceptions/index.js +9 -0
  63. package/dist/esm/exceptions/index.js.map +1 -0
  64. package/dist/esm/logger/LoggerFactory.js +41 -0
  65. package/dist/esm/logger/LoggerFactory.js.map +1 -0
  66. package/dist/esm/logger/index.js +2 -0
  67. package/dist/esm/logger/index.js.map +1 -0
  68. package/dist/esm/types/JSONObject.js +6 -6
  69. package/dist/esm/types/JSONObject.js.map +1 -1
  70. package/dist/esm/types/index.js +4 -0
  71. package/dist/esm/types/index.js.map +1 -0
  72. package/dist/esm/utils/date/DateUtil.js +6 -1
  73. package/dist/esm/utils/date/DateUtil.js.map +1 -1
  74. package/dist/esm/utils/date/index.js +2 -0
  75. package/dist/esm/utils/date/index.js.map +1 -0
  76. package/dist/esm/utils/index.js +2 -0
  77. package/dist/esm/utils/index.js.map +1 -0
  78. package/dist/types/index.d.ts +14 -18
  79. package/dist/types/src/beans/index.d.ts +1 -0
  80. package/dist/types/src/exceptions/index.d.ts +8 -0
  81. package/dist/types/src/logger/LoggerFactory.d.ts +19 -0
  82. package/dist/types/src/logger/index.d.ts +1 -0
  83. package/dist/types/src/types/index.d.ts +3 -0
  84. package/dist/types/{utils → src/utils}/date/DateUtil.d.ts +8 -0
  85. package/dist/types/src/utils/date/index.d.ts +1 -0
  86. package/dist/types/src/utils/index.d.ts +1 -0
  87. package/package.json +28 -52
  88. package/dist/browser/exceptions/NullPointerException.js +0 -13
  89. package/dist/browser/exceptions/NullPointerException.js.map +0 -1
  90. package/dist/cjs/exceptions/NullPointerException.cjs +0 -15
  91. package/dist/cjs/exceptions/NullPointerException.cjs.map +0 -1
  92. package/dist/cjs/logger/MDC.cjs +0 -77
  93. package/dist/cjs/logger/MDC.cjs.map +0 -1
  94. package/dist/cjs/logger/factory/ConsoleLoggerProvider.cjs +0 -43
  95. package/dist/cjs/logger/factory/ConsoleLoggerProvider.cjs.map +0 -1
  96. package/dist/cjs/logger/factory/LoggerFactory.cjs +0 -31
  97. package/dist/cjs/logger/factory/LoggerFactory.cjs.map +0 -1
  98. package/dist/esm/exceptions/NullPointerException.js +0 -13
  99. package/dist/esm/exceptions/NullPointerException.js.map +0 -1
  100. package/dist/esm/logger/MDC.js +0 -75
  101. package/dist/esm/logger/MDC.js.map +0 -1
  102. package/dist/esm/logger/factory/ConsoleLoggerProvider.js +0 -41
  103. package/dist/esm/logger/factory/ConsoleLoggerProvider.js.map +0 -1
  104. package/dist/esm/logger/factory/LoggerFactory.js +0 -28
  105. package/dist/esm/logger/factory/LoggerFactory.js.map +0 -1
  106. package/dist/types/exceptions/NullPointerException.d.ts +0 -10
  107. package/dist/types/logger/MDC.d.ts +0 -53
  108. package/dist/types/logger/factory/ConsoleLoggerProvider.d.ts +0 -20
  109. package/dist/types/logger/factory/LoggerFactory.d.ts +0 -25
  110. package/dist/types/logger/factory/LoggerProvider.d.ts +0 -16
  111. /package/dist/types/{beans → src/beans}/BaseObject.d.ts +0 -0
  112. /package/dist/types/{exceptions → src/exceptions}/BadRequestException.d.ts +0 -0
  113. /package/dist/types/{exceptions → src/exceptions}/BaseException.d.ts +0 -0
  114. /package/dist/types/{exceptions → src/exceptions}/ClientException.d.ts +0 -0
  115. /package/dist/types/{exceptions → src/exceptions}/ConverterException.d.ts +0 -0
  116. /package/dist/types/{exceptions → src/exceptions}/ForbiddenAccessException.d.ts +0 -0
  117. /package/dist/types/{exceptions → src/exceptions}/HTTPException.d.ts +0 -0
  118. /package/dist/types/{exceptions → src/exceptions}/IllegalArgumentException.d.ts +0 -0
  119. /package/dist/types/{exceptions → src/exceptions}/UnauthorizedException.d.ts +0 -0
  120. /package/dist/types/{types → src/types}/JSONObject.d.ts +0 -0
  121. /package/dist/types/{types → src/types}/LoggingLevel.d.ts +0 -0
  122. /package/dist/types/{types → src/types}/SortOrder.d.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"LoggerFactory.js","sources":["../../../../src/logger/factory/LoggerFactory.ts"],"sourcesContent":["import winston, { Logger } from 'winston';\r\n\r\n/**\r\n * A factory class for managing logger instances.\r\n * Provides methods to retrieve and store loggers in a shared storage.\r\n */\r\nexport const LoggerStorage: Map<string, winston.Logger> = new Map<string, winston.Logger>();\r\n\r\nexport class LoggerFactory {\r\n\r\n /**\r\n * Retrieves a logger instance by its name.\r\n * \r\n * @param loggerName The name of the logger to retrieve.\r\n * @returns The logger instance if found, otherwise `undefined`.\r\n */\r\n static getLogger(loggerName: string): winston.Logger | undefined {\r\n return LoggerStorage.get(loggerName);\r\n }\r\n\r\n /**\r\n * Stores a logger instance with the specified name.\r\n * \r\n * @param loggerName The name to associate with the logger.\r\n * @param logger The logger instance to store.\r\n */\r\n static setLogger(loggerName: string, logger: Logger) {\r\n LoggerStorage.set(loggerName, logger);\r\n }\r\n}"],"names":[],"mappings":"AAEA;;;AAGG;AACU,MAAA,aAAa,GAAgC,IAAI,GAAG;MAEpD,aAAa,CAAA;AAEtB;;;;;AAKG;IACH,OAAO,SAAS,CAAC,UAAkB,EAAA;AAC/B,QAAA,OAAO,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC;;AAGxC;;;;;AAKG;AACH,IAAA,OAAO,SAAS,CAAC,UAAkB,EAAE,MAAc,EAAA;AAC/C,QAAA,aAAa,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC;;AAE5C;;;;"}
@@ -1,10 +0,0 @@
1
- import { BaseException } from './BaseException.js';
2
-
3
- /**
4
- * Exception thrown when an operation is attempted on a `null` or `undefined` value.
5
- */
6
- declare class NullPointerException extends BaseException {
7
- constructor(message: string, cause?: unknown);
8
- }
9
-
10
- export { NullPointerException };
@@ -1,53 +0,0 @@
1
- interface ContextMap {
2
- [key: string]: string;
3
- }
4
- /**
5
- * Mapped Diagnostic Context (MDC) implementation using `AsyncLocalStorage`.
6
- * MDC allows associating contextual information (key-value pairs) with the
7
- * current execution context, which can be useful for logging and tracing.
8
- *
9
- * Methods:
10
- * - `get(key: string)`: Retrieves the value associated with the given key in the current context.
11
- * - `put(key: string, value: string)`: Adds or updates a key-value pair in the current context.
12
- * - `putAll(context: ContextMap)`: Adds or updates multiple key-value pairs in the current context.
13
- * - `clear()`: Clears all key-value pairs in the current context.
14
- * - `runWithContext(context: ContextMap, callback: () => T)`: Runs a callback function with the provided context.
15
- */
16
- declare class MDC {
17
- private static storage;
18
- /**
19
- * Retrieves the value associated with the given key in the current context.
20
- *
21
- * @param key The key to retrieve the value for.
22
- * @returns The value associated with the key, or `undefined` if not found.
23
- */
24
- static get(key: string): string | undefined;
25
- /**
26
- * Adds or updates a key-value pair in the current context.
27
- *
28
- * @param key The key to add or update.
29
- * @param value The value to associate with the key.
30
- */
31
- static put(key: string, value: string): void;
32
- /**
33
- * Adds or updates multiple key-value pairs in the current context.
34
- *
35
- * @param context An object containing key-value pairs to add or update.
36
- */
37
- static putAll(context: ContextMap): void;
38
- /**
39
- * Clears all key-value pairs in the current context.
40
- */
41
- static clear(): void;
42
- /**
43
- * Runs a callback function with the provided context.
44
- *
45
- * @param context The context to associate with the callback execution.
46
- * @param callback The callback function to execute.
47
- * @returns The result of the callback function.
48
- */
49
- static runWithContext<T>(context: ContextMap, callback: () => T): T;
50
- }
51
-
52
- export { MDC };
53
- export type { ContextMap };
@@ -1,20 +0,0 @@
1
- import winston from 'winston';
2
- import { LoggerProvider } from './LoggerProvider.js';
3
-
4
- /**
5
- * Implementation of the `LoggerProvider` interface that creates
6
- * a Winston logger configured to log to the console.
7
- */
8
- declare class ConsoleLoggerProvider implements LoggerProvider {
9
- /**
10
- * Creates a Winston logger instance configured for console logging.
11
- * The logger includes MDC (Mapped Diagnostic Context) data, timestamps,
12
- * and JSON formatting.
13
- *
14
- * @returns A promise that resolves to a Winston logger instance.
15
- * @throws ClientException If an error occurs while creating the logger.
16
- */
17
- createLogger(): Promise<winston.Logger>;
18
- }
19
-
20
- export { ConsoleLoggerProvider };
@@ -1,25 +0,0 @@
1
- import winston, { Logger } from 'winston';
2
-
3
- /**
4
- * A factory class for managing logger instances.
5
- * Provides methods to retrieve and store loggers in a shared storage.
6
- */
7
- declare const LoggerStorage: Map<string, winston.Logger>;
8
- declare class LoggerFactory {
9
- /**
10
- * Retrieves a logger instance by its name.
11
- *
12
- * @param loggerName The name of the logger to retrieve.
13
- * @returns The logger instance if found, otherwise `undefined`.
14
- */
15
- static getLogger(loggerName: string): winston.Logger | undefined;
16
- /**
17
- * Stores a logger instance with the specified name.
18
- *
19
- * @param loggerName The name to associate with the logger.
20
- * @param logger The logger instance to store.
21
- */
22
- static setLogger(loggerName: string, logger: Logger): void;
23
- }
24
-
25
- export { LoggerFactory, LoggerStorage };
@@ -1,16 +0,0 @@
1
- import winston from 'winston';
2
-
3
- /**
4
- * Interface for creating logger instances.
5
- * Provides a method to create a logger with optional configuration.
6
- */
7
- interface LoggerProvider {
8
- /**
9
- * Creates a logger instance.
10
- * @param config Optional configuration for the logger.
11
- * @returns A promise that resolves to a Winston logger instance.
12
- */
13
- createLogger(config?: unknown): Promise<winston.Logger>;
14
- }
15
-
16
- export type { LoggerProvider };
File without changes
File without changes
File without changes