@aneuhold/core-ts-lib 2.0.10 → 2.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 (43) hide show
  1. package/lib/index.d.ts +5 -3
  2. package/lib/index.d.ts.map +1 -1
  3. package/lib/index.js +2 -2
  4. package/lib/index.js.map +1 -1
  5. package/lib/index.ts +6 -3
  6. package/lib/interfaces/ILogger.d.ts +48 -0
  7. package/lib/interfaces/ILogger.d.ts.map +1 -0
  8. package/lib/interfaces/ILogger.js +15 -0
  9. package/lib/interfaces/ILogger.js.map +1 -0
  10. package/lib/interfaces/ILogger.ts +55 -0
  11. package/lib/interfaces/ITracer.d.ts +79 -0
  12. package/lib/interfaces/ITracer.d.ts.map +1 -0
  13. package/lib/interfaces/ITracer.js +32 -0
  14. package/lib/interfaces/ITracer.js.map +1 -0
  15. package/lib/interfaces/ITracer.ts +102 -0
  16. package/lib/services/DependencyRegistry.d.ts +43 -0
  17. package/lib/services/DependencyRegistry.d.ts.map +1 -0
  18. package/lib/services/DependencyRegistry.js +52 -0
  19. package/lib/services/DependencyRegistry.js.map +1 -0
  20. package/lib/services/DependencyRegistry.ts +58 -0
  21. package/lib/services/DependencyService.js +4 -4
  22. package/lib/services/DependencyService.js.map +1 -1
  23. package/lib/services/DependencyService.ts +4 -4
  24. package/lib/services/FileSystemService/FileSystemService.d.ts +8 -0
  25. package/lib/services/FileSystemService/FileSystemService.d.ts.map +1 -1
  26. package/lib/services/FileSystemService/FileSystemService.js +16 -8
  27. package/lib/services/FileSystemService/FileSystemService.js.map +1 -1
  28. package/lib/services/FileSystemService/FileSystemService.ts +16 -8
  29. package/lib/services/PackageService.js +16 -16
  30. package/lib/services/PackageService.js.map +1 -1
  31. package/lib/services/PackageService.ts +16 -16
  32. package/lib/utils/ConsoleLogger.d.ts +101 -0
  33. package/lib/utils/ConsoleLogger.d.ts.map +1 -0
  34. package/lib/utils/ConsoleLogger.js +146 -0
  35. package/lib/utils/ConsoleLogger.js.map +1 -0
  36. package/lib/utils/ConsoleLogger.ts +161 -0
  37. package/package.json +9 -9
  38. package/readme.md +6 -3
  39. package/lib/utils/Logger.d.ts +0 -95
  40. package/lib/utils/Logger.d.ts.map +0 -1
  41. package/lib/utils/Logger.js +0 -136
  42. package/lib/utils/Logger.js.map +0 -1
  43. package/lib/utils/Logger.ts +0 -146
package/lib/index.d.ts CHANGED
@@ -1,13 +1,15 @@
1
1
  import sleep from './helperFunctions/sleep.js';
2
+ import { ILogger } from './interfaces/ILogger.js';
3
+ import { ISpan, ITracer } from './interfaces/ITracer.js';
2
4
  import ArrayService from './services/ArrayService.js';
3
5
  import DateService from './services/DateService/DateService.js';
6
+ import { DependencyRegistry, DR } from './services/DependencyRegistry.js';
4
7
  import DependencyService, { VersionType } from './services/DependencyService.js';
5
8
  import FileSystemService from './services/FileSystemService/FileSystemService.js';
6
9
  import PackageService from './services/PackageService.js';
7
10
  import StringService from './services/StringService.js';
8
11
  import ErrorUtils from './utils/ErrorUtils.js';
9
- import Logger from './utils/Logger.js';
10
12
  import TestUtils from './utils/TestUtils.js';
