@navios/core 0.7.0 → 0.8.0

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 (234) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/lib/{index-BFwNx9WQ.d.cts → index-BDNl7j1G.d.cts} +666 -292
  3. package/lib/index-BDNl7j1G.d.cts.map +1 -0
  4. package/lib/{index-D657ijFO.d.mts → index-BoP0cWT6.d.mts} +666 -292
  5. package/lib/index-BoP0cWT6.d.mts.map +1 -0
  6. package/lib/index.cjs +15 -6
  7. package/lib/index.d.cts +2 -2
  8. package/lib/index.d.mts +2 -2
  9. package/lib/index.mjs +3 -3
  10. package/lib/legacy-compat/index.cjs +1 -1
  11. package/lib/legacy-compat/index.cjs.map +1 -1
  12. package/lib/legacy-compat/index.d.cts +1 -1
  13. package/lib/legacy-compat/index.d.cts.map +1 -1
  14. package/lib/legacy-compat/index.d.mts +1 -1
  15. package/lib/legacy-compat/index.d.mts.map +1 -1
  16. package/lib/legacy-compat/index.mjs +1 -1
  17. package/lib/legacy-compat/index.mjs.map +1 -1
  18. package/lib/{src-Cb1aTjl0.cjs → src-B6eISODM.cjs} +622 -114
  19. package/lib/src-B6eISODM.cjs.map +1 -0
  20. package/lib/{src-DzPY5s6d.mjs → src-gBAChVRL.mjs} +563 -73
  21. package/lib/src-gBAChVRL.mjs.map +1 -0
  22. package/lib/testing/index.cjs +6 -6
  23. package/lib/testing/index.cjs.map +1 -1
  24. package/lib/testing/index.d.cts +1 -1
  25. package/lib/testing/index.d.mts +1 -1
  26. package/lib/testing/index.mjs +2 -2
  27. package/lib/{use-guards.decorator-DdvUhB03.cjs → use-guards.decorator-COR-9mZY.cjs} +34 -108
  28. package/lib/use-guards.decorator-COR-9mZY.cjs.map +1 -0
  29. package/lib/{use-guards.decorator-kZ3lNK8v.mjs → use-guards.decorator-CUww54Nt.mjs} +14 -94
  30. package/lib/use-guards.decorator-CUww54Nt.mjs.map +1 -0
  31. package/package.json +12 -12
  32. package/src/__tests__/controller-resolver.spec.mts +223 -0
  33. package/src/__tests__/controller.spec.mts +1 -1
  34. package/src/decorators/controller.decorator.mts +11 -6
  35. package/src/decorators/endpoint.decorator.mts +60 -12
  36. package/src/decorators/multipart.decorator.mts +67 -24
  37. package/src/decorators/stream.decorator.mts +65 -24
  38. package/src/interfaces/abstract-http-adapter.interface.mts +52 -0
  39. package/src/interfaces/abstract-http-handler-adapter.interface.mts +31 -1
  40. package/src/interfaces/index.mts +1 -0
  41. package/src/interfaces/plugin.interface.mts +105 -0
  42. package/src/legacy-compat/decorators/endpoint.decorator.mts +1 -1
  43. package/src/legacy-compat/decorators/multipart.decorator.mts +1 -1
  44. package/src/legacy-compat/decorators/stream.decorator.mts +1 -1
  45. package/src/logger/logger.service.mts +3 -3
  46. package/src/navios.application.mts +91 -27
  47. package/src/navios.factory.mts +29 -9
  48. package/src/services/guard-runner.service.mts +46 -9
  49. package/src/services/index.mts +1 -0
  50. package/src/services/instance-resolver.service.mts +186 -0
  51. package/src/services/module-loader.service.mts +102 -1
  52. package/src/stores/request-id.store.mts +45 -3
  53. package/src/tokens/index.mts +1 -0
  54. package/src/tokens/navios-options.token.mts +6 -0
  55. package/lib/index-BFwNx9WQ.d.cts.map +0 -1
  56. package/lib/index-D657ijFO.d.mts.map +0 -1
  57. package/lib/src-Cb1aTjl0.cjs.map +0 -1
  58. package/lib/src-DzPY5s6d.mjs.map +0 -1
  59. package/lib/use-guards.decorator-DdvUhB03.cjs.map +0 -1
  60. package/lib/use-guards.decorator-kZ3lNK8v.mjs.map +0 -1
  61. package/src/attribute.factory.d.mts +0 -175
  62. package/src/attribute.factory.d.mts.map +0 -1
  63. package/src/config/config-service.interface.d.mts +0 -39
  64. package/src/config/config-service.interface.d.mts.map +0 -1
  65. package/src/config/config.provider.d.mts +0 -46
  66. package/src/config/config.provider.d.mts.map +0 -1
  67. package/src/config/config.service.d.mts +0 -108
  68. package/src/config/config.service.d.mts.map +0 -1
  69. package/src/config/index.d.mts +0 -6
  70. package/src/config/index.d.mts.map +0 -1
  71. package/src/config/types.d.mts +0 -13
  72. package/src/config/types.d.mts.map +0 -1
  73. package/src/config/utils/helpers.d.mts +0 -3
  74. package/src/config/utils/helpers.d.mts.map +0 -1
  75. package/src/config/utils/index.d.mts +0 -2
  76. package/src/config/utils/index.d.mts.map +0 -1
  77. package/src/decorators/controller.decorator.d.mts +0 -33
  78. package/src/decorators/controller.decorator.d.mts.map +0 -1
  79. package/src/decorators/endpoint.decorator.d.mts +0 -89
  80. package/src/decorators/endpoint.decorator.d.mts.map +0 -1
  81. package/src/decorators/header.decorator.d.mts +0 -22
  82. package/src/decorators/header.decorator.d.mts.map +0 -1
  83. package/src/decorators/http-code.decorator.d.mts +0 -22
  84. package/src/decorators/http-code.decorator.d.mts.map +0 -1
  85. package/src/decorators/index.d.mts +0 -9
  86. package/src/decorators/index.d.mts.map +0 -1
  87. package/src/decorators/module.decorator.d.mts +0 -42
  88. package/src/decorators/module.decorator.d.mts.map +0 -1
  89. package/src/decorators/multipart.decorator.d.mts +0 -54
  90. package/src/decorators/multipart.decorator.d.mts.map +0 -1
  91. package/src/decorators/stream.decorator.d.mts +0 -42
  92. package/src/decorators/stream.decorator.d.mts.map +0 -1
  93. package/src/decorators/use-guards.decorator.d.mts +0 -33
  94. package/src/decorators/use-guards.decorator.d.mts.map +0 -1
  95. package/src/exceptions/bad-request.exception.d.mts +0 -26
  96. package/src/exceptions/bad-request.exception.d.mts.map +0 -1
  97. package/src/exceptions/conflict.exception.d.mts +0 -29
  98. package/src/exceptions/conflict.exception.d.mts.map +0 -1
  99. package/src/exceptions/forbidden.exception.d.mts +0 -28
  100. package/src/exceptions/forbidden.exception.d.mts.map +0 -1
  101. package/src/exceptions/http.exception.d.mts +0 -33
  102. package/src/exceptions/http.exception.d.mts.map +0 -1
  103. package/src/exceptions/index.d.mts +0 -8
  104. package/src/exceptions/index.d.mts.map +0 -1
  105. package/src/exceptions/internal-server-error.exception.d.mts +0 -31
  106. package/src/exceptions/internal-server-error.exception.d.mts.map +0 -1
  107. package/src/exceptions/not-found.exception.d.mts +0 -30
  108. package/src/exceptions/not-found.exception.d.mts.map +0 -1
  109. package/src/exceptions/unauthorized.exception.d.mts +0 -28
  110. package/src/exceptions/unauthorized.exception.d.mts.map +0 -1
  111. package/src/factories/endpoint-adapter.factory.d.mts +0 -6
  112. package/src/factories/endpoint-adapter.factory.d.mts.map +0 -1
  113. package/src/factories/http-adapter.factory.d.mts +0 -6
  114. package/src/factories/http-adapter.factory.d.mts.map +0 -1
  115. package/src/factories/index.d.mts +0 -8
  116. package/src/factories/index.d.mts.map +0 -1
  117. package/src/factories/multipart-adapter.factory.d.mts +0 -6
  118. package/src/factories/multipart-adapter.factory.d.mts.map +0 -1
  119. package/src/factories/reply.factory.d.mts +0 -6
  120. package/src/factories/reply.factory.d.mts.map +0 -1
  121. package/src/factories/request.factory.d.mts +0 -6
  122. package/src/factories/request.factory.d.mts.map +0 -1
  123. package/src/factories/stream-adapter.factory.d.mts +0 -6
  124. package/src/factories/stream-adapter.factory.d.mts.map +0 -1
  125. package/src/factories/xml-stream-adapter.factory.d.mts +0 -6
  126. package/src/factories/xml-stream-adapter.factory.d.mts.map +0 -1
  127. package/src/index.d.mts +0 -15
  128. package/src/index.d.mts.map +0 -1
  129. package/src/interfaces/abstract-execution-context.inteface.d.mts +0 -44
  130. package/src/interfaces/abstract-execution-context.inteface.d.mts.map +0 -1
  131. package/src/interfaces/abstract-http-adapter.interface.d.mts +0 -15
  132. package/src/interfaces/abstract-http-adapter.interface.d.mts.map +0 -1
  133. package/src/interfaces/abstract-http-cors-options.interface.d.mts +0 -58
  134. package/src/interfaces/abstract-http-cors-options.interface.d.mts.map +0 -1
  135. package/src/interfaces/abstract-http-handler-adapter.interface.d.mts +0 -7
  136. package/src/interfaces/abstract-http-handler-adapter.interface.d.mts.map +0 -1
  137. package/src/interfaces/abstract-http-listen-options.interface.d.mts +0 -5
  138. package/src/interfaces/abstract-http-listen-options.interface.d.mts.map +0 -1
  139. package/src/interfaces/can-activate.d.mts +0 -36
  140. package/src/interfaces/can-activate.d.mts.map +0 -1
  141. package/src/interfaces/http-header.d.mts +0 -10
  142. package/src/interfaces/http-header.d.mts.map +0 -1
  143. package/src/interfaces/index.d.mts +0 -9
  144. package/src/interfaces/index.d.mts.map +0 -1
  145. package/src/interfaces/navios-module.d.mts +0 -29
  146. package/src/interfaces/navios-module.d.mts.map +0 -1
  147. package/src/legacy-compat/context-compat.d.mts +0 -19
  148. package/src/legacy-compat/context-compat.d.mts.map +0 -1
  149. package/src/legacy-compat/decorators/controller.decorator.d.mts +0 -21
  150. package/src/legacy-compat/decorators/controller.decorator.d.mts.map +0 -1
  151. package/src/legacy-compat/decorators/endpoint.decorator.d.mts +0 -33
  152. package/src/legacy-compat/decorators/endpoint.decorator.d.mts.map +0 -1
  153. package/src/legacy-compat/decorators/header.decorator.d.mts +0 -24
  154. package/src/legacy-compat/decorators/header.decorator.d.mts.map +0 -1
  155. package/src/legacy-compat/decorators/http-code.decorator.d.mts +0 -22
  156. package/src/legacy-compat/decorators/http-code.decorator.d.mts.map +0 -1
  157. package/src/legacy-compat/decorators/index.d.mts +0 -9
  158. package/src/legacy-compat/decorators/index.d.mts.map +0 -1
  159. package/src/legacy-compat/decorators/module.decorator.d.mts +0 -22
  160. package/src/legacy-compat/decorators/module.decorator.d.mts.map +0 -1
  161. package/src/legacy-compat/decorators/multipart.decorator.d.mts +0 -34
  162. package/src/legacy-compat/decorators/multipart.decorator.d.mts.map +0 -1
  163. package/src/legacy-compat/decorators/stream.decorator.d.mts +0 -34
  164. package/src/legacy-compat/decorators/stream.decorator.d.mts.map +0 -1
  165. package/src/legacy-compat/decorators/use-guards.decorator.d.mts +0 -29
  166. package/src/legacy-compat/decorators/use-guards.decorator.d.mts.map +0 -1
  167. package/src/legacy-compat/index.d.mts +0 -19
  168. package/src/legacy-compat/index.d.mts.map +0 -1
  169. package/src/logger/console-logger.service.d.mts +0 -196
  170. package/src/logger/console-logger.service.d.mts.map +0 -1
  171. package/src/logger/index.d.mts +0 -7
  172. package/src/logger/index.d.mts.map +0 -1
  173. package/src/logger/log-levels.d.mts +0 -14
  174. package/src/logger/log-levels.d.mts.map +0 -1
  175. package/src/logger/logger-service.interface.d.mts +0 -36
  176. package/src/logger/logger-service.interface.d.mts.map +0 -1
  177. package/src/logger/logger.service.d.mts +0 -57
  178. package/src/logger/logger.service.d.mts.map +0 -1
  179. package/src/logger/logger.tokens.d.mts +0 -36
  180. package/src/logger/logger.tokens.d.mts.map +0 -1
  181. package/src/logger/utils/cli-colors.util.d.mts +0 -10
  182. package/src/logger/utils/cli-colors.util.d.mts.map +0 -1
  183. package/src/logger/utils/filter-log-levelts.util.d.mts +0 -6
  184. package/src/logger/utils/filter-log-levelts.util.d.mts.map +0 -1
  185. package/src/logger/utils/index.d.mts +0 -6
  186. package/src/logger/utils/index.d.mts.map +0 -1
  187. package/src/logger/utils/is-log-level-enabled.d.mts +0 -8
  188. package/src/logger/utils/is-log-level-enabled.d.mts.map +0 -1
  189. package/src/logger/utils/is-log-level.util.d.mts +0 -6
  190. package/src/logger/utils/is-log-level.util.d.mts.map +0 -1
  191. package/src/logger/utils/shared.utils.d.mts +0 -14
  192. package/src/logger/utils/shared.utils.d.mts.map +0 -1
  193. package/src/metadata/controller.metadata.d.mts +0 -13
  194. package/src/metadata/controller.metadata.d.mts.map +0 -1
  195. package/src/metadata/handler.metadata.d.mts +0 -18
  196. package/src/metadata/handler.metadata.d.mts.map +0 -1
  197. package/src/metadata/index.d.mts +0 -4
  198. package/src/metadata/index.d.mts.map +0 -1
  199. package/src/metadata/module.metadata.d.mts +0 -13
  200. package/src/metadata/module.metadata.d.mts.map +0 -1
  201. package/src/navios.application.d.mts +0 -210
  202. package/src/navios.application.d.mts.map +0 -1
  203. package/src/navios.environment.d.mts +0 -11
  204. package/src/navios.environment.d.mts.map +0 -1
  205. package/src/navios.factory.d.mts +0 -68
  206. package/src/navios.factory.d.mts.map +0 -1
  207. package/src/services/guard-runner.service.d.mts +0 -10
  208. package/src/services/guard-runner.service.d.mts.map +0 -1
  209. package/src/services/index.d.mts +0 -3
  210. package/src/services/index.d.mts.map +0 -1
  211. package/src/services/module-loader.service.d.mts +0 -17
  212. package/src/services/module-loader.service.d.mts.map +0 -1
  213. package/src/stores/index.d.mts +0 -2
  214. package/src/stores/index.d.mts.map +0 -1
  215. package/src/stores/request-id.store.d.mts +0 -37
  216. package/src/stores/request-id.store.d.mts.map +0 -1
  217. package/src/tokens/endpoint-adapter.token.d.mts +0 -4
  218. package/src/tokens/endpoint-adapter.token.d.mts.map +0 -1
  219. package/src/tokens/execution-context.token.d.mts +0 -5
  220. package/src/tokens/execution-context.token.d.mts.map +0 -1
  221. package/src/tokens/http-adapter.token.d.mts +0 -4
  222. package/src/tokens/http-adapter.token.d.mts.map +0 -1
  223. package/src/tokens/index.d.mts +0 -9
  224. package/src/tokens/index.d.mts.map +0 -1
  225. package/src/tokens/multipart-adapter.token.d.mts +0 -4
  226. package/src/tokens/multipart-adapter.token.d.mts.map +0 -1
  227. package/src/tokens/reply.token.d.mts +0 -3
  228. package/src/tokens/reply.token.d.mts.map +0 -1
  229. package/src/tokens/request.token.d.mts +0 -3
  230. package/src/tokens/request.token.d.mts.map +0 -1
  231. package/src/tokens/stream-adapter.token.d.mts +0 -4
  232. package/src/tokens/stream-adapter.token.d.mts.map +0 -1
  233. package/src/tokens/xml-stream-adapter.token.d.mts +0 -4
  234. package/src/tokens/xml-stream-adapter.token.d.mts.map +0 -1
