sfdx-hardis 6.7.5-beta202510190952.0 → 6.8.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/oclif.manifest.json +724 -724
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -5922,14 +5922,15 @@
|
|
|
5922
5922
|
"listviewmine:fix:org:hardis"
|
|
5923
5923
|
]
|
|
5924
5924
|
},
|
|
5925
|
-
"hardis:org:
|
|
5925
|
+
"hardis:org:diagnose:audittrail": {
|
|
5926
5926
|
"aliases": [],
|
|
5927
5927
|
"args": {},
|
|
5928
|
-
"description": "
|
|
5928
|
+
"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",
|
|
5929
5929
|
"examples": [
|
|
5930
|
-
"$ sf hardis:org:
|
|
5931
|
-
"$ sf hardis:org:
|
|
5932
|
-
"$ sf hardis:org:
|
|
5930
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5931
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5932
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5933
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5933
5934
|
],
|
|
5934
5935
|
"flags": {
|
|
5935
5936
|
"json": {
|
|
@@ -5947,8 +5948,25 @@
|
|
|
5947
5948
|
"multiple": false,
|
|
5948
5949
|
"type": "option"
|
|
5949
5950
|
},
|
|
5951
|
+
"excludeusers": {
|
|
5952
|
+
"char": "e",
|
|
5953
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5954
|
+
"name": "excludeusers",
|
|
5955
|
+
"hasDynamicHelp": false,
|
|
5956
|
+
"multiple": false,
|
|
5957
|
+
"type": "option"
|
|
5958
|
+
},
|
|
5959
|
+
"lastndays": {
|
|
5960
|
+
"char": "t",
|
|
5961
|
+
"description": "Number of days to extract from today (included)",
|
|
5962
|
+
"name": "lastndays",
|
|
5963
|
+
"hasDynamicHelp": false,
|
|
5964
|
+
"multiple": false,
|
|
5965
|
+
"type": "option"
|
|
5966
|
+
},
|
|
5950
5967
|
"outputfile": {
|
|
5951
|
-
"
|
|
5968
|
+
"char": "f",
|
|
5969
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5952
5970
|
"name": "outputfile",
|
|
5953
5971
|
"hasDynamicHelp": false,
|
|
5954
5972
|
"multiple": false,
|
|
@@ -5961,13 +5979,6 @@
|
|
|
5961
5979
|
"allowNo": false,
|
|
5962
5980
|
"type": "boolean"
|
|
5963
5981
|
},
|
|
5964
|
-
"no-prompt": {
|
|
5965
|
-
"char": "n",
|
|
5966
|
-
"description": "Do not prompt for org username, use the default one",
|
|
5967
|
-
"name": "no-prompt",
|
|
5968
|
-
"allowNo": false,
|
|
5969
|
-
"type": "boolean"
|
|
5970
|
-
},
|
|
5971
5982
|
"websocket": {
|
|
5972
5983
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5973
5984
|
"name": "websocket",
|
|
@@ -5999,13 +6010,13 @@
|
|
|
5999
6010
|
},
|
|
6000
6011
|
"hasDynamicHelp": true,
|
|
6001
6012
|
"hiddenAliases": [],
|
|
6002
|
-
"id": "hardis:org:
|
|
6013
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
6003
6014
|
"pluginAlias": "sfdx-hardis",
|
|
6004
6015
|
"pluginName": "sfdx-hardis",
|
|
6005
6016
|
"pluginType": "core",
|
|
6006
6017
|
"strict": true,
|
|
6007
6018
|
"enableJsonFlag": true,
|
|
6008
|
-
"title": "
|
|
6019
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
6009
6020
|
"requiresProject": false,
|
|
6010
6021
|
"isESM": true,
|
|
6011
6022
|
"relativePath": [
|
|
@@ -6013,43 +6024,43 @@
|
|
|
6013
6024
|
"commands",
|
|
6014
6025
|
"hardis",
|
|
6015
6026
|
"org",
|
|
6016
|
-
"
|
|
6017
|
-
"
|
|
6027
|
+
"diagnose",
|
|
6028
|
+
"audittrail.js"
|
|
6018
6029
|
],
|
|
6019
6030
|
"aliasPermutations": [],
|
|
6020
6031
|
"permutations": [
|
|
6021
|
-
"hardis:org:
|
|
6022
|
-
"org:hardis:
|
|
6023
|
-
"org:
|
|
6024
|
-
"org:
|
|
6025
|
-
"hardis:
|
|
6026
|
-
"
|
|
6027
|
-
"
|
|
6028
|
-
"
|
|
6029
|
-
"hardis:
|
|
6030
|
-
"
|
|
6031
|
-
"
|
|
6032
|
-
"
|
|
6033
|
-
"hardis:org:
|
|
6034
|
-
"org:hardis:
|
|
6035
|
-
"org:
|
|
6036
|
-
"org:
|
|
6037
|
-
"hardis:
|
|
6038
|
-
"
|
|
6039
|
-
"
|
|
6040
|
-
"
|
|
6041
|
-
"hardis:
|
|
6042
|
-
"
|
|
6043
|
-
"
|
|
6044
|
-
"
|
|
6032
|
+
"hardis:org:diagnose:audittrail",
|
|
6033
|
+
"org:hardis:diagnose:audittrail",
|
|
6034
|
+
"org:diagnose:hardis:audittrail",
|
|
6035
|
+
"org:diagnose:audittrail:hardis",
|
|
6036
|
+
"hardis:diagnose:org:audittrail",
|
|
6037
|
+
"diagnose:hardis:org:audittrail",
|
|
6038
|
+
"diagnose:org:hardis:audittrail",
|
|
6039
|
+
"diagnose:org:audittrail:hardis",
|
|
6040
|
+
"hardis:diagnose:audittrail:org",
|
|
6041
|
+
"diagnose:hardis:audittrail:org",
|
|
6042
|
+
"diagnose:audittrail:hardis:org",
|
|
6043
|
+
"diagnose:audittrail:org:hardis",
|
|
6044
|
+
"hardis:org:audittrail:diagnose",
|
|
6045
|
+
"org:hardis:audittrail:diagnose",
|
|
6046
|
+
"org:audittrail:hardis:diagnose",
|
|
6047
|
+
"org:audittrail:diagnose:hardis",
|
|
6048
|
+
"hardis:audittrail:org:diagnose",
|
|
6049
|
+
"audittrail:hardis:org:diagnose",
|
|
6050
|
+
"audittrail:org:hardis:diagnose",
|
|
6051
|
+
"audittrail:org:diagnose:hardis",
|
|
6052
|
+
"hardis:audittrail:diagnose:org",
|
|
6053
|
+
"audittrail:hardis:diagnose:org",
|
|
6054
|
+
"audittrail:diagnose:hardis:org",
|
|
6055
|
+
"audittrail:diagnose:org:hardis"
|
|
6045
6056
|
]
|
|
6046
6057
|
},
|
|
6047
|
-
"hardis:org:
|
|
6058
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
6048
6059
|
"aliases": [],
|
|
6049
6060
|
"args": {},
|
|
6050
|
-
"description": "
|
|
6061
|
+
"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",
|
|
6051
6062
|
"examples": [
|
|
6052
|
-
"$ sf hardis:org:
|
|
6063
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
6053
6064
|
],
|
|
6054
6065
|
"flags": {
|
|
6055
6066
|
"json": {
|
|
@@ -6105,159 +6116,60 @@
|
|
|
6105
6116
|
},
|
|
6106
6117
|
"hasDynamicHelp": true,
|
|
6107
6118
|
"hiddenAliases": [],
|
|
6108
|
-
"id": "hardis:org:
|
|
6119
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
6109
6120
|
"pluginAlias": "sfdx-hardis",
|
|
6110
6121
|
"pluginName": "sfdx-hardis",
|
|
6111
6122
|
"pluginType": "core",
|
|
6112
6123
|
"strict": true,
|
|
6113
6124
|
"enableJsonFlag": true,
|
|
6114
|
-
"title": "
|
|
6115
|
-
"
|
|
6116
|
-
{
|
|
6117
|
-
"key": "AUDIT_TRAIL",
|
|
6118
|
-
"title": "Detect suspect setup actions in major org",
|
|
6119
|
-
"command": "sf hardis:org:diagnose:audittrail",
|
|
6120
|
-
"frequency": "daily"
|
|
6121
|
-
},
|
|
6122
|
-
{
|
|
6123
|
-
"key": "LEGACY_API",
|
|
6124
|
-
"title": "Detect calls to deprecated API versions",
|
|
6125
|
-
"command": "sf hardis:org:diagnose:legacyapi",
|
|
6126
|
-
"frequency": "daily"
|
|
6127
|
-
},
|
|
6128
|
-
{
|
|
6129
|
-
"key": "ORG_LIMITS",
|
|
6130
|
-
"title": "Detect if org limits are close to be reached",
|
|
6131
|
-
"command": "sf hardis:org:monitor:limits",
|
|
6132
|
-
"frequency": "daily"
|
|
6133
|
-
},
|
|
6134
|
-
{
|
|
6135
|
-
"key": "UNSECURED_CONNECTED_APPS",
|
|
6136
|
-
"title": "Detect unsecured Connected Apps in an org",
|
|
6137
|
-
"command": "sf hardis:org:diagnose:unsecure-connected-apps",
|
|
6138
|
-
"frequency": "daily"
|
|
6139
|
-
},
|
|
6140
|
-
{
|
|
6141
|
-
"key": "LICENSES",
|
|
6142
|
-
"title": "Extract licenses information",
|
|
6143
|
-
"command": "sf hardis:org:diagnose:licenses",
|
|
6144
|
-
"frequency": "weekly"
|
|
6145
|
-
},
|
|
6146
|
-
{
|
|
6147
|
-
"key": "LINT_ACCESS",
|
|
6148
|
-
"title": "Detect custom elements with no access rights defined in permission sets",
|
|
6149
|
-
"command": "sf hardis:lint:access",
|
|
6150
|
-
"frequency": "weekly"
|
|
6151
|
-
},
|
|
6152
|
-
{
|
|
6153
|
-
"key": "UNUSED_LICENSES",
|
|
6154
|
-
"title": "Detect permission set licenses that are assigned to users that do not need them",
|
|
6155
|
-
"command": "sf hardis:org:diagnose:unusedlicenses",
|
|
6156
|
-
"frequency": "weekly"
|
|
6157
|
-
},
|
|
6158
|
-
{
|
|
6159
|
-
"key": "UNUSED_USERS",
|
|
6160
|
-
"title": "Detect active users without recent logins",
|
|
6161
|
-
"command": "sf hardis:org:diagnose:unusedusers",
|
|
6162
|
-
"frequency": "weekly"
|
|
6163
|
-
},
|
|
6164
|
-
{
|
|
6165
|
-
"key": "ACTIVE_USERS",
|
|
6166
|
-
"title": "Detect active users with recent logins",
|
|
6167
|
-
"command": "sf hardis:org:diagnose:unusedusers --returnactiveusers",
|
|
6168
|
-
"frequency": "weekly"
|
|
6169
|
-
},
|
|
6170
|
-
{
|
|
6171
|
-
"key": "ORG_INFO",
|
|
6172
|
-
"title": "Get org info + SF instance info + next major upgrade date",
|
|
6173
|
-
"command": "sf hardis:org:diagnose:instanceupgrade",
|
|
6174
|
-
"frequency": "weekly"
|
|
6175
|
-
},
|
|
6176
|
-
{
|
|
6177
|
-
"key": "RELEASE_UPDATES",
|
|
6178
|
-
"title": "Gather warnings about incoming and overdue Release Updates",
|
|
6179
|
-
"command": "sf hardis:org:diagnose:releaseupdates",
|
|
6180
|
-
"frequency": "weekly"
|
|
6181
|
-
},
|
|
6182
|
-
{
|
|
6183
|
-
"key": "UNUSED_METADATAS",
|
|
6184
|
-
"title": "Detect custom labels and custom permissions that are not in use",
|
|
6185
|
-
"command": "sf hardis:lint:unusedmetadatas",
|
|
6186
|
-
"frequency": "weekly"
|
|
6187
|
-
},
|
|
6188
|
-
{
|
|
6189
|
-
"key": "UNUSED_APEX_CLASSES",
|
|
6190
|
-
"title": "Detect unused Apex classes in an org",
|
|
6191
|
-
"command": "sf hardis:org:diagnose:unused-apex-classes",
|
|
6192
|
-
"frequency": "weekly"
|
|
6193
|
-
},
|
|
6194
|
-
{
|
|
6195
|
-
"key": "CONNECTED_APPS",
|
|
6196
|
-
"title": "Detect unused Connected Apps in an org",
|
|
6197
|
-
"command": "sf hardis:org:diagnose:unused-connected-apps",
|
|
6198
|
-
"frequency": "weekly"
|
|
6199
|
-
},
|
|
6200
|
-
{
|
|
6201
|
-
"key": "METADATA_STATUS",
|
|
6202
|
-
"title": "Detect inactive metadata",
|
|
6203
|
-
"command": "sf hardis:lint:metadatastatus",
|
|
6204
|
-
"frequency": "weekly"
|
|
6205
|
-
},
|
|
6206
|
-
{
|
|
6207
|
-
"key": "MISSING_ATTRIBUTES",
|
|
6208
|
-
"title": "Detect missing description on custom field",
|
|
6209
|
-
"command": "sf hardis:lint:missingattributes",
|
|
6210
|
-
"frequency": "weekly"
|
|
6211
|
-
}
|
|
6212
|
-
],
|
|
6213
|
-
"requiresProject": true,
|
|
6214
|
-
"triggerNotification": true,
|
|
6125
|
+
"title": "Get Instance Upgrade date",
|
|
6126
|
+
"requiresProject": false,
|
|
6215
6127
|
"isESM": true,
|
|
6216
6128
|
"relativePath": [
|
|
6217
6129
|
"lib",
|
|
6218
6130
|
"commands",
|
|
6219
6131
|
"hardis",
|
|
6220
6132
|
"org",
|
|
6221
|
-
"
|
|
6222
|
-
"
|
|
6133
|
+
"diagnose",
|
|
6134
|
+
"instanceupgrade.js"
|
|
6223
6135
|
],
|
|
6224
6136
|
"aliasPermutations": [],
|
|
6225
6137
|
"permutations": [
|
|
6226
|
-
"hardis:org:
|
|
6227
|
-
"org:hardis:
|
|
6228
|
-
"org:
|
|
6229
|
-
"org:
|
|
6230
|
-
"hardis:
|
|
6231
|
-
"
|
|
6232
|
-
"
|
|
6233
|
-
"
|
|
6234
|
-
"hardis:
|
|
6235
|
-
"
|
|
6236
|
-
"
|
|
6237
|
-
"
|
|
6238
|
-
"hardis:org:
|
|
6239
|
-
"org:hardis:
|
|
6240
|
-
"org:
|
|
6241
|
-
"org:
|
|
6242
|
-
"hardis:
|
|
6243
|
-
"
|
|
6244
|
-
"
|
|
6245
|
-
"
|
|
6246
|
-
"hardis:
|
|
6247
|
-
"
|
|
6248
|
-
"
|
|
6249
|
-
"
|
|
6138
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
6139
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
6140
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
6141
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
6142
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
6143
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
6144
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
6145
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
6146
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
6147
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
6148
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
6149
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
6150
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
6151
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
6152
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
6153
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
6154
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
6155
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
6156
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
6157
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
6158
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
6159
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
6160
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
6161
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
6250
6162
|
]
|
|
6251
6163
|
},
|
|
6252
|
-
"hardis:org:
|
|
6164
|
+
"hardis:org:diagnose:legacyapi": {
|
|
6253
6165
|
"aliases": [],
|
|
6254
6166
|
"args": {},
|
|
6255
|
-
"description": "
|
|
6167
|
+
"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",
|
|
6256
6168
|
"examples": [
|
|
6257
|
-
"$ sf hardis:org:
|
|
6258
|
-
"$ sf hardis:org:
|
|
6259
|
-
"$ sf hardis:org:
|
|
6260
|
-
"$ sf hardis:org:
|
|
6169
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
6170
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6171
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6172
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6261
6173
|
],
|
|
6262
6174
|
"flags": {
|
|
6263
6175
|
"json": {
|
|
@@ -6275,49 +6187,24 @@
|
|
|
6275
6187
|
"multiple": false,
|
|
6276
6188
|
"type": "option"
|
|
6277
6189
|
},
|
|
6278
|
-
"
|
|
6279
|
-
"
|
|
6280
|
-
"
|
|
6281
|
-
"
|
|
6282
|
-
"
|
|
6283
|
-
},
|
|
6284
|
-
"max-by-chunk": {
|
|
6285
|
-
"char": "m",
|
|
6286
|
-
"description": "If mode --full is activated, maximum number of metadatas in a package.xml chunk",
|
|
6287
|
-
"name": "max-by-chunk",
|
|
6288
|
-
"default": 3000,
|
|
6190
|
+
"eventtype": {
|
|
6191
|
+
"char": "e",
|
|
6192
|
+
"description": "Type of EventLogFile event to analyze",
|
|
6193
|
+
"name": "eventtype",
|
|
6194
|
+
"default": "ApiTotalUsage",
|
|
6289
6195
|
"hasDynamicHelp": false,
|
|
6290
6196
|
"multiple": false,
|
|
6291
6197
|
"type": "option"
|
|
6292
6198
|
},
|
|
6293
|
-
"
|
|
6294
|
-
"char": "
|
|
6295
|
-
"description": "
|
|
6296
|
-
"name": "
|
|
6297
|
-
"
|
|
6298
|
-
"type": "boolean"
|
|
6299
|
-
},
|
|
6300
|
-
"full-apply-filters": {
|
|
6301
|
-
"char": "z",
|
|
6302
|
-
"description": "If mode --full is activated, apply filters of manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES anyway",
|
|
6303
|
-
"name": "full-apply-filters",
|
|
6304
|
-
"allowNo": false,
|
|
6305
|
-
"type": "boolean"
|
|
6306
|
-
},
|
|
6307
|
-
"start-chunk": {
|
|
6308
|
-
"description": "Use this parameter to troubleshoot a specific chunk. It will be used as the first chunk to retrieve",
|
|
6309
|
-
"name": "start-chunk",
|
|
6310
|
-
"default": 1,
|
|
6199
|
+
"limit": {
|
|
6200
|
+
"char": "l",
|
|
6201
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
6202
|
+
"name": "limit",
|
|
6203
|
+
"default": 999,
|
|
6311
6204
|
"hasDynamicHelp": false,
|
|
6312
6205
|
"multiple": false,
|
|
6313
6206
|
"type": "option"
|
|
6314
6207
|
},
|
|
6315
|
-
"skip-doc": {
|
|
6316
|
-
"description": "Skip the generation of project documentation at the end of the command",
|
|
6317
|
-
"name": "skip-doc",
|
|
6318
|
-
"allowNo": false,
|
|
6319
|
-
"type": "boolean"
|
|
6320
|
-
},
|
|
6321
6208
|
"outputfile": {
|
|
6322
6209
|
"char": "f",
|
|
6323
6210
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6364,58 +6251,57 @@
|
|
|
6364
6251
|
},
|
|
6365
6252
|
"hasDynamicHelp": true,
|
|
6366
6253
|
"hiddenAliases": [],
|
|
6367
|
-
"id": "hardis:org:
|
|
6254
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
6368
6255
|
"pluginAlias": "sfdx-hardis",
|
|
6369
6256
|
"pluginName": "sfdx-hardis",
|
|
6370
6257
|
"pluginType": "core",
|
|
6371
6258
|
"strict": true,
|
|
6372
6259
|
"enableJsonFlag": true,
|
|
6373
|
-
"title": "
|
|
6374
|
-
"requiresProject":
|
|
6375
|
-
"triggerNotification": true,
|
|
6260
|
+
"title": "Check for legacy API use",
|
|
6261
|
+
"requiresProject": false,
|
|
6376
6262
|
"isESM": true,
|
|
6377
6263
|
"relativePath": [
|
|
6378
6264
|
"lib",
|
|
6379
6265
|
"commands",
|
|
6380
6266
|
"hardis",
|
|
6381
6267
|
"org",
|
|
6382
|
-
"
|
|
6383
|
-
"
|
|
6268
|
+
"diagnose",
|
|
6269
|
+
"legacyapi.js"
|
|
6384
6270
|
],
|
|
6385
6271
|
"aliasPermutations": [],
|
|
6386
6272
|
"permutations": [
|
|
6387
|
-
"hardis:org:
|
|
6388
|
-
"org:hardis:
|
|
6389
|
-
"org:
|
|
6390
|
-
"org:
|
|
6391
|
-
"hardis:
|
|
6392
|
-
"
|
|
6393
|
-
"
|
|
6394
|
-
"
|
|
6395
|
-
"hardis:
|
|
6396
|
-
"
|
|
6397
|
-
"
|
|
6398
|
-
"
|
|
6399
|
-
"hardis:org:
|
|
6400
|
-
"org:hardis:
|
|
6401
|
-
"org:
|
|
6402
|
-
"org:
|
|
6403
|
-
"hardis:
|
|
6404
|
-
"
|
|
6405
|
-
"
|
|
6406
|
-
"
|
|
6407
|
-
"hardis:
|
|
6408
|
-
"
|
|
6409
|
-
"
|
|
6410
|
-
"
|
|
6273
|
+
"hardis:org:diagnose:legacyapi",
|
|
6274
|
+
"org:hardis:diagnose:legacyapi",
|
|
6275
|
+
"org:diagnose:hardis:legacyapi",
|
|
6276
|
+
"org:diagnose:legacyapi:hardis",
|
|
6277
|
+
"hardis:diagnose:org:legacyapi",
|
|
6278
|
+
"diagnose:hardis:org:legacyapi",
|
|
6279
|
+
"diagnose:org:hardis:legacyapi",
|
|
6280
|
+
"diagnose:org:legacyapi:hardis",
|
|
6281
|
+
"hardis:diagnose:legacyapi:org",
|
|
6282
|
+
"diagnose:hardis:legacyapi:org",
|
|
6283
|
+
"diagnose:legacyapi:hardis:org",
|
|
6284
|
+
"diagnose:legacyapi:org:hardis",
|
|
6285
|
+
"hardis:org:legacyapi:diagnose",
|
|
6286
|
+
"org:hardis:legacyapi:diagnose",
|
|
6287
|
+
"org:legacyapi:hardis:diagnose",
|
|
6288
|
+
"org:legacyapi:diagnose:hardis",
|
|
6289
|
+
"hardis:legacyapi:org:diagnose",
|
|
6290
|
+
"legacyapi:hardis:org:diagnose",
|
|
6291
|
+
"legacyapi:org:hardis:diagnose",
|
|
6292
|
+
"legacyapi:org:diagnose:hardis",
|
|
6293
|
+
"hardis:legacyapi:diagnose:org",
|
|
6294
|
+
"legacyapi:hardis:diagnose:org",
|
|
6295
|
+
"legacyapi:diagnose:hardis:org",
|
|
6296
|
+
"legacyapi:diagnose:org:hardis"
|
|
6411
6297
|
]
|
|
6412
6298
|
},
|
|
6413
|
-
"hardis:org:
|
|
6299
|
+
"hardis:org:diagnose:licenses": {
|
|
6414
6300
|
"aliases": [],
|
|
6415
6301
|
"args": {},
|
|
6416
|
-
"description": "\n
|
|
6302
|
+
"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",
|
|
6417
6303
|
"examples": [
|
|
6418
|
-
"$ sf hardis:org:
|
|
6304
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
6419
6305
|
],
|
|
6420
6306
|
"flags": {
|
|
6421
6307
|
"json": {
|
|
@@ -6441,6 +6327,13 @@
|
|
|
6441
6327
|
"multiple": false,
|
|
6442
6328
|
"type": "option"
|
|
6443
6329
|
},
|
|
6330
|
+
"usedonly": {
|
|
6331
|
+
"char": "u",
|
|
6332
|
+
"description": "Filter to have only used licenses",
|
|
6333
|
+
"name": "usedonly",
|
|
6334
|
+
"allowNo": false,
|
|
6335
|
+
"type": "boolean"
|
|
6336
|
+
},
|
|
6444
6337
|
"debug": {
|
|
6445
6338
|
"char": "d",
|
|
6446
6339
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6479,61 +6372,57 @@
|
|
|
6479
6372
|
},
|
|
6480
6373
|
"hasDynamicHelp": true,
|
|
6481
6374
|
"hiddenAliases": [],
|
|
6482
|
-
"id": "hardis:org:
|
|
6375
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6483
6376
|
"pluginAlias": "sfdx-hardis",
|
|
6484
6377
|
"pluginName": "sfdx-hardis",
|
|
6485
6378
|
"pluginType": "core",
|
|
6486
6379
|
"strict": true,
|
|
6487
6380
|
"enableJsonFlag": true,
|
|
6488
|
-
"title": "
|
|
6489
|
-
"requiresProject":
|
|
6490
|
-
"triggerNotification": true,
|
|
6381
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6382
|
+
"requiresProject": false,
|
|
6491
6383
|
"isESM": true,
|
|
6492
6384
|
"relativePath": [
|
|
6493
6385
|
"lib",
|
|
6494
6386
|
"commands",
|
|
6495
6387
|
"hardis",
|
|
6496
6388
|
"org",
|
|
6497
|
-
"
|
|
6498
|
-
"
|
|
6389
|
+
"diagnose",
|
|
6390
|
+
"licenses.js"
|
|
6499
6391
|
],
|
|
6500
6392
|
"aliasPermutations": [],
|
|
6501
6393
|
"permutations": [
|
|
6502
|
-
"hardis:org:
|
|
6503
|
-
"org:hardis:
|
|
6504
|
-
"org:
|
|
6505
|
-
"org:
|
|
6506
|
-
"hardis:
|
|
6507
|
-
"
|
|
6508
|
-
"
|
|
6509
|
-
"
|
|
6510
|
-
"hardis:
|
|
6511
|
-
"
|
|
6512
|
-
"
|
|
6513
|
-
"
|
|
6514
|
-
"hardis:org:
|
|
6515
|
-
"org:hardis:
|
|
6516
|
-
"org:
|
|
6517
|
-
"org:
|
|
6518
|
-
"hardis:
|
|
6519
|
-
"
|
|
6520
|
-
"
|
|
6521
|
-
"
|
|
6522
|
-
"hardis:
|
|
6523
|
-
"
|
|
6524
|
-
"
|
|
6525
|
-
"
|
|
6394
|
+
"hardis:org:diagnose:licenses",
|
|
6395
|
+
"org:hardis:diagnose:licenses",
|
|
6396
|
+
"org:diagnose:hardis:licenses",
|
|
6397
|
+
"org:diagnose:licenses:hardis",
|
|
6398
|
+
"hardis:diagnose:org:licenses",
|
|
6399
|
+
"diagnose:hardis:org:licenses",
|
|
6400
|
+
"diagnose:org:hardis:licenses",
|
|
6401
|
+
"diagnose:org:licenses:hardis",
|
|
6402
|
+
"hardis:diagnose:licenses:org",
|
|
6403
|
+
"diagnose:hardis:licenses:org",
|
|
6404
|
+
"diagnose:licenses:hardis:org",
|
|
6405
|
+
"diagnose:licenses:org:hardis",
|
|
6406
|
+
"hardis:org:licenses:diagnose",
|
|
6407
|
+
"org:hardis:licenses:diagnose",
|
|
6408
|
+
"org:licenses:hardis:diagnose",
|
|
6409
|
+
"org:licenses:diagnose:hardis",
|
|
6410
|
+
"hardis:licenses:org:diagnose",
|
|
6411
|
+
"licenses:hardis:org:diagnose",
|
|
6412
|
+
"licenses:org:hardis:diagnose",
|
|
6413
|
+
"licenses:org:diagnose:hardis",
|
|
6414
|
+
"hardis:licenses:diagnose:org",
|
|
6415
|
+
"licenses:hardis:diagnose:org",
|
|
6416
|
+
"licenses:diagnose:hardis:org",
|
|
6417
|
+
"licenses:diagnose:org:hardis"
|
|
6526
6418
|
]
|
|
6527
6419
|
},
|
|
6528
|
-
"hardis:org:diagnose:
|
|
6420
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6529
6421
|
"aliases": [],
|
|
6530
6422
|
"args": {},
|
|
6531
|
-
"description": "Export
|
|
6423
|
+
"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",
|
|
6532
6424
|
"examples": [
|
|
6533
|
-
"$ sf hardis:org:diagnose:
|
|
6534
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
6535
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
6536
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
6425
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6537
6426
|
],
|
|
6538
6427
|
"flags": {
|
|
6539
6428
|
"json": {
|
|
@@ -6551,22 +6440,6 @@
|
|
|
6551
6440
|
"multiple": false,
|
|
6552
6441
|
"type": "option"
|
|
6553
6442
|
},
|
|
6554
|
-
"excludeusers": {
|
|
6555
|
-
"char": "e",
|
|
6556
|
-
"description": "Comma-separated list of usernames to exclude",
|
|
6557
|
-
"name": "excludeusers",
|
|
6558
|
-
"hasDynamicHelp": false,
|
|
6559
|
-
"multiple": false,
|
|
6560
|
-
"type": "option"
|
|
6561
|
-
},
|
|
6562
|
-
"lastndays": {
|
|
6563
|
-
"char": "t",
|
|
6564
|
-
"description": "Number of days to extract from today (included)",
|
|
6565
|
-
"name": "lastndays",
|
|
6566
|
-
"hasDynamicHelp": false,
|
|
6567
|
-
"multiple": false,
|
|
6568
|
-
"type": "option"
|
|
6569
|
-
},
|
|
6570
6443
|
"outputfile": {
|
|
6571
6444
|
"char": "f",
|
|
6572
6445
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6613,13 +6486,13 @@
|
|
|
6613
6486
|
},
|
|
6614
6487
|
"hasDynamicHelp": true,
|
|
6615
6488
|
"hiddenAliases": [],
|
|
6616
|
-
"id": "hardis:org:diagnose:
|
|
6489
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6617
6490
|
"pluginAlias": "sfdx-hardis",
|
|
6618
6491
|
"pluginName": "sfdx-hardis",
|
|
6619
6492
|
"pluginType": "core",
|
|
6620
6493
|
"strict": true,
|
|
6621
6494
|
"enableJsonFlag": true,
|
|
6622
|
-
"title": "
|
|
6495
|
+
"title": "Check Release Updates of an org",
|
|
6623
6496
|
"requiresProject": false,
|
|
6624
6497
|
"isESM": true,
|
|
6625
6498
|
"relativePath": [
|
|
@@ -6628,42 +6501,42 @@
|
|
|
6628
6501
|
"hardis",
|
|
6629
6502
|
"org",
|
|
6630
6503
|
"diagnose",
|
|
6631
|
-
"
|
|
6504
|
+
"releaseupdates.js"
|
|
6632
6505
|
],
|
|
6633
6506
|
"aliasPermutations": [],
|
|
6634
6507
|
"permutations": [
|
|
6635
|
-
"hardis:org:diagnose:
|
|
6636
|
-
"org:hardis:diagnose:
|
|
6637
|
-
"org:diagnose:hardis:
|
|
6638
|
-
"org:diagnose:
|
|
6639
|
-
"hardis:diagnose:org:
|
|
6640
|
-
"diagnose:hardis:org:
|
|
6641
|
-
"diagnose:org:hardis:
|
|
6642
|
-
"diagnose:org:
|
|
6643
|
-
"hardis:diagnose:
|
|
6644
|
-
"diagnose:hardis:
|
|
6645
|
-
"diagnose:
|
|
6646
|
-
"diagnose:
|
|
6647
|
-
"hardis:org:
|
|
6648
|
-
"org:hardis:
|
|
6649
|
-
"org:
|
|
6650
|
-
"org:
|
|
6651
|
-
"hardis:
|
|
6652
|
-
"
|
|
6653
|
-
"
|
|
6654
|
-
"
|
|
6655
|
-
"hardis:
|
|
6656
|
-
"
|
|
6657
|
-
"
|
|
6658
|
-
"
|
|
6508
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6509
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6510
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6511
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6512
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6513
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6514
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6515
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6516
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6517
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6518
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6519
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6520
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6521
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6522
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6523
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6524
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6525
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6526
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6527
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6528
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6529
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6530
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6531
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6659
6532
|
]
|
|
6660
6533
|
},
|
|
6661
|
-
"hardis:org:diagnose:
|
|
6534
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
6662
6535
|
"aliases": [],
|
|
6663
6536
|
"args": {},
|
|
6664
|
-
"description": "\n## Command Behavior\n\n**
|
|
6537
|
+
"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",
|
|
6665
6538
|
"examples": [
|
|
6666
|
-
"$ sf hardis:org:diagnose:
|
|
6539
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
6667
6540
|
],
|
|
6668
6541
|
"flags": {
|
|
6669
6542
|
"json": {
|
|
@@ -6681,6 +6554,14 @@
|
|
|
6681
6554
|
"multiple": false,
|
|
6682
6555
|
"type": "option"
|
|
6683
6556
|
},
|
|
6557
|
+
"outputfile": {
|
|
6558
|
+
"char": "f",
|
|
6559
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6560
|
+
"name": "outputfile",
|
|
6561
|
+
"hasDynamicHelp": false,
|
|
6562
|
+
"multiple": false,
|
|
6563
|
+
"type": "option"
|
|
6564
|
+
},
|
|
6684
6565
|
"debug": {
|
|
6685
6566
|
"char": "d",
|
|
6686
6567
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6719,13 +6600,13 @@
|
|
|
6719
6600
|
},
|
|
6720
6601
|
"hasDynamicHelp": true,
|
|
6721
6602
|
"hiddenAliases": [],
|
|
6722
|
-
"id": "hardis:org:diagnose:
|
|
6603
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
6723
6604
|
"pluginAlias": "sfdx-hardis",
|
|
6724
6605
|
"pluginName": "sfdx-hardis",
|
|
6725
6606
|
"pluginType": "core",
|
|
6726
6607
|
"strict": true,
|
|
6727
6608
|
"enableJsonFlag": true,
|
|
6728
|
-
"title": "
|
|
6609
|
+
"title": "Detect Unsecured Connected Apps",
|
|
6729
6610
|
"requiresProject": false,
|
|
6730
6611
|
"isESM": true,
|
|
6731
6612
|
"relativePath": [
|
|
@@ -6734,45 +6615,43 @@
|
|
|
6734
6615
|
"hardis",
|
|
6735
6616
|
"org",
|
|
6736
6617
|
"diagnose",
|
|
6737
|
-
"
|
|
6618
|
+
"unsecure-connected-apps.js"
|
|
6738
6619
|
],
|
|
6739
6620
|
"aliasPermutations": [],
|
|
6740
6621
|
"permutations": [
|
|
6741
|
-
"hardis:org:diagnose:
|
|
6742
|
-
"org:hardis:diagnose:
|
|
6743
|
-
"org:diagnose:hardis:
|
|
6744
|
-
"org:diagnose:
|
|
6745
|
-
"hardis:diagnose:org:
|
|
6746
|
-
"diagnose:hardis:org:
|
|
6747
|
-
"diagnose:org:hardis:
|
|
6748
|
-
"diagnose:org:
|
|
6749
|
-
"hardis:diagnose:
|
|
6750
|
-
"diagnose:hardis:
|
|
6751
|
-
"diagnose:
|
|
6752
|
-
"diagnose:
|
|
6753
|
-
"hardis:org:
|
|
6754
|
-
"org:hardis:
|
|
6755
|
-
"org:
|
|
6756
|
-
"org:
|
|
6757
|
-
"hardis:
|
|
6758
|
-
"
|
|
6759
|
-
"
|
|
6760
|
-
"
|
|
6761
|
-
"hardis:
|
|
6762
|
-
"
|
|
6763
|
-
"
|
|
6764
|
-
"
|
|
6622
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
6623
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
6624
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
6625
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
6626
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
6627
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
6628
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
6629
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
6630
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
6631
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
6632
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
6633
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
6634
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
6635
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
6636
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
6637
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
6638
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
6639
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
6640
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
6641
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
6642
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
6643
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
6644
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
6645
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
6765
6646
|
]
|
|
6766
6647
|
},
|
|
6767
|
-
"hardis:org:diagnose:
|
|
6648
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6768
6649
|
"aliases": [],
|
|
6769
6650
|
"args": {},
|
|
6770
|
-
"description": "
|
|
6651
|
+
"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",
|
|
6771
6652
|
"examples": [
|
|
6772
|
-
"$ sf hardis:org:diagnose:
|
|
6773
|
-
"$ sf hardis:org:diagnose:
|
|
6774
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6775
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6653
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6654
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6776
6655
|
],
|
|
6777
6656
|
"flags": {
|
|
6778
6657
|
"json": {
|
|
@@ -6790,24 +6669,6 @@
|
|
|
6790
6669
|
"multiple": false,
|
|
6791
6670
|
"type": "option"
|
|
6792
6671
|
},
|
|
6793
|
-
"eventtype": {
|
|
6794
|
-
"char": "e",
|
|
6795
|
-
"description": "Type of EventLogFile event to analyze",
|
|
6796
|
-
"name": "eventtype",
|
|
6797
|
-
"default": "ApiTotalUsage",
|
|
6798
|
-
"hasDynamicHelp": false,
|
|
6799
|
-
"multiple": false,
|
|
6800
|
-
"type": "option"
|
|
6801
|
-
},
|
|
6802
|
-
"limit": {
|
|
6803
|
-
"char": "l",
|
|
6804
|
-
"description": "Number of latest EventLogFile events to analyze",
|
|
6805
|
-
"name": "limit",
|
|
6806
|
-
"default": 999,
|
|
6807
|
-
"hasDynamicHelp": false,
|
|
6808
|
-
"multiple": false,
|
|
6809
|
-
"type": "option"
|
|
6810
|
-
},
|
|
6811
6672
|
"outputfile": {
|
|
6812
6673
|
"char": "f",
|
|
6813
6674
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6816,6 +6677,14 @@
|
|
|
6816
6677
|
"multiple": false,
|
|
6817
6678
|
"type": "option"
|
|
6818
6679
|
},
|
|
6680
|
+
"days": {
|
|
6681
|
+
"char": "t",
|
|
6682
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6683
|
+
"name": "days",
|
|
6684
|
+
"hasDynamicHelp": false,
|
|
6685
|
+
"multiple": false,
|
|
6686
|
+
"type": "option"
|
|
6687
|
+
},
|
|
6819
6688
|
"debug": {
|
|
6820
6689
|
"char": "d",
|
|
6821
6690
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6854,13 +6723,13 @@
|
|
|
6854
6723
|
},
|
|
6855
6724
|
"hasDynamicHelp": true,
|
|
6856
6725
|
"hiddenAliases": [],
|
|
6857
|
-
"id": "hardis:org:diagnose:
|
|
6726
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6858
6727
|
"pluginAlias": "sfdx-hardis",
|
|
6859
6728
|
"pluginName": "sfdx-hardis",
|
|
6860
6729
|
"pluginType": "core",
|
|
6861
6730
|
"strict": true,
|
|
6862
6731
|
"enableJsonFlag": true,
|
|
6863
|
-
"title": "
|
|
6732
|
+
"title": "Detect unused Apex classes in an org",
|
|
6864
6733
|
"requiresProject": false,
|
|
6865
6734
|
"isESM": true,
|
|
6866
6735
|
"relativePath": [
|
|
@@ -6869,42 +6738,42 @@
|
|
|
6869
6738
|
"hardis",
|
|
6870
6739
|
"org",
|
|
6871
6740
|
"diagnose",
|
|
6872
|
-
"
|
|
6741
|
+
"unused-apex-classes.js"
|
|
6873
6742
|
],
|
|
6874
6743
|
"aliasPermutations": [],
|
|
6875
6744
|
"permutations": [
|
|
6876
|
-
"hardis:org:diagnose:
|
|
6877
|
-
"org:hardis:diagnose:
|
|
6878
|
-
"org:diagnose:hardis:
|
|
6879
|
-
"org:diagnose:
|
|
6880
|
-
"hardis:diagnose:org:
|
|
6881
|
-
"diagnose:hardis:org:
|
|
6882
|
-
"diagnose:org:hardis:
|
|
6883
|
-
"diagnose:org:
|
|
6884
|
-
"hardis:diagnose:
|
|
6885
|
-
"diagnose:hardis:
|
|
6886
|
-
"diagnose:
|
|
6887
|
-
"diagnose:
|
|
6888
|
-
"hardis:org:
|
|
6889
|
-
"org:hardis:
|
|
6890
|
-
"org:
|
|
6891
|
-
"org:
|
|
6892
|
-
"hardis:
|
|
6893
|
-
"
|
|
6894
|
-
"
|
|
6895
|
-
"
|
|
6896
|
-
"hardis:
|
|
6897
|
-
"
|
|
6898
|
-
"
|
|
6899
|
-
"
|
|
6745
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6746
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6747
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6748
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6749
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6750
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6751
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6752
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6753
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6754
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6755
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6756
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6757
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6758
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6759
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6760
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6761
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6762
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6763
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6764
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6765
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6766
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6767
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6768
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6900
6769
|
]
|
|
6901
6770
|
},
|
|
6902
|
-
"hardis:org:diagnose:
|
|
6771
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6903
6772
|
"aliases": [],
|
|
6904
6773
|
"args": {},
|
|
6905
|
-
"description": "\n
|
|
6774
|
+
"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",
|
|
6906
6775
|
"examples": [
|
|
6907
|
-
"$ sf hardis:org:diagnose:
|
|
6776
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6908
6777
|
],
|
|
6909
6778
|
"flags": {
|
|
6910
6779
|
"json": {
|
|
@@ -6930,13 +6799,6 @@
|
|
|
6930
6799
|
"multiple": false,
|
|
6931
6800
|
"type": "option"
|
|
6932
6801
|
},
|
|
6933
|
-
"usedonly": {
|
|
6934
|
-
"char": "u",
|
|
6935
|
-
"description": "Filter to have only used licenses",
|
|
6936
|
-
"name": "usedonly",
|
|
6937
|
-
"allowNo": false,
|
|
6938
|
-
"type": "boolean"
|
|
6939
|
-
},
|
|
6940
6802
|
"debug": {
|
|
6941
6803
|
"char": "d",
|
|
6942
6804
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6975,13 +6837,30 @@
|
|
|
6975
6837
|
},
|
|
6976
6838
|
"hasDynamicHelp": true,
|
|
6977
6839
|
"hiddenAliases": [],
|
|
6978
|
-
"id": "hardis:org:diagnose:
|
|
6840
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6979
6841
|
"pluginAlias": "sfdx-hardis",
|
|
6980
6842
|
"pluginName": "sfdx-hardis",
|
|
6981
6843
|
"pluginType": "core",
|
|
6982
6844
|
"strict": true,
|
|
6983
6845
|
"enableJsonFlag": true,
|
|
6984
|
-
"title": "
|
|
6846
|
+
"title": "Unused Connected Apps in an org",
|
|
6847
|
+
"allowedInactiveConnectedApps": [
|
|
6848
|
+
"Ant Migration Tool",
|
|
6849
|
+
"Chatter Desktop",
|
|
6850
|
+
"Chatter Mobile for BlackBerry",
|
|
6851
|
+
"Force.com IDE",
|
|
6852
|
+
"OIQ_Integration",
|
|
6853
|
+
"Salesforce CLI",
|
|
6854
|
+
"Salesforce Files",
|
|
6855
|
+
"Salesforce Mobile Dashboards",
|
|
6856
|
+
"Salesforce Touch",
|
|
6857
|
+
"Salesforce for Outlook",
|
|
6858
|
+
"SalesforceA",
|
|
6859
|
+
"SalesforceA for Android",
|
|
6860
|
+
"SalesforceA for iOS",
|
|
6861
|
+
"SalesforceDX Namespace Registry",
|
|
6862
|
+
"SalesforceIQ"
|
|
6863
|
+
],
|
|
6985
6864
|
"requiresProject": false,
|
|
6986
6865
|
"isESM": true,
|
|
6987
6866
|
"relativePath": [
|
|
@@ -6990,42 +6869,43 @@
|
|
|
6990
6869
|
"hardis",
|
|
6991
6870
|
"org",
|
|
6992
6871
|
"diagnose",
|
|
6993
|
-
"
|
|
6872
|
+
"unused-connected-apps.js"
|
|
6994
6873
|
],
|
|
6995
6874
|
"aliasPermutations": [],
|
|
6996
6875
|
"permutations": [
|
|
6997
|
-
"hardis:org:diagnose:
|
|
6998
|
-
"org:hardis:diagnose:
|
|
6999
|
-
"org:diagnose:hardis:
|
|
7000
|
-
"org:diagnose:
|
|
7001
|
-
"hardis:diagnose:org:
|
|
7002
|
-
"diagnose:hardis:org:
|
|
7003
|
-
"diagnose:org:hardis:
|
|
7004
|
-
"diagnose:org:
|
|
7005
|
-
"hardis:diagnose:
|
|
7006
|
-
"diagnose:hardis:
|
|
7007
|
-
"diagnose:
|
|
7008
|
-
"diagnose:
|
|
7009
|
-
"hardis:org:
|
|
7010
|
-
"org:hardis:
|
|
7011
|
-
"org:
|
|
7012
|
-
"org:
|
|
7013
|
-
"hardis:
|
|
7014
|
-
"
|
|
7015
|
-
"
|
|
7016
|
-
"
|
|
7017
|
-
"hardis:
|
|
7018
|
-
"
|
|
7019
|
-
"
|
|
7020
|
-
"
|
|
6876
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6877
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6878
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6879
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6880
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6881
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6882
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6883
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6884
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6885
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6886
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6887
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6888
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6889
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6890
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6891
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6892
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6893
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6894
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6895
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6896
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6897
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6898
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6899
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
7021
6900
|
]
|
|
7022
6901
|
},
|
|
7023
|
-
"hardis:org:diagnose:
|
|
6902
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
7024
6903
|
"aliases": [],
|
|
7025
6904
|
"args": {},
|
|
7026
|
-
"description": "
|
|
6905
|
+
"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",
|
|
7027
6906
|
"examples": [
|
|
7028
|
-
"$ sf hardis:org:diagnose:
|
|
6907
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6908
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
7029
6909
|
],
|
|
7030
6910
|
"flags": {
|
|
7031
6911
|
"json": {
|
|
@@ -7089,14 +6969,32 @@
|
|
|
7089
6969
|
},
|
|
7090
6970
|
"hasDynamicHelp": true,
|
|
7091
6971
|
"hiddenAliases": [],
|
|
7092
|
-
"id": "hardis:org:diagnose:
|
|
6972
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
7093
6973
|
"pluginAlias": "sfdx-hardis",
|
|
7094
6974
|
"pluginName": "sfdx-hardis",
|
|
7095
6975
|
"pluginType": "core",
|
|
7096
6976
|
"strict": true,
|
|
7097
6977
|
"enableJsonFlag": true,
|
|
7098
|
-
"title": "
|
|
6978
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
7099
6979
|
"requiresProject": false,
|
|
6980
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6981
|
+
"Sales_User"
|
|
6982
|
+
],
|
|
6983
|
+
"permSetsPermSetLicenses": [
|
|
6984
|
+
{
|
|
6985
|
+
"permSet": "Sales_User",
|
|
6986
|
+
"permSetLicense": "SalesUserPsl"
|
|
6987
|
+
}
|
|
6988
|
+
],
|
|
6989
|
+
"profilesPermissionSetLicenses": [
|
|
6990
|
+
{
|
|
6991
|
+
"profile": "Salesforce API Only",
|
|
6992
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6993
|
+
}
|
|
6994
|
+
],
|
|
6995
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6996
|
+
"IdentityConnect"
|
|
6997
|
+
],
|
|
7100
6998
|
"isESM": true,
|
|
7101
6999
|
"relativePath": [
|
|
7102
7000
|
"lib",
|
|
@@ -7104,42 +7002,46 @@
|
|
|
7104
7002
|
"hardis",
|
|
7105
7003
|
"org",
|
|
7106
7004
|
"diagnose",
|
|
7107
|
-
"
|
|
7005
|
+
"unusedlicenses.js"
|
|
7108
7006
|
],
|
|
7109
7007
|
"aliasPermutations": [],
|
|
7110
7008
|
"permutations": [
|
|
7111
|
-
"hardis:org:diagnose:
|
|
7112
|
-
"org:hardis:diagnose:
|
|
7113
|
-
"org:diagnose:hardis:
|
|
7114
|
-
"org:diagnose:
|
|
7115
|
-
"hardis:diagnose:org:
|
|
7116
|
-
"diagnose:hardis:org:
|
|
7117
|
-
"diagnose:org:hardis:
|
|
7118
|
-
"diagnose:org:
|
|
7119
|
-
"hardis:diagnose:
|
|
7120
|
-
"diagnose:hardis:
|
|
7121
|
-
"diagnose:
|
|
7122
|
-
"diagnose:
|
|
7123
|
-
"hardis:org:
|
|
7124
|
-
"org:hardis:
|
|
7125
|
-
"org:
|
|
7126
|
-
"org:
|
|
7127
|
-
"hardis:
|
|
7128
|
-
"
|
|
7129
|
-
"
|
|
7130
|
-
"
|
|
7131
|
-
"hardis:
|
|
7132
|
-
"
|
|
7133
|
-
"
|
|
7134
|
-
"
|
|
7009
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
7010
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
7011
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
7012
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
7013
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
7014
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
7015
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
7016
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
7017
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
7018
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
7019
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
7020
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
7021
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
7022
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
7023
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
7024
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
7025
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
7026
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
7027
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
7028
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
7029
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
7030
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
7031
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
7032
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
7135
7033
|
]
|
|
7136
7034
|
},
|
|
7137
|
-
"hardis:org:diagnose:
|
|
7035
|
+
"hardis:org:diagnose:unusedusers": {
|
|
7138
7036
|
"aliases": [],
|
|
7139
7037
|
"args": {},
|
|
7140
|
-
"description": "\n## Command Behavior\n\n**Detects
|
|
7038
|
+
"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>",
|
|
7141
7039
|
"examples": [
|
|
7142
|
-
"$ sf hardis:org:diagnose:
|
|
7040
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
7041
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
7042
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
7043
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7044
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7143
7045
|
],
|
|
7144
7046
|
"flags": {
|
|
7145
7047
|
"json": {
|
|
@@ -7165,6 +7067,41 @@
|
|
|
7165
7067
|
"multiple": false,
|
|
7166
7068
|
"type": "option"
|
|
7167
7069
|
},
|
|
7070
|
+
"days": {
|
|
7071
|
+
"char": "t",
|
|
7072
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7073
|
+
"name": "days",
|
|
7074
|
+
"hasDynamicHelp": false,
|
|
7075
|
+
"multiple": false,
|
|
7076
|
+
"type": "option"
|
|
7077
|
+
},
|
|
7078
|
+
"licensetypes": {
|
|
7079
|
+
"char": "l",
|
|
7080
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
7081
|
+
"name": "licensetypes",
|
|
7082
|
+
"hasDynamicHelp": false,
|
|
7083
|
+
"multiple": false,
|
|
7084
|
+
"options": [
|
|
7085
|
+
"all",
|
|
7086
|
+
"all-crm",
|
|
7087
|
+
"all-paying"
|
|
7088
|
+
],
|
|
7089
|
+
"type": "option"
|
|
7090
|
+
},
|
|
7091
|
+
"licenseidentifiers": {
|
|
7092
|
+
"char": "i",
|
|
7093
|
+
"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",
|
|
7094
|
+
"name": "licenseidentifiers",
|
|
7095
|
+
"hasDynamicHelp": false,
|
|
7096
|
+
"multiple": false,
|
|
7097
|
+
"type": "option"
|
|
7098
|
+
},
|
|
7099
|
+
"returnactiveusers": {
|
|
7100
|
+
"description": "Inverts the command by returning the active users",
|
|
7101
|
+
"name": "returnactiveusers",
|
|
7102
|
+
"allowNo": false,
|
|
7103
|
+
"type": "boolean"
|
|
7104
|
+
},
|
|
7168
7105
|
"debug": {
|
|
7169
7106
|
"char": "d",
|
|
7170
7107
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7203,13 +7140,13 @@
|
|
|
7203
7140
|
},
|
|
7204
7141
|
"hasDynamicHelp": true,
|
|
7205
7142
|
"hiddenAliases": [],
|
|
7206
|
-
"id": "hardis:org:diagnose:
|
|
7143
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
7207
7144
|
"pluginAlias": "sfdx-hardis",
|
|
7208
7145
|
"pluginName": "sfdx-hardis",
|
|
7209
7146
|
"pluginType": "core",
|
|
7210
7147
|
"strict": true,
|
|
7211
7148
|
"enableJsonFlag": true,
|
|
7212
|
-
"title": "Detect
|
|
7149
|
+
"title": "Detect unused Users in Salesforce",
|
|
7213
7150
|
"requiresProject": false,
|
|
7214
7151
|
"isESM": true,
|
|
7215
7152
|
"relativePath": [
|
|
@@ -7218,43 +7155,44 @@
|
|
|
7218
7155
|
"hardis",
|
|
7219
7156
|
"org",
|
|
7220
7157
|
"diagnose",
|
|
7221
|
-
"
|
|
7158
|
+
"unusedusers.js"
|
|
7222
7159
|
],
|
|
7223
7160
|
"aliasPermutations": [],
|
|
7224
7161
|
"permutations": [
|
|
7225
|
-
"hardis:org:diagnose:
|
|
7226
|
-
"org:hardis:diagnose:
|
|
7227
|
-
"org:diagnose:hardis:
|
|
7228
|
-
"org:diagnose:
|
|
7229
|
-
"hardis:diagnose:org:
|
|
7230
|
-
"diagnose:hardis:org:
|
|
7231
|
-
"diagnose:org:hardis:
|
|
7232
|
-
"diagnose:org:
|
|
7233
|
-
"hardis:diagnose:
|
|
7234
|
-
"diagnose:hardis:
|
|
7235
|
-
"diagnose:
|
|
7236
|
-
"diagnose:
|
|
7237
|
-
"hardis:org:
|
|
7238
|
-
"org:hardis:
|
|
7239
|
-
"org:
|
|
7240
|
-
"org:
|
|
7241
|
-
"hardis:
|
|
7242
|
-
"
|
|
7243
|
-
"
|
|
7244
|
-
"
|
|
7245
|
-
"hardis:
|
|
7246
|
-
"
|
|
7247
|
-
"
|
|
7248
|
-
"
|
|
7162
|
+
"hardis:org:diagnose:unusedusers",
|
|
7163
|
+
"org:hardis:diagnose:unusedusers",
|
|
7164
|
+
"org:diagnose:hardis:unusedusers",
|
|
7165
|
+
"org:diagnose:unusedusers:hardis",
|
|
7166
|
+
"hardis:diagnose:org:unusedusers",
|
|
7167
|
+
"diagnose:hardis:org:unusedusers",
|
|
7168
|
+
"diagnose:org:hardis:unusedusers",
|
|
7169
|
+
"diagnose:org:unusedusers:hardis",
|
|
7170
|
+
"hardis:diagnose:unusedusers:org",
|
|
7171
|
+
"diagnose:hardis:unusedusers:org",
|
|
7172
|
+
"diagnose:unusedusers:hardis:org",
|
|
7173
|
+
"diagnose:unusedusers:org:hardis",
|
|
7174
|
+
"hardis:org:unusedusers:diagnose",
|
|
7175
|
+
"org:hardis:unusedusers:diagnose",
|
|
7176
|
+
"org:unusedusers:hardis:diagnose",
|
|
7177
|
+
"org:unusedusers:diagnose:hardis",
|
|
7178
|
+
"hardis:unusedusers:org:diagnose",
|
|
7179
|
+
"unusedusers:hardis:org:diagnose",
|
|
7180
|
+
"unusedusers:org:hardis:diagnose",
|
|
7181
|
+
"unusedusers:org:diagnose:hardis",
|
|
7182
|
+
"hardis:unusedusers:diagnose:org",
|
|
7183
|
+
"unusedusers:hardis:diagnose:org",
|
|
7184
|
+
"unusedusers:diagnose:hardis:org",
|
|
7185
|
+
"unusedusers:diagnose:org:hardis"
|
|
7249
7186
|
]
|
|
7250
7187
|
},
|
|
7251
|
-
"hardis:org:
|
|
7188
|
+
"hardis:org:generate:packagexmlfull": {
|
|
7252
7189
|
"aliases": [],
|
|
7253
7190
|
"args": {},
|
|
7254
|
-
"description": "
|
|
7191
|
+
"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",
|
|
7255
7192
|
"examples": [
|
|
7256
|
-
"$ sf hardis:org:
|
|
7257
|
-
"$ sf hardis:org:
|
|
7193
|
+
"$ sf hardis:org:generate:packagexmlfull",
|
|
7194
|
+
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
7195
|
+
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
7258
7196
|
],
|
|
7259
7197
|
"flags": {
|
|
7260
7198
|
"json": {
|
|
@@ -7273,21 +7211,12 @@
|
|
|
7273
7211
|
"type": "option"
|
|
7274
7212
|
},
|
|
7275
7213
|
"outputfile": {
|
|
7276
|
-
"
|
|
7277
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7214
|
+
"description": "Output package.xml file",
|
|
7278
7215
|
"name": "outputfile",
|
|
7279
7216
|
"hasDynamicHelp": false,
|
|
7280
7217
|
"multiple": false,
|
|
7281
7218
|
"type": "option"
|
|
7282
7219
|
},
|
|
7283
|
-
"days": {
|
|
7284
|
-
"char": "t",
|
|
7285
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7286
|
-
"name": "days",
|
|
7287
|
-
"hasDynamicHelp": false,
|
|
7288
|
-
"multiple": false,
|
|
7289
|
-
"type": "option"
|
|
7290
|
-
},
|
|
7291
7220
|
"debug": {
|
|
7292
7221
|
"char": "d",
|
|
7293
7222
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7295,6 +7224,13 @@
|
|
|
7295
7224
|
"allowNo": false,
|
|
7296
7225
|
"type": "boolean"
|
|
7297
7226
|
},
|
|
7227
|
+
"no-prompt": {
|
|
7228
|
+
"char": "n",
|
|
7229
|
+
"description": "Do not prompt for org username, use the default one",
|
|
7230
|
+
"name": "no-prompt",
|
|
7231
|
+
"allowNo": false,
|
|
7232
|
+
"type": "boolean"
|
|
7233
|
+
},
|
|
7298
7234
|
"websocket": {
|
|
7299
7235
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7300
7236
|
"name": "websocket",
|
|
@@ -7326,13 +7262,13 @@
|
|
|
7326
7262
|
},
|
|
7327
7263
|
"hasDynamicHelp": true,
|
|
7328
7264
|
"hiddenAliases": [],
|
|
7329
|
-
"id": "hardis:org:
|
|
7265
|
+
"id": "hardis:org:generate:packagexmlfull",
|
|
7330
7266
|
"pluginAlias": "sfdx-hardis",
|
|
7331
7267
|
"pluginName": "sfdx-hardis",
|
|
7332
7268
|
"pluginType": "core",
|
|
7333
7269
|
"strict": true,
|
|
7334
7270
|
"enableJsonFlag": true,
|
|
7335
|
-
"title": "
|
|
7271
|
+
"title": "Generate Full Org package.xml",
|
|
7336
7272
|
"requiresProject": false,
|
|
7337
7273
|
"isESM": true,
|
|
7338
7274
|
"relativePath": [
|
|
@@ -7340,43 +7276,43 @@
|
|
|
7340
7276
|
"commands",
|
|
7341
7277
|
"hardis",
|
|
7342
7278
|
"org",
|
|
7343
|
-
"
|
|
7344
|
-
"
|
|
7279
|
+
"generate",
|
|
7280
|
+
"packagexmlfull.js"
|
|
7345
7281
|
],
|
|
7346
7282
|
"aliasPermutations": [],
|
|
7347
7283
|
"permutations": [
|
|
7348
|
-
"hardis:org:
|
|
7349
|
-
"org:hardis:
|
|
7350
|
-
"org:
|
|
7351
|
-
"org:
|
|
7352
|
-
"hardis:
|
|
7353
|
-
"
|
|
7354
|
-
"
|
|
7355
|
-
"
|
|
7356
|
-
"hardis:
|
|
7357
|
-
"
|
|
7358
|
-
"
|
|
7359
|
-
"
|
|
7360
|
-
"hardis:org:
|
|
7361
|
-
"org:hardis:
|
|
7362
|
-
"org:
|
|
7363
|
-
"org:
|
|
7364
|
-
"hardis:
|
|
7365
|
-
"
|
|
7366
|
-
"
|
|
7367
|
-
"
|
|
7368
|
-
"hardis:
|
|
7369
|
-
"
|
|
7370
|
-
"
|
|
7371
|
-
"
|
|
7284
|
+
"hardis:org:generate:packagexmlfull",
|
|
7285
|
+
"org:hardis:generate:packagexmlfull",
|
|
7286
|
+
"org:generate:hardis:packagexmlfull",
|
|
7287
|
+
"org:generate:packagexmlfull:hardis",
|
|
7288
|
+
"hardis:generate:org:packagexmlfull",
|
|
7289
|
+
"generate:hardis:org:packagexmlfull",
|
|
7290
|
+
"generate:org:hardis:packagexmlfull",
|
|
7291
|
+
"generate:org:packagexmlfull:hardis",
|
|
7292
|
+
"hardis:generate:packagexmlfull:org",
|
|
7293
|
+
"generate:hardis:packagexmlfull:org",
|
|
7294
|
+
"generate:packagexmlfull:hardis:org",
|
|
7295
|
+
"generate:packagexmlfull:org:hardis",
|
|
7296
|
+
"hardis:org:packagexmlfull:generate",
|
|
7297
|
+
"org:hardis:packagexmlfull:generate",
|
|
7298
|
+
"org:packagexmlfull:hardis:generate",
|
|
7299
|
+
"org:packagexmlfull:generate:hardis",
|
|
7300
|
+
"hardis:packagexmlfull:org:generate",
|
|
7301
|
+
"packagexmlfull:hardis:org:generate",
|
|
7302
|
+
"packagexmlfull:org:hardis:generate",
|
|
7303
|
+
"packagexmlfull:org:generate:hardis",
|
|
7304
|
+
"hardis:packagexmlfull:generate:org",
|
|
7305
|
+
"packagexmlfull:hardis:generate:org",
|
|
7306
|
+
"packagexmlfull:generate:hardis:org",
|
|
7307
|
+
"packagexmlfull:generate:org:hardis"
|
|
7372
7308
|
]
|
|
7373
7309
|
},
|
|
7374
|
-
"hardis:org:
|
|
7310
|
+
"hardis:org:monitor:all": {
|
|
7375
7311
|
"aliases": [],
|
|
7376
7312
|
"args": {},
|
|
7377
|
-
"description": "
|
|
7313
|
+
"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",
|
|
7378
7314
|
"examples": [
|
|
7379
|
-
"$ sf hardis:org:
|
|
7315
|
+
"$ sf hardis:org:monitor:all"
|
|
7380
7316
|
],
|
|
7381
7317
|
"flags": {
|
|
7382
7318
|
"json": {
|
|
@@ -7394,14 +7330,6 @@
|
|
|
7394
7330
|
"multiple": false,
|
|
7395
7331
|
"type": "option"
|
|
7396
7332
|
},
|
|
7397
|
-
"outputfile": {
|
|
7398
|
-
"char": "f",
|
|
7399
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7400
|
-
"name": "outputfile",
|
|
7401
|
-
"hasDynamicHelp": false,
|
|
7402
|
-
"multiple": false,
|
|
7403
|
-
"type": "option"
|
|
7404
|
-
},
|
|
7405
7333
|
"debug": {
|
|
7406
7334
|
"char": "d",
|
|
7407
7335
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7440,75 +7368,159 @@
|
|
|
7440
7368
|
},
|
|
7441
7369
|
"hasDynamicHelp": true,
|
|
7442
7370
|
"hiddenAliases": [],
|
|
7443
|
-
"id": "hardis:org:
|
|
7371
|
+
"id": "hardis:org:monitor:all",
|
|
7444
7372
|
"pluginAlias": "sfdx-hardis",
|
|
7445
7373
|
"pluginName": "sfdx-hardis",
|
|
7446
7374
|
"pluginType": "core",
|
|
7447
7375
|
"strict": true,
|
|
7448
7376
|
"enableJsonFlag": true,
|
|
7449
|
-
"title": "
|
|
7450
|
-
"
|
|
7451
|
-
|
|
7452
|
-
|
|
7453
|
-
|
|
7454
|
-
|
|
7455
|
-
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7377
|
+
"title": "Monitor org",
|
|
7378
|
+
"monitoringCommandsDefault": [
|
|
7379
|
+
{
|
|
7380
|
+
"key": "AUDIT_TRAIL",
|
|
7381
|
+
"title": "Detect suspect setup actions in major org",
|
|
7382
|
+
"command": "sf hardis:org:diagnose:audittrail",
|
|
7383
|
+
"frequency": "daily"
|
|
7384
|
+
},
|
|
7385
|
+
{
|
|
7386
|
+
"key": "LEGACY_API",
|
|
7387
|
+
"title": "Detect calls to deprecated API versions",
|
|
7388
|
+
"command": "sf hardis:org:diagnose:legacyapi",
|
|
7389
|
+
"frequency": "daily"
|
|
7390
|
+
},
|
|
7391
|
+
{
|
|
7392
|
+
"key": "ORG_LIMITS",
|
|
7393
|
+
"title": "Detect if org limits are close to be reached",
|
|
7394
|
+
"command": "sf hardis:org:monitor:limits",
|
|
7395
|
+
"frequency": "daily"
|
|
7396
|
+
},
|
|
7397
|
+
{
|
|
7398
|
+
"key": "UNSECURED_CONNECTED_APPS",
|
|
7399
|
+
"title": "Detect unsecured Connected Apps in an org",
|
|
7400
|
+
"command": "sf hardis:org:diagnose:unsecure-connected-apps",
|
|
7401
|
+
"frequency": "daily"
|
|
7402
|
+
},
|
|
7403
|
+
{
|
|
7404
|
+
"key": "LICENSES",
|
|
7405
|
+
"title": "Extract licenses information",
|
|
7406
|
+
"command": "sf hardis:org:diagnose:licenses",
|
|
7407
|
+
"frequency": "weekly"
|
|
7408
|
+
},
|
|
7409
|
+
{
|
|
7410
|
+
"key": "LINT_ACCESS",
|
|
7411
|
+
"title": "Detect custom elements with no access rights defined in permission sets",
|
|
7412
|
+
"command": "sf hardis:lint:access",
|
|
7413
|
+
"frequency": "weekly"
|
|
7414
|
+
},
|
|
7415
|
+
{
|
|
7416
|
+
"key": "UNUSED_LICENSES",
|
|
7417
|
+
"title": "Detect permission set licenses that are assigned to users that do not need them",
|
|
7418
|
+
"command": "sf hardis:org:diagnose:unusedlicenses",
|
|
7419
|
+
"frequency": "weekly"
|
|
7420
|
+
},
|
|
7421
|
+
{
|
|
7422
|
+
"key": "UNUSED_USERS",
|
|
7423
|
+
"title": "Detect active users without recent logins",
|
|
7424
|
+
"command": "sf hardis:org:diagnose:unusedusers",
|
|
7425
|
+
"frequency": "weekly"
|
|
7426
|
+
},
|
|
7427
|
+
{
|
|
7428
|
+
"key": "ACTIVE_USERS",
|
|
7429
|
+
"title": "Detect active users with recent logins",
|
|
7430
|
+
"command": "sf hardis:org:diagnose:unusedusers --returnactiveusers",
|
|
7431
|
+
"frequency": "weekly"
|
|
7432
|
+
},
|
|
7433
|
+
{
|
|
7434
|
+
"key": "ORG_INFO",
|
|
7435
|
+
"title": "Get org info + SF instance info + next major upgrade date",
|
|
7436
|
+
"command": "sf hardis:org:diagnose:instanceupgrade",
|
|
7437
|
+
"frequency": "weekly"
|
|
7438
|
+
},
|
|
7439
|
+
{
|
|
7440
|
+
"key": "RELEASE_UPDATES",
|
|
7441
|
+
"title": "Gather warnings about incoming and overdue Release Updates",
|
|
7442
|
+
"command": "sf hardis:org:diagnose:releaseupdates",
|
|
7443
|
+
"frequency": "weekly"
|
|
7444
|
+
},
|
|
7445
|
+
{
|
|
7446
|
+
"key": "UNUSED_METADATAS",
|
|
7447
|
+
"title": "Detect custom labels and custom permissions that are not in use",
|
|
7448
|
+
"command": "sf hardis:lint:unusedmetadatas",
|
|
7449
|
+
"frequency": "weekly"
|
|
7450
|
+
},
|
|
7451
|
+
{
|
|
7452
|
+
"key": "UNUSED_APEX_CLASSES",
|
|
7453
|
+
"title": "Detect unused Apex classes in an org",
|
|
7454
|
+
"command": "sf hardis:org:diagnose:unused-apex-classes",
|
|
7455
|
+
"frequency": "weekly"
|
|
7456
|
+
},
|
|
7457
|
+
{
|
|
7458
|
+
"key": "CONNECTED_APPS",
|
|
7459
|
+
"title": "Detect unused Connected Apps in an org",
|
|
7460
|
+
"command": "sf hardis:org:diagnose:unused-connected-apps",
|
|
7461
|
+
"frequency": "weekly"
|
|
7462
|
+
},
|
|
7463
|
+
{
|
|
7464
|
+
"key": "METADATA_STATUS",
|
|
7465
|
+
"title": "Detect inactive metadata",
|
|
7466
|
+
"command": "sf hardis:lint:metadatastatus",
|
|
7467
|
+
"frequency": "weekly"
|
|
7468
|
+
},
|
|
7469
|
+
{
|
|
7470
|
+
"key": "MISSING_ATTRIBUTES",
|
|
7471
|
+
"title": "Detect missing description on custom field",
|
|
7472
|
+
"command": "sf hardis:lint:missingattributes",
|
|
7473
|
+
"frequency": "weekly"
|
|
7474
|
+
}
|
|
7466
7475
|
],
|
|
7467
|
-
"requiresProject":
|
|
7476
|
+
"requiresProject": true,
|
|
7477
|
+
"triggerNotification": true,
|
|
7468
7478
|
"isESM": true,
|
|
7469
7479
|
"relativePath": [
|
|
7470
7480
|
"lib",
|
|
7471
7481
|
"commands",
|
|
7472
7482
|
"hardis",
|
|
7473
7483
|
"org",
|
|
7474
|
-
"
|
|
7475
|
-
"
|
|
7484
|
+
"monitor",
|
|
7485
|
+
"all.js"
|
|
7476
7486
|
],
|
|
7477
7487
|
"aliasPermutations": [],
|
|
7478
7488
|
"permutations": [
|
|
7479
|
-
"hardis:org:
|
|
7480
|
-
"org:hardis:
|
|
7481
|
-
"org:
|
|
7482
|
-
"org:
|
|
7483
|
-
"hardis:
|
|
7484
|
-
"
|
|
7485
|
-
"
|
|
7486
|
-
"
|
|
7487
|
-
"hardis:
|
|
7488
|
-
"
|
|
7489
|
-
"
|
|
7490
|
-
"
|
|
7491
|
-
"hardis:org:
|
|
7492
|
-
"org:hardis:
|
|
7493
|
-
"org:
|
|
7494
|
-
"org:
|
|
7495
|
-
"hardis:
|
|
7496
|
-
"
|
|
7497
|
-
"
|
|
7498
|
-
"
|
|
7499
|
-
"hardis:
|
|
7500
|
-
"
|
|
7501
|
-
"
|
|
7502
|
-
"
|
|
7489
|
+
"hardis:org:monitor:all",
|
|
7490
|
+
"org:hardis:monitor:all",
|
|
7491
|
+
"org:monitor:hardis:all",
|
|
7492
|
+
"org:monitor:all:hardis",
|
|
7493
|
+
"hardis:monitor:org:all",
|
|
7494
|
+
"monitor:hardis:org:all",
|
|
7495
|
+
"monitor:org:hardis:all",
|
|
7496
|
+
"monitor:org:all:hardis",
|
|
7497
|
+
"hardis:monitor:all:org",
|
|
7498
|
+
"monitor:hardis:all:org",
|
|
7499
|
+
"monitor:all:hardis:org",
|
|
7500
|
+
"monitor:all:org:hardis",
|
|
7501
|
+
"hardis:org:all:monitor",
|
|
7502
|
+
"org:hardis:all:monitor",
|
|
7503
|
+
"org:all:hardis:monitor",
|
|
7504
|
+
"org:all:monitor:hardis",
|
|
7505
|
+
"hardis:all:org:monitor",
|
|
7506
|
+
"all:hardis:org:monitor",
|
|
7507
|
+
"all:org:hardis:monitor",
|
|
7508
|
+
"all:org:monitor:hardis",
|
|
7509
|
+
"hardis:all:monitor:org",
|
|
7510
|
+
"all:hardis:monitor:org",
|
|
7511
|
+
"all:monitor:hardis:org",
|
|
7512
|
+
"all:monitor:org:hardis"
|
|
7503
7513
|
]
|
|
7504
7514
|
},
|
|
7505
|
-
"hardis:org:
|
|
7515
|
+
"hardis:org:monitor:backup": {
|
|
7506
7516
|
"aliases": [],
|
|
7507
7517
|
"args": {},
|
|
7508
|
-
"description": "
|
|
7518
|
+
"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",
|
|
7509
7519
|
"examples": [
|
|
7510
|
-
"$ sf hardis:org:
|
|
7511
|
-
"$ sf hardis:org:
|
|
7520
|
+
"$ sf hardis:org:monitor:backup",
|
|
7521
|
+
"$ sf hardis:org:monitor:backup --full",
|
|
7522
|
+
"$ sf hardis:org:monitor:backup --full --exclude-namespaces",
|
|
7523
|
+
"$ sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters"
|
|
7512
7524
|
],
|
|
7513
7525
|
"flags": {
|
|
7514
7526
|
"json": {
|
|
@@ -7526,6 +7538,49 @@
|
|
|
7526
7538
|
"multiple": false,
|
|
7527
7539
|
"type": "option"
|
|
7528
7540
|
},
|
|
7541
|
+
"full": {
|
|
7542
|
+
"description": "Dot not take in account filtering using package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES. Efficient but much much slower !",
|
|
7543
|
+
"name": "full",
|
|
7544
|
+
"allowNo": false,
|
|
7545
|
+
"type": "boolean"
|
|
7546
|
+
},
|
|
7547
|
+
"max-by-chunk": {
|
|
7548
|
+
"char": "m",
|
|
7549
|
+
"description": "If mode --full is activated, maximum number of metadatas in a package.xml chunk",
|
|
7550
|
+
"name": "max-by-chunk",
|
|
7551
|
+
"default": 3000,
|
|
7552
|
+
"hasDynamicHelp": false,
|
|
7553
|
+
"multiple": false,
|
|
7554
|
+
"type": "option"
|
|
7555
|
+
},
|
|
7556
|
+
"exclude-namespaces": {
|
|
7557
|
+
"char": "e",
|
|
7558
|
+
"description": "If mode --full is activated, exclude namespaced metadatas",
|
|
7559
|
+
"name": "exclude-namespaces",
|
|
7560
|
+
"allowNo": false,
|
|
7561
|
+
"type": "boolean"
|
|
7562
|
+
},
|
|
7563
|
+
"full-apply-filters": {
|
|
7564
|
+
"char": "z",
|
|
7565
|
+
"description": "If mode --full is activated, apply filters of manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES anyway",
|
|
7566
|
+
"name": "full-apply-filters",
|
|
7567
|
+
"allowNo": false,
|
|
7568
|
+
"type": "boolean"
|
|
7569
|
+
},
|
|
7570
|
+
"start-chunk": {
|
|
7571
|
+
"description": "Use this parameter to troubleshoot a specific chunk. It will be used as the first chunk to retrieve",
|
|
7572
|
+
"name": "start-chunk",
|
|
7573
|
+
"default": 1,
|
|
7574
|
+
"hasDynamicHelp": false,
|
|
7575
|
+
"multiple": false,
|
|
7576
|
+
"type": "option"
|
|
7577
|
+
},
|
|
7578
|
+
"skip-doc": {
|
|
7579
|
+
"description": "Skip the generation of project documentation at the end of the command",
|
|
7580
|
+
"name": "skip-doc",
|
|
7581
|
+
"allowNo": false,
|
|
7582
|
+
"type": "boolean"
|
|
7583
|
+
},
|
|
7529
7584
|
"outputfile": {
|
|
7530
7585
|
"char": "f",
|
|
7531
7586
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -7572,79 +7627,58 @@
|
|
|
7572
7627
|
},
|
|
7573
7628
|
"hasDynamicHelp": true,
|
|
7574
7629
|
"hiddenAliases": [],
|
|
7575
|
-
"id": "hardis:org:
|
|
7630
|
+
"id": "hardis:org:monitor:backup",
|
|
7576
7631
|
"pluginAlias": "sfdx-hardis",
|
|
7577
7632
|
"pluginName": "sfdx-hardis",
|
|
7578
7633
|
"pluginType": "core",
|
|
7579
7634
|
"strict": true,
|
|
7580
7635
|
"enableJsonFlag": true,
|
|
7581
|
-
"title": "
|
|
7582
|
-
"requiresProject":
|
|
7583
|
-
"
|
|
7584
|
-
"Sales_User"
|
|
7585
|
-
],
|
|
7586
|
-
"permSetsPermSetLicenses": [
|
|
7587
|
-
{
|
|
7588
|
-
"permSet": "Sales_User",
|
|
7589
|
-
"permSetLicense": "SalesUserPsl"
|
|
7590
|
-
}
|
|
7591
|
-
],
|
|
7592
|
-
"profilesPermissionSetLicenses": [
|
|
7593
|
-
{
|
|
7594
|
-
"profile": "Salesforce API Only",
|
|
7595
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
7596
|
-
}
|
|
7597
|
-
],
|
|
7598
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
7599
|
-
"IdentityConnect"
|
|
7600
|
-
],
|
|
7636
|
+
"title": "Backup DX sources",
|
|
7637
|
+
"requiresProject": true,
|
|
7638
|
+
"triggerNotification": true,
|
|
7601
7639
|
"isESM": true,
|
|
7602
7640
|
"relativePath": [
|
|
7603
7641
|
"lib",
|
|
7604
7642
|
"commands",
|
|
7605
7643
|
"hardis",
|
|
7606
7644
|
"org",
|
|
7607
|
-
"
|
|
7608
|
-
"
|
|
7645
|
+
"monitor",
|
|
7646
|
+
"backup.js"
|
|
7609
7647
|
],
|
|
7610
7648
|
"aliasPermutations": [],
|
|
7611
7649
|
"permutations": [
|
|
7612
|
-
"hardis:org:
|
|
7613
|
-
"org:hardis:
|
|
7614
|
-
"org:
|
|
7615
|
-
"org:
|
|
7616
|
-
"hardis:
|
|
7617
|
-
"
|
|
7618
|
-
"
|
|
7619
|
-
"
|
|
7620
|
-
"hardis:
|
|
7621
|
-
"
|
|
7622
|
-
"
|
|
7623
|
-
"
|
|
7624
|
-
"hardis:org:
|
|
7625
|
-
"org:hardis:
|
|
7626
|
-
"org:
|
|
7627
|
-
"org:
|
|
7628
|
-
"hardis:
|
|
7629
|
-
"
|
|
7630
|
-
"
|
|
7631
|
-
"
|
|
7632
|
-
"hardis:
|
|
7633
|
-
"
|
|
7634
|
-
"
|
|
7635
|
-
"
|
|
7650
|
+
"hardis:org:monitor:backup",
|
|
7651
|
+
"org:hardis:monitor:backup",
|
|
7652
|
+
"org:monitor:hardis:backup",
|
|
7653
|
+
"org:monitor:backup:hardis",
|
|
7654
|
+
"hardis:monitor:org:backup",
|
|
7655
|
+
"monitor:hardis:org:backup",
|
|
7656
|
+
"monitor:org:hardis:backup",
|
|
7657
|
+
"monitor:org:backup:hardis",
|
|
7658
|
+
"hardis:monitor:backup:org",
|
|
7659
|
+
"monitor:hardis:backup:org",
|
|
7660
|
+
"monitor:backup:hardis:org",
|
|
7661
|
+
"monitor:backup:org:hardis",
|
|
7662
|
+
"hardis:org:backup:monitor",
|
|
7663
|
+
"org:hardis:backup:monitor",
|
|
7664
|
+
"org:backup:hardis:monitor",
|
|
7665
|
+
"org:backup:monitor:hardis",
|
|
7666
|
+
"hardis:backup:org:monitor",
|
|
7667
|
+
"backup:hardis:org:monitor",
|
|
7668
|
+
"backup:org:hardis:monitor",
|
|
7669
|
+
"backup:org:monitor:hardis",
|
|
7670
|
+
"hardis:backup:monitor:org",
|
|
7671
|
+
"backup:hardis:monitor:org",
|
|
7672
|
+
"backup:monitor:hardis:org",
|
|
7673
|
+
"backup:monitor:org:hardis"
|
|
7636
7674
|
]
|
|
7637
7675
|
},
|
|
7638
|
-
"hardis:org:
|
|
7676
|
+
"hardis:org:monitor:limits": {
|
|
7639
7677
|
"aliases": [],
|
|
7640
7678
|
"args": {},
|
|
7641
|
-
"description": "\n## Command Behavior\n\n**
|
|
7679
|
+
"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",
|
|
7642
7680
|
"examples": [
|
|
7643
|
-
"$ sf hardis:org:
|
|
7644
|
-
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
7645
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
7646
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7647
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7681
|
+
"$ sf hardis:org:monitor:limits"
|
|
7648
7682
|
],
|
|
7649
7683
|
"flags": {
|
|
7650
7684
|
"json": {
|
|
@@ -7670,41 +7704,6 @@
|
|
|
7670
7704
|
"multiple": false,
|
|
7671
7705
|
"type": "option"
|
|
7672
7706
|
},
|
|
7673
|
-
"days": {
|
|
7674
|
-
"char": "t",
|
|
7675
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7676
|
-
"name": "days",
|
|
7677
|
-
"hasDynamicHelp": false,
|
|
7678
|
-
"multiple": false,
|
|
7679
|
-
"type": "option"
|
|
7680
|
-
},
|
|
7681
|
-
"licensetypes": {
|
|
7682
|
-
"char": "l",
|
|
7683
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
7684
|
-
"name": "licensetypes",
|
|
7685
|
-
"hasDynamicHelp": false,
|
|
7686
|
-
"multiple": false,
|
|
7687
|
-
"options": [
|
|
7688
|
-
"all",
|
|
7689
|
-
"all-crm",
|
|
7690
|
-
"all-paying"
|
|
7691
|
-
],
|
|
7692
|
-
"type": "option"
|
|
7693
|
-
},
|
|
7694
|
-
"licenseidentifiers": {
|
|
7695
|
-
"char": "i",
|
|
7696
|
-
"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",
|
|
7697
|
-
"name": "licenseidentifiers",
|
|
7698
|
-
"hasDynamicHelp": false,
|
|
7699
|
-
"multiple": false,
|
|
7700
|
-
"type": "option"
|
|
7701
|
-
},
|
|
7702
|
-
"returnactiveusers": {
|
|
7703
|
-
"description": "Inverts the command by returning the active users",
|
|
7704
|
-
"name": "returnactiveusers",
|
|
7705
|
-
"allowNo": false,
|
|
7706
|
-
"type": "boolean"
|
|
7707
|
-
},
|
|
7708
7707
|
"debug": {
|
|
7709
7708
|
"char": "d",
|
|
7710
7709
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7743,49 +7742,50 @@
|
|
|
7743
7742
|
},
|
|
7744
7743
|
"hasDynamicHelp": true,
|
|
7745
7744
|
"hiddenAliases": [],
|
|
7746
|
-
"id": "hardis:org:
|
|
7745
|
+
"id": "hardis:org:monitor:limits",
|
|
7747
7746
|
"pluginAlias": "sfdx-hardis",
|
|
7748
7747
|
"pluginName": "sfdx-hardis",
|
|
7749
7748
|
"pluginType": "core",
|
|
7750
7749
|
"strict": true,
|
|
7751
7750
|
"enableJsonFlag": true,
|
|
7752
|
-
"title": "
|
|
7753
|
-
"requiresProject":
|
|
7751
|
+
"title": "Check org limits",
|
|
7752
|
+
"requiresProject": true,
|
|
7753
|
+
"triggerNotification": true,
|
|
7754
7754
|
"isESM": true,
|
|
7755
7755
|
"relativePath": [
|
|
7756
7756
|
"lib",
|
|
7757
7757
|
"commands",
|
|
7758
7758
|
"hardis",
|
|
7759
7759
|
"org",
|
|
7760
|
-
"
|
|
7761
|
-
"
|
|
7760
|
+
"monitor",
|
|
7761
|
+
"limits.js"
|
|
7762
7762
|
],
|
|
7763
7763
|
"aliasPermutations": [],
|
|
7764
7764
|
"permutations": [
|
|
7765
|
-
"hardis:org:
|
|
7766
|
-
"org:hardis:
|
|
7767
|
-
"org:
|
|
7768
|
-
"org:
|
|
7769
|
-
"hardis:
|
|
7770
|
-
"
|
|
7771
|
-
"
|
|
7772
|
-
"
|
|
7773
|
-
"hardis:
|
|
7774
|
-
"
|
|
7775
|
-
"
|
|
7776
|
-
"
|
|
7777
|
-
"hardis:org:
|
|
7778
|
-
"org:hardis:
|
|
7779
|
-
"org:
|
|
7780
|
-
"org:
|
|
7781
|
-
"hardis:
|
|
7782
|
-
"
|
|
7783
|
-
"
|
|
7784
|
-
"
|
|
7785
|
-
"hardis:
|
|
7786
|
-
"
|
|
7787
|
-
"
|
|
7788
|
-
"
|
|
7765
|
+
"hardis:org:monitor:limits",
|
|
7766
|
+
"org:hardis:monitor:limits",
|
|
7767
|
+
"org:monitor:hardis:limits",
|
|
7768
|
+
"org:monitor:limits:hardis",
|
|
7769
|
+
"hardis:monitor:org:limits",
|
|
7770
|
+
"monitor:hardis:org:limits",
|
|
7771
|
+
"monitor:org:hardis:limits",
|
|
7772
|
+
"monitor:org:limits:hardis",
|
|
7773
|
+
"hardis:monitor:limits:org",
|
|
7774
|
+
"monitor:hardis:limits:org",
|
|
7775
|
+
"monitor:limits:hardis:org",
|
|
7776
|
+
"monitor:limits:org:hardis",
|
|
7777
|
+
"hardis:org:limits:monitor",
|
|
7778
|
+
"org:hardis:limits:monitor",
|
|
7779
|
+
"org:limits:hardis:monitor",
|
|
7780
|
+
"org:limits:monitor:hardis",
|
|
7781
|
+
"hardis:limits:org:monitor",
|
|
7782
|
+
"limits:hardis:org:monitor",
|
|
7783
|
+
"limits:org:hardis:monitor",
|
|
7784
|
+
"limits:org:monitor:hardis",
|
|
7785
|
+
"hardis:limits:monitor:org",
|
|
7786
|
+
"limits:hardis:monitor:org",
|
|
7787
|
+
"limits:monitor:hardis:org",
|
|
7788
|
+
"limits:monitor:org:hardis"
|
|
7789
7789
|
]
|
|
7790
7790
|
},
|
|
7791
7791
|
"hardis:org:purge:apexlog": {
|
|
@@ -15369,5 +15369,5 @@
|
|
|
15369
15369
|
]
|
|
15370
15370
|
}
|
|
15371
15371
|
},
|
|
15372
|
-
"version": "6.
|
|
15372
|
+
"version": "6.8.0"
|
|
15373
15373
|
}
|