11
- export { ArrayService, DateService, DependencyService, ErrorUtils, FileSystemService, Logger, PackageService, sleep, StringService, TestUtils };
12
- export type { VersionType };
13
+ export { ArrayService, DateService, DependencyRegistry, DependencyService, DR, ErrorUtils, FileSystemService, PackageService, sleep, StringService, TestUtils };
14
+ export type { ILogger, ISpan, ITracer, VersionType };
13
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"./src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,4BAA4B,CAAC;AAC/C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,WAAW,MAAM,uCAAuC,CAAC;AAChE,OAAO,iBAAiB,EAAE,EACxB,WAAW,EACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,iBAAiB,MAAM,mDAAmD,CAAC;AAClF,OA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GED
@@ -1,13 +1,13 @@
1
1
  import sleep from './helperFunctions/sleep.js';
2
2
  import ArrayService from './services/ArrayService.js';
3
3
  import DateService from './services/DateService/DateService.js';
4
+ import { DependencyRegistry, DR } from './services/DependencyRegistry.js';
4
5
  import DependencyService from './services/DependencyService.js';
5
6
  import FileSystemService from './services/FileSystemService/FileSystemService.js';
6
7
  import PackageService from './services/PackageService.js';
7
8
  import StringService from './services/StringService.js';
8
9
  import ErrorUtils from './utils/ErrorUtils.js';
9
- import Logger from './utils/Logger.js';
10
10
  import TestUtils from './utils/TestUtils.js';
11
11
  // Export all the functions and classes from this library
12
- export { ArrayService, DateService, DependencyService, ErrorUtils, FileSystemService, Logger, PackageService, sleep, StringService, TestUtils };
12
+ export { ArrayService, DateService, DependencyRegistry, DependencyService, DR, ErrorUtils, FileSystemService, PackageService, sleep, StringService, TestUtils };
13
13
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"./src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,4BAA4B,CAAC;AAC/C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,WAAW,MAAM,uCAAuC,CAAC;AAChE,OAAO,iBAEN,MAAM,iCAAiC,CAAC;AACzC,OAAO,iBAAiB,MAAM,mDAAmD,CAAC;AAClF,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAE7C,yDAAyD;AACzD,OAAO,EACL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,MAAM,EACN,cAAc,EACd,KAAK,EACL,aAAa,EACb,SAAS,EACV,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"./src/","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,4BAA4B,CAAC;AAG/C,OAAO,YAAY,MAAM,4BAA4B,CAAC;AACtD,OAAO,WAAW,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,iBAEN,MAAM,iCAAiC,CAAC;AACzC,OAAO,iBAAiB,MAAM,mDAAmD,CAAC;AAClF,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,aAAa,MAAM,6BAA6B,CAAC;AACxD,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,SAAS,MAAM,sBAAsB,CAAC;AAE7C,yDAAyD;AACzD,OAAO,EACL,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,EAAE,EACF,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,KAAK,EACL,aAAa,EACb,SAAS,EACV,CAAC"}
package/lib/index.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import sleep from './helperFunctions/sleep.js';
2
+ import { ILogger } from './interfaces/ILogger.js';
3
+ import { ISpan, ITracer } from './interfaces/ITracer.js';
2
4
  import ArrayService from './services/ArrayService.js';
3
5
  import DateService from './services/DateService/DateService.js';
6
+ import { DependencyRegistry, DR } from './services/DependencyRegistry.js';
4
7
  import DependencyService, {
5
8
  VersionType
6
9
  } from './services/DependencyService.js';
@@ -8,17 +11,17 @@ import FileSystemService from './services/FileSystemService/FileSystemService.js
8
11
  import PackageService from './services/PackageService.js';
9
12
  import StringService from './services/StringService.js';
10
13
  import ErrorUtils from './utils/ErrorUtils.js';
11
- import Logger from './utils/Logger.js';
12
14
  import TestUtils from './utils/TestUtils.js';
13
15
 
14
16
  // Export all the functions and classes from this library
