@navios/commander 0.7.1 → 0.9.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 +12 -0
- package/dist/src/decorators/cli-module.decorator.d.mts +12 -2
- package/dist/src/decorators/cli-module.decorator.d.mts.map +1 -1
- package/dist/src/decorators/command.decorator.d.mts +12 -2
- package/dist/src/decorators/command.decorator.d.mts.map +1 -1
- package/dist/src/services/module-loader.service.d.mts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/lib/index.cjs +581 -186
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +27 -3
- package/lib/index.d.cts.map +1 -1
- package/lib/index.d.mts +27 -3
- package/lib/index.d.mts.map +1 -1
- package/lib/index.mjs +573 -187
- package/lib/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/decorators/cli-module.decorator.mts +14 -2
- package/src/decorators/command.decorator.mts +19 -2
- package/src/services/module-loader.service.mts +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,18 @@ 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
|
+
## [0.9.0] - 2025-12-23
|
|
9
|
+
|
|
10
|
+
### Dependencies
|
|
11
|
+
|
|
12
|
+
- Updated to support `@navios/di` ^0.9.0
|
|
13
|
+
|
|
14
|
+
## [0.8.0] - 2025-12-21
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
- Updated to support `@navios/di` ^0.8.0
|
|
19
|
+
|
|
8
20
|
## [0.7.1] - 2025-12-20
|
|
9
21
|
|
|
10
22
|
### Fixed
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClassType } from '@navios/core';
|
|
1
|
+
import type { ClassType, Registry } from '@navios/core';
|
|
2
2
|
/**
|
|
3
3
|
* Options for the `@CliModule` decorator.
|
|
4
4
|
*
|
|
@@ -15,6 +15,16 @@ export interface CliModuleOptions {
|
|
|
15
15
|
* Imported modules' commands will be available in this module.
|
|
16
16
|
*/
|
|
17
17
|
imports?: ClassType[] | Set<ClassType>;
|
|
18
|
+
/**
|
|
19
|
+
* Priority level for the module.
|
|
20
|
+
* Higher priority modules will be loaded first.
|
|
21
|
+
*/
|
|
22
|
+
priority?: number;
|
|
23
|
+
/**
|
|
24
|
+
* Registry to use for the module.
|
|
25
|
+
* Registry is used to store the module and its commands.
|
|
26
|
+
*/
|
|
27
|
+
registry?: Registry;
|
|
18
28
|
}
|
|
19
29
|
/**
|
|
20
30
|
* Decorator that marks a class as a CLI module.
|
|
@@ -38,5 +48,5 @@ export interface CliModuleOptions {
|
|
|
38
48
|
* export class AppModule {}
|
|
39
49
|
* ```
|
|
40
50
|
*/
|
|
41
|
-
export declare function CliModule({ commands, imports }?: CliModuleOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;
|
|
51
|
+
export declare function CliModule({ commands, imports, priority, registry }?: CliModuleOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;
|
|
42
52
|
//# sourceMappingURL=cli-module.decorator.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-module.decorator.d.mts","sourceRoot":"","sources":["../../../src/decorators/cli-module.decorator.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"cli-module.decorator.d.mts","sourceRoot":"","sources":["../../../src/decorators/cli-module.decorator.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAMvD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,SAAS,CAAC,CAAA;IACvC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,SAAS,CAAC,CAAA;IACtC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,SAAS,CACvB,EAAE,QAAa,EAAE,OAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAE,gBAGpD,IAEO,QAAQ,SAAS,EAAE,SAAS,qBAAqB,eAuB1D"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClassType } from '@navios/core';
|
|
1
|
+
import type { ClassType, Registry } from '@navios/core';
|
|
2
2
|
import type { ZodObject } from 'zod';
|
|
3
3
|
/**
|
|
4
4
|
* Options for the `@Command` decorator.
|
|
@@ -16,6 +16,16 @@ export interface CommandOptions {
|
|
|
16
16
|
* If provided, options will be validated and parsed according to this schema.
|
|
17
17
|
*/
|
|
18
18
|
optionsSchema?: ZodObject;
|
|
19
|
+
/**
|
|
20
|
+
* Priority level for the command.
|
|
21
|
+
* Higher priority commands will be loaded first.
|
|
22
|
+
*/
|
|
23
|
+
priority?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Registry to use for the command.
|
|
26
|
+
* Registry is used to store the command and its options schema.
|
|
27
|
+
*/
|
|
28
|
+
registry?: Registry;
|
|
19
29
|
}
|
|
20
30
|
/**
|
|
21
31
|
* Decorator that marks a class as a CLI command.
|
|
@@ -47,5 +57,5 @@ export interface CommandOptions {
|
|
|
47
57
|
* }
|
|
48
58
|
* ```
|
|
49
59
|
*/
|
|
50
|
-
export declare function Command({ path, optionsSchema }: CommandOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;
|
|
60
|
+
export declare function Command({ path, optionsSchema, priority, registry, }: CommandOptions): (target: ClassType, context: ClassDecoratorContext) => ClassType;
|
|
51
61
|
//# sourceMappingURL=command.decorator.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.decorator.d.mts","sourceRoot":"","sources":["../../../src/decorators/command.decorator.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;
|
|
1
|
+
{"version":3,"file":"command.decorator.d.mts","sourceRoot":"","sources":["../../../src/decorators/command.decorator.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAMpC;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAA;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,OAAO,CAAC,EACtB,IAAI,EACJ,aAAa,EACb,QAAQ,EACR,QAAQ,GACT,EAAE,cAAc,IACE,QAAQ,SAAS,EAAE,SAAS,qBAAqB,eAiBnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-loader.service.d.mts","sourceRoot":"","sources":["../../../src/services/module-loader.service.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEvE,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"module-loader.service.d.mts","sourceRoot":"","sources":["../../../src/services/module-loader.service.mts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAEvE,OAAO,EAAE,SAAS,EAA0C,MAAM,cAAc,CAAA;AAEhF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAC7D,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAO/E;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,KAAK,EAAE,qBAAqB,CAAC,cAAc,CAAC,CAAA;IAC5C;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAA;CAC1B;AAED;;;;;;;GAOG;AACH,qBACa,sBAAsB;IACjC,SAAS,CAAC,SAAS,YAAoB;IACvC,OAAO,CAAC,eAAe,CAA4C;IACnE,OAAO,CAAC,aAAa,CAA8B;IACnD,OAAO,CAAC,gBAAgB,CAA8C;IACtE,OAAO,CAAC,WAAW,CAAQ;IAE3B;;;;;;OAMG;IACG,WAAW,CAAC,SAAS,EAAE,qBAAqB,CAAC,YAAY,CAAC;YAQlD,eAAe;IAoC7B,OAAO,CAAC,aAAa;IAcrB;;;;OAIG;IACH,aAAa,IAAI,GAAG,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAI/C;;;;OAIG;IACH,cAAc,IAAI,GAAG,CAAC,MAAM,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC;IAUzD;;;;OAIG;IACH,0BAA0B,IAAI,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAC;IAI9D;;;OAGG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAI/D;;OAEG;IACH,OAAO;CAMR"}
|