diff --git a/classes/SfCommandError.SfCommandError.html b/classes/SfCommandError.SfCommandError.html index 009a924f..d5b3627a 100644 --- a/classes/SfCommandError.SfCommandError.html +++ b/classes/SfCommandError.SfCommandError.html @@ -1,4 +1,4 @@ -
Optional
resultOptional
warningsStatic
fromOptional
warnings: (string | StructuredMessage)[]Optional
resultOptional
warningsStatic
fromOptional
warnings: (string | StructuredMessage)[]ConfigAggregator instance for accessing global and local configuration.
-Add a progress bar to the console. Progress
-Optional
projectAdd a spinner to the console. Spinner
-Static
baseStatic
Optional
configurationAdd a CONFIGURATION VARIABLES section to the help output.
+ConfigAggregator instance for accessing global and local configuration.
+Add a progress bar to the console. Progress
+Optional
projectAdd a spinner to the console. Spinner
+Static
baseStatic
Optional
configurationAdd a CONFIGURATION VARIABLES section to the help output.
import { SfCommand, toHelpSection } from '@salesforce/sf-plugins-core';
import { OrgConfigProperties } from '@salesforce/core';
export default class MyCommand extends SfCommand {
public static configurationVariablesSection = toHelpSection(
'CONFIGURATION VARIABLES',
OrgConfigProperties.TARGET_ORG,
OrgConfigProperties.ORG_API_VERSION,
);
}
-Static
enableStatic
Optional
envAdd an Environment VARIABLES section to the help output.
+Static
enableStatic
Optional
envAdd an Environment VARIABLES section to the help output.
import { SfCommand, toHelpSection } from '@salesforce/sf-plugins-core';
import { EnvironmentVariable } from '@salesforce/core';
export default class MyCommand extends SfCommand {
public static envVariablesSection = toHelpSection(
'ENVIRONMENT VARIABLES',
EnvironmentVariable.SF_TARGET_ORG,
EnvironmentVariable.SF_USE_PROGRESS_BAR,
);
}
-Static
Optional
errorAdd an ERROR CODES section to the help output.
+Static
Optional
errorAdd an ERROR CODES section to the help output.
Static
requiresSet to true if the command must be executed inside a Salesforce project directory.
+Static
requiresSet to true if the command must be executed inside a Salesforce project directory.
If set to true the command will throw an error if the command is executed outside of a Salesforce project directory. Additionally, this.project will be set to the current Salesforce project (SfProject).
-Prompt user for yes/no confirmation.
Avoid calling in --json scenarios and always provide a --no-prompt
option for scripting
Log info message to users.
+Log info message to users.
SfCommand.Info The message to log.
-Determine if the command is being run with the --json flag in a command that supports it.
+Abstract
runAbstract
runPrompt user for yes/no confirmation.
Avoid calling in --json scenarios and always provide a --no-prompt
option for scripting
Log stylized header to the console. Will automatically be suppressed when --json flag is present.
+Log stylized JSON to the console. Will automatically be suppressed when --json flag is present.
+Log stylized object to the console. Will automatically be suppressed when --json flag is present.
+Log a stylized url to the console. Will automatically be suppressed when --json flag is present.
+Log warning to users. If --json is enabled, then the warning will be added to the json output under the warnings property.
+Log warning to users. If --json is enabled, then the warning will be added to the json output under the warnings property.
SfCommand.Warning The message to log.
-
Example
-