hardis:project:audit:apiversion
Description
This command detects metadatas whose apiVersion is lower than parameter --minimumapiversion
It can also fix the apiVersions with the latest one, if parameter --fix is sent
Example to handle ApexClass / Trigger & ApexPage mandatory version upgrade :
sf hardis:project:audit:apiversion --metadatatype ApexClass,ApexTrigger,ApexPage --minimumapiversion 45.0 --fix
Parameters
Name | Type | Description | Default | Required | Options |
---|---|---|---|---|---|
debug -d |
boolean | Activate debug mode (more logs) | |||
failiferror -f |
boolean | Fails (exit code 1) if an error is found | |||
fix | boolean | Fix ApiVersion on specified Metadata Types. | |||
flags-dir | option | undefined | |||
json | boolean | Format output as json. | |||
metadatatype | option | Metadata Types to fix. Comma separated. Supported Metadata types: ApexClass, ApexTrigger, ApexPage | |||
minimumapiversion -m |
option | Minimum allowed API version | 20 | ||
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:audit:apiversion
$ sf hardis:project:audit:apiversion --metadatatype ApexClass,ApexTrigger,ApexPage --minimumapiversion 45
$ sf hardis:project:audit:apiversion --metadatatype ApexClass,ApexTrigger,ApexPage --minimumapiversion 45 --fix