Skip to content

Conversation

@rulasg
Copy link
Owner

@rulasg rulasg commented Mar 26, 2025

Introduce an email parameter to the Install-SalesforceClient function, improve command alias consistency, and refine the output method for configuration success messages.

}

function Reset-MyInvokeCommandAlias{
[CmdletBinding(SupportsShouldProcess)]

Check warning

Code scanning / PSScriptAnalyzer

'Reset-MyInvokeCommandAlias' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. Warning

'Reset-MyInvokeCommandAlias' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue.

} Export-ModuleMember -Function Install-SalesforceClient

function Test-NpmSetup{

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Test-NpmSetup' does not have a help comment. Note

The cmdlet 'Test-NpmSetup' does not have a help comment.

# Check for Salesforce CLI installed and install if not
$sfversion = Invoke-MyCommand -Command GetSalesforceCliVersion -ErrorAction SilentlyContinue
function Invoke-SfInstall{

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Invoke-SfInstall' does not have a help comment. Note

The cmdlet 'Invoke-SfInstall' does not have a help comment.
if($null -eq $sfversion){
"1. Salesforce Cli installation failed. Run ""npm install @salesforce/cli --global"" to install manually!!!" | Write-MyError
return
return $false

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Invoke-SfInstall' returns an object of type 'System.Boolean' but this type is not declared in the OutputType attribute. Note

The cmdlet 'Invoke-SfInstall' returns an object of type 'System.Boolean' but this type is not declared in the OutputType attribute.
return $false
} else{
"1. Salesforce CLI installed. Version: $sfversion} " | Write-ToConsole -Color "Green"
return $true

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Invoke-SfInstall' returns an object of type 'System.Boolean' but this type is not declared in the OutputType attribute. Note

The cmdlet 'Invoke-SfInstall' returns an object of type 'System.Boolean' but this type is not declared in the OutputType attribute.
} Export-ModuleMember -Function Invoke-SfInstall

function Test-SfLogin{
[CmdletBinding(SupportsShouldProcess)]

Check warning

Code scanning / PSScriptAnalyzer

'Test-SfLogin' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. Warning

'Test-SfLogin' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue.
# }
} Export-ModuleMember -Function Test-SfLogin

function Invoke-SfConfig{

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Invoke-SfConfig' does not have a help comment. Note

The cmdlet 'Invoke-SfConfig' does not have a help comment.
} Export-ModuleMember -Function Test-SfLogin

function Invoke-SfConfig{
[CmdletBinding(SupportsShouldProcess)]

Check warning

Code scanning / PSScriptAnalyzer

'Invoke-SfConfig' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. Warning

'Invoke-SfConfig' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue.
# }
} Export-ModuleMember -Function Invoke-SfConfig

function Resolve-Email{

Check notice

Code scanning / PSScriptAnalyzer

The cmdlet 'Resolve-Email' does not have a help comment. Note

The cmdlet 'Resolve-Email' does not have a help comment.
} Export-ModuleMember -Function Invoke-SfConfig

function Resolve-Email{
[CmdletBinding(SupportsShouldProcess)]

Check warning

Code scanning / PSScriptAnalyzer

'Resolve-Email' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue. Warning

'Resolve-Email' has the ShouldProcess attribute but does not call ShouldProcess/ShouldContinue.
@rulasg rulasg merged commit 00c7d44 into main Mar 26, 2025
3 checks passed
@rulasg rulasg deleted the improve-install-SalesforceClient branch March 26, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants