-
Notifications
You must be signed in to change notification settings - Fork 22
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
[FEATURE] Add config command #618
Conversation
Note: The build would fail until we merge and make a release of: SAP/ui5-project#575 |
83ad93a
to
309aaea
Compare
309aaea
to
b475a40
Compare
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.
Otherwise LGTM
21949aa
to
92e29ba
Compare
* No help is printed on yargs errors, so do not refer to it (also see #256) * Only mention 'ui5 --help'
* Fix 'ui5 set <key>' without value or empty string to unset * Log everything to stderr, except machine parsable output like configuration values returned by 'ui5 list' and 'ui5 get <key>' * Do not mention location of ui5rc in config commands. In the future we might have multiple locations and @ui5/project/config/Configuration would take care of deciding where to read what from. The CLI should not have that knowledge * Move imports and variable definitions to handler in order to only execute them if the command is actually 'ui5 config' * Tests now mock Configuration in order to not modify the actual configuration of the user running the tests
92e29ba
to
22cd468
Compare
const command = commandArgs[commandArgs.length - 1]; | ||
|
||
const {default: Configuration} = await import( "@ui5/project/config/Configuration"); | ||
const allowedKeys = ["mavenSnapshotEndpointUrl"]; |
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.
Shouldn't this information come from the Configuration class instead of hard-code it here?
It would allow us to add new options without having to adjust the CLI project.
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.
True. That's a good idea we should follow-up on 👍
f106971
to
19122b5
Compare
Co-authored-by: Günter Klatt <[email protected]>
5b14dad
to
04fdf8d
Compare
This feature depends on SAP/ui5-project#575
and makes the enablement of
mavenSnapshotEndpointUrl
easier: SAP/ui5-project#570