Enhances 'environement get' commands with text results. Closes #2153#2160
Conversation
|
Awesome @nanddeepn! We'll get through it asap 👏 |
waldekmastykarz
left a comment
There was a problem hiding this comment.
Hey @nanddeepn, we should approach this differently. With the current solution we have two issues.
- Formatting is adjusted when the output is set explicitly to
text. What this comparison is not taking into account, that ifoutputis not set explicitly, it's also consideredtext. - With this approach we make it impossible to use JMESPath queries and let users decide which properties they want to show. Instead, we always render a fixed set of properties.
A better approach would be to use the command's defaultProperties property and specify the list of properties that should be displayed. That way, we let users to specify their own properties using a JMESPath query, and if they don't we render the default set of properties.
To see how it's used, check out for example the flow environment list command.
|
The tests are failing for SPO. |
waldekmastykarz
left a comment
There was a problem hiding this comment.
Thank you for a quick turnaround @nanddeepn! If you could do one more adjustments, I think we're there 👍 Appreciate your help!
| else { | ||
| logger.log(res); | ||
| } | ||
| res.name = res.name; |
There was a problem hiding this comment.
We don't need to re-assign properties to the same names.
There was a problem hiding this comment.
Oops.. :( Thanks for noticing
| request | ||
| .get(requestOptions) | ||
| .then((res: any): void => { | ||
| res.name = res.name; |
There was a problem hiding this comment.
We don't need to re-assign properties to the same names.
|
As for the broken test, don't worry about it. I looked at the output log and it's something that happens occasionally when we'll get a time out. Nothing wrong on your part. Sorry for the trouble 😊 |
waldekmastykarz
left a comment
There was a problem hiding this comment.
Excellent! Nothing to add 👏
|
Merged manually. Thank you! 👏 |
Enhances 'environement get' commands with text results. Closes #2153