@navios/commander 1.4.0 → 1.5.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/.turbo/turbo-build.log +49 -0
- package/.turbo/turbo-check.log +2 -0
- package/.turbo/turbo-lint.log +3 -0
- package/.turbo/turbo-test$colon$ci.log +117 -0
- package/CHANGELOG.md +9 -3
- package/README.md +8 -16
- package/dist/src/commander.factory.d.mts +126 -122
- package/dist/src/commander.factory.d.mts.map +1 -1
- package/dist/src/commands/help.command.d.mts +15 -11
- package/dist/src/commands/help.command.d.mts.map +1 -1
- package/dist/src/commands/index.d.mts +2 -2
- package/dist/src/decorators/cli-module.decorator.d.mts +51 -40
- package/dist/src/decorators/cli-module.decorator.d.mts.map +1 -1
- package/dist/src/decorators/command.decorator.d.mts +49 -37
- package/dist/src/decorators/command.decorator.d.mts.map +1 -1
- package/dist/src/decorators/index.d.mts +3 -3
- package/dist/src/define-environment.d.mts +9 -8
- package/dist/src/define-environment.d.mts.map +1 -1
- package/dist/src/index.d.mts +10 -10
- package/dist/src/interfaces/abstract-cli-adapter.interface.d.mts +45 -45
- package/dist/src/interfaces/command-handler.interface.d.mts +9 -9
- package/dist/src/interfaces/commander-execution-context.interface.d.mts +30 -30
- package/dist/src/interfaces/commander-execution-context.interface.d.mts.map +1 -1
- package/dist/src/interfaces/environment.interface.d.mts +7 -7
- package/dist/src/interfaces/index.d.mts +5 -5
- package/dist/src/legacy-compat/decorators/cli-module.decorator.d.mts +6 -5
- package/dist/src/legacy-compat/decorators/cli-module.decorator.d.mts.map +1 -1
- package/dist/src/legacy-compat/decorators/command.decorator.d.mts +7 -6
- package/dist/src/legacy-compat/decorators/command.decorator.d.mts.map +1 -1
- package/dist/src/legacy-compat/decorators/index.d.mts +3 -3
- package/dist/src/legacy-compat/index.d.mts +3 -3
- package/dist/src/metadata/command-entry.metadata.d.mts +5 -5
- package/dist/src/metadata/command-entry.metadata.d.mts.map +1 -1
- package/dist/src/metadata/command.metadata.d.mts +30 -24
- package/dist/src/metadata/command.metadata.d.mts.map +1 -1
- package/dist/src/metadata/index.d.mts +3 -3
- package/dist/src/overrides/help.command.d.mts +15 -11
- package/dist/src/overrides/help.command.d.mts.map +1 -1
- package/dist/src/services/cli-parser.service.d.mts +54 -54
- package/dist/src/services/cli-parser.service.d.mts.map +1 -1
- package/dist/src/services/command-registry.service.d.mts +75 -74
- package/dist/src/services/command-registry.service.d.mts.map +1 -1
- package/dist/src/services/commander-adapter.service.d.mts +49 -48
- package/dist/src/services/commander-adapter.service.d.mts.map +1 -1
- package/dist/src/services/index.d.mts +4 -4
- package/dist/src/tokens/execution-context.token.d.mts +9 -4
- package/dist/src/tokens/execution-context.token.d.mts.map +1 -1
- package/dist/src/tokens/help-command.token.d.mts +5 -4
- package/dist/src/tokens/index.d.mts +2 -2
- package/dist/src/utils/index.d.mts +2 -2
- package/dist/src/utils/runtime.d.mts +2 -2
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/tsdown.config.d.mts +3 -3
- package/dist/vitest.config.d.mts +3 -3
- package/lib/{cli-module.decorator-DVl8009Q.d.cts → cli-module.decorator-BzsOEMPH.d.cts} +8 -8
- package/lib/cli-module.decorator-BzsOEMPH.d.cts.map +1 -0
- package/lib/{cli-module.decorator-DGuGfpex.d.mts → cli-module.decorator-CCV_elPP.d.mts} +13 -13
- package/lib/cli-module.decorator-CCV_elPP.d.mts.map +1 -0
- package/lib/{cli-module.decorator-CkP22084.cjs → cli-module.decorator-CXt38aqF.cjs} +2 -2
- package/lib/cli-module.decorator-CXt38aqF.cjs.map +1 -0
- package/lib/{cli-module.decorator-UGbtkRYc.mjs → cli-module.decorator-DAjf_r_W.mjs} +2 -2
- package/lib/cli-module.decorator-DAjf_r_W.mjs.map +1 -0
- package/lib/{command.decorator-UrNJmQN0.cjs → command.decorator-HziankUv.cjs} +3 -3
- package/lib/command.decorator-HziankUv.cjs.map +1 -0
- package/lib/{command.decorator-DVLSAqYZ.mjs → command.decorator-QiRU7ny3.mjs} +3 -3
- package/lib/command.decorator-QiRU7ny3.mjs.map +1 -0
- package/lib/{help-command.token-CMWYI6em.cjs → help-command.token-DamE31Aw.cjs} +4 -4
- package/lib/{help-command.token-CMWYI6em.cjs.map → help-command.token-DamE31Aw.cjs.map} +1 -1
- package/lib/{help-command.token-C0Kgj60o.mjs → help-command.token-XHx3WkoD.mjs} +4 -4
- package/lib/{help-command.token-C0Kgj60o.mjs.map → help-command.token-XHx3WkoD.mjs.map} +1 -1
- package/lib/{help.command-dtZbhq0w.mjs → help.command-Bynoll_7.mjs} +5 -8
- package/lib/help.command-Bynoll_7.mjs.map +1 -0
- package/lib/{help.command-DQyv6ali.cjs → help.command-DvKmMpB7.cjs} +6 -9
- package/lib/help.command-DvKmMpB7.cjs.map +1 -0
- package/lib/index.cjs +103 -103
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +95 -95
- package/lib/index.d.cts.map +1 -1
- package/lib/index.d.mts +90 -90
- package/lib/index.d.mts.map +1 -1
- package/lib/index.mjs +102 -102
- package/lib/index.mjs.map +1 -1
- package/lib/legacy-compat/index.cjs +6 -28
- package/lib/legacy-compat/index.cjs.map +1 -1
- package/lib/legacy-compat/index.d.cts +2 -2
- package/lib/legacy-compat/index.d.cts.map +1 -1
- package/lib/legacy-compat/index.d.mts +2 -2
- package/lib/legacy-compat/index.d.mts.map +1 -1
- package/lib/legacy-compat/index.mjs +4 -25
- package/lib/legacy-compat/index.mjs.map +1 -1
- package/package.json +26 -16
- package/src/__tests__/commander.factory.e2e.spec.mts +22 -66
- package/src/commander.factory.mts +3 -1
- package/src/commands/help.command.mts +1 -1
- package/src/decorators/cli-module.decorator.mts +4 -9
- package/src/decorators/command.decorator.mts +4 -4
- package/src/define-environment.mts +4 -4
- package/src/interfaces/command-handler.interface.mts +1 -1
- package/src/interfaces/commander-execution-context.interface.mts +1 -1
- package/src/legacy-compat/decorators/cli-module.decorator.mts +2 -1
- package/src/legacy-compat/decorators/command.decorator.mts +3 -2
- package/src/metadata/command-entry.metadata.mts +3 -6
- package/src/metadata/command.metadata.mts +6 -8
- package/src/overrides/help.command.mts +2 -2
- package/src/services/__tests__/cli-parser.service.spec.mts +23 -178
- package/src/services/cli-parser.service.mts +23 -27
- package/src/services/command-registry.service.mts +5 -5
- package/src/services/commander-adapter.service.mts +10 -27
- package/src/tokens/execution-context.token.mts +4 -6
- package/tsconfig.json +3 -0
- package/lib/cli-module.decorator-CkP22084.cjs.map +0 -1
- package/lib/cli-module.decorator-DGuGfpex.d.mts.map +0 -1
- package/lib/cli-module.decorator-DVl8009Q.d.cts.map +0 -1
- package/lib/cli-module.decorator-UGbtkRYc.mjs.map +0 -1
- package/lib/command.decorator-DVLSAqYZ.mjs.map +0 -1
- package/lib/command.decorator-UrNJmQN0.cjs.map +0 -1
- package/lib/help.command-DQyv6ali.cjs.map +0 -1
- package/lib/help.command-dtZbhq0w.mjs.map +0 -1
- package/project.json +0 -66
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
[34mℹ[39m tsdown [2mv0.19.0[22m powered by rolldown [2mv1.0.0-beta.59[22m
|
|
3
|
+
[34mℹ[39m config file: [4m/Volumes/Dev/Projects/navios/commander/packages/commander/tsdown.config.mts[24m
|
|
4
|
+
[34mℹ[39m entry: [34msrc/index.mts, src/legacy-compat/index.mts[39m
|
|
5
|
+
[34mℹ[39m target: [34mes2022[39m
|
|
6
|
+
[34mℹ[39m tsconfig: [34mtsconfig.json[39m
|
|
7
|
+
[34mℹ[39m Build start
|
|
8
|
+
[34mℹ[39m Cleaning 37 files
|
|
9
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mindex.d.cts.map [2m29.35 kB[22m [2m│ gzip: 8.31 kB[22m
|
|
10
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mcli-module.decorator-BzsOEMPH.d.cts.map [2m 8.31 kB[22m [2m│ gzip: 2.71 kB[22m
|
|
11
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mlegacy-compat/index.d.cts.map [2m 2.42 kB[22m [2m│ gzip: 0.82 kB[22m
|
|
12
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22m[32m[1mindex.d.cts[22m[39m [2m20.64 kB[22m [2m│ gzip: 5.38 kB[22m
|
|
13
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22m[32m[1mlegacy-compat/index.d.cts[22m[39m [2m 1.94 kB[22m [2m│ gzip: 0.70 kB[22m
|
|
14
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22m[32mcli-module.decorator-BzsOEMPH.d.cts[39m [2m 6.28 kB[22m [2m│ gzip: 1.96 kB[22m
|
|
15
|
+
[34mℹ[39m [33m[CJS][39m 6 files, total: 68.94 kB
|
|
16
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22m[1mindex.cjs[22m [2m48.62 kB[22m [2m│ gzip: 7.97 kB[22m
|
|
17
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22m[1mlegacy-compat/index.cjs[22m [2m 2.53 kB[22m [2m│ gzip: 0.90 kB[22m
|
|
18
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mindex.cjs.map [2m43.31 kB[22m [2m│ gzip: 11.63 kB[22m
|
|
19
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mhelp-command.token-DamE31Aw.cjs [2m14.04 kB[22m [2m│ gzip: 3.87 kB[22m
|
|
20
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mhelp.command-DvKmMpB7.cjs [2m10.48 kB[22m [2m│ gzip: 2.87 kB[22m
|
|
21
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mhelp-command.token-DamE31Aw.cjs.map [2m 9.64 kB[22m [2m│ gzip: 3.30 kB[22m
|
|
22
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mcommand.decorator-HziankUv.cjs.map [2m 9.07 kB[22m [2m│ gzip: 2.85 kB[22m
|
|
23
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mcommand.decorator-HziankUv.cjs [2m 5.12 kB[22m [2m│ gzip: 1.57 kB[22m
|
|
24
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mcli-module.decorator-CXt38aqF.cjs.map [2m 4.77 kB[22m [2m│ gzip: 1.78 kB[22m
|
|
25
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mlegacy-compat/index.cjs.map [2m 3.39 kB[22m [2m│ gzip: 1.04 kB[22m
|
|
26
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mhelp.command-DvKmMpB7.cjs.map [2m 2.50 kB[22m [2m│ gzip: 0.98 kB[22m
|
|
27
|
+
[34mℹ[39m [33m[CJS][39m [2mlib/[22mcli-module.decorator-CXt38aqF.cjs [2m 2.12 kB[22m [2m│ gzip: 0.96 kB[22m
|
|
28
|
+
[34mℹ[39m [33m[CJS][39m 12 files, total: 155.59 kB
|
|
29
|
+
[32m✔[39m Build complete in [32m524ms[39m
|
|
30
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22m[1mindex.mjs[22m [2m47.19 kB[22m [2m│ gzip: 7.82 kB[22m
|
|
31
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22m[1mlegacy-compat/index.mjs[22m [2m 2.13 kB[22m [2m│ gzip: 0.75 kB[22m
|
|
32
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mindex.mjs.map [2m43.35 kB[22m [2m│ gzip: 11.61 kB[22m
|
|
33
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mindex.d.mts.map [2m21.06 kB[22m [2m│ gzip: 6.49 kB[22m
|
|
34
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mcli-module.decorator-CCV_elPP.d.mts.map [2m16.74 kB[22m [2m│ gzip: 4.96 kB[22m
|
|
35
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mhelp-command.token-XHx3WkoD.mjs [2m13.81 kB[22m [2m│ gzip: 3.83 kB[22m
|
|
36
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mhelp.command-Bynoll_7.mjs [2m10.34 kB[22m [2m│ gzip: 2.85 kB[22m
|
|
37
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mhelp-command.token-XHx3WkoD.mjs.map [2m 9.64 kB[22m [2m│ gzip: 3.29 kB[22m
|
|
38
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mcommand.decorator-QiRU7ny3.mjs.map [2m 9.08 kB[22m [2m│ gzip: 2.85 kB[22m
|
|
39
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mcli-module.decorator-DAjf_r_W.mjs.map [2m 4.79 kB[22m [2m│ gzip: 1.78 kB[22m
|
|
40
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mcommand.decorator-QiRU7ny3.mjs [2m 4.36 kB[22m [2m│ gzip: 1.49 kB[22m
|
|
41
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mlegacy-compat/index.mjs.map [2m 3.40 kB[22m [2m│ gzip: 1.05 kB[22m
|
|
42
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mhelp.command-Bynoll_7.mjs.map [2m 2.51 kB[22m [2m│ gzip: 0.97 kB[22m
|
|
43
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mlegacy-compat/index.d.mts.map [2m 2.42 kB[22m [2m│ gzip: 0.82 kB[22m
|
|
44
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22mcli-module.decorator-DAjf_r_W.mjs [2m 1.98 kB[22m [2m│ gzip: 0.89 kB[22m
|
|
45
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22m[32m[1mindex.d.mts[22m[39m [2m15.31 kB[22m [2m│ gzip: 4.45 kB[22m
|
|
46
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22m[32m[1mlegacy-compat/index.d.mts[22m[39m [2m 1.94 kB[22m [2m│ gzip: 0.70 kB[22m
|
|
47
|
+
[34mℹ[39m [34m[ESM][39m [2mlib/[22m[32mcli-module.decorator-CCV_elPP.d.mts[39m [2m12.09 kB[22m [2m│ gzip: 3.35 kB[22m
|
|
48
|
+
[34mℹ[39m [34m[ESM][39m 18 files, total: 222.13 kB
|
|
49
|
+
[32m✔[39m Build complete in [32m533ms[39m
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
|
|
2
|
+
[?25l[33mTesting types with tsc and vue-tsc is an experimental feature.
|
|
3
|
+
Breaking changes might not follow SemVer, please pin Vitest's version when using it.[39m
|
|
4
|
+
|
|
5
|
+
[1m[46m RUN [49m[22m [36mv4.0.17 [39m[90m/Volumes/Dev/Projects/navios/commander/packages/commander[39m
|
|
6
|
+
|
|
7
|
+
[?2026h
|
|
8
|
+
[1m[33m ❯ [39m[22msrc/services/__tests__/cli-parser.service.spec.mts[2m [queued][22m
|
|
9
|
+
|
|
10
|
+
[2m Test Files [22m[1m[32m0 passed[39m[22m[90m (2)[39m
|
|
11
|
+
[2m Tests [22m[1m[32m0 passed[39m[22m[90m (0)[39m
|
|
12
|
+
[2m Start at [22m03:26:05
|
|
13
|
+
[2m Duration [22m0ms
|
|
14
|
+
[?2026l[?2026h[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K [32m✓[39m src/services/__tests__/cli-parser.service.spec.mts [2m([22m[2m40 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
15
|
+
|
|
16
|
+
[1m[33m ❯ [39m[22msrc/__tests__/commander.factory.e2e.spec.mts[2m 0/36[22m
|
|
17
|
+
|
|
18
|
+
[2m Test Files [22m[1m[32m1 passed[39m[22m[90m (2)[39m
|
|
19
|
+
[2m Tests [22m[1m[32m40 passed[39m[22m[90m (76)[39m
|
|
20
|
+
[2m Start at [22m03:26:05
|
|
21
|
+
[2m Duration [22m100ms
|
|
22
|
+
[?2026l[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
23
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
24
|
+
[90mstdout[2m | src/__tests__/commander.factory.e2e.spec.mts[2m > [22m[2mCommanderApplication E2E - run() with different argv[2m > [22m[2msimple command without options[2m > [22m[2mshould execute command with minimal argv
|
|
25
|
+
[22m[39mHello, World!
|
|
26
|
+
|
|
27
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
28
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
29
|
+
[90mstdout[2m | src/__tests__/commander.factory.e2e.spec.mts[2m > [22m[2mCommanderApplication E2E - run() with different argv[2m > [22m[2msimple command without options[2m > [22m[2mshould execute command with absolute path in argv
|
|
30
|
+
[22m[39mHello, World!
|
|
31
|
+
|
|
32
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
33
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
34
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
35
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
36
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule DeployModule_clcbp1 loaded[39m
|
|
37
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
38
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule BuildModule_fdlhzv loaded[39m
|
|
39
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
40
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
41
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
42
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
43
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
44
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
45
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
46
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
47
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
48
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
49
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
50
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
51
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
52
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
53
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
54
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
55
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
56
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
57
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
58
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
59
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
60
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
61
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
62
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule RollbackModule_bva5p1 loaded[39m
|
|
63
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
64
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
65
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
66
|
+
[31m[39m [31m ERROR[39m [38;5;3m[Commander] [39m [31mError: [Navios Commander] Command not found: invalid[39m
|
|
67
|
+
[32m[39m [32m LOG[39m [38;5;3m[Commander] [39m [32m[39m
|
|
68
|
+
[32m[39m [32m LOG[39m [38;5;3m[Commander] [39m [32mAvailable commands:
|
|
69
|
+
|
|
70
|
+
help Show available commands or help for a specific command
|
|
71
|
+
valid[39m
|
|
72
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
73
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
74
|
+
[31m[39m [31m ERROR[39m [38;5;3m[Commander] [39m [31mError: [Navios Commander] No command provided[39m
|
|
75
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
76
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
77
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
78
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
79
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
80
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
81
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
82
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
83
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
84
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
85
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
86
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
87
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
88
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
89
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule JsonModule_5wfcr9 loaded[39m
|
|
90
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
91
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
92
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
93
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
94
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
95
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
96
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
97
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule TestModule_dy4bqj loaded[39m
|
|
98
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
99
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule UserModule_sf0k39 loaded[39m
|
|
100
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule AdminModule_v7hlb7 loaded[39m
|
|
101
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule AppModule_fuvatb loaded[39m
|
|
102
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
103
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule AppModule_fuvatb loaded[39m
|
|
104
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
105
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule AppModule_fuvatb loaded[39m
|
|
106
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
107
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[ModuleLoaderService] [39m [95mModule AppModule_fuvatb loaded[39m
|
|
108
|
+
[95m[39m [95m DEBUG[39m [38;5;3m[NaviosApplication] [39m [95mNavios application initialized[39m
|
|
109
|
+
[32m✓[39m src/__tests__/commander.factory.e2e.spec.mts [2m([22m[2m36 tests[22m[2m)[22m[32m 21[2mms[22m[39m
|
|
110
|
+
|
|
111
|
+
[2m Test Files [22m [1m[32m2 passed[39m[22m[90m (2)[39m
|
|
112
|
+
[2m Tests [22m [1m[32m76 passed[39m[22m[90m (76)[39m
|
|
113
|
+
[2mType Errors [22m [2mno errors[22m
|
|
114
|
+
[2m Start at [22m 03:26:05
|
|
115
|
+
[2m Duration [22m 199ms[2m (transform 98ms, setup 0ms, import 190ms, tests 28ms, environment 0ms)[22m
|
|
116
|
+
|
|
117
|
+
[?25h
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ 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.5.0] - 2026-01-16
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Commander Factory** - Minor improvements to adapter loading
|
|
13
|
+
|
|
8
14
|
## [1.4.0] - 2026-01-15
|
|
9
15
|
|
|
10
16
|
### Added
|
|
@@ -71,7 +77,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
71
77
|
|
|
72
78
|
- **Stable Release**: First stable release of @navios/commander
|
|
73
79
|
- Production-ready CLI command framework for Navios
|
|
74
|
-
- Type-safe command definitions with
|
|
80
|
+
- Type-safe command definitions with zod/v4 validation
|
|
75
81
|
- Seamless integration with Navios dependency injection
|
|
76
82
|
|
|
77
83
|
## [1.0.0-alpha.4] - 2026-01-09
|
|
@@ -88,8 +94,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
88
94
|
- Descriptions displayed in `--help` output
|
|
89
95
|
- **Built-in Help Command**: Automatic `help` command with `--help` flag support
|
|
90
96
|
- Shows all available commands with descriptions
|
|
91
|
-
- Per-command help with option details from
|
|
92
|
-
- Supports `.meta({ description: '...' })` on
|
|
97
|
+
- Per-command help with option details from zod/v4 schema metadata
|
|
98
|
+
- Supports `.meta({ description: '...' })` on zod/v4 fields for option descriptions
|
|
93
99
|
- **Command Registry Service**: New `CommandRegistryService` for managing registered commands
|
|
94
100
|
- Replaces module-level command tracking
|
|
95
101
|
- Provides `register()`, `getByPath()`, `getAllAsArray()`, and `clear()` methods
|
package/README.md
CHANGED
|
@@ -5,16 +5,16 @@ A CLI command framework built on `@navios/core` that provides a decorator-based
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @navios/commander zod
|
|
8
|
+
npm install @navios/commander zod/v4
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
13
|
- **Decorator-based**: Use `@Command` and `@CliModule` decorators to define commands and modules
|
|
14
14
|
- **Dependency Injection**: Full DI support via `@navios/core` with request-scoped command execution
|
|
15
|
-
- **Schema Validation**: Built-in support for
|
|
15
|
+
- **Schema Validation**: Built-in support for zod/v4 schemas to validate command options
|
|
16
16
|
- **Modular Architecture**: Organize commands into modules with imports support
|
|
17
|
-
- **Built-in Help**: Automatic `help` command and `--help` flag support with
|
|
17
|
+
- **Built-in Help**: Automatic `help` command and `--help` flag support with zod/v4 meta descriptions
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
@@ -25,7 +25,7 @@ Commands are defined using the `@Command` decorator. Each command must implement
|
|
|
25
25
|
```typescript
|
|
26
26
|
import { Command, CommandHandler } from '@navios/commander'
|
|
27
27
|
|
|
28
|
-
import { z } from 'zod'
|
|
28
|
+
import { z } from 'zod/v4'
|
|
29
29
|
|
|
30
30
|
const greetOptionsSchema = z.object({
|
|
31
31
|
name: z.string().meta({ description: 'Name of the person to greet' }),
|
|
@@ -95,15 +95,9 @@ node dist/cli.js greet --name World --greeting Hi
|
|
|
95
95
|
### Advanced Example with Dependency Injection
|
|
96
96
|
|
|
97
97
|
```typescript
|
|
98
|
-
import {
|
|
99
|
-
CliModule,
|
|
100
|
-
Command,
|
|
101
|
-
CommandHandler,
|
|
102
|
-
inject,
|
|
103
|
-
Injectable,
|
|
104
|
-
} from '@navios/commander'
|
|
98
|
+
import { CliModule, Command, CommandHandler, inject, Injectable } from '@navios/commander'
|
|
105
99
|
|
|
106
|
-
import { z } from 'zod'
|
|
100
|
+
import { z } from 'zod/v4'
|
|
107
101
|
|
|
108
102
|
// Service
|
|
109
103
|
@Injectable()
|
|
@@ -122,9 +116,7 @@ const userOptionsSchema = z.object({
|
|
|
122
116
|
path: 'user:show',
|
|
123
117
|
optionsSchema: userOptionsSchema,
|
|
124
118
|
})
|
|
125
|
-
export class ShowUserCommand implements CommandHandler<
|
|
126
|
-
z.infer<typeof userOptionsSchema>
|
|
127
|
-
> {
|
|
119
|
+
export class ShowUserCommand implements CommandHandler<z.infer<typeof userOptionsSchema>> {
|
|
128
120
|
private userService = inject(UserService)
|
|
129
121
|
|
|
130
122
|
async execute(options: { userId: string }) {
|
|
@@ -247,7 +239,7 @@ Defines a CLI command.
|
|
|
247
239
|
|
|
248
240
|
- `path: string` - The command path (e.g., 'user:create', 'db:migrate')
|
|
249
241
|
- `description?: string` - Optional description for help text
|
|
250
|
-
- `optionsSchema?:
|
|
242
|
+
- `optionsSchema?: zod/v4Schema` - Optional zod/v4 schema for validating command options
|
|
251
243
|
|
|
252
244
|
#### `@CliModule(options)`
|
|
253
245
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { ClassTypeWithInstance, LogLevel, NaviosApplication, NaviosModule } from '@navios/core'
|
|
2
|
-
|
|
1
|
+
import type { ClassTypeWithInstance, LogLevel, NaviosApplication, NaviosModule } from '@navios/core'
|
|
2
|
+
|
|
3
|
+
import type { CliEnvironment } from './interfaces/environment.interface.mjs'
|
|
3
4
|
/**
|
|
4
5
|
* Logger display options for CLI applications.
|
|
5
6
|
* All options default to false for cleaner CLI output.
|
|
@@ -7,41 +8,41 @@ import type { CliEnvironment } from './interfaces/environment.interface.mjs';
|
|
|
7
8
|
* @public
|
|
8
9
|
*/
|
|
9
10
|
export interface CommanderLoggerOptions {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Enabled log levels.
|
|
13
|
+
* @default ['log', 'error', 'warn', 'debug', 'verbose', 'fatal']
|
|
14
|
+
*/
|
|
15
|
+
logLevels?: LogLevel[]
|
|
16
|
+
/**
|
|
17
|
+
* If true, will print the process ID in the log message.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
showPid?: boolean
|
|
21
|
+
/**
|
|
22
|
+
* If true, will print the log level in the log message.
|
|
23
|
+
* @default true
|
|
24
|
+
*/
|
|
25
|
+
showLogLevel?: boolean
|
|
26
|
+
/**
|
|
27
|
+
* If true, will print the prefix/app name in the log message.
|
|
28
|
+
* @default false
|
|
29
|
+
*/
|
|
30
|
+
showPrefix?: boolean
|
|
31
|
+
/**
|
|
32
|
+
* If true, will print the context in the log message.
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
showContext?: boolean
|
|
36
|
+
/**
|
|
37
|
+
* If true, will print the absolute timestamp in the log message.
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
showTimestamp?: boolean
|
|
41
|
+
/**
|
|
42
|
+
* If enabled, will print timestamp difference between current and previous log message.
|
|
43
|
+
* @default false
|
|
44
|
+
*/
|
|
45
|
+
showTimeDiff?: boolean
|
|
45
46
|
}
|
|
46
47
|
/**
|
|
47
48
|
* TUI-specific options for terminal UI mode.
|
|
@@ -50,54 +51,54 @@ export interface CommanderLoggerOptions {
|
|
|
50
51
|
* @public
|
|
51
52
|
*/
|
|
52
53
|
export interface CommanderTuiOptions {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
54
|
+
/**
|
|
55
|
+
* Exit on Ctrl+C.
|
|
56
|
+
* @default true
|
|
57
|
+
*/
|
|
58
|
+
exitOnCtrlC?: boolean
|
|
59
|
+
/**
|
|
60
|
+
* Adapter to use for the TUI.
|
|
61
|
+
* @default 'none'
|
|
62
|
+
*/
|
|
63
|
+
adapter?: 'react' | 'solid' | 'ink' | 'none'
|
|
64
|
+
/**
|
|
65
|
+
* Sidebar width in columns.
|
|
66
|
+
*/
|
|
67
|
+
sidebarWidth?: number
|
|
68
|
+
/**
|
|
69
|
+
* Sidebar position.
|
|
70
|
+
*/
|
|
71
|
+
sidebarPosition?: 'left' | 'right'
|
|
72
|
+
/**
|
|
73
|
+
* Sidebar header title.
|
|
74
|
+
*/
|
|
75
|
+
sidebarTitle?: string
|
|
76
|
+
/**
|
|
77
|
+
* Auto close after all screens complete successfully.
|
|
78
|
+
* Set to true for default delay (5000ms), or specify delay in milliseconds.
|
|
79
|
+
*/
|
|
80
|
+
autoClose?: boolean | number
|
|
81
|
+
/**
|
|
82
|
+
* Theme preset name ('dark', 'light', 'high-contrast') or custom theme object.
|
|
83
|
+
*/
|
|
84
|
+
theme?: string | Record<string, unknown>
|
|
85
|
+
/**
|
|
86
|
+
* Enable mouse support.
|
|
87
|
+
* @default false
|
|
88
|
+
*/
|
|
89
|
+
useMouse?: boolean
|
|
90
|
+
/**
|
|
91
|
+
* Hide the default console logger screen from the sidebar.
|
|
92
|
+
* @default false
|
|
93
|
+
*/
|
|
94
|
+
hideDefaultScreen?: boolean
|
|
95
|
+
/**
|
|
96
|
+
* Use OpenTUI for terminal rendering.
|
|
97
|
+
* When true: Full TUI with sidebar, scrolling, interactive prompts.
|
|
98
|
+
* When false: Stdout mode - static screens print immediately, others on completion.
|
|
99
|
+
* @default true for Node.js, false for Bun (OpenTUI not supported)
|
|
100
|
+
*/
|
|
101
|
+
useOpenTUI?: boolean
|
|
101
102
|
}
|
|
102
103
|
/**
|
|
103
104
|
* Configuration options for CommanderFactory.
|
|
@@ -105,25 +106,25 @@ export interface CommanderTuiOptions {
|
|
|
105
106
|
* @public
|
|
106
107
|
*/
|
|
107
108
|
export interface CommanderFactoryOptions {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Enabled log levels.
|
|
111
|
+
* @default ['log', 'error', 'warn', 'debug', 'verbose', 'fatal']
|
|
112
|
+
*/
|
|
113
|
+
logLevels?: LogLevel[]
|
|
114
|
+
/**
|
|
115
|
+
* Logger display options. These override the default CLI-friendly logger settings.
|
|
116
|
+
* Ignored when enableTUI is true.
|
|
117
|
+
*/
|
|
118
|
+
logger?: CommanderLoggerOptions
|
|
119
|
+
/**
|
|
120
|
+
* Enable TUI mode with @navios/commander-tui.
|
|
121
|
+
* Requires @navios/commander-tui to be installed.
|
|
122
|
+
*/
|
|
123
|
+
enableTUI?: boolean
|
|
124
|
+
/**
|
|
125
|
+
* TUI-specific options. Only used when enableTUI is true.
|
|
126
|
+
*/
|
|
127
|
+
tuiOptions?: CommanderTuiOptions
|
|
127
128
|
}
|
|
128
129
|
/**
|
|
129
130
|
* Factory class for creating CLI applications.
|
|
@@ -160,22 +161,25 @@ export interface CommanderFactoryOptions {
|
|
|
160
161
|
* ```
|
|
161
162
|
*/
|
|
162
163
|
export declare class CommanderFactory {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
164
|
+
/**
|
|
165
|
+
* Creates a new CLI application instance configured with the provided module.
|
|
166
|
+
*
|
|
167
|
+
* @param appModule - The root CLI module class decorated with `@CliModule`
|
|
168
|
+
* @param options - Optional configuration options for the CLI application
|
|
169
|
+
* @returns A promise that resolves to a configured NaviosApplication instance
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```typescript
|
|
173
|
+
* const app = await CommanderFactory.create(AppModule)
|
|
174
|
+
* await app.init()
|
|
175
|
+
*
|
|
176
|
+
* const adapter = app.getAdapter()
|
|
177
|
+
* await adapter.run(process.argv)
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
static create<TModule extends NaviosModule = NaviosModule>(
|
|
181
|
+
appModule: ClassTypeWithInstance<TModule>,
|
|
182
|
+
options?: CommanderFactoryOptions,
|
|
183
|
+
): Promise<NaviosApplication<CliEnvironment>>
|
|
180
184
|
}
|
|
181
|
-
//# sourceMappingURL=commander.factory.d.mts.map
|
|
185
|
+
//# sourceMappingURL=commander.factory.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commander.factory.d.mts","sourceRoot":"","sources":["../../src/commander.factory.mts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAKpG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAA;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;IAC5C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,sBAAsB,CAAA;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,mBAAmB,CAAA;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,gBAAgB;IAC3B;;;;;;;;;;;;;;;OAeG;
|
|
1
|
+
{"version":3,"file":"commander.factory.d.mts","sourceRoot":"","sources":["../../src/commander.factory.mts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,QAAQ,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAKpG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAA;AAE5E;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAA;IAC5C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,OAAO,CAAA;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB;;;OAGG;IACH,MAAM,CAAC,EAAE,sBAAsB,CAAA;IAC/B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,UAAU,CAAC,EAAE,mBAAmB,CAAA;CACjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBAAa,gBAAgB;IAC3B;;;;;;;;;;;;;;;OAeG;IACH,OAAa,MAAM,CAAC,OAAO,SAAS,YAAY,GAAG,YAAY,EAC7D,SAAS,EAAE,qBAAqB,CAAC,OAAO,CAAC,EACzC,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CA+E5C;CACF"}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { z } from 'zod/v4'
|
|
2
|
+
|
|
3
|
+
import type { CommandHandler } from '../interfaces/command-handler.interface.mjs'
|
|
4
|
+
declare const helpOptionsSchema: z.ZodObject<
|
|
5
|
+
{
|
|
6
|
+
command: z.ZodOptional<z.ZodString>
|
|
7
|
+
},
|
|
8
|
+
z.core.$strip
|
|
9
|
+
>
|
|
10
|
+
type HelpOptions = z.infer<typeof helpOptionsSchema>
|
|
7
11
|
/**
|
|
8
12
|
* Built-in help command that lists all available commands or shows help for a specific command.
|
|
9
13
|
*
|
|
10
14
|
* @public
|
|
11
15
|
*/
|
|
12
16
|
export declare class HelpCommand implements CommandHandler<HelpOptions> {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
private logger
|
|
18
|
+
private commandRegistry
|
|
19
|
+
execute(options: HelpOptions): Promise<void>
|
|
16
20
|
}
|
|
17
|
-
export {}
|
|
18
|
-
//# sourceMappingURL=help.command.d.mts.map
|
|
21
|
+
export {}
|
|
22
|
+
//# sourceMappingURL=help.command.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.command.d.mts","sourceRoot":"","sources":["../../../src/commands/help.command.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"help.command.d.mts","sourceRoot":"","sources":["../../../src/commands/help.command.mts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAA;AAM1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAA;AAEjF,QAAA,MAAM,iBAAiB;;iBAErB,CAAA;AAEF,KAAK,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAEpD;;;;GAIG;AACH,qBAMa,WAAY,YAAW,cAAc,CAAC,WAAW,CAAC;IAC7D,OAAO,CAAC,MAAM,CAA2C;IACzD,OAAO,CAAC,eAAe,CAAiC;IAElD,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAMjD;CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './help.command.mjs'
|
|
2
|
-
//# sourceMappingURL=index.d.mts.map
|
|
1
|
+
export * from './help.command.mjs'
|
|
2
|
+
//# sourceMappingURL=index.d.mts.map
|