@navios/core 1.0.0 → 1.1.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.
- package/CHANGELOG.md +44 -0
- package/lib/{index-C0Sg16Eb.d.cts → index-3LcTrbxz.d.mts} +491 -52
- package/lib/index-3LcTrbxz.d.mts.map +1 -0
- package/lib/{index-DySQ6Dpd.d.mts → index-B14SekVb.d.cts} +491 -52
- package/lib/index-B14SekVb.d.cts.map +1 -0
- package/lib/index.cjs +18 -3
- package/lib/index.d.cts +2 -2
- package/lib/index.d.mts +2 -2
- package/lib/index.mjs +4 -4
- package/lib/legacy-compat/index.cjs +3 -3
- package/lib/legacy-compat/index.d.cts +1 -1
- package/lib/legacy-compat/index.d.mts +1 -1
- package/lib/legacy-compat/index.mjs +2 -2
- package/lib/{navios.factory-CO5MB_OK.cjs → navios.factory-CUrO_p6K.cjs} +461 -48
- package/lib/navios.factory-CUrO_p6K.cjs.map +1 -0
- package/lib/{navios.factory-D6Y94P9B.mjs → navios.factory-DjUOOVVL.mjs} +372 -49
- package/lib/navios.factory-DjUOOVVL.mjs.map +1 -0
- package/lib/testing/index.cjs +2 -2
- package/lib/testing/index.d.cts +1 -1
- package/lib/testing/index.d.mts +1 -1
- package/lib/testing/index.mjs +2 -2
- package/lib/{tokens-CWw9kyeD.cjs → tokens-BEuBMGGX.cjs} +18 -21
- package/lib/tokens-BEuBMGGX.cjs.map +1 -0
- package/lib/{tokens-4J9sredA.mjs → tokens-COyNGV1I.mjs} +17 -20
- package/lib/tokens-COyNGV1I.mjs.map +1 -0
- package/lib/{use-guards.decorator-BecoQSmE.mjs → use-guards.decorator-DLmRl2CV.mjs} +14 -17
- package/lib/use-guards.decorator-DLmRl2CV.mjs.map +1 -0
- package/lib/{use-guards.decorator-C4ml9XaT.cjs → use-guards.decorator-DhumFTk3.cjs} +15 -18
- package/lib/use-guards.decorator-DhumFTk3.cjs.map +1 -0
- package/package.json +2 -2
- package/src/interfaces/index.mts +3 -0
- package/src/interfaces/plugin-context.mts +104 -0
- package/src/interfaces/plugin-stage.mts +62 -0
- package/src/interfaces/plugin.interface.mts +42 -62
- package/src/interfaces/staged-plugin.interface.mts +209 -0
- package/src/metadata/controller.metadata.mts +29 -22
- package/src/metadata/module.metadata.mts +33 -25
- package/src/navios.application.mts +247 -53
- package/src/services/module-loader.service.mts +11 -8
- package/src/utils/define-plugin.mts +251 -0
- package/src/utils/index.mts +1 -0
- package/lib/index-C0Sg16Eb.d.cts.map +0 -1
- package/lib/index-DySQ6Dpd.d.mts.map +0 -1
- package/lib/navios.factory-CO5MB_OK.cjs.map +0 -1
- package/lib/navios.factory-D6Y94P9B.mjs.map +0 -1
- package/lib/tokens-4J9sredA.mjs.map +0 -1
- package/lib/tokens-CWw9kyeD.cjs.map +0 -1
- package/lib/use-guards.decorator-BecoQSmE.mjs.map +0 -1
- package/lib/use-guards.decorator-C4ml9XaT.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,50 @@ 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.1.0] - 2026-01-15
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **Staged Plugin System**: New comprehensive plugin lifecycle with 10 stages for fine-grained control over application initialization
|
|
13
|
+
- `pre:modules-traverse` - Before module tree traversal (container only)
|
|
14
|
+
- `post:modules-traverse` - After module tree traversal (modules available)
|
|
15
|
+
- `pre:adapter-resolve` - Before adapter is resolved from container (ideal for DI modifications)
|
|
16
|
+
- `post:adapter-resolve` - After adapter is resolved
|
|
17
|
+
- `pre:adapter-setup` - Before adapter setup
|
|
18
|
+
- `post:adapter-setup` - After adapter setup
|
|
19
|
+
- `pre:modules-init` - Before route registration
|
|
20
|
+
- `post:modules-init` - After route registration (legacy plugin default)
|
|
21
|
+
- `pre:ready` - Before adapter signals ready
|
|
22
|
+
- `post:ready` - After adapter signals ready (app fully initialized)
|
|
23
|
+
- **Stage-Specific Context Types**: Each stage provides appropriate context
|
|
24
|
+
- `ContainerOnlyContext` - Container access only (early stages)
|
|
25
|
+
- `ModulesLoadedContext` - Container + modules + moduleLoader (pre-adapter stages)
|
|
26
|
+
- `FullPluginContext<TAdapter>` - Full context with typed adapter (post-adapter stages)
|
|
27
|
+
- **Plugin Factory Functions**: Convenient factory functions for creating staged plugins
|
|
28
|
+
- `definePreModulesTraversePlugin()` - Create pre:modules-traverse plugins
|
|
29
|
+
- `definePostModulesTraversePlugin()` - Create post:modules-traverse plugins
|
|
30
|
+
- `definePreAdapterResolvePlugin()` - Create pre:adapter-resolve plugins (ideal for instrumentation)
|
|
31
|
+
- `definePostAdapterResolvePlugin<TAdapter>()()` - Create post:adapter-resolve plugins
|
|
32
|
+
- `definePreAdapterSetupPlugin<TAdapter>()()` - Create pre:adapter-setup plugins
|
|
33
|
+
- `definePostAdapterSetupPlugin<TAdapter>()()` - Create post:adapter-setup plugins
|
|
34
|
+
- `definePreModulesInitPlugin<TAdapter>()()` - Create pre:modules-init plugins
|
|
35
|
+
- `definePostModulesInitPlugin<TAdapter>()()` - Create post:modules-init plugins
|
|
36
|
+
- `definePreReadyPlugin<TAdapter>()()` - Create pre:ready plugins
|
|
37
|
+
- `definePostReadyPlugin<TAdapter>()()` - Create post:ready plugins
|
|
38
|
+
- **Plugin Stage Constants**: `PluginStages` object with all stage names as constants
|
|
39
|
+
- **Stage Order Array**: `PLUGIN_STAGES_ORDER` array defining execution order
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- **Legacy Plugin Deprecation**: `NaviosPlugin` interface now deprecated in favor of staged plugins
|
|
44
|
+
- Legacy plugins automatically map to `post:modules-init` stage
|
|
45
|
+
- `PluginDefinition` type deprecated in favor of `StagedPluginDefinition`
|
|
46
|
+
- **Plugin Context Types**: `PluginContext` type deprecated, use stage-specific context types instead
|
|
47
|
+
|
|
48
|
+
### Dependencies
|
|
49
|
+
|
|
50
|
+
- Updated internal plugin execution to support staged lifecycle
|
|
51
|
+
|
|
8
52
|
## [1.0.0] - 2026-01-09
|
|
9
53
|
|
|
10
54
|
### Added
|