-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): Resolved issues with
cli
package build
- Loading branch information
1 parent
4d1c25b
commit 3a0c051
Showing
10 changed files
with
262 additions
and
665 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
import { MaybePromise } from "@storm-stack/utilities"; | ||
import { Command } from "commander"; | ||
|
||
export type CLIConfig = { | ||
export interface CLIConfig { | ||
name: string; | ||
description: string; | ||
commands: CLICommand[]; | ||
preAction: (command: Command) => MaybePromise<void>; | ||
postAction: (command: Command) => MaybePromise<void>; | ||
}; | ||
} | ||
|
||
export type CLICommand = { | ||
export interface CLICommand { | ||
name: string; | ||
description: string; | ||
commands?: CLICommand[]; | ||
options?: CLIOption[]; | ||
argument?: CLIArgument[]; | ||
action: (...args: any[]) => MaybePromise<void>; | ||
}; | ||
} | ||
|
||
export type CLIArgument = { | ||
export interface CLIArgument { | ||
flags: string; | ||
description?: string; | ||
default?: unknown | undefined; | ||
}; | ||
} | ||
|
||
export type CLIOption = { | ||
export interface CLIOption { | ||
flags: string; | ||
description: string | undefined; | ||
choices?: string[]; | ||
default?: CLIOptionDefault; | ||
}; | ||
} | ||
|
||
export type CLIOptionDefault = { | ||
export interface CLIOptionDefault { | ||
value: unknown; | ||
description?: string | undefined; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.