hardis:config:get
Description
Command Behavior
Retrieves and displays the sfdx-hardis configuration for a specified level.
This command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.
- Configuration levels: It can retrieve configuration from three different levels:
- Project: The configuration defined in the project's
.sfdx-hardis.yml
file. - Branch: The configuration defined in a branch-specific configuration file (e.g.,
.sfdx-hardis.production.yml
). - User: The global user-level configuration.
- Project: The configuration defined in the project's
Technical explanations
The command's logic is straightforward:
getConfig
function: It calls thegetConfig
utility function, passing the desired configuration level as an argument.- Configuration loading: The
getConfig
function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON. - Output: The retrieved configuration is then displayed to the user as a JSON string.
Parameters
Name | Type | Description | Default | Required | Options |
---|---|---|---|---|---|
debug -d |
boolean | Activate debug mode (more logs) | |||
flags-dir | option | undefined | |||
json | boolean | Format output as json. | |||
level -l |
option | project,branch or user | project | project branch user |
|
skipauth | boolean | Skip authentication check when a default username is required | |||
websocket | option | Websocket host:port for VsCode SFDX Hardis UI integration |
Examples
$ sf hardis:project:deploy:sources:metadata