-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cdk): dev-mode command #957
Conversation
Wanna develop a new CDK component? Run the command: ``` lacework component dev <component_name> ``` Signed-off-by: Salim Afiune Maya <[email protected]>
} | ||
|
||
if component.UnderDevelopment() { | ||
return errors.New("component already under development.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: do you want to return an error here or just nil and output info?
componentsDevModeCmd = &cobra.Command{ | ||
Use: "dev <component>", | ||
Hidden: true, | ||
Short: "Enter development mode of a new or existing component", | ||
Args: cobra.ExactArgs(1), | ||
RunE: runComponentsDevMode, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I know this is hidden, but a 'long' description with more details on cmd usage would be nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question on this, if I have an existing component and I enter dev mode on it, how do I then exit dev mode?
component, found := cli.LwComponents.GetComponent(args[0]) | ||
if !found { | ||
component = &lwcomponent.Component{ | ||
Name: args[0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be any restrictions on a component name. For example I could pass in "!"
Summary
Wanna develop a new CDK component? Run the command:
Signed-off-by: Salim Afiune Maya [email protected]
How did you test this change?
ddev-mode.mp4
Issue
https://lacework.atlassian.net/browse/ALLY-1186