sfdx-hardis 6.4.4 → 6.5.1
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/CHANGELOG.md +18 -3
- package/defaults/ci/.gitlab-ci.yml +1 -1
- package/defaults/ci/Jenkinsfile +3 -1
- package/defaults/lintonly/.gitlab-ci.yml +1 -1
- package/defaults/monitoring/.gitlab-ci.yml +1 -1
- package/lib/commands/hardis/doc/project2markdown.js +179 -15
- package/lib/commands/hardis/doc/project2markdown.js.map +1 -1
- package/lib/commands/hardis/org/files/export.js +56 -4
- package/lib/commands/hardis/org/files/export.js.map +1 -1
- package/lib/commands/hardis/org/monitor/backup.js +2 -0
- package/lib/commands/hardis/org/monitor/backup.js.map +1 -1
- package/lib/common/utils/deployUtils.js +5 -1
- package/lib/common/utils/deployUtils.js.map +1 -1
- package/lib/common/utils/filesUtils.d.ts +34 -14
- package/lib/common/utils/filesUtils.js +260 -70
- package/lib/common/utils/filesUtils.js.map +1 -1
- package/lib/common/utils/index.js +32 -4
- package/lib/common/utils/index.js.map +1 -1
- package/lib/common/utils/limitUtils.d.ts +42 -0
- package/lib/common/utils/limitUtils.js +163 -0
- package/lib/common/utils/limitUtils.js.map +1 -0
- package/oclif.lock +22 -22
- package/oclif.manifest.json +1068 -1061
- package/package.json +5 -5
package/oclif.manifest.json
CHANGED
|
@@ -5152,12 +5152,15 @@
|
|
|
5152
5152
|
"monitoring:configure:org:hardis"
|
|
5153
5153
|
]
|
|
5154
5154
|
},
|
|
5155
|
-
"hardis:org:
|
|
5155
|
+
"hardis:org:diagnose:audittrail": {
|
|
5156
5156
|
"aliases": [],
|
|
5157
5157
|
"args": {},
|
|
5158
|
-
"description": "
|
|
5158
|
+
"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",
|
|
5159
5159
|
"examples": [
|
|
5160
|
-
"$ sf hardis:org:
|
|
5160
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5161
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5162
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5163
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5161
5164
|
],
|
|
5162
5165
|
"flags": {
|
|
5163
5166
|
"json": {
|
|
@@ -5175,10 +5178,26 @@
|
|
|
5175
5178
|
"multiple": false,
|
|
5176
5179
|
"type": "option"
|
|
5177
5180
|
},
|
|
5178
|
-
"
|
|
5179
|
-
"char": "
|
|
5180
|
-
"description": "
|
|
5181
|
-
"name": "
|
|
5181
|
+
"excludeusers": {
|
|
5182
|
+
"char": "e",
|
|
5183
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5184
|
+
"name": "excludeusers",
|
|
5185
|
+
"hasDynamicHelp": false,
|
|
5186
|
+
"multiple": false,
|
|
5187
|
+
"type": "option"
|
|
5188
|
+
},
|
|
5189
|
+
"lastndays": {
|
|
5190
|
+
"char": "t",
|
|
5191
|
+
"description": "Number of days to extract from today (included)",
|
|
5192
|
+
"name": "lastndays",
|
|
5193
|
+
"hasDynamicHelp": false,
|
|
5194
|
+
"multiple": false,
|
|
5195
|
+
"type": "option"
|
|
5196
|
+
},
|
|
5197
|
+
"outputfile": {
|
|
5198
|
+
"char": "f",
|
|
5199
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5200
|
+
"name": "outputfile",
|
|
5182
5201
|
"hasDynamicHelp": false,
|
|
5183
5202
|
"multiple": false,
|
|
5184
5203
|
"type": "option"
|
|
@@ -5221,62 +5240,57 @@
|
|
|
5221
5240
|
},
|
|
5222
5241
|
"hasDynamicHelp": true,
|
|
5223
5242
|
"hiddenAliases": [],
|
|
5224
|
-
"id": "hardis:org:
|
|
5243
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5225
5244
|
"pluginAlias": "sfdx-hardis",
|
|
5226
5245
|
"pluginName": "sfdx-hardis",
|
|
5227
5246
|
"pluginType": "core",
|
|
5228
5247
|
"strict": true,
|
|
5229
5248
|
"enableJsonFlag": true,
|
|
5230
|
-
"title": "
|
|
5249
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5231
5250
|
"requiresProject": false,
|
|
5232
|
-
"requiresSfdxPlugins": [
|
|
5233
|
-
"sfdmu"
|
|
5234
|
-
],
|
|
5235
5251
|
"isESM": true,
|
|
5236
5252
|
"relativePath": [
|
|
5237
5253
|
"lib",
|
|
5238
5254
|
"commands",
|
|
5239
5255
|
"hardis",
|
|
5240
5256
|
"org",
|
|
5241
|
-
"
|
|
5242
|
-
"
|
|
5257
|
+
"diagnose",
|
|
5258
|
+
"audittrail.js"
|
|
5243
5259
|
],
|
|
5244
5260
|
"aliasPermutations": [],
|
|
5245
5261
|
"permutations": [
|
|
5246
|
-
"hardis:org:
|
|
5247
|
-
"org:hardis:
|
|
5248
|
-
"org:
|
|
5249
|
-
"org:
|
|
5250
|
-
"hardis:
|
|
5251
|
-
"
|
|
5252
|
-
"
|
|
5253
|
-
"
|
|
5254
|
-
"hardis:
|
|
5255
|
-
"
|
|
5256
|
-
"
|
|
5257
|
-
"
|
|
5258
|
-
"hardis:org:
|
|
5259
|
-
"org:hardis:
|
|
5260
|
-
"org:
|
|
5261
|
-
"org:
|
|
5262
|
-
"hardis:
|
|
5263
|
-
"
|
|
5264
|
-
"
|
|
5265
|
-
"
|
|
5266
|
-
"hardis:
|
|
5267
|
-
"
|
|
5268
|
-
"
|
|
5269
|
-
"
|
|
5262
|
+
"hardis:org:diagnose:audittrail",
|
|
5263
|
+
"org:hardis:diagnose:audittrail",
|
|
5264
|
+
"org:diagnose:hardis:audittrail",
|
|
5265
|
+
"org:diagnose:audittrail:hardis",
|
|
5266
|
+
"hardis:diagnose:org:audittrail",
|
|
5267
|
+
"diagnose:hardis:org:audittrail",
|
|
5268
|
+
"diagnose:org:hardis:audittrail",
|
|
5269
|
+
"diagnose:org:audittrail:hardis",
|
|
5270
|
+
"hardis:diagnose:audittrail:org",
|
|
5271
|
+
"diagnose:hardis:audittrail:org",
|
|
5272
|
+
"diagnose:audittrail:hardis:org",
|
|
5273
|
+
"diagnose:audittrail:org:hardis",
|
|
5274
|
+
"hardis:org:audittrail:diagnose",
|
|
5275
|
+
"org:hardis:audittrail:diagnose",
|
|
5276
|
+
"org:audittrail:hardis:diagnose",
|
|
5277
|
+
"org:audittrail:diagnose:hardis",
|
|
5278
|
+
"hardis:audittrail:org:diagnose",
|
|
5279
|
+
"audittrail:hardis:org:diagnose",
|
|
5280
|
+
"audittrail:org:hardis:diagnose",
|
|
5281
|
+
"audittrail:org:diagnose:hardis",
|
|
5282
|
+
"hardis:audittrail:diagnose:org",
|
|
5283
|
+
"audittrail:hardis:diagnose:org",
|
|
5284
|
+
"audittrail:diagnose:hardis:org",
|
|
5285
|
+
"audittrail:diagnose:org:hardis"
|
|
5270
5286
|
]
|
|
5271
5287
|
},
|
|
5272
|
-
"hardis:org:
|
|
5288
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5273
5289
|
"aliases": [],
|
|
5274
5290
|
"args": {},
|
|
5275
|
-
"description": "\n## Command Behavior\n\n**
|
|
5291
|
+
"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",
|
|
5276
5292
|
"examples": [
|
|
5277
|
-
"$ sf hardis:org:
|
|
5278
|
-
"$ sf hardis:org:data:export --project-name MyDataProject --target-org my-org@example.com",
|
|
5279
|
-
"$ sf hardis:org:data:export --path ./scripts/data/MyDataProject --no-prompt --target-org my-org@example.com"
|
|
5293
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5280
5294
|
],
|
|
5281
5295
|
"flags": {
|
|
5282
5296
|
"json": {
|
|
@@ -5294,29 +5308,6 @@
|
|
|
5294
5308
|
"multiple": false,
|
|
5295
5309
|
"type": "option"
|
|
5296
5310
|
},
|
|
5297
|
-
"project-name": {
|
|
5298
|
-
"char": "n",
|
|
5299
|
-
"description": "Name of the sfdmu project to use (if not defined, you will be prompted to select one)",
|
|
5300
|
-
"name": "project-name",
|
|
5301
|
-
"hasDynamicHelp": false,
|
|
5302
|
-
"multiple": false,
|
|
5303
|
-
"type": "option"
|
|
5304
|
-
},
|
|
5305
|
-
"path": {
|
|
5306
|
-
"char": "p",
|
|
5307
|
-
"description": "Path to the sfdmu workspace folder",
|
|
5308
|
-
"name": "path",
|
|
5309
|
-
"hasDynamicHelp": false,
|
|
5310
|
-
"multiple": false,
|
|
5311
|
-
"type": "option"
|
|
5312
|
-
},
|
|
5313
|
-
"no-prompt": {
|
|
5314
|
-
"char": "r",
|
|
5315
|
-
"description": "Do not prompt for Org, use default org",
|
|
5316
|
-
"name": "no-prompt",
|
|
5317
|
-
"allowNo": false,
|
|
5318
|
-
"type": "boolean"
|
|
5319
|
-
},
|
|
5320
5311
|
"debug": {
|
|
5321
5312
|
"char": "d",
|
|
5322
5313
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5355,63 +5346,60 @@
|
|
|
5355
5346
|
},
|
|
5356
5347
|
"hasDynamicHelp": true,
|
|
5357
5348
|
"hiddenAliases": [],
|
|
5358
|
-
"id": "hardis:org:
|
|
5349
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
5359
5350
|
"pluginAlias": "sfdx-hardis",
|
|
5360
5351
|
"pluginName": "sfdx-hardis",
|
|
5361
5352
|
"pluginType": "core",
|
|
5362
5353
|
"strict": true,
|
|
5363
5354
|
"enableJsonFlag": true,
|
|
5364
|
-
"title": "
|
|
5355
|
+
"title": "Get Instance Upgrade date",
|
|
5365
5356
|
"requiresProject": false,
|
|
5366
|
-
"requiresSfdxPlugins": [
|
|
5367
|
-
"sfdmu"
|
|
5368
|
-
],
|
|
5369
5357
|
"isESM": true,
|
|
5370
5358
|
"relativePath": [
|
|
5371
5359
|
"lib",
|
|
5372
5360
|
"commands",
|
|
5373
5361
|
"hardis",
|
|
5374
5362
|
"org",
|
|
5375
|
-
"
|
|
5376
|
-
"
|
|
5363
|
+
"diagnose",
|
|
5364
|
+
"instanceupgrade.js"
|
|
5377
5365
|
],
|
|
5378
5366
|
"aliasPermutations": [],
|
|
5379
5367
|
"permutations": [
|
|
5380
|
-
"hardis:org:
|
|
5381
|
-
"org:hardis:
|
|
5382
|
-
"org:
|
|
5383
|
-
"org:
|
|
5384
|
-
"hardis:
|
|
5385
|
-
"
|
|
5386
|
-
"
|
|
5387
|
-
"
|
|
5388
|
-
"hardis:
|
|
5389
|
-
"
|
|
5390
|
-
"
|
|
5391
|
-
"
|
|
5392
|
-
"hardis:org:
|
|
5393
|
-
"org:hardis:
|
|
5394
|
-
"org:
|
|
5395
|
-
"org:
|
|
5396
|
-
"hardis:
|
|
5397
|
-
"
|
|
5398
|
-
"
|
|
5399
|
-
"
|
|
5400
|
-
"hardis:
|
|
5401
|
-
"
|
|
5402
|
-
"
|
|
5403
|
-
"
|
|
5368
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
5369
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
5370
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
5371
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
5372
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
5373
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
5374
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
5375
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
5376
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
5377
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
5378
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
5379
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
5380
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
5381
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
5382
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
5383
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
5384
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
5385
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
5386
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
5387
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
5388
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
5389
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
5390
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
5391
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
5404
5392
|
]
|
|
5405
5393
|
},
|
|
5406
|
-
"hardis:org:
|
|
5394
|
+
"hardis:org:diagnose:legacyapi": {
|
|
5407
5395
|
"aliases": [],
|
|
5408
5396
|
"args": {},
|
|
5409
|
-
"description": "
|
|
5397
|
+
"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",
|
|
5410
5398
|
"examples": [
|
|
5411
|
-
"$ sf hardis:org:
|
|
5412
|
-
"$ sf hardis:org:
|
|
5413
|
-
"$ sf hardis:org:
|
|
5414
|
-
"$
|
|
5399
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
5400
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
5401
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
5402
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5415
5403
|
],
|
|
5416
5404
|
"flags": {
|
|
5417
5405
|
"json": {
|
|
@@ -5429,28 +5417,31 @@
|
|
|
5429
5417
|
"multiple": false,
|
|
5430
5418
|
"type": "option"
|
|
5431
5419
|
},
|
|
5432
|
-
"
|
|
5433
|
-
"char": "
|
|
5434
|
-
"description": "
|
|
5435
|
-
"name": "
|
|
5420
|
+
"eventtype": {
|
|
5421
|
+
"char": "e",
|
|
5422
|
+
"description": "Type of EventLogFile event to analyze",
|
|
5423
|
+
"name": "eventtype",
|
|
5424
|
+
"default": "ApiTotalUsage",
|
|
5436
5425
|
"hasDynamicHelp": false,
|
|
5437
5426
|
"multiple": false,
|
|
5438
5427
|
"type": "option"
|
|
5439
5428
|
},
|
|
5440
|
-
"
|
|
5441
|
-
"char": "
|
|
5442
|
-
"description": "
|
|
5443
|
-
"name": "
|
|
5429
|
+
"limit": {
|
|
5430
|
+
"char": "l",
|
|
5431
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
5432
|
+
"name": "limit",
|
|
5433
|
+
"default": 999,
|
|
5444
5434
|
"hasDynamicHelp": false,
|
|
5445
5435
|
"multiple": false,
|
|
5446
5436
|
"type": "option"
|
|
5447
5437
|
},
|
|
5448
|
-
"
|
|
5449
|
-
"char": "
|
|
5450
|
-
"description": "
|
|
5451
|
-
"name": "
|
|
5452
|
-
"
|
|
5453
|
-
"
|
|
5438
|
+
"outputfile": {
|
|
5439
|
+
"char": "f",
|
|
5440
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5441
|
+
"name": "outputfile",
|
|
5442
|
+
"hasDynamicHelp": false,
|
|
5443
|
+
"multiple": false,
|
|
5444
|
+
"type": "option"
|
|
5454
5445
|
},
|
|
5455
5446
|
"debug": {
|
|
5456
5447
|
"char": "d",
|
|
@@ -5490,60 +5481,57 @@
|
|
|
5490
5481
|
},
|
|
5491
5482
|
"hasDynamicHelp": true,
|
|
5492
5483
|
"hiddenAliases": [],
|
|
5493
|
-
"id": "hardis:org:
|
|
5484
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
5494
5485
|
"pluginAlias": "sfdx-hardis",
|
|
5495
5486
|
"pluginName": "sfdx-hardis",
|
|
5496
5487
|
"pluginType": "core",
|
|
5497
5488
|
"strict": true,
|
|
5498
5489
|
"enableJsonFlag": true,
|
|
5499
|
-
"title": "
|
|
5490
|
+
"title": "Check for legacy API use",
|
|
5500
5491
|
"requiresProject": false,
|
|
5501
|
-
"requiresSfdxPlugins": [
|
|
5502
|
-
"sfdmu"
|
|
5503
|
-
],
|
|
5504
5492
|
"isESM": true,
|
|
5505
5493
|
"relativePath": [
|
|
5506
5494
|
"lib",
|
|
5507
5495
|
"commands",
|
|
5508
5496
|
"hardis",
|
|
5509
5497
|
"org",
|
|
5510
|
-
"
|
|
5511
|
-
"
|
|
5498
|
+
"diagnose",
|
|
5499
|
+
"legacyapi.js"
|
|
5512
5500
|
],
|
|
5513
5501
|
"aliasPermutations": [],
|
|
5514
5502
|
"permutations": [
|
|
5515
|
-
"hardis:org:
|
|
5516
|
-
"org:hardis:
|
|
5517
|
-
"org:
|
|
5518
|
-
"org:
|
|
5519
|
-
"hardis:
|
|
5520
|
-
"
|
|
5521
|
-
"
|
|
5522
|
-
"
|
|
5523
|
-
"hardis:
|
|
5524
|
-
"
|
|
5525
|
-
"
|
|
5526
|
-
"
|
|
5527
|
-
"hardis:org:
|
|
5528
|
-
"org:hardis:
|
|
5529
|
-
"org:
|
|
5530
|
-
"org:
|
|
5531
|
-
"hardis:
|
|
5532
|
-
"
|
|
5533
|
-
"
|
|
5534
|
-
"
|
|
5535
|
-
"hardis:
|
|
5536
|
-
"
|
|
5537
|
-
"
|
|
5538
|
-
"
|
|
5503
|
+
"hardis:org:diagnose:legacyapi",
|
|
5504
|
+
"org:hardis:diagnose:legacyapi",
|
|
5505
|
+
"org:diagnose:hardis:legacyapi",
|
|
5506
|
+
"org:diagnose:legacyapi:hardis",
|
|
5507
|
+
"hardis:diagnose:org:legacyapi",
|
|
5508
|
+
"diagnose:hardis:org:legacyapi",
|
|
5509
|
+
"diagnose:org:hardis:legacyapi",
|
|
5510
|
+
"diagnose:org:legacyapi:hardis",
|
|
5511
|
+
"hardis:diagnose:legacyapi:org",
|
|
5512
|
+
"diagnose:hardis:legacyapi:org",
|
|
5513
|
+
"diagnose:legacyapi:hardis:org",
|
|
5514
|
+
"diagnose:legacyapi:org:hardis",
|
|
5515
|
+
"hardis:org:legacyapi:diagnose",
|
|
5516
|
+
"org:hardis:legacyapi:diagnose",
|
|
5517
|
+
"org:legacyapi:hardis:diagnose",
|
|
5518
|
+
"org:legacyapi:diagnose:hardis",
|
|
5519
|
+
"hardis:legacyapi:org:diagnose",
|
|
5520
|
+
"legacyapi:hardis:org:diagnose",
|
|
5521
|
+
"legacyapi:org:hardis:diagnose",
|
|
5522
|
+
"legacyapi:org:diagnose:hardis",
|
|
5523
|
+
"hardis:legacyapi:diagnose:org",
|
|
5524
|
+
"legacyapi:hardis:diagnose:org",
|
|
5525
|
+
"legacyapi:diagnose:hardis:org",
|
|
5526
|
+
"legacyapi:diagnose:org:hardis"
|
|
5539
5527
|
]
|
|
5540
5528
|
},
|
|
5541
|
-
"hardis:org:
|
|
5529
|
+
"hardis:org:diagnose:licenses": {
|
|
5542
5530
|
"aliases": [],
|
|
5543
5531
|
"args": {},
|
|
5544
|
-
"description": "\n
|
|
5532
|
+
"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",
|
|
5545
5533
|
"examples": [
|
|
5546
|
-
"$ sf hardis:org:
|
|
5534
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
5547
5535
|
],
|
|
5548
5536
|
"flags": {
|
|
5549
5537
|
"json": {
|
|
@@ -5561,40 +5549,20 @@
|
|
|
5561
5549
|
"multiple": false,
|
|
5562
5550
|
"type": "option"
|
|
5563
5551
|
},
|
|
5564
|
-
"
|
|
5565
|
-
"char": "
|
|
5566
|
-
"description": "
|
|
5567
|
-
"name": "
|
|
5568
|
-
"hasDynamicHelp": false,
|
|
5569
|
-
"multiple": false,
|
|
5570
|
-
"type": "option"
|
|
5571
|
-
},
|
|
5572
|
-
"chunksize": {
|
|
5573
|
-
"char": "c",
|
|
5574
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
5575
|
-
"name": "chunksize",
|
|
5576
|
-
"default": 1000,
|
|
5577
|
-
"hasDynamicHelp": false,
|
|
5578
|
-
"multiple": false,
|
|
5579
|
-
"type": "option"
|
|
5580
|
-
},
|
|
5581
|
-
"polltimeout": {
|
|
5582
|
-
"char": "t",
|
|
5583
|
-
"description": "Timeout in MS for Bulk API calls",
|
|
5584
|
-
"name": "polltimeout",
|
|
5585
|
-
"default": 300000,
|
|
5552
|
+
"outputfile": {
|
|
5553
|
+
"char": "f",
|
|
5554
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5555
|
+
"name": "outputfile",
|
|
5586
5556
|
"hasDynamicHelp": false,
|
|
5587
5557
|
"multiple": false,
|
|
5588
5558
|
"type": "option"
|
|
5589
5559
|
},
|
|
5590
|
-
"
|
|
5591
|
-
"char": "
|
|
5592
|
-
"description": "
|
|
5593
|
-
"name": "
|
|
5594
|
-
"
|
|
5595
|
-
"
|
|
5596
|
-
"multiple": false,
|
|
5597
|
-
"type": "option"
|
|
5560
|
+
"usedonly": {
|
|
5561
|
+
"char": "u",
|
|
5562
|
+
"description": "Filter to have only used licenses",
|
|
5563
|
+
"name": "usedonly",
|
|
5564
|
+
"allowNo": false,
|
|
5565
|
+
"type": "boolean"
|
|
5598
5566
|
},
|
|
5599
5567
|
"debug": {
|
|
5600
5568
|
"char": "d",
|
|
@@ -5634,13 +5602,13 @@
|
|
|
5634
5602
|
},
|
|
5635
5603
|
"hasDynamicHelp": true,
|
|
5636
5604
|
"hiddenAliases": [],
|
|
5637
|
-
"id": "hardis:org:
|
|
5605
|
+
"id": "hardis:org:diagnose:licenses",
|
|
5638
5606
|
"pluginAlias": "sfdx-hardis",
|
|
5639
5607
|
"pluginName": "sfdx-hardis",
|
|
5640
5608
|
"pluginType": "core",
|
|
5641
5609
|
"strict": true,
|
|
5642
5610
|
"enableJsonFlag": true,
|
|
5643
|
-
"title": "
|
|
5611
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
5644
5612
|
"requiresProject": false,
|
|
5645
5613
|
"isESM": true,
|
|
5646
5614
|
"relativePath": [
|
|
@@ -5648,43 +5616,43 @@
|
|
|
5648
5616
|
"commands",
|
|
5649
5617
|
"hardis",
|
|
5650
5618
|
"org",
|
|
5651
|
-
"
|
|
5652
|
-
"
|
|
5619
|
+
"diagnose",
|
|
5620
|
+
"licenses.js"
|
|
5653
5621
|
],
|
|
5654
5622
|
"aliasPermutations": [],
|
|
5655
5623
|
"permutations": [
|
|
5656
|
-
"hardis:org:
|
|
5657
|
-
"org:hardis:
|
|
5658
|
-
"org:
|
|
5659
|
-
"org:
|
|
5660
|
-
"hardis:
|
|
5661
|
-
"
|
|
5662
|
-
"
|
|
5663
|
-
"
|
|
5664
|
-
"hardis:
|
|
5665
|
-
"
|
|
5666
|
-
"
|
|
5667
|
-
"
|
|
5668
|
-
"hardis:org:
|
|
5669
|
-
"org:hardis:
|
|
5670
|
-
"org:
|
|
5671
|
-
"org:
|
|
5672
|
-
"hardis:
|
|
5673
|
-
"
|
|
5674
|
-
"
|
|
5675
|
-
"
|
|
5676
|
-
"hardis:
|
|
5677
|
-
"
|
|
5678
|
-
"
|
|
5679
|
-
"
|
|
5624
|
+
"hardis:org:diagnose:licenses",
|
|
5625
|
+
"org:hardis:diagnose:licenses",
|
|
5626
|
+
"org:diagnose:hardis:licenses",
|
|
5627
|
+
"org:diagnose:licenses:hardis",
|
|
5628
|
+
"hardis:diagnose:org:licenses",
|
|
5629
|
+
"diagnose:hardis:org:licenses",
|
|
5630
|
+
"diagnose:org:hardis:licenses",
|
|
5631
|
+
"diagnose:org:licenses:hardis",
|
|
5632
|
+
"hardis:diagnose:licenses:org",
|
|
5633
|
+
"diagnose:hardis:licenses:org",
|
|
5634
|
+
"diagnose:licenses:hardis:org",
|
|
5635
|
+
"diagnose:licenses:org:hardis",
|
|
5636
|
+
"hardis:org:licenses:diagnose",
|
|
5637
|
+
"org:hardis:licenses:diagnose",
|
|
5638
|
+
"org:licenses:hardis:diagnose",
|
|
5639
|
+
"org:licenses:diagnose:hardis",
|
|
5640
|
+
"hardis:licenses:org:diagnose",
|
|
5641
|
+
"licenses:hardis:org:diagnose",
|
|
5642
|
+
"licenses:org:hardis:diagnose",
|
|
5643
|
+
"licenses:org:diagnose:hardis",
|
|
5644
|
+
"hardis:licenses:diagnose:org",
|
|
5645
|
+
"licenses:hardis:diagnose:org",
|
|
5646
|
+
"licenses:diagnose:hardis:org",
|
|
5647
|
+
"licenses:diagnose:org:hardis"
|
|
5680
5648
|
]
|
|
5681
5649
|
},
|
|
5682
|
-
"hardis:org:
|
|
5650
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
5683
5651
|
"aliases": [],
|
|
5684
5652
|
"args": {},
|
|
5685
|
-
"description": "
|
|
5653
|
+
"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",
|
|
5686
5654
|
"examples": [
|
|
5687
|
-
"$ sf hardis:org:
|
|
5655
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
5688
5656
|
],
|
|
5689
5657
|
"flags": {
|
|
5690
5658
|
"json": {
|
|
@@ -5702,21 +5670,14 @@
|
|
|
5702
5670
|
"multiple": false,
|
|
5703
5671
|
"type": "option"
|
|
5704
5672
|
},
|
|
5705
|
-
"
|
|
5706
|
-
"char": "
|
|
5707
|
-
"description": "
|
|
5708
|
-
"name": "
|
|
5673
|
+
"outputfile": {
|
|
5674
|
+
"char": "f",
|
|
5675
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5676
|
+
"name": "outputfile",
|
|
5709
5677
|
"hasDynamicHelp": false,
|
|
5710
5678
|
"multiple": false,
|
|
5711
5679
|
"type": "option"
|
|
5712
5680
|
},
|
|
5713
|
-
"overwrite": {
|
|
5714
|
-
"char": "f",
|
|
5715
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
5716
|
-
"name": "overwrite",
|
|
5717
|
-
"allowNo": false,
|
|
5718
|
-
"type": "boolean"
|
|
5719
|
-
},
|
|
5720
5681
|
"debug": {
|
|
5721
5682
|
"char": "d",
|
|
5722
5683
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5755,13 +5716,13 @@
|
|
|
5755
5716
|
},
|
|
5756
5717
|
"hasDynamicHelp": true,
|
|
5757
5718
|
"hiddenAliases": [],
|
|
5758
|
-
"id": "hardis:org:
|
|
5719
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
5759
5720
|
"pluginAlias": "sfdx-hardis",
|
|
5760
5721
|
"pluginName": "sfdx-hardis",
|
|
5761
5722
|
"pluginType": "core",
|
|
5762
5723
|
"strict": true,
|
|
5763
5724
|
"enableJsonFlag": true,
|
|
5764
|
-
"title": "
|
|
5725
|
+
"title": "Check Release Updates of an org",
|
|
5765
5726
|
"requiresProject": false,
|
|
5766
5727
|
"isESM": true,
|
|
5767
5728
|
"relativePath": [
|
|
@@ -5769,46 +5730,43 @@
|
|
|
5769
5730
|
"commands",
|
|
5770
5731
|
"hardis",
|
|
5771
5732
|
"org",
|
|
5772
|
-
"
|
|
5773
|
-
"
|
|
5733
|
+
"diagnose",
|
|
5734
|
+
"releaseupdates.js"
|
|
5774
5735
|
],
|
|
5775
5736
|
"aliasPermutations": [],
|
|
5776
5737
|
"permutations": [
|
|
5777
|
-
"hardis:org:
|
|
5778
|
-
"org:hardis:
|
|
5779
|
-
"org:
|
|
5780
|
-
"org:
|
|
5781
|
-
"hardis:
|
|
5782
|
-
"
|
|
5783
|
-
"
|
|
5784
|
-
"
|
|
5785
|
-
"hardis:
|
|
5786
|
-
"
|
|
5787
|
-
"
|
|
5788
|
-
"
|
|
5789
|
-
"hardis:org:
|
|
5790
|
-
"org:hardis:
|
|
5791
|
-
"org:
|
|
5792
|
-
"org:
|
|
5793
|
-
"hardis:
|
|
5794
|
-
"
|
|
5795
|
-
"
|
|
5796
|
-
"
|
|
5797
|
-
"hardis:
|
|
5798
|
-
"
|
|
5799
|
-
"
|
|
5800
|
-
"
|
|
5738
|
+
"hardis:org:diagnose:releaseupdates",
|
|
5739
|
+
"org:hardis:diagnose:releaseupdates",
|
|
5740
|
+
"org:diagnose:hardis:releaseupdates",
|
|
5741
|
+
"org:diagnose:releaseupdates:hardis",
|
|
5742
|
+
"hardis:diagnose:org:releaseupdates",
|
|
5743
|
+
"diagnose:hardis:org:releaseupdates",
|
|
5744
|
+
"diagnose:org:hardis:releaseupdates",
|
|
5745
|
+
"diagnose:org:releaseupdates:hardis",
|
|
5746
|
+
"hardis:diagnose:releaseupdates:org",
|
|
5747
|
+
"diagnose:hardis:releaseupdates:org",
|
|
5748
|
+
"diagnose:releaseupdates:hardis:org",
|
|
5749
|
+
"diagnose:releaseupdates:org:hardis",
|
|
5750
|
+
"hardis:org:releaseupdates:diagnose",
|
|
5751
|
+
"org:hardis:releaseupdates:diagnose",
|
|
5752
|
+
"org:releaseupdates:hardis:diagnose",
|
|
5753
|
+
"org:releaseupdates:diagnose:hardis",
|
|
5754
|
+
"hardis:releaseupdates:org:diagnose",
|
|
5755
|
+
"releaseupdates:hardis:org:diagnose",
|
|
5756
|
+
"releaseupdates:org:hardis:diagnose",
|
|
5757
|
+
"releaseupdates:org:diagnose:hardis",
|
|
5758
|
+
"hardis:releaseupdates:diagnose:org",
|
|
5759
|
+
"releaseupdates:hardis:diagnose:org",
|
|
5760
|
+
"releaseupdates:diagnose:hardis:org",
|
|
5761
|
+
"releaseupdates:diagnose:org:hardis"
|
|
5801
5762
|
]
|
|
5802
5763
|
},
|
|
5803
|
-
"hardis:org:diagnose:
|
|
5764
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
5804
5765
|
"aliases": [],
|
|
5805
5766
|
"args": {},
|
|
5806
|
-
"description": "
|
|
5767
|
+
"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",
|
|
5807
5768
|
"examples": [
|
|
5808
|
-
"$ sf hardis:org:diagnose:
|
|
5809
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5810
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5811
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5769
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
5812
5770
|
],
|
|
5813
5771
|
"flags": {
|
|
5814
5772
|
"json": {
|
|
@@ -5826,22 +5784,6 @@
|
|
|
5826
5784
|
"multiple": false,
|
|
5827
5785
|
"type": "option"
|
|
5828
5786
|
},
|
|
5829
|
-
"excludeusers": {
|
|
5830
|
-
"char": "e",
|
|
5831
|
-
"description": "Comma-separated list of usernames to exclude",
|
|
5832
|
-
"name": "excludeusers",
|
|
5833
|
-
"hasDynamicHelp": false,
|
|
5834
|
-
"multiple": false,
|
|
5835
|
-
"type": "option"
|
|
5836
|
-
},
|
|
5837
|
-
"lastndays": {
|
|
5838
|
-
"char": "t",
|
|
5839
|
-
"description": "Number of days to extract from today (included)",
|
|
5840
|
-
"name": "lastndays",
|
|
5841
|
-
"hasDynamicHelp": false,
|
|
5842
|
-
"multiple": false,
|
|
5843
|
-
"type": "option"
|
|
5844
|
-
},
|
|
5845
5787
|
"outputfile": {
|
|
5846
5788
|
"char": "f",
|
|
5847
5789
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -5888,13 +5830,13 @@
|
|
|
5888
5830
|
},
|
|
5889
5831
|
"hasDynamicHelp": true,
|
|
5890
5832
|
"hiddenAliases": [],
|
|
5891
|
-
"id": "hardis:org:diagnose:
|
|
5833
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
5892
5834
|
"pluginAlias": "sfdx-hardis",
|
|
5893
5835
|
"pluginName": "sfdx-hardis",
|
|
5894
5836
|
"pluginType": "core",
|
|
5895
5837
|
"strict": true,
|
|
5896
5838
|
"enableJsonFlag": true,
|
|
5897
|
-
"title": "
|
|
5839
|
+
"title": "Detect Unsecured Connected Apps",
|
|
5898
5840
|
"requiresProject": false,
|
|
5899
5841
|
"isESM": true,
|
|
5900
5842
|
"relativePath": [
|
|
@@ -5903,42 +5845,43 @@
|
|
|
5903
5845
|
"hardis",
|
|
5904
5846
|
"org",
|
|
5905
5847
|
"diagnose",
|
|
5906
|
-
"
|
|
5848
|
+
"unsecure-connected-apps.js"
|
|
5907
5849
|
],
|
|
5908
5850
|
"aliasPermutations": [],
|
|
5909
5851
|
"permutations": [
|
|
5910
|
-
"hardis:org:diagnose:
|
|
5911
|
-
"org:hardis:diagnose:
|
|
5912
|
-
"org:diagnose:hardis:
|
|
5913
|
-
"org:diagnose:
|
|
5914
|
-
"hardis:diagnose:org:
|
|
5915
|
-
"diagnose:hardis:org:
|
|
5916
|
-
"diagnose:org:hardis:
|
|
5917
|
-
"diagnose:org:
|
|
5918
|
-
"hardis:diagnose:
|
|
5919
|
-
"diagnose:hardis:
|
|
5920
|
-
"diagnose:
|
|
5921
|
-
"diagnose:
|
|
5922
|
-
"hardis:org:
|
|
5923
|
-
"org:hardis:
|
|
5924
|
-
"org:
|
|
5925
|
-
"org:
|
|
5926
|
-
"hardis:
|
|
5927
|
-
"
|
|
5928
|
-
"
|
|
5929
|
-
"
|
|
5930
|
-
"hardis:
|
|
5931
|
-
"
|
|
5932
|
-
"
|
|
5933
|
-
"
|
|
5852
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
5853
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
5854
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
5855
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
5856
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
5857
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
5858
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
5859
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
5860
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
5861
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
5862
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
5863
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
5864
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
5865
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
5866
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
5867
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
5868
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
5869
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
5870
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
5871
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
5872
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
5873
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
5874
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
5875
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
5934
5876
|
]
|
|
5935
5877
|
},
|
|
5936
|
-
"hardis:org:diagnose:
|
|
5878
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
5937
5879
|
"aliases": [],
|
|
5938
5880
|
"args": {},
|
|
5939
|
-
"description": "
|
|
5881
|
+
"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",
|
|
5940
5882
|
"examples": [
|
|
5941
|
-
"$ sf hardis:org:diagnose:
|
|
5883
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
5884
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
5942
5885
|
],
|
|
5943
5886
|
"flags": {
|
|
5944
5887
|
"json": {
|
|
@@ -5956,6 +5899,22 @@
|
|
|
5956
5899
|
"multiple": false,
|
|
5957
5900
|
"type": "option"
|
|
5958
5901
|
},
|
|
5902
|
+
"outputfile": {
|
|
5903
|
+
"char": "f",
|
|
5904
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5905
|
+
"name": "outputfile",
|
|
5906
|
+
"hasDynamicHelp": false,
|
|
5907
|
+
"multiple": false,
|
|
5908
|
+
"type": "option"
|
|
5909
|
+
},
|
|
5910
|
+
"days": {
|
|
5911
|
+
"char": "t",
|
|
5912
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
5913
|
+
"name": "days",
|
|
5914
|
+
"hasDynamicHelp": false,
|
|
5915
|
+
"multiple": false,
|
|
5916
|
+
"type": "option"
|
|
5917
|
+
},
|
|
5959
5918
|
"debug": {
|
|
5960
5919
|
"char": "d",
|
|
5961
5920
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5994,13 +5953,13 @@
|
|
|
5994
5953
|
},
|
|
5995
5954
|
"hasDynamicHelp": true,
|
|
5996
5955
|
"hiddenAliases": [],
|
|
5997
|
-
"id": "hardis:org:diagnose:
|
|
5956
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
5998
5957
|
"pluginAlias": "sfdx-hardis",
|
|
5999
5958
|
"pluginName": "sfdx-hardis",
|
|
6000
5959
|
"pluginType": "core",
|
|
6001
5960
|
"strict": true,
|
|
6002
5961
|
"enableJsonFlag": true,
|
|
6003
|
-
"title": "
|
|
5962
|
+
"title": "Detect unused Apex classes in an org",
|
|
6004
5963
|
"requiresProject": false,
|
|
6005
5964
|
"isESM": true,
|
|
6006
5965
|
"relativePath": [
|
|
@@ -6009,45 +5968,42 @@
|
|
|
6009
5968
|
"hardis",
|
|
6010
5969
|
"org",
|
|
6011
5970
|
"diagnose",
|
|
6012
|
-
"
|
|
5971
|
+
"unused-apex-classes.js"
|
|
6013
5972
|
],
|
|
6014
5973
|
"aliasPermutations": [],
|
|
6015
5974
|
"permutations": [
|
|
6016
|
-
"hardis:org:diagnose:
|
|
6017
|
-
"org:hardis:diagnose:
|
|
6018
|
-
"org:diagnose:hardis:
|
|
6019
|
-
"org:diagnose:
|
|
6020
|
-
"hardis:diagnose:org:
|
|
6021
|
-
"diagnose:hardis:org:
|
|
6022
|
-
"diagnose:org:hardis:
|
|
6023
|
-
"diagnose:org:
|
|
6024
|
-
"hardis:diagnose:
|
|
6025
|
-
"diagnose:hardis:
|
|
6026
|
-
"diagnose:
|
|
6027
|
-
"diagnose:
|
|
6028
|
-
"hardis:org:
|
|
6029
|
-
"org:hardis:
|
|
6030
|
-
"org:
|
|
6031
|
-
"org:
|
|
6032
|
-
"hardis:
|
|
6033
|
-
"
|
|
6034
|
-
"
|
|
6035
|
-
"
|
|
6036
|
-
"hardis:
|
|
6037
|
-
"
|
|
6038
|
-
"
|
|
6039
|
-
"
|
|
5975
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
5976
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
5977
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
5978
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
5979
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
5980
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
5981
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
5982
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
5983
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
5984
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
5985
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
5986
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
5987
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
5988
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
5989
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
5990
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
5991
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
5992
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
5993
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
5994
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
5995
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
5996
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
5997
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
5998
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6040
5999
|
]
|
|
6041
6000
|
},
|
|
6042
|
-
"hardis:org:diagnose:
|
|
6001
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6043
6002
|
"aliases": [],
|
|
6044
6003
|
"args": {},
|
|
6045
|
-
"description": "
|
|
6004
|
+
"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",
|
|
6046
6005
|
"examples": [
|
|
6047
|
-
"$ sf hardis:org:diagnose:
|
|
6048
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6049
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6050
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6006
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6051
6007
|
],
|
|
6052
6008
|
"flags": {
|
|
6053
6009
|
"json": {
|
|
@@ -6065,24 +6021,6 @@
|
|
|
6065
6021
|
"multiple": false,
|
|
6066
6022
|
"type": "option"
|
|
6067
6023
|
},
|
|
6068
|
-
"eventtype": {
|
|
6069
|
-
"char": "e",
|
|
6070
|
-
"description": "Type of EventLogFile event to analyze",
|
|
6071
|
-
"name": "eventtype",
|
|
6072
|
-
"default": "ApiTotalUsage",
|
|
6073
|
-
"hasDynamicHelp": false,
|
|
6074
|
-
"multiple": false,
|
|
6075
|
-
"type": "option"
|
|
6076
|
-
},
|
|
6077
|
-
"limit": {
|
|
6078
|
-
"char": "l",
|
|
6079
|
-
"description": "Number of latest EventLogFile events to analyze",
|
|
6080
|
-
"name": "limit",
|
|
6081
|
-
"default": 999,
|
|
6082
|
-
"hasDynamicHelp": false,
|
|
6083
|
-
"multiple": false,
|
|
6084
|
-
"type": "option"
|
|
6085
|
-
},
|
|
6086
6024
|
"outputfile": {
|
|
6087
6025
|
"char": "f",
|
|
6088
6026
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6129,13 +6067,30 @@
|
|
|
6129
6067
|
},
|
|
6130
6068
|
"hasDynamicHelp": true,
|
|
6131
6069
|
"hiddenAliases": [],
|
|
6132
|
-
"id": "hardis:org:diagnose:
|
|
6070
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6133
6071
|
"pluginAlias": "sfdx-hardis",
|
|
6134
6072
|
"pluginName": "sfdx-hardis",
|
|
6135
6073
|
"pluginType": "core",
|
|
6136
6074
|
"strict": true,
|
|
6137
6075
|
"enableJsonFlag": true,
|
|
6138
|
-
"title": "
|
|
6076
|
+
"title": "Unused Connected Apps in an org",
|
|
6077
|
+
"allowedInactiveConnectedApps": [
|
|
6078
|
+
"Ant Migration Tool",
|
|
6079
|
+
"Chatter Desktop",
|
|
6080
|
+
"Chatter Mobile for BlackBerry",
|
|
6081
|
+
"Force.com IDE",
|
|
6082
|
+
"OIQ_Integration",
|
|
6083
|
+
"Salesforce CLI",
|
|
6084
|
+
"Salesforce Files",
|
|
6085
|
+
"Salesforce Mobile Dashboards",
|
|
6086
|
+
"Salesforce Touch",
|
|
6087
|
+
"Salesforce for Outlook",
|
|
6088
|
+
"SalesforceA",
|
|
6089
|
+
"SalesforceA for Android",
|
|
6090
|
+
"SalesforceA for iOS",
|
|
6091
|
+
"SalesforceDX Namespace Registry",
|
|
6092
|
+
"SalesforceIQ"
|
|
6093
|
+
],
|
|
6139
6094
|
"requiresProject": false,
|
|
6140
6095
|
"isESM": true,
|
|
6141
6096
|
"relativePath": [
|
|
@@ -6144,42 +6099,43 @@
|
|
|
6144
6099
|
"hardis",
|
|
6145
6100
|
"org",
|
|
6146
6101
|
"diagnose",
|
|
6147
|
-
"
|
|
6102
|
+
"unused-connected-apps.js"
|
|
6148
6103
|
],
|
|
6149
6104
|
"aliasPermutations": [],
|
|
6150
6105
|
"permutations": [
|
|
6151
|
-
"hardis:org:diagnose:
|
|
6152
|
-
"org:hardis:diagnose:
|
|
6153
|
-
"org:diagnose:hardis:
|
|
6154
|
-
"org:diagnose:
|
|
6155
|
-
"hardis:diagnose:org:
|
|
6156
|
-
"diagnose:hardis:org:
|
|
6157
|
-
"diagnose:org:hardis:
|
|
6158
|
-
"diagnose:org:
|
|
6159
|
-
"hardis:diagnose:
|
|
6160
|
-
"diagnose:hardis:
|
|
6161
|
-
"diagnose:
|
|
6162
|
-
"diagnose:
|
|
6163
|
-
"hardis:org:
|
|
6164
|
-
"org:hardis:
|
|
6165
|
-
"org:
|
|
6166
|
-
"org:
|
|
6167
|
-
"hardis:
|
|
6168
|
-
"
|
|
6169
|
-
"
|
|
6170
|
-
"
|
|
6171
|
-
"hardis:
|
|
6172
|
-
"
|
|
6173
|
-
"
|
|
6174
|
-
"
|
|
6106
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6107
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6108
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6109
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6110
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6111
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6112
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6113
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6114
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6115
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6116
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6117
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6118
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6119
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6120
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6121
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6122
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6123
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6124
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6125
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6126
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6127
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6128
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6129
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6175
6130
|
]
|
|
6176
6131
|
},
|
|
6177
|
-
"hardis:org:diagnose:
|
|
6132
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6178
6133
|
"aliases": [],
|
|
6179
6134
|
"args": {},
|
|
6180
|
-
"description": "\n**
|
|
6135
|
+
"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",
|
|
6181
6136
|
"examples": [
|
|
6182
|
-
"$ sf hardis:org:diagnose:
|
|
6137
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6138
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6183
6139
|
],
|
|
6184
6140
|
"flags": {
|
|
6185
6141
|
"json": {
|
|
@@ -6205,13 +6161,6 @@
|
|
|
6205
6161
|
"multiple": false,
|
|
6206
6162
|
"type": "option"
|
|
6207
6163
|
},
|
|
6208
|
-
"usedonly": {
|
|
6209
|
-
"char": "u",
|
|
6210
|
-
"description": "Filter to have only used licenses",
|
|
6211
|
-
"name": "usedonly",
|
|
6212
|
-
"allowNo": false,
|
|
6213
|
-
"type": "boolean"
|
|
6214
|
-
},
|
|
6215
6164
|
"debug": {
|
|
6216
6165
|
"char": "d",
|
|
6217
6166
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6250,14 +6199,32 @@
|
|
|
6250
6199
|
},
|
|
6251
6200
|
"hasDynamicHelp": true,
|
|
6252
6201
|
"hiddenAliases": [],
|
|
6253
|
-
"id": "hardis:org:diagnose:
|
|
6202
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6254
6203
|
"pluginAlias": "sfdx-hardis",
|
|
6255
6204
|
"pluginName": "sfdx-hardis",
|
|
6256
6205
|
"pluginType": "core",
|
|
6257
6206
|
"strict": true,
|
|
6258
6207
|
"enableJsonFlag": true,
|
|
6259
|
-
"title": "
|
|
6208
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6260
6209
|
"requiresProject": false,
|
|
6210
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6211
|
+
"Sales_User"
|
|
6212
|
+
],
|
|
6213
|
+
"permSetsPermSetLicenses": [
|
|
6214
|
+
{
|
|
6215
|
+
"permSet": "Sales_User",
|
|
6216
|
+
"permSetLicense": "SalesUserPsl"
|
|
6217
|
+
}
|
|
6218
|
+
],
|
|
6219
|
+
"profilesPermissionSetLicenses": [
|
|
6220
|
+
{
|
|
6221
|
+
"profile": "Salesforce API Only",
|
|
6222
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6223
|
+
}
|
|
6224
|
+
],
|
|
6225
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6226
|
+
"IdentityConnect"
|
|
6227
|
+
],
|
|
6261
6228
|
"isESM": true,
|
|
6262
6229
|
"relativePath": [
|
|
6263
6230
|
"lib",
|
|
@@ -6265,42 +6232,46 @@
|
|
|
6265
6232
|
"hardis",
|
|
6266
6233
|
"org",
|
|
6267
6234
|
"diagnose",
|
|
6268
|
-
"
|
|
6235
|
+
"unusedlicenses.js"
|
|
6269
6236
|
],
|
|
6270
6237
|
"aliasPermutations": [],
|
|
6271
6238
|
"permutations": [
|
|
6272
|
-
"hardis:org:diagnose:
|
|
6273
|
-
"org:hardis:diagnose:
|
|
6274
|
-
"org:diagnose:hardis:
|
|
6275
|
-
"org:diagnose:
|
|
6276
|
-
"hardis:diagnose:org:
|
|
6277
|
-
"diagnose:hardis:org:
|
|
6278
|
-
"diagnose:org:hardis:
|
|
6279
|
-
"diagnose:org:
|
|
6280
|
-
"hardis:diagnose:
|
|
6281
|
-
"diagnose:hardis:
|
|
6282
|
-
"diagnose:
|
|
6283
|
-
"diagnose:
|
|
6284
|
-
"hardis:org:
|
|
6285
|
-
"org:hardis:
|
|
6286
|
-
"org:
|
|
6287
|
-
"org:
|
|
6288
|
-
"hardis:
|
|
6289
|
-
"
|
|
6290
|
-
"
|
|
6291
|
-
"
|
|
6292
|
-
"hardis:
|
|
6293
|
-
"
|
|
6294
|
-
"
|
|
6295
|
-
"
|
|
6239
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6240
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6241
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6242
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6243
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6244
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6245
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6246
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6247
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6248
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6249
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6250
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6251
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6252
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6253
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6254
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6255
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6256
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6257
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6258
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6259
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6260
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6261
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6262
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
6296
6263
|
]
|
|
6297
6264
|
},
|
|
6298
|
-
"hardis:org:diagnose:
|
|
6265
|
+
"hardis:org:diagnose:unusedusers": {
|
|
6299
6266
|
"aliases": [],
|
|
6300
6267
|
"args": {},
|
|
6301
|
-
"description": "
|
|
6268
|
+
"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>",
|
|
6302
6269
|
"examples": [
|
|
6303
|
-
"$ sf hardis:org:diagnose:
|
|
6270
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6271
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6272
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6273
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6274
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6304
6275
|
],
|
|
6305
6276
|
"flags": {
|
|
6306
6277
|
"json": {
|
|
@@ -6326,6 +6297,41 @@
|
|
|
6326
6297
|
"multiple": false,
|
|
6327
6298
|
"type": "option"
|
|
6328
6299
|
},
|
|
6300
|
+
"days": {
|
|
6301
|
+
"char": "t",
|
|
6302
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6303
|
+
"name": "days",
|
|
6304
|
+
"hasDynamicHelp": false,
|
|
6305
|
+
"multiple": false,
|
|
6306
|
+
"type": "option"
|
|
6307
|
+
},
|
|
6308
|
+
"licensetypes": {
|
|
6309
|
+
"char": "l",
|
|
6310
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6311
|
+
"name": "licensetypes",
|
|
6312
|
+
"hasDynamicHelp": false,
|
|
6313
|
+
"multiple": false,
|
|
6314
|
+
"options": [
|
|
6315
|
+
"all",
|
|
6316
|
+
"all-crm",
|
|
6317
|
+
"all-paying"
|
|
6318
|
+
],
|
|
6319
|
+
"type": "option"
|
|
6320
|
+
},
|
|
6321
|
+
"licenseidentifiers": {
|
|
6322
|
+
"char": "i",
|
|
6323
|
+
"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",
|
|
6324
|
+
"name": "licenseidentifiers",
|
|
6325
|
+
"hasDynamicHelp": false,
|
|
6326
|
+
"multiple": false,
|
|
6327
|
+
"type": "option"
|
|
6328
|
+
},
|
|
6329
|
+
"returnactiveusers": {
|
|
6330
|
+
"description": "Inverts the command by returning the active users",
|
|
6331
|
+
"name": "returnactiveusers",
|
|
6332
|
+
"allowNo": false,
|
|
6333
|
+
"type": "boolean"
|
|
6334
|
+
},
|
|
6329
6335
|
"debug": {
|
|
6330
6336
|
"char": "d",
|
|
6331
6337
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6364,13 +6370,13 @@
|
|
|
6364
6370
|
},
|
|
6365
6371
|
"hasDynamicHelp": true,
|
|
6366
6372
|
"hiddenAliases": [],
|
|
6367
|
-
"id": "hardis:org:diagnose:
|
|
6373
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
6368
6374
|
"pluginAlias": "sfdx-hardis",
|
|
6369
6375
|
"pluginName": "sfdx-hardis",
|
|
6370
6376
|
"pluginType": "core",
|
|
6371
6377
|
"strict": true,
|
|
6372
6378
|
"enableJsonFlag": true,
|
|
6373
|
-
"title": "
|
|
6379
|
+
"title": "Detect unused Users in Salesforce",
|
|
6374
6380
|
"requiresProject": false,
|
|
6375
6381
|
"isESM": true,
|
|
6376
6382
|
"relativePath": [
|
|
@@ -6379,42 +6385,42 @@
|
|
|
6379
6385
|
"hardis",
|
|
6380
6386
|
"org",
|
|
6381
6387
|
"diagnose",
|
|
6382
|
-
"
|
|
6388
|
+
"unusedusers.js"
|
|
6383
6389
|
],
|
|
6384
6390
|
"aliasPermutations": [],
|
|
6385
6391
|
"permutations": [
|
|
6386
|
-
"hardis:org:diagnose:
|
|
6387
|
-
"org:hardis:diagnose:
|
|
6388
|
-
"org:diagnose:hardis:
|
|
6389
|
-
"org:diagnose:
|
|
6390
|
-
"hardis:diagnose:org:
|
|
6391
|
-
"diagnose:hardis:org:
|
|
6392
|
-
"diagnose:org:hardis:
|
|
6393
|
-
"diagnose:org:
|
|
6394
|
-
"hardis:diagnose:
|
|
6395
|
-
"diagnose:hardis:
|
|
6396
|
-
"diagnose:
|
|
6397
|
-
"diagnose:
|
|
6398
|
-
"hardis:org:
|
|
6399
|
-
"org:hardis:
|
|
6400
|
-
"org:
|
|
6401
|
-
"org:
|
|
6402
|
-
"hardis:
|
|
6403
|
-
"
|
|
6404
|
-
"
|
|
6405
|
-
"
|
|
6406
|
-
"hardis:
|
|
6407
|
-
"
|
|
6408
|
-
"
|
|
6409
|
-
"
|
|
6392
|
+
"hardis:org:diagnose:unusedusers",
|
|
6393
|
+
"org:hardis:diagnose:unusedusers",
|
|
6394
|
+
"org:diagnose:hardis:unusedusers",
|
|
6395
|
+
"org:diagnose:unusedusers:hardis",
|
|
6396
|
+
"hardis:diagnose:org:unusedusers",
|
|
6397
|
+
"diagnose:hardis:org:unusedusers",
|
|
6398
|
+
"diagnose:org:hardis:unusedusers",
|
|
6399
|
+
"diagnose:org:unusedusers:hardis",
|
|
6400
|
+
"hardis:diagnose:unusedusers:org",
|
|
6401
|
+
"diagnose:hardis:unusedusers:org",
|
|
6402
|
+
"diagnose:unusedusers:hardis:org",
|
|
6403
|
+
"diagnose:unusedusers:org:hardis",
|
|
6404
|
+
"hardis:org:unusedusers:diagnose",
|
|
6405
|
+
"org:hardis:unusedusers:diagnose",
|
|
6406
|
+
"org:unusedusers:hardis:diagnose",
|
|
6407
|
+
"org:unusedusers:diagnose:hardis",
|
|
6408
|
+
"hardis:unusedusers:org:diagnose",
|
|
6409
|
+
"unusedusers:hardis:org:diagnose",
|
|
6410
|
+
"unusedusers:org:hardis:diagnose",
|
|
6411
|
+
"unusedusers:org:diagnose:hardis",
|
|
6412
|
+
"hardis:unusedusers:diagnose:org",
|
|
6413
|
+
"unusedusers:hardis:diagnose:org",
|
|
6414
|
+
"unusedusers:diagnose:hardis:org",
|
|
6415
|
+
"unusedusers:diagnose:org:hardis"
|
|
6410
6416
|
]
|
|
6411
6417
|
},
|
|
6412
|
-
"hardis:org:
|
|
6418
|
+
"hardis:org:files:export": {
|
|
6413
6419
|
"aliases": [],
|
|
6414
6420
|
"args": {},
|
|
6415
|
-
"description": "\n## Command Behavior\n\n**
|
|
6421
|
+
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
|
|
6416
6422
|
"examples": [
|
|
6417
|
-
"$ sf hardis:org:
|
|
6423
|
+
"$ sf hardis:org:files:export"
|
|
6418
6424
|
],
|
|
6419
6425
|
"flags": {
|
|
6420
6426
|
"json": {
|
|
@@ -6432,14 +6438,48 @@
|
|
|
6432
6438
|
"multiple": false,
|
|
6433
6439
|
"type": "option"
|
|
6434
6440
|
},
|
|
6435
|
-
"
|
|
6436
|
-
"char": "
|
|
6437
|
-
"description": "
|
|
6438
|
-
"name": "
|
|
6441
|
+
"path": {
|
|
6442
|
+
"char": "p",
|
|
6443
|
+
"description": "Path to the file export project",
|
|
6444
|
+
"name": "path",
|
|
6445
|
+
"hasDynamicHelp": false,
|
|
6446
|
+
"multiple": false,
|
|
6447
|
+
"type": "option"
|
|
6448
|
+
},
|
|
6449
|
+
"chunksize": {
|
|
6450
|
+
"char": "c",
|
|
6451
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
6452
|
+
"name": "chunksize",
|
|
6453
|
+
"default": 1000,
|
|
6454
|
+
"hasDynamicHelp": false,
|
|
6455
|
+
"multiple": false,
|
|
6456
|
+
"type": "option"
|
|
6457
|
+
},
|
|
6458
|
+
"polltimeout": {
|
|
6459
|
+
"char": "t",
|
|
6460
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
6461
|
+
"name": "polltimeout",
|
|
6462
|
+
"default": 300000,
|
|
6463
|
+
"hasDynamicHelp": false,
|
|
6464
|
+
"multiple": false,
|
|
6465
|
+
"type": "option"
|
|
6466
|
+
},
|
|
6467
|
+
"startchunknumber": {
|
|
6468
|
+
"char": "s",
|
|
6469
|
+
"description": "Chunk number to start from",
|
|
6470
|
+
"name": "startchunknumber",
|
|
6471
|
+
"default": 0,
|
|
6439
6472
|
"hasDynamicHelp": false,
|
|
6440
6473
|
"multiple": false,
|
|
6441
6474
|
"type": "option"
|
|
6442
6475
|
},
|
|
6476
|
+
"resume": {
|
|
6477
|
+
"char": "r",
|
|
6478
|
+
"description": "Resume previous export by checking existing files (default in CI)",
|
|
6479
|
+
"name": "resume",
|
|
6480
|
+
"allowNo": false,
|
|
6481
|
+
"type": "boolean"
|
|
6482
|
+
},
|
|
6443
6483
|
"debug": {
|
|
6444
6484
|
"char": "d",
|
|
6445
6485
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6478,13 +6518,13 @@
|
|
|
6478
6518
|
},
|
|
6479
6519
|
"hasDynamicHelp": true,
|
|
6480
6520
|
"hiddenAliases": [],
|
|
6481
|
-
"id": "hardis:org:
|
|
6521
|
+
"id": "hardis:org:files:export",
|
|
6482
6522
|
"pluginAlias": "sfdx-hardis",
|
|
6483
6523
|
"pluginName": "sfdx-hardis",
|
|
6484
6524
|
"pluginType": "core",
|
|
6485
6525
|
"strict": true,
|
|
6486
6526
|
"enableJsonFlag": true,
|
|
6487
|
-
"title": "
|
|
6527
|
+
"title": "Export files",
|
|
6488
6528
|
"requiresProject": false,
|
|
6489
6529
|
"isESM": true,
|
|
6490
6530
|
"relativePath": [
|
|
@@ -6492,44 +6532,43 @@
|
|
|
6492
6532
|
"commands",
|
|
6493
6533
|
"hardis",
|
|
6494
6534
|
"org",
|
|
6495
|
-
"
|
|
6496
|
-
"
|
|
6535
|
+
"files",
|
|
6536
|
+
"export.js"
|
|
6497
6537
|
],
|
|
6498
6538
|
"aliasPermutations": [],
|
|
6499
6539
|
"permutations": [
|
|
6500
|
-
"hardis:org:
|
|
6501
|
-
"org:hardis:
|
|
6502
|
-
"org:
|
|
6503
|
-
"org:
|
|
6504
|
-
"hardis:
|
|
6505
|
-
"
|
|
6506
|
-
"
|
|
6507
|
-
"
|
|
6508
|
-
"hardis:
|
|
6509
|
-
"
|
|
6510
|
-
"
|
|
6511
|
-
"
|
|
6512
|
-
"hardis:org:
|
|
6513
|
-
"org:hardis:
|
|
6514
|
-
"org:
|
|
6515
|
-
"org:
|
|
6516
|
-
"hardis:
|
|
6517
|
-
"
|
|
6518
|
-
"
|
|
6519
|
-
"
|
|
6520
|
-
"hardis:
|
|
6521
|
-
"
|
|
6522
|
-
"
|
|
6523
|
-
"
|
|
6540
|
+
"hardis:org:files:export",
|
|
6541
|
+
"org:hardis:files:export",
|
|
6542
|
+
"org:files:hardis:export",
|
|
6543
|
+
"org:files:export:hardis",
|
|
6544
|
+
"hardis:files:org:export",
|
|
6545
|
+
"files:hardis:org:export",
|
|
6546
|
+
"files:org:hardis:export",
|
|
6547
|
+
"files:org:export:hardis",
|
|
6548
|
+
"hardis:files:export:org",
|
|
6549
|
+
"files:hardis:export:org",
|
|
6550
|
+
"files:export:hardis:org",
|
|
6551
|
+
"files:export:org:hardis",
|
|
6552
|
+
"hardis:org:export:files",
|
|
6553
|
+
"org:hardis:export:files",
|
|
6554
|
+
"org:export:hardis:files",
|
|
6555
|
+
"org:export:files:hardis",
|
|
6556
|
+
"hardis:export:org:files",
|
|
6557
|
+
"export:hardis:org:files",
|
|
6558
|
+
"export:org:hardis:files",
|
|
6559
|
+
"export:org:files:hardis",
|
|
6560
|
+
"hardis:export:files:org",
|
|
6561
|
+
"export:hardis:files:org",
|
|
6562
|
+
"export:files:hardis:org",
|
|
6563
|
+
"export:files:org:hardis"
|
|
6524
6564
|
]
|
|
6525
6565
|
},
|
|
6526
|
-
"hardis:org:
|
|
6566
|
+
"hardis:org:files:import": {
|
|
6527
6567
|
"aliases": [],
|
|
6528
6568
|
"args": {},
|
|
6529
|
-
"description": "
|
|
6569
|
+
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
|
|
6530
6570
|
"examples": [
|
|
6531
|
-
"$ sf hardis:org:
|
|
6532
|
-
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6571
|
+
"$ sf hardis:org:files:import"
|
|
6533
6572
|
],
|
|
6534
6573
|
"flags": {
|
|
6535
6574
|
"json": {
|
|
@@ -6547,21 +6586,20 @@
|
|
|
6547
6586
|
"multiple": false,
|
|
6548
6587
|
"type": "option"
|
|
6549
6588
|
},
|
|
6550
|
-
"
|
|
6551
|
-
"char": "
|
|
6552
|
-
"description": "
|
|
6553
|
-
"name": "
|
|
6589
|
+
"path": {
|
|
6590
|
+
"char": "p",
|
|
6591
|
+
"description": "Path to the file export project",
|
|
6592
|
+
"name": "path",
|
|
6554
6593
|
"hasDynamicHelp": false,
|
|
6555
6594
|
"multiple": false,
|
|
6556
6595
|
"type": "option"
|
|
6557
6596
|
},
|
|
6558
|
-
"
|
|
6559
|
-
"char": "
|
|
6560
|
-
"description": "
|
|
6561
|
-
"name": "
|
|
6562
|
-
"
|
|
6563
|
-
"
|
|
6564
|
-
"type": "option"
|
|
6597
|
+
"overwrite": {
|
|
6598
|
+
"char": "f",
|
|
6599
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
6600
|
+
"name": "overwrite",
|
|
6601
|
+
"allowNo": false,
|
|
6602
|
+
"type": "boolean"
|
|
6565
6603
|
},
|
|
6566
6604
|
"debug": {
|
|
6567
6605
|
"char": "d",
|
|
@@ -6601,13 +6639,13 @@
|
|
|
6601
6639
|
},
|
|
6602
6640
|
"hasDynamicHelp": true,
|
|
6603
6641
|
"hiddenAliases": [],
|
|
6604
|
-
"id": "hardis:org:
|
|
6642
|
+
"id": "hardis:org:files:import",
|
|
6605
6643
|
"pluginAlias": "sfdx-hardis",
|
|
6606
6644
|
"pluginName": "sfdx-hardis",
|
|
6607
6645
|
"pluginType": "core",
|
|
6608
6646
|
"strict": true,
|
|
6609
6647
|
"enableJsonFlag": true,
|
|
6610
|
-
"title": "
|
|
6648
|
+
"title": "Import files",
|
|
6611
6649
|
"requiresProject": false,
|
|
6612
6650
|
"isESM": true,
|
|
6613
6651
|
"relativePath": [
|
|
@@ -6615,43 +6653,43 @@
|
|
|
6615
6653
|
"commands",
|
|
6616
6654
|
"hardis",
|
|
6617
6655
|
"org",
|
|
6618
|
-
"
|
|
6619
|
-
"
|
|
6656
|
+
"files",
|
|
6657
|
+
"import.js"
|
|
6620
6658
|
],
|
|
6621
6659
|
"aliasPermutations": [],
|
|
6622
6660
|
"permutations": [
|
|
6623
|
-
"hardis:org:
|
|
6624
|
-
"org:hardis:
|
|
6625
|
-
"org:
|
|
6626
|
-
"org:
|
|
6627
|
-
"hardis:
|
|
6628
|
-
"
|
|
6629
|
-
"
|
|
6630
|
-
"
|
|
6631
|
-
"hardis:
|
|
6632
|
-
"
|
|
6633
|
-
"
|
|
6634
|
-
"
|
|
6635
|
-
"hardis:org:
|
|
6636
|
-
"org:hardis:
|
|
6637
|
-
"org:
|
|
6638
|
-
"org:
|
|
6639
|
-
"hardis:
|
|
6640
|
-
"
|
|
6641
|
-
"
|
|
6642
|
-
"
|
|
6643
|
-
"hardis:
|
|
6644
|
-
"
|
|
6645
|
-
"
|
|
6646
|
-
"
|
|
6661
|
+
"hardis:org:files:import",
|
|
6662
|
+
"org:hardis:files:import",
|
|
6663
|
+
"org:files:hardis:import",
|
|
6664
|
+
"org:files:import:hardis",
|
|
6665
|
+
"hardis:files:org:import",
|
|
6666
|
+
"files:hardis:org:import",
|
|
6667
|
+
"files:org:hardis:import",
|
|
6668
|
+
"files:org:import:hardis",
|
|
6669
|
+
"hardis:files:import:org",
|
|
6670
|
+
"files:hardis:import:org",
|
|
6671
|
+
"files:import:hardis:org",
|
|
6672
|
+
"files:import:org:hardis",
|
|
6673
|
+
"hardis:org:import:files",
|
|
6674
|
+
"org:hardis:import:files",
|
|
6675
|
+
"org:import:hardis:files",
|
|
6676
|
+
"org:import:files:hardis",
|
|
6677
|
+
"hardis:import:org:files",
|
|
6678
|
+
"import:hardis:org:files",
|
|
6679
|
+
"import:org:hardis:files",
|
|
6680
|
+
"import:org:files:hardis",
|
|
6681
|
+
"hardis:import:files:org",
|
|
6682
|
+
"import:hardis:files:org",
|
|
6683
|
+
"import:files:hardis:org",
|
|
6684
|
+
"import:files:org:hardis"
|
|
6647
6685
|
]
|
|
6648
6686
|
},
|
|
6649
|
-
"hardis:org:
|
|
6687
|
+
"hardis:org:data:delete": {
|
|
6650
6688
|
"aliases": [],
|
|
6651
6689
|
"args": {},
|
|
6652
|
-
"description": "\n## Command Behavior\n\n**
|
|
6690
|
+
"description": "\n## Command Behavior\n\n**Deletes records in multiple Salesforce objects using an SFDMU (Salesforce Data Migration Utility) workspace.**\n\nThis command provides a powerful and controlled way to remove data from your Salesforce orgs based on configurations defined in an SFDMU workspace. It's particularly useful for:\n\n- **Data Cleanup:** Removing test data, obsolete records, or sensitive information.\n- **Environment Reset:** Preparing sandboxes for new development cycles by clearing specific data sets.\n- **Compliance:** Deleting data to meet regulatory requirements.\n\n**Important Considerations for Production Environments:**\n\nIf you intend to run this command in a production environment, you must:\n\n- Set `runnableInProduction` to `true` in your `export.json` file within the SFDMU workspace.\n- Define `sfdmuCanModify: YOUR_INSTANCE_URL` in your branch-specific configuration file (e.g., `config/branches/.sfdx-hardis.YOUR_BRANCH.yml`) to explicitly authorize data modification for that instance.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation relies heavily on the SFDMU plugin:\n\n- **SFDMU Integration:** It leverages the `sfdmu` plugin to perform the actual data deletion operations. The command acts as a wrapper, providing an assisted interface for SFDMU execution.\n- **Workspace Selection:** If the SFDMU workspace path is not provided via the `--path` flag, it interactively prompts the user to select a data workspace using `selectDataWorkspace`.\n- **Org Selection:** It ensures that a target Salesforce org is selected (either via the `--target-org` flag or through an interactive prompt using `promptOrgUsernameDefault`) to specify where the data deletion will occur.\n- **`deleteData` Utility:** The core logic for executing the SFDMU deletion process is encapsulated within the `deleteData` utility function, which takes the SFDMU workspace path and the target username as arguments.\n- **Environment Awareness:** It checks the `isCI` flag to determine whether to run in an interactive mode (prompting for user input) or a non-interactive mode (relying solely on command-line flags).\n- **Required Plugin:** It explicitly lists `sfdmu` as a required plugin, ensuring that the necessary dependency is in place before execution.\n</details>\n",
|
|
6653
6691
|
"examples": [
|
|
6654
|
-
"$ sf hardis:org:
|
|
6692
|
+
"$ sf hardis:org:data:delete"
|
|
6655
6693
|
],
|
|
6656
6694
|
"flags": {
|
|
6657
6695
|
"json": {
|
|
@@ -6666,13 +6704,13 @@
|
|
|
6666
6704
|
"name": "flags-dir",
|
|
6667
6705
|
"summary": "Import flag values from a directory.",
|
|
6668
6706
|
"hasDynamicHelp": false,
|
|
6669
|
-
"multiple": false,
|
|
6670
|
-
"type": "option"
|
|
6671
|
-
},
|
|
6672
|
-
"
|
|
6673
|
-
"char": "
|
|
6674
|
-
"description": "
|
|
6675
|
-
"name": "
|
|
6707
|
+
"multiple": false,
|
|
6708
|
+
"type": "option"
|
|
6709
|
+
},
|
|
6710
|
+
"path": {
|
|
6711
|
+
"char": "p",
|
|
6712
|
+
"description": "Path to the sfdmu workspace folder",
|
|
6713
|
+
"name": "path",
|
|
6676
6714
|
"hasDynamicHelp": false,
|
|
6677
6715
|
"multiple": false,
|
|
6678
6716
|
"type": "option"
|
|
@@ -6715,75 +6753,62 @@
|
|
|
6715
6753
|
},
|
|
6716
6754
|
"hasDynamicHelp": true,
|
|
6717
6755
|
"hiddenAliases": [],
|
|
6718
|
-
"id": "hardis:org:
|
|
6756
|
+
"id": "hardis:org:data:delete",
|
|
6719
6757
|
"pluginAlias": "sfdx-hardis",
|
|
6720
6758
|
"pluginName": "sfdx-hardis",
|
|
6721
6759
|
"pluginType": "core",
|
|
6722
6760
|
"strict": true,
|
|
6723
6761
|
"enableJsonFlag": true,
|
|
6724
|
-
"title": "
|
|
6725
|
-
"allowedInactiveConnectedApps": [
|
|
6726
|
-
"Ant Migration Tool",
|
|
6727
|
-
"Chatter Desktop",
|
|
6728
|
-
"Chatter Mobile for BlackBerry",
|
|
6729
|
-
"Force.com IDE",
|
|
6730
|
-
"OIQ_Integration",
|
|
6731
|
-
"Salesforce CLI",
|
|
6732
|
-
"Salesforce Files",
|
|
6733
|
-
"Salesforce Mobile Dashboards",
|
|
6734
|
-
"Salesforce Touch",
|
|
6735
|
-
"Salesforce for Outlook",
|
|
6736
|
-
"SalesforceA",
|
|
6737
|
-
"SalesforceA for Android",
|
|
6738
|
-
"SalesforceA for iOS",
|
|
6739
|
-
"SalesforceDX Namespace Registry",
|
|
6740
|
-
"SalesforceIQ"
|
|
6741
|
-
],
|
|
6762
|
+
"title": "Delete data",
|
|
6742
6763
|
"requiresProject": false,
|
|
6764
|
+
"requiresSfdxPlugins": [
|
|
6765
|
+
"sfdmu"
|
|
6766
|
+
],
|
|
6743
6767
|
"isESM": true,
|
|
6744
6768
|
"relativePath": [
|
|
6745
6769
|
"lib",
|
|
6746
6770
|
"commands",
|
|
6747
6771
|
"hardis",
|
|
6748
6772
|
"org",
|
|
6749
|
-
"
|
|
6750
|
-
"
|
|
6773
|
+
"data",
|
|
6774
|
+
"delete.js"
|
|
6751
6775
|
],
|
|
6752
6776
|
"aliasPermutations": [],
|
|
6753
6777
|
"permutations": [
|
|
6754
|
-
"hardis:org:
|
|
6755
|
-
"org:hardis:
|
|
6756
|
-
"org:
|
|
6757
|
-
"org:
|
|
6758
|
-
"hardis:
|
|
6759
|
-
"
|
|
6760
|
-
"
|
|
6761
|
-
"
|
|
6762
|
-
"hardis:
|
|
6763
|
-
"
|
|
6764
|
-
"
|
|
6765
|
-
"
|
|
6766
|
-
"hardis:org:
|
|
6767
|
-
"org:hardis:
|
|
6768
|
-
"org:
|
|
6769
|
-
"org:
|
|
6770
|
-
"hardis:
|
|
6771
|
-
"
|
|
6772
|
-
"
|
|
6773
|
-
"
|
|
6774
|
-
"hardis:
|
|
6775
|
-
"
|
|
6776
|
-
"
|
|
6777
|
-
"
|
|
6778
|
+
"hardis:org:data:delete",
|
|
6779
|
+
"org:hardis:data:delete",
|
|
6780
|
+
"org:data:hardis:delete",
|
|
6781
|
+
"org:data:delete:hardis",
|
|
6782
|
+
"hardis:data:org:delete",
|
|
6783
|
+
"data:hardis:org:delete",
|
|
6784
|
+
"data:org:hardis:delete",
|
|
6785
|
+
"data:org:delete:hardis",
|
|
6786
|
+
"hardis:data:delete:org",
|
|
6787
|
+
"data:hardis:delete:org",
|
|
6788
|
+
"data:delete:hardis:org",
|
|
6789
|
+
"data:delete:org:hardis",
|
|
6790
|
+
"hardis:org:delete:data",
|
|
6791
|
+
"org:hardis:delete:data",
|
|
6792
|
+
"org:delete:hardis:data",
|
|
6793
|
+
"org:delete:data:hardis",
|
|
6794
|
+
"hardis:delete:org:data",
|
|
6795
|
+
"delete:hardis:org:data",
|
|
6796
|
+
"delete:org:hardis:data",
|
|
6797
|
+
"delete:org:data:hardis",
|
|
6798
|
+
"hardis:delete:data:org",
|
|
6799
|
+
"delete:hardis:data:org",
|
|
6800
|
+
"delete:data:hardis:org",
|
|
6801
|
+
"delete:data:org:hardis"
|
|
6778
6802
|
]
|
|
6779
6803
|
},
|
|
6780
|
-
"hardis:org:
|
|
6804
|
+
"hardis:org:data:export": {
|
|
6781
6805
|
"aliases": [],
|
|
6782
6806
|
"args": {},
|
|
6783
|
-
"description": "\n## Command Behavior\n\n**
|
|
6807
|
+
"description": "\n## Command Behavior\n\n**Exports data from a Salesforce org using an SFDMU (Salesforce Data Migration Utility) project.**\n\nThis command facilitates the extraction of data from your Salesforce environments based on configurations defined in an SFDMU workspace. It's a powerful tool for various data-related tasks, including:\n\n- **Data Backup:** Creating snapshots of your Salesforce data.\n- **Data Migration:** Extracting data for transfer to another Salesforce org or external system.\n- **Reporting and Analysis:** Exporting specific datasets for detailed analysis outside of Salesforce.\n- **Data Seeding:** Preparing data for import into other environments.\n\nKey functionalities:\n\n- **SFDMU Workspace Integration:** Leverages an existing SFDMU workspace (defined by an `export.json` file) to determine which objects and records to export, along with any filtering or transformation rules.\n- **Interactive Workspace Selection:** If the SFDMU workspace path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Org Selection:** Ensures that a target Salesforce org is selected (either via the `--target-org` flag or through an interactive prompt) to specify the source of the data export.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-detect-bad-words-in-salesforce-records-using-sfdx-data-loader-and-sfdx-hardis-171db40a9bac)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation relies heavily on the SFDMU plugin:\n\n- **SFDMU Integration:** It acts as a wrapper around the `sfdmu` plugin, which performs the actual data export operations. The command provides an assisted interface for SFDMU execution.\n- **`exportData` Utility:** The core logic for executing the SFDMU export process is encapsulated within the `exportData` utility function, which takes the SFDMU workspace path and the source username as arguments.\n- **Interactive Prompts:** Uses `selectDataWorkspace` to allow the user to choose an SFDMU project and `promptOrgUsernameDefault` for selecting the source Salesforce org when not running in a CI environment.\n- **Environment Awareness:** Checks the `isCI` flag to determine whether to run in an interactive mode (prompting for user input) or a non-interactive mode (relying solely on command-line flags).\n- **Required Plugin:** It explicitly lists `sfdmu` as a required plugin, ensuring that the necessary dependency is in place before execution.\n</details>\n",
|
|
6784
6808
|
"examples": [
|
|
6785
|
-
"$ sf hardis:org:
|
|
6786
|
-
"$ sf hardis:org:
|
|
6809
|
+
"$ sf hardis:org:data:export",
|
|
6810
|
+
"$ sf hardis:org:data:export --project-name MyDataProject --target-org my-org@example.com",
|
|
6811
|
+
"$ sf hardis:org:data:export --path ./scripts/data/MyDataProject --no-prompt --target-org my-org@example.com"
|
|
6787
6812
|
],
|
|
6788
6813
|
"flags": {
|
|
6789
6814
|
"json": {
|
|
@@ -6801,14 +6826,29 @@
|
|
|
6801
6826
|
"multiple": false,
|
|
6802
6827
|
"type": "option"
|
|
6803
6828
|
},
|
|
6804
|
-
"
|
|
6805
|
-
"char": "
|
|
6806
|
-
"description": "
|
|
6807
|
-
"name": "
|
|
6829
|
+
"project-name": {
|
|
6830
|
+
"char": "n",
|
|
6831
|
+
"description": "Name of the sfdmu project to use (if not defined, you will be prompted to select one)",
|
|
6832
|
+
"name": "project-name",
|
|
6833
|
+
"hasDynamicHelp": false,
|
|
6834
|
+
"multiple": false,
|
|
6835
|
+
"type": "option"
|
|
6836
|
+
},
|
|
6837
|
+
"path": {
|
|
6838
|
+
"char": "p",
|
|
6839
|
+
"description": "Path to the sfdmu workspace folder",
|
|
6840
|
+
"name": "path",
|
|
6808
6841
|
"hasDynamicHelp": false,
|
|
6809
6842
|
"multiple": false,
|
|
6810
6843
|
"type": "option"
|
|
6811
6844
|
},
|
|
6845
|
+
"no-prompt": {
|
|
6846
|
+
"char": "r",
|
|
6847
|
+
"description": "Do not prompt for Org, use default org",
|
|
6848
|
+
"name": "no-prompt",
|
|
6849
|
+
"allowNo": false,
|
|
6850
|
+
"type": "boolean"
|
|
6851
|
+
},
|
|
6812
6852
|
"debug": {
|
|
6813
6853
|
"char": "d",
|
|
6814
6854
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6847,31 +6887,16 @@
|
|
|
6847
6887
|
},
|
|
6848
6888
|
"hasDynamicHelp": true,
|
|
6849
6889
|
"hiddenAliases": [],
|
|
6850
|
-
"id": "hardis:org:
|
|
6890
|
+
"id": "hardis:org:data:export",
|
|
6851
6891
|
"pluginAlias": "sfdx-hardis",
|
|
6852
6892
|
"pluginName": "sfdx-hardis",
|
|
6853
6893
|
"pluginType": "core",
|
|
6854
6894
|
"strict": true,
|
|
6855
6895
|
"enableJsonFlag": true,
|
|
6856
|
-
"title": "
|
|
6896
|
+
"title": "Export data",
|
|
6857
6897
|
"requiresProject": false,
|
|
6858
|
-
"
|
|
6859
|
-
"
|
|
6860
|
-
],
|
|
6861
|
-
"permSetsPermSetLicenses": [
|
|
6862
|
-
{
|
|
6863
|
-
"permSet": "Sales_User",
|
|
6864
|
-
"permSetLicense": "SalesUserPsl"
|
|
6865
|
-
}
|
|
6866
|
-
],
|
|
6867
|
-
"profilesPermissionSetLicenses": [
|
|
6868
|
-
{
|
|
6869
|
-
"profile": "Salesforce API Only",
|
|
6870
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6871
|
-
}
|
|
6872
|
-
],
|
|
6873
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6874
|
-
"IdentityConnect"
|
|
6898
|
+
"requiresSfdxPlugins": [
|
|
6899
|
+
"sfdmu"
|
|
6875
6900
|
],
|
|
6876
6901
|
"isESM": true,
|
|
6877
6902
|
"relativePath": [
|
|
@@ -6879,47 +6904,46 @@
|
|
|
6879
6904
|
"commands",
|
|
6880
6905
|
"hardis",
|
|
6881
6906
|
"org",
|
|
6882
|
-
"
|
|
6883
|
-
"
|
|
6907
|
+
"data",
|
|
6908
|
+
"export.js"
|
|
6884
6909
|
],
|
|
6885
6910
|
"aliasPermutations": [],
|
|
6886
6911
|
"permutations": [
|
|
6887
|
-
"hardis:org:
|
|
6888
|
-
"org:hardis:
|
|
6889
|
-
"org:
|
|
6890
|
-
"org:
|
|
6891
|
-
"hardis:
|
|
6892
|
-
"
|
|
6893
|
-
"
|
|
6894
|
-
"
|
|
6895
|
-
"hardis:
|
|
6896
|
-
"
|
|
6897
|
-
"
|
|
6898
|
-
"
|
|
6899
|
-
"hardis:org:
|
|
6900
|
-
"org:hardis:
|
|
6901
|
-
"org:
|
|
6902
|
-
"org:
|
|
6903
|
-
"hardis:
|
|
6904
|
-
"
|
|
6905
|
-
"
|
|
6906
|
-
"
|
|
6907
|
-
"hardis:
|
|
6908
|
-
"
|
|
6909
|
-
"
|
|
6910
|
-
"
|
|
6912
|
+
"hardis:org:data:export",
|
|
6913
|
+
"org:hardis:data:export",
|
|
6914
|
+
"org:data:hardis:export",
|
|
6915
|
+
"org:data:export:hardis",
|
|
6916
|
+
"hardis:data:org:export",
|
|
6917
|
+
"data:hardis:org:export",
|
|
6918
|
+
"data:org:hardis:export",
|
|
6919
|
+
"data:org:export:hardis",
|
|
6920
|
+
"hardis:data:export:org",
|
|
6921
|
+
"data:hardis:export:org",
|
|
6922
|
+
"data:export:hardis:org",
|
|
6923
|
+
"data:export:org:hardis",
|
|
6924
|
+
"hardis:org:export:data",
|
|
6925
|
+
"org:hardis:export:data",
|
|
6926
|
+
"org:export:hardis:data",
|
|
6927
|
+
"org:export:data:hardis",
|
|
6928
|
+
"hardis:export:org:data",
|
|
6929
|
+
"export:hardis:org:data",
|
|
6930
|
+
"export:org:hardis:data",
|
|
6931
|
+
"export:org:data:hardis",
|
|
6932
|
+
"hardis:export:data:org",
|
|
6933
|
+
"export:hardis:data:org",
|
|
6934
|
+
"export:data:hardis:org",
|
|
6935
|
+
"export:data:org:hardis"
|
|
6911
6936
|
]
|
|
6912
6937
|
},
|
|
6913
|
-
"hardis:org:
|
|
6938
|
+
"hardis:org:data:import": {
|
|
6914
6939
|
"aliases": [],
|
|
6915
6940
|
"args": {},
|
|
6916
|
-
"description": "
|
|
6941
|
+
"description": "Import/Load data in an org using a [SFDX Data Loader](https://help.sfdmu.com/) Project\n\nIf you need to run this command in a production org, you need to either:\n\n- Define **sfdmuCanModify** in your .sfdx-hardis.yml config file. (Example: `sfdmuCanModify: prod-instance.my.salesforce.com`)\n- Define an environment variable SFDMU_CAN_MODIFY. (Example: `SFDMU_CAN_MODIFY=prod-instance.my.salesforce.com`)\n\nSee article:\n\n[](https://nicolas.vuillamy.fr/how-to-detect-bad-words-in-salesforce-records-using-sfdx-data-loader-and-sfdx-hardis-171db40a9bac)\n",
|
|
6917
6942
|
"examples": [
|
|
6918
|
-
"$ sf hardis:org:
|
|
6919
|
-
"$ sf hardis:org:
|
|
6920
|
-
"$ sf hardis:org:
|
|
6921
|
-
"$ sf hardis:org:
|
|
6922
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6943
|
+
"$ sf hardis:org:data:import",
|
|
6944
|
+
"$ sf hardis:org:data:import --project-name MyDataProject --target-org my-org@example.com",
|
|
6945
|
+
"$ sf hardis:org:data:import --path ./scripts/data/MyDataProject --no-prompt --target-org my-org@example.com",
|
|
6946
|
+
"$ SFDMU_CAN_MODIFY=prod-instance.my.salesforce.com sf hardis:org:data:import --project-name MyDataProject --target-org prod@example.com"
|
|
6923
6947
|
],
|
|
6924
6948
|
"flags": {
|
|
6925
6949
|
"json": {
|
|
@@ -6937,46 +6961,26 @@
|
|
|
6937
6961
|
"multiple": false,
|
|
6938
6962
|
"type": "option"
|
|
6939
6963
|
},
|
|
6940
|
-
"
|
|
6941
|
-
"char": "
|
|
6942
|
-
"description": "
|
|
6943
|
-
"name": "
|
|
6944
|
-
"hasDynamicHelp": false,
|
|
6945
|
-
"multiple": false,
|
|
6946
|
-
"type": "option"
|
|
6947
|
-
},
|
|
6948
|
-
"days": {
|
|
6949
|
-
"char": "t",
|
|
6950
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6951
|
-
"name": "days",
|
|
6952
|
-
"hasDynamicHelp": false,
|
|
6953
|
-
"multiple": false,
|
|
6954
|
-
"type": "option"
|
|
6955
|
-
},
|
|
6956
|
-
"licensetypes": {
|
|
6957
|
-
"char": "l",
|
|
6958
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6959
|
-
"name": "licensetypes",
|
|
6964
|
+
"project-name": {
|
|
6965
|
+
"char": "n",
|
|
6966
|
+
"description": "Name of the sfdmu project to use (if not defined, you will be prompted to select one)",
|
|
6967
|
+
"name": "project-name",
|
|
6960
6968
|
"hasDynamicHelp": false,
|
|
6961
6969
|
"multiple": false,
|
|
6962
|
-
"options": [
|
|
6963
|
-
"all",
|
|
6964
|
-
"all-crm",
|
|
6965
|
-
"all-paying"
|
|
6966
|
-
],
|
|
6967
6970
|
"type": "option"
|
|
6968
6971
|
},
|
|
6969
|
-
"
|
|
6970
|
-
"char": "
|
|
6971
|
-
"description": "
|
|
6972
|
-
"name": "
|
|
6972
|
+
"path": {
|
|
6973
|
+
"char": "p",
|
|
6974
|
+
"description": "Path to the sfdmu workspace folder",
|
|
6975
|
+
"name": "path",
|
|
6973
6976
|
"hasDynamicHelp": false,
|
|
6974
6977
|
"multiple": false,
|
|
6975
6978
|
"type": "option"
|
|
6976
6979
|
},
|
|
6977
|
-
"
|
|
6978
|
-
"
|
|
6979
|
-
"
|
|
6980
|
+
"no-prompt": {
|
|
6981
|
+
"char": "r",
|
|
6982
|
+
"description": "Do not prompt for Org, use default org",
|
|
6983
|
+
"name": "no-prompt",
|
|
6980
6984
|
"allowNo": false,
|
|
6981
6985
|
"type": "boolean"
|
|
6982
6986
|
},
|
|
@@ -7018,49 +7022,52 @@
|
|
|
7018
7022
|
},
|
|
7019
7023
|
"hasDynamicHelp": true,
|
|
7020
7024
|
"hiddenAliases": [],
|
|
7021
|
-
"id": "hardis:org:
|
|
7025
|
+
"id": "hardis:org:data:import",
|
|
7022
7026
|
"pluginAlias": "sfdx-hardis",
|
|
7023
7027
|
"pluginName": "sfdx-hardis",
|
|
7024
7028
|
"pluginType": "core",
|
|
7025
7029
|
"strict": true,
|
|
7026
7030
|
"enableJsonFlag": true,
|
|
7027
|
-
"title": "
|
|
7031
|
+
"title": "Import data",
|
|
7028
7032
|
"requiresProject": false,
|
|
7033
|
+
"requiresSfdxPlugins": [
|
|
7034
|
+
"sfdmu"
|
|
7035
|
+
],
|
|
7029
7036
|
"isESM": true,
|
|
7030
7037
|
"relativePath": [
|
|
7031
7038
|
"lib",
|
|
7032
7039
|
"commands",
|
|
7033
7040
|
"hardis",
|
|
7034
7041
|
"org",
|
|
7035
|
-
"
|
|
7036
|
-
"
|
|
7042
|
+
"data",
|
|
7043
|
+
"import.js"
|
|
7037
7044
|
],
|
|
7038
7045
|
"aliasPermutations": [],
|
|
7039
7046
|
"permutations": [
|
|
7040
|
-
"hardis:org:
|
|
7041
|
-
"org:hardis:
|
|
7042
|
-
"org:
|
|
7043
|
-
"org:
|
|
7044
|
-
"hardis:
|
|
7045
|
-
"
|
|
7046
|
-
"
|
|
7047
|
-
"
|
|
7048
|
-
"hardis:
|
|
7049
|
-
"
|
|
7050
|
-
"
|
|
7051
|
-
"
|
|
7052
|
-
"hardis:org:
|
|
7053
|
-
"org:hardis:
|
|
7054
|
-
"org:
|
|
7055
|
-
"org:
|
|
7056
|
-
"hardis:
|
|
7057
|
-
"
|
|
7058
|
-
"
|
|
7059
|
-
"
|
|
7060
|
-
"hardis:
|
|
7061
|
-
"
|
|
7062
|
-
"
|
|
7063
|
-
"
|
|
7047
|
+
"hardis:org:data:import",
|
|
7048
|
+
"org:hardis:data:import",
|
|
7049
|
+
"org:data:hardis:import",
|
|
7050
|
+
"org:data:import:hardis",
|
|
7051
|
+
"hardis:data:org:import",
|
|
7052
|
+
"data:hardis:org:import",
|
|
7053
|
+
"data:org:hardis:import",
|
|
7054
|
+
"data:org:import:hardis",
|
|
7055
|
+
"hardis:data:import:org",
|
|
7056
|
+
"data:hardis:import:org",
|
|
7057
|
+
"data:import:hardis:org",
|
|
7058
|
+
"data:import:org:hardis",
|
|
7059
|
+
"hardis:org:import:data",
|
|
7060
|
+
"org:hardis:import:data",
|
|
7061
|
+
"org:import:hardis:data",
|
|
7062
|
+
"org:import:data:hardis",
|
|
7063
|
+
"hardis:import:org:data",
|
|
7064
|
+
"import:hardis:org:data",
|
|
7065
|
+
"import:org:hardis:data",
|
|
7066
|
+
"import:org:data:hardis",
|
|
7067
|
+
"hardis:import:data:org",
|
|
7068
|
+
"import:hardis:data:org",
|
|
7069
|
+
"import:data:hardis:org",
|
|
7070
|
+
"import:data:org:hardis"
|
|
7064
7071
|
]
|
|
7065
7072
|
},
|
|
7066
7073
|
"hardis:org:fix:listviewmine": {
|
|
@@ -9811,109 +9818,6 @@
|
|
|
9811
9818
|
"auth:configure:project:hardis"
|
|
9812
9819
|
]
|
|
9813
9820
|
},
|
|
9814
|
-
"hardis:project:convert:profilestopermsets": {
|
|
9815
|
-
"aliases": [],
|
|
9816
|
-
"args": {},
|
|
9817
|
-
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
9818
|
-
"examples": [
|
|
9819
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
9820
|
-
],
|
|
9821
|
-
"flags": {
|
|
9822
|
-
"json": {
|
|
9823
|
-
"description": "Format output as json.",
|
|
9824
|
-
"helpGroup": "GLOBAL",
|
|
9825
|
-
"name": "json",
|
|
9826
|
-
"allowNo": false,
|
|
9827
|
-
"type": "boolean"
|
|
9828
|
-
},
|
|
9829
|
-
"flags-dir": {
|
|
9830
|
-
"helpGroup": "GLOBAL",
|
|
9831
|
-
"name": "flags-dir",
|
|
9832
|
-
"summary": "Import flag values from a directory.",
|
|
9833
|
-
"hasDynamicHelp": false,
|
|
9834
|
-
"multiple": false,
|
|
9835
|
-
"type": "option"
|
|
9836
|
-
},
|
|
9837
|
-
"except": {
|
|
9838
|
-
"char": "e",
|
|
9839
|
-
"description": "List of filters",
|
|
9840
|
-
"name": "except",
|
|
9841
|
-
"default": [],
|
|
9842
|
-
"hasDynamicHelp": false,
|
|
9843
|
-
"multiple": true,
|
|
9844
|
-
"type": "option"
|
|
9845
|
-
},
|
|
9846
|
-
"debug": {
|
|
9847
|
-
"char": "d",
|
|
9848
|
-
"description": "Activate debug mode (more logs)",
|
|
9849
|
-
"name": "debug",
|
|
9850
|
-
"allowNo": false,
|
|
9851
|
-
"type": "boolean"
|
|
9852
|
-
},
|
|
9853
|
-
"websocket": {
|
|
9854
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9855
|
-
"name": "websocket",
|
|
9856
|
-
"hasDynamicHelp": false,
|
|
9857
|
-
"multiple": false,
|
|
9858
|
-
"type": "option"
|
|
9859
|
-
},
|
|
9860
|
-
"skipauth": {
|
|
9861
|
-
"description": "Skip authentication check when a default username is required",
|
|
9862
|
-
"name": "skipauth",
|
|
9863
|
-
"allowNo": false,
|
|
9864
|
-
"type": "boolean"
|
|
9865
|
-
}
|
|
9866
|
-
},
|
|
9867
|
-
"hasDynamicHelp": false,
|
|
9868
|
-
"hiddenAliases": [],
|
|
9869
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
9870
|
-
"pluginAlias": "sfdx-hardis",
|
|
9871
|
-
"pluginName": "sfdx-hardis",
|
|
9872
|
-
"pluginType": "core",
|
|
9873
|
-
"strict": true,
|
|
9874
|
-
"enableJsonFlag": true,
|
|
9875
|
-
"title": "Convert Profiles into Permission Sets",
|
|
9876
|
-
"requiresProject": true,
|
|
9877
|
-
"requiresSfdxPlugins": [
|
|
9878
|
-
"shane-sfdx-plugins"
|
|
9879
|
-
],
|
|
9880
|
-
"isESM": true,
|
|
9881
|
-
"relativePath": [
|
|
9882
|
-
"lib",
|
|
9883
|
-
"commands",
|
|
9884
|
-
"hardis",
|
|
9885
|
-
"project",
|
|
9886
|
-
"convert",
|
|
9887
|
-
"profilestopermsets.js"
|
|
9888
|
-
],
|
|
9889
|
-
"aliasPermutations": [],
|
|
9890
|
-
"permutations": [
|
|
9891
|
-
"hardis:project:convert:profilestopermsets",
|
|
9892
|
-
"project:hardis:convert:profilestopermsets",
|
|
9893
|
-
"project:convert:hardis:profilestopermsets",
|
|
9894
|
-
"project:convert:profilestopermsets:hardis",
|
|
9895
|
-
"hardis:convert:project:profilestopermsets",
|
|
9896
|
-
"convert:hardis:project:profilestopermsets",
|
|
9897
|
-
"convert:project:hardis:profilestopermsets",
|
|
9898
|
-
"convert:project:profilestopermsets:hardis",
|
|
9899
|
-
"hardis:convert:profilestopermsets:project",
|
|
9900
|
-
"convert:hardis:profilestopermsets:project",
|
|
9901
|
-
"convert:profilestopermsets:hardis:project",
|
|
9902
|
-
"convert:profilestopermsets:project:hardis",
|
|
9903
|
-
"hardis:project:profilestopermsets:convert",
|
|
9904
|
-
"project:hardis:profilestopermsets:convert",
|
|
9905
|
-
"project:profilestopermsets:hardis:convert",
|
|
9906
|
-
"project:profilestopermsets:convert:hardis",
|
|
9907
|
-
"hardis:profilestopermsets:project:convert",
|
|
9908
|
-
"profilestopermsets:hardis:project:convert",
|
|
9909
|
-
"profilestopermsets:project:hardis:convert",
|
|
9910
|
-
"profilestopermsets:project:convert:hardis",
|
|
9911
|
-
"hardis:profilestopermsets:convert:project",
|
|
9912
|
-
"profilestopermsets:hardis:convert:project",
|
|
9913
|
-
"profilestopermsets:convert:hardis:project",
|
|
9914
|
-
"profilestopermsets:convert:project:hardis"
|
|
9915
|
-
]
|
|
9916
|
-
},
|
|
9917
9821
|
"hardis:project:clean:emptyitems": {
|
|
9918
9822
|
"aliases": [],
|
|
9919
9823
|
"args": {},
|
|
@@ -11399,6 +11303,109 @@
|
|
|
11399
11303
|
"xml:clean:project:hardis"
|
|
11400
11304
|
]
|
|
11401
11305
|
},
|
|
11306
|
+
"hardis:project:convert:profilestopermsets": {
|
|
11307
|
+
"aliases": [],
|
|
11308
|
+
"args": {},
|
|
11309
|
+
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
11310
|
+
"examples": [
|
|
11311
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
11312
|
+
],
|
|
11313
|
+
"flags": {
|
|
11314
|
+
"json": {
|
|
11315
|
+
"description": "Format output as json.",
|
|
11316
|
+
"helpGroup": "GLOBAL",
|
|
11317
|
+
"name": "json",
|
|
11318
|
+
"allowNo": false,
|
|
11319
|
+
"type": "boolean"
|
|
11320
|
+
},
|
|
11321
|
+
"flags-dir": {
|
|
11322
|
+
"helpGroup": "GLOBAL",
|
|
11323
|
+
"name": "flags-dir",
|
|
11324
|
+
"summary": "Import flag values from a directory.",
|
|
11325
|
+
"hasDynamicHelp": false,
|
|
11326
|
+
"multiple": false,
|
|
11327
|
+
"type": "option"
|
|
11328
|
+
},
|
|
11329
|
+
"except": {
|
|
11330
|
+
"char": "e",
|
|
11331
|
+
"description": "List of filters",
|
|
11332
|
+
"name": "except",
|
|
11333
|
+
"default": [],
|
|
11334
|
+
"hasDynamicHelp": false,
|
|
11335
|
+
"multiple": true,
|
|
11336
|
+
"type": "option"
|
|
11337
|
+
},
|
|
11338
|
+
"debug": {
|
|
11339
|
+
"char": "d",
|
|
11340
|
+
"description": "Activate debug mode (more logs)",
|
|
11341
|
+
"name": "debug",
|
|
11342
|
+
"allowNo": false,
|
|
11343
|
+
"type": "boolean"
|
|
11344
|
+
},
|
|
11345
|
+
"websocket": {
|
|
11346
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11347
|
+
"name": "websocket",
|
|
11348
|
+
"hasDynamicHelp": false,
|
|
11349
|
+
"multiple": false,
|
|
11350
|
+
"type": "option"
|
|
11351
|
+
},
|
|
11352
|
+
"skipauth": {
|
|
11353
|
+
"description": "Skip authentication check when a default username is required",
|
|
11354
|
+
"name": "skipauth",
|
|
11355
|
+
"allowNo": false,
|
|
11356
|
+
"type": "boolean"
|
|
11357
|
+
}
|
|
11358
|
+
},
|
|
11359
|
+
"hasDynamicHelp": false,
|
|
11360
|
+
"hiddenAliases": [],
|
|
11361
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
11362
|
+
"pluginAlias": "sfdx-hardis",
|
|
11363
|
+
"pluginName": "sfdx-hardis",
|
|
11364
|
+
"pluginType": "core",
|
|
11365
|
+
"strict": true,
|
|
11366
|
+
"enableJsonFlag": true,
|
|
11367
|
+
"title": "Convert Profiles into Permission Sets",
|
|
11368
|
+
"requiresProject": true,
|
|
11369
|
+
"requiresSfdxPlugins": [
|
|
11370
|
+
"shane-sfdx-plugins"
|
|
11371
|
+
],
|
|
11372
|
+
"isESM": true,
|
|
11373
|
+
"relativePath": [
|
|
11374
|
+
"lib",
|
|
11375
|
+
"commands",
|
|
11376
|
+
"hardis",
|
|
11377
|
+
"project",
|
|
11378
|
+
"convert",
|
|
11379
|
+
"profilestopermsets.js"
|
|
11380
|
+
],
|
|
11381
|
+
"aliasPermutations": [],
|
|
11382
|
+
"permutations": [
|
|
11383
|
+
"hardis:project:convert:profilestopermsets",
|
|
11384
|
+
"project:hardis:convert:profilestopermsets",
|
|
11385
|
+
"project:convert:hardis:profilestopermsets",
|
|
11386
|
+
"project:convert:profilestopermsets:hardis",
|
|
11387
|
+
"hardis:convert:project:profilestopermsets",
|
|
11388
|
+
"convert:hardis:project:profilestopermsets",
|
|
11389
|
+
"convert:project:hardis:profilestopermsets",
|
|
11390
|
+
"convert:project:profilestopermsets:hardis",
|
|
11391
|
+
"hardis:convert:profilestopermsets:project",
|
|
11392
|
+
"convert:hardis:profilestopermsets:project",
|
|
11393
|
+
"convert:profilestopermsets:hardis:project",
|
|
11394
|
+
"convert:profilestopermsets:project:hardis",
|
|
11395
|
+
"hardis:project:profilestopermsets:convert",
|
|
11396
|
+
"project:hardis:profilestopermsets:convert",
|
|
11397
|
+
"project:profilestopermsets:hardis:convert",
|
|
11398
|
+
"project:profilestopermsets:convert:hardis",
|
|
11399
|
+
"hardis:profilestopermsets:project:convert",
|
|
11400
|
+
"profilestopermsets:hardis:project:convert",
|
|
11401
|
+
"profilestopermsets:project:hardis:convert",
|
|
11402
|
+
"profilestopermsets:project:convert:hardis",
|
|
11403
|
+
"hardis:profilestopermsets:convert:project",
|
|
11404
|
+
"profilestopermsets:hardis:convert:project",
|
|
11405
|
+
"profilestopermsets:convert:hardis:project",
|
|
11406
|
+
"profilestopermsets:convert:project:hardis"
|
|
11407
|
+
]
|
|
11408
|
+
},
|
|
11402
11409
|
"hardis:project:deploy:notify": {
|
|
11403
11410
|
"aliases": [],
|
|
11404
11411
|
"args": {},
|
|
@@ -12531,262 +12538,47 @@
|
|
|
12531
12538
|
"enableJsonFlag": true,
|
|
12532
12539
|
"requiresProject": true,
|
|
12533
12540
|
"isESM": true,
|
|
12534
|
-
"relativePath": [
|
|
12535
|
-
"lib",
|
|
12536
|
-
"commands",
|
|
12537
|
-
"hardis",
|
|
12538
|
-
"project",
|
|
12539
|
-
"deploy",
|
|
12540
|
-
"validate.js"
|
|
12541
|
-
],
|
|
12542
|
-
"aliasPermutations": [
|
|
12543
|
-
"hardis:deploy:validate",
|
|
12544
|
-
"deploy:hardis:validate",
|
|
12545
|
-
"deploy:validate:hardis",
|
|
12546
|
-
"hardis:validate:deploy",
|
|
12547
|
-
"validate:hardis:deploy",
|
|
12548
|
-
"validate:deploy:hardis"
|
|
12549
|
-
],
|
|
12550
|
-
"permutations": [
|
|
12551
|
-
"hardis:project:deploy:validate",
|
|
12552
|
-
"project:hardis:deploy:validate",
|
|
12553
|
-
"project:deploy:hardis:validate",
|
|
12554
|
-
"project:deploy:validate:hardis",
|
|
12555
|
-
"hardis:deploy:project:validate",
|
|
12556
|
-
"deploy:hardis:project:validate",
|
|
12557
|
-
"deploy:project:hardis:validate",
|
|
12558
|
-
"deploy:project:validate:hardis",
|
|
12559
|
-
"hardis:deploy:validate:project",
|
|
12560
|
-
"deploy:hardis:validate:project",
|
|
12561
|
-
"deploy:validate:hardis:project",
|
|
12562
|
-
"deploy:validate:project:hardis",
|
|
12563
|
-
"hardis:project:validate:deploy",
|
|
12564
|
-
"project:hardis:validate:deploy",
|
|
12565
|
-
"project:validate:hardis:deploy",
|
|
12566
|
-
"project:validate:deploy:hardis",
|
|
12567
|
-
"hardis:validate:project:deploy",
|
|
12568
|
-
"validate:hardis:project:deploy",
|
|
12569
|
-
"validate:project:hardis:deploy",
|
|
12570
|
-
"validate:project:deploy:hardis",
|
|
12571
|
-
"hardis:validate:deploy:project",
|
|
12572
|
-
"validate:hardis:deploy:project",
|
|
12573
|
-
"validate:deploy:hardis:project",
|
|
12574
|
-
"validate:deploy:project:hardis"
|
|
12575
|
-
]
|
|
12576
|
-
},
|
|
12577
|
-
"hardis:project:fix:profiletabs": {
|
|
12578
|
-
"aliases": [],
|
|
12579
|
-
"args": {},
|
|
12580
|
-
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
12581
|
-
"examples": [
|
|
12582
|
-
"$ sf hardis:project:fix:profiletabs"
|
|
12583
|
-
],
|
|
12584
|
-
"flags": {
|
|
12585
|
-
"json": {
|
|
12586
|
-
"description": "Format output as json.",
|
|
12587
|
-
"helpGroup": "GLOBAL",
|
|
12588
|
-
"name": "json",
|
|
12589
|
-
"allowNo": false,
|
|
12590
|
-
"type": "boolean"
|
|
12591
|
-
},
|
|
12592
|
-
"flags-dir": {
|
|
12593
|
-
"helpGroup": "GLOBAL",
|
|
12594
|
-
"name": "flags-dir",
|
|
12595
|
-
"summary": "Import flag values from a directory.",
|
|
12596
|
-
"hasDynamicHelp": false,
|
|
12597
|
-
"multiple": false,
|
|
12598
|
-
"type": "option"
|
|
12599
|
-
},
|
|
12600
|
-
"path": {
|
|
12601
|
-
"char": "p",
|
|
12602
|
-
"description": "Root folder",
|
|
12603
|
-
"name": "path",
|
|
12604
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12605
|
-
"hasDynamicHelp": false,
|
|
12606
|
-
"multiple": false,
|
|
12607
|
-
"type": "option"
|
|
12608
|
-
},
|
|
12609
|
-
"debug": {
|
|
12610
|
-
"char": "d",
|
|
12611
|
-
"description": "Activate debug mode (more logs)",
|
|
12612
|
-
"name": "debug",
|
|
12613
|
-
"allowNo": false,
|
|
12614
|
-
"type": "boolean"
|
|
12615
|
-
},
|
|
12616
|
-
"websocket": {
|
|
12617
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12618
|
-
"name": "websocket",
|
|
12619
|
-
"hasDynamicHelp": false,
|
|
12620
|
-
"multiple": false,
|
|
12621
|
-
"type": "option"
|
|
12622
|
-
},
|
|
12623
|
-
"skipauth": {
|
|
12624
|
-
"description": "Skip authentication check when a default username is required",
|
|
12625
|
-
"name": "skipauth",
|
|
12626
|
-
"allowNo": false,
|
|
12627
|
-
"type": "boolean"
|
|
12628
|
-
},
|
|
12629
|
-
"target-org": {
|
|
12630
|
-
"aliases": [
|
|
12631
|
-
"targetusername",
|
|
12632
|
-
"u"
|
|
12633
|
-
],
|
|
12634
|
-
"char": "o",
|
|
12635
|
-
"deprecateAliases": true,
|
|
12636
|
-
"name": "target-org",
|
|
12637
|
-
"noCacheDefault": true,
|
|
12638
|
-
"required": true,
|
|
12639
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
12640
|
-
"hasDynamicHelp": true,
|
|
12641
|
-
"multiple": false,
|
|
12642
|
-
"type": "option"
|
|
12643
|
-
}
|
|
12644
|
-
},
|
|
12645
|
-
"hasDynamicHelp": true,
|
|
12646
|
-
"hiddenAliases": [],
|
|
12647
|
-
"id": "hardis:project:fix:profiletabs",
|
|
12648
|
-
"pluginAlias": "sfdx-hardis",
|
|
12649
|
-
"pluginName": "sfdx-hardis",
|
|
12650
|
-
"pluginType": "core",
|
|
12651
|
-
"strict": true,
|
|
12652
|
-
"enableJsonFlag": true,
|
|
12653
|
-
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
12654
|
-
"requiresProject": true,
|
|
12655
|
-
"isESM": true,
|
|
12656
|
-
"relativePath": [
|
|
12657
|
-
"lib",
|
|
12658
|
-
"commands",
|
|
12659
|
-
"hardis",
|
|
12660
|
-
"project",
|
|
12661
|
-
"fix",
|
|
12662
|
-
"profiletabs.js"
|
|
12663
|
-
],
|
|
12664
|
-
"aliasPermutations": [],
|
|
12665
|
-
"permutations": [
|
|
12666
|
-
"hardis:project:fix:profiletabs",
|
|
12667
|
-
"project:hardis:fix:profiletabs",
|
|
12668
|
-
"project:fix:hardis:profiletabs",
|
|
12669
|
-
"project:fix:profiletabs:hardis",
|
|
12670
|
-
"hardis:fix:project:profiletabs",
|
|
12671
|
-
"fix:hardis:project:profiletabs",
|
|
12672
|
-
"fix:project:hardis:profiletabs",
|
|
12673
|
-
"fix:project:profiletabs:hardis",
|
|
12674
|
-
"hardis:fix:profiletabs:project",
|
|
12675
|
-
"fix:hardis:profiletabs:project",
|
|
12676
|
-
"fix:profiletabs:hardis:project",
|
|
12677
|
-
"fix:profiletabs:project:hardis",
|
|
12678
|
-
"hardis:project:profiletabs:fix",
|
|
12679
|
-
"project:hardis:profiletabs:fix",
|
|
12680
|
-
"project:profiletabs:hardis:fix",
|
|
12681
|
-
"project:profiletabs:fix:hardis",
|
|
12682
|
-
"hardis:profiletabs:project:fix",
|
|
12683
|
-
"profiletabs:hardis:project:fix",
|
|
12684
|
-
"profiletabs:project:hardis:fix",
|
|
12685
|
-
"profiletabs:project:fix:hardis",
|
|
12686
|
-
"hardis:profiletabs:fix:project",
|
|
12687
|
-
"profiletabs:hardis:fix:project",
|
|
12688
|
-
"profiletabs:fix:hardis:project",
|
|
12689
|
-
"profiletabs:fix:project:hardis"
|
|
12690
|
-
]
|
|
12691
|
-
},
|
|
12692
|
-
"hardis:project:fix:v53flexipages": {
|
|
12693
|
-
"aliases": [],
|
|
12694
|
-
"args": {},
|
|
12695
|
-
"description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
|
|
12696
|
-
"examples": [
|
|
12697
|
-
"$ sf hardis:project:fix:v53flexipages"
|
|
12698
|
-
],
|
|
12699
|
-
"flags": {
|
|
12700
|
-
"json": {
|
|
12701
|
-
"description": "Format output as json.",
|
|
12702
|
-
"helpGroup": "GLOBAL",
|
|
12703
|
-
"name": "json",
|
|
12704
|
-
"allowNo": false,
|
|
12705
|
-
"type": "boolean"
|
|
12706
|
-
},
|
|
12707
|
-
"flags-dir": {
|
|
12708
|
-
"helpGroup": "GLOBAL",
|
|
12709
|
-
"name": "flags-dir",
|
|
12710
|
-
"summary": "Import flag values from a directory.",
|
|
12711
|
-
"hasDynamicHelp": false,
|
|
12712
|
-
"multiple": false,
|
|
12713
|
-
"type": "option"
|
|
12714
|
-
},
|
|
12715
|
-
"path": {
|
|
12716
|
-
"char": "p",
|
|
12717
|
-
"description": "Root folder",
|
|
12718
|
-
"name": "path",
|
|
12719
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12720
|
-
"hasDynamicHelp": false,
|
|
12721
|
-
"multiple": false,
|
|
12722
|
-
"type": "option"
|
|
12723
|
-
},
|
|
12724
|
-
"debug": {
|
|
12725
|
-
"char": "d",
|
|
12726
|
-
"description": "Activate debug mode (more logs)",
|
|
12727
|
-
"name": "debug",
|
|
12728
|
-
"allowNo": false,
|
|
12729
|
-
"type": "boolean"
|
|
12730
|
-
},
|
|
12731
|
-
"websocket": {
|
|
12732
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12733
|
-
"name": "websocket",
|
|
12734
|
-
"hasDynamicHelp": false,
|
|
12735
|
-
"multiple": false,
|
|
12736
|
-
"type": "option"
|
|
12737
|
-
},
|
|
12738
|
-
"skipauth": {
|
|
12739
|
-
"description": "Skip authentication check when a default username is required",
|
|
12740
|
-
"name": "skipauth",
|
|
12741
|
-
"allowNo": false,
|
|
12742
|
-
"type": "boolean"
|
|
12743
|
-
}
|
|
12744
|
-
},
|
|
12745
|
-
"hasDynamicHelp": false,
|
|
12746
|
-
"hiddenAliases": [],
|
|
12747
|
-
"id": "hardis:project:fix:v53flexipages",
|
|
12748
|
-
"pluginAlias": "sfdx-hardis",
|
|
12749
|
-
"pluginName": "sfdx-hardis",
|
|
12750
|
-
"pluginType": "core",
|
|
12751
|
-
"strict": true,
|
|
12752
|
-
"enableJsonFlag": true,
|
|
12753
|
-
"title": "Fix flexipages for v53",
|
|
12754
|
-
"requiresProject": true,
|
|
12755
|
-
"isESM": true,
|
|
12756
|
-
"relativePath": [
|
|
12757
|
-
"lib",
|
|
12758
|
-
"commands",
|
|
12759
|
-
"hardis",
|
|
12760
|
-
"project",
|
|
12761
|
-
"fix",
|
|
12762
|
-
"v53flexipages.js"
|
|
12763
|
-
],
|
|
12764
|
-
"aliasPermutations": [],
|
|
12765
|
-
"permutations": [
|
|
12766
|
-
"hardis:project:fix:v53flexipages",
|
|
12767
|
-
"project:hardis:fix:v53flexipages",
|
|
12768
|
-
"project:fix:hardis:v53flexipages",
|
|
12769
|
-
"project:fix:v53flexipages:hardis",
|
|
12770
|
-
"hardis:fix:project:v53flexipages",
|
|
12771
|
-
"fix:hardis:project:v53flexipages",
|
|
12772
|
-
"fix:project:hardis:v53flexipages",
|
|
12773
|
-
"fix:project:v53flexipages:hardis",
|
|
12774
|
-
"hardis:fix:v53flexipages:project",
|
|
12775
|
-
"fix:hardis:v53flexipages:project",
|
|
12776
|
-
"fix:v53flexipages:hardis:project",
|
|
12777
|
-
"fix:v53flexipages:project:hardis",
|
|
12778
|
-
"hardis:project:v53flexipages:fix",
|
|
12779
|
-
"project:hardis:v53flexipages:fix",
|
|
12780
|
-
"project:v53flexipages:hardis:fix",
|
|
12781
|
-
"project:v53flexipages:fix:hardis",
|
|
12782
|
-
"hardis:v53flexipages:project:fix",
|
|
12783
|
-
"v53flexipages:hardis:project:fix",
|
|
12784
|
-
"v53flexipages:project:hardis:fix",
|
|
12785
|
-
"v53flexipages:project:fix:hardis",
|
|
12786
|
-
"hardis:v53flexipages:fix:project",
|
|
12787
|
-
"v53flexipages:hardis:fix:project",
|
|
12788
|
-
"v53flexipages:fix:hardis:project",
|
|
12789
|
-
"v53flexipages:fix:project:hardis"
|
|
12541
|
+
"relativePath": [
|
|
12542
|
+
"lib",
|
|
12543
|
+
"commands",
|
|
12544
|
+
"hardis",
|
|
12545
|
+
"project",
|
|
12546
|
+
"deploy",
|
|
12547
|
+
"validate.js"
|
|
12548
|
+
],
|
|
12549
|
+
"aliasPermutations": [
|
|
12550
|
+
"hardis:deploy:validate",
|
|
12551
|
+
"deploy:hardis:validate",
|
|
12552
|
+
"deploy:validate:hardis",
|
|
12553
|
+
"hardis:validate:deploy",
|
|
12554
|
+
"validate:hardis:deploy",
|
|
12555
|
+
"validate:deploy:hardis"
|
|
12556
|
+
],
|
|
12557
|
+
"permutations": [
|
|
12558
|
+
"hardis:project:deploy:validate",
|
|
12559
|
+
"project:hardis:deploy:validate",
|
|
12560
|
+
"project:deploy:hardis:validate",
|
|
12561
|
+
"project:deploy:validate:hardis",
|
|
12562
|
+
"hardis:deploy:project:validate",
|
|
12563
|
+
"deploy:hardis:project:validate",
|
|
12564
|
+
"deploy:project:hardis:validate",
|
|
12565
|
+
"deploy:project:validate:hardis",
|
|
12566
|
+
"hardis:deploy:validate:project",
|
|
12567
|
+
"deploy:hardis:validate:project",
|
|
12568
|
+
"deploy:validate:hardis:project",
|
|
12569
|
+
"deploy:validate:project:hardis",
|
|
12570
|
+
"hardis:project:validate:deploy",
|
|
12571
|
+
"project:hardis:validate:deploy",
|
|
12572
|
+
"project:validate:hardis:deploy",
|
|
12573
|
+
"project:validate:deploy:hardis",
|
|
12574
|
+
"hardis:validate:project:deploy",
|
|
12575
|
+
"validate:hardis:project:deploy",
|
|
12576
|
+
"validate:project:hardis:deploy",
|
|
12577
|
+
"validate:project:deploy:hardis",
|
|
12578
|
+
"hardis:validate:deploy:project",
|
|
12579
|
+
"validate:hardis:deploy:project",
|
|
12580
|
+
"validate:deploy:hardis:project",
|
|
12581
|
+
"validate:deploy:project:hardis"
|
|
12790
12582
|
]
|
|
12791
12583
|
},
|
|
12792
12584
|
"hardis:project:generate:bypass": {
|
|
@@ -13184,6 +12976,221 @@
|
|
|
13184
12976
|
"gitdelta:generate:project:hardis"
|
|
13185
12977
|
]
|
|
13186
12978
|
},
|
|
12979
|
+
"hardis:project:fix:profiletabs": {
|
|
12980
|
+
"aliases": [],
|
|
12981
|
+
"args": {},
|
|
12982
|
+
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
12983
|
+
"examples": [
|
|
12984
|
+
"$ sf hardis:project:fix:profiletabs"
|
|
12985
|
+
],
|
|
12986
|
+
"flags": {
|
|
12987
|
+
"json": {
|
|
12988
|
+
"description": "Format output as json.",
|
|
12989
|
+
"helpGroup": "GLOBAL",
|
|
12990
|
+
"name": "json",
|
|
12991
|
+
"allowNo": false,
|
|
12992
|
+
"type": "boolean"
|
|
12993
|
+
},
|
|
12994
|
+
"flags-dir": {
|
|
12995
|
+
"helpGroup": "GLOBAL",
|
|
12996
|
+
"name": "flags-dir",
|
|
12997
|
+
"summary": "Import flag values from a directory.",
|
|
12998
|
+
"hasDynamicHelp": false,
|
|
12999
|
+
"multiple": false,
|
|
13000
|
+
"type": "option"
|
|
13001
|
+
},
|
|
13002
|
+
"path": {
|
|
13003
|
+
"char": "p",
|
|
13004
|
+
"description": "Root folder",
|
|
13005
|
+
"name": "path",
|
|
13006
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
13007
|
+
"hasDynamicHelp": false,
|
|
13008
|
+
"multiple": false,
|
|
13009
|
+
"type": "option"
|
|
13010
|
+
},
|
|
13011
|
+
"debug": {
|
|
13012
|
+
"char": "d",
|
|
13013
|
+
"description": "Activate debug mode (more logs)",
|
|
13014
|
+
"name": "debug",
|
|
13015
|
+
"allowNo": false,
|
|
13016
|
+
"type": "boolean"
|
|
13017
|
+
},
|
|
13018
|
+
"websocket": {
|
|
13019
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
13020
|
+
"name": "websocket",
|
|
13021
|
+
"hasDynamicHelp": false,
|
|
13022
|
+
"multiple": false,
|
|
13023
|
+
"type": "option"
|
|
13024
|
+
},
|
|
13025
|
+
"skipauth": {
|
|
13026
|
+
"description": "Skip authentication check when a default username is required",
|
|
13027
|
+
"name": "skipauth",
|
|
13028
|
+
"allowNo": false,
|
|
13029
|
+
"type": "boolean"
|
|
13030
|
+
},
|
|
13031
|
+
"target-org": {
|
|
13032
|
+
"aliases": [
|
|
13033
|
+
"targetusername",
|
|
13034
|
+
"u"
|
|
13035
|
+
],
|
|
13036
|
+
"char": "o",
|
|
13037
|
+
"deprecateAliases": true,
|
|
13038
|
+
"name": "target-org",
|
|
13039
|
+
"noCacheDefault": true,
|
|
13040
|
+
"required": true,
|
|
13041
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
13042
|
+
"hasDynamicHelp": true,
|
|
13043
|
+
"multiple": false,
|
|
13044
|
+
"type": "option"
|
|
13045
|
+
}
|
|
13046
|
+
},
|
|
13047
|
+
"hasDynamicHelp": true,
|
|
13048
|
+
"hiddenAliases": [],
|
|
13049
|
+
"id": "hardis:project:fix:profiletabs",
|
|
13050
|
+
"pluginAlias": "sfdx-hardis",
|
|
13051
|
+
"pluginName": "sfdx-hardis",
|
|
13052
|
+
"pluginType": "core",
|
|
13053
|
+
"strict": true,
|
|
13054
|
+
"enableJsonFlag": true,
|
|
13055
|
+
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
13056
|
+
"requiresProject": true,
|
|
13057
|
+
"isESM": true,
|
|
13058
|
+
"relativePath": [
|
|
13059
|
+
"lib",
|
|
13060
|
+
"commands",
|
|
13061
|
+
"hardis",
|
|
13062
|
+
"project",
|
|
13063
|
+
"fix",
|
|
13064
|
+
"profiletabs.js"
|
|
13065
|
+
],
|
|
13066
|
+
"aliasPermutations": [],
|
|
13067
|
+
"permutations": [
|
|
13068
|
+
"hardis:project:fix:profiletabs",
|
|
13069
|
+
"project:hardis:fix:profiletabs",
|
|
13070
|
+
"project:fix:hardis:profiletabs",
|
|
13071
|
+
"project:fix:profiletabs:hardis",
|
|
13072
|
+
"hardis:fix:project:profiletabs",
|
|
13073
|
+
"fix:hardis:project:profiletabs",
|
|
13074
|
+
"fix:project:hardis:profiletabs",
|
|
13075
|
+
"fix:project:profiletabs:hardis",
|
|
13076
|
+
"hardis:fix:profiletabs:project",
|
|
13077
|
+
"fix:hardis:profiletabs:project",
|
|
13078
|
+
"fix:profiletabs:hardis:project",
|
|
13079
|
+
"fix:profiletabs:project:hardis",
|
|
13080
|
+
"hardis:project:profiletabs:fix",
|
|
13081
|
+
"project:hardis:profiletabs:fix",
|
|
13082
|
+
"project:profiletabs:hardis:fix",
|
|
13083
|
+
"project:profiletabs:fix:hardis",
|
|
13084
|
+
"hardis:profiletabs:project:fix",
|
|
13085
|
+
"profiletabs:hardis:project:fix",
|
|
13086
|
+
"profiletabs:project:hardis:fix",
|
|
13087
|
+
"profiletabs:project:fix:hardis",
|
|
13088
|
+
"hardis:profiletabs:fix:project",
|
|
13089
|
+
"profiletabs:hardis:fix:project",
|
|
13090
|
+
"profiletabs:fix:hardis:project",
|
|
13091
|
+
"profiletabs:fix:project:hardis"
|
|
13092
|
+
]
|
|
13093
|
+
},
|
|
13094
|
+
"hardis:project:fix:v53flexipages": {
|
|
13095
|
+
"aliases": [],
|
|
13096
|
+
"args": {},
|
|
13097
|
+
"description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
|
|
13098
|
+
"examples": [
|
|
13099
|
+
"$ sf hardis:project:fix:v53flexipages"
|
|
13100
|
+
],
|
|
13101
|
+
"flags": {
|
|
13102
|
+
"json": {
|
|
13103
|
+
"description": "Format output as json.",
|
|
13104
|
+
"helpGroup": "GLOBAL",
|
|
13105
|
+
"name": "json",
|
|
13106
|
+
"allowNo": false,
|
|
13107
|
+
"type": "boolean"
|
|
13108
|
+
},
|
|
13109
|
+
"flags-dir": {
|
|
13110
|
+
"helpGroup": "GLOBAL",
|
|
13111
|
+
"name": "flags-dir",
|
|
13112
|
+
"summary": "Import flag values from a directory.",
|
|
13113
|
+
"hasDynamicHelp": false,
|
|
13114
|
+
"multiple": false,
|
|
13115
|
+
"type": "option"
|
|
13116
|
+
},
|
|
13117
|
+
"path": {
|
|
13118
|
+
"char": "p",
|
|
13119
|
+
"description": "Root folder",
|
|
13120
|
+
"name": "path",
|
|
13121
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
13122
|
+
"hasDynamicHelp": false,
|
|
13123
|
+
"multiple": false,
|
|
13124
|
+
"type": "option"
|
|
13125
|
+
},
|
|
13126
|
+
"debug": {
|
|
13127
|
+
"char": "d",
|
|
13128
|
+
"description": "Activate debug mode (more logs)",
|
|
13129
|
+
"name": "debug",
|
|
13130
|
+
"allowNo": false,
|
|
13131
|
+
"type": "boolean"
|
|
13132
|
+
},
|
|
13133
|
+
"websocket": {
|
|
13134
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
13135
|
+
"name": "websocket",
|
|
13136
|
+
"hasDynamicHelp": false,
|
|
13137
|
+
"multiple": false,
|
|
13138
|
+
"type": "option"
|
|
13139
|
+
},
|
|
13140
|
+
"skipauth": {
|
|
13141
|
+
"description": "Skip authentication check when a default username is required",
|
|
13142
|
+
"name": "skipauth",
|
|
13143
|
+
"allowNo": false,
|
|
13144
|
+
"type": "boolean"
|
|
13145
|
+
}
|
|
13146
|
+
},
|
|
13147
|
+
"hasDynamicHelp": false,
|
|
13148
|
+
"hiddenAliases": [],
|
|
13149
|
+
"id": "hardis:project:fix:v53flexipages",
|
|
13150
|
+
"pluginAlias": "sfdx-hardis",
|
|
13151
|
+
"pluginName": "sfdx-hardis",
|
|
13152
|
+
"pluginType": "core",
|
|
13153
|
+
"strict": true,
|
|
13154
|
+
"enableJsonFlag": true,
|
|
13155
|
+
"title": "Fix flexipages for v53",
|
|
13156
|
+
"requiresProject": true,
|
|
13157
|
+
"isESM": true,
|
|
13158
|
+
"relativePath": [
|
|
13159
|
+
"lib",
|
|
13160
|
+
"commands",
|
|
13161
|
+
"hardis",
|
|
13162
|
+
"project",
|
|
13163
|
+
"fix",
|
|
13164
|
+
"v53flexipages.js"
|
|
13165
|
+
],
|
|
13166
|
+
"aliasPermutations": [],
|
|
13167
|
+
"permutations": [
|
|
13168
|
+
"hardis:project:fix:v53flexipages",
|
|
13169
|
+
"project:hardis:fix:v53flexipages",
|
|
13170
|
+
"project:fix:hardis:v53flexipages",
|
|
13171
|
+
"project:fix:v53flexipages:hardis",
|
|
13172
|
+
"hardis:fix:project:v53flexipages",
|
|
13173
|
+
"fix:hardis:project:v53flexipages",
|
|
13174
|
+
"fix:project:hardis:v53flexipages",
|
|
13175
|
+
"fix:project:v53flexipages:hardis",
|
|
13176
|
+
"hardis:fix:v53flexipages:project",
|
|
13177
|
+
"fix:hardis:v53flexipages:project",
|
|
13178
|
+
"fix:v53flexipages:hardis:project",
|
|
13179
|
+
"fix:v53flexipages:project:hardis",
|
|
13180
|
+
"hardis:project:v53flexipages:fix",
|
|
13181
|
+
"project:hardis:v53flexipages:fix",
|
|
13182
|
+
"project:v53flexipages:hardis:fix",
|
|
13183
|
+
"project:v53flexipages:fix:hardis",
|
|
13184
|
+
"hardis:v53flexipages:project:fix",
|
|
13185
|
+
"v53flexipages:hardis:project:fix",
|
|
13186
|
+
"v53flexipages:project:hardis:fix",
|
|
13187
|
+
"v53flexipages:project:fix:hardis",
|
|
13188
|
+
"hardis:v53flexipages:fix:project",
|
|
13189
|
+
"v53flexipages:hardis:fix:project",
|
|
13190
|
+
"v53flexipages:fix:hardis:project",
|
|
13191
|
+
"v53flexipages:fix:project:hardis"
|
|
13192
|
+
]
|
|
13193
|
+
},
|
|
13187
13194
|
"hardis:project:metadata:findduplicates": {
|
|
13188
13195
|
"aliases": [],
|
|
13189
13196
|
"args": {},
|
|
@@ -15271,5 +15278,5 @@
|
|
|
15271
15278
|
]
|
|
15272
15279
|
}
|
|
15273
15280
|
},
|
|
15274
|
-
"version": "6.
|
|
15281
|
+
"version": "6.5.1"
|
|
15275
15282
|
}
|