15
17
  export {
16
18
  ArrayService,
17
19
  DateService,
20
+ DependencyRegistry,
18
21
  DependencyService,
22
+ DR,
19
23
  ErrorUtils,
20
24
  FileSystemService,
21
- Logger,
22
25
  PackageService,
23
26
  sleep,
24
27
  StringService,
@@ -26,4 +29,4 @@ export {
26
29
  };
27
30
 
28
31
  // Export TypeScript types where needed
29
- export type { VersionType };
32
+ export type { ILogger, ISpan, ITracer, VersionType };
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Interface for a standard logger service.
3
+ */
4
+ export interface ILogger {
5
+ /**
6
+ * Logs informational messages.
7
+ *
8
+ * @param msg - The message to log.
9
+ * @param skipNewline - Optional. If true, does not append a newline.
10
+ */
11
+ info(msg: string, skipNewline?: boolean): void;
12
+ /**
13
+ * Logs success messages.
14
+ *
15
+ * @param msg - The message to log.
16
+ */
17
+ success(msg: string): void;
18
+ /**
19
+ * Logs failure messages (non-critical).
20
+ *
21
+ * @param msg - The message to log.
22
+ */
23
+ failure(msg: string): void;
24
+ /**
25
+ * Logs error messages (potentially critical).
26
+ *
27
+ * @param msg - The message to log.
28
+ */
29
+ error(msg: string): void;
30
+ /**
31
+ * Gets a logger instance configured for verbose logging.
32
+ * Implementations should return an ILogger that only logs
33
+ * when verbose mode is enabled globally.
34
+ */
35
+ get verbose(): ILogger;
36
+ }
37
+ /**
38
+ * A logger implementation that performs no operations.
39
+ * Useful as a default or in environments where logging is disabled.
40
+ */
41
+ export declare class NoopLogger implements ILogger {
42
+ info(): void;
43
+ success(): void;
44
+ failure(): void;
45
+ error(): void;
46
+ get verbose(): ILogger;
47
+ }
48
+ //# sourceMappingURL=ILogger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ILogger.d.ts","sourceRoot":"./src/","sources":["interfaces/ILogger.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;;;;OAKG;IACH,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE/C;;;;OAIG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;;OAIG;IACH,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B;;;;OAIG;IACH,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB;;;;OAIG;IACH,IAAI,OAAO,IAAI,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,qBAAa,UAAW,YAAW,OAAO;IACxC,IAAI,IAAI,IAAI;IACZ,OAAO,IAAI,IAAI;IACf,OAAO,IAAI,IAAI;IACf,KAAK,IAAI,IAAI;IACb,IAAI,OAAO,IAAI,OAAO,CAGrB;CACF"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A logger implementation that performs no operations.
3
+ * Useful as a default or in environments where logging is disabled.
4
+ */
5
+ export class NoopLogger {
6
+ info() { }
7
+ success() { }
8
+ failure() { }
9
+ error() { }
10
+ get verbose() {
11
+ // Return itself, as it does nothing anyway
12
+ return this;
13
+ }
14
+ }
15
+ //# sourceMappingURL=ILogger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ILogger.js","sourceRoot":"./src/","sources":["interfaces/ILogger.ts"],"names":[],"mappings":"AAyCA;;;GAGG;AACH,MAAM,OAAO,UAAU;IACrB,IAAI,KAAU,CAAC;IACf,OAAO,KAAU,CAAC;IAClB,OAAO,KAAU,CAAC;IAClB,KAAK,KAAU,CAAC;IAChB,IAAI,OAAO;QACT,2CAA2C;QAC3C,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Interface for a standard logger service.
3
+ */
4
+ export interface ILogger {
5
+ /**
6
+ * Logs informational messages.
7
+ *
8
+ * @param msg - The message to log.
9
+ * @param skipNewline - Optional. If true, does not append a newline.
10
+ */
11
+ info(msg: string, skipNewline?: boolean): void;
12
+
13
+ /**
14
+ * Logs success messages.
15
+ *
16
+ * @param msg - The message to log.
17
+ */
18
+ success(msg: string): void;
19
+
20
+ /**
21
+ * Logs failure messages (non-critical).
22
+ *
23
+ * @param msg - The message to log.
24
+ */
25
+ failure(msg: string): void;
26
+
27
+ /**
28
+ * Logs error messages (potentially critical).
29
+ *
30
+ * @param msg - The message to log.
31
+ */
32
+ error(msg: string): void;
33
+
34
+ /**
35
+ * Gets a logger instance configured for verbose logging.
36
+ * Implementations should return an ILogger that only logs
37
+ * when verbose mode is enabled globally.
38
+ */
39
+ get verbose(): ILogger;
40
+ }
41
+
42
+ /**
43
+ * A logger implementation that performs no operations.
44
+ * Useful as a default or in environments where logging is disabled.
45
+ */
46
+ export class NoopLogger implements ILogger {
47
+ info(): void {}
48
+ success(): void {}
49
+ failure(): void {}
50
+ error(): void {}
51
+ get verbose(): ILogger {
52
+ // Return itself, as it does nothing anyway
53
+ return this;
54
+ }
55
+ }
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Defines the structure of a span object used for tracing.
3
+ * This is a minimal interface to avoid dependency on specific tracing libraries.
4
+ */
5
+ export interface ISpan {
6
+ /**
7
+ * Sets the status of the span.
8
+ *
9
+ * @param status - An object containing a code and message.
10
+ * Common codes: 1 (OK), 2 (Error/Internal), etc.
11
+ */
12
+ setStatus(status: {
13
+ code: number;
14
+ message: string;
15
+ }): void;
16
+ }
17
+ /**
18
+ * Interface for a tracing service.
19
+ */
20
+ export interface ITracer {
21
+ /**
22
+ * Starts a new span for tracing an operation.
23
+ *
24
+ * @param name - The name of the operation/span.
25
+ * @param callback - The asynchronous function to execute within the span.
26
+ * It receives the span object as an argument.
27
+ * @returns A promise that resolves with the result of the callback.
28
+ */
29
+ startSpan<T>(name: string, callback: (span?: ISpan) => Promise<T>): Promise<T>;
30
+ /**
31
+ * Captures an exception for reporting.
32
+ *
33
+ * @param exception - The error or exception object.
34
+ */
35
+ captureException(exception: unknown): void;
36
+ /**
37
+ * Captures a message for reporting.
38
+ *
39
+ * @param message - The message string.
40
+ * @param level - Optional severity level (e.g., 'info', 'warning', 'error').
41
+ */
42
+ captureMessage(message: string, level?: string): void;
43
+ /**
44
+ * Flushes any buffered trace events.
45
+ * Important for short-lived environments like serverless functions.
46
+ *
47
+ * @param timeout - Optional timeout in milliseconds.
48
+ * @returns A promise resolving to true if flush finished within timeout.
49
+ */
50
+ flush(timeout?: number): Promise<boolean>;
51
+ /**
52
+ * Checks if the tracer is enabled and configured.
53
+ *
54
+ * @returns True if the tracer is active, false otherwise.
55
+ */
56
+ isEnabled(): boolean;
57
+ }
58
+ /**
59
+ * A tracer implementation that performs no operations.
60
+ * Useful as a default or in environments where tracing is disabled.
61
+ */
62
+ export declare class NoopTracer implements ITracer {
63
+ /**
64
+ * Executes the callback directly without creating a real span.
65
+ *
66
+ * @param _name
67
+ * @param callback
68
+ */
69
+ startSpan<T>(_name: string, callback: (span?: ISpan) => Promise<T>): Promise<T>;
70
+ /** Does nothing. */
71
+ captureException(): void;
72
+ /** Does nothing. */
73
+ captureMessage(): void;
74
+ /** Returns true immediately. */
75
+ flush(): Promise<boolean>;
76
+ /** Returns false. */
77
+ isEnabled(): boolean;
78
+ }
79
+ //# sourceMappingURL=ITracer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITracer.d.ts","sourceRoot":"./src/","sources":["interfaces/ITracer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,KAAK;IACpB;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAE5D;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB;;;;;;;OAOG;IACH,SAAS,CAAC,CAAC,EACT,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,GACrC,OAAO,CAAC,CAAC,CAAC,CAAC;IAEd;;;;OAIG;IACH,gBAAgB,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IAE3C;;;;;OAKG;IACH,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtD;;;;;;OAMG;IACH,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1C;;;;OAIG;IACH,SAAS,IAAI,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,qBAAa,UAAW,YAAW,OAAO;IACxC;;;;;OAKG;IACG,SAAS,CAAC,CAAC,EACf,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,GACrC,OAAO,CAAC,CAAC,CAAC;IAQb,oBAAoB;IACpB,gBAAgB,IAAI,IAAI;IAExB,oBAAoB;IACpB,cAAc,IAAI,IAAI;IAEtB,gCAAgC;IAChC,KAAK,IAAI,OAAO,CAAC,OAAO,CAAC;IAIzB,qBAAqB;IACrB,SAAS,IAAI,OAAO;CAGrB"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * A tracer implementation that performs no operations.
3
+ * Useful as a default or in environments where tracing is disabled.
4
+ */
5
+ export class NoopTracer {
6
+ /**
7
+ * Executes the callback directly without creating a real span.
8
+ *
9
+ * @param _name
10
+ * @param callback
11
+ */
12
+ async startSpan(_name, callback) {
13
+ // Provide a dummy span object that does nothing
14
+ const noopSpan = {
15
+ setStatus: () => { }
16
+ };
17
+ return callback(noopSpan);
18
+ }
19
+ /** Does nothing. */
20
+ captureException() { }
21
+ /** Does nothing. */
22
+ captureMessage() { }
23
+ /** Returns true immediately. */
24
+ flush() {
25
+ return Promise.resolve(true);
26
+ }
27
+ /** Returns false. */
28
+ isEnabled() {
29
+ return false;
30
+ }
31
+ }
32
+ //# sourceMappingURL=ITracer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ITracer.js","sourceRoot":"./src/","sources":["interfaces/ITracer.ts"],"names":[],"mappings":"AAgEA;;;GAGG;AACH,MAAM,OAAO,UAAU;IACrB;;;;;OAKG;IACH,KAAK,CAAC,SAAS,CACb,KAAa,EACb,QAAsC;QAEtC,gDAAgD;QAChD,MAAM,QAAQ,GAAU;YACtB,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC;SACpB,CAAC;QACF,OAAO,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC5B,CAAC;IAED,oBAAoB;IACpB,gBAAgB,KAAU,CAAC;IAE3B,oBAAoB;IACpB,cAAc,KAAU,CAAC;IAEzB,gCAAgC;IAChC,KAAK;QACH,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IAED,qBAAqB;IACrB,SAAS;QACP,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Defines the structure of a span object used for tracing.
3
+ * This is a minimal interface to avoid dependency on specific tracing libraries.
4
+ */
5
+ export interface ISpan {
6
+ /**
7
+ * Sets the status of the span.
8
+ *
9
+ * @param status - An object containing a code and message.
10
+ * Common codes: 1 (OK), 2 (Error/Internal), etc.
11
+ */
12
+ setStatus(status: { code: number; message: string }): void;
13
+ // Add other methods you might need from the span, e.g., recordError, end
14
+ }
15
+
16
+ /**
17
+ * Interface for a tracing service.
18
+ */
19
+ export interface ITracer {
20
+ /**
21
+ * Starts a new span for tracing an operation.
22
+ *
23
+ * @param name - The name of the operation/span.
24
+ * @param callback - The asynchronous function to execute within the span.
25
+ * It receives the span object as an argument.
26
+ * @returns A promise that resolves with the result of the callback.
27
+ */
28
+ startSpan<T>(
29
+ name: string,
30
+ callback: (span?: ISpan) => Promise<T>
31
+ ): Promise<T>;
32
+
33
+ /**
34
+ * Captures an exception for reporting.
35
+ *
36
+ * @param exception - The error or exception object.
37
+ */
38
+ captureException(exception: unknown): void;
39
+
40
+ /**
41
+ * Captures a message for reporting.
42
+ *
43
+ * @param message - The message string.
44
+ * @param level - Optional severity level (e.g., 'info', 'warning', 'error').
45
+ */
46
+ captureMessage(message: string, level?: string): void;
47
+
48
+ /**
49
+ * Flushes any buffered trace events.
50
+ * Important for short-lived environments like serverless functions.
51
+ *
52
+ * @param timeout - Optional timeout in milliseconds.
53
+ * @returns A promise resolving to true if flush finished within timeout.
54
+ */
55
+ flush(timeout?: number): Promise<boolean>;
56
+
57
+ /**
58
+ * Checks if the tracer is enabled and configured.
59
+ *
60
+ * @returns True if the tracer is active, false otherwise.
61
+ */
62
+ isEnabled(): boolean;
63
+ }
64
+
65
+ /**
66
+ * A tracer implementation that performs no operations.
67
+ * Useful as a default or in environments where tracing is disabled.
68
+ */
69
+ export class NoopTracer implements ITracer {
70
+ /**
71
+ * Executes the callback directly without creating a real span.
72
+ *
73
+ * @param _name
74
+ * @param callback
75
+ */
76
+ async startSpan<T>(
77
+ _name: string,
78
+ callback: (span?: ISpan) => Promise<T>
79
+ ): Promise<T> {
80
+ // Provide a dummy span object that does nothing
81
+ const noopSpan: ISpan = {
82
+ setStatus: () => {}
83
+ };
84
+ return callback(noopSpan);
85
+ }
86
+
87
+ /** Does nothing. */
88
+ captureException(): void {}
89
+
90
+ /** Does nothing. */
91
+ captureMessage(): void {}
92
+
93
+ /** Returns true immediately. */
94
+ flush(): Promise<boolean> {
95
+ return Promise.resolve(true);
96
+ }
97
+
98
+ /** Returns false. */
99
+ isEnabled(): boolean {
100
+ return false;
101
+ }
102
+ }
@@ -0,0 +1,43 @@
1
+ import { ILogger } from '../interfaces/ILogger.js';
2
+ import { ITracer } from '../interfaces/ITracer.js';
3
+ /**
4
+ * A simple static registry for managing singleton service instances like loggers and tracers.
5
+ * Provides a central point for accessing shared services throughout an application.
6
+ */
7
+ export declare class DependencyRegistry {
8
+ private static loggerInstance;
9
+ private static tracerInstance;
10
+ /**
11
+ * Registers a logger implementation, overwriting the existing one.
12
+ * Should typically be called once at application startup if a custom logger is needed.
13
+ *
14
+ * @param instance - The ILogger instance to register.
15
+ */
16
+ static registerLogger(instance: ILogger): void;
17
+ /**
18
+ * Gets the currently registered logger instance.
19
+ * Defaults to ConsoleLogger if no other logger has been registered.
20
+ *
21
+ * @returns The registered ILogger instance.
22
+ */
23
+ static get logger(): ILogger;
24
+ /**
25
+ * Registers a tracer implementation, overwriting the existing one.
26
+ * Should typically be called once at application startup if tracing is needed.
27
+ *
28
+ * @param instance - The ITracer instance to register.
29
+ */
30
+ static registerTracer(instance: ITracer): void;
31
+ /**
32
+ * Gets the currently registered tracer instance.
33
+ * Defaults to NoopTracer if no other tracer has been registered.
34
+ *
35
+ * @returns The registered ITracer instance.
36
+ */
37
+ static get tracer(): ITracer;
38
+ }
39
+ /**
40
+ * Alias for DependencyRegistry for more succinct usage.
41
+ */
42
+ export declare const DR: typeof DependencyRegistry;
43
+ //# sourceMappingURL=DependencyRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DependencyRegistry.d.ts","sourceRoot":"./src/","sources":["services/DependencyRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,OAAO,EAAc,MAAM,0BAA0B,CAAC;AAG/D;;;GAGG;AACH,qBAAa,kBAAkB;IAE7B,OAAO,CAAC,MAAM,CAAC,cAAc,CAAgC;IAC7D,OAAO,CAAC,MAAM,CAAC,cAAc,CAA6B;IAE1D;;;;;OAKG;WACW,cAAc,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAIrD;;;;;OAKG;IACH,WAAkB,MAAM,IAAI,OAAO,CAElC;IAED;;;;;OAKG;WACW,cAAc,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAIrD;;;;;OAKG;IACH,WAAkB,MAAM,IAAI,OAAO,CAElC;CACF;AAED;;GAEG;AACH,eAAO,MAAM,EAAE,2BAAqB,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { NoopTracer } from '../interfaces/ITracer.js';
2
+ import ConsoleLogger from '../utils/ConsoleLogger.js';
3
+ /**
4
+ * A simple static registry for managing singleton service instances like loggers and tracers.
5
+ * Provides a central point for accessing shared services throughout an application.
6
+ */
7
+ export class DependencyRegistry {
8
+ // Initialize with concrete defaults
9
+ static loggerInstance = new ConsoleLogger();
10
+ static tracerInstance = new NoopTracer();
11
+ /**
12
+ * Registers a logger implementation, overwriting the existing one.
13
+ * Should typically be called once at application startup if a custom logger is needed.
14
+ *
15
+ * @param instance - The ILogger instance to register.
16
+ */
17
+ static registerLogger(instance) {
18
+ this.loggerInstance = instance;
19
+ }
20
+ /**
21
+ * Gets the currently registered logger instance.
22
+ * Defaults to ConsoleLogger if no other logger has been registered.
23
+ *
24
+ * @returns The registered ILogger instance.
25
+ */
26
+ static get logger() {
27
+ return this.loggerInstance;
28
+ }
29
+ /**
30
+ * Registers a tracer implementation, overwriting the existing one.
31
+ * Should typically be called once at application startup if tracing is needed.
32
+ *
33
+ * @param instance - The ITracer instance to register.
34
+ */
35
+ static registerTracer(instance) {
36
+ this.tracerInstance = instance;
37
+ }
38
+ /**
39
+ * Gets the currently registered tracer instance.
40
+ * Defaults to NoopTracer if no other tracer has been registered.
41
+ *
42
+ * @returns The registered ITracer instance.
43
+ */
44
+ static get tracer() {
45
+ return this.tracerInstance;
46
+ }
47
+ }
48
+ /**
49
+ * Alias for DependencyRegistry for more succinct usage.
50
+ */
51
+ export const DR = DependencyRegistry;
52
+ //# sourceMappingURL=DependencyRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DependencyRegistry.js","sourceRoot":"./src/","sources":["services/DependencyRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,aAAa,MAAM,2BAA2B,CAAC;AAEtD;;;GAGG;AACH,MAAM,OAAO,kBAAkB;IAC7B,oCAAoC;IAC5B,MAAM,CAAC,cAAc,GAAY,IAAI,aAAa,EAAE,CAAC;IACrD,MAAM,CAAC,cAAc,GAAY,IAAI,UAAU,EAAE,CAAC;IAE1D;;;;;OAKG;IACI,MAAM,CAAC,cAAc,CAAC,QAAiB;QAC5C,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,cAAc,CAAC,QAAiB;QAC5C,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACI,MAAM,KAAK,MAAM;QACtB,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;;AAGH;;GAEG;AACH,MAAM,CAAC,MAAM,EAAE,GAAG,kBAAkB,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { ILogger } from '../interfaces/ILogger.js';
2
+ import { ITracer, NoopTracer } from '../interfaces/ITracer.js';
3
+ import ConsoleLogger from '../utils/ConsoleLogger.js';
4
+
5
+ /**
6
+ * A simple static registry for managing singleton service instances like loggers and tracers.
7
+ * Provides a central point for accessing shared services throughout an application.
8
+ */
9
+ export class DependencyRegistry {
10
+ // Initialize with concrete defaults
11
+ private static loggerInstance: ILogger = new ConsoleLogger();
12
+ private static tracerInstance: ITracer = new NoopTracer();
13
+
14
+ /**
15
+ * Registers a logger implementation, overwriting the existing one.
16
+ * Should typically be called once at application startup if a custom logger is needed.
17
+ *
18
+ * @param instance - The ILogger instance to register.
19
+ */
20
+ public static registerLogger(instance: ILogger): void {
21
+ this.loggerInstance = instance;
22
+ }
23
+
24
+ /**
25
+ * Gets the currently registered logger instance.
26
+ * Defaults to ConsoleLogger if no other logger has been registered.
27
+ *
28
+ * @returns The registered ILogger instance.
29
+ */
30
+ public static get logger(): ILogger {
31
+ return this.loggerInstance;
32
+ }
33
+
34
+ /**
35
+ * Registers a tracer implementation, overwriting the existing one.
36
+ * Should typically be called once at application startup if tracing is needed.
37
+ *
38
+ * @param instance - The ITracer instance to register.
39
+ */
40
+ public static registerTracer(instance: ITracer): void {
41
+ this.tracerInstance = instance;
42
+ }
43
+
44
+ /**
45
+ * Gets the currently registered tracer instance.
46
+ * Defaults to NoopTracer if no other tracer has been registered.
47
+ *
48
+ * @returns The registered ITracer instance.
49
+ */
50
+ public static get tracer(): ITracer {
51
+ return this.tracerInstance;
52
+ }
53
+ }
54
+
55
+ /**
56
+ * Alias for DependencyRegistry for more succinct usage.
57
+ */
58
+ export const DR = DependencyRegistry;
@@ -1,7 +1,7 @@
1
1
  import { access, readFile, writeFile } from 'fs/promises';
2
2
  import path from 'path';
3
3
  import ErrorUtils from '../utils/ErrorUtils.js';
4
- import Logger from '../utils/Logger.js';
4
+ import { DR } from './DependencyRegistry.js';
5
5
  import FileSystemService from './FileSystemService/FileSystemService.js';
6
6
  /**
7
7
  * Standard Semantic Versioning bump types.
@@ -91,7 +91,7 @@ export default class DependencyService {
91
91
  await access(filePath);
92
92
  }
93
93
  catch {
94
- Logger.info(`No ${path.basename(filePath)} file found in the current directory.`);
94
+ DR.logger.info(`No ${path.basename(filePath)} file found in the current directory.`);
95
95
  return;
96
96
  }
97
97
  try {
@@ -100,11 +100,11 @@ export default class DependencyService {
100
100
  const newVersion = bump(oldVersion);
101
101
  fileData.version = newVersion;
102
102
  await writeFile(filePath, JSON.stringify(fileData, null, 2));
103
- Logger.info(`Bumped ${path.basename(filePath)} from ${oldVersion} to ${newVersion}`);
103
+ DR.logger.info(`Bumped ${path.basename(filePath)} from ${oldVersion} to ${newVersion}`);
104
104
  }
105
105
  catch (error) {
106
106
  const errorString = ErrorUtils.getErrorString(error);
107
- Logger.error(`Failed to update ${path.basename(filePath)}: ${errorString}`);
107
+ DR.logger.error(`Failed to update ${path.basename(filePath)}: ${errorString}`);
108
108
  }
109
109
  };
110
110
  const rootDir = process.cwd();
@@ -1 +1 @@
1
- {"version":3,"file":"DependencyService.js","sourceRoot":"./src/","sources":["services/DependencyService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1D,OAA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