sfdx-hardis 6.17.0 → 6.17.2-alpha202512261125.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/lib/commands/hardis/datacloud/extract/agentforce-conversations.js +95 -9
- package/lib/commands/hardis/datacloud/extract/agentforce-conversations.js.map +1 -1
- package/lib/commands/hardis/datacloud/extract/agentforce-feedback.js +2 -0
- package/lib/commands/hardis/datacloud/extract/agentforce-feedback.js.map +1 -1
- package/lib/commands/hardis/project/deploy/smart.js +68 -14
- package/lib/commands/hardis/project/deploy/smart.js.map +1 -1
- package/lib/commands/hardis/work/save.js +5 -0
- package/lib/commands/hardis/work/save.js.map +1 -1
- package/lib/common/notifProvider/index.d.ts +1 -1
- package/lib/common/notifProvider/index.js +2 -2
- package/lib/common/notifProvider/index.js.map +1 -1
- package/lib/common/utils/classUtils.d.ts +1 -0
- package/lib/common/utils/classUtils.js +14 -0
- package/lib/common/utils/classUtils.js.map +1 -1
- package/lib/common/utils/prePostCommandUtils.js +9 -78
- package/lib/common/utils/prePostCommandUtils.js.map +1 -1
- package/lib/common/utils/pullRequestUtils.d.ts +3 -0
- package/lib/common/utils/pullRequestUtils.js +116 -0
- package/lib/common/utils/pullRequestUtils.js.map +1 -0
- package/oclif.lock +12 -30
- package/oclif.manifest.json +1728 -1728
- package/package.json +3 -3
package/oclif.manifest.json
CHANGED
|
@@ -5924,15 +5924,12 @@
|
|
|
5924
5924
|
"import:data:org:hardis"
|
|
5925
5925
|
]
|
|
5926
5926
|
},
|
|
5927
|
-
"hardis:org:
|
|
5927
|
+
"hardis:org:files:export": {
|
|
5928
5928
|
"aliases": [],
|
|
5929
5929
|
"args": {},
|
|
5930
|
-
"description": "
|
|
5930
|
+
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
|
|
5931
5931
|
"examples": [
|
|
5932
|
-
"$ sf hardis:org:
|
|
5933
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5934
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5935
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5932
|
+
"$ sf hardis:org:files:export"
|
|
5936
5933
|
],
|
|
5937
5934
|
"flags": {
|
|
5938
5935
|
"json": {
|
|
@@ -5950,30 +5947,48 @@
|
|
|
5950
5947
|
"multiple": false,
|
|
5951
5948
|
"type": "option"
|
|
5952
5949
|
},
|
|
5953
|
-
"
|
|
5954
|
-
"char": "
|
|
5955
|
-
"description": "
|
|
5956
|
-
"name": "
|
|
5950
|
+
"path": {
|
|
5951
|
+
"char": "p",
|
|
5952
|
+
"description": "Path to the file export project",
|
|
5953
|
+
"name": "path",
|
|
5957
5954
|
"hasDynamicHelp": false,
|
|
5958
5955
|
"multiple": false,
|
|
5959
5956
|
"type": "option"
|
|
5960
5957
|
},
|
|
5961
|
-
"
|
|
5958
|
+
"chunksize": {
|
|
5959
|
+
"char": "c",
|
|
5960
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
5961
|
+
"name": "chunksize",
|
|
5962
|
+
"default": 1000,
|
|
5963
|
+
"hasDynamicHelp": false,
|
|
5964
|
+
"multiple": false,
|
|
5965
|
+
"type": "option"
|
|
5966
|
+
},
|
|
5967
|
+
"polltimeout": {
|
|
5962
5968
|
"char": "t",
|
|
5963
|
-
"description": "
|
|
5964
|
-
"name": "
|
|
5969
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
5970
|
+
"name": "polltimeout",
|
|
5971
|
+
"default": 300000,
|
|
5965
5972
|
"hasDynamicHelp": false,
|
|
5966
5973
|
"multiple": false,
|
|
5967
5974
|
"type": "option"
|
|
5968
5975
|
},
|
|
5969
|
-
"
|
|
5970
|
-
"char": "
|
|
5971
|
-
"description": "
|
|
5972
|
-
"name": "
|
|
5976
|
+
"startchunknumber": {
|
|
5977
|
+
"char": "s",
|
|
5978
|
+
"description": "Chunk number to start from",
|
|
5979
|
+
"name": "startchunknumber",
|
|
5980
|
+
"default": 0,
|
|
5973
5981
|
"hasDynamicHelp": false,
|
|
5974
5982
|
"multiple": false,
|
|
5975
5983
|
"type": "option"
|
|
5976
5984
|
},
|
|
5985
|
+
"resume": {
|
|
5986
|
+
"char": "r",
|
|
5987
|
+
"description": "Resume previous export by checking existing files (default in CI)",
|
|
5988
|
+
"name": "resume",
|
|
5989
|
+
"allowNo": false,
|
|
5990
|
+
"type": "boolean"
|
|
5991
|
+
},
|
|
5977
5992
|
"debug": {
|
|
5978
5993
|
"char": "d",
|
|
5979
5994
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6012,13 +6027,13 @@
|
|
|
6012
6027
|
},
|
|
6013
6028
|
"hasDynamicHelp": true,
|
|
6014
6029
|
"hiddenAliases": [],
|
|
6015
|
-
"id": "hardis:org:
|
|
6030
|
+
"id": "hardis:org:files:export",
|
|
6016
6031
|
"pluginAlias": "sfdx-hardis",
|
|
6017
6032
|
"pluginName": "sfdx-hardis",
|
|
6018
6033
|
"pluginType": "core",
|
|
6019
6034
|
"strict": true,
|
|
6020
6035
|
"enableJsonFlag": true,
|
|
6021
|
-
"title": "
|
|
6036
|
+
"title": "Export files",
|
|
6022
6037
|
"requiresProject": false,
|
|
6023
6038
|
"isESM": true,
|
|
6024
6039
|
"relativePath": [
|
|
@@ -6026,43 +6041,43 @@
|
|
|
6026
6041
|
"commands",
|
|
6027
6042
|
"hardis",
|
|
6028
6043
|
"org",
|
|
6029
|
-
"
|
|
6030
|
-
"
|
|
6044
|
+
"files",
|
|
6045
|
+
"export.js"
|
|
6031
6046
|
],
|
|
6032
6047
|
"aliasPermutations": [],
|
|
6033
6048
|
"permutations": [
|
|
6034
|
-
"hardis:org:
|
|
6035
|
-
"org:hardis:
|
|
6036
|
-
"org:
|
|
6037
|
-
"org:
|
|
6038
|
-
"hardis:
|
|
6039
|
-
"
|
|
6040
|
-
"
|
|
6041
|
-
"
|
|
6042
|
-
"hardis:
|
|
6043
|
-
"
|
|
6044
|
-
"
|
|
6045
|
-
"
|
|
6046
|
-
"hardis:org:
|
|
6047
|
-
"org:hardis:
|
|
6048
|
-
"org:
|
|
6049
|
-
"org:
|
|
6050
|
-
"hardis:
|
|
6051
|
-
"
|
|
6052
|
-
"
|
|
6053
|
-
"
|
|
6054
|
-
"hardis:
|
|
6055
|
-
"
|
|
6056
|
-
"
|
|
6057
|
-
"
|
|
6049
|
+
"hardis:org:files:export",
|
|
6050
|
+
"org:hardis:files:export",
|
|
6051
|
+
"org:files:hardis:export",
|
|
6052
|
+
"org:files:export:hardis",
|
|
6053
|
+
"hardis:files:org:export",
|
|
6054
|
+
"files:hardis:org:export",
|
|
6055
|
+
"files:org:hardis:export",
|
|
6056
|
+
"files:org:export:hardis",
|
|
6057
|
+
"hardis:files:export:org",
|
|
6058
|
+
"files:hardis:export:org",
|
|
6059
|
+
"files:export:hardis:org",
|
|
6060
|
+
"files:export:org:hardis",
|
|
6061
|
+
"hardis:org:export:files",
|
|
6062
|
+
"org:hardis:export:files",
|
|
6063
|
+
"org:export:hardis:files",
|
|
6064
|
+
"org:export:files:hardis",
|
|
6065
|
+
"hardis:export:org:files",
|
|
6066
|
+
"export:hardis:org:files",
|
|
6067
|
+
"export:org:hardis:files",
|
|
6068
|
+
"export:org:files:hardis",
|
|
6069
|
+
"hardis:export:files:org",
|
|
6070
|
+
"export:hardis:files:org",
|
|
6071
|
+
"export:files:hardis:org",
|
|
6072
|
+
"export:files:org:hardis"
|
|
6058
6073
|
]
|
|
6059
6074
|
},
|
|
6060
|
-
"hardis:org:
|
|
6075
|
+
"hardis:org:files:import": {
|
|
6061
6076
|
"aliases": [],
|
|
6062
6077
|
"args": {},
|
|
6063
|
-
"description": "\
|
|
6078
|
+
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
|
|
6064
6079
|
"examples": [
|
|
6065
|
-
"$ sf hardis:org:
|
|
6080
|
+
"$ sf hardis:org:files:import"
|
|
6066
6081
|
],
|
|
6067
6082
|
"flags": {
|
|
6068
6083
|
"json": {
|
|
@@ -6080,6 +6095,21 @@
|
|
|
6080
6095
|
"multiple": false,
|
|
6081
6096
|
"type": "option"
|
|
6082
6097
|
},
|
|
6098
|
+
"path": {
|
|
6099
|
+
"char": "p",
|
|
6100
|
+
"description": "Path to the file export project",
|
|
6101
|
+
"name": "path",
|
|
6102
|
+
"hasDynamicHelp": false,
|
|
6103
|
+
"multiple": false,
|
|
6104
|
+
"type": "option"
|
|
6105
|
+
},
|
|
6106
|
+
"overwrite": {
|
|
6107
|
+
"char": "f",
|
|
6108
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
6109
|
+
"name": "overwrite",
|
|
6110
|
+
"allowNo": false,
|
|
6111
|
+
"type": "boolean"
|
|
6112
|
+
},
|
|
6083
6113
|
"debug": {
|
|
6084
6114
|
"char": "d",
|
|
6085
6115
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6118,13 +6148,13 @@
|
|
|
6118
6148
|
},
|
|
6119
6149
|
"hasDynamicHelp": true,
|
|
6120
6150
|
"hiddenAliases": [],
|
|
6121
|
-
"id": "hardis:org:
|
|
6151
|
+
"id": "hardis:org:files:import",
|
|
6122
6152
|
"pluginAlias": "sfdx-hardis",
|
|
6123
6153
|
"pluginName": "sfdx-hardis",
|
|
6124
6154
|
"pluginType": "core",
|
|
6125
6155
|
"strict": true,
|
|
6126
6156
|
"enableJsonFlag": true,
|
|
6127
|
-
"title": "
|
|
6157
|
+
"title": "Import files",
|
|
6128
6158
|
"requiresProject": false,
|
|
6129
6159
|
"isESM": true,
|
|
6130
6160
|
"relativePath": [
|
|
@@ -6132,46 +6162,44 @@
|
|
|
6132
6162
|
"commands",
|
|
6133
6163
|
"hardis",
|
|
6134
6164
|
"org",
|
|
6135
|
-
"
|
|
6136
|
-
"
|
|
6165
|
+
"files",
|
|
6166
|
+
"import.js"
|
|
6137
6167
|
],
|
|
6138
6168
|
"aliasPermutations": [],
|
|
6139
6169
|
"permutations": [
|
|
6140
|
-
"hardis:org:
|
|
6141
|
-
"org:hardis:
|
|
6142
|
-
"org:
|
|
6143
|
-
"org:
|
|
6144
|
-
"hardis:
|
|
6145
|
-
"
|
|
6146
|
-
"
|
|
6147
|
-
"
|
|
6148
|
-
"hardis:
|
|
6149
|
-
"
|
|
6150
|
-
"
|
|
6151
|
-
"
|
|
6152
|
-
"hardis:org:
|
|
6153
|
-
"org:hardis:
|
|
6154
|
-
"org:
|
|
6155
|
-
"org:
|
|
6156
|
-
"hardis:
|
|
6157
|
-
"
|
|
6158
|
-
"
|
|
6159
|
-
"
|
|
6160
|
-
"hardis:
|
|
6161
|
-
"
|
|
6162
|
-
"
|
|
6163
|
-
"
|
|
6170
|
+
"hardis:org:files:import",
|
|
6171
|
+
"org:hardis:files:import",
|
|
6172
|
+
"org:files:hardis:import",
|
|
6173
|
+
"org:files:import:hardis",
|
|
6174
|
+
"hardis:files:org:import",
|
|
6175
|
+
"files:hardis:org:import",
|
|
6176
|
+
"files:org:hardis:import",
|
|
6177
|
+
"files:org:import:hardis",
|
|
6178
|
+
"hardis:files:import:org",
|
|
6179
|
+
"files:hardis:import:org",
|
|
6180
|
+
"files:import:hardis:org",
|
|
6181
|
+
"files:import:org:hardis",
|
|
6182
|
+
"hardis:org:import:files",
|
|
6183
|
+
"org:hardis:import:files",
|
|
6184
|
+
"org:import:hardis:files",
|
|
6185
|
+
"org:import:files:hardis",
|
|
6186
|
+
"hardis:import:org:files",
|
|
6187
|
+
"import:hardis:org:files",
|
|
6188
|
+
"import:org:hardis:files",
|
|
6189
|
+
"import:org:files:hardis",
|
|
6190
|
+
"hardis:import:files:org",
|
|
6191
|
+
"import:hardis:files:org",
|
|
6192
|
+
"import:files:hardis:org",
|
|
6193
|
+
"import:files:org:hardis"
|
|
6164
6194
|
]
|
|
6165
6195
|
},
|
|
6166
|
-
"hardis:org:
|
|
6196
|
+
"hardis:org:fix:listviewmine": {
|
|
6167
6197
|
"aliases": [],
|
|
6168
6198
|
"args": {},
|
|
6169
|
-
"description": "
|
|
6199
|
+
"description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
|
|
6170
6200
|
"examples": [
|
|
6171
|
-
"$ sf hardis:org:
|
|
6172
|
-
"$ sf hardis:org:
|
|
6173
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6174
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6201
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
6202
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
6175
6203
|
],
|
|
6176
6204
|
"flags": {
|
|
6177
6205
|
"json": {
|
|
@@ -6189,28 +6217,10 @@
|
|
|
6189
6217
|
"multiple": false,
|
|
6190
6218
|
"type": "option"
|
|
6191
6219
|
},
|
|
6192
|
-
"
|
|
6193
|
-
"char": "e",
|
|
6194
|
-
"description": "Type of EventLogFile event to analyze",
|
|
6195
|
-
"name": "eventtype",
|
|
6196
|
-
"default": "ApiTotalUsage",
|
|
6197
|
-
"hasDynamicHelp": false,
|
|
6198
|
-
"multiple": false,
|
|
6199
|
-
"type": "option"
|
|
6200
|
-
},
|
|
6201
|
-
"limit": {
|
|
6220
|
+
"listviews": {
|
|
6202
6221
|
"char": "l",
|
|
6203
|
-
"description": "
|
|
6204
|
-
"name": "
|
|
6205
|
-
"default": 999,
|
|
6206
|
-
"hasDynamicHelp": false,
|
|
6207
|
-
"multiple": false,
|
|
6208
|
-
"type": "option"
|
|
6209
|
-
},
|
|
6210
|
-
"outputfile": {
|
|
6211
|
-
"char": "f",
|
|
6212
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6213
|
-
"name": "outputfile",
|
|
6222
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
6223
|
+
"name": "listviews",
|
|
6214
6224
|
"hasDynamicHelp": false,
|
|
6215
6225
|
"multiple": false,
|
|
6216
6226
|
"type": "option"
|
|
@@ -6253,57 +6263,59 @@
|
|
|
6253
6263
|
},
|
|
6254
6264
|
"hasDynamicHelp": true,
|
|
6255
6265
|
"hiddenAliases": [],
|
|
6256
|
-
"id": "hardis:org:
|
|
6266
|
+
"id": "hardis:org:fix:listviewmine",
|
|
6257
6267
|
"pluginAlias": "sfdx-hardis",
|
|
6258
6268
|
"pluginName": "sfdx-hardis",
|
|
6259
6269
|
"pluginType": "core",
|
|
6260
6270
|
"strict": true,
|
|
6261
6271
|
"enableJsonFlag": true,
|
|
6262
|
-
"title": "
|
|
6263
|
-
"requiresProject":
|
|
6272
|
+
"title": "Fix listviews with ",
|
|
6273
|
+
"requiresProject": true,
|
|
6264
6274
|
"isESM": true,
|
|
6265
6275
|
"relativePath": [
|
|
6266
6276
|
"lib",
|
|
6267
6277
|
"commands",
|
|
6268
6278
|
"hardis",
|
|
6269
6279
|
"org",
|
|
6270
|
-
"
|
|
6271
|
-
"
|
|
6280
|
+
"fix",
|
|
6281
|
+
"listviewmine.js"
|
|
6272
6282
|
],
|
|
6273
6283
|
"aliasPermutations": [],
|
|
6274
6284
|
"permutations": [
|
|
6275
|
-
"hardis:org:
|
|
6276
|
-
"org:hardis:
|
|
6277
|
-
"org:
|
|
6278
|
-
"org:
|
|
6279
|
-
"hardis:
|
|
6280
|
-
"
|
|
6281
|
-
"
|
|
6282
|
-
"
|
|
6283
|
-
"hardis:
|
|
6284
|
-
"
|
|
6285
|
-
"
|
|
6286
|
-
"
|
|
6287
|
-
"hardis:org:
|
|
6288
|
-
"org:hardis:
|
|
6289
|
-
"org:
|
|
6290
|
-
"org:
|
|
6291
|
-
"hardis:
|
|
6292
|
-
"
|
|
6293
|
-
"
|
|
6294
|
-
"
|
|
6295
|
-
"hardis:
|
|
6296
|
-
"
|
|
6297
|
-
"
|
|
6298
|
-
"
|
|
6299
|
-
]
|
|
6300
|
-
},
|
|
6301
|
-
"hardis:org:
|
|
6302
|
-
"aliases": [],
|
|
6303
|
-
"args": {},
|
|
6304
|
-
"description": "\n**
|
|
6285
|
+
"hardis:org:fix:listviewmine",
|
|
6286
|
+
"org:hardis:fix:listviewmine",
|
|
6287
|
+
"org:fix:hardis:listviewmine",
|
|
6288
|
+
"org:fix:listviewmine:hardis",
|
|
6289
|
+
"hardis:fix:org:listviewmine",
|
|
6290
|
+
"fix:hardis:org:listviewmine",
|
|
6291
|
+
"fix:org:hardis:listviewmine",
|
|
6292
|
+
"fix:org:listviewmine:hardis",
|
|
6293
|
+
"hardis:fix:listviewmine:org",
|
|
6294
|
+
"fix:hardis:listviewmine:org",
|
|
6295
|
+
"fix:listviewmine:hardis:org",
|
|
6296
|
+
"fix:listviewmine:org:hardis",
|
|
6297
|
+
"hardis:org:listviewmine:fix",
|
|
6298
|
+
"org:hardis:listviewmine:fix",
|
|
6299
|
+
"org:listviewmine:hardis:fix",
|
|
6300
|
+
"org:listviewmine:fix:hardis",
|
|
6301
|
+
"hardis:listviewmine:org:fix",
|
|
6302
|
+
"listviewmine:hardis:org:fix",
|
|
6303
|
+
"listviewmine:org:hardis:fix",
|
|
6304
|
+
"listviewmine:org:fix:hardis",
|
|
6305
|
+
"hardis:listviewmine:fix:org",
|
|
6306
|
+
"listviewmine:hardis:fix:org",
|
|
6307
|
+
"listviewmine:fix:hardis:org",
|
|
6308
|
+
"listviewmine:fix:org:hardis"
|
|
6309
|
+
]
|
|
6310
|
+
},
|
|
6311
|
+
"hardis:org:generate:packagexmlfull": {
|
|
6312
|
+
"aliases": [],
|
|
6313
|
+
"args": {},
|
|
6314
|
+
"description": "\n## Command Behavior\n\n**Generates a comprehensive `package.xml` file for a Salesforce org, including all metadata components, even managed ones.**\n\nThis command is essential for various Salesforce development and administration tasks, especially when you need a complete snapshot of an org's metadata. It goes beyond typical source tracking by including managed package components, which is crucial for understanding the full metadata footprint of an org.\n\nKey functionalities:\n\n- **Full Org Metadata Retrieval:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a complete list of all metadata types and their members.\n- **Managed Package Inclusion:** Unlike standard source retrieval, this command explicitly includes metadata from managed packages, providing a truly comprehensive `package.xml`.\n- **Customizable Output:** Allows you to specify the output file path for the generated `package.xml`.\n- **Interactive Org Selection:** If no target org is specified, it interactively prompts the user to choose an org. (or use --no-prompt to skip this step)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce Metadata API Interaction:** It leverages the Salesforce Metadata API to list all available metadata types and then retrieve all components for each type.\n- **`buildOrgManifest` Utility:** The core logic for querying the org's metadata and constructing the `package.xml` is encapsulated within the `buildOrgManifest` utility function.\n- **XML Generation:** It dynamically builds the XML structure of the `package.xml` file, including the `types` and `members` elements for all retrieved metadata.\n- **File System Operations:** It writes the generated `package.xml` file to the specified output path.\n- **Interactive Prompts:** Uses `promptOrgUsernameDefault` to guide the user in selecting the target Salesforce org.\n</details>\n",
|
|
6305
6315
|
"examples": [
|
|
6306
|
-
"$ sf hardis:org:
|
|
6316
|
+
"$ sf hardis:org:generate:packagexmlfull",
|
|
6317
|
+
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
6318
|
+
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
6307
6319
|
],
|
|
6308
6320
|
"flags": {
|
|
6309
6321
|
"json": {
|
|
@@ -6322,20 +6334,12 @@
|
|
|
6322
6334
|
"type": "option"
|
|
6323
6335
|
},
|
|
6324
6336
|
"outputfile": {
|
|
6325
|
-
"
|
|
6326
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6337
|
+
"description": "Output package.xml file",
|
|
6327
6338
|
"name": "outputfile",
|
|
6328
6339
|
"hasDynamicHelp": false,
|
|
6329
6340
|
"multiple": false,
|
|
6330
6341
|
"type": "option"
|
|
6331
6342
|
},
|
|
6332
|
-
"usedonly": {
|
|
6333
|
-
"char": "u",
|
|
6334
|
-
"description": "Filter to have only used licenses",
|
|
6335
|
-
"name": "usedonly",
|
|
6336
|
-
"allowNo": false,
|
|
6337
|
-
"type": "boolean"
|
|
6338
|
-
},
|
|
6339
6343
|
"debug": {
|
|
6340
6344
|
"char": "d",
|
|
6341
6345
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6343,6 +6347,13 @@
|
|
|
6343
6347
|
"allowNo": false,
|
|
6344
6348
|
"type": "boolean"
|
|
6345
6349
|
},
|
|
6350
|
+
"no-prompt": {
|
|
6351
|
+
"char": "n",
|
|
6352
|
+
"description": "Do not prompt for org username, use the default one",
|
|
6353
|
+
"name": "no-prompt",
|
|
6354
|
+
"allowNo": false,
|
|
6355
|
+
"type": "boolean"
|
|
6356
|
+
},
|
|
6346
6357
|
"websocket": {
|
|
6347
6358
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
6348
6359
|
"name": "websocket",
|
|
@@ -6374,13 +6385,13 @@
|
|
|
6374
6385
|
},
|
|
6375
6386
|
"hasDynamicHelp": true,
|
|
6376
6387
|
"hiddenAliases": [],
|
|
6377
|
-
"id": "hardis:org:
|
|
6388
|
+
"id": "hardis:org:generate:packagexmlfull",
|
|
6378
6389
|
"pluginAlias": "sfdx-hardis",
|
|
6379
6390
|
"pluginName": "sfdx-hardis",
|
|
6380
6391
|
"pluginType": "core",
|
|
6381
6392
|
"strict": true,
|
|
6382
6393
|
"enableJsonFlag": true,
|
|
6383
|
-
"title": "
|
|
6394
|
+
"title": "Generate Full Org package.xml",
|
|
6384
6395
|
"requiresProject": false,
|
|
6385
6396
|
"isESM": true,
|
|
6386
6397
|
"relativePath": [
|
|
@@ -6388,43 +6399,43 @@
|
|
|
6388
6399
|
"commands",
|
|
6389
6400
|
"hardis",
|
|
6390
6401
|
"org",
|
|
6391
|
-
"
|
|
6392
|
-
"
|
|
6402
|
+
"generate",
|
|
6403
|
+
"packagexmlfull.js"
|
|
6393
6404
|
],
|
|
6394
6405
|
"aliasPermutations": [],
|
|
6395
6406
|
"permutations": [
|
|
6396
|
-
"hardis:org:
|
|
6397
|
-
"org:hardis:
|
|
6398
|
-
"org:
|
|
6399
|
-
"org:
|
|
6400
|
-
"hardis:
|
|
6401
|
-
"
|
|
6402
|
-
"
|
|
6403
|
-
"
|
|
6404
|
-
"hardis:
|
|
6405
|
-
"
|
|
6406
|
-
"
|
|
6407
|
-
"
|
|
6408
|
-
"hardis:org:
|
|
6409
|
-
"org:hardis:
|
|
6410
|
-
"org:
|
|
6411
|
-
"org:
|
|
6412
|
-
"hardis:
|
|
6413
|
-
"
|
|
6414
|
-
"
|
|
6415
|
-
"
|
|
6416
|
-
"hardis:
|
|
6417
|
-
"
|
|
6418
|
-
"
|
|
6419
|
-
"
|
|
6407
|
+
"hardis:org:generate:packagexmlfull",
|
|
6408
|
+
"org:hardis:generate:packagexmlfull",
|
|
6409
|
+
"org:generate:hardis:packagexmlfull",
|
|
6410
|
+
"org:generate:packagexmlfull:hardis",
|
|
6411
|
+
"hardis:generate:org:packagexmlfull",
|
|
6412
|
+
"generate:hardis:org:packagexmlfull",
|
|
6413
|
+
"generate:org:hardis:packagexmlfull",
|
|
6414
|
+
"generate:org:packagexmlfull:hardis",
|
|
6415
|
+
"hardis:generate:packagexmlfull:org",
|
|
6416
|
+
"generate:hardis:packagexmlfull:org",
|
|
6417
|
+
"generate:packagexmlfull:hardis:org",
|
|
6418
|
+
"generate:packagexmlfull:org:hardis",
|
|
6419
|
+
"hardis:org:packagexmlfull:generate",
|
|
6420
|
+
"org:hardis:packagexmlfull:generate",
|
|
6421
|
+
"org:packagexmlfull:hardis:generate",
|
|
6422
|
+
"org:packagexmlfull:generate:hardis",
|
|
6423
|
+
"hardis:packagexmlfull:org:generate",
|
|
6424
|
+
"packagexmlfull:hardis:org:generate",
|
|
6425
|
+
"packagexmlfull:org:hardis:generate",
|
|
6426
|
+
"packagexmlfull:org:generate:hardis",
|
|
6427
|
+
"hardis:packagexmlfull:generate:org",
|
|
6428
|
+
"packagexmlfull:hardis:generate:org",
|
|
6429
|
+
"packagexmlfull:generate:hardis:org",
|
|
6430
|
+
"packagexmlfull:generate:org:hardis"
|
|
6420
6431
|
]
|
|
6421
6432
|
},
|
|
6422
|
-
"hardis:org:
|
|
6433
|
+
"hardis:org:monitor:all": {
|
|
6423
6434
|
"aliases": [],
|
|
6424
6435
|
"args": {},
|
|
6425
|
-
"description": "
|
|
6436
|
+
"description": "Monitor org, generate reports and sends notifications\n\nYou can disable some commands defining either a **monitoringDisable** property in `.sfdx-hardis.yml`, or a comma separated list in env variable **MONITORING_DISABLE**\n\nExample in .sfdx-hardis.yml:\n \n```yaml\nmonitoringDisable:\n - METADATA_STATUS\n - MISSING_ATTRIBUTES\n - UNUSED_METADATAS\n```\n \nExample in env var:\n\n```sh\nMONITORING_DISABLE=METADATA_STATUS,MISSING_ATTRIBUTES,UNUSED_METADATAS\n```\n\nA [default list of monitoring commands](https://sfdx-hardis.cloudity.com/salesforce-monitoring-home/#monitoring-commands) is used, if you want to override it you can define property **monitoringCommands** in your .sfdx-hardis.yml file\n\nExample:\n\n```yaml\nmonitoringCommands:\n - title: My Custom command\n command: sf my:custom:command\n - title: My Custom command 2\n command: sf my:other:custom:command\n```\n\nYou can force the daily run of all commands by defining env var `MONITORING_IGNORE_FREQUENCY=true`\n\nThe default list of commands is the following:\n\n| Key | Description | Command | Frequency |\n| :---: | :---- | :---- | :-----: |\n| [AUDIT_TRAIL](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | Detect suspect setup actions in major org | [sf hardis:org:diagnose:audittrail](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | daily |\n| [LEGACY_API](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | Detect calls to deprecated API versions | [sf hardis:org:diagnose:legacyapi](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | daily |\n| [ORG_LIMITS](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | Detect if org limits are close to be reached | [sf hardis:org:monitor:limits](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | daily |\n| [UNSECURED_CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | Detect unsecured Connected Apps in an org | [sf hardis:org:diagnose:unsecure-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | daily |\n| [LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | Extract licenses information | [sf hardis:org:diagnose:licenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | weekly |\n| [LINT_ACCESS](https://sfdx-hardis.cloudity.com/hardis/lint/access) | Detect custom elements with no access rights defined in permission sets | [sf hardis:lint:access](https://sfdx-hardis.cloudity.com/hardis/lint/access) | weekly |\n| [UNUSED_LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | Detect permission set licenses that are assigned to users that do not need them | [sf hardis:org:diagnose:unusedlicenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | weekly |\n| [UNUSED_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users without recent logins | [sf hardis:org:diagnose:unusedusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ACTIVE_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users with recent logins | [sf hardis:org:diagnose:unusedusers --returnactiveusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ORG_INFO](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | Get org info + SF instance info + next major upgrade date | [sf hardis:org:diagnose:instanceupgrade](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | weekly |\n| [RELEASE_UPDATES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | Gather warnings about incoming and overdue Release Updates | [sf hardis:org:diagnose:releaseupdates](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | weekly |\n| [UNUSED_METADATAS](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | Detect custom labels and custom permissions that are not in use | [sf hardis:lint:unusedmetadatas](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | weekly |\n| [UNUSED_APEX_CLASSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | Detect unused Apex classes in an org | [sf hardis:org:diagnose:unused-apex-classes](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | weekly |\n| [CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | Detect unused Connected Apps in an org | [sf hardis:org:diagnose:unused-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | weekly |\n| [METADATA_STATUS](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | Detect inactive metadata | [sf hardis:lint:metadatastatus](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | weekly |\n| [MISSING_ATTRIBUTES](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | Detect missing description on custom field | [sf hardis:lint:missingattributes](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | weekly |\n\n",
|
|
6426
6437
|
"examples": [
|
|
6427
|
-
"$ sf hardis:org:
|
|
6438
|
+
"$ sf hardis:org:monitor:all"
|
|
6428
6439
|
],
|
|
6429
6440
|
"flags": {
|
|
6430
6441
|
"json": {
|
|
@@ -6442,14 +6453,6 @@
|
|
|
6442
6453
|
"multiple": false,
|
|
6443
6454
|
"type": "option"
|
|
6444
6455
|
},
|
|
6445
|
-
"outputfile": {
|
|
6446
|
-
"char": "f",
|
|
6447
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6448
|
-
"name": "outputfile",
|
|
6449
|
-
"hasDynamicHelp": false,
|
|
6450
|
-
"multiple": false,
|
|
6451
|
-
"type": "option"
|
|
6452
|
-
},
|
|
6453
6456
|
"debug": {
|
|
6454
6457
|
"char": "d",
|
|
6455
6458
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6488,62 +6491,159 @@
|
|
|
6488
6491
|
},
|
|
6489
6492
|
"hasDynamicHelp": true,
|
|
6490
6493
|
"hiddenAliases": [],
|
|
6491
|
-
"id": "hardis:org:
|
|
6494
|
+
"id": "hardis:org:monitor:all",
|
|
6492
6495
|
"pluginAlias": "sfdx-hardis",
|
|
6493
6496
|
"pluginName": "sfdx-hardis",
|
|
6494
6497
|
"pluginType": "core",
|
|
6495
6498
|
"strict": true,
|
|
6496
6499
|
"enableJsonFlag": true,
|
|
6497
|
-
"title": "
|
|
6498
|
-
"
|
|
6500
|
+
"title": "Monitor org",
|
|
6501
|
+
"monitoringCommandsDefault": [
|
|
6502
|
+
{
|
|
6503
|
+
"key": "AUDIT_TRAIL",
|
|
6504
|
+
"title": "Detect suspect setup actions in major org",
|
|
6505
|
+
"command": "sf hardis:org:diagnose:audittrail",
|
|
6506
|
+
"frequency": "daily"
|
|
6507
|
+
},
|
|
6508
|
+
{
|
|
6509
|
+
"key": "LEGACY_API",
|
|
6510
|
+
"title": "Detect calls to deprecated API versions",
|
|
6511
|
+
"command": "sf hardis:org:diagnose:legacyapi",
|
|
6512
|
+
"frequency": "daily"
|
|
6513
|
+
},
|
|
6514
|
+
{
|
|
6515
|
+
"key": "ORG_LIMITS",
|
|
6516
|
+
"title": "Detect if org limits are close to be reached",
|
|
6517
|
+
"command": "sf hardis:org:monitor:limits",
|
|
6518
|
+
"frequency": "daily"
|
|
6519
|
+
},
|
|
6520
|
+
{
|
|
6521
|
+
"key": "UNSECURED_CONNECTED_APPS",
|
|
6522
|
+
"title": "Detect unsecured Connected Apps in an org",
|
|
6523
|
+
"command": "sf hardis:org:diagnose:unsecure-connected-apps",
|
|
6524
|
+
"frequency": "daily"
|
|
6525
|
+
},
|
|
6526
|
+
{
|
|
6527
|
+
"key": "LICENSES",
|
|
6528
|
+
"title": "Extract licenses information",
|
|
6529
|
+
"command": "sf hardis:org:diagnose:licenses",
|
|
6530
|
+
"frequency": "weekly"
|
|
6531
|
+
},
|
|
6532
|
+
{
|
|
6533
|
+
"key": "LINT_ACCESS",
|
|
6534
|
+
"title": "Detect custom elements with no access rights defined in permission sets",
|
|
6535
|
+
"command": "sf hardis:lint:access",
|
|
6536
|
+
"frequency": "weekly"
|
|
6537
|
+
},
|
|
6538
|
+
{
|
|
6539
|
+
"key": "UNUSED_LICENSES",
|
|
6540
|
+
"title": "Detect permission set licenses that are assigned to users that do not need them",
|
|
6541
|
+
"command": "sf hardis:org:diagnose:unusedlicenses",
|
|
6542
|
+
"frequency": "weekly"
|
|
6543
|
+
},
|
|
6544
|
+
{
|
|
6545
|
+
"key": "UNUSED_USERS",
|
|
6546
|
+
"title": "Detect active users without recent logins",
|
|
6547
|
+
"command": "sf hardis:org:diagnose:unusedusers",
|
|
6548
|
+
"frequency": "weekly"
|
|
6549
|
+
},
|
|
6550
|
+
{
|
|
6551
|
+
"key": "ACTIVE_USERS",
|
|
6552
|
+
"title": "Detect active users with recent logins",
|
|
6553
|
+
"command": "sf hardis:org:diagnose:unusedusers --returnactiveusers",
|
|
6554
|
+
"frequency": "weekly"
|
|
6555
|
+
},
|
|
6556
|
+
{
|
|
6557
|
+
"key": "ORG_INFO",
|
|
6558
|
+
"title": "Get org info + SF instance info + next major upgrade date",
|
|
6559
|
+
"command": "sf hardis:org:diagnose:instanceupgrade",
|
|
6560
|
+
"frequency": "weekly"
|
|
6561
|
+
},
|
|
6562
|
+
{
|
|
6563
|
+
"key": "RELEASE_UPDATES",
|
|
6564
|
+
"title": "Gather warnings about incoming and overdue Release Updates",
|
|
6565
|
+
"command": "sf hardis:org:diagnose:releaseupdates",
|
|
6566
|
+
"frequency": "weekly"
|
|
6567
|
+
},
|
|
6568
|
+
{
|
|
6569
|
+
"key": "UNUSED_METADATAS",
|
|
6570
|
+
"title": "Detect custom labels and custom permissions that are not in use",
|
|
6571
|
+
"command": "sf hardis:lint:unusedmetadatas",
|
|
6572
|
+
"frequency": "weekly"
|
|
6573
|
+
},
|
|
6574
|
+
{
|
|
6575
|
+
"key": "UNUSED_APEX_CLASSES",
|
|
6576
|
+
"title": "Detect unused Apex classes in an org",
|
|
6577
|
+
"command": "sf hardis:org:diagnose:unused-apex-classes",
|
|
6578
|
+
"frequency": "weekly"
|
|
6579
|
+
},
|
|
6580
|
+
{
|
|
6581
|
+
"key": "CONNECTED_APPS",
|
|
6582
|
+
"title": "Detect unused Connected Apps in an org",
|
|
6583
|
+
"command": "sf hardis:org:diagnose:unused-connected-apps",
|
|
6584
|
+
"frequency": "weekly"
|
|
6585
|
+
},
|
|
6586
|
+
{
|
|
6587
|
+
"key": "METADATA_STATUS",
|
|
6588
|
+
"title": "Detect inactive metadata",
|
|
6589
|
+
"command": "sf hardis:lint:metadatastatus",
|
|
6590
|
+
"frequency": "weekly"
|
|
6591
|
+
},
|
|
6592
|
+
{
|
|
6593
|
+
"key": "MISSING_ATTRIBUTES",
|
|
6594
|
+
"title": "Detect missing description on custom field",
|
|
6595
|
+
"command": "sf hardis:lint:missingattributes",
|
|
6596
|
+
"frequency": "weekly"
|
|
6597
|
+
}
|
|
6598
|
+
],
|
|
6599
|
+
"requiresProject": true,
|
|
6600
|
+
"triggerNotification": true,
|
|
6499
6601
|
"isESM": true,
|
|
6500
6602
|
"relativePath": [
|
|
6501
6603
|
"lib",
|
|
6502
6604
|
"commands",
|
|
6503
6605
|
"hardis",
|
|
6504
6606
|
"org",
|
|
6505
|
-
"
|
|
6506
|
-
"
|
|
6607
|
+
"monitor",
|
|
6608
|
+
"all.js"
|
|
6507
6609
|
],
|
|
6508
6610
|
"aliasPermutations": [],
|
|
6509
6611
|
"permutations": [
|
|
6510
|
-
"hardis:org:
|
|
6511
|
-
"org:hardis:
|
|
6512
|
-
"org:
|
|
6513
|
-
"org:
|
|
6514
|
-
"hardis:
|
|
6515
|
-
"
|
|
6516
|
-
"
|
|
6517
|
-
"
|
|
6518
|
-
"hardis:
|
|
6519
|
-
"
|
|
6520
|
-
"
|
|
6521
|
-
"
|
|
6522
|
-
"hardis:org:
|
|
6523
|
-
"org:hardis:
|
|
6524
|
-
"org:
|
|
6525
|
-
"org:
|
|
6526
|
-
"hardis:
|
|
6527
|
-
"
|
|
6528
|
-
"
|
|
6529
|
-
"
|
|
6530
|
-
"hardis:
|
|
6531
|
-
"
|
|
6532
|
-
"
|
|
6533
|
-
"
|
|
6534
|
-
]
|
|
6535
|
-
},
|
|
6536
|
-
"hardis:org:
|
|
6612
|
+
"hardis:org:monitor:all",
|
|
6613
|
+
"org:hardis:monitor:all",
|
|
6614
|
+
"org:monitor:hardis:all",
|
|
6615
|
+
"org:monitor:all:hardis",
|
|
6616
|
+
"hardis:monitor:org:all",
|
|
6617
|
+
"monitor:hardis:org:all",
|
|
6618
|
+
"monitor:org:hardis:all",
|
|
6619
|
+
"monitor:org:all:hardis",
|
|
6620
|
+
"hardis:monitor:all:org",
|
|
6621
|
+
"monitor:hardis:all:org",
|
|
6622
|
+
"monitor:all:hardis:org",
|
|
6623
|
+
"monitor:all:org:hardis",
|
|
6624
|
+
"hardis:org:all:monitor",
|
|
6625
|
+
"org:hardis:all:monitor",
|
|
6626
|
+
"org:all:hardis:monitor",
|
|
6627
|
+
"org:all:monitor:hardis",
|
|
6628
|
+
"hardis:all:org:monitor",
|
|
6629
|
+
"all:hardis:org:monitor",
|
|
6630
|
+
"all:org:hardis:monitor",
|
|
6631
|
+
"all:org:monitor:hardis",
|
|
6632
|
+
"hardis:all:monitor:org",
|
|
6633
|
+
"all:hardis:monitor:org",
|
|
6634
|
+
"all:monitor:hardis:org",
|
|
6635
|
+
"all:monitor:org:hardis"
|
|
6636
|
+
]
|
|
6637
|
+
},
|
|
6638
|
+
"hardis:org:monitor:backup": {
|
|
6537
6639
|
"aliases": [],
|
|
6538
6640
|
"args": {},
|
|
6539
|
-
"description": "
|
|
6641
|
+
"description": "Retrieve sfdx sources in the context of a monitoring backup\n\nThe command exists in 2 modes: filtered(default & recommended) and full.\n\n## Filtered mode (default, better performances)\n\nAutomatically skips metadatas from installed packages with namespace. \n\nYou can remove more metadata types from backup, especially in case you have too many metadatas and that provokes a crash, using:\n\n- Manual update of `manifest/package-skip-items.xml` config file (then commit & push in the same branch)\n\n - Works with full wildcard (`<members>*</members>`) , named metadata (`<members>Account.Name</members>`) or partial wildcards names (`<members>pi__*</members>` , `<members>*__dlm</members>` , or `<members>prefix*suffix</members>`)\n\n- Environment variable MONITORING_BACKUP_SKIP_METADATA_TYPES (example: `MONITORING_BACKUP_SKIP_METADATA_TYPES=CustomLabel,StaticResource,Translation`): that will be applied to all monitoring branches.\n\n## Full mode\n\nActivate it with **--full** parameter, or variable MONITORING_BACKUP_MODE_FULL=true\n\nIgnores filters (namespaces items & manifest/package-skip-items.xml) to retrieve ALL metadatas, including those you might not care about (reports, translations...)\n\nAs we can retrieve only 10000 files by call, the list of all metadatas will be chunked to make multiple calls (and take more time than filtered mode)\n\n- if you use `--full-apply-filters` , manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES filters will be applied anyway\n- if you use `--exclude-namespaces` , namespaced items will be ignored\n\n_With those both options, it's like if you are not using --full, but with chunked metadata download_\n\n## In CI/CD\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-metadata-backup/) and can output Grafana, Slack and MsTeams Notifications.\n\n## Troubleshooting\n\nIf you have unknown errors (it happens !), you can investigate using the full command with smaller chunks.\n\nExample: `sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters --max-by-chunk 500`\n\nIt will allow you the identify the responsible metadata and ignore it using package-skip-items.xml or MONITORING_BACKUP_SKIP_METADATA_TYPES env variable.\n\n## Documentation\n\n[Doc generation (including visual flows)](https://sfdx-hardis.cloudity.com/hardis/doc/project2markdown/) is triggered at the end of the command.\n\nIf you want to also upload HTML Documentation on your Salesforce Org as static resource, use variable **SFDX_HARDIS_DOC_DEPLOY_TO_ORG=\"true\"**\n\nIf you want to also upload HTML Documentation on Cloudflare, use variable **SFDX_HARDIS_DOC_DEPLOY_TO_CLOUDFLARE=\"true\"**\n\n- If you want to generate the documentation in multiple languages, define variable SFDX_DOC_LANGUAGES (ex: SFDX_DOC_LANGUAGES=en,fr,de)\n- You can define one Cloudflare site by language, for example with the following variables:\n - CLOUDFLARE_PROJECT_NAME_EN=cloudity-demo-english\n - CLOUDFLARE_PROJECT_NAME_FR=cloudity-demo-french\n - CLOUDFLARE_PROJECT_NAME_DE=cloudity-demo-german\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n",
|
|
6540
6642
|
"examples": [
|
|
6541
|
-
"$ sf hardis:org:
|
|
6542
|
-
"$ sf hardis:org:
|
|
6543
|
-
"$ sf hardis:org:
|
|
6544
|
-
"$ sf hardis:org:
|
|
6545
|
-
"$ sf hardis:org:diagnose:storage-stats -w \"Status__c = 'Active'\"",
|
|
6546
|
-
"$ sf hardis:org:diagnose:storage-stats -b \"LastModifiedDate\" -w \"IsDeleted = false\""
|
|
6643
|
+
"$ sf hardis:org:monitor:backup",
|
|
6644
|
+
"$ sf hardis:org:monitor:backup --full",
|
|
6645
|
+
"$ sf hardis:org:monitor:backup --full --exclude-namespaces",
|
|
6646
|
+
"$ sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters"
|
|
6547
6647
|
],
|
|
6548
6648
|
"flags": {
|
|
6549
6649
|
"json": {
|
|
@@ -6561,26 +6661,53 @@
|
|
|
6561
6661
|
"multiple": false,
|
|
6562
6662
|
"type": "option"
|
|
6563
6663
|
},
|
|
6564
|
-
"
|
|
6565
|
-
"
|
|
6566
|
-
"
|
|
6567
|
-
"
|
|
6664
|
+
"full": {
|
|
6665
|
+
"description": "Dot not take in account filtering using package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES. Efficient but much much slower !",
|
|
6666
|
+
"name": "full",
|
|
6667
|
+
"allowNo": false,
|
|
6668
|
+
"type": "boolean"
|
|
6669
|
+
},
|
|
6670
|
+
"max-by-chunk": {
|
|
6671
|
+
"char": "m",
|
|
6672
|
+
"description": "If mode --full is activated, maximum number of metadatas in a package.xml chunk",
|
|
6673
|
+
"name": "max-by-chunk",
|
|
6674
|
+
"default": 3000,
|
|
6568
6675
|
"hasDynamicHelp": false,
|
|
6569
6676
|
"multiple": false,
|
|
6570
6677
|
"type": "option"
|
|
6571
6678
|
},
|
|
6572
|
-
"
|
|
6573
|
-
"char": "
|
|
6574
|
-
"description": "
|
|
6575
|
-
"name": "
|
|
6679
|
+
"exclude-namespaces": {
|
|
6680
|
+
"char": "e",
|
|
6681
|
+
"description": "If mode --full is activated, exclude namespaced metadatas",
|
|
6682
|
+
"name": "exclude-namespaces",
|
|
6683
|
+
"allowNo": false,
|
|
6684
|
+
"type": "boolean"
|
|
6685
|
+
},
|
|
6686
|
+
"full-apply-filters": {
|
|
6687
|
+
"char": "z",
|
|
6688
|
+
"description": "If mode --full is activated, apply filters of manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES anyway",
|
|
6689
|
+
"name": "full-apply-filters",
|
|
6690
|
+
"allowNo": false,
|
|
6691
|
+
"type": "boolean"
|
|
6692
|
+
},
|
|
6693
|
+
"start-chunk": {
|
|
6694
|
+
"description": "Use this parameter to troubleshoot a specific chunk. It will be used as the first chunk to retrieve",
|
|
6695
|
+
"name": "start-chunk",
|
|
6696
|
+
"default": 1,
|
|
6576
6697
|
"hasDynamicHelp": false,
|
|
6577
6698
|
"multiple": false,
|
|
6578
6699
|
"type": "option"
|
|
6579
6700
|
},
|
|
6580
|
-
"
|
|
6581
|
-
"
|
|
6582
|
-
"
|
|
6583
|
-
"
|
|
6701
|
+
"skip-doc": {
|
|
6702
|
+
"description": "Skip the generation of project documentation at the end of the command",
|
|
6703
|
+
"name": "skip-doc",
|
|
6704
|
+
"allowNo": false,
|
|
6705
|
+
"type": "boolean"
|
|
6706
|
+
},
|
|
6707
|
+
"outputfile": {
|
|
6708
|
+
"char": "f",
|
|
6709
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6710
|
+
"name": "outputfile",
|
|
6584
6711
|
"hasDynamicHelp": false,
|
|
6585
6712
|
"multiple": false,
|
|
6586
6713
|
"type": "option"
|
|
@@ -6623,57 +6750,58 @@
|
|
|
6623
6750
|
},
|
|
6624
6751
|
"hasDynamicHelp": true,
|
|
6625
6752
|
"hiddenAliases": [],
|
|
6626
|
-
"id": "hardis:org:
|
|
6753
|
+
"id": "hardis:org:monitor:backup",
|
|
6627
6754
|
"pluginAlias": "sfdx-hardis",
|
|
6628
6755
|
"pluginName": "sfdx-hardis",
|
|
6629
6756
|
"pluginType": "core",
|
|
6630
6757
|
"strict": true,
|
|
6631
6758
|
"enableJsonFlag": true,
|
|
6632
|
-
"title": "
|
|
6759
|
+
"title": "Backup DX sources",
|
|
6633
6760
|
"requiresProject": true,
|
|
6761
|
+
"triggerNotification": true,
|
|
6634
6762
|
"isESM": true,
|
|
6635
6763
|
"relativePath": [
|
|
6636
6764
|
"lib",
|
|
6637
6765
|
"commands",
|
|
6638
6766
|
"hardis",
|
|
6639
6767
|
"org",
|
|
6640
|
-
"
|
|
6641
|
-
"
|
|
6768
|
+
"monitor",
|
|
6769
|
+
"backup.js"
|
|
6642
6770
|
],
|
|
6643
6771
|
"aliasPermutations": [],
|
|
6644
6772
|
"permutations": [
|
|
6645
|
-
"hardis:org:
|
|
6646
|
-
"org:hardis:
|
|
6647
|
-
"org:
|
|
6648
|
-
"org:
|
|
6649
|
-
"hardis:
|
|
6650
|
-
"
|
|
6651
|
-
"
|
|
6652
|
-
"
|
|
6653
|
-
"hardis:
|
|
6654
|
-
"
|
|
6655
|
-
"
|
|
6656
|
-
"
|
|
6657
|
-
"hardis:org:
|
|
6658
|
-
"org:hardis:
|
|
6659
|
-
"org:
|
|
6660
|
-
"org:
|
|
6661
|
-
"hardis:
|
|
6662
|
-
"
|
|
6663
|
-
"
|
|
6664
|
-
"
|
|
6665
|
-
"hardis:
|
|
6666
|
-
"
|
|
6667
|
-
"
|
|
6668
|
-
"
|
|
6773
|
+
"hardis:org:monitor:backup",
|
|
6774
|
+
"org:hardis:monitor:backup",
|
|
6775
|
+
"org:monitor:hardis:backup",
|
|
6776
|
+
"org:monitor:backup:hardis",
|
|
6777
|
+
"hardis:monitor:org:backup",
|
|
6778
|
+
"monitor:hardis:org:backup",
|
|
6779
|
+
"monitor:org:hardis:backup",
|
|
6780
|
+
"monitor:org:backup:hardis",
|
|
6781
|
+
"hardis:monitor:backup:org",
|
|
6782
|
+
"monitor:hardis:backup:org",
|
|
6783
|
+
"monitor:backup:hardis:org",
|
|
6784
|
+
"monitor:backup:org:hardis",
|
|
6785
|
+
"hardis:org:backup:monitor",
|
|
6786
|
+
"org:hardis:backup:monitor",
|
|
6787
|
+
"org:backup:hardis:monitor",
|
|
6788
|
+
"org:backup:monitor:hardis",
|
|
6789
|
+
"hardis:backup:org:monitor",
|
|
6790
|
+
"backup:hardis:org:monitor",
|
|
6791
|
+
"backup:org:hardis:monitor",
|
|
6792
|
+
"backup:org:monitor:hardis",
|
|
6793
|
+
"hardis:backup:monitor:org",
|
|
6794
|
+
"backup:hardis:monitor:org",
|
|
6795
|
+
"backup:monitor:hardis:org",
|
|
6796
|
+
"backup:monitor:org:hardis"
|
|
6669
6797
|
]
|
|
6670
6798
|
},
|
|
6671
|
-
"hardis:org:
|
|
6799
|
+
"hardis:org:monitor:limits": {
|
|
6672
6800
|
"aliases": [],
|
|
6673
6801
|
"args": {},
|
|
6674
|
-
"description": "\n## Command Behavior\n\n**
|
|
6802
|
+
"description": "\n## Command Behavior\n\n**Checks the current usage of various Salesforce org limits and sends notifications if thresholds are exceeded.**\n\nThis command is a critical component of proactive Salesforce org management, helping administrators and developers monitor resource consumption and prevent hitting critical limits that could impact performance or functionality. It provides early warnings when limits are approaching their capacity.\n\nKey functionalities:\n\n- **Limit Retrieval:** Fetches a comprehensive list of all Salesforce org limits using the Salesforce CLI.\n- **Usage Calculation:** Calculates the percentage of each limit that is currently being used.\n- **Threshold-Based Alerting:** Assigns a severity (success, warning, or error) to each limit based on configurable thresholds:\n - **Warning:** If usage exceeds 50% (configurable via `LIMIT_THRESHOLD_WARNING` environment variable).\n - **Error:** If usage exceeds 75% (configurable via `LIMIT_THRESHOLD_ERROR` environment variable).\n- **CSV Report Generation:** Generates a CSV file containing all org limits, their current usage, maximum allowed, and calculated percentage used, along with the assigned severity.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of limits that have exceeded the warning or error thresholds.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-limits/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce CLI Integration:** It executes the `sf org limits list` command to retrieve the current org limits. It parses the JSON output of this command.\n- **Data Processing:** It iterates through the retrieved limits, calculates the `used` and `percentUsed` values, and assigns a `severity` (success, warning, error) based on the configured thresholds.\n- **Environment Variable Configuration:** Reads `LIMIT_THRESHOLD_WARNING` and `LIMIT_THRESHOLD_ERROR` environment variables to set the warning and error thresholds for limit usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of org limits.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and detailed metrics for each limit, which can be consumed by monitoring dashboards like Grafana.\n- **Exit Code Management:** Sets the process exit code to 1 if any limit is in an 'error' state, indicating a critical issue.\n</details>\n",
|
|
6675
6803
|
"examples": [
|
|
6676
|
-
"$ sf hardis:org:
|
|
6804
|
+
"$ sf hardis:org:monitor:limits"
|
|
6677
6805
|
],
|
|
6678
6806
|
"flags": {
|
|
6679
6807
|
"json": {
|
|
@@ -6737,58 +6865,61 @@
|
|
|
6737
6865
|
},
|
|
6738
6866
|
"hasDynamicHelp": true,
|
|
6739
6867
|
"hiddenAliases": [],
|
|
6740
|
-
"id": "hardis:org:
|
|
6868
|
+
"id": "hardis:org:monitor:limits",
|
|
6741
6869
|
"pluginAlias": "sfdx-hardis",
|
|
6742
6870
|
"pluginName": "sfdx-hardis",
|
|
6743
6871
|
"pluginType": "core",
|
|
6744
6872
|
"strict": true,
|
|
6745
6873
|
"enableJsonFlag": true,
|
|
6746
|
-
"title": "
|
|
6747
|
-
"requiresProject":
|
|
6874
|
+
"title": "Check org limits",
|
|
6875
|
+
"requiresProject": true,
|
|
6876
|
+
"triggerNotification": true,
|
|
6748
6877
|
"isESM": true,
|
|
6749
6878
|
"relativePath": [
|
|
6750
6879
|
"lib",
|
|
6751
6880
|
"commands",
|
|
6752
6881
|
"hardis",
|
|
6753
6882
|
"org",
|
|
6754
|
-
"
|
|
6755
|
-
"
|
|
6883
|
+
"monitor",
|
|
6884
|
+
"limits.js"
|
|
6756
6885
|
],
|
|
6757
6886
|
"aliasPermutations": [],
|
|
6758
6887
|
"permutations": [
|
|
6759
|
-
"hardis:org:
|
|
6760
|
-
"org:hardis:
|
|
6761
|
-
"org:
|
|
6762
|
-
"org:
|
|
6763
|
-
"hardis:
|
|
6764
|
-
"
|
|
6765
|
-
"
|
|
6766
|
-
"
|
|
6767
|
-
"hardis:
|
|
6768
|
-
"
|
|
6769
|
-
"
|
|
6770
|
-
"
|
|
6771
|
-
"hardis:org:
|
|
6772
|
-
"org:hardis:
|
|
6773
|
-
"org:
|
|
6774
|
-
"org:
|
|
6775
|
-
"hardis:
|
|
6776
|
-
"
|
|
6777
|
-
"
|
|
6778
|
-
"
|
|
6779
|
-
"hardis:
|
|
6780
|
-
"
|
|
6781
|
-
"
|
|
6782
|
-
"
|
|
6888
|
+
"hardis:org:monitor:limits",
|
|
6889
|
+
"org:hardis:monitor:limits",
|
|
6890
|
+
"org:monitor:hardis:limits",
|
|
6891
|
+
"org:monitor:limits:hardis",
|
|
6892
|
+
"hardis:monitor:org:limits",
|
|
6893
|
+
"monitor:hardis:org:limits",
|
|
6894
|
+
"monitor:org:hardis:limits",
|
|
6895
|
+
"monitor:org:limits:hardis",
|
|
6896
|
+
"hardis:monitor:limits:org",
|
|
6897
|
+
"monitor:hardis:limits:org",
|
|
6898
|
+
"monitor:limits:hardis:org",
|
|
6899
|
+
"monitor:limits:org:hardis",
|
|
6900
|
+
"hardis:org:limits:monitor",
|
|
6901
|
+
"org:hardis:limits:monitor",
|
|
6902
|
+
"org:limits:hardis:monitor",
|
|
6903
|
+
"org:limits:monitor:hardis",
|
|
6904
|
+
"hardis:limits:org:monitor",
|
|
6905
|
+
"limits:hardis:org:monitor",
|
|
6906
|
+
"limits:org:hardis:monitor",
|
|
6907
|
+
"limits:org:monitor:hardis",
|
|
6908
|
+
"hardis:limits:monitor:org",
|
|
6909
|
+
"limits:hardis:monitor:org",
|
|
6910
|
+
"limits:monitor:hardis:org",
|
|
6911
|
+
"limits:monitor:org:hardis"
|
|
6783
6912
|
]
|
|
6784
6913
|
},
|
|
6785
|
-
"hardis:org:diagnose:
|
|
6914
|
+
"hardis:org:diagnose:audittrail": {
|
|
6786
6915
|
"aliases": [],
|
|
6787
6916
|
"args": {},
|
|
6788
|
-
"description": "
|
|
6917
|
+
"description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nAlso detects updates of Custom Settings values (disable by defining `SKIP_AUDIT_TRAIL_CUSTOM_SETTINGS=true`)\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n - revokeduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n - CSPUserDisabled\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- External Objects\n - xdsEncryptedFieldChange\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n - siqUserAcceptedTOS\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedofflineuseroffon\n - changedprofileforuserstdtostd\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserAdminVerifiedStatusVerified\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedusername\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - changedUserPhoneVerifiedStatusVerified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suNetworkAdminLogin\n - suNetworkAdminLogout\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\n## Excel output example\n\n\n\n## Local output example\n\n\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-suspect-audit-trail/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
6789
6918
|
"examples": [
|
|
6790
|
-
"$ sf hardis:org:diagnose:
|
|
6791
|
-
"$ sf hardis:org:diagnose:
|
|
6919
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
6920
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
6921
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
6922
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
6792
6923
|
],
|
|
6793
6924
|
"flags": {
|
|
6794
6925
|
"json": {
|
|
@@ -6806,18 +6937,26 @@
|
|
|
6806
6937
|
"multiple": false,
|
|
6807
6938
|
"type": "option"
|
|
6808
6939
|
},
|
|
6809
|
-
"
|
|
6810
|
-
"char": "
|
|
6811
|
-
"description": "
|
|
6812
|
-
"name": "
|
|
6940
|
+
"excludeusers": {
|
|
6941
|
+
"char": "e",
|
|
6942
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
6943
|
+
"name": "excludeusers",
|
|
6813
6944
|
"hasDynamicHelp": false,
|
|
6814
6945
|
"multiple": false,
|
|
6815
6946
|
"type": "option"
|
|
6816
6947
|
},
|
|
6817
|
-
"
|
|
6948
|
+
"lastndays": {
|
|
6818
6949
|
"char": "t",
|
|
6819
|
-
"description": "
|
|
6820
|
-
"name": "
|
|
6950
|
+
"description": "Number of days to extract from today (included)",
|
|
6951
|
+
"name": "lastndays",
|
|
6952
|
+
"hasDynamicHelp": false,
|
|
6953
|
+
"multiple": false,
|
|
6954
|
+
"type": "option"
|
|
6955
|
+
},
|
|
6956
|
+
"outputfile": {
|
|
6957
|
+
"char": "f",
|
|
6958
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6959
|
+
"name": "outputfile",
|
|
6821
6960
|
"hasDynamicHelp": false,
|
|
6822
6961
|
"multiple": false,
|
|
6823
6962
|
"type": "option"
|
|
@@ -6860,13 +6999,13 @@
|
|
|
6860
6999
|
},
|
|
6861
7000
|
"hasDynamicHelp": true,
|
|
6862
7001
|
"hiddenAliases": [],
|
|
6863
|
-
"id": "hardis:org:diagnose:
|
|
7002
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
6864
7003
|
"pluginAlias": "sfdx-hardis",
|
|
6865
7004
|
"pluginName": "sfdx-hardis",
|
|
6866
7005
|
"pluginType": "core",
|
|
6867
7006
|
"strict": true,
|
|
6868
7007
|
"enableJsonFlag": true,
|
|
6869
|
-
"title": "
|
|
7008
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
6870
7009
|
"requiresProject": false,
|
|
6871
7010
|
"isESM": true,
|
|
6872
7011
|
"relativePath": [
|
|
@@ -6875,42 +7014,42 @@
|
|
|
6875
7014
|
"hardis",
|
|
6876
7015
|
"org",
|
|
6877
7016
|
"diagnose",
|
|
6878
|
-
"
|
|
7017
|
+
"audittrail.js"
|
|
6879
7018
|
],
|
|
6880
7019
|
"aliasPermutations": [],
|
|
6881
7020
|
"permutations": [
|
|
6882
|
-
"hardis:org:diagnose:
|
|
6883
|
-
"org:hardis:diagnose:
|
|
6884
|
-
"org:diagnose:hardis:
|
|
6885
|
-
"org:diagnose:
|
|
6886
|
-
"hardis:diagnose:org:
|
|
6887
|
-
"diagnose:hardis:org:
|
|
6888
|
-
"diagnose:org:hardis:
|
|
6889
|
-
"diagnose:org:
|
|
6890
|
-
"hardis:diagnose:
|
|
6891
|
-
"diagnose:hardis:
|
|
6892
|
-
"diagnose:
|
|
6893
|
-
"diagnose:
|
|
6894
|
-
"hardis:org:
|
|
6895
|
-
"org:hardis:
|
|
6896
|
-
"org:
|
|
6897
|
-
"org:
|
|
6898
|
-
"hardis:
|
|
6899
|
-
"
|
|
6900
|
-
"
|
|
6901
|
-
"
|
|
6902
|
-
"hardis:
|
|
6903
|
-
"
|
|
6904
|
-
"
|
|
6905
|
-
"
|
|
7021
|
+
"hardis:org:diagnose:audittrail",
|
|
7022
|
+
"org:hardis:diagnose:audittrail",
|
|
7023
|
+
"org:diagnose:hardis:audittrail",
|
|
7024
|
+
"org:diagnose:audittrail:hardis",
|
|
7025
|
+
"hardis:diagnose:org:audittrail",
|
|
7026
|
+
"diagnose:hardis:org:audittrail",
|
|
7027
|
+
"diagnose:org:hardis:audittrail",
|
|
7028
|
+
"diagnose:org:audittrail:hardis",
|
|
7029
|
+
"hardis:diagnose:audittrail:org",
|
|
7030
|
+
"diagnose:hardis:audittrail:org",
|
|
7031
|
+
"diagnose:audittrail:hardis:org",
|
|
7032
|
+
"diagnose:audittrail:org:hardis",
|
|
7033
|
+
"hardis:org:audittrail:diagnose",
|
|
7034
|
+
"org:hardis:audittrail:diagnose",
|
|
7035
|
+
"org:audittrail:hardis:diagnose",
|
|
7036
|
+
"org:audittrail:diagnose:hardis",
|
|
7037
|
+
"hardis:audittrail:org:diagnose",
|
|
7038
|
+
"audittrail:hardis:org:diagnose",
|
|
7039
|
+
"audittrail:org:hardis:diagnose",
|
|
7040
|
+
"audittrail:org:diagnose:hardis",
|
|
7041
|
+
"hardis:audittrail:diagnose:org",
|
|
7042
|
+
"audittrail:hardis:diagnose:org",
|
|
7043
|
+
"audittrail:diagnose:hardis:org",
|
|
7044
|
+
"audittrail:diagnose:org:hardis"
|
|
6906
7045
|
]
|
|
6907
7046
|
},
|
|
6908
|
-
"hardis:org:diagnose:
|
|
7047
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
6909
7048
|
"aliases": [],
|
|
6910
7049
|
"args": {},
|
|
6911
|
-
"description": "\n## Command Behavior\n\n**
|
|
7050
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the scheduled upgrade date for a Salesforce org's instance.**\n\nThis command provides crucial information about when your Salesforce instance will be upgraded to the next major release (Spring, Summer, or Winter). This is vital for release planning, testing, and ensuring compatibility with upcoming Salesforce features.\n\nKey functionalities:\n\n- **Instance Identification:** Determines the Salesforce instance name of your target org.\n- **Upgrade Date Retrieval:** Fetches the planned start time of the next major core service upgrade for that instance from the Salesforce Status API.\n- **Days Until Upgrade:** Calculates and displays the number of days remaining until the next major upgrade.\n- **Severity-Based Logging:** Adjusts the log severity (info, warning) based on the proximity of the upgrade date, providing a visual cue for urgency.\n- **Notifications:** Sends notifications to configured channels (e.g., Slack, MS Teams, Grafana) with the upgrade information, making it suitable for automated monitoring.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the `Organization` object in Salesforce to get the `InstanceName` of the target org.\n- **Salesforce Status API Integration:** It makes an HTTP GET request to the Salesforce Status API (`https://api.status.salesforce.com/v1/instances/{instanceName}/status`) to retrieve detailed information about the instance, including scheduled maintenances.\n- **Data Parsing:** It parses the JSON response from the Status API to extract the relevant major release upgrade information.\n- **Date Calculation:** Uses the `moment` library to calculate the difference in days between the current date and the planned upgrade date.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including the instance name, upgrade date, and days remaining, along with relevant metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the upgrade status and proximity.\n</details>\n",
|
|
6912
7051
|
"examples": [
|
|
6913
|
-
"$ sf hardis:org:diagnose:
|
|
7052
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
6914
7053
|
],
|
|
6915
7054
|
"flags": {
|
|
6916
7055
|
"json": {
|
|
@@ -6928,14 +7067,6 @@
|
|
|
6928
7067
|
"multiple": false,
|
|
6929
7068
|
"type": "option"
|
|
6930
7069
|
},
|
|
6931
|
-
"outputfile": {
|
|
6932
|
-
"char": "f",
|
|
6933
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6934
|
-
"name": "outputfile",
|
|
6935
|
-
"hasDynamicHelp": false,
|
|
6936
|
-
"multiple": false,
|
|
6937
|
-
"type": "option"
|
|
6938
|
-
},
|
|
6939
7070
|
"debug": {
|
|
6940
7071
|
"char": "d",
|
|
6941
7072
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6974,30 +7105,13 @@
|
|
|
6974
7105
|
},
|
|
6975
7106
|
"hasDynamicHelp": true,
|
|
6976
7107
|
"hiddenAliases": [],
|
|
6977
|
-
"id": "hardis:org:diagnose:
|
|
7108
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
6978
7109
|
"pluginAlias": "sfdx-hardis",
|
|
6979
7110
|
"pluginName": "sfdx-hardis",
|
|
6980
7111
|
"pluginType": "core",
|
|
6981
7112
|
"strict": true,
|
|
6982
7113
|
"enableJsonFlag": true,
|
|
6983
|
-
"title": "
|
|
6984
|
-
"allowedInactiveConnectedApps": [
|
|
6985
|
-
"Ant Migration Tool",
|
|
6986
|
-
"Chatter Desktop",
|
|
6987
|
-
"Chatter Mobile for BlackBerry",
|
|
6988
|
-
"Force.com IDE",
|
|
6989
|
-
"OIQ_Integration",
|
|
6990
|
-
"Salesforce CLI",
|
|
6991
|
-
"Salesforce Files",
|
|
6992
|
-
"Salesforce Mobile Dashboards",
|
|
6993
|
-
"Salesforce Touch",
|
|
6994
|
-
"Salesforce for Outlook",
|
|
6995
|
-
"SalesforceA",
|
|
6996
|
-
"SalesforceA for Android",
|
|
6997
|
-
"SalesforceA for iOS",
|
|
6998
|
-
"SalesforceDX Namespace Registry",
|
|
6999
|
-
"SalesforceIQ"
|
|
7000
|
-
],
|
|
7114
|
+
"title": "Get Instance Upgrade date",
|
|
7001
7115
|
"requiresProject": false,
|
|
7002
7116
|
"isESM": true,
|
|
7003
7117
|
"relativePath": [
|
|
@@ -7006,43 +7120,45 @@
|
|
|
7006
7120
|
"hardis",
|
|
7007
7121
|
"org",
|
|
7008
7122
|
"diagnose",
|
|
7009
|
-
"
|
|
7123
|
+
"instanceupgrade.js"
|
|
7010
7124
|
],
|
|
7011
7125
|
"aliasPermutations": [],
|
|
7012
7126
|
"permutations": [
|
|
7013
|
-
"hardis:org:diagnose:
|
|
7014
|
-
"org:hardis:diagnose:
|
|
7015
|
-
"org:diagnose:hardis:
|
|
7016
|
-
"org:diagnose:
|
|
7017
|
-
"hardis:diagnose:org:
|
|
7018
|
-
"diagnose:hardis:org:
|
|
7019
|
-
"diagnose:org:hardis:
|
|
7020
|
-
"diagnose:org:
|
|
7021
|
-
"hardis:diagnose:
|
|
7022
|
-
"diagnose:hardis:
|
|
7023
|
-
"diagnose:
|
|
7024
|
-
"diagnose:
|
|
7025
|
-
"hardis:org:
|
|
7026
|
-
"org:hardis:
|
|
7027
|
-
"org:
|
|
7028
|
-
"org:
|
|
7029
|
-
"hardis:
|
|
7030
|
-
"
|
|
7031
|
-
"
|
|
7032
|
-
"
|
|
7033
|
-
"hardis:
|
|
7034
|
-
"
|
|
7035
|
-
"
|
|
7036
|
-
"
|
|
7127
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
7128
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
7129
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
7130
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
7131
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
7132
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
7133
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
7134
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
7135
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
7136
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
7137
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
7138
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
7139
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
7140
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
7141
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
7142
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
7143
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
7144
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
7145
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
7146
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
7147
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
7148
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
7149
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
7150
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
7037
7151
|
]
|
|
7038
7152
|
},
|
|
7039
|
-
"hardis:org:diagnose:
|
|
7153
|
+
"hardis:org:diagnose:legacyapi": {
|
|
7040
7154
|
"aliases": [],
|
|
7041
7155
|
"args": {},
|
|
7042
|
-
"description": "
|
|
7156
|
+
"description": "Checks if an org uses retired or someday retired API version\n\n\nSee article below\n\n[](https://nicolas.vuillamy.fr/handle-salesforce-api-versions-deprecation-like-a-pro-335065f52238)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-deprecated-api-calls/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
7043
7157
|
"examples": [
|
|
7044
|
-
"$ sf hardis:org:diagnose:
|
|
7045
|
-
"$ sf hardis:org:diagnose:
|
|
7158
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
7159
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
7160
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
7161
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
7046
7162
|
],
|
|
7047
7163
|
"flags": {
|
|
7048
7164
|
"json": {
|
|
@@ -7060,6 +7176,24 @@
|
|
|
7060
7176
|
"multiple": false,
|
|
7061
7177
|
"type": "option"
|
|
7062
7178
|
},
|
|
7179
|
+
"eventtype": {
|
|
7180
|
+
"char": "e",
|
|
7181
|
+
"description": "Type of EventLogFile event to analyze",
|
|
7182
|
+
"name": "eventtype",
|
|
7183
|
+
"default": "ApiTotalUsage",
|
|
7184
|
+
"hasDynamicHelp": false,
|
|
7185
|
+
"multiple": false,
|
|
7186
|
+
"type": "option"
|
|
7187
|
+
},
|
|
7188
|
+
"limit": {
|
|
7189
|
+
"char": "l",
|
|
7190
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
7191
|
+
"name": "limit",
|
|
7192
|
+
"default": 999,
|
|
7193
|
+
"hasDynamicHelp": false,
|
|
7194
|
+
"multiple": false,
|
|
7195
|
+
"type": "option"
|
|
7196
|
+
},
|
|
7063
7197
|
"outputfile": {
|
|
7064
7198
|
"char": "f",
|
|
7065
7199
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -7106,32 +7240,14 @@
|
|
|
7106
7240
|
},
|
|
7107
7241
|
"hasDynamicHelp": true,
|
|
7108
7242
|
"hiddenAliases": [],
|
|
7109
|
-
"id": "hardis:org:diagnose:
|
|
7243
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
7110
7244
|
"pluginAlias": "sfdx-hardis",
|
|
7111
7245
|
"pluginName": "sfdx-hardis",
|
|
7112
7246
|
"pluginType": "core",
|
|
7113
7247
|
"strict": true,
|
|
7114
7248
|
"enableJsonFlag": true,
|
|
7115
|
-
"title": "
|
|
7249
|
+
"title": "Check for legacy API use",
|
|
7116
7250
|
"requiresProject": false,
|
|
7117
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
7118
|
-
"Sales_User"
|
|
7119
|
-
],
|
|
7120
|
-
"permSetsPermSetLicenses": [
|
|
7121
|
-
{
|
|
7122
|
-
"permSet": "Sales_User",
|
|
7123
|
-
"permSetLicense": "SalesUserPsl"
|
|
7124
|
-
}
|
|
7125
|
-
],
|
|
7126
|
-
"profilesPermissionSetLicenses": [
|
|
7127
|
-
{
|
|
7128
|
-
"profile": "Salesforce API Only",
|
|
7129
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
7130
|
-
}
|
|
7131
|
-
],
|
|
7132
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
7133
|
-
"IdentityConnect"
|
|
7134
|
-
],
|
|
7135
7251
|
"isESM": true,
|
|
7136
7252
|
"relativePath": [
|
|
7137
7253
|
"lib",
|
|
@@ -7139,46 +7255,42 @@
|
|
|
7139
7255
|
"hardis",
|
|
7140
7256
|
"org",
|
|
7141
7257
|
"diagnose",
|
|
7142
|
-
"
|
|
7258
|
+
"legacyapi.js"
|
|
7143
7259
|
],
|
|
7144
7260
|
"aliasPermutations": [],
|
|
7145
7261
|
"permutations": [
|
|
7146
|
-
"hardis:org:diagnose:
|
|
7147
|
-
"org:hardis:diagnose:
|
|
7148
|
-
"org:diagnose:hardis:
|
|
7149
|
-
"org:diagnose:
|
|
7150
|
-
"hardis:diagnose:org:
|
|
7151
|
-
"diagnose:hardis:org:
|
|
7152
|
-
"diagnose:org:hardis:
|
|
7153
|
-
"diagnose:org:
|
|
7154
|
-
"hardis:diagnose:
|
|
7155
|
-
"diagnose:hardis:
|
|
7156
|
-
"diagnose:
|
|
7157
|
-
"diagnose:
|
|
7158
|
-
"hardis:org:
|
|
7159
|
-
"org:hardis:
|
|
7160
|
-
"org:
|
|
7161
|
-
"org:
|
|
7162
|
-
"hardis:
|
|
7163
|
-
"
|
|
7164
|
-
"
|
|
7165
|
-
"
|
|
7166
|
-
"hardis:
|
|
7167
|
-
"
|
|
7168
|
-
"
|
|
7169
|
-
"
|
|
7262
|
+
"hardis:org:diagnose:legacyapi",
|
|
7263
|
+
"org:hardis:diagnose:legacyapi",
|
|
7264
|
+
"org:diagnose:hardis:legacyapi",
|
|
7265
|
+
"org:diagnose:legacyapi:hardis",
|
|
7266
|
+
"hardis:diagnose:org:legacyapi",
|
|
7267
|
+
"diagnose:hardis:org:legacyapi",
|
|
7268
|
+
"diagnose:org:hardis:legacyapi",
|
|
7269
|
+
"diagnose:org:legacyapi:hardis",
|
|
7270
|
+
"hardis:diagnose:legacyapi:org",
|
|
7271
|
+
"diagnose:hardis:legacyapi:org",
|
|
7272
|
+
"diagnose:legacyapi:hardis:org",
|
|
7273
|
+
"diagnose:legacyapi:org:hardis",
|
|
7274
|
+
"hardis:org:legacyapi:diagnose",
|
|
7275
|
+
"org:hardis:legacyapi:diagnose",
|
|
7276
|
+
"org:legacyapi:hardis:diagnose",
|
|
7277
|
+
"org:legacyapi:diagnose:hardis",
|
|
7278
|
+
"hardis:legacyapi:org:diagnose",
|
|
7279
|
+
"legacyapi:hardis:org:diagnose",
|
|
7280
|
+
"legacyapi:org:hardis:diagnose",
|
|
7281
|
+
"legacyapi:org:diagnose:hardis",
|
|
7282
|
+
"hardis:legacyapi:diagnose:org",
|
|
7283
|
+
"legacyapi:hardis:diagnose:org",
|
|
7284
|
+
"legacyapi:diagnose:hardis:org",
|
|
7285
|
+
"legacyapi:diagnose:org:hardis"
|
|
7170
7286
|
]
|
|
7171
7287
|
},
|
|
7172
|
-
"hardis:org:diagnose:
|
|
7288
|
+
"hardis:org:diagnose:licenses": {
|
|
7173
7289
|
"aliases": [],
|
|
7174
7290
|
"args": {},
|
|
7175
|
-
"description": "\n
|
|
7291
|
+
"description": "\n**Lists and analyzes User Licenses and Permission Set Licenses subscribed and used in a Salesforce org.**\n\nThis command provides a comprehensive overview of your Salesforce license consumption. It's particularly useful for:\n\n- **License Management:** Understanding which licenses are active, how many are available, and how many are being used.\n- **Cost Optimization:** Identifying unused or underutilized licenses that could be reallocated or decommissioned.\n- **Compliance:** Ensuring that your organization is compliant with Salesforce licensing agreements.\n- **Monitoring:** Tracking license usage trends over time.\n\nKey functionalities:\n\n- **User License Details:** Retrieves information about standard and custom User Licenses, including `MasterLabel`, `Name`, `TotalLicenses`, and `UsedLicenses`.\n- **Permission Set License Details:** Retrieves information about Permission Set Licenses, including `MasterLabel`, `PermissionSetLicenseKey`, `TotalLicenses`, and `UsedLicenses`.\n- **Used Licenses Filter:** The `--usedonly` flag allows you to filter the report to show only licenses that have at least one `UsedLicenses` count greater than zero.\n- **CSV Report Generation:** Generates a CSV file containing all the retrieved license information, suitable for detailed analysis.\n- **Notifications:** Sends notifications to configured channels (e.g., Grafana, Slack, MS Teams) with a summary of license usage, including lists of active and used licenses.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It executes SOQL queries against the `UserLicense` and `PermissionSetLicense` objects in Salesforce to retrieve license data.\n- **Data Transformation:** It processes the query results, reformatting the data to be more readable and consistent for reporting purposes (e.g., removing `Id` and `attributes`, renaming `PermissionSetLicenseKey` to `Name`).\n- **Data Aggregation:** It aggregates license information, creating a `licensesByKey` object for quick lookups and a `usedLicenses` array for a concise list of actively used licenses.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of license data.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the license extraction process and the used licenses.\n</details>\n",
|
|
7176
7292
|
"examples": [
|
|
7177
|
-
"$ sf hardis:org:diagnose:
|
|
7178
|
-
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
7179
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
7180
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7181
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7293
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
7182
7294
|
],
|
|
7183
7295
|
"flags": {
|
|
7184
7296
|
"json": {
|
|
@@ -7204,40 +7316,12 @@
|
|
|
7204
7316
|
"multiple": false,
|
|
7205
7317
|
"type": "option"
|
|
7206
7318
|
},
|
|
7207
|
-
"
|
|
7208
|
-
"char": "
|
|
7209
|
-
"description": "
|
|
7210
|
-
"name": "
|
|
7211
|
-
"
|
|
7212
|
-
"
|
|
7213
|
-
"type": "option"
|
|
7214
|
-
},
|
|
7215
|
-
"licensetypes": {
|
|
7216
|
-
"char": "l",
|
|
7217
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
7218
|
-
"name": "licensetypes",
|
|
7219
|
-
"hasDynamicHelp": false,
|
|
7220
|
-
"multiple": false,
|
|
7221
|
-
"options": [
|
|
7222
|
-
"all",
|
|
7223
|
-
"all-crm",
|
|
7224
|
-
"all-paying"
|
|
7225
|
-
],
|
|
7226
|
-
"type": "option"
|
|
7227
|
-
},
|
|
7228
|
-
"licenseidentifiers": {
|
|
7229
|
-
"char": "i",
|
|
7230
|
-
"description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
|
|
7231
|
-
"name": "licenseidentifiers",
|
|
7232
|
-
"hasDynamicHelp": false,
|
|
7233
|
-
"multiple": false,
|
|
7234
|
-
"type": "option"
|
|
7235
|
-
},
|
|
7236
|
-
"returnactiveusers": {
|
|
7237
|
-
"description": "Inverts the command by returning the active users",
|
|
7238
|
-
"name": "returnactiveusers",
|
|
7239
|
-
"allowNo": false,
|
|
7240
|
-
"type": "boolean"
|
|
7319
|
+
"usedonly": {
|
|
7320
|
+
"char": "u",
|
|
7321
|
+
"description": "Filter to have only used licenses",
|
|
7322
|
+
"name": "usedonly",
|
|
7323
|
+
"allowNo": false,
|
|
7324
|
+
"type": "boolean"
|
|
7241
7325
|
},
|
|
7242
7326
|
"debug": {
|
|
7243
7327
|
"char": "d",
|
|
@@ -7277,13 +7361,13 @@
|
|
|
7277
7361
|
},
|
|
7278
7362
|
"hasDynamicHelp": true,
|
|
7279
7363
|
"hiddenAliases": [],
|
|
7280
|
-
"id": "hardis:org:diagnose:
|
|
7364
|
+
"id": "hardis:org:diagnose:licenses",
|
|
7281
7365
|
"pluginAlias": "sfdx-hardis",
|
|
7282
7366
|
"pluginName": "sfdx-hardis",
|
|
7283
7367
|
"pluginType": "core",
|
|
7284
7368
|
"strict": true,
|
|
7285
7369
|
"enableJsonFlag": true,
|
|
7286
|
-
"title": "
|
|
7370
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
7287
7371
|
"requiresProject": false,
|
|
7288
7372
|
"isESM": true,
|
|
7289
7373
|
"relativePath": [
|
|
@@ -7292,42 +7376,42 @@
|
|
|
7292
7376
|
"hardis",
|
|
7293
7377
|
"org",
|
|
7294
7378
|
"diagnose",
|
|
7295
|
-
"
|
|
7379
|
+
"licenses.js"
|
|
7296
7380
|
],
|
|
7297
7381
|
"aliasPermutations": [],
|
|
7298
7382
|
"permutations": [
|
|
7299
|
-
"hardis:org:diagnose:
|
|
7300
|
-
"org:hardis:diagnose:
|
|
7301
|
-
"org:diagnose:hardis:
|
|
7302
|
-
"org:diagnose:
|
|
7303
|
-
"hardis:diagnose:org:
|
|
7304
|
-
"diagnose:hardis:org:
|
|
7305
|
-
"diagnose:org:hardis:
|
|
7306
|
-
"diagnose:org:
|
|
7307
|
-
"hardis:diagnose:
|
|
7308
|
-
"diagnose:hardis:
|
|
7309
|
-
"diagnose:
|
|
7310
|
-
"diagnose:
|
|
7311
|
-
"hardis:org:
|
|
7312
|
-
"org:hardis:
|
|
7313
|
-
"org:
|
|
7314
|
-
"org:
|
|
7315
|
-
"hardis:
|
|
7316
|
-
"
|
|
7317
|
-
"
|
|
7318
|
-
"
|
|
7319
|
-
"hardis:
|
|
7320
|
-
"
|
|
7321
|
-
"
|
|
7322
|
-
"
|
|
7383
|
+
"hardis:org:diagnose:licenses",
|
|
7384
|
+
"org:hardis:diagnose:licenses",
|
|
7385
|
+
"org:diagnose:hardis:licenses",
|
|
7386
|
+
"org:diagnose:licenses:hardis",
|
|
7387
|
+
"hardis:diagnose:org:licenses",
|
|
7388
|
+
"diagnose:hardis:org:licenses",
|
|
7389
|
+
"diagnose:org:hardis:licenses",
|
|
7390
|
+
"diagnose:org:licenses:hardis",
|
|
7391
|
+
"hardis:diagnose:licenses:org",
|
|
7392
|
+
"diagnose:hardis:licenses:org",
|
|
7393
|
+
"diagnose:licenses:hardis:org",
|
|
7394
|
+
"diagnose:licenses:org:hardis",
|
|
7395
|
+
"hardis:org:licenses:diagnose",
|
|
7396
|
+
"org:hardis:licenses:diagnose",
|
|
7397
|
+
"org:licenses:hardis:diagnose",
|
|
7398
|
+
"org:licenses:diagnose:hardis",
|
|
7399
|
+
"hardis:licenses:org:diagnose",
|
|
7400
|
+
"licenses:hardis:org:diagnose",
|
|
7401
|
+
"licenses:org:hardis:diagnose",
|
|
7402
|
+
"licenses:org:diagnose:hardis",
|
|
7403
|
+
"hardis:licenses:diagnose:org",
|
|
7404
|
+
"licenses:hardis:diagnose:org",
|
|
7405
|
+
"licenses:diagnose:hardis:org",
|
|
7406
|
+
"licenses:diagnose:org:hardis"
|
|
7323
7407
|
]
|
|
7324
7408
|
},
|
|
7325
|
-
"hardis:org:
|
|
7409
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
7326
7410
|
"aliases": [],
|
|
7327
7411
|
"args": {},
|
|
7328
|
-
"description": "
|
|
7412
|
+
"description": "Export Release Updates into a CSV file with selected criteria, and highlight Release Updates that should be checked.\n\nBefore publishing **Breaking Changes** ❌, Salesforce announce them in the setup menu [**Release Updates**](https://help.salesforce.com/s/articleView?id=sf.release_updates.htm&type=5)\n\n⚠️ Some of them are very important, because if you don't make the related upgrades in time (ex: before Winter 25) , your production org can crash !\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-release-updates/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
7329
7413
|
"examples": [
|
|
7330
|
-
"$ sf hardis:org:
|
|
7414
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
7331
7415
|
],
|
|
7332
7416
|
"flags": {
|
|
7333
7417
|
"json": {
|
|
@@ -7345,48 +7429,14 @@
|
|
|
7345
7429
|
"multiple": false,
|
|
7346
7430
|
"type": "option"
|
|
7347
7431
|
},
|
|
7348
|
-
"
|
|
7349
|
-
"char": "
|
|
7350
|
-
"description": "
|
|
7351
|
-
"name": "
|
|
7352
|
-
"hasDynamicHelp": false,
|
|
7353
|
-
"multiple": false,
|
|
7354
|
-
"type": "option"
|
|
7355
|
-
},
|
|
7356
|
-
"chunksize": {
|
|
7357
|
-
"char": "c",
|
|
7358
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
7359
|
-
"name": "chunksize",
|
|
7360
|
-
"default": 1000,
|
|
7361
|
-
"hasDynamicHelp": false,
|
|
7362
|
-
"multiple": false,
|
|
7363
|
-
"type": "option"
|
|
7364
|
-
},
|
|
7365
|
-
"polltimeout": {
|
|
7366
|
-
"char": "t",
|
|
7367
|
-
"description": "Timeout in MS for Bulk API calls",
|
|
7368
|
-
"name": "polltimeout",
|
|
7369
|
-
"default": 300000,
|
|
7370
|
-
"hasDynamicHelp": false,
|
|
7371
|
-
"multiple": false,
|
|
7372
|
-
"type": "option"
|
|
7373
|
-
},
|
|
7374
|
-
"startchunknumber": {
|
|
7375
|
-
"char": "s",
|
|
7376
|
-
"description": "Chunk number to start from",
|
|
7377
|
-
"name": "startchunknumber",
|
|
7378
|
-
"default": 0,
|
|
7432
|
+
"outputfile": {
|
|
7433
|
+
"char": "f",
|
|
7434
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7435
|
+
"name": "outputfile",
|
|
7379
7436
|
"hasDynamicHelp": false,
|
|
7380
7437
|
"multiple": false,
|
|
7381
7438
|
"type": "option"
|
|
7382
7439
|
},
|
|
7383
|
-
"resume": {
|
|
7384
|
-
"char": "r",
|
|
7385
|
-
"description": "Resume previous export by checking existing files (default in CI)",
|
|
7386
|
-
"name": "resume",
|
|
7387
|
-
"allowNo": false,
|
|
7388
|
-
"type": "boolean"
|
|
7389
|
-
},
|
|
7390
7440
|
"debug": {
|
|
7391
7441
|
"char": "d",
|
|
7392
7442
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7425,13 +7475,13 @@
|
|
|
7425
7475
|
},
|
|
7426
7476
|
"hasDynamicHelp": true,
|
|
7427
7477
|
"hiddenAliases": [],
|
|
7428
|
-
"id": "hardis:org:
|
|
7478
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
7429
7479
|
"pluginAlias": "sfdx-hardis",
|
|
7430
7480
|
"pluginName": "sfdx-hardis",
|
|
7431
7481
|
"pluginType": "core",
|
|
7432
7482
|
"strict": true,
|
|
7433
7483
|
"enableJsonFlag": true,
|
|
7434
|
-
"title": "
|
|
7484
|
+
"title": "Check Release Updates of an org",
|
|
7435
7485
|
"requiresProject": false,
|
|
7436
7486
|
"isESM": true,
|
|
7437
7487
|
"relativePath": [
|
|
@@ -7439,43 +7489,48 @@
|
|
|
7439
7489
|
"commands",
|
|
7440
7490
|
"hardis",
|
|
7441
7491
|
"org",
|
|
7442
|
-
"
|
|
7443
|
-
"
|
|
7492
|
+
"diagnose",
|
|
7493
|
+
"releaseupdates.js"
|
|
7444
7494
|
],
|
|
7445
7495
|
"aliasPermutations": [],
|
|
7446
7496
|
"permutations": [
|
|
7447
|
-
"hardis:org:
|
|
7448
|
-
"org:hardis:
|
|
7449
|
-
"org:
|
|
7450
|
-
"org:
|
|
7451
|
-
"hardis:
|
|
7452
|
-
"
|
|
7453
|
-
"
|
|
7454
|
-
"
|
|
7455
|
-
"hardis:
|
|
7456
|
-
"
|
|
7457
|
-
"
|
|
7458
|
-
"
|
|
7459
|
-
"hardis:org:
|
|
7460
|
-
"org:hardis:
|
|
7461
|
-
"org:
|
|
7462
|
-
"org:
|
|
7463
|
-
"hardis:
|
|
7464
|
-
"
|
|
7465
|
-
"
|
|
7466
|
-
"
|
|
7467
|
-
"hardis:
|
|
7468
|
-
"
|
|
7469
|
-
"
|
|
7470
|
-
"
|
|
7497
|
+
"hardis:org:diagnose:releaseupdates",
|
|
7498
|
+
"org:hardis:diagnose:releaseupdates",
|
|
7499
|
+
"org:diagnose:hardis:releaseupdates",
|
|
7500
|
+
"org:diagnose:releaseupdates:hardis",
|
|
7501
|
+
"hardis:diagnose:org:releaseupdates",
|
|
7502
|
+
"diagnose:hardis:org:releaseupdates",
|
|
7503
|
+
"diagnose:org:hardis:releaseupdates",
|
|
7504
|
+
"diagnose:org:releaseupdates:hardis",
|
|
7505
|
+
"hardis:diagnose:releaseupdates:org",
|
|
7506
|
+
"diagnose:hardis:releaseupdates:org",
|
|
7507
|
+
"diagnose:releaseupdates:hardis:org",
|
|
7508
|
+
"diagnose:releaseupdates:org:hardis",
|
|
7509
|
+
"hardis:org:releaseupdates:diagnose",
|
|
7510
|
+
"org:hardis:releaseupdates:diagnose",
|
|
7511
|
+
"org:releaseupdates:hardis:diagnose",
|
|
7512
|
+
"org:releaseupdates:diagnose:hardis",
|
|
7513
|
+
"hardis:releaseupdates:org:diagnose",
|
|
7514
|
+
"releaseupdates:hardis:org:diagnose",
|
|
7515
|
+
"releaseupdates:org:hardis:diagnose",
|
|
7516
|
+
"releaseupdates:org:diagnose:hardis",
|
|
7517
|
+
"hardis:releaseupdates:diagnose:org",
|
|
7518
|
+
"releaseupdates:hardis:diagnose:org",
|
|
7519
|
+
"releaseupdates:diagnose:hardis:org",
|
|
7520
|
+
"releaseupdates:diagnose:org:hardis"
|
|
7471
7521
|
]
|
|
7472
7522
|
},
|
|
7473
|
-
"hardis:org:
|
|
7523
|
+
"hardis:org:diagnose:storage-stats": {
|
|
7474
7524
|
"aliases": [],
|
|
7475
7525
|
"args": {},
|
|
7476
|
-
"description": "
|
|
7526
|
+
"description": "**Extracts and analyzes Data Storage usage for a Salesforce org, providing detailed per-object breakdowns with flexible grouping options.**\n\nThis command provides a comprehensive overview of your Salesforce data storage consumption. It's particularly useful for:\n\n- **Storage Management:** Understanding which SObjects consume the most storage and how usage has evolved over time.\n- **Cost Optimization:** Identifying storage-heavy objects that could be candidates for data archival or cleanup strategies.\n- **Capacity Planning:** Tracking storage trends to predict when additional capacity will be needed.\n- **Compliance & Governance:** Monitoring data growth patterns to ensure alignment with data retention policies.\n\nKey functionalities:\n\n- **Storage Limits Analysis:** Retrieves and displays org data storage limits, including total capacity, used storage, remaining storage, and percentage used. Detects and alerts on over-usage scenarios.\n- **SObject Discovery & Filtering:** Automatically discovers all SObjects in the org and filters them to focus on production/custom objects (excludes metadata types, platform-only objects, and cached empty objects).\n- **Interactive Selection:** Prompts the user to select which SObjects to analyze and choose breakdown fields (date fields, RecordType, custom fields, or relationship fields).\n- **Flexible Breakdown Field:** Supports grouping by any field including:\n - Date/DateTime fields (`CreatedDate`, `LastModifiedDate`, custom date fields)\n - RecordType (`RecordType.Name`)\n - Custom fields (`Status__c`, picklists, text fields)\n - Nested relationship fields (`SBQQ__Quote__r.RecordType.Name`)\n- **Date Granularity Options:** For date/datetime fields, choose between:\n - Year-based grouping (`CALENDAR_YEAR`)\n - Month-based grouping (`CALENDAR_MONTH`)\n - Day-based grouping (exact date)\n- **WHERE Clause Filtering:** Apply SOQL WHERE conditions to filter records before calculating storage (e.g., only active records, records from the last year).\n- **Storage Estimation:** Estimates storage usage for each object using an average record size heuristic (2 KB per record) and calculates the percentage of org quota consumed.\n- **Dual CSV Reports:** Generates two CSV files: a detailed breakdown by selected field and a totals-per-object summary, both suitable for spreadsheet analysis and reporting.\n- **Empty Objects Cache:** Maintains a per-user cache of objects detected with zero records to optimize subsequent runs by skipping empty tables.\n- **Progress Tracking:** Sends WebSocket progress messages for integration with external UIs and monitoring dashboards.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Limits Retrieval:** Calls `conn.limits()` to retrieve the `DataStorageMB` object containing `Max` and `Remaining` values. Handles negative `Remaining` values (over-usage scenarios) by calculating `overUsageMB` and adjusting display values.\n- **SObject Discovery:** Uses `conn.metadata.list([{ type: 'CustomObject' }])` to get custom objects and `conn.describeGlobal()` to get all SObjects. Filters by object capabilities (`layoutable`, `queryable`, `retrieveable`, `createable`, `updateable`, `deletable`) and excludes metadata types (`__mdt` suffix) and cached empty objects.\n- **User Interaction:** Uses `prompts` for interactive multi-select of SObjects, breakdown field selection, granularity choice (for date fields), and optional WHERE conditions. All objects are pre-selected by default for user convenience.\n- **Field Validation:** Recursively validates breakdown fields including nested relationships (e.g., `SBQQ__Quote__r.RecordType.Name`) by traversing the relationship chain and checking field existence on each related object. Automatically handles special cases like `RecordType` -> `RecordTypeId` and `__r` -> `__c` conversions.\n- **Dynamic Query Generation:** Builds SOQL queries based on field type and granularity:\n - For date fields with year granularity: `SELECT CALENDAR_YEAR(<Field>) breakdown, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY CALENDAR_YEAR(<Field>) ORDER BY CALENDAR_YEAR(<Field>)`\n - For date fields with month granularity: `SELECT CALENDAR_YEAR(<Field>) year, CALENDAR_MONTH(<Field>) month, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY CALENDAR_YEAR(<Field>), CALENDAR_MONTH(<Field>) ORDER BY CALENDAR_YEAR(<Field>), CALENDAR_MONTH(<Field>)`\n - For non-date fields: `SELECT <Field> breakdown, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY <Field> ORDER BY <Field>`\n- **WHERE Clause Support:** Accepts user-provided WHERE conditions via flag (`--where`) or interactive prompt. Injects the condition into all SOQL queries for consistent filtering across all objects.\n- **Storage Calculation:** Applies a conservative average record size of 2 KB (2048 bytes) to estimate storage consumption. Calculates both MB usage and percentage of org quota for each object and breakdown value.\n- **Report Generation:** Uses `generateCsvFile` and `generateReportPath` helpers to create two CSV files in the reports directory:\n - Detailed breakdown: includes all statistics per breakdown value per object (e.g., by year, by month, by RecordType)\n - Totals summary: includes only aggregate totals per object\n - File naming includes breakdown field, granularity (for date fields), and `-filtered` suffix when WHERE clause is applied\n- **Caching Mechanism:** Writes a JSON cache file per authenticated username (sanitized) in the reports directory (`<username>_empty_tables_cache.json`) containing an array of empty object names. The cache is updated after each run with newly detected empty objects.\n- **Progress & UX:** Uses `WebSocketClient` to emit start/step/end progress messages for external monitoring. Outputs summary tables with `uxLogTable` and status messages with `uxLog`.\n- **Return Value:** Returns a JSON object containing `tableStorageInfos` (all rows), `tableStorageInfosTotals` (summary rows), `storageLimits` (org limits object), and `outputFiles` (paths to generated CSV/XLSX reports).\n</details>\n\n\n\n\n",
|
|
7477
7527
|
"examples": [
|
|
7478
|
-
"$ sf hardis:org:
|
|
7528
|
+
"$ sf hardis:org:diagnose:storage-stats",
|
|
7529
|
+
"$ sf hardis:org:diagnose:storage-stats --breakdown-field \"CreatedDate\"",
|
|
7530
|
+
"$ sf hardis:org:diagnose:storage-stats -b \"RecordType.Name\"",
|
|
7531
|
+
"$ sf hardis:org:diagnose:storage-stats --where \"CreatedDate = LAST_N_DAYS:365\"",
|
|
7532
|
+
"$ sf hardis:org:diagnose:storage-stats -w \"Status__c = 'Active'\"",
|
|
7533
|
+
"$ sf hardis:org:diagnose:storage-stats -b \"LastModifiedDate\" -w \"IsDeleted = false\""
|
|
7479
7534
|
],
|
|
7480
7535
|
"flags": {
|
|
7481
7536
|
"json": {
|
|
@@ -7493,20 +7548,29 @@
|
|
|
7493
7548
|
"multiple": false,
|
|
7494
7549
|
"type": "option"
|
|
7495
7550
|
},
|
|
7496
|
-
"
|
|
7497
|
-
"char": "
|
|
7498
|
-
"description": "
|
|
7499
|
-
"name": "
|
|
7551
|
+
"outputfile": {
|
|
7552
|
+
"char": "f",
|
|
7553
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7554
|
+
"name": "outputfile",
|
|
7500
7555
|
"hasDynamicHelp": false,
|
|
7501
7556
|
"multiple": false,
|
|
7502
7557
|
"type": "option"
|
|
7503
7558
|
},
|
|
7504
|
-
"
|
|
7505
|
-
"char": "
|
|
7506
|
-
"description": "
|
|
7507
|
-
"name": "
|
|
7508
|
-
"
|
|
7509
|
-
"
|
|
7559
|
+
"breakdown-field": {
|
|
7560
|
+
"char": "b",
|
|
7561
|
+
"description": "Field to use for storage stats breakdown. Example: \"CreatedDate\", \"LastModifiedDate\", \"RecordType.Name\", or custom fields like \"Status__c\"",
|
|
7562
|
+
"name": "breakdown-field",
|
|
7563
|
+
"hasDynamicHelp": false,
|
|
7564
|
+
"multiple": false,
|
|
7565
|
+
"type": "option"
|
|
7566
|
+
},
|
|
7567
|
+
"where": {
|
|
7568
|
+
"char": "w",
|
|
7569
|
+
"description": "WHERE clause to filter records in the query (without the WHERE keyword). Example: \"CreatedDate = LAST_N_DAYS:365\" or \"Status__c = 'Active'\"",
|
|
7570
|
+
"name": "where",
|
|
7571
|
+
"hasDynamicHelp": false,
|
|
7572
|
+
"multiple": false,
|
|
7573
|
+
"type": "option"
|
|
7510
7574
|
},
|
|
7511
7575
|
"debug": {
|
|
7512
7576
|
"char": "d",
|
|
@@ -7546,58 +7610,57 @@
|
|
|
7546
7610
|
},
|
|
7547
7611
|
"hasDynamicHelp": true,
|
|
7548
7612
|
"hiddenAliases": [],
|
|
7549
|
-
"id": "hardis:org:
|
|
7613
|
+
"id": "hardis:org:diagnose:storage-stats",
|
|
7550
7614
|
"pluginAlias": "sfdx-hardis",
|
|
7551
7615
|
"pluginName": "sfdx-hardis",
|
|
7552
7616
|
"pluginType": "core",
|
|
7553
7617
|
"strict": true,
|
|
7554
7618
|
"enableJsonFlag": true,
|
|
7555
|
-
"title": "
|
|
7556
|
-
"requiresProject":
|
|
7619
|
+
"title": "Extract Data Storage stats",
|
|
7620
|
+
"requiresProject": true,
|
|
7557
7621
|
"isESM": true,
|
|
7558
7622
|
"relativePath": [
|
|
7559
7623
|
"lib",
|
|
7560
7624
|
"commands",
|
|
7561
7625
|
"hardis",
|
|
7562
7626
|
"org",
|
|
7563
|
-
"
|
|
7564
|
-
"
|
|
7627
|
+
"diagnose",
|
|
7628
|
+
"storage-stats.js"
|
|
7565
7629
|
],
|
|
7566
7630
|
"aliasPermutations": [],
|
|
7567
7631
|
"permutations": [
|
|
7568
|
-
"hardis:org:
|
|
7569
|
-
"org:hardis:
|
|
7570
|
-
"org:
|
|
7571
|
-
"org:
|
|
7572
|
-
"hardis:
|
|
7573
|
-
"
|
|
7574
|
-
"
|
|
7575
|
-
"
|
|
7576
|
-
"hardis:
|
|
7577
|
-
"
|
|
7578
|
-
"
|
|
7579
|
-
"
|
|
7580
|
-
"hardis:org:
|
|
7581
|
-
"org:hardis:
|
|
7582
|
-
"org:
|
|
7583
|
-
"org:
|
|
7584
|
-
"hardis:
|
|
7585
|
-
"
|
|
7586
|
-
"
|
|
7587
|
-
"
|
|
7588
|
-
"hardis:
|
|
7589
|
-
"
|
|
7590
|
-
"
|
|
7591
|
-
"
|
|
7592
|
-
]
|
|
7593
|
-
},
|
|
7594
|
-
"hardis:org:
|
|
7632
|
+
"hardis:org:diagnose:storage-stats",
|
|
7633
|
+
"org:hardis:diagnose:storage-stats",
|
|
7634
|
+
"org:diagnose:hardis:storage-stats",
|
|
7635
|
+
"org:diagnose:storage-stats:hardis",
|
|
7636
|
+
"hardis:diagnose:org:storage-stats",
|
|
7637
|
+
"diagnose:hardis:org:storage-stats",
|
|
7638
|
+
"diagnose:org:hardis:storage-stats",
|
|
7639
|
+
"diagnose:org:storage-stats:hardis",
|
|
7640
|
+
"hardis:diagnose:storage-stats:org",
|
|
7641
|
+
"diagnose:hardis:storage-stats:org",
|
|
7642
|
+
"diagnose:storage-stats:hardis:org",
|
|
7643
|
+
"diagnose:storage-stats:org:hardis",
|
|
7644
|
+
"hardis:org:storage-stats:diagnose",
|
|
7645
|
+
"org:hardis:storage-stats:diagnose",
|
|
7646
|
+
"org:storage-stats:hardis:diagnose",
|
|
7647
|
+
"org:storage-stats:diagnose:hardis",
|
|
7648
|
+
"hardis:storage-stats:org:diagnose",
|
|
7649
|
+
"storage-stats:hardis:org:diagnose",
|
|
7650
|
+
"storage-stats:org:hardis:diagnose",
|
|
7651
|
+
"storage-stats:org:diagnose:hardis",
|
|
7652
|
+
"hardis:storage-stats:diagnose:org",
|
|
7653
|
+
"storage-stats:hardis:diagnose:org",
|
|
7654
|
+
"storage-stats:diagnose:hardis:org",
|
|
7655
|
+
"storage-stats:diagnose:org:hardis"
|
|
7656
|
+
]
|
|
7657
|
+
},
|
|
7658
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
7595
7659
|
"aliases": [],
|
|
7596
7660
|
"args": {},
|
|
7597
|
-
"description": "
|
|
7661
|
+
"description": "\n## Command Behavior\n\n**Detects unsecured Connected Apps in a Salesforce org and generates detailed reports for security analysis.**\n\nThis command is a critical security diagnostic tool that helps administrators identify Connected Apps that may pose security risks due to improper configuration. It provides comprehensive analysis of OAuth tokens and Connected App security settings to ensure proper access control.\n\nKey functionalities:\n\n- **OAuth Token Analysis:** Queries all OAuth tokens in the org using SOQL to retrieve comprehensive token information including app names, users, authorization status, and usage statistics.\n- **Security Status Assessment:** Evaluates each Connected App's security configuration by checking the `IsUsingAdminAuthorization` flag to determine if admin pre-approval is required.\n- **Unsecured App Detection:** Identifies Connected Apps that allow users to authorize themselves without admin approval, which can pose security risks.\n- **Detailed Reporting:** Generates two comprehensive CSV reports:\n - **OAuth Tokens Report:** Lists all OAuth tokens with security status, user information, and usage data\n - **Connected Apps Summary:** Aggregates unsecured Connected Apps with counts of associated OAuth tokens\n- **Visual Indicators:** Uses status icons (❌ for unsecured, ✅ for secured) to provide immediate visual feedback on security status.\n- **Security Recommendations:** Provides actionable guidance on how to secure Connected Apps through proper configuration.\n- **Notifications:** Sends alerts to configured channels (Grafana, Slack, MS Teams) with security findings and attached reports.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-security/) and can output Grafana, Slack and MsTeams Notifications.\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/jHv8yrSK8Dg\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query Execution:** Executes a comprehensive SOQL query on the `OauthToken` object, joining with `AppMenuItem` and `User` objects to gather complete security context.\n- **Security Analysis Logic:** Analyzes the `AppMenuItem.IsUsingAdminAuthorization` field to determine if a Connected App requires admin pre-approval for user authorization.\n- **Data Transformation:** Processes raw SOQL results to add security status indicators and reorganize data for optimal reporting and analysis.\n- **Aggregation Processing:** Groups OAuth tokens by Connected App name to provide summary statistics and identify the most problematic applications.\n- **Report Generation:** Uses `generateCsvFile` to create structured CSV reports with proper formatting and metadata for easy analysis and sharing.\n- **Notification Integration:** Integrates with the `NotifProvider` to send security alerts with detailed metrics, including the number of unsecured Connected Apps and associated OAuth tokens.\n- **File Management:** Generates multiple output formats (CSV, XLSX) and manages file paths using `generateReportPath` for consistent report organization.\n- **Connection Management:** Uses `setConnectionVariables` to ensure proper authentication context for notification providers that require org connection details.\n</details>\n",
|
|
7598
7662
|
"examples": [
|
|
7599
|
-
"$ sf hardis:org:
|
|
7600
|
-
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
7663
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
7601
7664
|
],
|
|
7602
7665
|
"flags": {
|
|
7603
7666
|
"json": {
|
|
@@ -7615,10 +7678,10 @@
|
|
|
7615
7678
|
"multiple": false,
|
|
7616
7679
|
"type": "option"
|
|
7617
7680
|
},
|
|
7618
|
-
"
|
|
7619
|
-
"char": "
|
|
7620
|
-
"description": "
|
|
7621
|
-
"name": "
|
|
7681
|
+
"outputfile": {
|
|
7682
|
+
"char": "f",
|
|
7683
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7684
|
+
"name": "outputfile",
|
|
7622
7685
|
"hasDynamicHelp": false,
|
|
7623
7686
|
"multiple": false,
|
|
7624
7687
|
"type": "option"
|
|
@@ -7661,59 +7724,58 @@
|
|
|
7661
7724
|
},
|
|
7662
7725
|
"hasDynamicHelp": true,
|
|
7663
7726
|
"hiddenAliases": [],
|
|
7664
|
-
"id": "hardis:org:
|
|
7727
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
7665
7728
|
"pluginAlias": "sfdx-hardis",
|
|
7666
7729
|
"pluginName": "sfdx-hardis",
|
|
7667
7730
|
"pluginType": "core",
|
|
7668
7731
|
"strict": true,
|
|
7669
7732
|
"enableJsonFlag": true,
|
|
7670
|
-
"title": "
|
|
7671
|
-
"requiresProject":
|
|
7733
|
+
"title": "Detect Unsecured Connected Apps",
|
|
7734
|
+
"requiresProject": false,
|
|
7672
7735
|
"isESM": true,
|
|
7673
7736
|
"relativePath": [
|
|
7674
7737
|
"lib",
|
|
7675
7738
|
"commands",
|
|
7676
7739
|
"hardis",
|
|
7677
7740
|
"org",
|
|
7678
|
-
"
|
|
7679
|
-
"
|
|
7741
|
+
"diagnose",
|
|
7742
|
+
"unsecure-connected-apps.js"
|
|
7680
7743
|
],
|
|
7681
7744
|
"aliasPermutations": [],
|
|
7682
7745
|
"permutations": [
|
|
7683
|
-
"hardis:org:
|
|
7684
|
-
"org:hardis:
|
|
7685
|
-
"org:
|
|
7686
|
-
"org:
|
|
7687
|
-
"hardis:
|
|
7688
|
-
"
|
|
7689
|
-
"
|
|
7690
|
-
"
|
|
7691
|
-
"hardis:
|
|
7692
|
-
"
|
|
7693
|
-
"
|
|
7694
|
-
"
|
|
7695
|
-
"hardis:org:
|
|
7696
|
-
"org:hardis:
|
|
7697
|
-
"org:
|
|
7698
|
-
"org:
|
|
7699
|
-
"hardis:
|
|
7700
|
-
"
|
|
7701
|
-
"
|
|
7702
|
-
"
|
|
7703
|
-
"hardis:
|
|
7704
|
-
"
|
|
7705
|
-
"
|
|
7706
|
-
"
|
|
7746
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
7747
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
7748
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
7749
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
7750
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
7751
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
7752
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
7753
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
7754
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
7755
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
7756
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
7757
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
7758
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
7759
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
7760
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
7761
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
7762
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
7763
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
7764
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
7765
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
7766
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
7767
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
7768
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
7769
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
7707
7770
|
]
|
|
7708
7771
|
},
|
|
7709
|
-
"hardis:org:
|
|
7772
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
7710
7773
|
"aliases": [],
|
|
7711
7774
|
"args": {},
|
|
7712
|
-
"description": "
|
|
7775
|
+
"description": "List all async Apex classes (Batch,Queueable,Schedulable) that has not been called for more than 365 days.\n \nThe result class list probably can be removed from the project, and that will improve your test classes performances 😊\n\nThe number of unused day is overridable using --days option. \n\nThe command uses queries on AsyncApexJob and CronTrigger technical tables to build the result.\n\nApex Classes CreatedBy and CreatedOn fields are calculated from MIN(date from git, date from org)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-apex-classes/) and can output Grafana, Slack and MsTeams Notifications.\n\n\n",
|
|
7713
7776
|
"examples": [
|
|
7714
|
-
"$ sf hardis:org:
|
|
7715
|
-
"$ sf hardis:org:
|
|
7716
|
-
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
7777
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
7778
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
7717
7779
|
],
|
|
7718
7780
|
"flags": {
|
|
7719
7781
|
"json": {
|
|
@@ -7732,12 +7794,21 @@
|
|
|
7732
7794
|
"type": "option"
|
|
7733
7795
|
},
|
|
7734
7796
|
"outputfile": {
|
|
7735
|
-
"
|
|
7797
|
+
"char": "f",
|
|
7798
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7736
7799
|
"name": "outputfile",
|
|
7737
7800
|
"hasDynamicHelp": false,
|
|
7738
7801
|
"multiple": false,
|
|
7739
7802
|
"type": "option"
|
|
7740
7803
|
},
|
|
7804
|
+
"days": {
|
|
7805
|
+
"char": "t",
|
|
7806
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7807
|
+
"name": "days",
|
|
7808
|
+
"hasDynamicHelp": false,
|
|
7809
|
+
"multiple": false,
|
|
7810
|
+
"type": "option"
|
|
7811
|
+
},
|
|
7741
7812
|
"debug": {
|
|
7742
7813
|
"char": "d",
|
|
7743
7814
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7745,13 +7816,6 @@
|
|
|
7745
7816
|
"allowNo": false,
|
|
7746
7817
|
"type": "boolean"
|
|
7747
7818
|
},
|
|
7748
|
-
"no-prompt": {
|
|
7749
|
-
"char": "n",
|
|
7750
|
-
"description": "Do not prompt for org username, use the default one",
|
|
7751
|
-
"name": "no-prompt",
|
|
7752
|
-
"allowNo": false,
|
|
7753
|
-
"type": "boolean"
|
|
7754
|
-
},
|
|
7755
7819
|
"websocket": {
|
|
7756
7820
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7757
7821
|
"name": "websocket",
|
|
@@ -7783,13 +7847,13 @@
|
|
|
7783
7847
|
},
|
|
7784
7848
|
"hasDynamicHelp": true,
|
|
7785
7849
|
"hiddenAliases": [],
|
|
7786
|
-
"id": "hardis:org:
|
|
7850
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
7787
7851
|
"pluginAlias": "sfdx-hardis",
|
|
7788
7852
|
"pluginName": "sfdx-hardis",
|
|
7789
7853
|
"pluginType": "core",
|
|
7790
7854
|
"strict": true,
|
|
7791
7855
|
"enableJsonFlag": true,
|
|
7792
|
-
"title": "
|
|
7856
|
+
"title": "Detect unused Apex classes in an org",
|
|
7793
7857
|
"requiresProject": false,
|
|
7794
7858
|
"isESM": true,
|
|
7795
7859
|
"relativePath": [
|
|
@@ -7797,43 +7861,43 @@
|
|
|
7797
7861
|
"commands",
|
|
7798
7862
|
"hardis",
|
|
7799
7863
|
"org",
|
|
7800
|
-
"
|
|
7801
|
-
"
|
|
7864
|
+
"diagnose",
|
|
7865
|
+
"unused-apex-classes.js"
|
|
7802
7866
|
],
|
|
7803
7867
|
"aliasPermutations": [],
|
|
7804
7868
|
"permutations": [
|
|
7805
|
-
"hardis:org:
|
|
7806
|
-
"org:hardis:
|
|
7807
|
-
"org:
|
|
7808
|
-
"org:
|
|
7809
|
-
"hardis:
|
|
7810
|
-
"
|
|
7811
|
-
"
|
|
7812
|
-
"
|
|
7813
|
-
"hardis:
|
|
7814
|
-
"
|
|
7815
|
-
"
|
|
7816
|
-
"
|
|
7817
|
-
"hardis:org:
|
|
7818
|
-
"org:hardis:
|
|
7819
|
-
"org:
|
|
7820
|
-
"org:
|
|
7821
|
-
"hardis:
|
|
7822
|
-
"
|
|
7823
|
-
"
|
|
7824
|
-
"
|
|
7825
|
-
"hardis:
|
|
7826
|
-
"
|
|
7827
|
-
"
|
|
7828
|
-
"
|
|
7869
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
7870
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
7871
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
7872
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
7873
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
7874
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
7875
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
7876
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
7877
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
7878
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
7879
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
7880
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
7881
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
7882
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
7883
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
7884
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
7885
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
7886
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
7887
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
7888
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
7889
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
7890
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
7891
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
7892
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
7829
7893
|
]
|
|
7830
7894
|
},
|
|
7831
|
-
"hardis:org:
|
|
7895
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
7832
7896
|
"aliases": [],
|
|
7833
7897
|
"args": {},
|
|
7834
|
-
"description": "
|
|
7898
|
+
"description": "\n## Command Behavior\n\n**Identifies and reports on potentially unused Connected Apps in a Salesforce org, suggesting candidates for deletion or deactivation.**\n\nThis command helps improve org security and reduce technical debt by pinpointing Connected Apps that are no longer actively used. Connected Apps can pose security risks if left unmonitored, and cleaning them up contributes to a healthier Salesforce environment.\n\nKey functionalities:\n\n- **Connected App Data Collection:** Gathers information about all Connected Apps in the org, including creation and last modified dates, and associated users.\n- **Usage Analysis:** Analyzes `LoginHistory` and `OAuthToken` records to determine the last usage date of each Connected App.\n- **Inactivity Detection:** Flags Connected Apps as potentially unused if they have no recent login history or OAuth token usage.\n- **Accessibility Check:** Examines Connected App metadata to identify if they are accessible (e.g., if they require admin approval and have no profiles or permission sets assigned).\n- **Ignored Apps:** Automatically ignores a predefined list of common Salesforce Connected Apps (e.g., `Salesforce CLI`, `Salesforce Mobile Dashboards`). You can extend this list by defining the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n- **CSV Report Generation:** Generates a CSV file containing details of all analyzed Connected Apps, including their usage status, last usage date, and reasons for being flagged as potentially unused.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of potentially unused Connected Apps.\n\n**Default Ignored Connected Apps:**\n\n- Ant Migration Tool\n- Chatter Desktop\n- Chatter Mobile for BlackBerry\n- Force.com IDE\n- OIQ_Integration\n- Salesforce CLI\n- Salesforce Files\n- Salesforce Mobile Dashboards\n- Salesforce Touch\n- Salesforce for Outlook\n- SalesforceA\n- SalesforceA for Android\n- SalesforceA for iOS\n- SalesforceDX Namespace Registry\n- SalesforceIQ\n\nYou can add more ignored apps by defining a comma-separated list of names in the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n\n_Example: \nALLOWED_INACTIVE_CONNECTED_APPS=My App 1,My App 2, My App 3_\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-connected-apps/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It performs SOQL queries against `ConnectedApplication`, `LoginHistory`, and `OAuthToken` objects to gather comprehensive data about Connected Apps and their usage.\n- **Temporary SFDX Project:** It creates a temporary SFDX project to retrieve Connected App metadata, allowing for local parsing and analysis of their XML files.\n- **Metadata Parsing:** It parses the `connectedApp-meta.xml` files to check for `isAdminApproved` and the presence of `profileName` or `permissionsetName` to determine accessibility.\n- **Data Correlation:** It correlates data from various Salesforce objects to build a complete picture of each Connected App's usage and status.\n- **Date Calculation:** Uses `moment` to calculate the time since the last OAuth token usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused Connected Apps.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **File System Operations:** Uses `fs-extra` for creating and removing temporary directories and files.\n- **Environment Variable Reading:** Reads the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable to customize the list of ignored Connected Apps.\n</details>\n",
|
|
7835
7899
|
"examples": [
|
|
7836
|
-
"$ sf hardis:org:
|
|
7900
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
7837
7901
|
],
|
|
7838
7902
|
"flags": {
|
|
7839
7903
|
"json": {
|
|
@@ -7851,6 +7915,14 @@
|
|
|
7851
7915
|
"multiple": false,
|
|
7852
7916
|
"type": "option"
|
|
7853
7917
|
},
|
|
7918
|
+
"outputfile": {
|
|
7919
|
+
"char": "f",
|
|
7920
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7921
|
+
"name": "outputfile",
|
|
7922
|
+
"hasDynamicHelp": false,
|
|
7923
|
+
"multiple": false,
|
|
7924
|
+
"type": "option"
|
|
7925
|
+
},
|
|
7854
7926
|
"debug": {
|
|
7855
7927
|
"char": "d",
|
|
7856
7928
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7889,159 +7961,364 @@
|
|
|
7889
7961
|
},
|
|
7890
7962
|
"hasDynamicHelp": true,
|
|
7891
7963
|
"hiddenAliases": [],
|
|
7892
|
-
"id": "hardis:org:
|
|
7964
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
7893
7965
|
"pluginAlias": "sfdx-hardis",
|
|
7894
7966
|
"pluginName": "sfdx-hardis",
|
|
7895
7967
|
"pluginType": "core",
|
|
7896
7968
|
"strict": true,
|
|
7897
7969
|
"enableJsonFlag": true,
|
|
7898
|
-
"title": "
|
|
7899
|
-
"
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
|
|
7907
|
-
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
7912
|
-
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
7938
|
-
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
|
|
7948
|
-
|
|
7949
|
-
|
|
7950
|
-
|
|
7951
|
-
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
|
|
7957
|
-
|
|
7958
|
-
|
|
7970
|
+
"title": "Unused Connected Apps in an org",
|
|
7971
|
+
"allowedInactiveConnectedApps": [
|
|
7972
|
+
"Ant Migration Tool",
|
|
7973
|
+
"Chatter Desktop",
|
|
7974
|
+
"Chatter Mobile for BlackBerry",
|
|
7975
|
+
"Force.com IDE",
|
|
7976
|
+
"OIQ_Integration",
|
|
7977
|
+
"Salesforce CLI",
|
|
7978
|
+
"Salesforce Files",
|
|
7979
|
+
"Salesforce Mobile Dashboards",
|
|
7980
|
+
"Salesforce Touch",
|
|
7981
|
+
"Salesforce for Outlook",
|
|
7982
|
+
"SalesforceA",
|
|
7983
|
+
"SalesforceA for Android",
|
|
7984
|
+
"SalesforceA for iOS",
|
|
7985
|
+
"SalesforceDX Namespace Registry",
|
|
7986
|
+
"SalesforceIQ"
|
|
7987
|
+
],
|
|
7988
|
+
"requiresProject": false,
|
|
7989
|
+
"isESM": true,
|
|
7990
|
+
"relativePath": [
|
|
7991
|
+
"lib",
|
|
7992
|
+
"commands",
|
|
7993
|
+
"hardis",
|
|
7994
|
+
"org",
|
|
7995
|
+
"diagnose",
|
|
7996
|
+
"unused-connected-apps.js"
|
|
7997
|
+
],
|
|
7998
|
+
"aliasPermutations": [],
|
|
7999
|
+
"permutations": [
|
|
8000
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
8001
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
8002
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
8003
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
8004
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
8005
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
8006
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
8007
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
8008
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
8009
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
8010
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
8011
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
8012
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
8013
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
8014
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
8015
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
8016
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
8017
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
8018
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
8019
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
8020
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
8021
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
8022
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
8023
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
8024
|
+
]
|
|
8025
|
+
},
|
|
8026
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
8027
|
+
"aliases": [],
|
|
8028
|
+
"args": {},
|
|
8029
|
+
"description": "\n## Command Behavior\n\n**Detects and suggests the deletion of unused Permission Set License Assignments in a Salesforce org.**\n\nWhen a Permission Set (PS) linked to a Permission Set License (PSL) is assigned to a user, a Permission Set License Assignment (PSLA) is automatically created. However, when that PS is unassigned from the user, the PSLA is *not* automatically deleted. This can lead to organizations being charged for unused PSLAs, representing a hidden cost and technical debt.\n\nThis command identifies such useless PSLAs and provides options to delete them, helping to optimize license usage and reduce unnecessary expenses.\n\nKey functionalities:\n\n- **PSLA Detection:** Queries the Salesforce org to find all active PSLAs.\n- **Usage Verification:** Correlates PSLAs with actual Permission Set Assignments and Permission Set Group Assignments to determine if the underlying Permission Sets are still assigned to the user.\n- **Special Case Handling:** Accounts for specific scenarios where profiles might implicitly assign PSLAs (e.g., `Salesforce API Only` profile assigning `SalesforceAPIIntegrationPsl`) and allows for always excluding certain PSLAs from the unused check.\n- **Reporting:** Generates a CSV report of all identified unused PSLAs, including the user and the associated Permission Set License.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of unused PSLAs.\n- **Interactive Deletion:** In non-CI environments, it offers an interactive prompt to bulk delete the identified unused PSLAs.\n\nMany thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command 😊\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves extensive querying of Salesforce objects and data correlation:\n\n- **SOQL Queries (Bulk API):** It uses `bulkQuery` and `bulkQueryChunksIn` to efficiently retrieve large volumes of data from `PermissionSetLicenseAssign`, `PermissionSetLicense`, `PermissionSet`, `PermissionSetGroupComponent`, and `PermissionSetAssignment` objects.\n- **Data Correlation:** It meticulously correlates data across these objects to determine if a `PermissionSetLicenseAssign` record has a corresponding active assignment to a Permission Set or Permission Set Group for the same user.\n- **Filtering Logic:** It applies complex filtering logic to exclude PSLAs that are genuinely in use or are part of predefined exceptions (e.g., `alwaysExcludeForActiveUsersPermissionSetLicenses`).\n- **Bulk Deletion:** If the user opts to delete unused PSLAs, it uses `bulkUpdate` with the `delete` operation to efficiently remove multiple records.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused PSLAs.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Interaction:** Uses `prompts` for interactive confirmation before performing deletion operations.\n</details>\n",
|
|
8030
|
+
"examples": [
|
|
8031
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
8032
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
8033
|
+
],
|
|
8034
|
+
"flags": {
|
|
8035
|
+
"json": {
|
|
8036
|
+
"description": "Format output as json.",
|
|
8037
|
+
"helpGroup": "GLOBAL",
|
|
8038
|
+
"name": "json",
|
|
8039
|
+
"allowNo": false,
|
|
8040
|
+
"type": "boolean"
|
|
7959
8041
|
},
|
|
7960
|
-
{
|
|
7961
|
-
"
|
|
7962
|
-
"
|
|
7963
|
-
"
|
|
7964
|
-
"
|
|
8042
|
+
"flags-dir": {
|
|
8043
|
+
"helpGroup": "GLOBAL",
|
|
8044
|
+
"name": "flags-dir",
|
|
8045
|
+
"summary": "Import flag values from a directory.",
|
|
8046
|
+
"hasDynamicHelp": false,
|
|
8047
|
+
"multiple": false,
|
|
8048
|
+
"type": "option"
|
|
7965
8049
|
},
|
|
7966
|
-
{
|
|
7967
|
-
"
|
|
7968
|
-
"
|
|
7969
|
-
"
|
|
7970
|
-
"
|
|
8050
|
+
"outputfile": {
|
|
8051
|
+
"char": "f",
|
|
8052
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
8053
|
+
"name": "outputfile",
|
|
8054
|
+
"hasDynamicHelp": false,
|
|
8055
|
+
"multiple": false,
|
|
8056
|
+
"type": "option"
|
|
7971
8057
|
},
|
|
7972
|
-
{
|
|
7973
|
-
"
|
|
7974
|
-
"
|
|
7975
|
-
"
|
|
7976
|
-
"
|
|
8058
|
+
"debug": {
|
|
8059
|
+
"char": "d",
|
|
8060
|
+
"description": "Activate debug mode (more logs)",
|
|
8061
|
+
"name": "debug",
|
|
8062
|
+
"allowNo": false,
|
|
8063
|
+
"type": "boolean"
|
|
7977
8064
|
},
|
|
7978
|
-
{
|
|
7979
|
-
"
|
|
7980
|
-
"
|
|
7981
|
-
"
|
|
7982
|
-
"
|
|
8065
|
+
"websocket": {
|
|
8066
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8067
|
+
"name": "websocket",
|
|
8068
|
+
"hasDynamicHelp": false,
|
|
8069
|
+
"multiple": false,
|
|
8070
|
+
"type": "option"
|
|
7983
8071
|
},
|
|
7984
|
-
{
|
|
7985
|
-
"
|
|
7986
|
-
"
|
|
7987
|
-
"
|
|
7988
|
-
"
|
|
8072
|
+
"skipauth": {
|
|
8073
|
+
"description": "Skip authentication check when a default username is required",
|
|
8074
|
+
"name": "skipauth",
|
|
8075
|
+
"allowNo": false,
|
|
8076
|
+
"type": "boolean"
|
|
7989
8077
|
},
|
|
8078
|
+
"target-org": {
|
|
8079
|
+
"aliases": [
|
|
8080
|
+
"targetusername",
|
|
8081
|
+
"u"
|
|
8082
|
+
],
|
|
8083
|
+
"char": "o",
|
|
8084
|
+
"deprecateAliases": true,
|
|
8085
|
+
"name": "target-org",
|
|
8086
|
+
"noCacheDefault": true,
|
|
8087
|
+
"required": true,
|
|
8088
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8089
|
+
"hasDynamicHelp": true,
|
|
8090
|
+
"multiple": false,
|
|
8091
|
+
"type": "option"
|
|
8092
|
+
}
|
|
8093
|
+
},
|
|
8094
|
+
"hasDynamicHelp": true,
|
|
8095
|
+
"hiddenAliases": [],
|
|
8096
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
8097
|
+
"pluginAlias": "sfdx-hardis",
|
|
8098
|
+
"pluginName": "sfdx-hardis",
|
|
8099
|
+
"pluginType": "core",
|
|
8100
|
+
"strict": true,
|
|
8101
|
+
"enableJsonFlag": true,
|
|
8102
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
8103
|
+
"requiresProject": false,
|
|
8104
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
8105
|
+
"Sales_User"
|
|
8106
|
+
],
|
|
8107
|
+
"permSetsPermSetLicenses": [
|
|
7990
8108
|
{
|
|
7991
|
-
"
|
|
7992
|
-
"
|
|
7993
|
-
"command": "sf hardis:lint:missingattributes",
|
|
7994
|
-
"frequency": "weekly"
|
|
8109
|
+
"permSet": "Sales_User",
|
|
8110
|
+
"permSetLicense": "SalesUserPsl"
|
|
7995
8111
|
}
|
|
7996
8112
|
],
|
|
7997
|
-
"
|
|
7998
|
-
|
|
8113
|
+
"profilesPermissionSetLicenses": [
|
|
8114
|
+
{
|
|
8115
|
+
"profile": "Salesforce API Only",
|
|
8116
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
8117
|
+
}
|
|
8118
|
+
],
|
|
8119
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
8120
|
+
"IdentityConnect"
|
|
8121
|
+
],
|
|
7999
8122
|
"isESM": true,
|
|
8000
8123
|
"relativePath": [
|
|
8001
8124
|
"lib",
|
|
8002
8125
|
"commands",
|
|
8003
8126
|
"hardis",
|
|
8004
8127
|
"org",
|
|
8005
|
-
"
|
|
8006
|
-
"
|
|
8128
|
+
"diagnose",
|
|
8129
|
+
"unusedlicenses.js"
|
|
8007
8130
|
],
|
|
8008
8131
|
"aliasPermutations": [],
|
|
8009
8132
|
"permutations": [
|
|
8010
|
-
"hardis:org:
|
|
8011
|
-
"org:hardis:
|
|
8012
|
-
"org:
|
|
8013
|
-
"org:
|
|
8014
|
-
"hardis:
|
|
8015
|
-
"
|
|
8016
|
-
"
|
|
8017
|
-
"
|
|
8018
|
-
"hardis:
|
|
8019
|
-
"
|
|
8020
|
-
"
|
|
8021
|
-
"
|
|
8022
|
-
"hardis:org:
|
|
8023
|
-
"org:hardis:
|
|
8024
|
-
"org:
|
|
8025
|
-
"org:
|
|
8026
|
-
"hardis:
|
|
8027
|
-
"
|
|
8028
|
-
"
|
|
8029
|
-
"
|
|
8030
|
-
"hardis:
|
|
8031
|
-
"
|
|
8032
|
-
"
|
|
8033
|
-
"
|
|
8133
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
8134
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
8135
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
8136
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
8137
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
8138
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
8139
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
8140
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
8141
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
8142
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
8143
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
8144
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
8145
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
8146
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
8147
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
8148
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
8149
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
8150
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
8151
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
8152
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
8153
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
8154
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
8155
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
8156
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
8157
|
+
]
|
|
8158
|
+
},
|
|
8159
|
+
"hardis:org:diagnose:unusedusers": {
|
|
8160
|
+
"aliases": [],
|
|
8161
|
+
"args": {},
|
|
8162
|
+
"description": "\n## Command Behavior\n\n**Detects and reports on inactive or unused Salesforce user accounts, helping to optimize license usage and enhance security.**\n\nEfficient user management is vital in Salesforce to ensure resources are optimized and costs are controlled. However, inactive or unused user accounts can often go unnoticed, leading to wasted licenses and potential security risks. This tool addresses this challenge by enabling administrators to identify users who haven't logged in within a specified period.\n\nBy analyzing user login activity and last login timestamps, this feature highlights inactive user accounts, allowing administrators to take appropriate action. Whether it's deactivating dormant accounts, freeing up licenses, or ensuring compliance with security policies, this functionality empowers administrators to maintain a lean and secure Salesforce environment.\n\nKey functionalities:\n\n- **Inactivity Detection:** Identifies users who have not logged in for a specified number of days (`--days` flag, default 180 days in CI, 365 days otherwise).\n- **License Type Filtering:** Allows filtering users by license type using `--licensetypes` (e.g., `all-crm`, `all-paying`) or specific license identifiers using `--licenseidentifiers`.\n - `all-crm`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT` licenses.\n - `all-paying`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT`, `PID_Customer_Community`, `PID_Customer_Community_Login`, `PID_Partner_Community`, `PID_Partner_Community_Login` licenses.\n - Note: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/sfdx_cli_reference/sforce_api_objects_userlicense.htm).\n- **Active User Retrieval:** The `--returnactiveusers` flag inverts the command, allowing you to retrieve active users who *have* logged in during the specified period.\n- **CSV Report Generation:** Generates a CSV file containing details of all identified users (inactive or active), including their last login date, profile, and license information.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of inactive or active users.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query (Bulk API):** It uses `bulkQuery` to efficiently retrieve user records from the Salesforce `User` object. The SOQL query dynamically constructs its WHERE clause based on the `--days`, `--licensetypes`, `--licenseidentifiers`, and `--returnactiveusers` flags.\n- **Interactive Prompts:** Uses `prompts` to interactively ask the user for the number of inactive days and license types if not provided via flags.\n- **License Mapping:** Internally maps common license type aliases (e.g., `all-crm`) to their corresponding Salesforce `LicenseDefinitionKey` values.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of users.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides a summary of the findings in the console, indicating the number of inactive or active users found.\n</details>",
|
|
8163
|
+
"examples": [
|
|
8164
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
8165
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
8166
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
8167
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
8168
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
8169
|
+
],
|
|
8170
|
+
"flags": {
|
|
8171
|
+
"json": {
|
|
8172
|
+
"description": "Format output as json.",
|
|
8173
|
+
"helpGroup": "GLOBAL",
|
|
8174
|
+
"name": "json",
|
|
8175
|
+
"allowNo": false,
|
|
8176
|
+
"type": "boolean"
|
|
8177
|
+
},
|
|
8178
|
+
"flags-dir": {
|
|
8179
|
+
"helpGroup": "GLOBAL",
|
|
8180
|
+
"name": "flags-dir",
|
|
8181
|
+
"summary": "Import flag values from a directory.",
|
|
8182
|
+
"hasDynamicHelp": false,
|
|
8183
|
+
"multiple": false,
|
|
8184
|
+
"type": "option"
|
|
8185
|
+
},
|
|
8186
|
+
"outputfile": {
|
|
8187
|
+
"char": "f",
|
|
8188
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
8189
|
+
"name": "outputfile",
|
|
8190
|
+
"hasDynamicHelp": false,
|
|
8191
|
+
"multiple": false,
|
|
8192
|
+
"type": "option"
|
|
8193
|
+
},
|
|
8194
|
+
"days": {
|
|
8195
|
+
"char": "t",
|
|
8196
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
8197
|
+
"name": "days",
|
|
8198
|
+
"hasDynamicHelp": false,
|
|
8199
|
+
"multiple": false,
|
|
8200
|
+
"type": "option"
|
|
8201
|
+
},
|
|
8202
|
+
"licensetypes": {
|
|
8203
|
+
"char": "l",
|
|
8204
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
8205
|
+
"name": "licensetypes",
|
|
8206
|
+
"hasDynamicHelp": false,
|
|
8207
|
+
"multiple": false,
|
|
8208
|
+
"options": [
|
|
8209
|
+
"all",
|
|
8210
|
+
"all-crm",
|
|
8211
|
+
"all-paying"
|
|
8212
|
+
],
|
|
8213
|
+
"type": "option"
|
|
8214
|
+
},
|
|
8215
|
+
"licenseidentifiers": {
|
|
8216
|
+
"char": "i",
|
|
8217
|
+
"description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
|
|
8218
|
+
"name": "licenseidentifiers",
|
|
8219
|
+
"hasDynamicHelp": false,
|
|
8220
|
+
"multiple": false,
|
|
8221
|
+
"type": "option"
|
|
8222
|
+
},
|
|
8223
|
+
"returnactiveusers": {
|
|
8224
|
+
"description": "Inverts the command by returning the active users",
|
|
8225
|
+
"name": "returnactiveusers",
|
|
8226
|
+
"allowNo": false,
|
|
8227
|
+
"type": "boolean"
|
|
8228
|
+
},
|
|
8229
|
+
"debug": {
|
|
8230
|
+
"char": "d",
|
|
8231
|
+
"description": "Activate debug mode (more logs)",
|
|
8232
|
+
"name": "debug",
|
|
8233
|
+
"allowNo": false,
|
|
8234
|
+
"type": "boolean"
|
|
8235
|
+
},
|
|
8236
|
+
"websocket": {
|
|
8237
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8238
|
+
"name": "websocket",
|
|
8239
|
+
"hasDynamicHelp": false,
|
|
8240
|
+
"multiple": false,
|
|
8241
|
+
"type": "option"
|
|
8242
|
+
},
|
|
8243
|
+
"skipauth": {
|
|
8244
|
+
"description": "Skip authentication check when a default username is required",
|
|
8245
|
+
"name": "skipauth",
|
|
8246
|
+
"allowNo": false,
|
|
8247
|
+
"type": "boolean"
|
|
8248
|
+
},
|
|
8249
|
+
"target-org": {
|
|
8250
|
+
"aliases": [
|
|
8251
|
+
"targetusername",
|
|
8252
|
+
"u"
|
|
8253
|
+
],
|
|
8254
|
+
"char": "o",
|
|
8255
|
+
"deprecateAliases": true,
|
|
8256
|
+
"name": "target-org",
|
|
8257
|
+
"noCacheDefault": true,
|
|
8258
|
+
"required": true,
|
|
8259
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8260
|
+
"hasDynamicHelp": true,
|
|
8261
|
+
"multiple": false,
|
|
8262
|
+
"type": "option"
|
|
8263
|
+
}
|
|
8264
|
+
},
|
|
8265
|
+
"hasDynamicHelp": true,
|
|
8266
|
+
"hiddenAliases": [],
|
|
8267
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
8268
|
+
"pluginAlias": "sfdx-hardis",
|
|
8269
|
+
"pluginName": "sfdx-hardis",
|
|
8270
|
+
"pluginType": "core",
|
|
8271
|
+
"strict": true,
|
|
8272
|
+
"enableJsonFlag": true,
|
|
8273
|
+
"title": "Detect unused Users in Salesforce",
|
|
8274
|
+
"requiresProject": false,
|
|
8275
|
+
"isESM": true,
|
|
8276
|
+
"relativePath": [
|
|
8277
|
+
"lib",
|
|
8278
|
+
"commands",
|
|
8279
|
+
"hardis",
|
|
8280
|
+
"org",
|
|
8281
|
+
"diagnose",
|
|
8282
|
+
"unusedusers.js"
|
|
8283
|
+
],
|
|
8284
|
+
"aliasPermutations": [],
|
|
8285
|
+
"permutations": [
|
|
8286
|
+
"hardis:org:diagnose:unusedusers",
|
|
8287
|
+
"org:hardis:diagnose:unusedusers",
|
|
8288
|
+
"org:diagnose:hardis:unusedusers",
|
|
8289
|
+
"org:diagnose:unusedusers:hardis",
|
|
8290
|
+
"hardis:diagnose:org:unusedusers",
|
|
8291
|
+
"diagnose:hardis:org:unusedusers",
|
|
8292
|
+
"diagnose:org:hardis:unusedusers",
|
|
8293
|
+
"diagnose:org:unusedusers:hardis",
|
|
8294
|
+
"hardis:diagnose:unusedusers:org",
|
|
8295
|
+
"diagnose:hardis:unusedusers:org",
|
|
8296
|
+
"diagnose:unusedusers:hardis:org",
|
|
8297
|
+
"diagnose:unusedusers:org:hardis",
|
|
8298
|
+
"hardis:org:unusedusers:diagnose",
|
|
8299
|
+
"org:hardis:unusedusers:diagnose",
|
|
8300
|
+
"org:unusedusers:hardis:diagnose",
|
|
8301
|
+
"org:unusedusers:diagnose:hardis",
|
|
8302
|
+
"hardis:unusedusers:org:diagnose",
|
|
8303
|
+
"unusedusers:hardis:org:diagnose",
|
|
8304
|
+
"unusedusers:org:hardis:diagnose",
|
|
8305
|
+
"unusedusers:org:diagnose:hardis",
|
|
8306
|
+
"hardis:unusedusers:diagnose:org",
|
|
8307
|
+
"unusedusers:hardis:diagnose:org",
|
|
8308
|
+
"unusedusers:diagnose:hardis:org",
|
|
8309
|
+
"unusedusers:diagnose:org:hardis"
|
|
8034
8310
|
]
|
|
8035
8311
|
},
|
|
8036
|
-
"hardis:org:
|
|
8312
|
+
"hardis:org:refresh:after-refresh": {
|
|
8037
8313
|
"aliases": [],
|
|
8038
8314
|
"args": {},
|
|
8039
|
-
"description": "
|
|
8315
|
+
"description": "\n## Command Behavior\n\n**Restores all previously backed-up Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata to a Salesforce org after a sandbox refresh.**\n\nThis command is the second step in the sandbox refresh process. It scans the backup folder created before the refresh, allows interactive or flag-driven selection of items to restore, and automates cleanup and redeployment to the refreshed org while preserving credentials and configuration.\n\nKey functionalities:\n\n- **Choose a backup to restore:** Lets you pick the saved sandbox project that contains the artifacts to restore.\n- **Select which items to restore:** Finds Connected App XMLs, certificates, custom settings and other artifacts and lets you pick what to restore (or restore all).\n- **Safety checks and validation:** Confirms files exist and prompts before making changes to the target org.\n- **Prepare org for restore:** Optionally cleans up existing Connected Apps so saved apps can be re-deployed without conflict.\n- **Redeploy saved artifacts:** Restores Connected Apps (with saved secrets), certificates, SAML SSO configs, custom settings and other metadata.\n- **Handle SAML configs:** Cleans and updates SAML XML files and helps you choose certificates to wire into restored configs.\n- **Restore records:** Optionally runs data import from selected SFDMU workspaces to restore record data.\n- **Reporting & persistence:** Sends restore reports and can update project config to record what was restored.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run after a sandbox refresh to re-apply saved metadata, credentials and data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Backup Folder Handling:** Reads the immediate subfolders of `scripts/sandbox-refresh/` and validates the chosen project contains the expected `manifest/` and `force-app` layout.\n- **Metadata & Deployment APIs:** Uses `sf project deploy start --manifest` for package-based deploys, `sf project deploy start --metadata-dir` for MDAPI artifacts (certificates), and utility functions for Connected App deployment that preserve consumer secrets.\n- **SAML Handling:** Queries active certificates via tooling API, updates SAML XML files, and deploys using `sf project deploy start -m SamlSsoConfig`.\n- **Records Handling:** Uses interactive selection of SFDMU workspaces and runs data import utilities to restore records.\n- **Error Handling & Summary:** Aggregates results, logs success/warnings/errors, and returns a structured result indicating which items were restored and any failures.\n\n</details>\n",
|
|
8040
8316
|
"examples": [
|
|
8041
|
-
"$ sf hardis:org:
|
|
8042
|
-
"$ sf hardis:org:
|
|
8043
|
-
"$ sf hardis:org:
|
|
8044
|
-
"$ sf hardis:org:
|
|
8317
|
+
"$ sf hardis:org:refresh:after-refresh",
|
|
8318
|
+
"$ sf hardis:org:refresh:after-refresh --name \"MyConnectedApp\" // Process specific app, no selection prompt",
|
|
8319
|
+
"$ sf hardis:org:refresh:after-refresh --name \"App1,App2,App3\" // Process multiple apps, no selection prompt",
|
|
8320
|
+
"$ sf hardis:org:refresh:after-refresh --all // Process all apps, no selection prompt",
|
|
8321
|
+
"$ sf hardis:org:refresh:after-refresh --target-org myDevOrg"
|
|
8045
8322
|
],
|
|
8046
8323
|
"flags": {
|
|
8047
8324
|
"json": {
|
|
@@ -8059,67 +8336,37 @@
|
|
|
8059
8336
|
"multiple": false,
|
|
8060
8337
|
"type": "option"
|
|
8061
8338
|
},
|
|
8062
|
-
"
|
|
8063
|
-
"
|
|
8064
|
-
"name": "
|
|
8065
|
-
"
|
|
8066
|
-
"
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
"char": "m",
|
|
8070
|
-
"description": "If mode --full is activated, maximum number of metadatas in a package.xml chunk",
|
|
8071
|
-
"name": "max-by-chunk",
|
|
8072
|
-
"default": 3000,
|
|
8073
|
-
"hasDynamicHelp": false,
|
|
8074
|
-
"multiple": false,
|
|
8075
|
-
"type": "option"
|
|
8076
|
-
},
|
|
8077
|
-
"exclude-namespaces": {
|
|
8078
|
-
"char": "e",
|
|
8079
|
-
"description": "If mode --full is activated, exclude namespaced metadatas",
|
|
8080
|
-
"name": "exclude-namespaces",
|
|
8081
|
-
"allowNo": false,
|
|
8082
|
-
"type": "boolean"
|
|
8083
|
-
},
|
|
8084
|
-
"full-apply-filters": {
|
|
8085
|
-
"char": "z",
|
|
8086
|
-
"description": "If mode --full is activated, apply filters of manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES anyway",
|
|
8087
|
-
"name": "full-apply-filters",
|
|
8088
|
-
"allowNo": false,
|
|
8089
|
-
"type": "boolean"
|
|
8090
|
-
},
|
|
8091
|
-
"start-chunk": {
|
|
8092
|
-
"description": "Use this parameter to troubleshoot a specific chunk. It will be used as the first chunk to retrieve",
|
|
8093
|
-
"name": "start-chunk",
|
|
8094
|
-
"default": 1,
|
|
8095
|
-
"hasDynamicHelp": false,
|
|
8339
|
+
"target-org": {
|
|
8340
|
+
"char": "o",
|
|
8341
|
+
"name": "target-org",
|
|
8342
|
+
"noCacheDefault": true,
|
|
8343
|
+
"required": true,
|
|
8344
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8345
|
+
"hasDynamicHelp": true,
|
|
8096
8346
|
"multiple": false,
|
|
8097
8347
|
"type": "option"
|
|
8098
8348
|
},
|
|
8099
|
-
"
|
|
8100
|
-
"
|
|
8101
|
-
"
|
|
8102
|
-
"
|
|
8103
|
-
"
|
|
8104
|
-
},
|
|
8105
|
-
"outputfile": {
|
|
8106
|
-
"char": "f",
|
|
8107
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
8108
|
-
"name": "outputfile",
|
|
8349
|
+
"name": {
|
|
8350
|
+
"char": "n",
|
|
8351
|
+
"description": "Connected App name(s) to process (bypasses selection prompt). For multiple apps, separate with commas (e.g., \"App1,App2\")",
|
|
8352
|
+
"name": "name",
|
|
8353
|
+
"summary": "Filter according to Name criteria",
|
|
8109
8354
|
"hasDynamicHelp": false,
|
|
8110
8355
|
"multiple": false,
|
|
8111
8356
|
"type": "option"
|
|
8112
8357
|
},
|
|
8113
|
-
"
|
|
8114
|
-
"char": "
|
|
8115
|
-
"description": "
|
|
8116
|
-
"name": "
|
|
8358
|
+
"all": {
|
|
8359
|
+
"char": "a",
|
|
8360
|
+
"description": "If set, all Connected Apps from the local repository will be processed. Takes precedence over --name if both are specified.",
|
|
8361
|
+
"name": "all",
|
|
8362
|
+
"summary": "Process all Connected Apps without selection prompt",
|
|
8117
8363
|
"allowNo": false,
|
|
8118
8364
|
"type": "boolean"
|
|
8119
8365
|
},
|
|
8120
8366
|
"websocket": {
|
|
8121
|
-
"description": "
|
|
8367
|
+
"description": "WebSocket host:port for VS Code SFDX Hardis UI integration",
|
|
8122
8368
|
"name": "websocket",
|
|
8369
|
+
"summary": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8123
8370
|
"hasDynamicHelp": false,
|
|
8124
8371
|
"multiple": false,
|
|
8125
8372
|
"type": "option"
|
|
@@ -8127,79 +8374,68 @@
|
|
|
8127
8374
|
"skipauth": {
|
|
8128
8375
|
"description": "Skip authentication check when a default username is required",
|
|
8129
8376
|
"name": "skipauth",
|
|
8377
|
+
"summary": "Skip authentication check when a default username is required",
|
|
8130
8378
|
"allowNo": false,
|
|
8131
8379
|
"type": "boolean"
|
|
8132
|
-
},
|
|
8133
|
-
"target-org": {
|
|
8134
|
-
"aliases": [
|
|
8135
|
-
"targetusername",
|
|
8136
|
-
"u"
|
|
8137
|
-
],
|
|
8138
|
-
"char": "o",
|
|
8139
|
-
"deprecateAliases": true,
|
|
8140
|
-
"name": "target-org",
|
|
8141
|
-
"noCacheDefault": true,
|
|
8142
|
-
"required": true,
|
|
8143
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8144
|
-
"hasDynamicHelp": true,
|
|
8145
|
-
"multiple": false,
|
|
8146
|
-
"type": "option"
|
|
8147
8380
|
}
|
|
8148
8381
|
},
|
|
8149
8382
|
"hasDynamicHelp": true,
|
|
8150
8383
|
"hiddenAliases": [],
|
|
8151
|
-
"id": "hardis:org:
|
|
8384
|
+
"id": "hardis:org:refresh:after-refresh",
|
|
8152
8385
|
"pluginAlias": "sfdx-hardis",
|
|
8153
8386
|
"pluginName": "sfdx-hardis",
|
|
8154
8387
|
"pluginType": "core",
|
|
8155
8388
|
"strict": true,
|
|
8156
8389
|
"enableJsonFlag": true,
|
|
8157
|
-
"title": "
|
|
8390
|
+
"title": "Restore Connected Apps after org refresh",
|
|
8158
8391
|
"requiresProject": true,
|
|
8159
|
-
"triggerNotification": true,
|
|
8160
8392
|
"isESM": true,
|
|
8161
8393
|
"relativePath": [
|
|
8162
8394
|
"lib",
|
|
8163
8395
|
"commands",
|
|
8164
8396
|
"hardis",
|
|
8165
8397
|
"org",
|
|
8166
|
-
"
|
|
8167
|
-
"
|
|
8398
|
+
"refresh",
|
|
8399
|
+
"after-refresh.js"
|
|
8168
8400
|
],
|
|
8169
8401
|
"aliasPermutations": [],
|
|
8170
8402
|
"permutations": [
|
|
8171
|
-
"hardis:org:
|
|
8172
|
-
"org:hardis:
|
|
8173
|
-
"org:
|
|
8174
|
-
"org:
|
|
8175
|
-
"hardis:
|
|
8176
|
-
"
|
|
8177
|
-
"
|
|
8178
|
-
"
|
|
8179
|
-
"hardis:
|
|
8180
|
-
"
|
|
8181
|
-
"
|
|
8182
|
-
"
|
|
8183
|
-
"hardis:org:
|
|
8184
|
-
"org:hardis:
|
|
8185
|
-
"org:
|
|
8186
|
-
"org:
|
|
8187
|
-
"hardis:
|
|
8188
|
-
"
|
|
8189
|
-
"
|
|
8190
|
-
"
|
|
8191
|
-
"hardis:
|
|
8192
|
-
"
|
|
8193
|
-
"
|
|
8194
|
-
"
|
|
8403
|
+
"hardis:org:refresh:after-refresh",
|
|
8404
|
+
"org:hardis:refresh:after-refresh",
|
|
8405
|
+
"org:refresh:hardis:after-refresh",
|
|
8406
|
+
"org:refresh:after-refresh:hardis",
|
|
8407
|
+
"hardis:refresh:org:after-refresh",
|
|
8408
|
+
"refresh:hardis:org:after-refresh",
|
|
8409
|
+
"refresh:org:hardis:after-refresh",
|
|
8410
|
+
"refresh:org:after-refresh:hardis",
|
|
8411
|
+
"hardis:refresh:after-refresh:org",
|
|
8412
|
+
"refresh:hardis:after-refresh:org",
|
|
8413
|
+
"refresh:after-refresh:hardis:org",
|
|
8414
|
+
"refresh:after-refresh:org:hardis",
|
|
8415
|
+
"hardis:org:after-refresh:refresh",
|
|
8416
|
+
"org:hardis:after-refresh:refresh",
|
|
8417
|
+
"org:after-refresh:hardis:refresh",
|
|
8418
|
+
"org:after-refresh:refresh:hardis",
|
|
8419
|
+
"hardis:after-refresh:org:refresh",
|
|
8420
|
+
"after-refresh:hardis:org:refresh",
|
|
8421
|
+
"after-refresh:org:hardis:refresh",
|
|
8422
|
+
"after-refresh:org:refresh:hardis",
|
|
8423
|
+
"hardis:after-refresh:refresh:org",
|
|
8424
|
+
"after-refresh:hardis:refresh:org",
|
|
8425
|
+
"after-refresh:refresh:hardis:org",
|
|
8426
|
+
"after-refresh:refresh:org:hardis"
|
|
8195
8427
|
]
|
|
8196
8428
|
},
|
|
8197
|
-
"hardis:org:
|
|
8429
|
+
"hardis:org:refresh:before-refresh": {
|
|
8198
8430
|
"aliases": [],
|
|
8199
8431
|
"args": {},
|
|
8200
|
-
"description": "\n## Command Behavior\n\n**
|
|
8432
|
+
"description": "\n## Command Behavior\n\n**Backs up all Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata from a Salesforce org before a sandbox refresh, enabling full restoration after the refresh.**\n\nThis command prepares a complete backup prior to a sandbox refresh. It creates a dedicated project under `scripts/sandbox-refresh/<sandbox-folder>`, retrieves metadata and data, attempts to capture Connected App consumer secrets, and can optionally delete the apps so they can be reuploaded after the refresh.\n\nKey functionalities:\n\n- **Create a save project:** Generates a dedicated project folder to store all artifacts for the sandbox backup.\n- **Find and select Connected Apps:** Lists Connected Apps in the org and lets you pick specific apps, use a name filter, or process all apps.\n- **Save metadata for restore:** Builds a manifest and retrieves the metadata types you choose so they can be restored after the refresh.\n- **Capture Consumer Secrets:** Attempts to capture Connected App consumer secrets automatically (opens a browser session when possible) and falls back to a short manual prompt when needed.\n- **Collect certificates:** Saves certificate files and their definitions so they can be redeployed later.\n- **Export custom settings & records:** Lets you pick custom settings to export as JSON and optionally export records using configured data workspaces.\n- **Persist choices & report:** Stores your backup choices in project config and sends report files for traceability.\n- **Optional cleanup:** Can delete backed-up Connected Apps from the org so they can be re-uploaded cleanly after the refresh.\n- **Interactive safety checks:** Prompts you to confirm package contents and other potentially destructive actions; sensible defaults are chosen where appropriate.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run before a sandbox refresh so that all credentials, certificates, metadata and data can be restored afterwards.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Salesforce CLI Integration:** Uses `sf org list metadata`, `sf project retrieve start`, `sf project generate`, `sf project deploy start`, and `sf data tree export`/`import` where applicable.\n- **Metadata Handling:** Writes and reads package XML files under the generated project (`manifest/`), copies MDAPI certificate artifacts into `force-app/main/default/certs`, and produces `package-metadata-to-restore.xml` for post-refresh deployment.\n- **Consumer Secret Handling:** Uses `puppeteer-core` with an executable path from `getChromeExecutablePath()` (env var `PUPPETEER_EXECUTABLE_PATH` may be required). Falls back to manual prompt when browser automation cannot be used.\n- **Data & Records:** Exports custom settings to JSON and supports exporting records through SFDMU workspaces chosen interactively.\n- **Config & Reporting:** Updates project/user config under `config/.sfdx-hardis.yml#refreshSandboxConfig` and reports artifacts to the WebSocket client.\n- **Error Handling:** Provides clear error messages and a summary response object indicating success/failure and which secrets were captured.\n\n</details>\n",
|
|
8201
8433
|
"examples": [
|
|
8202
|
-
"$ sf hardis:org:
|
|
8434
|
+
"$ sf hardis:org:refresh:before-refresh",
|
|
8435
|
+
"$ sf hardis:org:refresh:before-refresh --name \"MyConnectedApp\"",
|
|
8436
|
+
"$ sf hardis:org:refresh:before-refresh --name \"App1,App2,App3\"",
|
|
8437
|
+
"$ sf hardis:org:refresh:before-refresh --all",
|
|
8438
|
+
"$ sf hardis:org:refresh:before-refresh --delete"
|
|
8203
8439
|
],
|
|
8204
8440
|
"flags": {
|
|
8205
8441
|
"json": {
|
|
@@ -8217,18 +8453,38 @@
|
|
|
8217
8453
|
"multiple": false,
|
|
8218
8454
|
"type": "option"
|
|
8219
8455
|
},
|
|
8220
|
-
"
|
|
8221
|
-
"char": "
|
|
8222
|
-
"
|
|
8223
|
-
"
|
|
8224
|
-
"
|
|
8456
|
+
"target-org": {
|
|
8457
|
+
"char": "o",
|
|
8458
|
+
"name": "target-org",
|
|
8459
|
+
"noCacheDefault": true,
|
|
8460
|
+
"required": true,
|
|
8461
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8462
|
+
"hasDynamicHelp": true,
|
|
8225
8463
|
"multiple": false,
|
|
8226
8464
|
"type": "option"
|
|
8227
8465
|
},
|
|
8228
|
-
"
|
|
8466
|
+
"delete": {
|
|
8229
8467
|
"char": "d",
|
|
8230
|
-
"description": "
|
|
8231
|
-
"name": "
|
|
8468
|
+
"description": "By default, Connected Apps are not deleted from the org after saving. Set this flag to force their deletion so they will be able to be reuploaded again after refreshing the org.",
|
|
8469
|
+
"name": "delete",
|
|
8470
|
+
"summary": "Delete Connected Apps from org after saving",
|
|
8471
|
+
"allowNo": false,
|
|
8472
|
+
"type": "boolean"
|
|
8473
|
+
},
|
|
8474
|
+
"name": {
|
|
8475
|
+
"char": "n",
|
|
8476
|
+
"description": "Connected App name(s) to process. For multiple apps, separate with commas (e.g., \"App1,App2\")",
|
|
8477
|
+
"name": "name",
|
|
8478
|
+
"summary": "Filter according to Name criteria",
|
|
8479
|
+
"hasDynamicHelp": false,
|
|
8480
|
+
"multiple": false,
|
|
8481
|
+
"type": "option"
|
|
8482
|
+
},
|
|
8483
|
+
"all": {
|
|
8484
|
+
"char": "a",
|
|
8485
|
+
"description": "If set, all Connected Apps from the org will be processed. Takes precedence over --name if both are specified.",
|
|
8486
|
+
"name": "all",
|
|
8487
|
+
"summary": "Process all Connected Apps without selection prompt",
|
|
8232
8488
|
"allowNo": false,
|
|
8233
8489
|
"type": "boolean"
|
|
8234
8490
|
},
|
|
@@ -8244,69 +8500,52 @@
|
|
|
8244
8500
|
"name": "skipauth",
|
|
8245
8501
|
"allowNo": false,
|
|
8246
8502
|
"type": "boolean"
|
|
8247
|
-
},
|
|
8248
|
-
"target-org": {
|
|
8249
|
-
"aliases": [
|
|
8250
|
-
"targetusername",
|
|
8251
|
-
"u"
|
|
8252
|
-
],
|
|
8253
|
-
"char": "o",
|
|
8254
|
-
"deprecateAliases": true,
|
|
8255
|
-
"name": "target-org",
|
|
8256
|
-
"noCacheDefault": true,
|
|
8257
|
-
"required": true,
|
|
8258
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8259
|
-
"hasDynamicHelp": true,
|
|
8260
|
-
"multiple": false,
|
|
8261
|
-
"type": "option"
|
|
8262
8503
|
}
|
|
8263
8504
|
},
|
|
8264
8505
|
"hasDynamicHelp": true,
|
|
8265
8506
|
"hiddenAliases": [],
|
|
8266
|
-
"id": "hardis:org:
|
|
8507
|
+
"id": "hardis:org:refresh:before-refresh",
|
|
8267
8508
|
"pluginAlias": "sfdx-hardis",
|
|
8268
8509
|
"pluginName": "sfdx-hardis",
|
|
8269
8510
|
"pluginType": "core",
|
|
8270
8511
|
"strict": true,
|
|
8271
8512
|
"enableJsonFlag": true,
|
|
8272
|
-
"title": "Check org limits",
|
|
8273
8513
|
"requiresProject": true,
|
|
8274
|
-
"triggerNotification": true,
|
|
8275
8514
|
"isESM": true,
|
|
8276
8515
|
"relativePath": [
|
|
8277
8516
|
"lib",
|
|
8278
8517
|
"commands",
|
|
8279
8518
|
"hardis",
|
|
8280
8519
|
"org",
|
|
8281
|
-
"
|
|
8282
|
-
"
|
|
8520
|
+
"refresh",
|
|
8521
|
+
"before-refresh.js"
|
|
8283
8522
|
],
|
|
8284
8523
|
"aliasPermutations": [],
|
|
8285
8524
|
"permutations": [
|
|
8286
|
-
"hardis:org:
|
|
8287
|
-
"org:hardis:
|
|
8288
|
-
"org:
|
|
8289
|
-
"org:
|
|
8290
|
-
"hardis:
|
|
8291
|
-
"
|
|
8292
|
-
"
|
|
8293
|
-
"
|
|
8294
|
-
"hardis:
|
|
8295
|
-
"
|
|
8296
|
-
"
|
|
8297
|
-
"
|
|
8298
|
-
"hardis:org:
|
|
8299
|
-
"org:hardis:
|
|
8300
|
-
"org:
|
|
8301
|
-
"org:
|
|
8302
|
-
"hardis:
|
|
8303
|
-
"
|
|
8304
|
-
"
|
|
8305
|
-
"
|
|
8306
|
-
"hardis:
|
|
8307
|
-
"
|
|
8308
|
-
"
|
|
8309
|
-
"
|
|
8525
|
+
"hardis:org:refresh:before-refresh",
|
|
8526
|
+
"org:hardis:refresh:before-refresh",
|
|
8527
|
+
"org:refresh:hardis:before-refresh",
|
|
8528
|
+
"org:refresh:before-refresh:hardis",
|
|
8529
|
+
"hardis:refresh:org:before-refresh",
|
|
8530
|
+
"refresh:hardis:org:before-refresh",
|
|
8531
|
+
"refresh:org:hardis:before-refresh",
|
|
8532
|
+
"refresh:org:before-refresh:hardis",
|
|
8533
|
+
"hardis:refresh:before-refresh:org",
|
|
8534
|
+
"refresh:hardis:before-refresh:org",
|
|
8535
|
+
"refresh:before-refresh:hardis:org",
|
|
8536
|
+
"refresh:before-refresh:org:hardis",
|
|
8537
|
+
"hardis:org:before-refresh:refresh",
|
|
8538
|
+
"org:hardis:before-refresh:refresh",
|
|
8539
|
+
"org:before-refresh:hardis:refresh",
|
|
8540
|
+
"org:before-refresh:refresh:hardis",
|
|
8541
|
+
"hardis:before-refresh:org:refresh",
|
|
8542
|
+
"before-refresh:hardis:org:refresh",
|
|
8543
|
+
"before-refresh:org:hardis:refresh",
|
|
8544
|
+
"before-refresh:org:refresh:hardis",
|
|
8545
|
+
"hardis:before-refresh:refresh:org",
|
|
8546
|
+
"before-refresh:hardis:refresh:org",
|
|
8547
|
+
"before-refresh:refresh:hardis:org",
|
|
8548
|
+
"before-refresh:refresh:org:hardis"
|
|
8310
8549
|
]
|
|
8311
8550
|
},
|
|
8312
8551
|
"hardis:org:purge:apexlog": {
|
|
@@ -8665,269 +8904,30 @@
|
|
|
8665
8904
|
],
|
|
8666
8905
|
"aliasPermutations": [],
|
|
8667
8906
|
"permutations": [
|
|
8668
|
-
"hardis:org:purge:profile",
|
|
8669
|
-
"org:hardis:purge:profile",
|
|
8670
|
-
"org:purge:hardis:profile",
|
|
8671
|
-
"org:purge:profile:hardis",
|
|
8672
|
-
"hardis:purge:org:profile",
|
|
8673
|
-
"purge:hardis:org:profile",
|
|
8674
|
-
"purge:org:hardis:profile",
|
|
8675
|
-
"purge:org:profile:hardis",
|
|
8676
|
-
"hardis:purge:profile:org",
|
|
8677
|
-
"purge:hardis:profile:org",
|
|
8678
|
-
"purge:profile:hardis:org",
|
|
8679
|
-
"purge:profile:org:hardis",
|
|
8680
|
-
"hardis:org:profile:purge",
|
|
8681
|
-
"org:hardis:profile:purge",
|
|
8682
|
-
"org:profile:hardis:purge",
|
|
8683
|
-
"org:profile:purge:hardis",
|
|
8684
|
-
"hardis:profile:org:purge",
|
|
8685
|
-
"profile:hardis:org:purge",
|
|
8686
|
-
"profile:org:hardis:purge",
|
|
8687
|
-
"profile:org:purge:hardis",
|
|
8688
|
-
"hardis:profile:purge:org",
|
|
8689
|
-
"profile:hardis:purge:org",
|
|
8690
|
-
"profile:purge:hardis:org",
|
|
8691
|
-
"profile:purge:org:hardis"
|
|
8692
|
-
]
|
|
8693
|
-
},
|
|
8694
|
-
"hardis:org:refresh:after-refresh": {
|
|
8695
|
-
"aliases": [],
|
|
8696
|
-
"args": {},
|
|
8697
|
-
"description": "\n## Command Behavior\n\n**Restores all previously backed-up Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata to a Salesforce org after a sandbox refresh.**\n\nThis command is the second step in the sandbox refresh process. It scans the backup folder created before the refresh, allows interactive or flag-driven selection of items to restore, and automates cleanup and redeployment to the refreshed org while preserving credentials and configuration.\n\nKey functionalities:\n\n- **Choose a backup to restore:** Lets you pick the saved sandbox project that contains the artifacts to restore.\n- **Select which items to restore:** Finds Connected App XMLs, certificates, custom settings and other artifacts and lets you pick what to restore (or restore all).\n- **Safety checks and validation:** Confirms files exist and prompts before making changes to the target org.\n- **Prepare org for restore:** Optionally cleans up existing Connected Apps so saved apps can be re-deployed without conflict.\n- **Redeploy saved artifacts:** Restores Connected Apps (with saved secrets), certificates, SAML SSO configs, custom settings and other metadata.\n- **Handle SAML configs:** Cleans and updates SAML XML files and helps you choose certificates to wire into restored configs.\n- **Restore records:** Optionally runs data import from selected SFDMU workspaces to restore record data.\n- **Reporting & persistence:** Sends restore reports and can update project config to record what was restored.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run after a sandbox refresh to re-apply saved metadata, credentials and data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Backup Folder Handling:** Reads the immediate subfolders of `scripts/sandbox-refresh/` and validates the chosen project contains the expected `manifest/` and `force-app` layout.\n- **Metadata & Deployment APIs:** Uses `sf project deploy start --manifest` for package-based deploys, `sf project deploy start --metadata-dir` for MDAPI artifacts (certificates), and utility functions for Connected App deployment that preserve consumer secrets.\n- **SAML Handling:** Queries active certificates via tooling API, updates SAML XML files, and deploys using `sf project deploy start -m SamlSsoConfig`.\n- **Records Handling:** Uses interactive selection of SFDMU workspaces and runs data import utilities to restore records.\n- **Error Handling & Summary:** Aggregates results, logs success/warnings/errors, and returns a structured result indicating which items were restored and any failures.\n\n</details>\n",
|
|
8698
|
-
"examples": [
|
|
8699
|
-
"$ sf hardis:org:refresh:after-refresh",
|
|
8700
|
-
"$ sf hardis:org:refresh:after-refresh --name \"MyConnectedApp\" // Process specific app, no selection prompt",
|
|
8701
|
-
"$ sf hardis:org:refresh:after-refresh --name \"App1,App2,App3\" // Process multiple apps, no selection prompt",
|
|
8702
|
-
"$ sf hardis:org:refresh:after-refresh --all // Process all apps, no selection prompt",
|
|
8703
|
-
"$ sf hardis:org:refresh:after-refresh --target-org myDevOrg"
|
|
8704
|
-
],
|
|
8705
|
-
"flags": {
|
|
8706
|
-
"json": {
|
|
8707
|
-
"description": "Format output as json.",
|
|
8708
|
-
"helpGroup": "GLOBAL",
|
|
8709
|
-
"name": "json",
|
|
8710
|
-
"allowNo": false,
|
|
8711
|
-
"type": "boolean"
|
|
8712
|
-
},
|
|
8713
|
-
"flags-dir": {
|
|
8714
|
-
"helpGroup": "GLOBAL",
|
|
8715
|
-
"name": "flags-dir",
|
|
8716
|
-
"summary": "Import flag values from a directory.",
|
|
8717
|
-
"hasDynamicHelp": false,
|
|
8718
|
-
"multiple": false,
|
|
8719
|
-
"type": "option"
|
|
8720
|
-
},
|
|
8721
|
-
"target-org": {
|
|
8722
|
-
"char": "o",
|
|
8723
|
-
"name": "target-org",
|
|
8724
|
-
"noCacheDefault": true,
|
|
8725
|
-
"required": true,
|
|
8726
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8727
|
-
"hasDynamicHelp": true,
|
|
8728
|
-
"multiple": false,
|
|
8729
|
-
"type": "option"
|
|
8730
|
-
},
|
|
8731
|
-
"name": {
|
|
8732
|
-
"char": "n",
|
|
8733
|
-
"description": "Connected App name(s) to process (bypasses selection prompt). For multiple apps, separate with commas (e.g., \"App1,App2\")",
|
|
8734
|
-
"name": "name",
|
|
8735
|
-
"summary": "Filter according to Name criteria",
|
|
8736
|
-
"hasDynamicHelp": false,
|
|
8737
|
-
"multiple": false,
|
|
8738
|
-
"type": "option"
|
|
8739
|
-
},
|
|
8740
|
-
"all": {
|
|
8741
|
-
"char": "a",
|
|
8742
|
-
"description": "If set, all Connected Apps from the local repository will be processed. Takes precedence over --name if both are specified.",
|
|
8743
|
-
"name": "all",
|
|
8744
|
-
"summary": "Process all Connected Apps without selection prompt",
|
|
8745
|
-
"allowNo": false,
|
|
8746
|
-
"type": "boolean"
|
|
8747
|
-
},
|
|
8748
|
-
"websocket": {
|
|
8749
|
-
"description": "WebSocket host:port for VS Code SFDX Hardis UI integration",
|
|
8750
|
-
"name": "websocket",
|
|
8751
|
-
"summary": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8752
|
-
"hasDynamicHelp": false,
|
|
8753
|
-
"multiple": false,
|
|
8754
|
-
"type": "option"
|
|
8755
|
-
},
|
|
8756
|
-
"skipauth": {
|
|
8757
|
-
"description": "Skip authentication check when a default username is required",
|
|
8758
|
-
"name": "skipauth",
|
|
8759
|
-
"summary": "Skip authentication check when a default username is required",
|
|
8760
|
-
"allowNo": false,
|
|
8761
|
-
"type": "boolean"
|
|
8762
|
-
}
|
|
8763
|
-
},
|
|
8764
|
-
"hasDynamicHelp": true,
|
|
8765
|
-
"hiddenAliases": [],
|
|
8766
|
-
"id": "hardis:org:refresh:after-refresh",
|
|
8767
|
-
"pluginAlias": "sfdx-hardis",
|
|
8768
|
-
"pluginName": "sfdx-hardis",
|
|
8769
|
-
"pluginType": "core",
|
|
8770
|
-
"strict": true,
|
|
8771
|
-
"enableJsonFlag": true,
|
|
8772
|
-
"title": "Restore Connected Apps after org refresh",
|
|
8773
|
-
"requiresProject": true,
|
|
8774
|
-
"isESM": true,
|
|
8775
|
-
"relativePath": [
|
|
8776
|
-
"lib",
|
|
8777
|
-
"commands",
|
|
8778
|
-
"hardis",
|
|
8779
|
-
"org",
|
|
8780
|
-
"refresh",
|
|
8781
|
-
"after-refresh.js"
|
|
8782
|
-
],
|
|
8783
|
-
"aliasPermutations": [],
|
|
8784
|
-
"permutations": [
|
|
8785
|
-
"hardis:org:refresh:after-refresh",
|
|
8786
|
-
"org:hardis:refresh:after-refresh",
|
|
8787
|
-
"org:refresh:hardis:after-refresh",
|
|
8788
|
-
"org:refresh:after-refresh:hardis",
|
|
8789
|
-
"hardis:refresh:org:after-refresh",
|
|
8790
|
-
"refresh:hardis:org:after-refresh",
|
|
8791
|
-
"refresh:org:hardis:after-refresh",
|
|
8792
|
-
"refresh:org:after-refresh:hardis",
|
|
8793
|
-
"hardis:refresh:after-refresh:org",
|
|
8794
|
-
"refresh:hardis:after-refresh:org",
|
|
8795
|
-
"refresh:after-refresh:hardis:org",
|
|
8796
|
-
"refresh:after-refresh:org:hardis",
|
|
8797
|
-
"hardis:org:after-refresh:refresh",
|
|
8798
|
-
"org:hardis:after-refresh:refresh",
|
|
8799
|
-
"org:after-refresh:hardis:refresh",
|
|
8800
|
-
"org:after-refresh:refresh:hardis",
|
|
8801
|
-
"hardis:after-refresh:org:refresh",
|
|
8802
|
-
"after-refresh:hardis:org:refresh",
|
|
8803
|
-
"after-refresh:org:hardis:refresh",
|
|
8804
|
-
"after-refresh:org:refresh:hardis",
|
|
8805
|
-
"hardis:after-refresh:refresh:org",
|
|
8806
|
-
"after-refresh:hardis:refresh:org",
|
|
8807
|
-
"after-refresh:refresh:hardis:org",
|
|
8808
|
-
"after-refresh:refresh:org:hardis"
|
|
8809
|
-
]
|
|
8810
|
-
},
|
|
8811
|
-
"hardis:org:refresh:before-refresh": {
|
|
8812
|
-
"aliases": [],
|
|
8813
|
-
"args": {},
|
|
8814
|
-
"description": "\n## Command Behavior\n\n**Backs up all Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata from a Salesforce org before a sandbox refresh, enabling full restoration after the refresh.**\n\nThis command prepares a complete backup prior to a sandbox refresh. It creates a dedicated project under `scripts/sandbox-refresh/<sandbox-folder>`, retrieves metadata and data, attempts to capture Connected App consumer secrets, and can optionally delete the apps so they can be reuploaded after the refresh.\n\nKey functionalities:\n\n- **Create a save project:** Generates a dedicated project folder to store all artifacts for the sandbox backup.\n- **Find and select Connected Apps:** Lists Connected Apps in the org and lets you pick specific apps, use a name filter, or process all apps.\n- **Save metadata for restore:** Builds a manifest and retrieves the metadata types you choose so they can be restored after the refresh.\n- **Capture Consumer Secrets:** Attempts to capture Connected App consumer secrets automatically (opens a browser session when possible) and falls back to a short manual prompt when needed.\n- **Collect certificates:** Saves certificate files and their definitions so they can be redeployed later.\n- **Export custom settings & records:** Lets you pick custom settings to export as JSON and optionally export records using configured data workspaces.\n- **Persist choices & report:** Stores your backup choices in project config and sends report files for traceability.\n- **Optional cleanup:** Can delete backed-up Connected Apps from the org so they can be re-uploaded cleanly after the refresh.\n- **Interactive safety checks:** Prompts you to confirm package contents and other potentially destructive actions; sensible defaults are chosen where appropriate.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run before a sandbox refresh so that all credentials, certificates, metadata and data can be restored afterwards.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Salesforce CLI Integration:** Uses `sf org list metadata`, `sf project retrieve start`, `sf project generate`, `sf project deploy start`, and `sf data tree export`/`import` where applicable.\n- **Metadata Handling:** Writes and reads package XML files under the generated project (`manifest/`), copies MDAPI certificate artifacts into `force-app/main/default/certs`, and produces `package-metadata-to-restore.xml` for post-refresh deployment.\n- **Consumer Secret Handling:** Uses `puppeteer-core` with an executable path from `getChromeExecutablePath()` (env var `PUPPETEER_EXECUTABLE_PATH` may be required). Falls back to manual prompt when browser automation cannot be used.\n- **Data & Records:** Exports custom settings to JSON and supports exporting records through SFDMU workspaces chosen interactively.\n- **Config & Reporting:** Updates project/user config under `config/.sfdx-hardis.yml#refreshSandboxConfig` and reports artifacts to the WebSocket client.\n- **Error Handling:** Provides clear error messages and a summary response object indicating success/failure and which secrets were captured.\n\n</details>\n",
|
|
8815
|
-
"examples": [
|
|
8816
|
-
"$ sf hardis:org:refresh:before-refresh",
|
|
8817
|
-
"$ sf hardis:org:refresh:before-refresh --name \"MyConnectedApp\"",
|
|
8818
|
-
"$ sf hardis:org:refresh:before-refresh --name \"App1,App2,App3\"",
|
|
8819
|
-
"$ sf hardis:org:refresh:before-refresh --all",
|
|
8820
|
-
"$ sf hardis:org:refresh:before-refresh --delete"
|
|
8821
|
-
],
|
|
8822
|
-
"flags": {
|
|
8823
|
-
"json": {
|
|
8824
|
-
"description": "Format output as json.",
|
|
8825
|
-
"helpGroup": "GLOBAL",
|
|
8826
|
-
"name": "json",
|
|
8827
|
-
"allowNo": false,
|
|
8828
|
-
"type": "boolean"
|
|
8829
|
-
},
|
|
8830
|
-
"flags-dir": {
|
|
8831
|
-
"helpGroup": "GLOBAL",
|
|
8832
|
-
"name": "flags-dir",
|
|
8833
|
-
"summary": "Import flag values from a directory.",
|
|
8834
|
-
"hasDynamicHelp": false,
|
|
8835
|
-
"multiple": false,
|
|
8836
|
-
"type": "option"
|
|
8837
|
-
},
|
|
8838
|
-
"target-org": {
|
|
8839
|
-
"char": "o",
|
|
8840
|
-
"name": "target-org",
|
|
8841
|
-
"noCacheDefault": true,
|
|
8842
|
-
"required": true,
|
|
8843
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8844
|
-
"hasDynamicHelp": true,
|
|
8845
|
-
"multiple": false,
|
|
8846
|
-
"type": "option"
|
|
8847
|
-
},
|
|
8848
|
-
"delete": {
|
|
8849
|
-
"char": "d",
|
|
8850
|
-
"description": "By default, Connected Apps are not deleted from the org after saving. Set this flag to force their deletion so they will be able to be reuploaded again after refreshing the org.",
|
|
8851
|
-
"name": "delete",
|
|
8852
|
-
"summary": "Delete Connected Apps from org after saving",
|
|
8853
|
-
"allowNo": false,
|
|
8854
|
-
"type": "boolean"
|
|
8855
|
-
},
|
|
8856
|
-
"name": {
|
|
8857
|
-
"char": "n",
|
|
8858
|
-
"description": "Connected App name(s) to process. For multiple apps, separate with commas (e.g., \"App1,App2\")",
|
|
8859
|
-
"name": "name",
|
|
8860
|
-
"summary": "Filter according to Name criteria",
|
|
8861
|
-
"hasDynamicHelp": false,
|
|
8862
|
-
"multiple": false,
|
|
8863
|
-
"type": "option"
|
|
8864
|
-
},
|
|
8865
|
-
"all": {
|
|
8866
|
-
"char": "a",
|
|
8867
|
-
"description": "If set, all Connected Apps from the org will be processed. Takes precedence over --name if both are specified.",
|
|
8868
|
-
"name": "all",
|
|
8869
|
-
"summary": "Process all Connected Apps without selection prompt",
|
|
8870
|
-
"allowNo": false,
|
|
8871
|
-
"type": "boolean"
|
|
8872
|
-
},
|
|
8873
|
-
"websocket": {
|
|
8874
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8875
|
-
"name": "websocket",
|
|
8876
|
-
"hasDynamicHelp": false,
|
|
8877
|
-
"multiple": false,
|
|
8878
|
-
"type": "option"
|
|
8879
|
-
},
|
|
8880
|
-
"skipauth": {
|
|
8881
|
-
"description": "Skip authentication check when a default username is required",
|
|
8882
|
-
"name": "skipauth",
|
|
8883
|
-
"allowNo": false,
|
|
8884
|
-
"type": "boolean"
|
|
8885
|
-
}
|
|
8886
|
-
},
|
|
8887
|
-
"hasDynamicHelp": true,
|
|
8888
|
-
"hiddenAliases": [],
|
|
8889
|
-
"id": "hardis:org:refresh:before-refresh",
|
|
8890
|
-
"pluginAlias": "sfdx-hardis",
|
|
8891
|
-
"pluginName": "sfdx-hardis",
|
|
8892
|
-
"pluginType": "core",
|
|
8893
|
-
"strict": true,
|
|
8894
|
-
"enableJsonFlag": true,
|
|
8895
|
-
"requiresProject": true,
|
|
8896
|
-
"isESM": true,
|
|
8897
|
-
"relativePath": [
|
|
8898
|
-
"lib",
|
|
8899
|
-
"commands",
|
|
8900
|
-
"hardis",
|
|
8901
|
-
"org",
|
|
8902
|
-
"refresh",
|
|
8903
|
-
"before-refresh.js"
|
|
8904
|
-
],
|
|
8905
|
-
"aliasPermutations": [],
|
|
8906
|
-
"permutations": [
|
|
8907
|
-
"hardis:org:refresh:before-refresh",
|
|
8908
|
-
"org:hardis:refresh:before-refresh",
|
|
8909
|
-
"org:refresh:hardis:before-refresh",
|
|
8910
|
-
"org:refresh:before-refresh:hardis",
|
|
8911
|
-
"hardis:refresh:org:before-refresh",
|
|
8912
|
-
"refresh:hardis:org:before-refresh",
|
|
8913
|
-
"refresh:org:hardis:before-refresh",
|
|
8914
|
-
"refresh:org:before-refresh:hardis",
|
|
8915
|
-
"hardis:refresh:before-refresh:org",
|
|
8916
|
-
"refresh:hardis:before-refresh:org",
|
|
8917
|
-
"refresh:before-refresh:hardis:org",
|
|
8918
|
-
"refresh:before-refresh:org:hardis",
|
|
8919
|
-
"hardis:org:before-refresh:refresh",
|
|
8920
|
-
"org:hardis:before-refresh:refresh",
|
|
8921
|
-
"org:before-refresh:hardis:refresh",
|
|
8922
|
-
"org:before-refresh:refresh:hardis",
|
|
8923
|
-
"hardis:before-refresh:org:refresh",
|
|
8924
|
-
"before-refresh:hardis:org:refresh",
|
|
8925
|
-
"before-refresh:org:hardis:refresh",
|
|
8926
|
-
"before-refresh:org:refresh:hardis",
|
|
8927
|
-
"hardis:before-refresh:refresh:org",
|
|
8928
|
-
"before-refresh:hardis:refresh:org",
|
|
8929
|
-
"before-refresh:refresh:hardis:org",
|
|
8930
|
-
"before-refresh:refresh:org:hardis"
|
|
8907
|
+
"hardis:org:purge:profile",
|
|
8908
|
+
"org:hardis:purge:profile",
|
|
8909
|
+
"org:purge:hardis:profile",
|
|
8910
|
+
"org:purge:profile:hardis",
|
|
8911
|
+
"hardis:purge:org:profile",
|
|
8912
|
+
"purge:hardis:org:profile",
|
|
8913
|
+
"purge:org:hardis:profile",
|
|
8914
|
+
"purge:org:profile:hardis",
|
|
8915
|
+
"hardis:purge:profile:org",
|
|
8916
|
+
"purge:hardis:profile:org",
|
|
8917
|
+
"purge:profile:hardis:org",
|
|
8918
|
+
"purge:profile:org:hardis",
|
|
8919
|
+
"hardis:org:profile:purge",
|
|
8920
|
+
"org:hardis:profile:purge",
|
|
8921
|
+
"org:profile:hardis:purge",
|
|
8922
|
+
"org:profile:purge:hardis",
|
|
8923
|
+
"hardis:profile:org:purge",
|
|
8924
|
+
"profile:hardis:org:purge",
|
|
8925
|
+
"profile:org:hardis:purge",
|
|
8926
|
+
"profile:org:purge:hardis",
|
|
8927
|
+
"hardis:profile:purge:org",
|
|
8928
|
+
"profile:hardis:purge:org",
|
|
8929
|
+
"profile:purge:hardis:org",
|
|
8930
|
+
"profile:purge:org:hardis"
|
|
8931
8931
|
]
|
|
8932
8932
|
},
|
|
8933
8933
|
"hardis:org:retrieve:packageconfig": {
|
|
@@ -10324,6 +10324,238 @@
|
|
|
10324
10324
|
"remotesites:audit:project:hardis"
|
|
10325
10325
|
]
|
|
10326
10326
|
},
|
|
10327
|
+
"hardis:project:configure:auth": {
|
|
10328
|
+
"aliases": [],
|
|
10329
|
+
"args": {},
|
|
10330
|
+
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
10331
|
+
"examples": [
|
|
10332
|
+
"$ sf hardis:project:configure:auth"
|
|
10333
|
+
],
|
|
10334
|
+
"flags": {
|
|
10335
|
+
"json": {
|
|
10336
|
+
"description": "Format output as json.",
|
|
10337
|
+
"helpGroup": "GLOBAL",
|
|
10338
|
+
"name": "json",
|
|
10339
|
+
"allowNo": false,
|
|
10340
|
+
"type": "boolean"
|
|
10341
|
+
},
|
|
10342
|
+
"flags-dir": {
|
|
10343
|
+
"helpGroup": "GLOBAL",
|
|
10344
|
+
"name": "flags-dir",
|
|
10345
|
+
"summary": "Import flag values from a directory.",
|
|
10346
|
+
"hasDynamicHelp": false,
|
|
10347
|
+
"multiple": false,
|
|
10348
|
+
"type": "option"
|
|
10349
|
+
},
|
|
10350
|
+
"devhub": {
|
|
10351
|
+
"char": "b",
|
|
10352
|
+
"description": "Configure project DevHub",
|
|
10353
|
+
"name": "devhub",
|
|
10354
|
+
"allowNo": false,
|
|
10355
|
+
"type": "boolean"
|
|
10356
|
+
},
|
|
10357
|
+
"debug": {
|
|
10358
|
+
"char": "d",
|
|
10359
|
+
"description": "Activate debug mode (more logs)",
|
|
10360
|
+
"name": "debug",
|
|
10361
|
+
"allowNo": false,
|
|
10362
|
+
"type": "boolean"
|
|
10363
|
+
},
|
|
10364
|
+
"websocket": {
|
|
10365
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
10366
|
+
"name": "websocket",
|
|
10367
|
+
"hasDynamicHelp": false,
|
|
10368
|
+
"multiple": false,
|
|
10369
|
+
"type": "option"
|
|
10370
|
+
},
|
|
10371
|
+
"skipauth": {
|
|
10372
|
+
"description": "Skip authentication check when a default username is required",
|
|
10373
|
+
"name": "skipauth",
|
|
10374
|
+
"allowNo": false,
|
|
10375
|
+
"type": "boolean"
|
|
10376
|
+
},
|
|
10377
|
+
"target-org": {
|
|
10378
|
+
"aliases": [
|
|
10379
|
+
"targetusername",
|
|
10380
|
+
"u"
|
|
10381
|
+
],
|
|
10382
|
+
"char": "o",
|
|
10383
|
+
"deprecateAliases": true,
|
|
10384
|
+
"name": "target-org",
|
|
10385
|
+
"noCacheDefault": true,
|
|
10386
|
+
"summary": "Username or alias of the target org.",
|
|
10387
|
+
"hasDynamicHelp": true,
|
|
10388
|
+
"multiple": false,
|
|
10389
|
+
"type": "option"
|
|
10390
|
+
},
|
|
10391
|
+
"target-dev-hub": {
|
|
10392
|
+
"aliases": [
|
|
10393
|
+
"targetdevhubusername"
|
|
10394
|
+
],
|
|
10395
|
+
"char": "v",
|
|
10396
|
+
"deprecateAliases": true,
|
|
10397
|
+
"name": "target-dev-hub",
|
|
10398
|
+
"noCacheDefault": true,
|
|
10399
|
+
"required": false,
|
|
10400
|
+
"summary": "Username or alias of the Dev Hub org.",
|
|
10401
|
+
"hasDynamicHelp": true,
|
|
10402
|
+
"multiple": false,
|
|
10403
|
+
"type": "option"
|
|
10404
|
+
}
|
|
10405
|
+
},
|
|
10406
|
+
"hasDynamicHelp": true,
|
|
10407
|
+
"hiddenAliases": [],
|
|
10408
|
+
"id": "hardis:project:configure:auth",
|
|
10409
|
+
"pluginAlias": "sfdx-hardis",
|
|
10410
|
+
"pluginName": "sfdx-hardis",
|
|
10411
|
+
"pluginType": "core",
|
|
10412
|
+
"strict": true,
|
|
10413
|
+
"enableJsonFlag": true,
|
|
10414
|
+
"title": "Configure authentication",
|
|
10415
|
+
"requiresProject": false,
|
|
10416
|
+
"requiresDependencies": [
|
|
10417
|
+
"openssl"
|
|
10418
|
+
],
|
|
10419
|
+
"isESM": true,
|
|
10420
|
+
"relativePath": [
|
|
10421
|
+
"lib",
|
|
10422
|
+
"commands",
|
|
10423
|
+
"hardis",
|
|
10424
|
+
"project",
|
|
10425
|
+
"configure",
|
|
10426
|
+
"auth.js"
|
|
10427
|
+
],
|
|
10428
|
+
"aliasPermutations": [],
|
|
10429
|
+
"permutations": [
|
|
10430
|
+
"hardis:project:configure:auth",
|
|
10431
|
+
"project:hardis:configure:auth",
|
|
10432
|
+
"project:configure:hardis:auth",
|
|
10433
|
+
"project:configure:auth:hardis",
|
|
10434
|
+
"hardis:configure:project:auth",
|
|
10435
|
+
"configure:hardis:project:auth",
|
|
10436
|
+
"configure:project:hardis:auth",
|
|
10437
|
+
"configure:project:auth:hardis",
|
|
10438
|
+
"hardis:configure:auth:project",
|
|
10439
|
+
"configure:hardis:auth:project",
|
|
10440
|
+
"configure:auth:hardis:project",
|
|
10441
|
+
"configure:auth:project:hardis",
|
|
10442
|
+
"hardis:project:auth:configure",
|
|
10443
|
+
"project:hardis:auth:configure",
|
|
10444
|
+
"project:auth:hardis:configure",
|
|
10445
|
+
"project:auth:configure:hardis",
|
|
10446
|
+
"hardis:auth:project:configure",
|
|
10447
|
+
"auth:hardis:project:configure",
|
|
10448
|
+
"auth:project:hardis:configure",
|
|
10449
|
+
"auth:project:configure:hardis",
|
|
10450
|
+
"hardis:auth:configure:project",
|
|
10451
|
+
"auth:hardis:configure:project",
|
|
10452
|
+
"auth:configure:hardis:project",
|
|
10453
|
+
"auth:configure:project:hardis"
|
|
10454
|
+
]
|
|
10455
|
+
},
|
|
10456
|
+
"hardis:project:convert:profilestopermsets": {
|
|
10457
|
+
"aliases": [],
|
|
10458
|
+
"args": {},
|
|
10459
|
+
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
10460
|
+
"examples": [
|
|
10461
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
10462
|
+
],
|
|
10463
|
+
"flags": {
|
|
10464
|
+
"json": {
|
|
10465
|
+
"description": "Format output as json.",
|
|
10466
|
+
"helpGroup": "GLOBAL",
|
|
10467
|
+
"name": "json",
|
|
10468
|
+
"allowNo": false,
|
|
10469
|
+
"type": "boolean"
|
|
10470
|
+
},
|
|
10471
|
+
"flags-dir": {
|
|
10472
|
+
"helpGroup": "GLOBAL",
|
|
10473
|
+
"name": "flags-dir",
|
|
10474
|
+
"summary": "Import flag values from a directory.",
|
|
10475
|
+
"hasDynamicHelp": false,
|
|
10476
|
+
"multiple": false,
|
|
10477
|
+
"type": "option"
|
|
10478
|
+
},
|
|
10479
|
+
"except": {
|
|
10480
|
+
"char": "e",
|
|
10481
|
+
"description": "List of filters",
|
|
10482
|
+
"name": "except",
|
|
10483
|
+
"default": [],
|
|
10484
|
+
"hasDynamicHelp": false,
|
|
10485
|
+
"multiple": true,
|
|
10486
|
+
"type": "option"
|
|
10487
|
+
},
|
|
10488
|
+
"debug": {
|
|
10489
|
+
"char": "d",
|
|
10490
|
+
"description": "Activate debug mode (more logs)",
|
|
10491
|
+
"name": "debug",
|
|
10492
|
+
"allowNo": false,
|
|
10493
|
+
"type": "boolean"
|
|
10494
|
+
},
|
|
10495
|
+
"websocket": {
|
|
10496
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
10497
|
+
"name": "websocket",
|
|
10498
|
+
"hasDynamicHelp": false,
|
|
10499
|
+
"multiple": false,
|
|
10500
|
+
"type": "option"
|
|
10501
|
+
},
|
|
10502
|
+
"skipauth": {
|
|
10503
|
+
"description": "Skip authentication check when a default username is required",
|
|
10504
|
+
"name": "skipauth",
|
|
10505
|
+
"allowNo": false,
|
|
10506
|
+
"type": "boolean"
|
|
10507
|
+
}
|
|
10508
|
+
},
|
|
10509
|
+
"hasDynamicHelp": false,
|
|
10510
|
+
"hiddenAliases": [],
|
|
10511
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
10512
|
+
"pluginAlias": "sfdx-hardis",
|
|
10513
|
+
"pluginName": "sfdx-hardis",
|
|
10514
|
+
"pluginType": "core",
|
|
10515
|
+
"strict": true,
|
|
10516
|
+
"enableJsonFlag": true,
|
|
10517
|
+
"title": "Convert Profiles into Permission Sets",
|
|
10518
|
+
"requiresProject": true,
|
|
10519
|
+
"requiresSfdxPlugins": [
|
|
10520
|
+
"shane-sfdx-plugins"
|
|
10521
|
+
],
|
|
10522
|
+
"isESM": true,
|
|
10523
|
+
"relativePath": [
|
|
10524
|
+
"lib",
|
|
10525
|
+
"commands",
|
|
10526
|
+
"hardis",
|
|
10527
|
+
"project",
|
|
10528
|
+
"convert",
|
|
10529
|
+
"profilestopermsets.js"
|
|
10530
|
+
],
|
|
10531
|
+
"aliasPermutations": [],
|
|
10532
|
+
"permutations": [
|
|
10533
|
+
"hardis:project:convert:profilestopermsets",
|
|
10534
|
+
"project:hardis:convert:profilestopermsets",
|
|
10535
|
+
"project:convert:hardis:profilestopermsets",
|
|
10536
|
+
"project:convert:profilestopermsets:hardis",
|
|
10537
|
+
"hardis:convert:project:profilestopermsets",
|
|
10538
|
+
"convert:hardis:project:profilestopermsets",
|
|
10539
|
+
"convert:project:hardis:profilestopermsets",
|
|
10540
|
+
"convert:project:profilestopermsets:hardis",
|
|
10541
|
+
"hardis:convert:profilestopermsets:project",
|
|
10542
|
+
"convert:hardis:profilestopermsets:project",
|
|
10543
|
+
"convert:profilestopermsets:hardis:project",
|
|
10544
|
+
"convert:profilestopermsets:project:hardis",
|
|
10545
|
+
"hardis:project:profilestopermsets:convert",
|
|
10546
|
+
"project:hardis:profilestopermsets:convert",
|
|
10547
|
+
"project:profilestopermsets:hardis:convert",
|
|
10548
|
+
"project:profilestopermsets:convert:hardis",
|
|
10549
|
+
"hardis:profilestopermsets:project:convert",
|
|
10550
|
+
"profilestopermsets:hardis:project:convert",
|
|
10551
|
+
"profilestopermsets:project:hardis:convert",
|
|
10552
|
+
"profilestopermsets:project:convert:hardis",
|
|
10553
|
+
"hardis:profilestopermsets:convert:project",
|
|
10554
|
+
"profilestopermsets:hardis:convert:project",
|
|
10555
|
+
"profilestopermsets:convert:hardis:project",
|
|
10556
|
+
"profilestopermsets:convert:project:hardis"
|
|
10557
|
+
]
|
|
10558
|
+
},
|
|
10327
10559
|
"hardis:project:clean:emptyitems": {
|
|
10328
10560
|
"aliases": [],
|
|
10329
10561
|
"args": {},
|
|
@@ -11879,267 +12111,35 @@
|
|
|
11879
12111
|
"commands",
|
|
11880
12112
|
"hardis",
|
|
11881
12113
|
"project",
|
|
11882
|
-
"clean",
|
|
11883
|
-
"xml.js"
|
|
11884
|
-
],
|
|
11885
|
-
"aliasPermutations": [],
|
|
11886
|
-
"permutations": [
|
|
11887
|
-
"hardis:project:clean:xml",
|
|
11888
|
-
"project:hardis:clean:xml",
|
|
11889
|
-
"project:clean:hardis:xml",
|
|
11890
|
-
"project:clean:xml:hardis",
|
|
11891
|
-
"hardis:clean:project:xml",
|
|
11892
|
-
"clean:hardis:project:xml",
|
|
11893
|
-
"clean:project:hardis:xml",
|
|
11894
|
-
"clean:project:xml:hardis",
|
|
11895
|
-
"hardis:clean:xml:project",
|
|
11896
|
-
"clean:hardis:xml:project",
|
|
11897
|
-
"clean:xml:hardis:project",
|
|
11898
|
-
"clean:xml:project:hardis",
|
|
11899
|
-
"hardis:project:xml:clean",
|
|
11900
|
-
"project:hardis:xml:clean",
|
|
11901
|
-
"project:xml:hardis:clean",
|
|
11902
|
-
"project:xml:clean:hardis",
|
|
11903
|
-
"hardis:xml:project:clean",
|
|
11904
|
-
"xml:hardis:project:clean",
|
|
11905
|
-
"xml:project:hardis:clean",
|
|
11906
|
-
"xml:project:clean:hardis",
|
|
11907
|
-
"hardis:xml:clean:project",
|
|
11908
|
-
"xml:hardis:clean:project",
|
|
11909
|
-
"xml:clean:hardis:project",
|
|
11910
|
-
"xml:clean:project:hardis"
|
|
11911
|
-
]
|
|
11912
|
-
},
|
|
11913
|
-
"hardis:project:configure:auth": {
|
|
11914
|
-
"aliases": [],
|
|
11915
|
-
"args": {},
|
|
11916
|
-
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
11917
|
-
"examples": [
|
|
11918
|
-
"$ sf hardis:project:configure:auth"
|
|
11919
|
-
],
|
|
11920
|
-
"flags": {
|
|
11921
|
-
"json": {
|
|
11922
|
-
"description": "Format output as json.",
|
|
11923
|
-
"helpGroup": "GLOBAL",
|
|
11924
|
-
"name": "json",
|
|
11925
|
-
"allowNo": false,
|
|
11926
|
-
"type": "boolean"
|
|
11927
|
-
},
|
|
11928
|
-
"flags-dir": {
|
|
11929
|
-
"helpGroup": "GLOBAL",
|
|
11930
|
-
"name": "flags-dir",
|
|
11931
|
-
"summary": "Import flag values from a directory.",
|
|
11932
|
-
"hasDynamicHelp": false,
|
|
11933
|
-
"multiple": false,
|
|
11934
|
-
"type": "option"
|
|
11935
|
-
},
|
|
11936
|
-
"devhub": {
|
|
11937
|
-
"char": "b",
|
|
11938
|
-
"description": "Configure project DevHub",
|
|
11939
|
-
"name": "devhub",
|
|
11940
|
-
"allowNo": false,
|
|
11941
|
-
"type": "boolean"
|
|
11942
|
-
},
|
|
11943
|
-
"debug": {
|
|
11944
|
-
"char": "d",
|
|
11945
|
-
"description": "Activate debug mode (more logs)",
|
|
11946
|
-
"name": "debug",
|
|
11947
|
-
"allowNo": false,
|
|
11948
|
-
"type": "boolean"
|
|
11949
|
-
},
|
|
11950
|
-
"websocket": {
|
|
11951
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11952
|
-
"name": "websocket",
|
|
11953
|
-
"hasDynamicHelp": false,
|
|
11954
|
-
"multiple": false,
|
|
11955
|
-
"type": "option"
|
|
11956
|
-
},
|
|
11957
|
-
"skipauth": {
|
|
11958
|
-
"description": "Skip authentication check when a default username is required",
|
|
11959
|
-
"name": "skipauth",
|
|
11960
|
-
"allowNo": false,
|
|
11961
|
-
"type": "boolean"
|
|
11962
|
-
},
|
|
11963
|
-
"target-org": {
|
|
11964
|
-
"aliases": [
|
|
11965
|
-
"targetusername",
|
|
11966
|
-
"u"
|
|
11967
|
-
],
|
|
11968
|
-
"char": "o",
|
|
11969
|
-
"deprecateAliases": true,
|
|
11970
|
-
"name": "target-org",
|
|
11971
|
-
"noCacheDefault": true,
|
|
11972
|
-
"summary": "Username or alias of the target org.",
|
|
11973
|
-
"hasDynamicHelp": true,
|
|
11974
|
-
"multiple": false,
|
|
11975
|
-
"type": "option"
|
|
11976
|
-
},
|
|
11977
|
-
"target-dev-hub": {
|
|
11978
|
-
"aliases": [
|
|
11979
|
-
"targetdevhubusername"
|
|
11980
|
-
],
|
|
11981
|
-
"char": "v",
|
|
11982
|
-
"deprecateAliases": true,
|
|
11983
|
-
"name": "target-dev-hub",
|
|
11984
|
-
"noCacheDefault": true,
|
|
11985
|
-
"required": false,
|
|
11986
|
-
"summary": "Username or alias of the Dev Hub org.",
|
|
11987
|
-
"hasDynamicHelp": true,
|
|
11988
|
-
"multiple": false,
|
|
11989
|
-
"type": "option"
|
|
11990
|
-
}
|
|
11991
|
-
},
|
|
11992
|
-
"hasDynamicHelp": true,
|
|
11993
|
-
"hiddenAliases": [],
|
|
11994
|
-
"id": "hardis:project:configure:auth",
|
|
11995
|
-
"pluginAlias": "sfdx-hardis",
|
|
11996
|
-
"pluginName": "sfdx-hardis",
|
|
11997
|
-
"pluginType": "core",
|
|
11998
|
-
"strict": true,
|
|
11999
|
-
"enableJsonFlag": true,
|
|
12000
|
-
"title": "Configure authentication",
|
|
12001
|
-
"requiresProject": false,
|
|
12002
|
-
"requiresDependencies": [
|
|
12003
|
-
"openssl"
|
|
12004
|
-
],
|
|
12005
|
-
"isESM": true,
|
|
12006
|
-
"relativePath": [
|
|
12007
|
-
"lib",
|
|
12008
|
-
"commands",
|
|
12009
|
-
"hardis",
|
|
12010
|
-
"project",
|
|
12011
|
-
"configure",
|
|
12012
|
-
"auth.js"
|
|
12013
|
-
],
|
|
12014
|
-
"aliasPermutations": [],
|
|
12015
|
-
"permutations": [
|
|
12016
|
-
"hardis:project:configure:auth",
|
|
12017
|
-
"project:hardis:configure:auth",
|
|
12018
|
-
"project:configure:hardis:auth",
|
|
12019
|
-
"project:configure:auth:hardis",
|
|
12020
|
-
"hardis:configure:project:auth",
|
|
12021
|
-
"configure:hardis:project:auth",
|
|
12022
|
-
"configure:project:hardis:auth",
|
|
12023
|
-
"configure:project:auth:hardis",
|
|
12024
|
-
"hardis:configure:auth:project",
|
|
12025
|
-
"configure:hardis:auth:project",
|
|
12026
|
-
"configure:auth:hardis:project",
|
|
12027
|
-
"configure:auth:project:hardis",
|
|
12028
|
-
"hardis:project:auth:configure",
|
|
12029
|
-
"project:hardis:auth:configure",
|
|
12030
|
-
"project:auth:hardis:configure",
|
|
12031
|
-
"project:auth:configure:hardis",
|
|
12032
|
-
"hardis:auth:project:configure",
|
|
12033
|
-
"auth:hardis:project:configure",
|
|
12034
|
-
"auth:project:hardis:configure",
|
|
12035
|
-
"auth:project:configure:hardis",
|
|
12036
|
-
"hardis:auth:configure:project",
|
|
12037
|
-
"auth:hardis:configure:project",
|
|
12038
|
-
"auth:configure:hardis:project",
|
|
12039
|
-
"auth:configure:project:hardis"
|
|
12040
|
-
]
|
|
12041
|
-
},
|
|
12042
|
-
"hardis:project:convert:profilestopermsets": {
|
|
12043
|
-
"aliases": [],
|
|
12044
|
-
"args": {},
|
|
12045
|
-
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
12046
|
-
"examples": [
|
|
12047
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
12048
|
-
],
|
|
12049
|
-
"flags": {
|
|
12050
|
-
"json": {
|
|
12051
|
-
"description": "Format output as json.",
|
|
12052
|
-
"helpGroup": "GLOBAL",
|
|
12053
|
-
"name": "json",
|
|
12054
|
-
"allowNo": false,
|
|
12055
|
-
"type": "boolean"
|
|
12056
|
-
},
|
|
12057
|
-
"flags-dir": {
|
|
12058
|
-
"helpGroup": "GLOBAL",
|
|
12059
|
-
"name": "flags-dir",
|
|
12060
|
-
"summary": "Import flag values from a directory.",
|
|
12061
|
-
"hasDynamicHelp": false,
|
|
12062
|
-
"multiple": false,
|
|
12063
|
-
"type": "option"
|
|
12064
|
-
},
|
|
12065
|
-
"except": {
|
|
12066
|
-
"char": "e",
|
|
12067
|
-
"description": "List of filters",
|
|
12068
|
-
"name": "except",
|
|
12069
|
-
"default": [],
|
|
12070
|
-
"hasDynamicHelp": false,
|
|
12071
|
-
"multiple": true,
|
|
12072
|
-
"type": "option"
|
|
12073
|
-
},
|
|
12074
|
-
"debug": {
|
|
12075
|
-
"char": "d",
|
|
12076
|
-
"description": "Activate debug mode (more logs)",
|
|
12077
|
-
"name": "debug",
|
|
12078
|
-
"allowNo": false,
|
|
12079
|
-
"type": "boolean"
|
|
12080
|
-
},
|
|
12081
|
-
"websocket": {
|
|
12082
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12083
|
-
"name": "websocket",
|
|
12084
|
-
"hasDynamicHelp": false,
|
|
12085
|
-
"multiple": false,
|
|
12086
|
-
"type": "option"
|
|
12087
|
-
},
|
|
12088
|
-
"skipauth": {
|
|
12089
|
-
"description": "Skip authentication check when a default username is required",
|
|
12090
|
-
"name": "skipauth",
|
|
12091
|
-
"allowNo": false,
|
|
12092
|
-
"type": "boolean"
|
|
12093
|
-
}
|
|
12094
|
-
},
|
|
12095
|
-
"hasDynamicHelp": false,
|
|
12096
|
-
"hiddenAliases": [],
|
|
12097
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
12098
|
-
"pluginAlias": "sfdx-hardis",
|
|
12099
|
-
"pluginName": "sfdx-hardis",
|
|
12100
|
-
"pluginType": "core",
|
|
12101
|
-
"strict": true,
|
|
12102
|
-
"enableJsonFlag": true,
|
|
12103
|
-
"title": "Convert Profiles into Permission Sets",
|
|
12104
|
-
"requiresProject": true,
|
|
12105
|
-
"requiresSfdxPlugins": [
|
|
12106
|
-
"shane-sfdx-plugins"
|
|
12107
|
-
],
|
|
12108
|
-
"isESM": true,
|
|
12109
|
-
"relativePath": [
|
|
12110
|
-
"lib",
|
|
12111
|
-
"commands",
|
|
12112
|
-
"hardis",
|
|
12113
|
-
"project",
|
|
12114
|
-
"convert",
|
|
12115
|
-
"profilestopermsets.js"
|
|
12114
|
+
"clean",
|
|
12115
|
+
"xml.js"
|
|
12116
12116
|
],
|
|
12117
12117
|
"aliasPermutations": [],
|
|
12118
12118
|
"permutations": [
|
|
12119
|
-
"hardis:project:
|
|
12120
|
-
"project:hardis:
|
|
12121
|
-
"project:
|
|
12122
|
-
"project:
|
|
12123
|
-
"hardis:
|
|
12124
|
-
"
|
|
12125
|
-
"
|
|
12126
|
-
"
|
|
12127
|
-
"hardis:
|
|
12128
|
-
"
|
|
12129
|
-
"
|
|
12130
|
-
"
|
|
12131
|
-
"hardis:project:
|
|
12132
|
-
"project:hardis:
|
|
12133
|
-
"project:
|
|
12134
|
-
"project:
|
|
12135
|
-
"hardis:
|
|
12136
|
-
"
|
|
12137
|
-
"
|
|
12138
|
-
"
|
|
12139
|
-
"hardis:
|
|
12140
|
-
"
|
|
12141
|
-
"
|
|
12142
|
-
"
|
|
12119
|
+
"hardis:project:clean:xml",
|
|
12120
|
+
"project:hardis:clean:xml",
|
|
12121
|
+
"project:clean:hardis:xml",
|
|
12122
|
+
"project:clean:xml:hardis",
|
|
12123
|
+
"hardis:clean:project:xml",
|
|
12124
|
+
"clean:hardis:project:xml",
|
|
12125
|
+
"clean:project:hardis:xml",
|
|
12126
|
+
"clean:project:xml:hardis",
|
|
12127
|
+
"hardis:clean:xml:project",
|
|
12128
|
+
"clean:hardis:xml:project",
|
|
12129
|
+
"clean:xml:hardis:project",
|
|
12130
|
+
"clean:xml:project:hardis",
|
|
12131
|
+
"hardis:project:xml:clean",
|
|
12132
|
+
"project:hardis:xml:clean",
|
|
12133
|
+
"project:xml:hardis:clean",
|
|
12134
|
+
"project:xml:clean:hardis",
|
|
12135
|
+
"hardis:xml:project:clean",
|
|
12136
|
+
"xml:hardis:project:clean",
|
|
12137
|
+
"xml:project:hardis:clean",
|
|
12138
|
+
"xml:project:clean:hardis",
|
|
12139
|
+
"hardis:xml:clean:project",
|
|
12140
|
+
"xml:hardis:clean:project",
|
|
12141
|
+
"xml:clean:hardis:project",
|
|
12142
|
+
"xml:clean:project:hardis"
|
|
12143
12143
|
]
|
|
12144
12144
|
},
|
|
12145
12145
|
"hardis:project:deploy:notify": {
|
|
@@ -12542,7 +12542,7 @@
|
|
|
12542
12542
|
"hardis:project:deploy:sources:dx"
|
|
12543
12543
|
],
|
|
12544
12544
|
"args": {},
|
|
12545
|
-
"description": "Smart deploy of SFDX sources to target org, with many useful options.\n\nIn case of errors, [tips to fix them](https://sfdx-hardis.cloudity.com/deployTips/) will be included within the error messages.\n\n### Quick Deploy\n\nIn case Pull Request comments are configured on the project, Quick Deploy will try to be used (equivalent to button Quick Deploy)\n\nIf you do not want to use QuickDeploy, define variable `SFDX_HARDIS_QUICK_DEPLOY=false`\n\n- [GitHub Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-github/)\n- [Gitlab Merge requests notes config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/)\n- [Azure Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-azure/)\n\n### Delta deployments\n\nTo activate delta deployments, define property `useDeltaDeployment: true` in `config/.sfdx-hardis.yml`.\n\nThis will activate delta deployments only between minor and major branches (major to major remains full deployment mode)\n\nIf you want to force the delta deployment into major orgs (ex: preprod to prod), this is not recommended but you can use env variable ALWAYS_ENABLE_DELTA_DEPLOYMENT=true\n\n### Smart Deployments Tests\n\nNot all metadata updates can break test classes, use Smart Deployment Tests to skip running test classes if ALL the following conditions are met:\n\n- Delta deployment is activated and applicable to the source and target branches\n- Delta deployed metadatas are all matching the list of **NOT_IMPACTING_METADATA_TYPES** (see below)\n- Target org is not a production org\n\nActivate Smart Deployment tests with:\n\n- env variable `USE_SMART_DEPLOYMENT_TESTS=true`\n- .sfdx-hardis.yml config property `useSmartDeploymentTests: true`\n\nDefaut list for **NOT_IMPACTING_METADATA_TYPES** (can be overridden with comma-separated list on env var NOT_IMPACTING_METADATA_TYPES)\n\n- Audience\n- AuraDefinitionBundle\n- Bot\n- BotVersion\n- ContentAsset\n- CustomObjectTranslation\n- CustomSite\n- CustomTab\n- Dashboard\n- ExperienceBundle\n- Flexipage\n- GlobalValueSetTranslation\n- Layout\n- LightningComponentBundle\n- NavigationMenu\n- ReportType\n- Report\n- SiteDotCom\n- StandardValueSetTranslation\n- StaticResource\n- Translations\n\nNote: if you want to disable Smart test classes for a PR, add **nosmart** in the text of the latest commit.\n\n### Dynamic deployment items / Overwrite management\n\nIf necessary,you can define the following files (that supports wildcards <members>*</members>):\n\n- `manifest/package-no-overwrite.xml`: Every element defined in this file will be deployed only if it is not existing yet in the target org (can be useful with ListView for example, if the client wants to update them directly in production org).\n - Can be overridden for a branch using .sfdx-hardis.yml property **packageNoOverwritePath** or environment variable PACKAGE_NO_OVERWRITE_PATH (for example, define: `packageNoOverwritePath: manifest/package-no-overwrite-main.xml` in config file `config/.sfdx-hardis.main.yml`)\n- `manifest/packageXmlOnChange.xml`: Every element defined in this file will not be deployed if it already has a similar definition in target org (can be useful for SharingRules for example)\n\nSee [Overwrite management documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-config-overwrite/)\n\n### Packages installation\n\nYou can define a list of package to install during deployments using property `installedPackages`\n\n- If `INSTALL_PACKAGES_DURING_CHECK_DEPLOY` is defined as `true` (or `installPackagesDuringCheckDeploy: true` in `.sfdx-hardis.yml`), packages will be installed even if the command is called with `--check` mode\n- You can automatically update this property by listing all packages installed on an org using command `sf hardis:org:retrieve:packageconfig`\n\nExample:\n\n```yaml\ninstalledPackages:\n - Id: 0A35r0000009EtECAU\n SubscriberPackageId: 033i0000000LVMYAA4\n SubscriberPackageName: Marketing Cloud\n SubscriberPackageNamespace: et4ae5\n SubscriberPackageVersionId: 04t6S000000l11iQAA\n SubscriberPackageVersionName: Marketing Cloud\n SubscriberPackageVersionNumber: 236.0.0.2\n installOnScratchOrgs: true // true or false depending you want to install this package when creating a new scratch org\n installDuringDeployments: true // set as true to install package during a deployment using sf hardis:project:deploy:smart\n installationkey: xxxxxxxxxxxxxxxxxxxx // if the package has a password, write it in this property\n - Id: 0A35r0000009F9CCAU\n SubscriberPackageId: 033b0000000Pf2AAAS\n SubscriberPackageName: Declarative Lookup Rollup Summaries Tool\n SubscriberPackageNamespace: dlrs\n SubscriberPackageVersionId: 04t5p000001BmLvAAK\n SubscriberPackageVersionName: Release\n SubscriberPackageVersionNumber: 2.15.0.9\n installOnScratchOrgs: true\n installDuringDeployments: true\n```\n\n### Deployment pre or post commands\n\nYou can define command lines to run before or after a deployment, with parameters:\n\n- **id**: Unique Id for the command\n- **label**: Human readable label for the command\n- **skipIfError**: If defined to \"true\", the post-command won't be run if there is a deployment failure\n- **context**: Defines the context where the command will be run. Can be **all** (default), **check-deployment-only** or **process-deployment-only**\n- **runOnlyOnceByOrg**: If set to true, the command will be run only one time per org. A record of SfdxHardisTrace__c is stored to make that possible (it needs to be existing in target org)\n\nIf the commands are not the same depending on the target org, you can define them into **config/branches/.sfdx-hardis-BRANCHNAME.yml** instead of root **config/.sfdx-hardis.yml**\n\nExample:\n\n```yaml\ncommandsPreDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to the deployment user\n command: sf data update record --sobject User --where \"Username='deploy.github@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n\ncommandsPostDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to desired username\n command: sf data update record --sobject User --where \"Username='admin-yser@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n - id: someActionToRunJustOneTime\n label: And to run only if deployment is success\n command: sf sfdmu:run ...\n skipIfError: true\n context: process-deployment-only\n runOnlyOnceByOrg: true\n```\n\n### Pull Requests Custom Behaviors\n\nIf some words are found **in the Pull Request description**, special behaviors will be applied\n\n| Word | Behavior |\n| :--- | :--- |\n| NO_DELTA | Even if delta deployments are activated, a deployment in mode **full** will be performed for this Pull Request |\n| PURGE_FLOW_VERSIONS | After deployment, inactive and obsolete Flow Versions will be deleted (equivalent to command sf hardis:org:purge:flow)<br/>**Caution: This will also purge active Flow Interviews !** |\n| DESTRUCTIVE_CHANGES_AFTER_DEPLOYMENT | If a file manifest/destructiveChanges.xml is found, it will be executed in a separate step, after the deployment of the main package |\n\n> For example, define `PURGE_FLOW_VERSIONS` and `DESTRUCTIVE_CHANGES_AFTER_DEPLOYMENT` in your Pull Request comments if you want to delete fields that are used in an active flow.\n\nNote: it is also possible to define these behaviors as ENV variables:\n\n- For all deployments (example: `PURGE_FLOW_VERSIONS=true`)\n- For a specific branch, by appending the target branch name (example: `PURGE_FLOW_VERSIONS_UAT=true`)\n\n### Deployment plan (deprecated)\n\nIf you need to deploy in multiple steps, you can define a property `deploymentPlan` in `.sfdx-hardis.yml`.\n\n- If a file `manifest/package.xml` is found, it will be placed with order 0 in the deployment plan\n\n- If a file `manifest/destructiveChanges.xml` is found, it will be executed as --postdestructivechanges\n\n- If env var `SFDX_HARDIS_DEPLOY_IGNORE_SPLIT_PACKAGES` is defined as `false` , split of package.xml will be applied\n\nExample:\n\n```yaml\ndeploymentPlan:\n packages:\n - label: Deploy Flow-Workflow\n packageXmlFile: manifest/splits/packageXmlFlowWorkflow.xml\n order: 6\n - label: Deploy SharingRules - Case\n packageXmlFile: manifest/splits/packageXmlSharingRulesCase.xml\n order: 30\n waitAfter: 30\n```\n\n### Automated fixes post deployments\n\n#### List view with scope Mine\n\nIf you defined a property **listViewsToSetToMine** in your .sfdx-hardis.yml, related ListViews will be set to Mine ( see command <https://sfdx-hardis.cloudity.com/hardis/org/fix/listviewmine/> )\n\nExample:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to fix ListViews with mine from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n\nIf you need to increase the deployment waiting time (sf project deploy start --wait arg), you can define env variable SFDX_DEPLOY_WAIT_MINUTES (default: 120)\n\nIf you need notifications to be sent using the current Pull Request and not the one just merged ([see use case](https://github.com/hardisgroupcom/sfdx-hardis/issues/637#issuecomment-2230798904)), define env variable SFDX_HARDIS_DEPLOY_BEFORE_MERGE=true\n\nIf you want to disable the calculation and display of Flow Visual Git Diff in Pull Request comments, define variable **SFDX_DISABLE_FLOW_DIFF=true**\n",
|
|
12545
|
+
"description": "Smart deploy of SFDX sources to target org, with many useful options.\n\nIn case of errors, [tips to fix them](https://sfdx-hardis.cloudity.com/deployTips/) will be included within the error messages.\n\n### Quick Deploy\n\nIn case Pull Request comments are configured on the project, Quick Deploy will try to be used (equivalent to button Quick Deploy)\n\nIf you do not want to use QuickDeploy, define variable `SFDX_HARDIS_QUICK_DEPLOY=false`\n\n- [GitHub Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-github/)\n- [Gitlab Merge requests notes config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/)\n- [Azure Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-azure/)\n\n### Delta deployments\n\nTo activate delta deployments, define property `useDeltaDeployment: true` in `config/.sfdx-hardis.yml`.\n\nThis will activate delta deployments only between minor and major branches (major to major remains full deployment mode)\n\nIf you want to force the delta deployment into major orgs (ex: preprod to prod), this is not recommended but you can use env variable ALWAYS_ENABLE_DELTA_DEPLOYMENT=true\n\n### Smart Deployments Tests\n\nNot all metadata updates can break test classes, use Smart Deployment Tests to skip running test classes if ALL the following conditions are met:\n\n- Delta deployment is activated and applicable to the source and target branches\n- Delta deployed metadatas are all matching the list of **NOT_IMPACTING_METADATA_TYPES** (see below)\n- Target org is not a production org\n\nActivate Smart Deployment tests with:\n\n- env variable `USE_SMART_DEPLOYMENT_TESTS=true`\n- .sfdx-hardis.yml config property `useSmartDeploymentTests: true`\n\nDefaut list for **NOT_IMPACTING_METADATA_TYPES** (can be overridden with comma-separated list on env var NOT_IMPACTING_METADATA_TYPES)\n\n- Audience\n- AuraDefinitionBundle\n- Bot\n- BotVersion\n- ContentAsset\n- CustomObjectTranslation\n- CustomSite\n- CustomTab\n- Dashboard\n- ExperienceBundle\n- Flexipage\n- GlobalValueSetTranslation\n- Layout\n- LightningComponentBundle\n- NavigationMenu\n- ReportType\n- Report\n- SiteDotCom\n- StandardValueSetTranslation\n- StaticResource\n- Translations\n\nNote: if you want to disable Smart test classes for a PR, add **nosmart** in the text of the latest commit.\n\n### Custom Apex Test Classes (optional)\n\nYou can force Smart Deploy to run a specific list of Apex Test Classes. This is **not recommended** because best practice is to run all local tests. Enable it only if you have a specific need.\n\n- `enableDeploymentApexTestClasses` (boolean, default: false): Activate the custom list.\n- `deploymentApexTestClasses` (array of strings): The Apex Test Classes to run. Used only when the flag above is true.\n\nExample configuration in `config/.sfdx-hardis.yml` (can also be scoped to branches in `config/branches/.sfdx-hardis-BRANCHNAME.yml` or in Pull Request description):\n\n```yaml\nenableDeploymentApexTestClasses: true\ndeploymentApexTestClasses:\n - MyTestClass1\n - MyTestClass2\n```\n\n### Dynamic deployment items / Overwrite management\n\nIf necessary,you can define the following files (that supports wildcards <members>*</members>):\n\n- `manifest/package-no-overwrite.xml`: Every element defined in this file will be deployed only if it is not existing yet in the target org (can be useful with ListView for example, if the client wants to update them directly in production org).\n - Can be overridden for a branch using .sfdx-hardis.yml property **packageNoOverwritePath** or environment variable PACKAGE_NO_OVERWRITE_PATH (for example, define: `packageNoOverwritePath: manifest/package-no-overwrite-main.xml` in config file `config/.sfdx-hardis.main.yml`)\n- `manifest/packageXmlOnChange.xml`: Every element defined in this file will not be deployed if it already has a similar definition in target org (can be useful for SharingRules for example)\n\nSee [Overwrite management documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-config-overwrite/)\n\n### Packages installation\n\nYou can define a list of package to install during deployments using property `installedPackages`\n\n- If `INSTALL_PACKAGES_DURING_CHECK_DEPLOY` is defined as `true` (or `installPackagesDuringCheckDeploy: true` in `.sfdx-hardis.yml`), packages will be installed even if the command is called with `--check` mode\n- You can automatically update this property by listing all packages installed on an org using command `sf hardis:org:retrieve:packageconfig`\n\nExample:\n\n```yaml\ninstalledPackages:\n - Id: 0A35r0000009EtECAU\n SubscriberPackageId: 033i0000000LVMYAA4\n SubscriberPackageName: Marketing Cloud\n SubscriberPackageNamespace: et4ae5\n SubscriberPackageVersionId: 04t6S000000l11iQAA\n SubscriberPackageVersionName: Marketing Cloud\n SubscriberPackageVersionNumber: 236.0.0.2\n installOnScratchOrgs: true // true or false depending you want to install this package when creating a new scratch org\n installDuringDeployments: true // set as true to install package during a deployment using sf hardis:project:deploy:smart\n installationkey: xxxxxxxxxxxxxxxxxxxx // if the package has a password, write it in this property\n - Id: 0A35r0000009F9CCAU\n SubscriberPackageId: 033b0000000Pf2AAAS\n SubscriberPackageName: Declarative Lookup Rollup Summaries Tool\n SubscriberPackageNamespace: dlrs\n SubscriberPackageVersionId: 04t5p000001BmLvAAK\n SubscriberPackageVersionName: Release\n SubscriberPackageVersionNumber: 2.15.0.9\n installOnScratchOrgs: true\n installDuringDeployments: true\n```\n\n### Deployment pre or post commands\n\nYou can define command lines to run before or after a deployment, with parameters:\n\n- **id**: Unique Id for the command\n- **label**: Human readable label for the command\n- **skipIfError**: If defined to \"true\", the post-command won't be run if there is a deployment failure\n- **context**: Defines the context where the command will be run. Can be **all** (default), **check-deployment-only** or **process-deployment-only**\n- **runOnlyOnceByOrg**: If set to true, the command will be run only one time per org. A record of SfdxHardisTrace__c is stored to make that possible (it needs to be existing in target org)\n\nIf the commands are not the same depending on the target org, you can define them into **config/branches/.sfdx-hardis-BRANCHNAME.yml** instead of root **config/.sfdx-hardis.yml**\n\nExample:\n\n```yaml\ncommandsPreDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to the deployment user\n command: sf data update record --sobject User --where \"Username='deploy.github@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n\ncommandsPostDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to desired username\n command: sf data update record --sobject User --where \"Username='admin-yser@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n - id: someActionToRunJustOneTime\n label: And to run only if deployment is success\n command: sf sfdmu:run ...\n skipIfError: true\n context: process-deployment-only\n runOnlyOnceByOrg: true\n```\n\n### Pull Requests Custom Behaviors\n\nIf some words are found **in the Pull Request description**, special behaviors will be applied\n\n| Word | Behavior |\n| :--- | :--- |\n| NO_DELTA | Even if delta deployments are activated, a deployment in mode **full** will be performed for this Pull Request |\n| PURGE_FLOW_VERSIONS | After deployment, inactive and obsolete Flow Versions will be deleted (equivalent to command sf hardis:org:purge:flow)<br/>**Caution: This will also purge active Flow Interviews !** |\n| DESTRUCTIVE_CHANGES_AFTER_DEPLOYMENT | If a file manifest/destructiveChanges.xml is found, it will be executed in a separate step, after the deployment of the main package |\n\nYou can also override some `.sfdx-hardis.yml` properties directly in the Pull Request description using YAML blocks. Supported keys: `deploymentApexTestClasses`, `commandsPreDeploy`, `commandsPostDeploy`.\n\nExample (in PR description):\n\n```yaml\ndeploymentApexTestClasses:\n - MyTestClass1\n - MyTestClass2\n```\n\n> For example, define `PURGE_FLOW_VERSIONS` and `DESTRUCTIVE_CHANGES_AFTER_DEPLOYMENT` in your Pull Request comments if you want to delete fields that are used in an active flow.\n\nNote: it is also possible to define these behaviors as ENV variables:\n\n- For all deployments (example: `PURGE_FLOW_VERSIONS=true`)\n- For a specific branch, by appending the target branch name (example: `PURGE_FLOW_VERSIONS_UAT=true`)\n\n### Deployment plan (deprecated)\n\n> **This feature is deactivated by default (enable with `enableDeprecatedDeploymentPlan` in project configuration). Use preCommands and postCommands instead.** \n\nIf you need to deploy in multiple steps, you can define a property `deploymentPlan` in `.sfdx-hardis.yml`.\n\n- If a file `manifest/package.xml` is found, it will be placed with order 0 in the deployment plan\n\n- If a file `manifest/destructiveChanges.xml` is found, it will be executed as --postdestructivechanges\n\n- If env var `SFDX_HARDIS_DEPLOY_IGNORE_SPLIT_PACKAGES` is defined as `false` , split of package.xml will be applied\n\nExample:\n\n```yaml\ndeploymentPlan:\n packages:\n - label: Deploy Flow-Workflow\n packageXmlFile: manifest/splits/packageXmlFlowWorkflow.xml\n order: 6\n - label: Deploy SharingRules - Case\n packageXmlFile: manifest/splits/packageXmlSharingRulesCase.xml\n order: 30\n waitAfter: 30\n```\n\n### Automated fixes post deployments\n\n#### List view with scope Mine\n\nIf you defined a property **listViewsToSetToMine** in your .sfdx-hardis.yml, related ListViews will be set to Mine ( see command <https://sfdx-hardis.cloudity.com/hardis/org/fix/listviewmine/> )\n\nExample:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to fix ListViews with mine from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n\nIf you need to increase the deployment waiting time (sf project deploy start --wait arg), you can define env variable SFDX_DEPLOY_WAIT_MINUTES (default: 120)\n\nIf you need notifications to be sent using the current Pull Request and not the one just merged ([see use case](https://github.com/hardisgroupcom/sfdx-hardis/issues/637#issuecomment-2230798904)), define env variable SFDX_HARDIS_DEPLOY_BEFORE_MERGE=true\n\nIf you want to disable the calculation and display of Flow Visual Git Diff in Pull Request comments, define variable **SFDX_DISABLE_FLOW_DIFF=true**\n",
|
|
12546
12546
|
"examples": [
|
|
12547
12547
|
"$ sf hardis:project:deploy:smart",
|
|
12548
12548
|
"$ sf hardis:project:deploy:smart --check",
|
|
@@ -13895,35 +13895,239 @@
|
|
|
13895
13895
|
"commands",
|
|
13896
13896
|
"hardis",
|
|
13897
13897
|
"project",
|
|
13898
|
-
"generate",
|
|
13899
|
-
"gitdelta.js"
|
|
13898
|
+
"generate",
|
|
13899
|
+
"gitdelta.js"
|
|
13900
|
+
],
|
|
13901
|
+
"aliasPermutations": [],
|
|
13902
|
+
"permutations": [
|
|
13903
|
+
"hardis:project:generate:gitdelta",
|
|
13904
|
+
"project:hardis:generate:gitdelta",
|
|
13905
|
+
"project:generate:hardis:gitdelta",
|
|
13906
|
+
"project:generate:gitdelta:hardis",
|
|
13907
|
+
"hardis:generate:project:gitdelta",
|
|
13908
|
+
"generate:hardis:project:gitdelta",
|
|
13909
|
+
"generate:project:hardis:gitdelta",
|
|
13910
|
+
"generate:project:gitdelta:hardis",
|
|
13911
|
+
"hardis:generate:gitdelta:project",
|
|
13912
|
+
"generate:hardis:gitdelta:project",
|
|
13913
|
+
"generate:gitdelta:hardis:project",
|
|
13914
|
+
"generate:gitdelta:project:hardis",
|
|
13915
|
+
"hardis:project:gitdelta:generate",
|
|
13916
|
+
"project:hardis:gitdelta:generate",
|
|
13917
|
+
"project:gitdelta:hardis:generate",
|
|
13918
|
+
"project:gitdelta:generate:hardis",
|
|
13919
|
+
"hardis:gitdelta:project:generate",
|
|
13920
|
+
"gitdelta:hardis:project:generate",
|
|
13921
|
+
"gitdelta:project:hardis:generate",
|
|
13922
|
+
"gitdelta:project:generate:hardis",
|
|
13923
|
+
"hardis:gitdelta:generate:project",
|
|
13924
|
+
"gitdelta:hardis:generate:project",
|
|
13925
|
+
"gitdelta:generate:hardis:project",
|
|
13926
|
+
"gitdelta:generate:project:hardis"
|
|
13927
|
+
]
|
|
13928
|
+
},
|
|
13929
|
+
"hardis:project:metadata:activate-decomposed": {
|
|
13930
|
+
"aliases": [],
|
|
13931
|
+
"args": {},
|
|
13932
|
+
"description": "\n## Command Behavior\n\n**Activate decomposed metadata types in Salesforce DX projects.**\n\nThis command helps manage decomposed metadata types that can be split into multiple files in source format. It automatically decomposes all supported metadata types that exist in your project.\n\nSupported metadata types (Beta):\n\n- CustomLabels\n- PermissionSet\n- ExternalServiceRegistration\n- SharingRules\n- Workflow\n\nSee [Salesforce documentation on decomposed metadata](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_decomposed_md_types.htm)\n\nKey features:\n\n- Automatically detects and decomposes all applicable metadata types\n- Decomposes only metadata types that exist in your project\n- Interactive confirmation for decomposition operations\n- Handles all confirmation prompts automatically\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThis command utilizes Salesforce CLI's decomposed metadata feature to split complex metadata types into smaller, more manageable components:\n\n- **CustomLabels**: Each custom label becomes a separate file, making it easier to track changes and manage translations.\n- **PermissionSets**: Permission sets are decomposed into multiple files based on the permissions they contain (field permissions, object permissions, etc.).\n- **ExternalServiceRegistration**: Decomposes external service registrations.\n- **SharingRules**: Decomposes sharing rules into individual components.\n- **Workflow**: Decomposes workflow rules into individual components.\n\nThe command wraps the underlying Salesforce CLI functionality and provides a more user-friendly interface with additional validation and error handling.\n\nNote: All decomposed metadata features are currently in Beta in Salesforce CLI.\n</details>\n",
|
|
13933
|
+
"examples": [
|
|
13934
|
+
"$ sf hardis:project:metadata:activate-decomposed",
|
|
13935
|
+
"$ sf hardis:project:metadata:activate-decomposed --debug"
|
|
13936
|
+
],
|
|
13937
|
+
"flags": {
|
|
13938
|
+
"json": {
|
|
13939
|
+
"description": "Format output as json.",
|
|
13940
|
+
"helpGroup": "GLOBAL",
|
|
13941
|
+
"name": "json",
|
|
13942
|
+
"allowNo": false,
|
|
13943
|
+
"type": "boolean"
|
|
13944
|
+
},
|
|
13945
|
+
"flags-dir": {
|
|
13946
|
+
"helpGroup": "GLOBAL",
|
|
13947
|
+
"name": "flags-dir",
|
|
13948
|
+
"summary": "Import flag values from a directory.",
|
|
13949
|
+
"hasDynamicHelp": false,
|
|
13950
|
+
"multiple": false,
|
|
13951
|
+
"type": "option"
|
|
13952
|
+
},
|
|
13953
|
+
"debug": {
|
|
13954
|
+
"char": "d",
|
|
13955
|
+
"description": "Run command in debug mode",
|
|
13956
|
+
"name": "debug",
|
|
13957
|
+
"allowNo": false,
|
|
13958
|
+
"type": "boolean"
|
|
13959
|
+
},
|
|
13960
|
+
"websocket": {
|
|
13961
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
13962
|
+
"name": "websocket",
|
|
13963
|
+
"hasDynamicHelp": false,
|
|
13964
|
+
"multiple": false,
|
|
13965
|
+
"type": "option"
|
|
13966
|
+
},
|
|
13967
|
+
"skipauth": {
|
|
13968
|
+
"description": "Skip authentication check when a default username is required",
|
|
13969
|
+
"name": "skipauth",
|
|
13970
|
+
"allowNo": false,
|
|
13971
|
+
"type": "boolean"
|
|
13972
|
+
}
|
|
13973
|
+
},
|
|
13974
|
+
"hasDynamicHelp": false,
|
|
13975
|
+
"hiddenAliases": [],
|
|
13976
|
+
"id": "hardis:project:metadata:activate-decomposed",
|
|
13977
|
+
"pluginAlias": "sfdx-hardis",
|
|
13978
|
+
"pluginName": "sfdx-hardis",
|
|
13979
|
+
"pluginType": "core",
|
|
13980
|
+
"strict": true,
|
|
13981
|
+
"enableJsonFlag": true,
|
|
13982
|
+
"title": "Activate Decomposed Metadata (Beta)",
|
|
13983
|
+
"isESM": true,
|
|
13984
|
+
"relativePath": [
|
|
13985
|
+
"lib",
|
|
13986
|
+
"commands",
|
|
13987
|
+
"hardis",
|
|
13988
|
+
"project",
|
|
13989
|
+
"metadata",
|
|
13990
|
+
"activate-decomposed.js"
|
|
13991
|
+
],
|
|
13992
|
+
"aliasPermutations": [],
|
|
13993
|
+
"permutations": [
|
|
13994
|
+
"hardis:project:metadata:activate-decomposed",
|
|
13995
|
+
"project:hardis:metadata:activate-decomposed",
|
|
13996
|
+
"project:metadata:hardis:activate-decomposed",
|
|
13997
|
+
"project:metadata:activate-decomposed:hardis",
|
|
13998
|
+
"hardis:metadata:project:activate-decomposed",
|
|
13999
|
+
"metadata:hardis:project:activate-decomposed",
|
|
14000
|
+
"metadata:project:hardis:activate-decomposed",
|
|
14001
|
+
"metadata:project:activate-decomposed:hardis",
|
|
14002
|
+
"hardis:metadata:activate-decomposed:project",
|
|
14003
|
+
"metadata:hardis:activate-decomposed:project",
|
|
14004
|
+
"metadata:activate-decomposed:hardis:project",
|
|
14005
|
+
"metadata:activate-decomposed:project:hardis",
|
|
14006
|
+
"hardis:project:activate-decomposed:metadata",
|
|
14007
|
+
"project:hardis:activate-decomposed:metadata",
|
|
14008
|
+
"project:activate-decomposed:hardis:metadata",
|
|
14009
|
+
"project:activate-decomposed:metadata:hardis",
|
|
14010
|
+
"hardis:activate-decomposed:project:metadata",
|
|
14011
|
+
"activate-decomposed:hardis:project:metadata",
|
|
14012
|
+
"activate-decomposed:project:hardis:metadata",
|
|
14013
|
+
"activate-decomposed:project:metadata:hardis",
|
|
14014
|
+
"hardis:activate-decomposed:metadata:project",
|
|
14015
|
+
"activate-decomposed:hardis:metadata:project",
|
|
14016
|
+
"activate-decomposed:metadata:hardis:project",
|
|
14017
|
+
"activate-decomposed:metadata:project:hardis"
|
|
14018
|
+
]
|
|
14019
|
+
},
|
|
14020
|
+
"hardis:project:metadata:findduplicates": {
|
|
14021
|
+
"aliases": [],
|
|
14022
|
+
"args": {},
|
|
14023
|
+
"description": "find duplicate values in XML file(s).\n Find duplicate values in XML file(s). Keys to be checked can be configured in `config/sfdx-hardis.yml` using property metadataDuplicateFindKeys.\n\nDefault config :\nmetadataDuplicateFindKeys :\n[object Object]\n",
|
|
14024
|
+
"examples": [
|
|
14025
|
+
"\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Layout xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <layoutSections>\n ...\n <layoutColumns>\n <layoutItems>\n <behavior>Required</behavior>\n <field>Name</field>\n </layoutItems>\n <layoutItems>\n <behavior>Required</behavior>\n <field>Name</field>\n </layoutItems>\n </layoutColumns>\n </layoutSections>\n</Layout>\n",
|
|
14026
|
+
"\n$ sf hardis:project:metadata:findduplicates --file layout.layout-meta.xml\n[sfdx-hardis] Duplicate values in layout.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : Name\n",
|
|
14027
|
+
"\n$ sf hardis:project.metadata:findduplicates -f \"force-app/main/default/**/*.xml\"\n[sfdx-hardis] hardis:project:metadata:findduplicates execution time 0:00:00.397\n[sfdx-hardis] Duplicate values in layout1.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : CreatedById\n\n[sfdx-hardis] Duplicate values in layout2.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : LastModifiedById, Name\n"
|
|
14028
|
+
],
|
|
14029
|
+
"flags": {
|
|
14030
|
+
"json": {
|
|
14031
|
+
"description": "Format output as json.",
|
|
14032
|
+
"helpGroup": "GLOBAL",
|
|
14033
|
+
"name": "json",
|
|
14034
|
+
"allowNo": false,
|
|
14035
|
+
"type": "boolean"
|
|
14036
|
+
},
|
|
14037
|
+
"flags-dir": {
|
|
14038
|
+
"helpGroup": "GLOBAL",
|
|
14039
|
+
"name": "flags-dir",
|
|
14040
|
+
"summary": "Import flag values from a directory.",
|
|
14041
|
+
"hasDynamicHelp": false,
|
|
14042
|
+
"multiple": false,
|
|
14043
|
+
"type": "option"
|
|
14044
|
+
},
|
|
14045
|
+
"files": {
|
|
14046
|
+
"char": "f",
|
|
14047
|
+
"description": "XML metadata files path",
|
|
14048
|
+
"name": "files",
|
|
14049
|
+
"hasDynamicHelp": false,
|
|
14050
|
+
"multiple": true,
|
|
14051
|
+
"type": "option"
|
|
14052
|
+
},
|
|
14053
|
+
"websocket": {
|
|
14054
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
14055
|
+
"name": "websocket",
|
|
14056
|
+
"hasDynamicHelp": false,
|
|
14057
|
+
"multiple": false,
|
|
14058
|
+
"type": "option"
|
|
14059
|
+
},
|
|
14060
|
+
"skipauth": {
|
|
14061
|
+
"description": "Skip authentication check when a default username is required",
|
|
14062
|
+
"name": "skipauth",
|
|
14063
|
+
"allowNo": false,
|
|
14064
|
+
"type": "boolean"
|
|
14065
|
+
}
|
|
14066
|
+
},
|
|
14067
|
+
"hasDynamicHelp": false,
|
|
14068
|
+
"hiddenAliases": [],
|
|
14069
|
+
"id": "hardis:project:metadata:findduplicates",
|
|
14070
|
+
"pluginAlias": "sfdx-hardis",
|
|
14071
|
+
"pluginName": "sfdx-hardis",
|
|
14072
|
+
"pluginType": "core",
|
|
14073
|
+
"strict": true,
|
|
14074
|
+
"enableJsonFlag": true,
|
|
14075
|
+
"metadataDuplicateFindKeys": {
|
|
14076
|
+
"layout": [
|
|
14077
|
+
"Layout.layoutSections.layoutColumns.layoutItems.field",
|
|
14078
|
+
"Layout.quickActionListItems.quickActionName"
|
|
14079
|
+
],
|
|
14080
|
+
"profile": [
|
|
14081
|
+
"Profile.fieldPermissions.field",
|
|
14082
|
+
"Profile.objectPermissions.object",
|
|
14083
|
+
"Profile.classAccesses.apexClass"
|
|
14084
|
+
],
|
|
14085
|
+
"labels": [
|
|
14086
|
+
"CustomLabels.labels.fullName"
|
|
14087
|
+
],
|
|
14088
|
+
"permissionset": [
|
|
14089
|
+
"PermissionSet.fieldPermissions.field",
|
|
14090
|
+
"PermissionSet.objectPermissions.object",
|
|
14091
|
+
"PermissionSet.classAccesses.apexClass"
|
|
14092
|
+
]
|
|
14093
|
+
},
|
|
14094
|
+
"title": "XML duplicate values finder",
|
|
14095
|
+
"requiresProject": true,
|
|
14096
|
+
"isESM": true,
|
|
14097
|
+
"relativePath": [
|
|
14098
|
+
"lib",
|
|
14099
|
+
"commands",
|
|
14100
|
+
"hardis",
|
|
14101
|
+
"project",
|
|
14102
|
+
"metadata",
|
|
14103
|
+
"findduplicates.js"
|
|
13900
14104
|
],
|
|
13901
14105
|
"aliasPermutations": [],
|
|
13902
14106
|
"permutations": [
|
|
13903
|
-
"hardis:project:
|
|
13904
|
-
"project:hardis:
|
|
13905
|
-
"project:
|
|
13906
|
-
"project:
|
|
13907
|
-
"hardis:
|
|
13908
|
-
"
|
|
13909
|
-
"
|
|
13910
|
-
"
|
|
13911
|
-
"hardis:
|
|
13912
|
-
"
|
|
13913
|
-
"
|
|
13914
|
-
"
|
|
13915
|
-
"hardis:project:
|
|
13916
|
-
"project:hardis:
|
|
13917
|
-
"project:
|
|
13918
|
-
"project:
|
|
13919
|
-
"hardis:
|
|
13920
|
-
"
|
|
13921
|
-
"
|
|
13922
|
-
"
|
|
13923
|
-
"hardis:
|
|
13924
|
-
"
|
|
13925
|
-
"
|
|
13926
|
-
"
|
|
14107
|
+
"hardis:project:metadata:findduplicates",
|
|
14108
|
+
"project:hardis:metadata:findduplicates",
|
|
14109
|
+
"project:metadata:hardis:findduplicates",
|
|
14110
|
+
"project:metadata:findduplicates:hardis",
|
|
14111
|
+
"hardis:metadata:project:findduplicates",
|
|
14112
|
+
"metadata:hardis:project:findduplicates",
|
|
14113
|
+
"metadata:project:hardis:findduplicates",
|
|
14114
|
+
"metadata:project:findduplicates:hardis",
|
|
14115
|
+
"hardis:metadata:findduplicates:project",
|
|
14116
|
+
"metadata:hardis:findduplicates:project",
|
|
14117
|
+
"metadata:findduplicates:hardis:project",
|
|
14118
|
+
"metadata:findduplicates:project:hardis",
|
|
14119
|
+
"hardis:project:findduplicates:metadata",
|
|
14120
|
+
"project:hardis:findduplicates:metadata",
|
|
14121
|
+
"project:findduplicates:hardis:metadata",
|
|
14122
|
+
"project:findduplicates:metadata:hardis",
|
|
14123
|
+
"hardis:findduplicates:project:metadata",
|
|
14124
|
+
"findduplicates:hardis:project:metadata",
|
|
14125
|
+
"findduplicates:project:hardis:metadata",
|
|
14126
|
+
"findduplicates:project:metadata:hardis",
|
|
14127
|
+
"hardis:findduplicates:metadata:project",
|
|
14128
|
+
"findduplicates:hardis:metadata:project",
|
|
14129
|
+
"findduplicates:metadata:hardis:project",
|
|
14130
|
+
"findduplicates:metadata:project:hardis"
|
|
13927
14131
|
]
|
|
13928
14132
|
},
|
|
13929
14133
|
"hardis:scratch:pool:create": {
|
|
@@ -14451,210 +14655,6 @@
|
|
|
14451
14655
|
"view:pool:scratch:hardis"
|
|
14452
14656
|
]
|
|
14453
14657
|
},
|
|
14454
|
-
"hardis:project:metadata:activate-decomposed": {
|
|
14455
|
-
"aliases": [],
|
|
14456
|
-
"args": {},
|
|
14457
|
-
"description": "\n## Command Behavior\n\n**Activate decomposed metadata types in Salesforce DX projects.**\n\nThis command helps manage decomposed metadata types that can be split into multiple files in source format. It automatically decomposes all supported metadata types that exist in your project.\n\nSupported metadata types (Beta):\n\n- CustomLabels\n- PermissionSet\n- ExternalServiceRegistration\n- SharingRules\n- Workflow\n\nSee [Salesforce documentation on decomposed metadata](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_decomposed_md_types.htm)\n\nKey features:\n\n- Automatically detects and decomposes all applicable metadata types\n- Decomposes only metadata types that exist in your project\n- Interactive confirmation for decomposition operations\n- Handles all confirmation prompts automatically\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThis command utilizes Salesforce CLI's decomposed metadata feature to split complex metadata types into smaller, more manageable components:\n\n- **CustomLabels**: Each custom label becomes a separate file, making it easier to track changes and manage translations.\n- **PermissionSets**: Permission sets are decomposed into multiple files based on the permissions they contain (field permissions, object permissions, etc.).\n- **ExternalServiceRegistration**: Decomposes external service registrations.\n- **SharingRules**: Decomposes sharing rules into individual components.\n- **Workflow**: Decomposes workflow rules into individual components.\n\nThe command wraps the underlying Salesforce CLI functionality and provides a more user-friendly interface with additional validation and error handling.\n\nNote: All decomposed metadata features are currently in Beta in Salesforce CLI.\n</details>\n",
|
|
14458
|
-
"examples": [
|
|
14459
|
-
"$ sf hardis:project:metadata:activate-decomposed",
|
|
14460
|
-
"$ sf hardis:project:metadata:activate-decomposed --debug"
|
|
14461
|
-
],
|
|
14462
|
-
"flags": {
|
|
14463
|
-
"json": {
|
|
14464
|
-
"description": "Format output as json.",
|
|
14465
|
-
"helpGroup": "GLOBAL",
|
|
14466
|
-
"name": "json",
|
|
14467
|
-
"allowNo": false,
|
|
14468
|
-
"type": "boolean"
|
|
14469
|
-
},
|
|
14470
|
-
"flags-dir": {
|
|
14471
|
-
"helpGroup": "GLOBAL",
|
|
14472
|
-
"name": "flags-dir",
|
|
14473
|
-
"summary": "Import flag values from a directory.",
|
|
14474
|
-
"hasDynamicHelp": false,
|
|
14475
|
-
"multiple": false,
|
|
14476
|
-
"type": "option"
|
|
14477
|
-
},
|
|
14478
|
-
"debug": {
|
|
14479
|
-
"char": "d",
|
|
14480
|
-
"description": "Run command in debug mode",
|
|
14481
|
-
"name": "debug",
|
|
14482
|
-
"allowNo": false,
|
|
14483
|
-
"type": "boolean"
|
|
14484
|
-
},
|
|
14485
|
-
"websocket": {
|
|
14486
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
14487
|
-
"name": "websocket",
|
|
14488
|
-
"hasDynamicHelp": false,
|
|
14489
|
-
"multiple": false,
|
|
14490
|
-
"type": "option"
|
|
14491
|
-
},
|
|
14492
|
-
"skipauth": {
|
|
14493
|
-
"description": "Skip authentication check when a default username is required",
|
|
14494
|
-
"name": "skipauth",
|
|
14495
|
-
"allowNo": false,
|
|
14496
|
-
"type": "boolean"
|
|
14497
|
-
}
|
|
14498
|
-
},
|
|
14499
|
-
"hasDynamicHelp": false,
|
|
14500
|
-
"hiddenAliases": [],
|
|
14501
|
-
"id": "hardis:project:metadata:activate-decomposed",
|
|
14502
|
-
"pluginAlias": "sfdx-hardis",
|
|
14503
|
-
"pluginName": "sfdx-hardis",
|
|
14504
|
-
"pluginType": "core",
|
|
14505
|
-
"strict": true,
|
|
14506
|
-
"enableJsonFlag": true,
|
|
14507
|
-
"title": "Activate Decomposed Metadata (Beta)",
|
|
14508
|
-
"isESM": true,
|
|
14509
|
-
"relativePath": [
|
|
14510
|
-
"lib",
|
|
14511
|
-
"commands",
|
|
14512
|
-
"hardis",
|
|
14513
|
-
"project",
|
|
14514
|
-
"metadata",
|
|
14515
|
-
"activate-decomposed.js"
|
|
14516
|
-
],
|
|
14517
|
-
"aliasPermutations": [],
|
|
14518
|
-
"permutations": [
|
|
14519
|
-
"hardis:project:metadata:activate-decomposed",
|
|
14520
|
-
"project:hardis:metadata:activate-decomposed",
|
|
14521
|
-
"project:metadata:hardis:activate-decomposed",
|
|
14522
|
-
"project:metadata:activate-decomposed:hardis",
|
|
14523
|
-
"hardis:metadata:project:activate-decomposed",
|
|
14524
|
-
"metadata:hardis:project:activate-decomposed",
|
|
14525
|
-
"metadata:project:hardis:activate-decomposed",
|
|
14526
|
-
"metadata:project:activate-decomposed:hardis",
|
|
14527
|
-
"hardis:metadata:activate-decomposed:project",
|
|
14528
|
-
"metadata:hardis:activate-decomposed:project",
|
|
14529
|
-
"metadata:activate-decomposed:hardis:project",
|
|
14530
|
-
"metadata:activate-decomposed:project:hardis",
|
|
14531
|
-
"hardis:project:activate-decomposed:metadata",
|
|
14532
|
-
"project:hardis:activate-decomposed:metadata",
|
|
14533
|
-
"project:activate-decomposed:hardis:metadata",
|
|
14534
|
-
"project:activate-decomposed:metadata:hardis",
|
|
14535
|
-
"hardis:activate-decomposed:project:metadata",
|
|
14536
|
-
"activate-decomposed:hardis:project:metadata",
|
|
14537
|
-
"activate-decomposed:project:hardis:metadata",
|
|
14538
|
-
"activate-decomposed:project:metadata:hardis",
|
|
14539
|
-
"hardis:activate-decomposed:metadata:project",
|
|
14540
|
-
"activate-decomposed:hardis:metadata:project",
|
|
14541
|
-
"activate-decomposed:metadata:hardis:project",
|
|
14542
|
-
"activate-decomposed:metadata:project:hardis"
|
|
14543
|
-
]
|
|
14544
|
-
},
|
|
14545
|
-
"hardis:project:metadata:findduplicates": {
|
|
14546
|
-
"aliases": [],
|
|
14547
|
-
"args": {},
|
|
14548
|
-
"description": "find duplicate values in XML file(s).\n Find duplicate values in XML file(s). Keys to be checked can be configured in `config/sfdx-hardis.yml` using property metadataDuplicateFindKeys.\n\nDefault config :\nmetadataDuplicateFindKeys :\n[object Object]\n",
|
|
14549
|
-
"examples": [
|
|
14550
|
-
"\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Layout xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <layoutSections>\n ...\n <layoutColumns>\n <layoutItems>\n <behavior>Required</behavior>\n <field>Name</field>\n </layoutItems>\n <layoutItems>\n <behavior>Required</behavior>\n <field>Name</field>\n </layoutItems>\n </layoutColumns>\n </layoutSections>\n</Layout>\n",
|
|
14551
|
-
"\n$ sf hardis:project:metadata:findduplicates --file layout.layout-meta.xml\n[sfdx-hardis] Duplicate values in layout.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : Name\n",
|
|
14552
|
-
"\n$ sf hardis:project.metadata:findduplicates -f \"force-app/main/default/**/*.xml\"\n[sfdx-hardis] hardis:project:metadata:findduplicates execution time 0:00:00.397\n[sfdx-hardis] Duplicate values in layout1.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : CreatedById\n\n[sfdx-hardis] Duplicate values in layout2.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : LastModifiedById, Name\n"
|
|
14553
|
-
],
|
|
14554
|
-
"flags": {
|
|
14555
|
-
"json": {
|
|
14556
|
-
"description": "Format output as json.",
|
|
14557
|
-
"helpGroup": "GLOBAL",
|
|
14558
|
-
"name": "json",
|
|
14559
|
-
"allowNo": false,
|
|
14560
|
-
"type": "boolean"
|
|
14561
|
-
},
|
|
14562
|
-
"flags-dir": {
|
|
14563
|
-
"helpGroup": "GLOBAL",
|
|
14564
|
-
"name": "flags-dir",
|
|
14565
|
-
"summary": "Import flag values from a directory.",
|
|
14566
|
-
"hasDynamicHelp": false,
|
|
14567
|
-
"multiple": false,
|
|
14568
|
-
"type": "option"
|
|
14569
|
-
},
|
|
14570
|
-
"files": {
|
|
14571
|
-
"char": "f",
|
|
14572
|
-
"description": "XML metadata files path",
|
|
14573
|
-
"name": "files",
|
|
14574
|
-
"hasDynamicHelp": false,
|
|
14575
|
-
"multiple": true,
|
|
14576
|
-
"type": "option"
|
|
14577
|
-
},
|
|
14578
|
-
"websocket": {
|
|
14579
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
14580
|
-
"name": "websocket",
|
|
14581
|
-
"hasDynamicHelp": false,
|
|
14582
|
-
"multiple": false,
|
|
14583
|
-
"type": "option"
|
|
14584
|
-
},
|
|
14585
|
-
"skipauth": {
|
|
14586
|
-
"description": "Skip authentication check when a default username is required",
|
|
14587
|
-
"name": "skipauth",
|
|
14588
|
-
"allowNo": false,
|
|
14589
|
-
"type": "boolean"
|
|
14590
|
-
}
|
|
14591
|
-
},
|
|
14592
|
-
"hasDynamicHelp": false,
|
|
14593
|
-
"hiddenAliases": [],
|
|
14594
|
-
"id": "hardis:project:metadata:findduplicates",
|
|
14595
|
-
"pluginAlias": "sfdx-hardis",
|
|
14596
|
-
"pluginName": "sfdx-hardis",
|
|
14597
|
-
"pluginType": "core",
|
|
14598
|
-
"strict": true,
|
|
14599
|
-
"enableJsonFlag": true,
|
|
14600
|
-
"metadataDuplicateFindKeys": {
|
|
14601
|
-
"layout": [
|
|
14602
|
-
"Layout.layoutSections.layoutColumns.layoutItems.field",
|
|
14603
|
-
"Layout.quickActionListItems.quickActionName"
|
|
14604
|
-
],
|
|
14605
|
-
"profile": [
|
|
14606
|
-
"Profile.fieldPermissions.field",
|
|
14607
|
-
"Profile.objectPermissions.object",
|
|
14608
|
-
"Profile.classAccesses.apexClass"
|
|
14609
|
-
],
|
|
14610
|
-
"labels": [
|
|
14611
|
-
"CustomLabels.labels.fullName"
|
|
14612
|
-
],
|
|
14613
|
-
"permissionset": [
|
|
14614
|
-
"PermissionSet.fieldPermissions.field",
|
|
14615
|
-
"PermissionSet.objectPermissions.object",
|
|
14616
|
-
"PermissionSet.classAccesses.apexClass"
|
|
14617
|
-
]
|
|
14618
|
-
},
|
|
14619
|
-
"title": "XML duplicate values finder",
|
|
14620
|
-
"requiresProject": true,
|
|
14621
|
-
"isESM": true,
|
|
14622
|
-
"relativePath": [
|
|
14623
|
-
"lib",
|
|
14624
|
-
"commands",
|
|
14625
|
-
"hardis",
|
|
14626
|
-
"project",
|
|
14627
|
-
"metadata",
|
|
14628
|
-
"findduplicates.js"
|
|
14629
|
-
],
|
|
14630
|
-
"aliasPermutations": [],
|
|
14631
|
-
"permutations": [
|
|
14632
|
-
"hardis:project:metadata:findduplicates",
|
|
14633
|
-
"project:hardis:metadata:findduplicates",
|
|
14634
|
-
"project:metadata:hardis:findduplicates",
|
|
14635
|
-
"project:metadata:findduplicates:hardis",
|
|
14636
|
-
"hardis:metadata:project:findduplicates",
|
|
14637
|
-
"metadata:hardis:project:findduplicates",
|
|
14638
|
-
"metadata:project:hardis:findduplicates",
|
|
14639
|
-
"metadata:project:findduplicates:hardis",
|
|
14640
|
-
"hardis:metadata:findduplicates:project",
|
|
14641
|
-
"metadata:hardis:findduplicates:project",
|
|
14642
|
-
"metadata:findduplicates:hardis:project",
|
|
14643
|
-
"metadata:findduplicates:project:hardis",
|
|
14644
|
-
"hardis:project:findduplicates:metadata",
|
|
14645
|
-
"project:hardis:findduplicates:metadata",
|
|
14646
|
-
"project:findduplicates:hardis:metadata",
|
|
14647
|
-
"project:findduplicates:metadata:hardis",
|
|
14648
|
-
"hardis:findduplicates:project:metadata",
|
|
14649
|
-
"findduplicates:hardis:project:metadata",
|
|
14650
|
-
"findduplicates:project:hardis:metadata",
|
|
14651
|
-
"findduplicates:project:metadata:hardis",
|
|
14652
|
-
"hardis:findduplicates:metadata:project",
|
|
14653
|
-
"findduplicates:hardis:metadata:project",
|
|
14654
|
-
"findduplicates:metadata:hardis:project",
|
|
14655
|
-
"findduplicates:metadata:project:hardis"
|
|
14656
|
-
]
|
|
14657
|
-
},
|
|
14658
14658
|
"hardis:org:retrieve:sources:analytics": {
|
|
14659
14659
|
"aliases": [],
|
|
14660
14660
|
"args": {},
|
|
@@ -16104,5 +16104,5 @@
|
|
|
16104
16104
|
]
|
|
16105
16105
|
}
|
|
16106
16106
|
},
|
|
16107
|
-
"version": "6.17.0"
|
|
16107
|
+
"version": "6.17.2-alpha202512261125.0"
|
|
16108
16108
|
}
|