@@ -1,22 +0,0 @@
1
- import type { ClassType } from '@navios/di';
2
- import { type ModuleOptions } from '../../decorators/module.decorator.mjs';
3
- /**
4
- * Legacy-compatible Module decorator.
5
- *
6
- * Works with TypeScript experimental decorators (legacy API).
7
- *
8
- * @param options - Module configuration options
9
- * @returns A class decorator compatible with legacy decorator API
10
- *
11
- * @example
12
- * ```typescript
13
- * @Module({
14
- * controllers: [UserController, AuthController],
15
- * imports: [DatabaseModule],
16
- * guards: [AuthGuard],
17
- * })
18
- * export class AppModule {}
19
- * ```
20
- */
21
- export declare function Module(options?: ModuleOptions): (target: ClassType) => ClassType;
22
- //# sourceMappingURL=module.decorator.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"module.decorator.d.mts","sourceRoot":"","sources":["module.decorator.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAE3C,OAAO,EAA4B,KAAK,aAAa,EAAE,MAAM,uCAAuC,CAAA;AAGpG;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,MAAM,CACpB,OAAO,GAAE,aAIR,IAEgB,QAAQ,SAAS,eAKnC"}
@@ -1,34 +0,0 @@
1
- import type { BaseEndpointConfig, EndpointFunctionArgs, HttpMethod } from '@navios/builder';
2
- import type { z, ZodObject, ZodType } from 'zod/v4';
3
- /**
4
- * Type helper to constrain a PropertyDescriptor's value to match a multipart endpoint signature.
5
- * Note: In legacy decorators, type constraints are checked when the decorator is applied,
6
- * but may not be preserved perfectly when decorators are stacked.
7
- */
8
- type MultipartMethodDescriptor<Url extends string, QuerySchema, RequestSchema, ResponseSchema extends ZodType> = TypedPropertyDescriptor<(params: QuerySchema extends ZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>) => Promise<z.input<ResponseSchema>>>;
9
- /**
10
- * Legacy-compatible Multipart decorator.
11
- *
12
- * Works with TypeScript experimental decorators (legacy API).
13
- * Provides type safety by ensuring method signatures match the endpoint configuration.
14
- *
15
- * @param endpoint - The multipart endpoint declaration from @navios/builder
16
- * @returns A method decorator compatible with legacy decorator API
17
- *
18
- * @example
19
- * ```typescript
20
- * @Controller()
21
- * export class FileController {
22
- * @Multipart(uploadFileEndpoint)
23
- * async uploadFile(request: MultipartParams<typeof uploadFileEndpoint>): MultipartResult<typeof uploadFileEndpoint> {
24
- * const { file } = request.data
25
- * return { url: 'https://example.com/file.jpg' }
26
- * }
27
- * }
28
- * ```
29
- */
30
- export declare function Multipart<Method extends HttpMethod = HttpMethod, Url extends string = string, QuerySchema = undefined, ResponseSchema extends ZodType = ZodType, RequestSchema = ZodType>(endpoint: {
31
- config: BaseEndpointConfig<Method, Url, QuerySchema, ResponseSchema, RequestSchema>;
32
- }): <T extends object>(target: T, propertyKey: string | symbol, descriptor: MultipartMethodDescriptor<Url, QuerySchema, RequestSchema, ResponseSchema>) => PropertyDescriptor | void;
33
-
34
- //# sourceMappingURL=multipart.decorator.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multipart.decorator.d.mts","sourceRoot":"","sources":["multipart.decorator.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACX,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAKnD;;;;GAIG;AACH,KAAK,yBAAyB,CAC5B,GAAG,SAAS,MAAM,EAClB,WAAW,EACX,aAAa,EACb,cAAc,SAAS,OAAO,IAC5B,uBAAuB,CACzB,CACE,MAAM,EAAE,WAAW,SAAS,SAAS,GACjC,aAAa,SAAS,OAAO,GAC3B,oBAAoB,CAAC,GAAG,EAAE,WAAW,EAAE,aAAa,CAAC,GACrD,oBAAoB,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,CAAC,GACnD,aAAa,SAAS,OAAO,GAC3B,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,aAAa,CAAC,GACnD,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAC,KAClD,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CACtC,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,SAAS,CACvB,MAAM,SAAS,UAAU,GAAG,UAAU,EACtC,GAAG,SAAS,MAAM,GAAG,MAAM,EAC3B,WAAW,GAAG,SAAS,EACvB,cAAc,SAAS,OAAO,GAAG,OAAO,EACxC,aAAa,GAAG,OAAO,EACvB,QAAQ,EAAE;IACV,MAAM,EAAE,kBAAkB,CACxB,MAAM,EACN,GAAG,EACH,WAAW,EACX,cAAc,EACd,aAAa,CACd,CAAA;CACF,IACkB,CAAC,SAAS,MAAM,EAC/B,QAAQ,CAAC,EACT,aAAa,MAAM,GAAG,MAAM,EAC5B,YAAY,yBAAyB,CACnC,GAAG,EACH,WAAW,EACX,aAAa,EACb,cAAc,CACf,KACA,kBAAkB,GAAG,IAAI,CAe7B"}
@@ -1,34 +0,0 @@
1
- import type { BaseStreamConfig, EndpointFunctionArgs, HttpMethod } from '@navios/builder';
2
- import type { ZodObject, ZodType } from 'zod/v4';
3
- /**
4
- * Type helper to constrain a PropertyDescriptor's value to match a stream endpoint signature.
5
- * Note: In legacy decorators, type constraints are checked when the decorator is applied,
6
- * but may not be preserved perfectly when decorators are stacked.
7
- */
8
- type StreamMethodDescriptor<Url extends string, QuerySchema, RequestSchema> = TypedPropertyDescriptor<(params: QuerySchema extends ZodObject ? RequestSchema extends ZodType ? EndpointFunctionArgs<Url, QuerySchema, RequestSchema> : EndpointFunctionArgs<Url, QuerySchema, undefined> : RequestSchema extends ZodType ? EndpointFunctionArgs<Url, undefined, RequestSchema> : EndpointFunctionArgs<Url, undefined, undefined>, reply: any) => Promise<void>>;
9
- /**
10
- * Legacy-compatible Stream decorator.
11
- *
12
- * Works with TypeScript experimental decorators (legacy API).
13
- * Provides type safety by ensuring method signatures match the endpoint configuration.
14
- *
15
- * @param endpoint - The stream endpoint declaration from @navios/builder
16
- * @returns A method decorator compatible with legacy decorator API
17
- *
18
- * @example
19
- * ```typescript
20
- * @Controller()
21
- * export class FileController {
22
- * @Stream(downloadFileEndpoint)
23
- * async downloadFile(request: StreamParams<typeof downloadFileEndpoint>, reply: any) {
24
- * const { fileId } = request.urlParams
25
- * // Stream file data to reply
26
- * }
27
- * }
28
- * ```
29
- */
30
- export declare function Stream<Method extends HttpMethod = HttpMethod, Url extends string = string, QuerySchema = undefined, RequestSchema = ZodType>(endpoint: {
31
- config: BaseStreamConfig<Method, Url, QuerySchema, RequestSchema>;
32
- }): <T extends object>(target: T, propertyKey: string | symbol, descriptor: StreamMethodDescriptor<Url, QuerySchema, RequestSchema>) => StreamMethodDescriptor<Url, QuerySchema, RequestSchema>;
33
-
34
- //# sourceMappingURL=stream.decorator.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream.decorator.d.mts","sourceRoot":"","sources":["stream.decorator.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACX,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAKhD;;;;GAIG;AACH,KAAK,sBAAsB,CACzB,GAAG,SAAS,MAAM,EAClB,WAAW,EACX,aAAa,IACX,uBAAuB,CACzB,CACE,MAAM,EAAE,WAAW,SAAS,SAAS,GACjC,aAAa,SAAS,OAAO,GAC3B,oBAAoB,CAAC,GAAG,EAAE,WAAW,EAAE,aAAa,CAAC,GACrD,oBAAoB,CAAC,GAAG,EAAE,WAAW,EAAE,SAAS,CAAC,GACnD,aAAa,SAAS,OAAO,GAC3B,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,aAAa,CAAC,GACnD,oBAAoB,CAAC,GAAG,EAAE,SAAS,EAAE,SAAS,CAAC,EACrD,KAAK,EAAE,GAAG,KACP,OAAO,CAAC,IAAI,CAAC,CACnB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,MAAM,CACpB,MAAM,SAAS,UAAU,GAAG,UAAU,EACtC,GAAG,SAAS,MAAM,GAAG,MAAM,EAC3B,WAAW,GAAG,SAAS,EACvB,aAAa,GAAG,OAAO,EACvB,QAAQ,EAAE;IACV,MAAM,EAAE,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,aAAa,CAAC,CAAA;CAClE,IACkB,CAAC,SAAS,MAAM,EAC/B,QAAQ,CAAC,EACT,aAAa,MAAM,GAAG,MAAM,EAC5B,YAAY,sBAAsB,CAAC,GAAG,EAAE,WAAW,EAAE,aAAa,CAAC,6DAWtE"}
@@ -1,29 +0,0 @@
1
- import type { ClassTypeWithInstance, InjectionToken } from '@navios/di';
2
- import type { CanActivate } from '../../interfaces/index.mjs';
3
- /**
4
- * Legacy-compatible UseGuards decorator.
5
- *
6
- * Works with TypeScript experimental decorators (legacy API).
7
- * Can be applied to classes or methods.
8
- *
9
- * @param guards - Guard classes or injection tokens to apply
10
- * @returns A class or method decorator compatible with legacy decorator API
11
- *
12
- * @example
13
- * ```typescript
14
- * // Apply to a controller
15
- * @Controller()
16
- * @UseGuards(AuthGuard, RoleGuard)
17
- * export class UserController { }
18
- *
19
- * // Apply to a specific endpoint
20
- * @Controller()
21
- * export class UserController {
22
- * @Endpoint(getUserEndpoint)
23
- * @UseGuards(AuthGuard)
24
- * async getUser() { }
25
- * }
26
- * ```
27
- */
28
- export declare function UseGuards(...guards: (ClassTypeWithInstance<CanActivate> | InjectionToken<CanActivate, undefined>)[]): any;
29
- //# sourceMappingURL=use-guards.decorator.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-guards.decorator.d.mts","sourceRoot":"","sources":["use-guards.decorator.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,qBAAqB,EACrB,cAAc,EACf,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAK7D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,SAAS,CACvB,GAAG,MAAM,EAAE,CACP,qBAAqB,CAAC,WAAW,CAAC,GAClC,cAAc,CAAC,WAAW,EAAE,SAAS,CAAC,CACzC,EAAE,GAsCqB,GAAG,CAC5B"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Legacy-compatible decorators for projects that cannot use Stage 3 decorators.
3
- *
4
- * These decorators use the TypeScript experimental decorator API and convert
5
- * the arguments to Stage 3 format internally.
6
- *
7
- * @example
8
- * ```typescript
9
- * import { Module, Controller, Endpoint } from '@navios/core/legacy-compat'
10
- *
11
- * @Module({
12
- * controllers: [UserController],
13
- * })
14
- * export class AppModule {}
15
- * ```
16
- */
17
- export type { ModuleOptions, ControllerOptions, EndpointParams, EndpointResult, MultipartParams, MultipartResult, StreamParams, } from '../decorators/index.mjs';
18
- export { Module, Controller, Endpoint, UseGuards, Header, HttpCode, Multipart, Stream, } from './decorators/index.mjs';
19
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,YAAY,EACV,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,eAAe,EACf,eAAe,EACf,YAAY,GACb,MAAM,yBAAyB,CAAA;AAGhC,OAAO,EACL,MAAM,EACN,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,QAAQ,EACR,SAAS,EACT,MAAM,GACP,MAAM,wBAAwB,CAAA"}
@@ -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":"","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AA;KACnB;IAqCH,SAAS,CAAC,SAAS,CAAC,GAAG,EAAE,MAAM;IAI/B,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAShD,SAAS,CAAC,aAAa,CACrB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,UAAU,EAAE,MAAM,EAClB,iBAAiB,EAAE,MAAM,EACzB,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,EACrB,SAAS,CAAC,EAAE,MAAM;IAQpB,SAAS,CAAC,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM;IAOzC,SAAS,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,MAAM;IA0BxE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ;IAQtD,SAAS,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM;IAOvC,SAAS,CAAC,yBAAyB,IAAI,MAAM;IAS7C,SAAS,CAAC,mBAAmB,CAAC,aAAa,EAAE,MAAM;IAKnD,SAAS,CAAC,iBAAiB;IA+B3B,SAAS,CAAC,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO;IAmBvD,OAAO,CAAC,4BAA4B;IAepC,OAAO,CAAC,oCAAoC;IA+B5C,OAAO,CAAC,aAAa;IAQrB,OAAO,CAAC,kBAAkB;CAgB3B"}
@@ -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;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAGa,cAAe,YAAW,aAAa;IAClD,SAAS,CAAC,aAAa,gBAAuB;IAE9C,SAAS,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;gBAEd,MAAM,GAAE,aAAkB;IAItC;;OAEG;IACH,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAC3D,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,GAAG,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{ 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,6 +0,0 @@
1
- import type { LogLevel } from '../log-levels.mjs';
2
- /**
3
- * @publicApi
4
- */
5
- export declare function filterLogLevels(parseableString?: string): LogLevel[];
6
- //# sourceMappingURL=filter-log-levelts.util.d.mts.map
@@ -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,6 +0,0 @@
1
- export * from './cli-colors.util.mjs';
2
- export * from './filter-log-levelts.util.mjs';
3
- export * from './is-log-level.util.mjs';
4
- export * from './is-log-level-enabled.mjs';
5
- export * from './shared.utils.mjs';
6
- //# sourceMappingURL=index.d.mts.map
@@ -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,6 +0,0 @@
1
- import type { LogLevel } from '../log-levels.mjs';
2
- /**
3
- * @publicApi
4
- */
5
- export declare function isLogLevel(maybeLogLevel: any): maybeLogLevel is LogLevel;
6
- //# sourceMappingURL=is-log-level.util.d.mts.map
@@ -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"}