@navios/core 1.0.0-alpha.2 → 1.0.0-alpha.3

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 (53) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/lib/{index-BJjk2X1S.d.mts → index-BISYCYEG.d.mts} +435 -180
  3. package/lib/index-BISYCYEG.d.mts.map +1 -0
  4. package/lib/{index-DZ6NU03y.d.cts → index-CP80H6Dh.d.cts} +435 -180
  5. package/lib/index-CP80H6Dh.d.cts.map +1 -0
  6. package/lib/index.cjs +3 -2
  7. package/lib/index.d.cts +2 -2
  8. package/lib/index.d.mts +2 -2
  9. package/lib/index.mjs +2 -2
  10. package/lib/legacy-compat/index.cjs +38 -124
  11. package/lib/legacy-compat/index.cjs.map +1 -1
  12. package/lib/legacy-compat/index.d.cts +4 -60
  13. package/lib/legacy-compat/index.d.cts.map +1 -1
  14. package/lib/legacy-compat/index.d.mts +4 -60
  15. package/lib/legacy-compat/index.d.mts.map +1 -1
  16. package/lib/legacy-compat/index.mjs +12 -118
  17. package/lib/legacy-compat/index.mjs.map +1 -1
  18. package/lib/{src-C46ePe3d.cjs → src-CC5lmk_Q.cjs} +167 -2
  19. package/lib/src-CC5lmk_Q.cjs.map +1 -0
  20. package/lib/{src-K2k0riYJ.mjs → src-j1cBuAgy.mjs} +162 -3
  21. package/lib/src-j1cBuAgy.mjs.map +1 -0
  22. package/lib/testing/index.cjs +2 -2
  23. package/lib/testing/index.d.cts +1 -1
  24. package/lib/testing/index.d.mts +1 -1
  25. package/lib/testing/index.mjs +1 -1
  26. package/lib/{use-guards.decorator-B6tghdxM.cjs → use-guards.decorator-DtCGXcWZ.cjs} +2 -2
  27. package/lib/{use-guards.decorator-B6tghdxM.cjs.map → use-guards.decorator-DtCGXcWZ.cjs.map} +1 -1
  28. package/package.json +2 -2
  29. package/src/__tests__/attribute.factory.spec.mts +300 -0
  30. package/src/__tests__/guard-runner.service.spec.mts +399 -0
  31. package/src/__tests__/logger.service.spec.mts +147 -0
  32. package/src/__tests__/responders.spec.mts +6 -5
  33. package/src/interfaces/abstract-http-handler-adapter.interface.mts +86 -2
  34. package/src/legacy-compat/attribute.factory.mts +2 -2
  35. package/src/legacy-compat/decorators/controller.decorator.mts +1 -1
  36. package/src/legacy-compat/decorators/endpoint.decorator.mts +1 -1
  37. package/src/legacy-compat/decorators/header.decorator.mts +2 -1
  38. package/src/legacy-compat/decorators/http-code.decorator.mts +2 -1
  39. package/src/legacy-compat/decorators/index.mts +2 -2
  40. package/src/legacy-compat/decorators/module.decorator.mts +1 -1
  41. package/src/legacy-compat/decorators/multipart.decorator.mts +1 -1
  42. package/src/legacy-compat/decorators/stream.decorator.mts +1 -1
  43. package/src/legacy-compat/decorators/use-guards.decorator.mts +1 -1
  44. package/src/legacy-compat/index.mts +10 -5
  45. package/src/services/abstract-handler-adapter.service.mts +366 -0
  46. package/src/services/index.mts +1 -0
  47. package/lib/index-BJjk2X1S.d.mts.map +0 -1
  48. package/lib/index-DZ6NU03y.d.cts.map +0 -1
  49. package/lib/src-C46ePe3d.cjs.map +0 -1
  50. package/lib/src-K2k0riYJ.mjs.map +0 -1
  51. package/src/legacy-compat/context-compat.mts +0 -95
  52. package/src/legacy-compat/decorators/factory.decorator.mts +0 -37
  53. package/src/legacy-compat/decorators/injectable.decorator.mts +0 -41
package/CHANGELOG.md CHANGED
@@ -5,6 +5,42 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.0-alpha.3] - 2026-01-08
9
+
10
+ ### Added
11
+
12
+ - **Abstract Handler Adapter Base Class**: New `AbstractHandlerAdapterService` base class for HTTP handler adapters
13
+ - Provides shared logic for controller resolution (singleton vs request-scoped)
14
+ - Automatic sync/async detection for argument formatting
15
+ - Standardized handler generation with static/dynamic branching
16
+ - Supports all adapter types: endpoint, stream, and multipart
17
+ - **New Handler Adapter Types**: Exported types for adapter implementations
18
+ - `ArgumentGetterFn<TRequest>` - Function type for extracting data from requests
19
+ - `FormatArgumentsFn<TRequest>` - Function type for formatting arguments
20
+ - `AbstractStaticHandler<TRequest, TReply>` - Static handler type for singleton controllers
21
+ - `AbstractDynamicHandler<TRequest, TReply>` - Dynamic handler type for request-scoped controllers
22
+ - `AbstractHandlerResult<TRequest, TReply>` - Union type for handler results
23
+ - `HandlerContext<TConfig>` - Context passed to handler creation methods
24
+ - **Enhanced Handler Adapter Interface**: Extended `AbstractHttpHandlerAdapterInterface` with new optional methods
25
+ - `buildFormatArguments()` - Builds optimized formatArguments function from getters
26
+ - `hasSchema()` - Checks if handler has validation schemas
27
+ - `provideSchema()` - Provides schema information for framework registration
28
+
29
+ ### Changed
30
+
31
+ - **Legacy-Compat DI Re-exports**: `Injectable`, `Factory`, `createClassContext`, and `createMethodContext` are now re-exported from `@navios/di/legacy-compat` instead of being defined locally
32
+ - Removes code duplication between core and di packages
33
+ - Ensures consistent behavior across the framework
34
+
35
+ ### Removed
36
+
37
+ - **Local DI Decorators**: Removed local `Injectable` and `Factory` decorator implementations from legacy-compat (now imported from `@navios/di/legacy-compat`)
38
+ - **Context Compat Module**: Removed `context-compat.mts` module (functionality moved to `@navios/di`)
39
+
40
+ ### Dependencies
41
+
42
+ - Updated to support `@navios/di` with legacy-compat exports
43
+
8
44
  ## [1.0.0-alpha.2] - 2026-01-07
9
45
 
10
46
  ### Added