@nx-ddd/cli 19.21.7 → 19.24.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/package.json +1 -1
- package/src/lib/cli.d.ts +6 -1
package/package.json
CHANGED
package/src/lib/cli.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { Injector } from '@angular/core';
|
|
2
2
|
import { Command as Program } from 'commander';
|
|
3
|
+
/**
|
|
4
|
+
* Command option type - supports common commander option patterns
|
|
5
|
+
* Excludes deprecated RegExp overload
|
|
6
|
+
*/
|
|
7
|
+
export type CommandOption = [flags: string, description?: string, defaultValue?: string | boolean | string[]] | [flags: string, description: string, fn: (value: string, previous: any) => any, defaultValue?: any];
|
|
3
8
|
export interface Command {
|
|
4
9
|
name: string;
|
|
5
10
|
load?: () => Promise<(program: any, injector: any) => void>;
|
|
@@ -8,7 +13,7 @@ export interface Command {
|
|
|
8
13
|
action?: (...args: Parameters<Parameters<Program['action']>[0]>) => Promise<void> | void;
|
|
9
14
|
description?: string;
|
|
10
15
|
arguments?: Parameters<Program['argument']>[];
|
|
11
|
-
options?:
|
|
16
|
+
options?: CommandOption[];
|
|
12
17
|
aliases?: string[];
|
|
13
18
|
}
|
|
14
19
|
export type Commands = Command[];
|