-
Notifications
You must be signed in to change notification settings - Fork 128
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
Adding luis:application:create cmd and tests / refactor utils and clo… #351
Conversation
jspruance
commented
Nov 13, 2019
- create 'luis:application:create' cmd and tests
- refactor of utils to make input processing more generic
- update clone cmd to support utils refactor
const {flags} = this.parse(LuisApplicationCreate) | ||
const flagLabels = Object.keys(LuisApplicationCreate.flags) | ||
const configDir = this.config.configDir | ||
const configPrefix = 'luis__' |
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.
This should be moved to utils since it is the same for all commands
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.
done
versionId: flags.versionId || (config ? config.luis__versionId : null), | ||
targetVersionId: flags.targetVersionId || (config ? config.luis__targetVersionId : null) | ||
} | ||
const input: any = {} |
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.
IMO the previous implementation is clearer to understand what the programs is retrieving from the config, plus it is easier to control the flow
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.
But the previous implementation was hardcoded to one cmd (clone) so it wasn't flexible for general use. That's why I changed it to set the flags dynamically so that it works across the board.
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.
CIL