-
Notifications
You must be signed in to change notification settings - Fork 3
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
PRO-16890 : Enforce required flags for provar:metadatacache #26
Conversation
The command started executing even when required flags were not given. Changed that to give error in typescript itself. Also made changes to make sure that the flags work correctly in tandem.
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.
Please do necessary changes in CHANGELOG.md
file as well
src/commands/provar/metadatacache.ts
Outdated
return {}; | ||
} | ||
|
||
if ( |
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.
Change it to:
if (!["Reload", "Refresh", "Reuse"].includes(metadataLevel))
src/commands/provar/metadatacache.ts
Outdated
this.ux.error( | ||
'[ERROR] No valid user org found to download metadata. Terminating command.' | ||
); | ||
return {}; | ||
} | ||
|
||
const userInfoString = provarDxUtils.prepareRawProperties( | ||
const userInfoString = connections && userInfo == null ? "NA" : provarDxUtils.prepareRawProperties( |
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.
userInfo === null
Corrected conditional checks to use "===" & '!==' for comparison and renamed variables with self explanatory names
src/commands/provar/metadatacache.ts
Outdated
return {}; | ||
} | ||
|
||
(!["Reload", "Refresh", "Reuse"].includes(metadataLevel)) { |
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 this be an if statement?
if (!["Reload", "Refresh", "Reuse"].includes(metadataLevel)) {
* PRO-16810: ProvarDX Incorrect Help messages (#23) - Updated help messages for runtests, validate commands displayed on running `sfdx provar --help` - Updated company name in LICENSE.md * PRO-16923: ProvarDX runtests fails to handle special characters in Scratch Org Passwords properly (#25) * PRO-16923: ProvarDX runtests fails to handle special characters in Scratch Org Passwords properly * PRO-16923: Special characters were causing issues on different OS so encoded the password * PRO-16897: ProvarDX: Runtests secrets flag override incorrectly documented * PRO-16897: ProvarDX: Runtests secrets flag override incorrectly documented * PRO-16890 : Enforce required flags for provar:metadatacache (#26) * PRO-16890 : Enforce required flags for provar:metadatacache The command started executing even when required flags were not given. Changed that to give error in typescript itself. Also made changes to make sure that the flags work correctly in tandem. * PRO-16890 : Implement review comments and add change log * PRO-16890 : Implement review comments Corrected conditional checks to use "===" & '!==' for comparison and renamed variables with self explanatory names * PRO-16890 : Implement review comments Co-authored-by: mayank.nehru <mayank.nehru@HP-Mayanknehru> * PRO-17213: ProvarDX 0.3.0 release (#27) Bumped version to 0.3.0 Co-authored-by: Mayank Nehru <mayank.nehru@provartesting.com> Co-authored-by: mayank.nehru <mayank.nehru@HP-Mayanknehru> Co-authored-by: ProvarTesting <6640365+ProvarTesting@users.noreply.github.com>
The command started executing even when required flags were not given. Changed that to give error in typescript itself. Also made changes to make sure that the flags work correctly in tandem.