@navios/core 0.7.0 → 0.7.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.
- package/CHANGELOG.md +22 -0
- package/lib/{index-BFwNx9WQ.d.cts → index-DW9EPAE6.d.mts} +222 -17
- package/lib/index-DW9EPAE6.d.mts.map +1 -0
- package/lib/{index-D657ijFO.d.mts → index-pHp-dIGt.d.cts} +222 -17
- package/lib/index-pHp-dIGt.d.cts.map +1 -0
- package/lib/index.cjs +5 -5
- package/lib/index.d.cts +2 -2
- package/lib/index.d.mts +2 -2
- package/lib/index.mjs +1 -1
- package/lib/legacy-compat/index.cjs +1 -1
- package/lib/legacy-compat/index.d.cts +1 -1
- package/lib/legacy-compat/index.d.cts.map +1 -1
- package/lib/legacy-compat/index.d.mts +1 -1
- package/lib/legacy-compat/index.d.mts.map +1 -1
- package/lib/{src-DzPY5s6d.mjs → src-DyvCDuKO.mjs} +121 -31
- package/lib/src-DyvCDuKO.mjs.map +1 -0
- package/lib/{src-Cb1aTjl0.cjs → src-QnxR5b7c.cjs} +164 -74
- package/lib/src-QnxR5b7c.cjs.map +1 -0
- package/lib/testing/index.cjs +6 -6
- package/lib/testing/index.cjs.map +1 -1
- package/lib/testing/index.d.cts +1 -1
- package/lib/testing/index.d.mts +1 -1
- package/lib/testing/index.mjs +1 -1
- package/lib/{use-guards.decorator-DdvUhB03.cjs → use-guards.decorator-B6q_N0sf.cjs} +17 -17
- package/lib/{use-guards.decorator-DdvUhB03.cjs.map → use-guards.decorator-B6q_N0sf.cjs.map} +1 -1
- package/package.json +12 -12
- package/src/interfaces/abstract-http-adapter.interface.mts +52 -0
- package/src/interfaces/index.mts +1 -0
- package/src/interfaces/plugin.interface.mts +105 -0
- package/src/logger/logger.service.mts +5 -3
- package/src/navios.application.mts +77 -27
- package/src/navios.factory.mts +10 -9
- package/src/services/module-loader.service.mts +102 -1
- package/lib/index-BFwNx9WQ.d.cts.map +0 -1
- package/lib/index-D657ijFO.d.mts.map +0 -1
- package/lib/src-Cb1aTjl0.cjs.map +0 -1
- package/lib/src-DzPY5s6d.mjs.map +0 -1
- package/src/attribute.factory.d.mts +0 -175
- package/src/attribute.factory.d.mts.map +0 -1
- package/src/config/config-service.interface.d.mts +0 -39
- package/src/config/config-service.interface.d.mts.map +0 -1
- package/src/config/config.provider.d.mts +0 -46
- package/src/config/config.provider.d.mts.map +0 -1
- package/src/config/config.service.d.mts +0 -108
- package/src/config/config.service.d.mts.map +0 -1
- package/src/config/index.d.mts +0 -6
- package/src/config/index.d.mts.map +0 -1
- package/src/config/types.d.mts +0 -13
- package/src/config/types.d.mts.map +0 -1
- package/src/config/utils/helpers.d.mts +0 -3
- package/src/config/utils/helpers.d.mts.map +0 -1
- package/src/config/utils/index.d.mts +0 -2
- package/src/config/utils/index.d.mts.map +0 -1
- package/src/decorators/controller.decorator.d.mts +0 -33
- package/src/decorators/controller.decorator.d.mts.map +0 -1
- package/src/decorators/endpoint.decorator.d.mts +0 -89
- package/src/decorators/endpoint.decorator.d.mts.map +0 -1
- package/src/decorators/header.decorator.d.mts +0 -22
- package/src/decorators/header.decorator.d.mts.map +0 -1
- package/src/decorators/http-code.decorator.d.mts +0 -22
- package/src/decorators/http-code.decorator.d.mts.map +0 -1
- package/src/decorators/index.d.mts +0 -9
- package/src/decorators/index.d.mts.map +0 -1
- package/src/decorators/module.decorator.d.mts +0 -42
- package/src/decorators/module.decorator.d.mts.map +0 -1
- package/src/decorators/multipart.decorator.d.mts +0 -54
- package/src/decorators/multipart.decorator.d.mts.map +0 -1
- package/src/decorators/stream.decorator.d.mts +0 -42
- package/src/decorators/stream.decorator.d.mts.map +0 -1
- package/src/decorators/use-guards.decorator.d.mts +0 -33
- package/src/decorators/use-guards.decorator.d.mts.map +0 -1
- package/src/exceptions/bad-request.exception.d.mts +0 -26
- package/src/exceptions/bad-request.exception.d.mts.map +0 -1
- package/src/exceptions/conflict.exception.d.mts +0 -29
- package/src/exceptions/conflict.exception.d.mts.map +0 -1
- package/src/exceptions/forbidden.exception.d.mts +0 -28
- package/src/exceptions/forbidden.exception.d.mts.map +0 -1
- package/src/exceptions/http.exception.d.mts +0 -33
- package/src/exceptions/http.exception.d.mts.map +0 -1
- package/src/exceptions/index.d.mts +0 -8
- package/src/exceptions/index.d.mts.map +0 -1
- package/src/exceptions/internal-server-error.exception.d.mts +0 -31
- package/src/exceptions/internal-server-error.exception.d.mts.map +0 -1
- package/src/exceptions/not-found.exception.d.mts +0 -30
- package/src/exceptions/not-found.exception.d.mts.map +0 -1
- package/src/exceptions/unauthorized.exception.d.mts +0 -28
- package/src/exceptions/unauthorized.exception.d.mts.map +0 -1
- package/src/factories/endpoint-adapter.factory.d.mts +0 -6
- package/src/factories/endpoint-adapter.factory.d.mts.map +0 -1
- package/src/factories/http-adapter.factory.d.mts +0 -6
- package/src/factories/http-adapter.factory.d.mts.map +0 -1
- package/src/factories/index.d.mts +0 -8
- package/src/factories/index.d.mts.map +0 -1
- package/src/factories/multipart-adapter.factory.d.mts +0 -6
- package/src/factories/multipart-adapter.factory.d.mts.map +0 -1
- package/src/factories/reply.factory.d.mts +0 -6
- package/src/factories/reply.factory.d.mts.map +0 -1
- package/src/factories/request.factory.d.mts +0 -6
- package/src/factories/request.factory.d.mts.map +0 -1
- package/src/factories/stream-adapter.factory.d.mts +0 -6
- package/src/factories/stream-adapter.factory.d.mts.map +0 -1
- package/src/factories/xml-stream-adapter.factory.d.mts +0 -6
- package/src/factories/xml-stream-adapter.factory.d.mts.map +0 -1
- package/src/index.d.mts +0 -15
- package/src/index.d.mts.map +0 -1
- package/src/interfaces/abstract-execution-context.inteface.d.mts +0 -44
- package/src/interfaces/abstract-execution-context.inteface.d.mts.map +0 -1
- package/src/interfaces/abstract-http-adapter.interface.d.mts +0 -15
- package/src/interfaces/abstract-http-adapter.interface.d.mts.map +0 -1
- package/src/interfaces/abstract-http-cors-options.interface.d.mts +0 -58
- package/src/interfaces/abstract-http-cors-options.interface.d.mts.map +0 -1
- package/src/interfaces/abstract-http-handler-adapter.interface.d.mts +0 -7
- package/src/interfaces/abstract-http-handler-adapter.interface.d.mts.map +0 -1
- package/src/interfaces/abstract-http-listen-options.interface.d.mts +0 -5
- package/src/interfaces/abstract-http-listen-options.interface.d.mts.map +0 -1
- package/src/interfaces/can-activate.d.mts +0 -36
- package/src/interfaces/can-activate.d.mts.map +0 -1
- package/src/interfaces/http-header.d.mts +0 -10
- package/src/interfaces/http-header.d.mts.map +0 -1
- package/src/interfaces/index.d.mts +0 -9
- package/src/interfaces/index.d.mts.map +0 -1
- package/src/interfaces/navios-module.d.mts +0 -29
- package/src/interfaces/navios-module.d.mts.map +0 -1
- package/src/legacy-compat/context-compat.d.mts +0 -19
- package/src/legacy-compat/context-compat.d.mts.map +0 -1
- package/src/legacy-compat/decorators/controller.decorator.d.mts +0 -21
- package/src/legacy-compat/decorators/controller.decorator.d.mts.map +0 -1
- package/src/legacy-compat/decorators/endpoint.decorator.d.mts +0 -33
- package/src/legacy-compat/decorators/endpoint.decorator.d.mts.map +0 -1
- package/src/legacy-compat/decorators/header.decorator.d.mts +0 -24
- package/src/legacy-compat/decorators/header.decorator.d.mts.map +0 -1
- package/src/legacy-compat/decorators/http-code.decorator.d.mts +0 -22
- package/src/legacy-compat/decorators/http-code.decorator.d.mts.map +0 -1
- package/src/legacy-compat/decorators/index.d.mts +0 -9
- package/src/legacy-compat/decorators/index.d.mts.map +0 -1
- package/src/legacy-compat/decorators/module.decorator.d.mts +0 -22
- package/src/legacy-compat/decorators/module.decorator.d.mts.map +0 -1
- package/src/legacy-compat/decorators/multipart.decorator.d.mts +0 -34
- package/src/legacy-compat/decorators/multipart.decorator.d.mts.map +0 -1
- package/src/legacy-compat/decorators/stream.decorator.d.mts +0 -34
- package/src/legacy-compat/decorators/stream.decorator.d.mts.map +0 -1
- package/src/legacy-compat/decorators/use-guards.decorator.d.mts +0 -29
- package/src/legacy-compat/decorators/use-guards.decorator.d.mts.map +0 -1
- package/src/legacy-compat/index.d.mts +0 -19
- package/src/legacy-compat/index.d.mts.map +0 -1
- package/src/logger/console-logger.service.d.mts +0 -196
- package/src/logger/console-logger.service.d.mts.map +0 -1
- package/src/logger/index.d.mts +0 -7
- package/src/logger/index.d.mts.map +0 -1
- package/src/logger/log-levels.d.mts +0 -14
- package/src/logger/log-levels.d.mts.map +0 -1
- package/src/logger/logger-service.interface.d.mts +0 -36
- package/src/logger/logger-service.interface.d.mts.map +0 -1
- package/src/logger/logger.service.d.mts +0 -57
- package/src/logger/logger.service.d.mts.map +0 -1
- package/src/logger/logger.tokens.d.mts +0 -36
- package/src/logger/logger.tokens.d.mts.map +0 -1
- package/src/logger/utils/cli-colors.util.d.mts +0 -10
- package/src/logger/utils/cli-colors.util.d.mts.map +0 -1
- package/src/logger/utils/filter-log-levelts.util.d.mts +0 -6
- package/src/logger/utils/filter-log-levelts.util.d.mts.map +0 -1
- package/src/logger/utils/index.d.mts +0 -6
- package/src/logger/utils/index.d.mts.map +0 -1
- package/src/logger/utils/is-log-level-enabled.d.mts +0 -8
- package/src/logger/utils/is-log-level-enabled.d.mts.map +0 -1
- package/src/logger/utils/is-log-level.util.d.mts +0 -6
- package/src/logger/utils/is-log-level.util.d.mts.map +0 -1
- package/src/logger/utils/shared.utils.d.mts +0 -14
- package/src/logger/utils/shared.utils.d.mts.map +0 -1
- package/src/metadata/controller.metadata.d.mts +0 -13
- package/src/metadata/controller.metadata.d.mts.map +0 -1
- package/src/metadata/handler.metadata.d.mts +0 -18
- package/src/metadata/handler.metadata.d.mts.map +0 -1
- package/src/metadata/index.d.mts +0 -4
- package/src/metadata/index.d.mts.map +0 -1
- package/src/metadata/module.metadata.d.mts +0 -13
- package/src/metadata/module.metadata.d.mts.map +0 -1
- package/src/navios.application.d.mts +0 -210
- package/src/navios.application.d.mts.map +0 -1
- package/src/navios.environment.d.mts +0 -11
- package/src/navios.environment.d.mts.map +0 -1
- package/src/navios.factory.d.mts +0 -68
- package/src/navios.factory.d.mts.map +0 -1
- package/src/services/guard-runner.service.d.mts +0 -10
- package/src/services/guard-runner.service.d.mts.map +0 -1
- package/src/services/index.d.mts +0 -3
- package/src/services/index.d.mts.map +0 -1
- package/src/services/module-loader.service.d.mts +0 -17
- package/src/services/module-loader.service.d.mts.map +0 -1
- package/src/stores/index.d.mts +0 -2
- package/src/stores/index.d.mts.map +0 -1
- package/src/stores/request-id.store.d.mts +0 -37
- package/src/stores/request-id.store.d.mts.map +0 -1
- package/src/tokens/endpoint-adapter.token.d.mts +0 -4
- package/src/tokens/endpoint-adapter.token.d.mts.map +0 -1
- package/src/tokens/execution-context.token.d.mts +0 -5
- package/src/tokens/execution-context.token.d.mts.map +0 -1
- package/src/tokens/http-adapter.token.d.mts +0 -4
- package/src/tokens/http-adapter.token.d.mts.map +0 -1
- package/src/tokens/index.d.mts +0 -9
- package/src/tokens/index.d.mts.map +0 -1
- package/src/tokens/multipart-adapter.token.d.mts +0 -4
- package/src/tokens/multipart-adapter.token.d.mts.map +0 -1
- package/src/tokens/reply.token.d.mts +0 -3
- package/src/tokens/reply.token.d.mts.map +0 -1
- package/src/tokens/request.token.d.mts +0 -3
- package/src/tokens/request.token.d.mts.map +0 -1
- package/src/tokens/stream-adapter.token.d.mts +0 -4
- package/src/tokens/stream-adapter.token.d.mts.map +0 -1
- package/src/tokens/xml-stream-adapter.token.d.mts +0 -4
- package/src/tokens/xml-stream-adapter.token.d.mts.map +0 -1
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
import type { InspectOptions } from 'util';
|
|
2
|
-
import type { LogLevel } from './log-levels.mjs';
|
|
3
|
-
import type { LoggerService } from './logger-service.interface.mjs';
|
|
4
|
-
/**
|
|
5
|
-
* @publicApi
|
|
6
|
-
*/
|
|
7
|
-
export interface ConsoleLoggerOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Enabled log levels.
|
|
10
|
-
*/
|
|
11
|
-
logLevels?: LogLevel[];
|
|
12
|
-
/**
|
|
13
|
-
* If enabled, will print timestamp (time difference) between current and previous log message.
|
|
14
|
-
* Note: This option is not used when `json` is enabled.
|
|
15
|
-
*/
|
|
16
|
-
timestamp?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* A prefix to be used for each log message.
|
|
19
|
-
* Note: This option is not used when `json` is enabled.
|
|
20
|
-
*/
|
|
21
|
-
prefix?: string;
|
|
22
|
-
/**
|
|
23
|
-
* If enabled, will add a request ID to the log message.
|
|
24
|
-
*/
|
|
25
|
-
requestId?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* If enabled, will print the log message in JSON format.
|
|
28
|
-
*/
|
|
29
|
-
json?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* If enabled, will print the log message in color.
|
|
32
|
-
* Default true if json is disabled, false otherwise
|
|
33
|
-
*/
|
|
34
|
-
colors?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* The context of the logger.
|
|
37
|
-
*/
|
|
38
|
-
context?: string;
|
|
39
|
-
/**
|
|
40
|
-
* If enabled, will print the log message in a single line, even if it is an object with multiple properties.
|
|
41
|
-
* If set to a number, the most n inner elements are united on a single line as long as all properties fit into breakLength. Short array elements are also grouped together.
|
|
42
|
-
* Default true when `json` is enabled, false otherwise.
|
|
43
|
-
*/
|
|
44
|
-
compact?: boolean | number;
|
|
45
|
-
/**
|
|
46
|
-
* Specifies the maximum number of Array, TypedArray, Map, Set, WeakMap, and WeakSet elements to include when formatting.
|
|
47
|
-
* Set to null or Infinity to show all elements. Set to 0 or negative to show no elements.
|
|
48
|
-
* Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output.
|
|
49
|
-
* @default 100
|
|
50
|
-
*/
|
|
51
|
-
maxArrayLength?: number;
|
|
52
|
-
/**
|
|
53
|
-
* Specifies the maximum number of characters to include when formatting.
|
|
54
|
-
* Set to null or Infinity to show all elements. Set to 0 or negative to show no characters.
|
|
55
|
-
* Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output.
|
|
56
|
-
* @default 10000.
|
|
57
|
-
*/
|
|
58
|
-
maxStringLength?: number;
|
|
59
|
-
/**
|
|
60
|
-
* If enabled, will sort keys while formatting objects.
|
|
61
|
-
* Can also be a custom sorting function.
|
|
62
|
-
* Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output.
|
|
63
|
-
* @default false
|
|
64
|
-
*/
|
|
65
|
-
sorted?: boolean | ((a: string, b: string) => number);
|
|
66
|
-
/**
|
|
67
|
-
* Specifies the number of times to recurse while formatting object. T
|
|
68
|
-
* This is useful for inspecting large objects. To recurse up to the maximum call stack size pass Infinity or null.
|
|
69
|
-
* Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output.
|
|
70
|
-
* @default 5
|
|
71
|
-
*/
|
|
72
|
-
depth?: number;
|
|
73
|
-
/**
|
|
74
|
-
* If true, object's non-enumerable symbols and properties are included in the formatted result.
|
|
75
|
-
* WeakMap and WeakSet entries are also included as well as user defined prototype properties
|
|
76
|
-
* @default false
|
|
77
|
-
*/
|
|
78
|
-
showHidden?: boolean;
|
|
79
|
-
/**
|
|
80
|
-
* The length at which input values are split across multiple lines. Set to Infinity to format the input as a single line (in combination with "compact" set to true).
|
|
81
|
-
* Default Infinity when "compact" is true, 80 otherwise.
|
|
82
|
-
* Ignored when `json` is enabled, colors are disabled, and `compact` is set to true as it produces a parseable JSON output.
|
|
83
|
-
*/
|
|
84
|
-
breakLength?: number;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* @publicApi
|
|
88
|
-
*/
|
|
89
|
-
export declare class ConsoleLogger implements LoggerService {
|
|
90
|
-
/**
|
|
91
|
-
* The options of the logger.
|
|
92
|
-
*/
|
|
93
|
-
protected options: ConsoleLoggerOptions;
|
|
94
|
-
/**
|
|
95
|
-
* The context of the logger (can be set manually or automatically inferred).
|
|
96
|
-
*/
|
|
97
|
-
protected context?: string;
|
|
98
|
-
/**
|
|
99
|
-
* The original context of the logger (set in the constructor).
|
|
100
|
-
*/
|
|
101
|
-
protected originalContext?: string;
|
|
102
|
-
/**
|
|
103
|
-
* The options used for the "inspect" method.
|
|
104
|
-
*/
|
|
105
|
-
protected inspectOptions: InspectOptions;
|
|
106
|
-
/**
|
|
107
|
-
* The last timestamp at which the log message was printed.
|
|
108
|
-
*/
|
|
109
|
-
protected lastTimestampAt?: number;
|
|
110
|
-
setup(): void;
|
|
111
|
-
setup(context: string): void;
|
|
112
|
-
setup(options: ConsoleLoggerOptions): void;
|
|
113
|
-
setup(context: string, options: ConsoleLoggerOptions): void;
|
|
114
|
-
/**
|
|
115
|
-
* Write a 'log' level log, if the configured level allows for it.
|
|
116
|
-
* Prints to `stdout` with newline.
|
|
117
|
-
*/
|
|
118
|
-
log(message: any, context?: string): void;
|
|
119
|
-
log(message: any, ...optionalParams: [...any, string?]): void;
|
|
120
|
-
/**
|
|
121
|
-
* Write an 'error' level log, if the configured level allows for it.
|
|
122
|
-
* Prints to `stderr` with newline.
|
|
123
|
-
*/
|
|
124
|
-
error(message: any, stackOrContext?: string): void;
|
|
125
|
-
error(message: any, stack?: string, context?: string): void;
|
|
126
|
-
error(message: any, ...optionalParams: [...any, string?, string?]): void;
|
|
127
|
-
/**
|
|
128
|
-
* Write a 'warn' level log, if the configured level allows for it.
|
|
129
|
-
* Prints to `stdout` with newline.
|
|
130
|
-
*/
|
|
131
|
-
warn(message: any, context?: string): void;
|
|
132
|
-
warn(message: any, ...optionalParams: [...any, string?]): void;
|
|
133
|
-
/**
|
|
134
|
-
* Write a 'debug' level log, if the configured level allows for it.
|
|
135
|
-
* Prints to `stdout` with newline.
|
|
136
|
-
*/
|
|
137
|
-
debug(message: any, context?: string): void;
|
|
138
|
-
debug(message: any, ...optionalParams: [...any, string?]): void;
|
|
139
|
-
/**
|
|
140
|
-
* Write a 'verbose' level log, if the configured level allows for it.
|
|
141
|
-
* Prints to `stdout` with newline.
|
|
142
|
-
*/
|
|
143
|
-
verbose(message: any, context?: string): void;
|
|
144
|
-
verbose(message: any, ...optionalParams: [...any, string?]): void;
|
|
145
|
-
/**
|
|
146
|
-
* Write a 'fatal' level log, if the configured level allows for it.
|
|
147
|
-
* Prints to `stdout` with newline.
|
|
148
|
-
*/
|
|
149
|
-
fatal(message: any, context?: string): void;
|
|
150
|
-
fatal(message: any, ...optionalParams: [...any, string?]): void;
|
|
151
|
-
/**
|
|
152
|
-
* Set log levels
|
|
153
|
-
* @param levels log levels
|
|
154
|
-
*/
|
|
155
|
-
setLogLevels(levels: LogLevel[]): void;
|
|
156
|
-
/**
|
|
157
|
-
* Set logger context
|
|
158
|
-
* @param context context
|
|
159
|
-
*/
|
|
160
|
-
setContext(context: string): void;
|
|
161
|
-
/**
|
|
162
|
-
* Resets the logger context to the value that was passed in the constructor.
|
|
163
|
-
*/
|
|
164
|
-
resetContext(): void;
|
|
165
|
-
isLevelEnabled(level: LogLevel): boolean;
|
|
166
|
-
/**
|
|
167
|
-
* Gets the current request ID from the AsyncLocalStorage store.
|
|
168
|
-
* Only returns a value if the requestId option is enabled.
|
|
169
|
-
*/
|
|
170
|
-
protected getCurrentRequestId(): string | undefined;
|
|
171
|
-
protected getTimestamp(): string;
|
|
172
|
-
protected printMessages(messages: unknown[], context?: string, logLevel?: LogLevel, requestId?: string, writeStreamType?: 'stdout' | 'stderr', errorStack?: unknown): void;
|
|
173
|
-
protected printAsJson(message: unknown, options: {
|
|
174
|
-
context: string;
|
|
175
|
-
logLevel: LogLevel;
|
|
176
|
-
writeStreamType?: 'stdout' | 'stderr';
|
|
177
|
-
errorStack?: unknown;
|
|
178
|
-
requestId?: string;
|
|
179
|
-
}): void;
|
|
180
|
-
protected formatPid(pid: number): string;
|
|
181
|
-
protected formatContext(context: string): string;
|
|
182
|
-
protected formatMessage(logLevel: LogLevel, message: unknown, pidMessage: string, formattedLogLevel: string, contextMessage: string, timestampDiff: string, requestId?: string): string;
|
|
183
|
-
protected getRequestId(requestId?: string): string;
|
|
184
|
-
protected stringifyMessage(message: unknown, logLevel: LogLevel): string;
|
|
185
|
-
protected colorize(message: string, logLevel: LogLevel): string;
|
|
186
|
-
protected printStackTrace(stack: string): void;
|
|
187
|
-
protected updateAndGetTimestampDiff(): string;
|
|
188
|
-
protected formatTimestampDiff(timestampDiff: number): string;
|
|
189
|
-
protected getInspectOptions(): InspectOptions;
|
|
190
|
-
protected stringifyReplacer(key: string, value: unknown): unknown;
|
|
191
|
-
private getContextAndMessagesToPrint;
|
|
192
|
-
private getContextAndStackAndMessagesToPrint;
|
|
193
|
-
private isStackFormat;
|
|
194
|
-
private getColorByLogLevel;
|
|
195
|
-
}
|
|
196
|
-
//# sourceMappingURL=console-logger.service.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"console-logger.service.d.mts","sourceRoot":"","sources":["console-logger.service.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAA;AAM1C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AAgBnE;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC1B;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;;;OAKG;IAC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,KAAK,EAAE,OAAO;IAmBvD,OAAO,CAAC,4BAA4B;IAepC,OAAO,CAAC,oCAAoC;IA+B5C,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,kBAAkB;CAgB3B"}
|
package/src/logger/index.d.mts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from './utils/index.mjs';
|
|
2
|
-
export * from './console-logger.service.mjs';
|
|
3
|
-
export * from './log-levels.mjs';
|
|
4
|
-
export * from './logger.tokens.mjs';
|
|
5
|
-
export * from './logger.service.mjs';
|
|
6
|
-
export * from './logger-service.interface.mjs';
|
|
7
|
-
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,kBAAkB,CAAA;AAChC,cAAc,qBAAqB,CAAA;AACnC,cAAc,sBAAsB,CAAA;AACpC,cAAc,gCAAgC,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Available log levels in order of severity (lowest to highest).
|
|
3
|
-
*/
|
|
4
|
-
export declare const LOG_LEVELS: ["verbose", "debug", "log", "warn", "error", "fatal"];
|
|
5
|
-
/**
|
|
6
|
-
* Log level type.
|
|
7
|
-
*
|
|
8
|
-
* Represents the severity level of a log message.
|
|
9
|
-
* Levels are: 'verbose', 'debug', 'log', 'warn', 'error', 'fatal'
|
|
10
|
-
*
|
|
11
|
-
* @publicApi
|
|
12
|
-
*/
|
|
13
|
-
export type LogLevel = (typeof LOG_LEVELS)[number];
|
|
14
|
-
//# sourceMappingURL=log-levels.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"log-levels.d.mts","sourceRoot":"","sources":["log-levels.mts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,UAAU,uDAOM,CAAA;AAE7B;;;;;;;GAOG;AACH,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAA"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { LogLevel } from './log-levels.mjs';
|
|
2
|
-
/**
|
|
3
|
-
* @publicApi
|
|
4
|
-
*/
|
|
5
|
-
export interface LoggerService {
|
|
6
|
-
/**
|
|
7
|
-
* Write a 'log' level log.
|
|
8
|
-
*/
|
|
9
|
-
log(message: any, ...optionalParams: any[]): any;
|
|
10
|
-
/**
|
|
11
|
-
* Write an 'error' level log.
|
|
12
|
-
*/
|
|
13
|
-
error(message: any, ...optionalParams: any[]): any;
|
|
14
|
-
/**
|
|
15
|
-
* Write a 'warn' level log.
|
|
16
|
-
*/
|
|
17
|
-
warn(message: any, ...optionalParams: any[]): any;
|
|
18
|
-
/**
|
|
19
|
-
* Write a 'debug' level log.
|
|
20
|
-
*/
|
|
21
|
-
debug?(message: any, ...optionalParams: any[]): any;
|
|
22
|
-
/**
|
|
23
|
-
* Write a 'verbose' level log.
|
|
24
|
-
*/
|
|
25
|
-
verbose?(message: any, ...optionalParams: any[]): any;
|
|
26
|
-
/**
|
|
27
|
-
* Write a 'fatal' level log.
|
|
28
|
-
*/
|
|
29
|
-
fatal?(message: any, ...optionalParams: any[]): any;
|
|
30
|
-
/**
|
|
31
|
-
* Set log levels.
|
|
32
|
-
* @param levels log levels
|
|
33
|
-
*/
|
|
34
|
-
setLogLevels?(levels: LogLevel[]): any;
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=logger-service.interface.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger-service.interface.d.mts","sourceRoot":"","sources":["logger-service.interface.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAEhD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;IAEhD;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;IAElD;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;IAEjD;;OAEG;IACH,KAAK,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;IAEnD;;OAEG;IACH,OAAO,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;IAErD;;OAEG;IACH,KAAK,CAAC,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,EAAE,GAAG,GAAG,CAAA;IAEnD;;;OAGG;IACH,YAAY,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAA;CACvC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import type { LoggerService } from './logger-service.interface.mjs';
|
|
2
|
-
import type { LoggerOptions } from './logger.tokens.mjs';
|
|
3
|
-
/**
|
|
4
|
-
* Logger service instance that can be injected into services and controllers.
|
|
5
|
-
*
|
|
6
|
-
* Provides contextualized logging with automatic context injection.
|
|
7
|
-
* The context is set when the logger is injected using the `inject` function.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```typescript
|
|
11
|
-
* @Injectable()
|
|
12
|
-
* export class UserService {
|
|
13
|
-
* private logger = inject(Logger, { context: UserService.name })
|
|
14
|
-
*
|
|
15
|
-
* async findUser(id: string) {
|
|
16
|
-
* this.logger.log(`Finding user ${id}`)
|
|
17
|
-
* // Logs with context: [UserService]
|
|
18
|
-
* }
|
|
19
|
-
* }
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare class LoggerInstance implements LoggerService {
|
|
23
|
-
protected localInstance: LoggerService;
|
|
24
|
-
protected context?: string;
|
|
25
|
-
constructor(config?: LoggerOptions);
|
|
26
|
-
/**
|
|
27
|
-
* Write an 'error' level log.
|
|
28
|
-
*/
|
|
29
|
-
error(message: any, stack?: string, context?: string): void;
|
|
30
|
-
error(message: any, ...optionalParams: [...any, string?, string?]): void;
|
|
31
|
-
/**
|
|
32
|
-
* Write a 'log' level log.
|
|
33
|
-
*/
|
|
34
|
-
log(message: any, context?: string): void;
|
|
35
|
-
log(message: any, ...optionalParams: [...any, string?]): void;
|
|
36
|
-
/**
|
|
37
|
-
* Write a 'warn' level log.
|
|
38
|
-
*/
|
|
39
|
-
warn(message: any, context?: string): void;
|
|
40
|
-
warn(message: any, ...optionalParams: [...any, string?]): void;
|
|
41
|
-
/**
|
|
42
|
-
* Write a 'debug' level log.
|
|
43
|
-
*/
|
|
44
|
-
debug(message: any, context?: string): void;
|
|
45
|
-
debug(message: any, ...optionalParams: [...any, string?]): void;
|
|
46
|
-
/**
|
|
47
|
-
* Write a 'verbose' level log.
|
|
48
|
-
*/
|
|
49
|
-
verbose(message: any, context?: string): void;
|
|
50
|
-
verbose(message: any, ...optionalParams: [...any, string?]): void;
|
|
51
|
-
/**
|
|
52
|
-
* Write a 'fatal' level log.
|
|
53
|
-
*/
|
|
54
|
-
fatal(message: any, context?: string): void;
|
|
55
|
-
fatal(message: any, ...optionalParams: [...any, string?]): void;
|
|
56
|
-
}
|
|
57
|
-
//# sourceMappingURL=logger.service.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.service.d.mts","sourceRoot":"","sources":["logger.service.mts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAIxD;;;;;;;;;;;;;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AI;IAQjE;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAC3C,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,CAAC,GAAG,GAAG,EAAE,MAAM,CAAC,CAAC,GAAG,IAAI;CAOhE"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@navios/di';
|
|
2
|
-
import z from 'zod/v4';
|
|
3
|
-
import type { LoggerService } from './logger-service.interface.mjs';
|
|
4
|
-
import type { LoggerInstance } from './logger.service.mjs';
|
|
5
|
-
/**
|
|
6
|
-
* Injection token for the logger output service.
|
|
7
|
-
*
|
|
8
|
-
* This token is used to provide a custom logger implementation.
|
|
9
|
-
* By default, it's bound to ConsoleLogger.
|
|
10
|
-
*/
|
|
11
|
-
export declare const LoggerOutput: InjectionToken<LoggerService, undefined, false>;
|
|
12
|
-
/**
|
|
13
|
-
* Schema for logger options.
|
|
14
|
-
*/
|
|
15
|
-
export declare const loggerOptionsSchema: z.ZodOptional<z.ZodObject<{
|
|
16
|
-
context: z.ZodOptional<z.ZodString>;
|
|
17
|
-
}, z.core.$strip>>;
|
|
18
|
-
/**
|
|
19
|
-
* Options for creating a logger instance.
|
|
20
|
-
*/
|
|
21
|
-
export type LoggerOptions = z.infer<typeof loggerOptionsSchema>;
|
|
22
|
-
/**
|
|
23
|
-
* Injection token for the Logger service.
|
|
24
|
-
*
|
|
25
|
-
* Use this token to inject a contextualized logger instance.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```typescript
|
|
29
|
-
* const logger = inject(Logger, { context: 'MyService' })
|
|
30
|
-
* logger.log('Hello world') // Logs with context: [MyService]
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export declare const Logger: InjectionToken<LoggerInstance, z.ZodOptional<z.ZodObject<{
|
|
34
|
-
context: z.ZodOptional<z.ZodString>;
|
|
35
|
-
}, z.core.$strip>>, false>;
|
|
36
|
-
//# sourceMappingURL=logger.tokens.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.tokens.d.mts","sourceRoot":"","sources":["logger.tokens.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAE3C,OAAO,CAAC,MAAM,QAAQ,CAAA;AAEtB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAA;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,YAAY,iDAAuD,CAAA;AAEhF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;kBAInB,CAAA;AAEb;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM;;0BAGa,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const clc: {
|
|
2
|
-
bold: (text: string) => string;
|
|
3
|
-
green: (text: string) => string;
|
|
4
|
-
yellow: (text: string) => string;
|
|
5
|
-
red: (text: string) => string;
|
|
6
|
-
magentaBright: (text: string) => string;
|
|
7
|
-
cyanBright: (text: string) => string;
|
|
8
|
-
};
|
|
9
|
-
export declare const yellow: (text: string) => string;
|
|
10
|
-
//# sourceMappingURL=cli-colors.util.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cli-colors.util.d.mts","sourceRoot":"","sources":["cli-colors.util.mts"],"names":[],"mappings":"AAMA,eAAO,MAAM,GAAG;iBAHwC,MAAM;kBAAN,MAAM;mBAAN,MAAM;gBAAN,MAAM;0BAAN,MAAM;uBAAN,MAAM;CAU7D,CAAA;AACD,eAAO,MAAM,MAAM,SAXqC,MAAM,WAa7D,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"filter-log-levelts.util.d.mts","sourceRoot":"","sources":["filter-log-levelts.util.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAKjD;;GAEG;AACH,wBAAgB,eAAe,CAAC,eAAe,SAAK,GAAG,QAAQ,EAAE,CAoBhE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { LogLevel } from '../log-levels.mjs';
|
|
2
|
-
/**
|
|
3
|
-
* Checks if target level is enabled.
|
|
4
|
-
* @param targetLevel target level
|
|
5
|
-
* @param logLevels array of enabled log levels
|
|
6
|
-
*/
|
|
7
|
-
export declare function isLogLevelEnabled(targetLevel: LogLevel, logLevels: LogLevel[] | undefined): boolean;
|
|
8
|
-
//# sourceMappingURL=is-log-level-enabled.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-log-level-enabled.d.mts","sourceRoot":"","sources":["is-log-level-enabled.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAWjD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,EAAE,QAAQ,EACrB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,GAChC,OAAO,CAaT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-log-level.util.d.mts","sourceRoot":"","sources":["is-log-level.util.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAIjD;;GAEG;AACH,wBAAgB,UAAU,CAAC,aAAa,EAAE,GAAG,GAAG,aAAa,IAAI,QAAQ,CAExE"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export declare const isUndefined: (obj: any) => obj is undefined;
|
|
2
|
-
export declare const isObject: (fn: any) => fn is object;
|
|
3
|
-
export declare const isPlainObject: (fn: any) => fn is object;
|
|
4
|
-
export declare const addLeadingSlash: (path?: string) => string;
|
|
5
|
-
export declare const normalizePath: (path?: string) => string;
|
|
6
|
-
export declare const stripEndSlash: (path: string) => string;
|
|
7
|
-
export declare const isFunction: (val: any) => val is Function;
|
|
8
|
-
export declare const isString: (val: any) => val is string;
|
|
9
|
-
export declare const isNumber: (val: any) => val is number;
|
|
10
|
-
export declare const isConstructor: (val: any) => boolean;
|
|
11
|
-
export declare const isNil: (val: any) => val is null | undefined;
|
|
12
|
-
export declare const isEmpty: (array: any) => boolean;
|
|
13
|
-
export declare const isSymbol: (val: any) => val is symbol;
|
|
14
|
-
//# sourceMappingURL=shared.utils.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.utils.d.mts","sourceRoot":"","sources":["shared.utils.mts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,KAAG,GAAG,IAAI,SAClB,CAAA;AAE5B,eAAO,MAAM,QAAQ,GAAI,IAAI,GAAG,KAAG,EAAE,IAAI,MACH,CAAA;AAEtC,eAAO,MAAM,aAAa,GAAI,IAAI,GAAG,KAAG,EAAE,IAAI,MAiB7C,CAAA;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,MAAM,KAAG,MAKxC,CAAA;AAER,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,MAKrC,CAAA;AAET,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,WAC6B,CAAA;AAEvE,eAAO,MAAM,UAAU,GAAI,KAAK,GAAG,KAAG,GAAG,IAAI,QAClB,CAAA;AAC3B,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,KAAG,GAAG,IAAI,MAAiC,CAAA;AAC5E,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,KAAG,GAAG,IAAI,MAAiC,CAAA;AAC5E,eAAO,MAAM,aAAa,GAAI,KAAK,GAAG,KAAG,OAAgC,CAAA;AACzE,eAAO,MAAM,KAAK,GAAI,KAAK,GAAG,KAAG,GAAG,IAAI,IAAI,GAAG,SACb,CAAA;AAClC,eAAO,MAAM,OAAO,GAAI,OAAO,GAAG,KAAG,OAAuC,CAAA;AAC5E,eAAO,MAAM,QAAQ,GAAI,KAAK,GAAG,KAAG,GAAG,IAAI,MAAiC,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ClassType, ClassTypeWithInstance, InjectionToken } from '@navios/di';
|
|
2
|
-
import type { CanActivate } from '../interfaces/index.mjs';
|
|
3
|
-
import type { HandlerMetadata } from './handler.metadata.mjs';
|
|
4
|
-
export declare const ControllerMetadataKey: unique symbol;
|
|
5
|
-
export interface ControllerMetadata {
|
|
6
|
-
endpoints: Set<HandlerMetadata>;
|
|
7
|
-
guards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>;
|
|
8
|
-
customAttributes: Map<string | symbol, any>;
|
|
9
|
-
}
|
|
10
|
-
export declare function getControllerMetadata(target: ClassType, context: ClassDecoratorContext): ControllerMetadata;
|
|
11
|
-
export declare function extractControllerMetadata(target: ClassType): ControllerMetadata;
|
|
12
|
-
export declare function hasControllerMetadata(target: ClassType): boolean;
|
|
13
|
-
//# sourceMappingURL=controller.metadata.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controller.metadata.d.mts","sourceRoot":"","sources":["controller.metadata.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,qBAAqB,EACrB,cAAc,EACf,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAI7D,eAAO,MAAM,qBAAqB,eAAkC,CAAA;AAEpE,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,GAAG,CAAC,eAAe,CAAC,CAAA;IAC/B,MAAM,EAAE,GAAG,CACT,qBAAqB,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,WAAW,EAAE,SAAS,CAAC,CAC5E,CAAA;IACD,gBAAgB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAA;CAC5C;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,qBAAqB,GAC7B,kBAAkB,CAwBpB;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,SAAS,GAChB,kBAAkB,CAWpB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAMhE"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { HttpMethod } from '@navios/builder';
|
|
2
|
-
import type { ClassTypeWithInstance, InjectionToken } from '@navios/di';
|
|
3
|
-
import type { AbstractHttpHandlerAdapterInterface, CanActivate, HttpHeader } from '../interfaces/index.mjs';
|
|
4
|
-
export declare const EndpointMetadataKey: unique symbol;
|
|
5
|
-
export interface HandlerMetadata<Config = null> {
|
|
6
|
-
classMethod: string;
|
|
7
|
-
url: string;
|
|
8
|
-
successStatusCode: number;
|
|
9
|
-
adapterToken: InjectionToken<AbstractHttpHandlerAdapterInterface, undefined> | ClassTypeWithInstance<AbstractHttpHandlerAdapterInterface> | null;
|
|
10
|
-
headers: Partial<Record<HttpHeader, number | string | string[] | undefined>>;
|
|
11
|
-
httpMethod: HttpMethod;
|
|
12
|
-
config: Config;
|
|
13
|
-
guards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>;
|
|
14
|
-
customAttributes: Map<string | symbol, any>;
|
|
15
|
-
}
|
|
16
|
-
export declare function getAllEndpointMetadata(context: ClassMethodDecoratorContext | ClassDecoratorContext): Set<HandlerMetadata<any>>;
|
|
17
|
-
export declare function getEndpointMetadata<Config = any>(target: Function, context: ClassMethodDecoratorContext): HandlerMetadata<Config>;
|
|
18
|
-
//# sourceMappingURL=handler.metadata.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handler.metadata.d.mts","sourceRoot":"","sources":["handler.metadata.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEvE,OAAO,KAAK,EACV,mCAAmC,EACnC,WAAW,EACX,UAAU,EACX,MAAM,yBAAyB,CAAA;AAEhC,eAAO,MAAM,mBAAmB,eAAgC,CAAA;AAEhE,MAAM,WAAW,eAAe,CAAC,MAAM,GAAG,IAAI;IAC5C,WAAW,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,iBAAiB,EAAE,MAAM,CAAA;IACzB,YAAY,EACR,cAAc,CAAC,mCAAmC,EAAE,SAAS,CAAC,GAC9D,qBAAqB,CAAC,mCAAmC,CAAC,GAC1D,IAAI,CAAA;IACR,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAA;IAC5E,UAAU,EAAE,UAAU,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,GAAG,CACT,qBAAqB,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,WAAW,EAAE,SAAS,CAAC,CAC5E,CAAA;IACD,gBAAgB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAA;CAC5C;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,2BAA2B,GAAG,qBAAqB,GAC3D,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAa3B;AAED,wBAAgB,mBAAmB,CAAC,MAAM,GAAG,GAAG,EAC9C,MAAM,EAAE,QAAQ,EAChB,OAAO,EAAE,2BAA2B,GACnC,eAAe,CAAC,MAAM,CAAC,CA+BzB"}
|
package/src/metadata/index.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,uBAAuB,CAAA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { ClassType, ClassTypeWithInstance, InjectionToken } from '@navios/di';
|
|
2
|
-
import type { CanActivate } from '../index.mjs';
|
|
3
|
-
export declare const ModuleMetadataKey: unique symbol;
|
|
4
|
-
export interface ModuleMetadata {
|
|
5
|
-
controllers: Set<ClassType>;
|
|
6
|
-
imports: Set<ClassType>;
|
|
7
|
-
guards: Set<ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>>;
|
|
8
|
-
customAttributes: Map<string | symbol, any>;
|
|
9
|
-
}
|
|
10
|
-
export declare function getModuleMetadata(target: ClassType, context: ClassDecoratorContext): ModuleMetadata;
|
|
11
|
-
export declare function extractModuleMetadata(target: ClassType): ModuleMetadata;
|
|
12
|
-
export declare function hasModuleMetadata(target: ClassType): boolean;
|
|
13
|
-
//# sourceMappingURL=module.metadata.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.metadata.d.mts","sourceRoot":"","sources":["module.metadata.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,qBAAqB,EACrB,cAAc,EACf,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAE/C,eAAO,MAAM,iBAAiB,eAAkC,CAAA;AAEhE,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE,GAAG,CAAC,SAAS,CAAC,CAAA;IAC3B,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,CAAA;IACvB,MAAM,EAAE,GAAG,CACT,qBAAqB,CAAC,WAAW,CAAC,GAAG,cAAc,CAAC,WAAW,EAAE,SAAS,CAAC,CAC5E,CAAA;IACD,gBAAgB,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,EAAE,GAAG,CAAC,CAAA;CAC5C;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,qBAAqB,GAC7B,cAAc,CAwBhB;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,cAAc,CASvE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAG5D"}
|