sfdx-hardis 5.40.1-beta202506151204.0 → 5.41.1-alpha202506172136.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/lib/commands/hardis/project/deploy/notify.js +2 -2
  3. package/lib/commands/hardis/project/deploy/notify.js.map +1 -1
  4. package/lib/commands/hardis/project/deploy/smart.d.ts +11 -1
  5. package/lib/commands/hardis/project/deploy/smart.js +95 -30
  6. package/lib/commands/hardis/project/deploy/smart.js.map +1 -1
  7. package/lib/common/gitProvider/azureDevops.d.ts +2 -2
  8. package/lib/common/gitProvider/azureDevops.js +16 -9
  9. package/lib/common/gitProvider/azureDevops.js.map +1 -1
  10. package/lib/common/gitProvider/bitbucket.d.ts +2 -2
  11. package/lib/common/gitProvider/bitbucket.js +15 -6
  12. package/lib/common/gitProvider/bitbucket.js.map +1 -1
  13. package/lib/common/gitProvider/gitProviderRoot.d.ts +4 -3
  14. package/lib/common/gitProvider/gitProviderRoot.js +20 -0
  15. package/lib/common/gitProvider/gitProviderRoot.js.map +1 -1
  16. package/lib/common/gitProvider/github.d.ts +2 -2
  17. package/lib/common/gitProvider/github.js +14 -6
  18. package/lib/common/gitProvider/github.js.map +1 -1
  19. package/lib/common/gitProvider/gitlab.d.ts +2 -2
  20. package/lib/common/gitProvider/gitlab.js +17 -7
  21. package/lib/common/gitProvider/gitlab.js.map +1 -1
  22. package/lib/common/gitProvider/index.d.ts +42 -1
  23. package/lib/common/gitProvider/index.js +12 -5
  24. package/lib/common/gitProvider/index.js.map +1 -1
  25. package/lib/common/ticketProvider/azureBoardsProvider.d.ts +3 -2
  26. package/lib/common/ticketProvider/azureBoardsProvider.js +7 -7
  27. package/lib/common/ticketProvider/azureBoardsProvider.js.map +1 -1
  28. package/lib/common/ticketProvider/genericProvider.d.ts +2 -1
  29. package/lib/common/ticketProvider/genericProvider.js.map +1 -1
  30. package/lib/common/ticketProvider/index.d.ts +2 -1
  31. package/lib/common/ticketProvider/index.js.map +1 -1
  32. package/lib/common/ticketProvider/jiraProvider.d.ts +2 -1
  33. package/lib/common/ticketProvider/jiraProvider.js +2 -2
  34. package/lib/common/ticketProvider/jiraProvider.js.map +1 -1
  35. package/lib/common/ticketProvider/ticketProviderRoot.d.ts +2 -1
  36. package/lib/common/ticketProvider/ticketProviderRoot.js +1 -1
  37. package/lib/common/ticketProvider/ticketProviderRoot.js.map +1 -1
  38. package/lib/common/utils/deployTips.js.map +1 -1
  39. package/lib/common/utils/deployUtils.d.ts +17 -1
  40. package/lib/common/utils/deployUtils.js +30 -11
  41. package/lib/common/utils/deployUtils.js.map +1 -1
  42. package/lib/common/utils/gitUtils.d.ts +2 -1
  43. package/lib/common/utils/gitUtils.js +8 -9
  44. package/lib/common/utils/gitUtils.js.map +1 -1
  45. package/lib/common/utils/orgUtils.js +2 -0
  46. package/lib/common/utils/orgUtils.js.map +1 -1
  47. package/oclif.manifest.json +820 -820
  48. package/package.json +1 -1
@@ -129,12 +129,13 @@
129
129
  "clear:cache:hardis"
130
130
  ]
131
131
  },
132
- "hardis:config:get": {
132
+ "hardis:auth:login": {
133
133
  "aliases": [],
134
134
  "args": {},
135
- "description": "Returns sfdx-hardis project config for a given level",
135
+ "description": "\nLogins to a Salesforce org from CI/CD workflows.\n\nWill use the variables and files defined by configuration commands:\n\n- CI/CD repos: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n- Monitoring repos: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n\nIf you have a technical org (for example to call Agentforce from another org, you can define variable SFDX_AUTH_URL_TECHNICAL_ORG and it will authenticate it with alias TECHNICAL_ORG)\n\nYou can get SFDX_AUTH_URL_TECHNICAL_ORG value by running the command: `sf org display --verbose --json` and copy the value of the field `sfdxAuthUrl` in the output.\n",
136
136
  "examples": [
137
- "$ sf hardis:project:deploy:sources:metadata"
137
+ "$ sf hardis:auth:login",
138
+ "CI=true sf hardis:auth:login"
138
139
  ],
139
140
  "flags": {
140
141
  "json": {
@@ -152,20 +153,28 @@
152
153
  "multiple": false,
153
154
  "type": "option"
154
155
  },
155
- "level": {
156
- "char": "l",
157
- "description": "project,branch or user",
158
- "name": "level",
159
- "default": "project",
156
+ "instanceurl": {
157
+ "char": "r",
158
+ "description": "URL of org instance",
159
+ "name": "instanceurl",
160
160
  "hasDynamicHelp": false,
161
161
  "multiple": false,
162
- "options": [
163
- "project",
164
- "branch",
165
- "user"
166
- ],
167
162
  "type": "option"
168
163
  },
164
+ "devhub": {
165
+ "char": "h",
166
+ "description": "Also connect associated DevHub",
167
+ "name": "devhub",
168
+ "allowNo": false,
169
+ "type": "boolean"
170
+ },
171
+ "scratchorg": {
172
+ "char": "s",
173
+ "description": "Scratch org",
174
+ "name": "scratchorg",
175
+ "allowNo": false,
176
+ "type": "boolean"
177
+ },
169
178
  "debug": {
170
179
  "char": "d",
171
180
  "description": "Activate debug mode (more logs)",
@@ -189,39 +198,38 @@
189
198
  },
190
199
  "hasDynamicHelp": false,
191
200
  "hiddenAliases": [],
192
- "id": "hardis:config:get",
201
+ "id": "hardis:auth:login",
193
202
  "pluginAlias": "sfdx-hardis",
194
203
  "pluginName": "sfdx-hardis",
195
204
  "pluginType": "core",
196
205
  "strict": true,
197
206
  "enableJsonFlag": true,
198
- "title": "Deploy metadata sources to org",
207
+ "title": "Login",
199
208
  "requiresProject": false,
200
209
  "isESM": true,
201
210
  "relativePath": [
202
211
  "lib",
203
212
  "commands",
204
213
  "hardis",
205
- "config",
206
- "get.js"
214
+ "auth",
215
+ "login.js"
207
216
  ],
208
217
  "aliasPermutations": [],
209
218
  "permutations": [
210
- "hardis:config:get",
211
- "config:hardis:get",
212
- "config:get:hardis",
213
- "hardis:get:config",
214
- "get:hardis:config",
215
- "get:config:hardis"
219
+ "hardis:auth:login",
220
+ "auth:hardis:login",
221
+ "auth:login:hardis",
222
+ "hardis:login:auth",
223
+ "login:hardis:auth",
224
+ "login:auth:hardis"
216
225
  ]
217
226
  },
218
- "hardis:auth:login": {
227
+ "hardis:config:get": {
219
228
  "aliases": [],
220
229
  "args": {},
221
- "description": "\nLogins to a Salesforce org from CI/CD workflows.\n\nWill use the variables and files defined by configuration commands:\n\n- CI/CD repos: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n- Monitoring repos: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n\nIf you have a technical org (for example to call Agentforce from another org, you can define variable SFDX_AUTH_URL_TECHNICAL_ORG and it will authenticate it with alias TECHNICAL_ORG)\n\nYou can get SFDX_AUTH_URL_TECHNICAL_ORG value by running the command: `sf org display --verbose --json` and copy the value of the field `sfdxAuthUrl` in the output.\n",
230
+ "description": "Returns sfdx-hardis project config for a given level",
222
231
  "examples": [
223
- "$ sf hardis:auth:login",
224
- "CI=true sf hardis:auth:login"
232
+ "$ sf hardis:project:deploy:sources:metadata"
225
233
  ],
226
234
  "flags": {
227
235
  "json": {
@@ -239,28 +247,20 @@
239
247
  "multiple": false,
240
248
  "type": "option"
241
249
  },
242
- "instanceurl": {
243
- "char": "r",
244
- "description": "URL of org instance",
245
- "name": "instanceurl",
250
+ "level": {
251
+ "char": "l",
252
+ "description": "project,branch or user",
253
+ "name": "level",
254
+ "default": "project",
246
255
  "hasDynamicHelp": false,
247
256
  "multiple": false,
257
+ "options": [
258
+ "project",
259
+ "branch",
260
+ "user"
261
+ ],
248
262
  "type": "option"
249
263
  },
250
- "devhub": {
251
- "char": "h",
252
- "description": "Also connect associated DevHub",
253
- "name": "devhub",
254
- "allowNo": false,
255
- "type": "boolean"
256
- },
257
- "scratchorg": {
258
- "char": "s",
259
- "description": "Scratch org",
260
- "name": "scratchorg",
261
- "allowNo": false,
262
- "type": "boolean"
263
- },
264
264
  "debug": {
265
265
  "char": "d",
266
266
  "description": "Activate debug mode (more logs)",
@@ -284,30 +284,30 @@
284
284
  },
285
285
  "hasDynamicHelp": false,
286
286
  "hiddenAliases": [],
287
- "id": "hardis:auth:login",
287
+ "id": "hardis:config:get",
288
288
  "pluginAlias": "sfdx-hardis",
289
289
  "pluginName": "sfdx-hardis",
290
290
  "pluginType": "core",
291
291
  "strict": true,
292
292
  "enableJsonFlag": true,
293
- "title": "Login",
293
+ "title": "Deploy metadata sources to org",
294
294
  "requiresProject": false,
295
295
  "isESM": true,
296
296
  "relativePath": [
297
297
  "lib",
298
298
  "commands",
299
299
  "hardis",
300
- "auth",
301
- "login.js"
300
+ "config",
301
+ "get.js"
302
302
  ],
303
303
  "aliasPermutations": [],
304
304
  "permutations": [
305
- "hardis:auth:login",
306
- "auth:hardis:login",
307
- "auth:login:hardis",
308
- "hardis:login:auth",
309
- "login:hardis:auth",
310
- "login:auth:hardis"
305
+ "hardis:config:get",
306
+ "config:hardis:get",
307
+ "config:get:hardis",
308
+ "hardis:get:config",
309
+ "get:hardis:config",
310
+ "get:config:hardis"
311
311
  ]
312
312
  },
313
313
  "hardis:doc:fieldusage": {
@@ -5476,15 +5476,12 @@
5476
5476
  "import:data:org:hardis"
5477
5477
  ]
5478
5478
  },
5479
- "hardis:org:diagnose:audittrail": {
5479
+ "hardis:org:files:export": {
5480
5480
  "aliases": [],
5481
5481
  "args": {},
5482
- "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- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\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 - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\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![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-monitoring-audittrail-excel.jpg)\n\n## Local output example\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-monitoring-audittrail-local.jpg)\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",
5482
+ "description": "Export file attachments from a Salesforce org\n\nHandles:\n\n- ContentVersion\n- Attachment\n\nSee article below:\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n",
5483
5483
  "examples": [
5484
- "$ sf hardis:org:diagnose:audittrail",
5485
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5486
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5487
- "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5484
+ "$ sf hardis:org:files:export"
5488
5485
  ],
5489
5486
  "flags": {
5490
5487
  "json": {
@@ -5502,26 +5499,37 @@
5502
5499
  "multiple": false,
5503
5500
  "type": "option"
5504
5501
  },
5505
- "excludeusers": {
5506
- "char": "e",
5507
- "description": "Comma-separated list of usernames to exclude",
5508
- "name": "excludeusers",
5502
+ "path": {
5503
+ "char": "p",
5504
+ "description": "Path to the file export project",
5505
+ "name": "path",
5509
5506
  "hasDynamicHelp": false,
5510
5507
  "multiple": false,
5511
5508
  "type": "option"
5512
5509
  },
5513
- "lastndays": {
5510
+ "chunksize": {
5511
+ "char": "c",
5512
+ "description": "Number of records to add in a chunk before it is processed",
5513
+ "name": "chunksize",
5514
+ "default": 1000,
5515
+ "hasDynamicHelp": false,
5516
+ "multiple": false,
5517
+ "type": "option"
5518
+ },
5519
+ "polltimeout": {
5514
5520
  "char": "t",
5515
- "description": "Number of days to extract from today (included)",
5516
- "name": "lastndays",
5521
+ "description": "Timeout in MS for Bulk API calls",
5522
+ "name": "polltimeout",
5523
+ "default": 300000,
5517
5524
  "hasDynamicHelp": false,
5518
5525
  "multiple": false,
5519
5526
  "type": "option"
5520
5527
  },
5521
- "outputfile": {
5522
- "char": "f",
5523
- "description": "Force the path and name of output report file. Must end with .csv",
5524
- "name": "outputfile",
5528
+ "startchunknumber": {
5529
+ "char": "s",
5530
+ "description": "Chunk number to start from",
5531
+ "name": "startchunknumber",
5532
+ "default": 0,
5525
5533
  "hasDynamicHelp": false,
5526
5534
  "multiple": false,
5527
5535
  "type": "option"
@@ -5564,13 +5572,13 @@
5564
5572
  },
5565
5573
  "hasDynamicHelp": true,
5566
5574
  "hiddenAliases": [],
5567
- "id": "hardis:org:diagnose:audittrail",
5575
+ "id": "hardis:org:files:export",
5568
5576
  "pluginAlias": "sfdx-hardis",
5569
5577
  "pluginName": "sfdx-hardis",
5570
5578
  "pluginType": "core",
5571
5579
  "strict": true,
5572
5580
  "enableJsonFlag": true,
5573
- "title": "Diagnose content of Setup Audit Trail",
5581
+ "title": "Export files",
5574
5582
  "requiresProject": false,
5575
5583
  "isESM": true,
5576
5584
  "relativePath": [
@@ -5578,43 +5586,43 @@
5578
5586
  "commands",
5579
5587
  "hardis",
5580
5588
  "org",
5581
- "diagnose",
5582
- "audittrail.js"
5589
+ "files",
5590
+ "export.js"
5583
5591
  ],
5584
5592
  "aliasPermutations": [],
5585
5593
  "permutations": [
5586
- "hardis:org:diagnose:audittrail",
5587
- "org:hardis:diagnose:audittrail",
5588
- "org:diagnose:hardis:audittrail",
5589
- "org:diagnose:audittrail:hardis",
5590
- "hardis:diagnose:org:audittrail",
5591
- "diagnose:hardis:org:audittrail",
5592
- "diagnose:org:hardis:audittrail",
5593
- "diagnose:org:audittrail:hardis",
5594
- "hardis:diagnose:audittrail:org",
5595
- "diagnose:hardis:audittrail:org",
5596
- "diagnose:audittrail:hardis:org",
5597
- "diagnose:audittrail:org:hardis",
5598
- "hardis:org:audittrail:diagnose",
5599
- "org:hardis:audittrail:diagnose",
5600
- "org:audittrail:hardis:diagnose",
5601
- "org:audittrail:diagnose:hardis",
5602
- "hardis:audittrail:org:diagnose",
5603
- "audittrail:hardis:org:diagnose",
5604
- "audittrail:org:hardis:diagnose",
5605
- "audittrail:org:diagnose:hardis",
5606
- "hardis:audittrail:diagnose:org",
5607
- "audittrail:hardis:diagnose:org",
5608
- "audittrail:diagnose:hardis:org",
5609
- "audittrail:diagnose:org:hardis"
5594
+ "hardis:org:files:export",
5595
+ "org:hardis:files:export",
5596
+ "org:files:hardis:export",
5597
+ "org:files:export:hardis",
5598
+ "hardis:files:org:export",
5599
+ "files:hardis:org:export",
5600
+ "files:org:hardis:export",
5601
+ "files:org:export:hardis",
5602
+ "hardis:files:export:org",
5603
+ "files:hardis:export:org",
5604
+ "files:export:hardis:org",
5605
+ "files:export:org:hardis",
5606
+ "hardis:org:export:files",
5607
+ "org:hardis:export:files",
5608
+ "org:export:hardis:files",
5609
+ "org:export:files:hardis",
5610
+ "hardis:export:org:files",
5611
+ "export:hardis:org:files",
5612
+ "export:org:hardis:files",
5613
+ "export:org:files:hardis",
5614
+ "hardis:export:files:org",
5615
+ "export:hardis:files:org",
5616
+ "export:files:hardis:org",
5617
+ "export:files:org:hardis"
5610
5618
  ]
5611
5619
  },
5612
- "hardis:org:diagnose:instanceupgrade": {
5620
+ "hardis:org:files:import": {
5613
5621
  "aliases": [],
5614
5622
  "args": {},
5615
- "description": "Get the date when the org instance will be upgraded (to Spring, Summer or Winter)\n ",
5623
+ "description": "Import file attachments into a Salesforce org\n\nSee article below to see how to Export them.\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n",
5616
5624
  "examples": [
5617
- "$ sf hardis:org:diagnose:instanceupgrade"
5625
+ "$ sf hardis:org:files:import"
5618
5626
  ],
5619
5627
  "flags": {
5620
5628
  "json": {
@@ -5632,6 +5640,21 @@
5632
5640
  "multiple": false,
5633
5641
  "type": "option"
5634
5642
  },
5643
+ "path": {
5644
+ "char": "p",
5645
+ "description": "Path to the file export project",
5646
+ "name": "path",
5647
+ "hasDynamicHelp": false,
5648
+ "multiple": false,
5649
+ "type": "option"
5650
+ },
5651
+ "overwrite": {
5652
+ "char": "f",
5653
+ "description": "Override existing files (doubles the number of API calls)",
5654
+ "name": "overwrite",
5655
+ "allowNo": false,
5656
+ "type": "boolean"
5657
+ },
5635
5658
  "debug": {
5636
5659
  "char": "d",
5637
5660
  "description": "Activate debug mode (more logs)",
@@ -5670,13 +5693,13 @@
5670
5693
  },
5671
5694
  "hasDynamicHelp": true,
5672
5695
  "hiddenAliases": [],
5673
- "id": "hardis:org:diagnose:instanceupgrade",
5696
+ "id": "hardis:org:files:import",
5674
5697
  "pluginAlias": "sfdx-hardis",
5675
5698
  "pluginName": "sfdx-hardis",
5676
5699
  "pluginType": "core",
5677
5700
  "strict": true,
5678
5701
  "enableJsonFlag": true,
5679
- "title": "Get Instance Upgrade date",
5702
+ "title": "Import files",
5680
5703
  "requiresProject": false,
5681
5704
  "isESM": true,
5682
5705
  "relativePath": [
@@ -5684,46 +5707,44 @@
5684
5707
  "commands",
5685
5708
  "hardis",
5686
5709
  "org",
5687
- "diagnose",
5688
- "instanceupgrade.js"
5710
+ "files",
5711
+ "import.js"
5689
5712
  ],
5690
5713
  "aliasPermutations": [],
5691
5714
  "permutations": [
5692
- "hardis:org:diagnose:instanceupgrade",
5693
- "org:hardis:diagnose:instanceupgrade",
5694
- "org:diagnose:hardis:instanceupgrade",
5695
- "org:diagnose:instanceupgrade:hardis",
5696
- "hardis:diagnose:org:instanceupgrade",
5697
- "diagnose:hardis:org:instanceupgrade",
5698
- "diagnose:org:hardis:instanceupgrade",
5699
- "diagnose:org:instanceupgrade:hardis",
5700
- "hardis:diagnose:instanceupgrade:org",
5701
- "diagnose:hardis:instanceupgrade:org",
5702
- "diagnose:instanceupgrade:hardis:org",
5703
- "diagnose:instanceupgrade:org:hardis",
5704
- "hardis:org:instanceupgrade:diagnose",
5705
- "org:hardis:instanceupgrade:diagnose",
5706
- "org:instanceupgrade:hardis:diagnose",
5707
- "org:instanceupgrade:diagnose:hardis",
5708
- "hardis:instanceupgrade:org:diagnose",
5709
- "instanceupgrade:hardis:org:diagnose",
5710
- "instanceupgrade:org:hardis:diagnose",
5711
- "instanceupgrade:org:diagnose:hardis",
5712
- "hardis:instanceupgrade:diagnose:org",
5713
- "instanceupgrade:hardis:diagnose:org",
5714
- "instanceupgrade:diagnose:hardis:org",
5715
- "instanceupgrade:diagnose:org:hardis"
5715
+ "hardis:org:files:import",
5716
+ "org:hardis:files:import",
5717
+ "org:files:hardis:import",
5718
+ "org:files:import:hardis",
5719
+ "hardis:files:org:import",
5720
+ "files:hardis:org:import",
5721
+ "files:org:hardis:import",
5722
+ "files:org:import:hardis",
5723
+ "hardis:files:import:org",
5724
+ "files:hardis:import:org",
5725
+ "files:import:hardis:org",
5726
+ "files:import:org:hardis",
5727
+ "hardis:org:import:files",
5728
+ "org:hardis:import:files",
5729
+ "org:import:hardis:files",
5730
+ "org:import:files:hardis",
5731
+ "hardis:import:org:files",
5732
+ "import:hardis:org:files",
5733
+ "import:org:hardis:files",
5734
+ "import:org:files:hardis",
5735
+ "hardis:import:files:org",
5736
+ "import:hardis:files:org",
5737
+ "import:files:hardis:org",
5738
+ "import:files:org:hardis"
5716
5739
  ]
5717
5740
  },
5718
- "hardis:org:diagnose:legacyapi": {
5741
+ "hardis:org:fix:listviewmine": {
5719
5742
  "aliases": [],
5720
5743
  "args": {},
5721
- "description": "Checks if an org uses retired or someday retired API version\n\n\nSee article below\n\n[![Handle Salesforce API versions Deprecation like a pro](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deprecated-api.jpg)](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",
5744
+ "description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[![Invalid scope:Mine, not allowed ? Deploy your ListViews anyway !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-scope-mine.jpg)](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
5722
5745
  "examples": [
5723
- "$ sf hardis:org:diagnose:legacyapi",
5724
- "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
5725
- "$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
5726
- "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
5746
+ "$ sf hardis:org:fix:listviewmine",
5747
+ "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
5727
5748
  ],
5728
5749
  "flags": {
5729
5750
  "json": {
@@ -5741,28 +5762,10 @@
5741
5762
  "multiple": false,
5742
5763
  "type": "option"
5743
5764
  },
5744
- "eventtype": {
5745
- "char": "e",
5746
- "description": "Type of EventLogFile event to analyze",
5747
- "name": "eventtype",
5748
- "default": "ApiTotalUsage",
5749
- "hasDynamicHelp": false,
5750
- "multiple": false,
5751
- "type": "option"
5752
- },
5753
- "limit": {
5765
+ "listviews": {
5754
5766
  "char": "l",
5755
- "description": "Number of latest EventLogFile events to analyze",
5756
- "name": "limit",
5757
- "default": 999,
5758
- "hasDynamicHelp": false,
5759
- "multiple": false,
5760
- "type": "option"
5761
- },
5762
- "outputfile": {
5763
- "char": "f",
5764
- "description": "Force the path and name of output report file. Must end with .csv",
5765
- "name": "outputfile",
5767
+ "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
5768
+ "name": "listviews",
5766
5769
  "hasDynamicHelp": false,
5767
5770
  "multiple": false,
5768
5771
  "type": "option"
@@ -5805,57 +5808,60 @@
5805
5808
  },
5806
5809
  "hasDynamicHelp": true,
5807
5810
  "hiddenAliases": [],
5808
- "id": "hardis:org:diagnose:legacyapi",
5811
+ "id": "hardis:org:fix:listviewmine",
5809
5812
  "pluginAlias": "sfdx-hardis",
5810
5813
  "pluginName": "sfdx-hardis",
5811
5814
  "pluginType": "core",
5812
5815
  "strict": true,
5813
5816
  "enableJsonFlag": true,
5814
- "title": "Check for legacy API use",
5815
- "requiresProject": false,
5817
+ "title": "Fix listviews with ",
5818
+ "requiresProject": true,
5816
5819
  "isESM": true,
5817
5820
  "relativePath": [
5818
5821
  "lib",
5819
5822
  "commands",
5820
5823
  "hardis",
5821
5824
  "org",
5822
- "diagnose",
5823
- "legacyapi.js"
5825
+ "fix",
5826
+ "listviewmine.js"
5824
5827
  ],
5825
5828
  "aliasPermutations": [],
5826
5829
  "permutations": [
5827
- "hardis:org:diagnose:legacyapi",
5828
- "org:hardis:diagnose:legacyapi",
5829
- "org:diagnose:hardis:legacyapi",
5830
- "org:diagnose:legacyapi:hardis",
5831
- "hardis:diagnose:org:legacyapi",
5832
- "diagnose:hardis:org:legacyapi",
5833
- "diagnose:org:hardis:legacyapi",
5834
- "diagnose:org:legacyapi:hardis",
5835
- "hardis:diagnose:legacyapi:org",
5836
- "diagnose:hardis:legacyapi:org",
5837
- "diagnose:legacyapi:hardis:org",
5838
- "diagnose:legacyapi:org:hardis",
5839
- "hardis:org:legacyapi:diagnose",
5840
- "org:hardis:legacyapi:diagnose",
5841
- "org:legacyapi:hardis:diagnose",
5842
- "org:legacyapi:diagnose:hardis",
5843
- "hardis:legacyapi:org:diagnose",
5844
- "legacyapi:hardis:org:diagnose",
5845
- "legacyapi:org:hardis:diagnose",
5846
- "legacyapi:org:diagnose:hardis",
5847
- "hardis:legacyapi:diagnose:org",
5848
- "legacyapi:hardis:diagnose:org",
5849
- "legacyapi:diagnose:hardis:org",
5850
- "legacyapi:diagnose:org:hardis"
5830
+ "hardis:org:fix:listviewmine",
5831
+ "org:hardis:fix:listviewmine",
5832
+ "org:fix:hardis:listviewmine",
5833
+ "org:fix:listviewmine:hardis",
5834
+ "hardis:fix:org:listviewmine",
5835
+ "fix:hardis:org:listviewmine",
5836
+ "fix:org:hardis:listviewmine",
5837
+ "fix:org:listviewmine:hardis",
5838
+ "hardis:fix:listviewmine:org",
5839
+ "fix:hardis:listviewmine:org",
5840
+ "fix:listviewmine:hardis:org",
5841
+ "fix:listviewmine:org:hardis",
5842
+ "hardis:org:listviewmine:fix",
5843
+ "org:hardis:listviewmine:fix",
5844
+ "org:listviewmine:hardis:fix",
5845
+ "org:listviewmine:fix:hardis",
5846
+ "hardis:listviewmine:org:fix",
5847
+ "listviewmine:hardis:org:fix",
5848
+ "listviewmine:org:hardis:fix",
5849
+ "listviewmine:org:fix:hardis",
5850
+ "hardis:listviewmine:fix:org",
5851
+ "listviewmine:hardis:fix:org",
5852
+ "listviewmine:fix:hardis:org",
5853
+ "listviewmine:fix:org:hardis"
5851
5854
  ]
5852
5855
  },
5853
- "hardis:org:diagnose:licenses": {
5856
+ "hardis:org:diagnose:audittrail": {
5854
5857
  "aliases": [],
5855
5858
  "args": {},
5856
- "description": "Mostly used for monitoring (Grafana) but you can also use it manually :)",
5859
+ "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- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\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 - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\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![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-monitoring-audittrail-excel.jpg)\n\n## Local output example\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-monitoring-audittrail-local.jpg)\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",
5857
5860
  "examples": [
5858
- "$ sf hardis:org:diagnose:licenses"
5861
+ "$ sf hardis:org:diagnose:audittrail",
5862
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5863
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5864
+ "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5859
5865
  ],
5860
5866
  "flags": {
5861
5867
  "json": {
@@ -5873,6 +5879,22 @@
5873
5879
  "multiple": false,
5874
5880
  "type": "option"
5875
5881
  },
5882
+ "excludeusers": {
5883
+ "char": "e",
5884
+ "description": "Comma-separated list of usernames to exclude",
5885
+ "name": "excludeusers",
5886
+ "hasDynamicHelp": false,
5887
+ "multiple": false,
5888
+ "type": "option"
5889
+ },
5890
+ "lastndays": {
5891
+ "char": "t",
5892
+ "description": "Number of days to extract from today (included)",
5893
+ "name": "lastndays",
5894
+ "hasDynamicHelp": false,
5895
+ "multiple": false,
5896
+ "type": "option"
5897
+ },
5876
5898
  "outputfile": {
5877
5899
  "char": "f",
5878
5900
  "description": "Force the path and name of output report file. Must end with .csv",
@@ -5881,13 +5903,6 @@
5881
5903
  "multiple": false,
5882
5904
  "type": "option"
5883
5905
  },
5884
- "usedonly": {
5885
- "char": "u",
5886
- "description": "Filter to have only used licenses",
5887
- "name": "usedonly",
5888
- "allowNo": false,
5889
- "type": "boolean"
5890
- },
5891
5906
  "debug": {
5892
5907
  "char": "d",
5893
5908
  "description": "Activate debug mode (more logs)",
@@ -5926,13 +5941,13 @@
5926
5941
  },
5927
5942
  "hasDynamicHelp": true,
5928
5943
  "hiddenAliases": [],
5929
- "id": "hardis:org:diagnose:licenses",
5944
+ "id": "hardis:org:diagnose:audittrail",
5930
5945
  "pluginAlias": "sfdx-hardis",
5931
5946
  "pluginName": "sfdx-hardis",
5932
5947
  "pluginType": "core",
5933
5948
  "strict": true,
5934
5949
  "enableJsonFlag": true,
5935
- "title": "List licenses subscribed and used in a Salesforce org",
5950
+ "title": "Diagnose content of Setup Audit Trail",
5936
5951
  "requiresProject": false,
5937
5952
  "isESM": true,
5938
5953
  "relativePath": [
@@ -5941,42 +5956,42 @@
5941
5956
  "hardis",
5942
5957
  "org",
5943
5958
  "diagnose",
5944
- "licenses.js"
5959
+ "audittrail.js"
5945
5960
  ],
5946
5961
  "aliasPermutations": [],
5947
5962
  "permutations": [
5948
- "hardis:org:diagnose:licenses",
5949
- "org:hardis:diagnose:licenses",
5950
- "org:diagnose:hardis:licenses",
5951
- "org:diagnose:licenses:hardis",
5952
- "hardis:diagnose:org:licenses",
5953
- "diagnose:hardis:org:licenses",
5954
- "diagnose:org:hardis:licenses",
5955
- "diagnose:org:licenses:hardis",
5956
- "hardis:diagnose:licenses:org",
5957
- "diagnose:hardis:licenses:org",
5958
- "diagnose:licenses:hardis:org",
5959
- "diagnose:licenses:org:hardis",
5960
- "hardis:org:licenses:diagnose",
5961
- "org:hardis:licenses:diagnose",
5962
- "org:licenses:hardis:diagnose",
5963
- "org:licenses:diagnose:hardis",
5964
- "hardis:licenses:org:diagnose",
5965
- "licenses:hardis:org:diagnose",
5966
- "licenses:org:hardis:diagnose",
5967
- "licenses:org:diagnose:hardis",
5968
- "hardis:licenses:diagnose:org",
5969
- "licenses:hardis:diagnose:org",
5970
- "licenses:diagnose:hardis:org",
5971
- "licenses:diagnose:org:hardis"
5963
+ "hardis:org:diagnose:audittrail",
5964
+ "org:hardis:diagnose:audittrail",
5965
+ "org:diagnose:hardis:audittrail",
5966
+ "org:diagnose:audittrail:hardis",
5967
+ "hardis:diagnose:org:audittrail",
5968
+ "diagnose:hardis:org:audittrail",
5969
+ "diagnose:org:hardis:audittrail",
5970
+ "diagnose:org:audittrail:hardis",
5971
+ "hardis:diagnose:audittrail:org",
5972
+ "diagnose:hardis:audittrail:org",
5973
+ "diagnose:audittrail:hardis:org",
5974
+ "diagnose:audittrail:org:hardis",
5975
+ "hardis:org:audittrail:diagnose",
5976
+ "org:hardis:audittrail:diagnose",
5977
+ "org:audittrail:hardis:diagnose",
5978
+ "org:audittrail:diagnose:hardis",
5979
+ "hardis:audittrail:org:diagnose",
5980
+ "audittrail:hardis:org:diagnose",
5981
+ "audittrail:org:hardis:diagnose",
5982
+ "audittrail:org:diagnose:hardis",
5983
+ "hardis:audittrail:diagnose:org",
5984
+ "audittrail:hardis:diagnose:org",
5985
+ "audittrail:diagnose:hardis:org",
5986
+ "audittrail:diagnose:org:hardis"
5972
5987
  ]
5973
5988
  },
5974
- "hardis:org:diagnose:releaseupdates": {
5989
+ "hardis:org:diagnose:instanceupgrade": {
5975
5990
  "aliases": [],
5976
5991
  "args": {},
5977
- "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",
5992
+ "description": "Get the date when the org instance will be upgraded (to Spring, Summer or Winter)\n ",
5978
5993
  "examples": [
5979
- "$ sf hardis:org:diagnose:releaseupdates"
5994
+ "$ sf hardis:org:diagnose:instanceupgrade"
5980
5995
  ],
5981
5996
  "flags": {
5982
5997
  "json": {
@@ -5994,14 +6009,6 @@
5994
6009
  "multiple": false,
5995
6010
  "type": "option"
5996
6011
  },
5997
- "outputfile": {
5998
- "char": "f",
5999
- "description": "Force the path and name of output report file. Must end with .csv",
6000
- "name": "outputfile",
6001
- "hasDynamicHelp": false,
6002
- "multiple": false,
6003
- "type": "option"
6004
- },
6005
6012
  "debug": {
6006
6013
  "char": "d",
6007
6014
  "description": "Activate debug mode (more logs)",
@@ -6040,13 +6047,13 @@
6040
6047
  },
6041
6048
  "hasDynamicHelp": true,
6042
6049
  "hiddenAliases": [],
6043
- "id": "hardis:org:diagnose:releaseupdates",
6050
+ "id": "hardis:org:diagnose:instanceupgrade",
6044
6051
  "pluginAlias": "sfdx-hardis",
6045
6052
  "pluginName": "sfdx-hardis",
6046
6053
  "pluginType": "core",
6047
6054
  "strict": true,
6048
6055
  "enableJsonFlag": true,
6049
- "title": "Check Release Updates of an org",
6056
+ "title": "Get Instance Upgrade date",
6050
6057
  "requiresProject": false,
6051
6058
  "isESM": true,
6052
6059
  "relativePath": [
@@ -6055,43 +6062,45 @@
6055
6062
  "hardis",
6056
6063
  "org",
6057
6064
  "diagnose",
6058
- "releaseupdates.js"
6065
+ "instanceupgrade.js"
6059
6066
  ],
6060
6067
  "aliasPermutations": [],
6061
6068
  "permutations": [
6062
- "hardis:org:diagnose:releaseupdates",
6063
- "org:hardis:diagnose:releaseupdates",
6064
- "org:diagnose:hardis:releaseupdates",
6065
- "org:diagnose:releaseupdates:hardis",
6066
- "hardis:diagnose:org:releaseupdates",
6067
- "diagnose:hardis:org:releaseupdates",
6068
- "diagnose:org:hardis:releaseupdates",
6069
- "diagnose:org:releaseupdates:hardis",
6070
- "hardis:diagnose:releaseupdates:org",
6071
- "diagnose:hardis:releaseupdates:org",
6072
- "diagnose:releaseupdates:hardis:org",
6073
- "diagnose:releaseupdates:org:hardis",
6074
- "hardis:org:releaseupdates:diagnose",
6075
- "org:hardis:releaseupdates:diagnose",
6076
- "org:releaseupdates:hardis:diagnose",
6077
- "org:releaseupdates:diagnose:hardis",
6078
- "hardis:releaseupdates:org:diagnose",
6079
- "releaseupdates:hardis:org:diagnose",
6080
- "releaseupdates:org:hardis:diagnose",
6081
- "releaseupdates:org:diagnose:hardis",
6082
- "hardis:releaseupdates:diagnose:org",
6083
- "releaseupdates:hardis:diagnose:org",
6084
- "releaseupdates:diagnose:hardis:org",
6085
- "releaseupdates:diagnose:org:hardis"
6086
- ]
6087
- },
6088
- "hardis:org:diagnose:unused-apex-classes": {
6089
- "aliases": [],
6090
- "args": {},
6091
- "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![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-monitoring-unused-apex-grafana.jpg)\n",
6069
+ "hardis:org:diagnose:instanceupgrade",
6070
+ "org:hardis:diagnose:instanceupgrade",
6071
+ "org:diagnose:hardis:instanceupgrade",
6072
+ "org:diagnose:instanceupgrade:hardis",
6073
+ "hardis:diagnose:org:instanceupgrade",
6074
+ "diagnose:hardis:org:instanceupgrade",
6075
+ "diagnose:org:hardis:instanceupgrade",
6076
+ "diagnose:org:instanceupgrade:hardis",
6077
+ "hardis:diagnose:instanceupgrade:org",
6078
+ "diagnose:hardis:instanceupgrade:org",
6079
+ "diagnose:instanceupgrade:hardis:org",
6080
+ "diagnose:instanceupgrade:org:hardis",
6081
+ "hardis:org:instanceupgrade:diagnose",
6082
+ "org:hardis:instanceupgrade:diagnose",
6083
+ "org:instanceupgrade:hardis:diagnose",
6084
+ "org:instanceupgrade:diagnose:hardis",
6085
+ "hardis:instanceupgrade:org:diagnose",
6086
+ "instanceupgrade:hardis:org:diagnose",
6087
+ "instanceupgrade:org:hardis:diagnose",
6088
+ "instanceupgrade:org:diagnose:hardis",
6089
+ "hardis:instanceupgrade:diagnose:org",
6090
+ "instanceupgrade:hardis:diagnose:org",
6091
+ "instanceupgrade:diagnose:hardis:org",
6092
+ "instanceupgrade:diagnose:org:hardis"
6093
+ ]
6094
+ },
6095
+ "hardis:org:diagnose:legacyapi": {
6096
+ "aliases": [],
6097
+ "args": {},
6098
+ "description": "Checks if an org uses retired or someday retired API version\n\n\nSee article below\n\n[![Handle Salesforce API versions Deprecation like a pro](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deprecated-api.jpg)](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",
6092
6099
  "examples": [
6093
- "$ sf hardis:org:diagnose:unused-apex-classes",
6094
- "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
6100
+ "$ sf hardis:org:diagnose:legacyapi",
6101
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
6102
+ "$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
6103
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
6095
6104
  ],
6096
6105
  "flags": {
6097
6106
  "json": {
@@ -6109,18 +6118,28 @@
6109
6118
  "multiple": false,
6110
6119
  "type": "option"
6111
6120
  },
6112
- "outputfile": {
6113
- "char": "f",
6114
- "description": "Force the path and name of output report file. Must end with .csv",
6115
- "name": "outputfile",
6121
+ "eventtype": {
6122
+ "char": "e",
6123
+ "description": "Type of EventLogFile event to analyze",
6124
+ "name": "eventtype",
6125
+ "default": "ApiTotalUsage",
6116
6126
  "hasDynamicHelp": false,
6117
6127
  "multiple": false,
6118
6128
  "type": "option"
6119
6129
  },
6120
- "days": {
6121
- "char": "t",
6122
- "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
6123
- "name": "days",
6130
+ "limit": {
6131
+ "char": "l",
6132
+ "description": "Number of latest EventLogFile events to analyze",
6133
+ "name": "limit",
6134
+ "default": 999,
6135
+ "hasDynamicHelp": false,
6136
+ "multiple": false,
6137
+ "type": "option"
6138
+ },
6139
+ "outputfile": {
6140
+ "char": "f",
6141
+ "description": "Force the path and name of output report file. Must end with .csv",
6142
+ "name": "outputfile",
6124
6143
  "hasDynamicHelp": false,
6125
6144
  "multiple": false,
6126
6145
  "type": "option"
@@ -6163,13 +6182,13 @@
6163
6182
  },
6164
6183
  "hasDynamicHelp": true,
6165
6184
  "hiddenAliases": [],
6166
- "id": "hardis:org:diagnose:unused-apex-classes",
6185
+ "id": "hardis:org:diagnose:legacyapi",
6167
6186
  "pluginAlias": "sfdx-hardis",
6168
6187
  "pluginName": "sfdx-hardis",
6169
6188
  "pluginType": "core",
6170
6189
  "strict": true,
6171
6190
  "enableJsonFlag": true,
6172
- "title": "Detect unused Apex classes in an org",
6191
+ "title": "Check for legacy API use",
6173
6192
  "requiresProject": false,
6174
6193
  "isESM": true,
6175
6194
  "relativePath": [
@@ -6178,42 +6197,42 @@
6178
6197
  "hardis",
6179
6198
  "org",
6180
6199
  "diagnose",
6181
- "unused-apex-classes.js"
6200
+ "legacyapi.js"
6182
6201
  ],
6183
6202
  "aliasPermutations": [],
6184
6203
  "permutations": [
6185
- "hardis:org:diagnose:unused-apex-classes",
6186
- "org:hardis:diagnose:unused-apex-classes",
6187
- "org:diagnose:hardis:unused-apex-classes",
6188
- "org:diagnose:unused-apex-classes:hardis",
6189
- "hardis:diagnose:org:unused-apex-classes",
6190
- "diagnose:hardis:org:unused-apex-classes",
6191
- "diagnose:org:hardis:unused-apex-classes",
6192
- "diagnose:org:unused-apex-classes:hardis",
6193
- "hardis:diagnose:unused-apex-classes:org",
6194
- "diagnose:hardis:unused-apex-classes:org",
6195
- "diagnose:unused-apex-classes:hardis:org",
6196
- "diagnose:unused-apex-classes:org:hardis",
6197
- "hardis:org:unused-apex-classes:diagnose",
6198
- "org:hardis:unused-apex-classes:diagnose",
6199
- "org:unused-apex-classes:hardis:diagnose",
6200
- "org:unused-apex-classes:diagnose:hardis",
6201
- "hardis:unused-apex-classes:org:diagnose",
6202
- "unused-apex-classes:hardis:org:diagnose",
6203
- "unused-apex-classes:org:hardis:diagnose",
6204
- "unused-apex-classes:org:diagnose:hardis",
6205
- "hardis:unused-apex-classes:diagnose:org",
6206
- "unused-apex-classes:hardis:diagnose:org",
6207
- "unused-apex-classes:diagnose:hardis:org",
6208
- "unused-apex-classes:diagnose:org:hardis"
6204
+ "hardis:org:diagnose:legacyapi",
6205
+ "org:hardis:diagnose:legacyapi",
6206
+ "org:diagnose:hardis:legacyapi",
6207
+ "org:diagnose:legacyapi:hardis",
6208
+ "hardis:diagnose:org:legacyapi",
6209
+ "diagnose:hardis:org:legacyapi",
6210
+ "diagnose:org:hardis:legacyapi",
6211
+ "diagnose:org:legacyapi:hardis",
6212
+ "hardis:diagnose:legacyapi:org",
6213
+ "diagnose:hardis:legacyapi:org",
6214
+ "diagnose:legacyapi:hardis:org",
6215
+ "diagnose:legacyapi:org:hardis",
6216
+ "hardis:org:legacyapi:diagnose",
6217
+ "org:hardis:legacyapi:diagnose",
6218
+ "org:legacyapi:hardis:diagnose",
6219
+ "org:legacyapi:diagnose:hardis",
6220
+ "hardis:legacyapi:org:diagnose",
6221
+ "legacyapi:hardis:org:diagnose",
6222
+ "legacyapi:org:hardis:diagnose",
6223
+ "legacyapi:org:diagnose:hardis",
6224
+ "hardis:legacyapi:diagnose:org",
6225
+ "legacyapi:hardis:diagnose:org",
6226
+ "legacyapi:diagnose:hardis:org",
6227
+ "legacyapi:diagnose:org:hardis"
6209
6228
  ]
6210
6229
  },
6211
- "hardis:org:diagnose:unused-connected-apps": {
6230
+ "hardis:org:diagnose:licenses": {
6212
6231
  "aliases": [],
6213
6232
  "args": {},
6214
- "description": "Request objects ConnectedApp, LoginHistory and OAuthToken to find which connected apps might not be used anymore, and could be deleted for security / technical debt reasons.\n\nCheck with Connected Apps metadatas if the app is still active (inactive = \"Admin Users are pre-authorized + no Profile or Permission set assigned\")\n\nThe following default Salesforce Connected Apps are ignored:\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 variable ALLOWED_INACTIVE_CONNECTED_APPS\n\n_Example: ALLOWED_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-release-updates/) and can output Grafana, Slack and MsTeams Notifications.\n",
6233
+ "description": "Mostly used for monitoring (Grafana) but you can also use it manually :)",
6215
6234
  "examples": [
6216
- "$ sf hardis:org:diagnose:unused-connected-apps"
6235
+ "$ sf hardis:org:diagnose:licenses"
6217
6236
  ],
6218
6237
  "flags": {
6219
6238
  "json": {
@@ -6239,6 +6258,13 @@
6239
6258
  "multiple": false,
6240
6259
  "type": "option"
6241
6260
  },
6261
+ "usedonly": {
6262
+ "char": "u",
6263
+ "description": "Filter to have only used licenses",
6264
+ "name": "usedonly",
6265
+ "allowNo": false,
6266
+ "type": "boolean"
6267
+ },
6242
6268
  "debug": {
6243
6269
  "char": "d",
6244
6270
  "description": "Activate debug mode (more logs)",
@@ -6277,30 +6303,13 @@
6277
6303
  },
6278
6304
  "hasDynamicHelp": true,
6279
6305
  "hiddenAliases": [],
6280
- "id": "hardis:org:diagnose:unused-connected-apps",
6306
+ "id": "hardis:org:diagnose:licenses",
6281
6307
  "pluginAlias": "sfdx-hardis",
6282
6308
  "pluginName": "sfdx-hardis",
6283
6309
  "pluginType": "core",
6284
6310
  "strict": true,
6285
6311
  "enableJsonFlag": true,
6286
- "title": "Unused Connected Apps in an org",
6287
- "allowedInactiveConnectedApps": [
6288
- "Ant Migration Tool",
6289
- "Chatter Desktop",
6290
- "Chatter Mobile for BlackBerry",
6291
- "Force.com IDE",
6292
- "OIQ_Integration",
6293
- "Salesforce CLI",
6294
- "Salesforce Files",
6295
- "Salesforce Mobile Dashboards",
6296
- "Salesforce Touch",
6297
- "Salesforce for Outlook",
6298
- "SalesforceA",
6299
- "SalesforceA for Android",
6300
- "SalesforceA for iOS",
6301
- "SalesforceDX Namespace Registry",
6302
- "SalesforceIQ"
6303
- ],
6312
+ "title": "List licenses subscribed and used in a Salesforce org",
6304
6313
  "requiresProject": false,
6305
6314
  "isESM": true,
6306
6315
  "relativePath": [
@@ -6309,43 +6318,42 @@
6309
6318
  "hardis",
6310
6319
  "org",
6311
6320
  "diagnose",
6312
- "unused-connected-apps.js"
6321
+ "licenses.js"
6313
6322
  ],
6314
6323
  "aliasPermutations": [],
6315
6324
  "permutations": [
6316
- "hardis:org:diagnose:unused-connected-apps",
6317
- "org:hardis:diagnose:unused-connected-apps",
6318
- "org:diagnose:hardis:unused-connected-apps",
6319
- "org:diagnose:unused-connected-apps:hardis",
6320
- "hardis:diagnose:org:unused-connected-apps",
6321
- "diagnose:hardis:org:unused-connected-apps",
6322
- "diagnose:org:hardis:unused-connected-apps",
6323
- "diagnose:org:unused-connected-apps:hardis",
6324
- "hardis:diagnose:unused-connected-apps:org",
6325
- "diagnose:hardis:unused-connected-apps:org",
6326
- "diagnose:unused-connected-apps:hardis:org",
6327
- "diagnose:unused-connected-apps:org:hardis",
6328
- "hardis:org:unused-connected-apps:diagnose",
6329
- "org:hardis:unused-connected-apps:diagnose",
6330
- "org:unused-connected-apps:hardis:diagnose",
6331
- "org:unused-connected-apps:diagnose:hardis",
6332
- "hardis:unused-connected-apps:org:diagnose",
6333
- "unused-connected-apps:hardis:org:diagnose",
6334
- "unused-connected-apps:org:hardis:diagnose",
6335
- "unused-connected-apps:org:diagnose:hardis",
6336
- "hardis:unused-connected-apps:diagnose:org",
6337
- "unused-connected-apps:hardis:diagnose:org",
6338
- "unused-connected-apps:diagnose:hardis:org",
6339
- "unused-connected-apps:diagnose:org:hardis"
6325
+ "hardis:org:diagnose:licenses",
6326
+ "org:hardis:diagnose:licenses",
6327
+ "org:diagnose:hardis:licenses",
6328
+ "org:diagnose:licenses:hardis",
6329
+ "hardis:diagnose:org:licenses",
6330
+ "diagnose:hardis:org:licenses",
6331
+ "diagnose:org:hardis:licenses",
6332
+ "diagnose:org:licenses:hardis",
6333
+ "hardis:diagnose:licenses:org",
6334
+ "diagnose:hardis:licenses:org",
6335
+ "diagnose:licenses:hardis:org",
6336
+ "diagnose:licenses:org:hardis",
6337
+ "hardis:org:licenses:diagnose",
6338
+ "org:hardis:licenses:diagnose",
6339
+ "org:licenses:hardis:diagnose",
6340
+ "org:licenses:diagnose:hardis",
6341
+ "hardis:licenses:org:diagnose",
6342
+ "licenses:hardis:org:diagnose",
6343
+ "licenses:org:hardis:diagnose",
6344
+ "licenses:org:diagnose:hardis",
6345
+ "hardis:licenses:diagnose:org",
6346
+ "licenses:hardis:diagnose:org",
6347
+ "licenses:diagnose:hardis:org",
6348
+ "licenses:diagnose:org:hardis"
6340
6349
  ]
6341
6350
  },
6342
- "hardis:org:diagnose:unusedlicenses": {
6351
+ "hardis:org:diagnose:releaseupdates": {
6343
6352
  "aliases": [],
6344
6353
  "args": {},
6345
- "description": "When you assign a Permission Set to a user, and that this Permission Set is related to a Permission Set License, a Permission Set License Assignment is automatically created for the user.\n\nBut when you unassign this Permission Set from the user, **the Permission Set License Assignment is not deleted**.\n\nThis leads that you can be **charged for Permission Set Licenses that are not used** !\n\nThis command detects such useless Permission Set Licenses Assignments and suggests to delete them.\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",
6354
+ "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",
6346
6355
  "examples": [
6347
- "$ sf hardis:org:diagnose:unusedlicenses",
6348
- "$ sf hardis:org:diagnose:unusedlicenses --fix"
6356
+ "$ sf hardis:org:diagnose:releaseupdates"
6349
6357
  ],
6350
6358
  "flags": {
6351
6359
  "json": {
@@ -6409,32 +6417,14 @@
6409
6417
  },
6410
6418
  "hasDynamicHelp": true,
6411
6419
  "hiddenAliases": [],
6412
- "id": "hardis:org:diagnose:unusedlicenses",
6420
+ "id": "hardis:org:diagnose:releaseupdates",
6413
6421
  "pluginAlias": "sfdx-hardis",
6414
6422
  "pluginName": "sfdx-hardis",
6415
6423
  "pluginType": "core",
6416
6424
  "strict": true,
6417
6425
  "enableJsonFlag": true,
6418
- "title": "Detect unused Permission Set Licenses (beta)",
6426
+ "title": "Check Release Updates of an org",
6419
6427
  "requiresProject": false,
6420
- "additionalPermissionSetsToAlwaysGet": [
6421
- "Sales_User"
6422
- ],
6423
- "permSetsPermSetLicenses": [
6424
- {
6425
- "permSet": "Sales_User",
6426
- "permSetLicense": "SalesUserPsl"
6427
- }
6428
- ],
6429
- "profilesPermissionSetLicenses": [
6430
- {
6431
- "profile": "Salesforce API Only",
6432
- "permSetLicense": "SalesforceAPIIntegrationPsl"
6433
- }
6434
- ],
6435
- "alwaysExcludeForActiveUsersPermissionSetLicenses": [
6436
- "IdentityConnect"
6437
- ],
6438
6428
  "isESM": true,
6439
6429
  "relativePath": [
6440
6430
  "lib",
@@ -6442,46 +6432,43 @@
6442
6432
  "hardis",
6443
6433
  "org",
6444
6434
  "diagnose",
6445
- "unusedlicenses.js"
6435
+ "releaseupdates.js"
6446
6436
  ],
6447
6437
  "aliasPermutations": [],
6448
6438
  "permutations": [
6449
- "hardis:org:diagnose:unusedlicenses",
6450
- "org:hardis:diagnose:unusedlicenses",
6451
- "org:diagnose:hardis:unusedlicenses",
6452
- "org:diagnose:unusedlicenses:hardis",
6453
- "hardis:diagnose:org:unusedlicenses",
6454
- "diagnose:hardis:org:unusedlicenses",
6455
- "diagnose:org:hardis:unusedlicenses",
6456
- "diagnose:org:unusedlicenses:hardis",
6457
- "hardis:diagnose:unusedlicenses:org",
6458
- "diagnose:hardis:unusedlicenses:org",
6459
- "diagnose:unusedlicenses:hardis:org",
6460
- "diagnose:unusedlicenses:org:hardis",
6461
- "hardis:org:unusedlicenses:diagnose",
6462
- "org:hardis:unusedlicenses:diagnose",
6463
- "org:unusedlicenses:hardis:diagnose",
6464
- "org:unusedlicenses:diagnose:hardis",
6465
- "hardis:unusedlicenses:org:diagnose",
6466
- "unusedlicenses:hardis:org:diagnose",
6467
- "unusedlicenses:org:hardis:diagnose",
6468
- "unusedlicenses:org:diagnose:hardis",
6469
- "hardis:unusedlicenses:diagnose:org",
6470
- "unusedlicenses:hardis:diagnose:org",
6471
- "unusedlicenses:diagnose:hardis:org",
6472
- "unusedlicenses:diagnose:org:hardis"
6439
+ "hardis:org:diagnose:releaseupdates",
6440
+ "org:hardis:diagnose:releaseupdates",
6441
+ "org:diagnose:hardis:releaseupdates",
6442
+ "org:diagnose:releaseupdates:hardis",
6443
+ "hardis:diagnose:org:releaseupdates",
6444
+ "diagnose:hardis:org:releaseupdates",
6445
+ "diagnose:org:hardis:releaseupdates",
6446
+ "diagnose:org:releaseupdates:hardis",
6447
+ "hardis:diagnose:releaseupdates:org",
6448
+ "diagnose:hardis:releaseupdates:org",
6449
+ "diagnose:releaseupdates:hardis:org",
6450
+ "diagnose:releaseupdates:org:hardis",
6451
+ "hardis:org:releaseupdates:diagnose",
6452
+ "org:hardis:releaseupdates:diagnose",
6453
+ "org:releaseupdates:hardis:diagnose",
6454
+ "org:releaseupdates:diagnose:hardis",
6455
+ "hardis:releaseupdates:org:diagnose",
6456
+ "releaseupdates:hardis:org:diagnose",
6457
+ "releaseupdates:org:hardis:diagnose",
6458
+ "releaseupdates:org:diagnose:hardis",
6459
+ "hardis:releaseupdates:diagnose:org",
6460
+ "releaseupdates:hardis:diagnose:org",
6461
+ "releaseupdates:diagnose:hardis:org",
6462
+ "releaseupdates:diagnose:org:hardis"
6473
6463
  ]
6474
6464
  },
6475
- "hardis:org:diagnose:unusedusers": {
6465
+ "hardis:org:diagnose:unused-apex-classes": {
6476
6466
  "aliases": [],
6477
6467
  "args": {},
6478
- "description": "Efficient 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\nlicensetypes values are the following:\n\n- all-crm: SFDC,AUL,AUL1,AULL_IGHT\n\n- all-paying: SFDC,AUL,AUL1,AULL_IGHT,PID_Customer_Community,PID_Customer_Community_Login,PID_Partner_Community,PID_Partner_Community_Login\n\nNote: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm)\n\nUse --returnactiveusers to revert the command and retrieve active users that has logged in during the period.\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",
6468
+ "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![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-monitoring-unused-apex-grafana.jpg)\n",
6479
6469
  "examples": [
6480
- "$ sf hardis:org:diagnose:unusedusers",
6481
- "$ sf hardis:org:diagnose:unusedusers --days 365",
6482
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
6483
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
6484
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
6470
+ "$ sf hardis:org:diagnose:unused-apex-classes",
6471
+ "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
6485
6472
  ],
6486
6473
  "flags": {
6487
6474
  "json": {
@@ -6515,33 +6502,6 @@
6515
6502
  "multiple": false,
6516
6503
  "type": "option"
6517
6504
  },
6518
- "licensetypes": {
6519
- "char": "l",
6520
- "description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
6521
- "name": "licensetypes",
6522
- "hasDynamicHelp": false,
6523
- "multiple": false,
6524
- "options": [
6525
- "all",
6526
- "all-crm",
6527
- "all-paying"
6528
- ],
6529
- "type": "option"
6530
- },
6531
- "licenseidentifiers": {
6532
- "char": "i",
6533
- "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",
6534
- "name": "licenseidentifiers",
6535
- "hasDynamicHelp": false,
6536
- "multiple": false,
6537
- "type": "option"
6538
- },
6539
- "returnactiveusers": {
6540
- "description": "Inverts the command by returning the active users",
6541
- "name": "returnactiveusers",
6542
- "allowNo": false,
6543
- "type": "boolean"
6544
- },
6545
6505
  "debug": {
6546
6506
  "char": "d",
6547
6507
  "description": "Activate debug mode (more logs)",
@@ -6580,13 +6540,13 @@
6580
6540
  },
6581
6541
  "hasDynamicHelp": true,
6582
6542
  "hiddenAliases": [],
6583
- "id": "hardis:org:diagnose:unusedusers",
6543
+ "id": "hardis:org:diagnose:unused-apex-classes",
6584
6544
  "pluginAlias": "sfdx-hardis",
6585
6545
  "pluginName": "sfdx-hardis",
6586
6546
  "pluginType": "core",
6587
6547
  "strict": true,
6588
6548
  "enableJsonFlag": true,
6589
- "title": "Detect unused Users in Salesforce",
6549
+ "title": "Detect unused Apex classes in an org",
6590
6550
  "requiresProject": false,
6591
6551
  "isESM": true,
6592
6552
  "relativePath": [
@@ -6595,42 +6555,42 @@
6595
6555
  "hardis",
6596
6556
  "org",
6597
6557
  "diagnose",
6598
- "unusedusers.js"
6558
+ "unused-apex-classes.js"
6599
6559
  ],
6600
6560
  "aliasPermutations": [],
6601
6561
  "permutations": [
6602
- "hardis:org:diagnose:unusedusers",
6603
- "org:hardis:diagnose:unusedusers",
6604
- "org:diagnose:hardis:unusedusers",
6605
- "org:diagnose:unusedusers:hardis",
6606
- "hardis:diagnose:org:unusedusers",
6607
- "diagnose:hardis:org:unusedusers",
6608
- "diagnose:org:hardis:unusedusers",
6609
- "diagnose:org:unusedusers:hardis",
6610
- "hardis:diagnose:unusedusers:org",
6611
- "diagnose:hardis:unusedusers:org",
6612
- "diagnose:unusedusers:hardis:org",
6613
- "diagnose:unusedusers:org:hardis",
6614
- "hardis:org:unusedusers:diagnose",
6615
- "org:hardis:unusedusers:diagnose",
6616
- "org:unusedusers:hardis:diagnose",
6617
- "org:unusedusers:diagnose:hardis",
6618
- "hardis:unusedusers:org:diagnose",
6619
- "unusedusers:hardis:org:diagnose",
6620
- "unusedusers:org:hardis:diagnose",
6621
- "unusedusers:org:diagnose:hardis",
6622
- "hardis:unusedusers:diagnose:org",
6623
- "unusedusers:hardis:diagnose:org",
6624
- "unusedusers:diagnose:hardis:org",
6625
- "unusedusers:diagnose:org:hardis"
6562
+ "hardis:org:diagnose:unused-apex-classes",
6563
+ "org:hardis:diagnose:unused-apex-classes",
6564
+ "org:diagnose:hardis:unused-apex-classes",
6565
+ "org:diagnose:unused-apex-classes:hardis",
6566
+ "hardis:diagnose:org:unused-apex-classes",
6567
+ "diagnose:hardis:org:unused-apex-classes",
6568
+ "diagnose:org:hardis:unused-apex-classes",
6569
+ "diagnose:org:unused-apex-classes:hardis",
6570
+ "hardis:diagnose:unused-apex-classes:org",
6571
+ "diagnose:hardis:unused-apex-classes:org",
6572
+ "diagnose:unused-apex-classes:hardis:org",
6573
+ "diagnose:unused-apex-classes:org:hardis",
6574
+ "hardis:org:unused-apex-classes:diagnose",
6575
+ "org:hardis:unused-apex-classes:diagnose",
6576
+ "org:unused-apex-classes:hardis:diagnose",
6577
+ "org:unused-apex-classes:diagnose:hardis",
6578
+ "hardis:unused-apex-classes:org:diagnose",
6579
+ "unused-apex-classes:hardis:org:diagnose",
6580
+ "unused-apex-classes:org:hardis:diagnose",
6581
+ "unused-apex-classes:org:diagnose:hardis",
6582
+ "hardis:unused-apex-classes:diagnose:org",
6583
+ "unused-apex-classes:hardis:diagnose:org",
6584
+ "unused-apex-classes:diagnose:hardis:org",
6585
+ "unused-apex-classes:diagnose:org:hardis"
6626
6586
  ]
6627
6587
  },
6628
- "hardis:org:files:export": {
6588
+ "hardis:org:diagnose:unused-connected-apps": {
6629
6589
  "aliases": [],
6630
6590
  "args": {},
6631
- "description": "Export file attachments from a Salesforce org\n\nHandles:\n\n- ContentVersion\n- Attachment\n\nSee article below:\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n",
6591
+ "description": "Request objects ConnectedApp, LoginHistory and OAuthToken to find which connected apps might not be used anymore, and could be deleted for security / technical debt reasons.\n\nCheck with Connected Apps metadatas if the app is still active (inactive = \"Admin Users are pre-authorized + no Profile or Permission set assigned\")\n\nThe following default Salesforce Connected Apps are ignored:\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 variable ALLOWED_INACTIVE_CONNECTED_APPS\n\n_Example: ALLOWED_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-release-updates/) and can output Grafana, Slack and MsTeams Notifications.\n",
6632
6592
  "examples": [
6633
- "$ sf hardis:org:files:export"
6593
+ "$ sf hardis:org:diagnose:unused-connected-apps"
6634
6594
  ],
6635
6595
  "flags": {
6636
6596
  "json": {
@@ -6648,37 +6608,10 @@
6648
6608
  "multiple": false,
6649
6609
  "type": "option"
6650
6610
  },
6651
- "path": {
6652
- "char": "p",
6653
- "description": "Path to the file export project",
6654
- "name": "path",
6655
- "hasDynamicHelp": false,
6656
- "multiple": false,
6657
- "type": "option"
6658
- },
6659
- "chunksize": {
6660
- "char": "c",
6661
- "description": "Number of records to add in a chunk before it is processed",
6662
- "name": "chunksize",
6663
- "default": 1000,
6664
- "hasDynamicHelp": false,
6665
- "multiple": false,
6666
- "type": "option"
6667
- },
6668
- "polltimeout": {
6669
- "char": "t",
6670
- "description": "Timeout in MS for Bulk API calls",
6671
- "name": "polltimeout",
6672
- "default": 300000,
6673
- "hasDynamicHelp": false,
6674
- "multiple": false,
6675
- "type": "option"
6676
- },
6677
- "startchunknumber": {
6678
- "char": "s",
6679
- "description": "Chunk number to start from",
6680
- "name": "startchunknumber",
6681
- "default": 0,
6611
+ "outputfile": {
6612
+ "char": "f",
6613
+ "description": "Force the path and name of output report file. Must end with .csv",
6614
+ "name": "outputfile",
6682
6615
  "hasDynamicHelp": false,
6683
6616
  "multiple": false,
6684
6617
  "type": "option"
@@ -6721,13 +6654,30 @@
6721
6654
  },
6722
6655
  "hasDynamicHelp": true,
6723
6656
  "hiddenAliases": [],
6724
- "id": "hardis:org:files:export",
6657
+ "id": "hardis:org:diagnose:unused-connected-apps",
6725
6658
  "pluginAlias": "sfdx-hardis",
6726
6659
  "pluginName": "sfdx-hardis",
6727
6660
  "pluginType": "core",
6728
6661
  "strict": true,
6729
6662
  "enableJsonFlag": true,
6730
- "title": "Export files",
6663
+ "title": "Unused Connected Apps in an org",
6664
+ "allowedInactiveConnectedApps": [
6665
+ "Ant Migration Tool",
6666
+ "Chatter Desktop",
6667
+ "Chatter Mobile for BlackBerry",
6668
+ "Force.com IDE",
6669
+ "OIQ_Integration",
6670
+ "Salesforce CLI",
6671
+ "Salesforce Files",
6672
+ "Salesforce Mobile Dashboards",
6673
+ "Salesforce Touch",
6674
+ "Salesforce for Outlook",
6675
+ "SalesforceA",
6676
+ "SalesforceA for Android",
6677
+ "SalesforceA for iOS",
6678
+ "SalesforceDX Namespace Registry",
6679
+ "SalesforceIQ"
6680
+ ],
6731
6681
  "requiresProject": false,
6732
6682
  "isESM": true,
6733
6683
  "relativePath": [
@@ -6735,43 +6685,44 @@
6735
6685
  "commands",
6736
6686
  "hardis",
6737
6687
  "org",
6738
- "files",
6739
- "export.js"
6688
+ "diagnose",
6689
+ "unused-connected-apps.js"
6740
6690
  ],
6741
6691
  "aliasPermutations": [],
6742
6692
  "permutations": [
6743
- "hardis:org:files:export",
6744
- "org:hardis:files:export",
6745
- "org:files:hardis:export",
6746
- "org:files:export:hardis",
6747
- "hardis:files:org:export",
6748
- "files:hardis:org:export",
6749
- "files:org:hardis:export",
6750
- "files:org:export:hardis",
6751
- "hardis:files:export:org",
6752
- "files:hardis:export:org",
6753
- "files:export:hardis:org",
6754
- "files:export:org:hardis",
6755
- "hardis:org:export:files",
6756
- "org:hardis:export:files",
6757
- "org:export:hardis:files",
6758
- "org:export:files:hardis",
6759
- "hardis:export:org:files",
6760
- "export:hardis:org:files",
6761
- "export:org:hardis:files",
6762
- "export:org:files:hardis",
6763
- "hardis:export:files:org",
6764
- "export:hardis:files:org",
6765
- "export:files:hardis:org",
6766
- "export:files:org:hardis"
6693
+ "hardis:org:diagnose:unused-connected-apps",
6694
+ "org:hardis:diagnose:unused-connected-apps",
6695
+ "org:diagnose:hardis:unused-connected-apps",
6696
+ "org:diagnose:unused-connected-apps:hardis",
6697
+ "hardis:diagnose:org:unused-connected-apps",
6698
+ "diagnose:hardis:org:unused-connected-apps",
6699
+ "diagnose:org:hardis:unused-connected-apps",
6700
+ "diagnose:org:unused-connected-apps:hardis",
6701
+ "hardis:diagnose:unused-connected-apps:org",
6702
+ "diagnose:hardis:unused-connected-apps:org",
6703
+ "diagnose:unused-connected-apps:hardis:org",
6704
+ "diagnose:unused-connected-apps:org:hardis",
6705
+ "hardis:org:unused-connected-apps:diagnose",
6706
+ "org:hardis:unused-connected-apps:diagnose",
6707
+ "org:unused-connected-apps:hardis:diagnose",
6708
+ "org:unused-connected-apps:diagnose:hardis",
6709
+ "hardis:unused-connected-apps:org:diagnose",
6710
+ "unused-connected-apps:hardis:org:diagnose",
6711
+ "unused-connected-apps:org:hardis:diagnose",
6712
+ "unused-connected-apps:org:diagnose:hardis",
6713
+ "hardis:unused-connected-apps:diagnose:org",
6714
+ "unused-connected-apps:hardis:diagnose:org",
6715
+ "unused-connected-apps:diagnose:hardis:org",
6716
+ "unused-connected-apps:diagnose:org:hardis"
6767
6717
  ]
6768
6718
  },
6769
- "hardis:org:files:import": {
6719
+ "hardis:org:diagnose:unusedlicenses": {
6770
6720
  "aliases": [],
6771
6721
  "args": {},
6772
- "description": "Import file attachments into a Salesforce org\n\nSee article below to see how to Export them.\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n",
6722
+ "description": "When you assign a Permission Set to a user, and that this Permission Set is related to a Permission Set License, a Permission Set License Assignment is automatically created for the user.\n\nBut when you unassign this Permission Set from the user, **the Permission Set License Assignment is not deleted**.\n\nThis leads that you can be **charged for Permission Set Licenses that are not used** !\n\nThis command detects such useless Permission Set Licenses Assignments and suggests to delete them.\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",
6773
6723
  "examples": [
6774
- "$ sf hardis:org:files:import"
6724
+ "$ sf hardis:org:diagnose:unusedlicenses",
6725
+ "$ sf hardis:org:diagnose:unusedlicenses --fix"
6775
6726
  ],
6776
6727
  "flags": {
6777
6728
  "json": {
@@ -6789,21 +6740,14 @@
6789
6740
  "multiple": false,
6790
6741
  "type": "option"
6791
6742
  },
6792
- "path": {
6793
- "char": "p",
6794
- "description": "Path to the file export project",
6795
- "name": "path",
6743
+ "outputfile": {
6744
+ "char": "f",
6745
+ "description": "Force the path and name of output report file. Must end with .csv",
6746
+ "name": "outputfile",
6796
6747
  "hasDynamicHelp": false,
6797
6748
  "multiple": false,
6798
6749
  "type": "option"
6799
6750
  },
6800
- "overwrite": {
6801
- "char": "f",
6802
- "description": "Override existing files (doubles the number of API calls)",
6803
- "name": "overwrite",
6804
- "allowNo": false,
6805
- "type": "boolean"
6806
- },
6807
6751
  "debug": {
6808
6752
  "char": "d",
6809
6753
  "description": "Activate debug mode (more logs)",
@@ -6842,58 +6786,79 @@
6842
6786
  },
6843
6787
  "hasDynamicHelp": true,
6844
6788
  "hiddenAliases": [],
6845
- "id": "hardis:org:files:import",
6789
+ "id": "hardis:org:diagnose:unusedlicenses",
6846
6790
  "pluginAlias": "sfdx-hardis",
6847
6791
  "pluginName": "sfdx-hardis",
6848
6792
  "pluginType": "core",
6849
6793
  "strict": true,
6850
6794
  "enableJsonFlag": true,
6851
- "title": "Import files",
6795
+ "title": "Detect unused Permission Set Licenses (beta)",
6852
6796
  "requiresProject": false,
6797
+ "additionalPermissionSetsToAlwaysGet": [
6798
+ "Sales_User"
6799
+ ],
6800
+ "permSetsPermSetLicenses": [
6801
+ {
6802
+ "permSet": "Sales_User",
6803
+ "permSetLicense": "SalesUserPsl"
6804
+ }
6805
+ ],
6806
+ "profilesPermissionSetLicenses": [
6807
+ {
6808
+ "profile": "Salesforce API Only",
6809
+ "permSetLicense": "SalesforceAPIIntegrationPsl"
6810
+ }
6811
+ ],
6812
+ "alwaysExcludeForActiveUsersPermissionSetLicenses": [
6813
+ "IdentityConnect"
6814
+ ],
6853
6815
  "isESM": true,
6854
6816
  "relativePath": [
6855
6817
  "lib",
6856
6818
  "commands",
6857
6819
  "hardis",
6858
6820
  "org",
6859
- "files",
6860
- "import.js"
6821
+ "diagnose",
6822
+ "unusedlicenses.js"
6861
6823
  ],
6862
6824
  "aliasPermutations": [],
6863
6825
  "permutations": [
6864
- "hardis:org:files:import",
6865
- "org:hardis:files:import",
6866
- "org:files:hardis:import",
6867
- "org:files:import:hardis",
6868
- "hardis:files:org:import",
6869
- "files:hardis:org:import",
6870
- "files:org:hardis:import",
6871
- "files:org:import:hardis",
6872
- "hardis:files:import:org",
6873
- "files:hardis:import:org",
6874
- "files:import:hardis:org",
6875
- "files:import:org:hardis",
6876
- "hardis:org:import:files",
6877
- "org:hardis:import:files",
6878
- "org:import:hardis:files",
6879
- "org:import:files:hardis",
6880
- "hardis:import:org:files",
6881
- "import:hardis:org:files",
6882
- "import:org:hardis:files",
6883
- "import:org:files:hardis",
6884
- "hardis:import:files:org",
6885
- "import:hardis:files:org",
6886
- "import:files:hardis:org",
6887
- "import:files:org:hardis"
6826
+ "hardis:org:diagnose:unusedlicenses",
6827
+ "org:hardis:diagnose:unusedlicenses",
6828
+ "org:diagnose:hardis:unusedlicenses",
6829
+ "org:diagnose:unusedlicenses:hardis",
6830
+ "hardis:diagnose:org:unusedlicenses",
6831
+ "diagnose:hardis:org:unusedlicenses",
6832
+ "diagnose:org:hardis:unusedlicenses",
6833
+ "diagnose:org:unusedlicenses:hardis",
6834
+ "hardis:diagnose:unusedlicenses:org",
6835
+ "diagnose:hardis:unusedlicenses:org",
6836
+ "diagnose:unusedlicenses:hardis:org",
6837
+ "diagnose:unusedlicenses:org:hardis",
6838
+ "hardis:org:unusedlicenses:diagnose",
6839
+ "org:hardis:unusedlicenses:diagnose",
6840
+ "org:unusedlicenses:hardis:diagnose",
6841
+ "org:unusedlicenses:diagnose:hardis",
6842
+ "hardis:unusedlicenses:org:diagnose",
6843
+ "unusedlicenses:hardis:org:diagnose",
6844
+ "unusedlicenses:org:hardis:diagnose",
6845
+ "unusedlicenses:org:diagnose:hardis",
6846
+ "hardis:unusedlicenses:diagnose:org",
6847
+ "unusedlicenses:hardis:diagnose:org",
6848
+ "unusedlicenses:diagnose:hardis:org",
6849
+ "unusedlicenses:diagnose:org:hardis"
6888
6850
  ]
6889
6851
  },
6890
- "hardis:org:fix:listviewmine": {
6852
+ "hardis:org:diagnose:unusedusers": {
6891
6853
  "aliases": [],
6892
6854
  "args": {},
6893
- "description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[![Invalid scope:Mine, not allowed ? Deploy your ListViews anyway !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-scope-mine.jpg)](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
6855
+ "description": "Efficient 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\nlicensetypes values are the following:\n\n- all-crm: SFDC,AUL,AUL1,AULL_IGHT\n\n- all-paying: SFDC,AUL,AUL1,AULL_IGHT,PID_Customer_Community,PID_Customer_Community_Login,PID_Partner_Community,PID_Partner_Community_Login\n\nNote: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm)\n\nUse --returnactiveusers to revert the command and retrieve active users that has logged in during the period.\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",
6894
6856
  "examples": [
6895
- "$ sf hardis:org:fix:listviewmine",
6896
- "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
6857
+ "$ sf hardis:org:diagnose:unusedusers",
6858
+ "$ sf hardis:org:diagnose:unusedusers --days 365",
6859
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
6860
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
6861
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
6897
6862
  ],
6898
6863
  "flags": {
6899
6864
  "json": {
@@ -6911,14 +6876,49 @@
6911
6876
  "multiple": false,
6912
6877
  "type": "option"
6913
6878
  },
6914
- "listviews": {
6915
- "char": "l",
6916
- "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
6917
- "name": "listviews",
6879
+ "outputfile": {
6880
+ "char": "f",
6881
+ "description": "Force the path and name of output report file. Must end with .csv",
6882
+ "name": "outputfile",
6883
+ "hasDynamicHelp": false,
6884
+ "multiple": false,
6885
+ "type": "option"
6886
+ },
6887
+ "days": {
6888
+ "char": "t",
6889
+ "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
6890
+ "name": "days",
6891
+ "hasDynamicHelp": false,
6892
+ "multiple": false,
6893
+ "type": "option"
6894
+ },
6895
+ "licensetypes": {
6896
+ "char": "l",
6897
+ "description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
6898
+ "name": "licensetypes",
6899
+ "hasDynamicHelp": false,
6900
+ "multiple": false,
6901
+ "options": [
6902
+ "all",
6903
+ "all-crm",
6904
+ "all-paying"
6905
+ ],
6906
+ "type": "option"
6907
+ },
6908
+ "licenseidentifiers": {
6909
+ "char": "i",
6910
+ "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",
6911
+ "name": "licenseidentifiers",
6918
6912
  "hasDynamicHelp": false,
6919
6913
  "multiple": false,
6920
6914
  "type": "option"
6921
6915
  },
6916
+ "returnactiveusers": {
6917
+ "description": "Inverts the command by returning the active users",
6918
+ "name": "returnactiveusers",
6919
+ "allowNo": false,
6920
+ "type": "boolean"
6921
+ },
6922
6922
  "debug": {
6923
6923
  "char": "d",
6924
6924
  "description": "Activate debug mode (more logs)",
@@ -6957,49 +6957,49 @@
6957
6957
  },
6958
6958
  "hasDynamicHelp": true,
6959
6959
  "hiddenAliases": [],
6960
- "id": "hardis:org:fix:listviewmine",
6960
+ "id": "hardis:org:diagnose:unusedusers",
6961
6961
  "pluginAlias": "sfdx-hardis",
6962
6962
  "pluginName": "sfdx-hardis",
6963
6963
  "pluginType": "core",
6964
6964
  "strict": true,
6965
6965
  "enableJsonFlag": true,
6966
- "title": "Fix listviews with ",
6967
- "requiresProject": true,
6966
+ "title": "Detect unused Users in Salesforce",
6967
+ "requiresProject": false,
6968
6968
  "isESM": true,
6969
6969
  "relativePath": [
6970
6970
  "lib",
6971
6971
  "commands",
6972
6972
  "hardis",
6973
6973
  "org",
6974
- "fix",
6975
- "listviewmine.js"
6974
+ "diagnose",
6975
+ "unusedusers.js"
6976
6976
  ],
6977
6977
  "aliasPermutations": [],
6978
6978
  "permutations": [
6979
- "hardis:org:fix:listviewmine",
6980
- "org:hardis:fix:listviewmine",
6981
- "org:fix:hardis:listviewmine",
6982
- "org:fix:listviewmine:hardis",
6983
- "hardis:fix:org:listviewmine",
6984
- "fix:hardis:org:listviewmine",
6985
- "fix:org:hardis:listviewmine",
6986
- "fix:org:listviewmine:hardis",
6987
- "hardis:fix:listviewmine:org",
6988
- "fix:hardis:listviewmine:org",
6989
- "fix:listviewmine:hardis:org",
6990
- "fix:listviewmine:org:hardis",
6991
- "hardis:org:listviewmine:fix",
6992
- "org:hardis:listviewmine:fix",
6993
- "org:listviewmine:hardis:fix",
6994
- "org:listviewmine:fix:hardis",
6995
- "hardis:listviewmine:org:fix",
6996
- "listviewmine:hardis:org:fix",
6997
- "listviewmine:org:hardis:fix",
6998
- "listviewmine:org:fix:hardis",
6999
- "hardis:listviewmine:fix:org",
7000
- "listviewmine:hardis:fix:org",
7001
- "listviewmine:fix:hardis:org",
7002
- "listviewmine:fix:org:hardis"
6979
+ "hardis:org:diagnose:unusedusers",
6980
+ "org:hardis:diagnose:unusedusers",
6981
+ "org:diagnose:hardis:unusedusers",
6982
+ "org:diagnose:unusedusers:hardis",
6983
+ "hardis:diagnose:org:unusedusers",
6984
+ "diagnose:hardis:org:unusedusers",
6985
+ "diagnose:org:hardis:unusedusers",
6986
+ "diagnose:org:unusedusers:hardis",
6987
+ "hardis:diagnose:unusedusers:org",
6988
+ "diagnose:hardis:unusedusers:org",
6989
+ "diagnose:unusedusers:hardis:org",
6990
+ "diagnose:unusedusers:org:hardis",
6991
+ "hardis:org:unusedusers:diagnose",
6992
+ "org:hardis:unusedusers:diagnose",
6993
+ "org:unusedusers:hardis:diagnose",
6994
+ "org:unusedusers:diagnose:hardis",
6995
+ "hardis:unusedusers:org:diagnose",
6996
+ "unusedusers:hardis:org:diagnose",
6997
+ "unusedusers:org:hardis:diagnose",
6998
+ "unusedusers:org:diagnose:hardis",
6999
+ "hardis:unusedusers:diagnose:org",
7000
+ "unusedusers:hardis:diagnose:org",
7001
+ "unusedusers:diagnose:hardis:org",
7002
+ "unusedusers:diagnose:org:hardis"
7003
7003
  ]
7004
7004
  },
7005
7005
  "hardis:org:generate:packagexmlfull": {
@@ -11363,7 +11363,7 @@
11363
11363
  "hardis:project:deploy:sources:dx"
11364
11364
  ],
11365
11365
  "args": {},
11366
- "description": "Smart deploy of SFDX sources to target org, with many useful options.\n\nIn case of errors, [tips to fix them](https://sfdx-hardis.cloudity.com/deployTips/) will be included within the error messages.\n\n### Quick Deploy\n\nIn case Pull Request comments are configured on the project, Quick Deploy will try to be used (equivalent to button Quick Deploy)\n\nIf you do not want to use QuickDeploy, define variable `SFDX_HARDIS_QUICK_DEPLOY=false`\n\n- [GitHub Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-github/)\n- [Gitlab Merge requests notes config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/)\n- [Azure Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-azure/)\n\n### Delta deployments\n\nTo activate delta deployments, define property `useDeltaDeployment: true` in `config/.sfdx-hardis.yml`.\n\nThis will activate delta deployments only between minor and major branches (major to major remains full deployment mode)\n\nIf you want to force the delta deployment into major orgs (ex: preprod to prod), this is not recommended but you can use env variable ALWAYS_ENABLE_DELTA_DEPLOYMENT=true\n\n### Smart Deployments Tests\n\nNot all metadata updates can break test classes, use Smart Deployment Tests to skip running test classes if ALL the following conditions are met:\n\n- Delta deployment is activated and applicable to the source and target branches\n- Delta deployed metadatas are all matching the list of **NOT_IMPACTING_METADATA_TYPES** (see below)\n- Target org is not a production org\n\nActivate Smart Deployment tests with:\n\n- env variable `USE_SMART_DEPLOYMENT_TESTS=true`\n- .sfdx-hardis.yml config property `useSmartDeploymentTests: true`\n\nDefaut list for **NOT_IMPACTING_METADATA_TYPES** (can be overridden with comma-separated list on env var NOT_IMPACTING_METADATA_TYPES)\n\n- Audience\n- AuraDefinitionBundle\n- Bot\n- BotVersion\n- ContentAsset\n- CustomObjectTranslation\n- CustomSite\n- CustomTab\n- Dashboard\n- ExperienceBundle\n- Flexipage\n- GlobalValueSetTranslation\n- Layout\n- LightningComponentBundle\n- NavigationMenu\n- ReportType\n- Report\n- SiteDotCom\n- StandardValueSetTranslation\n- StaticResource\n- Translations\n\nNote: if you want to disable Smart test classes for a PR, add **nosmart** in the text of the latest commit.\n\n### Dynamic deployment items / Overwrite management\n\nIf necessary,you can define the following files (that supports wildcards <members>*</members>):\n\n- `manifest/package-no-overwrite.xml`: Every element defined in this file will be deployed only if it is not existing yet in the target org (can be useful with ListView for example, if the client wants to update them directly in production org).\n - Can be overridden for a branch using .sfdx-hardis.yml property **packageNoOverwritePath** or environment variable PACKAGE_NO_OVERWRITE_PATH (for example, define: `packageNoOverwritePath: manifest/package-no-overwrite-main.xml` in config file `config/.sfdx-hardis.main.yml`)\n- `manifest/packageXmlOnChange.xml`: Every element defined in this file will not be deployed if it already has a similar definition in target org (can be useful for SharingRules for example)\n\nSee [Overwrite management documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-config-overwrite/)\n\n### Deployment plan\n\nIf you need to deploy in multiple steps, you can define a property `deploymentPlan` in `.sfdx-hardis.yml`.\n\n- If a file `manifest/package.xml` is found, it will be placed with order 0 in the deployment plan\n\n- If a file `manifest/destructiveChanges.xml` is found, it will be executed as --postdestructivechanges\n\n- If env var `SFDX_HARDIS_DEPLOY_IGNORE_SPLIT_PACKAGES` is defined as `false` , split of package.xml will be applied\n\nExample:\n\n```yaml\ndeploymentPlan:\n packages:\n - label: Deploy Flow-Workflow\n packageXmlFile: manifest/splits/packageXmlFlowWorkflow.xml\n order: 6\n - label: Deploy SharingRules - Case\n packageXmlFile: manifest/splits/packageXmlSharingRulesCase.xml\n order: 30\n waitAfter: 30\n```\n\n### Packages installation\n\nYou can define a list of package to install during deployments using property `installedPackages`\n\n- If `INSTALL_PACKAGES_DURING_CHECK_DEPLOY` is defined as `true` (or `installPackagesDuringCheckDeploy: true` in `.sfdx-hardis.yml`), packages will be installed even if the command is called with `--check` mode\n- You can automatically update this property by listing all packages installed on an org using command `sf hardis:org:retrieve:packageconfig`\n\nExample:\n\n```yaml\ninstalledPackages:\n - Id: 0A35r0000009EtECAU\n SubscriberPackageId: 033i0000000LVMYAA4\n SubscriberPackageName: Marketing Cloud\n SubscriberPackageNamespace: et4ae5\n SubscriberPackageVersionId: 04t6S000000l11iQAA\n SubscriberPackageVersionName: Marketing Cloud\n SubscriberPackageVersionNumber: 236.0.0.2\n installOnScratchOrgs: true // true or false depending you want to install this package when creating a new scratch org\n installDuringDeployments: true // set as true to install package during a deployment using sf hardis:project:deploy:smart\n installationkey: xxxxxxxxxxxxxxxxxxxx // if the package has a password, write it in this property\n - Id: 0A35r0000009F9CCAU\n SubscriberPackageId: 033b0000000Pf2AAAS\n SubscriberPackageName: Declarative Lookup Rollup Summaries Tool\n SubscriberPackageNamespace: dlrs\n SubscriberPackageVersionId: 04t5p000001BmLvAAK\n SubscriberPackageVersionName: Release\n SubscriberPackageVersionNumber: 2.15.0.9\n installOnScratchOrgs: true\n installDuringDeployments: true\n```\n\n### Deployment pre or post commands\n\nYou can define command lines to run before or after a deployment, with parameters:\n\n- **id**: Unique Id for the command\n- **label**: Human readable label for the command\n- **skipIfError**: If defined to \"true\", the post-command won't be run if there is a deployment failure\n- **context**: Defines the context where the command will be run. Can be **all** (default), **check-deployment-only** or **process-deployment-only**\n- **runOnlyOnceByOrg**: If set to true, the command will be run only one time per org. A record of SfdxHardisTrace__c is stored to make that possible (it needs to be existing in target org)\n\nIf the commands are not the same depending on the target org, you can define them into **config/branches/.sfdx-hardis-BRANCHNAME.yml** instead of root **config/.sfdx-hardis.yml**\n\nExample:\n\n```yaml\ncommandsPreDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to the deployment user\n command: sf data update record --sobject User --where \"Username='deploy.github@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n\ncommandsPostDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to desired username\n command: sf data update record --sobject User --where \"Username='admin-yser@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n - id: someActionToRunJustOneTime\n label: And to run only if deployment is success\n command: sf sfdmu:run ...\n skipIfError: true\n context: process-deployment-only\n runOnlyOnceByOrg: true\n```\n\n### Automated fixes post deployments\n\n#### List view with scope Mine\n\nIf you defined a property **listViewsToSetToMine** in your .sfdx-hardis.yml, related ListViews will be set to Mine ( see command <https://sfdx-hardis.cloudity.com/hardis/org/fix/listviewmine/> )\n\nExample:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to fix ListViews with mine from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n\nIf you need to increase the deployment waiting time (sf project deploy start --wait arg), you can define env variable SFDX_DEPLOY_WAIT_MINUTES (default: 120)\n\nIf you need notifications to be sent using the current Pull Request and not the one just merged ([see use case](https://github.com/hardisgroupcom/sfdx-hardis/issues/637#issuecomment-2230798904)), define env variable SFDX_HARDIS_DEPLOY_BEFORE_MERGE=true\n\nIf you want to disable the calculation and display of Flow Visual Git Diff in Pull Request comments, define variable **SFDX_DISABLE_FLOW_DIFF=true**\n",
11366
+ "description": "Smart deploy of SFDX sources to target org, with many useful options.\n\nIn case of errors, [tips to fix them](https://sfdx-hardis.cloudity.com/deployTips/) will be included within the error messages.\n\n### Quick Deploy\n\nIn case Pull Request comments are configured on the project, Quick Deploy will try to be used (equivalent to button Quick Deploy)\n\nIf you do not want to use QuickDeploy, define variable `SFDX_HARDIS_QUICK_DEPLOY=false`\n\n- [GitHub Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-github/)\n- [Gitlab Merge requests notes config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/)\n- [Azure Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-azure/)\n\n### Delta deployments\n\nTo activate delta deployments, define property `useDeltaDeployment: true` in `config/.sfdx-hardis.yml`.\n\nThis will activate delta deployments only between minor and major branches (major to major remains full deployment mode)\n\nIf you want to force the delta deployment into major orgs (ex: preprod to prod), this is not recommended but you can use env variable ALWAYS_ENABLE_DELTA_DEPLOYMENT=true\n\n### Smart Deployments Tests\n\nNot all metadata updates can break test classes, use Smart Deployment Tests to skip running test classes if ALL the following conditions are met:\n\n- Delta deployment is activated and applicable to the source and target branches\n- Delta deployed metadatas are all matching the list of **NOT_IMPACTING_METADATA_TYPES** (see below)\n- Target org is not a production org\n\nActivate Smart Deployment tests with:\n\n- env variable `USE_SMART_DEPLOYMENT_TESTS=true`\n- .sfdx-hardis.yml config property `useSmartDeploymentTests: true`\n\nDefaut list for **NOT_IMPACTING_METADATA_TYPES** (can be overridden with comma-separated list on env var NOT_IMPACTING_METADATA_TYPES)\n\n- Audience\n- AuraDefinitionBundle\n- Bot\n- BotVersion\n- ContentAsset\n- CustomObjectTranslation\n- CustomSite\n- CustomTab\n- Dashboard\n- ExperienceBundle\n- Flexipage\n- GlobalValueSetTranslation\n- Layout\n- LightningComponentBundle\n- NavigationMenu\n- ReportType\n- Report\n- SiteDotCom\n- StandardValueSetTranslation\n- StaticResource\n- Translations\n\nNote: if you want to disable Smart test classes for a PR, add **nosmart** in the text of the latest commit.\n\n### Dynamic deployment items / Overwrite management\n\nIf necessary,you can define the following files (that supports wildcards <members>*</members>):\n\n- `manifest/package-no-overwrite.xml`: Every element defined in this file will be deployed only if it is not existing yet in the target org (can be useful with ListView for example, if the client wants to update them directly in production org).\n - Can be overridden for a branch using .sfdx-hardis.yml property **packageNoOverwritePath** or environment variable PACKAGE_NO_OVERWRITE_PATH (for example, define: `packageNoOverwritePath: manifest/package-no-overwrite-main.xml` in config file `config/.sfdx-hardis.main.yml`)\n- `manifest/packageXmlOnChange.xml`: Every element defined in this file will not be deployed if it already has a similar definition in target org (can be useful for SharingRules for example)\n\nSee [Overwrite management documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-config-overwrite/)\n\n### Packages installation\n\nYou can define a list of package to install during deployments using property `installedPackages`\n\n- If `INSTALL_PACKAGES_DURING_CHECK_DEPLOY` is defined as `true` (or `installPackagesDuringCheckDeploy: true` in `.sfdx-hardis.yml`), packages will be installed even if the command is called with `--check` mode\n- You can automatically update this property by listing all packages installed on an org using command `sf hardis:org:retrieve:packageconfig`\n\nExample:\n\n```yaml\ninstalledPackages:\n - Id: 0A35r0000009EtECAU\n SubscriberPackageId: 033i0000000LVMYAA4\n SubscriberPackageName: Marketing Cloud\n SubscriberPackageNamespace: et4ae5\n SubscriberPackageVersionId: 04t6S000000l11iQAA\n SubscriberPackageVersionName: Marketing Cloud\n SubscriberPackageVersionNumber: 236.0.0.2\n installOnScratchOrgs: true // true or false depending you want to install this package when creating a new scratch org\n installDuringDeployments: true // set as true to install package during a deployment using sf hardis:project:deploy:smart\n installationkey: xxxxxxxxxxxxxxxxxxxx // if the package has a password, write it in this property\n - Id: 0A35r0000009F9CCAU\n SubscriberPackageId: 033b0000000Pf2AAAS\n SubscriberPackageName: Declarative Lookup Rollup Summaries Tool\n SubscriberPackageNamespace: dlrs\n SubscriberPackageVersionId: 04t5p000001BmLvAAK\n SubscriberPackageVersionName: Release\n SubscriberPackageVersionNumber: 2.15.0.9\n installOnScratchOrgs: true\n installDuringDeployments: true\n```\n\n### Deployment pre or post commands\n\nYou can define command lines to run before or after a deployment, with parameters:\n\n- **id**: Unique Id for the command\n- **label**: Human readable label for the command\n- **skipIfError**: If defined to \"true\", the post-command won't be run if there is a deployment failure\n- **context**: Defines the context where the command will be run. Can be **all** (default), **check-deployment-only** or **process-deployment-only**\n- **runOnlyOnceByOrg**: If set to true, the command will be run only one time per org. A record of SfdxHardisTrace__c is stored to make that possible (it needs to be existing in target org)\n\nIf the commands are not the same depending on the target org, you can define them into **config/branches/.sfdx-hardis-BRANCHNAME.yml** instead of root **config/.sfdx-hardis.yml**\n\nExample:\n\n```yaml\ncommandsPreDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to the deployment user\n command: sf data update record --sobject User --where \"Username='deploy.github@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n\ncommandsPostDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to desired username\n command: sf data update record --sobject User --where \"Username='admin-yser@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n - id: someActionToRunJustOneTime\n label: And to run only if deployment is success\n command: sf sfdmu:run ...\n skipIfError: true\n context: process-deployment-only\n runOnlyOnceByOrg: true\n```\n\n### Pull Requests Custom Behaviors\n\nIf some words are found **in the Pull Request description**, special behaviors will be applied\n\n| Word | Behavior |\n| :--- | :--- |\n| NO_DELTA | Even if delta deployments are activated, a deployment in mode **full** will be performed for this Pull Request |\n| PURGE_FLOW_VERSIONS | After deployment, inactive and obsolete Flow Versions will be deleted (equivalent to command sf hardis:org:purge:flow)<br/>**Caution: This will also purge active Flow Interviews !** |\n| DESTRUCTIVE_CHANGES_AFTER_DEPLOYMENT | If a file manifest/destructiveChanges.xml is found, it will be executed in a separate step, after the deployment of the main package |\n\n> For example, define `PURGE_FLOW_VERSIONS` and `DESTRUCTIVE_CHANGES_AFTER_DEPLOYMENT` in your Pull Request comments if you want to delete fields that are used in an active flow.\n\nNote: it is also possible to define these behaviors as ENV variables:\n\n- For all deployments (example: `PURGE_FLOW_VERSIONS=true`)\n- For a specific branch, by appending the target branch name (example: `PURGE_FLOW_VERSIONS_UAT=true`)\n\n### Deployment plan (deprecated)\n\nIf you need to deploy in multiple steps, you can define a property `deploymentPlan` in `.sfdx-hardis.yml`.\n\n- If a file `manifest/package.xml` is found, it will be placed with order 0 in the deployment plan\n\n- If a file `manifest/destructiveChanges.xml` is found, it will be executed as --postdestructivechanges\n\n- If env var `SFDX_HARDIS_DEPLOY_IGNORE_SPLIT_PACKAGES` is defined as `false` , split of package.xml will be applied\n\nExample:\n\n```yaml\ndeploymentPlan:\n packages:\n - label: Deploy Flow-Workflow\n packageXmlFile: manifest/splits/packageXmlFlowWorkflow.xml\n order: 6\n - label: Deploy SharingRules - Case\n packageXmlFile: manifest/splits/packageXmlSharingRulesCase.xml\n order: 30\n waitAfter: 30\n```\n\n### Automated fixes post deployments\n\n#### List view with scope Mine\n\nIf you defined a property **listViewsToSetToMine** in your .sfdx-hardis.yml, related ListViews will be set to Mine ( see command <https://sfdx-hardis.cloudity.com/hardis/org/fix/listviewmine/> )\n\nExample:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to fix ListViews with mine from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n\nIf you need to increase the deployment waiting time (sf project deploy start --wait arg), you can define env variable SFDX_DEPLOY_WAIT_MINUTES (default: 120)\n\nIf you need notifications to be sent using the current Pull Request and not the one just merged ([see use case](https://github.com/hardisgroupcom/sfdx-hardis/issues/637#issuecomment-2230798904)), define env variable SFDX_HARDIS_DEPLOY_BEFORE_MERGE=true\n\nIf you want to disable the calculation and display of Flow Visual Git Diff in Pull Request comments, define variable **SFDX_DISABLE_FLOW_DIFF=true**\n",
11367
11367
  "examples": [
11368
11368
  "$ sf hardis:project:deploy:smart",
11369
11369
  "$ sf hardis:project:deploy:smart --check",
@@ -12137,6 +12137,221 @@
12137
12137
  "validate:deploy:project:hardis"
12138
12138
  ]
12139
12139
  },
12140
+ "hardis:project:fix:profiletabs": {
12141
+ "aliases": [],
12142
+ "args": {},
12143
+ "description": "Interactive prompts to add tab visibilities that are not retrieved by project retrieve start",
12144
+ "examples": [
12145
+ "$ sf hardis:project:fix:profiletabs"
12146
+ ],
12147
+ "flags": {
12148
+ "json": {
12149
+ "description": "Format output as json.",
12150
+ "helpGroup": "GLOBAL",
12151
+ "name": "json",
12152
+ "allowNo": false,
12153
+ "type": "boolean"
12154
+ },
12155
+ "flags-dir": {
12156
+ "helpGroup": "GLOBAL",
12157
+ "name": "flags-dir",
12158
+ "summary": "Import flag values from a directory.",
12159
+ "hasDynamicHelp": false,
12160
+ "multiple": false,
12161
+ "type": "option"
12162
+ },
12163
+ "path": {
12164
+ "char": "p",
12165
+ "description": "Root folder",
12166
+ "name": "path",
12167
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12168
+ "hasDynamicHelp": false,
12169
+ "multiple": false,
12170
+ "type": "option"
12171
+ },
12172
+ "debug": {
12173
+ "char": "d",
12174
+ "description": "Activate debug mode (more logs)",
12175
+ "name": "debug",
12176
+ "allowNo": false,
12177
+ "type": "boolean"
12178
+ },
12179
+ "websocket": {
12180
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12181
+ "name": "websocket",
12182
+ "hasDynamicHelp": false,
12183
+ "multiple": false,
12184
+ "type": "option"
12185
+ },
12186
+ "skipauth": {
12187
+ "description": "Skip authentication check when a default username is required",
12188
+ "name": "skipauth",
12189
+ "allowNo": false,
12190
+ "type": "boolean"
12191
+ },
12192
+ "target-org": {
12193
+ "aliases": [
12194
+ "targetusername",
12195
+ "u"
12196
+ ],
12197
+ "char": "o",
12198
+ "deprecateAliases": true,
12199
+ "name": "target-org",
12200
+ "noCacheDefault": true,
12201
+ "required": true,
12202
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
12203
+ "hasDynamicHelp": true,
12204
+ "multiple": false,
12205
+ "type": "option"
12206
+ }
12207
+ },
12208
+ "hasDynamicHelp": true,
12209
+ "hiddenAliases": [],
12210
+ "id": "hardis:project:fix:profiletabs",
12211
+ "pluginAlias": "sfdx-hardis",
12212
+ "pluginName": "sfdx-hardis",
12213
+ "pluginType": "core",
12214
+ "strict": true,
12215
+ "enableJsonFlag": true,
12216
+ "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
12217
+ "requiresProject": true,
12218
+ "isESM": true,
12219
+ "relativePath": [
12220
+ "lib",
12221
+ "commands",
12222
+ "hardis",
12223
+ "project",
12224
+ "fix",
12225
+ "profiletabs.js"
12226
+ ],
12227
+ "aliasPermutations": [],
12228
+ "permutations": [
12229
+ "hardis:project:fix:profiletabs",
12230
+ "project:hardis:fix:profiletabs",
12231
+ "project:fix:hardis:profiletabs",
12232
+ "project:fix:profiletabs:hardis",
12233
+ "hardis:fix:project:profiletabs",
12234
+ "fix:hardis:project:profiletabs",
12235
+ "fix:project:hardis:profiletabs",
12236
+ "fix:project:profiletabs:hardis",
12237
+ "hardis:fix:profiletabs:project",
12238
+ "fix:hardis:profiletabs:project",
12239
+ "fix:profiletabs:hardis:project",
12240
+ "fix:profiletabs:project:hardis",
12241
+ "hardis:project:profiletabs:fix",
12242
+ "project:hardis:profiletabs:fix",
12243
+ "project:profiletabs:hardis:fix",
12244
+ "project:profiletabs:fix:hardis",
12245
+ "hardis:profiletabs:project:fix",
12246
+ "profiletabs:hardis:project:fix",
12247
+ "profiletabs:project:hardis:fix",
12248
+ "profiletabs:project:fix:hardis",
12249
+ "hardis:profiletabs:fix:project",
12250
+ "profiletabs:hardis:fix:project",
12251
+ "profiletabs:fix:hardis:project",
12252
+ "profiletabs:fix:project:hardis"
12253
+ ]
12254
+ },
12255
+ "hardis:project:fix:v53flexipages": {
12256
+ "aliases": [],
12257
+ "args": {},
12258
+ "description": "Fix flexipages for apiVersion v53 (Winter22).\n\nNote: Update api version to 53.0 in package.xml and sfdx-project.json",
12259
+ "examples": [
12260
+ "$ sf hardis:project:fix:v53flexipages"
12261
+ ],
12262
+ "flags": {
12263
+ "json": {
12264
+ "description": "Format output as json.",
12265
+ "helpGroup": "GLOBAL",
12266
+ "name": "json",
12267
+ "allowNo": false,
12268
+ "type": "boolean"
12269
+ },
12270
+ "flags-dir": {
12271
+ "helpGroup": "GLOBAL",
12272
+ "name": "flags-dir",
12273
+ "summary": "Import flag values from a directory.",
12274
+ "hasDynamicHelp": false,
12275
+ "multiple": false,
12276
+ "type": "option"
12277
+ },
12278
+ "path": {
12279
+ "char": "p",
12280
+ "description": "Root folder",
12281
+ "name": "path",
12282
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12283
+ "hasDynamicHelp": false,
12284
+ "multiple": false,
12285
+ "type": "option"
12286
+ },
12287
+ "debug": {
12288
+ "char": "d",
12289
+ "description": "Activate debug mode (more logs)",
12290
+ "name": "debug",
12291
+ "allowNo": false,
12292
+ "type": "boolean"
12293
+ },
12294
+ "websocket": {
12295
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12296
+ "name": "websocket",
12297
+ "hasDynamicHelp": false,
12298
+ "multiple": false,
12299
+ "type": "option"
12300
+ },
12301
+ "skipauth": {
12302
+ "description": "Skip authentication check when a default username is required",
12303
+ "name": "skipauth",
12304
+ "allowNo": false,
12305
+ "type": "boolean"
12306
+ }
12307
+ },
12308
+ "hasDynamicHelp": false,
12309
+ "hiddenAliases": [],
12310
+ "id": "hardis:project:fix:v53flexipages",
12311
+ "pluginAlias": "sfdx-hardis",
12312
+ "pluginName": "sfdx-hardis",
12313
+ "pluginType": "core",
12314
+ "strict": true,
12315
+ "enableJsonFlag": true,
12316
+ "title": "Fix flexipages for v53",
12317
+ "requiresProject": true,
12318
+ "isESM": true,
12319
+ "relativePath": [
12320
+ "lib",
12321
+ "commands",
12322
+ "hardis",
12323
+ "project",
12324
+ "fix",
12325
+ "v53flexipages.js"
12326
+ ],
12327
+ "aliasPermutations": [],
12328
+ "permutations": [
12329
+ "hardis:project:fix:v53flexipages",
12330
+ "project:hardis:fix:v53flexipages",
12331
+ "project:fix:hardis:v53flexipages",
12332
+ "project:fix:v53flexipages:hardis",
12333
+ "hardis:fix:project:v53flexipages",
12334
+ "fix:hardis:project:v53flexipages",
12335
+ "fix:project:hardis:v53flexipages",
12336
+ "fix:project:v53flexipages:hardis",
12337
+ "hardis:fix:v53flexipages:project",
12338
+ "fix:hardis:v53flexipages:project",
12339
+ "fix:v53flexipages:hardis:project",
12340
+ "fix:v53flexipages:project:hardis",
12341
+ "hardis:project:v53flexipages:fix",
12342
+ "project:hardis:v53flexipages:fix",
12343
+ "project:v53flexipages:hardis:fix",
12344
+ "project:v53flexipages:fix:hardis",
12345
+ "hardis:v53flexipages:project:fix",
12346
+ "v53flexipages:hardis:project:fix",
12347
+ "v53flexipages:project:hardis:fix",
12348
+ "v53flexipages:project:fix:hardis",
12349
+ "hardis:v53flexipages:fix:project",
12350
+ "v53flexipages:hardis:fix:project",
12351
+ "v53flexipages:fix:hardis:project",
12352
+ "v53flexipages:fix:project:hardis"
12353
+ ]
12354
+ },
12140
12355
  "hardis:project:generate:bypass": {
12141
12356
  "aliases": [],
12142
12357
  "args": {},
@@ -12503,221 +12718,6 @@
12503
12718
  "gitdelta:generate:project:hardis"
12504
12719
  ]
12505
12720
  },
12506
- "hardis:project:fix:profiletabs": {
12507
- "aliases": [],
12508
- "args": {},
12509
- "description": "Interactive prompts to add tab visibilities that are not retrieved by project retrieve start",
12510
- "examples": [
12511
- "$ sf hardis:project:fix:profiletabs"
12512
- ],
12513
- "flags": {
12514
- "json": {
12515
- "description": "Format output as json.",
12516
- "helpGroup": "GLOBAL",
12517
- "name": "json",
12518
- "allowNo": false,
12519
- "type": "boolean"
12520
- },
12521
- "flags-dir": {
12522
- "helpGroup": "GLOBAL",
12523
- "name": "flags-dir",
12524
- "summary": "Import flag values from a directory.",
12525
- "hasDynamicHelp": false,
12526
- "multiple": false,
12527
- "type": "option"
12528
- },
12529
- "path": {
12530
- "char": "p",
12531
- "description": "Root folder",
12532
- "name": "path",
12533
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12534
- "hasDynamicHelp": false,
12535
- "multiple": false,
12536
- "type": "option"
12537
- },
12538
- "debug": {
12539
- "char": "d",
12540
- "description": "Activate debug mode (more logs)",
12541
- "name": "debug",
12542
- "allowNo": false,
12543
- "type": "boolean"
12544
- },
12545
- "websocket": {
12546
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12547
- "name": "websocket",
12548
- "hasDynamicHelp": false,
12549
- "multiple": false,
12550
- "type": "option"
12551
- },
12552
- "skipauth": {
12553
- "description": "Skip authentication check when a default username is required",
12554
- "name": "skipauth",
12555
- "allowNo": false,
12556
- "type": "boolean"
12557
- },
12558
- "target-org": {
12559
- "aliases": [
12560
- "targetusername",
12561
- "u"
12562
- ],
12563
- "char": "o",
12564
- "deprecateAliases": true,
12565
- "name": "target-org",
12566
- "noCacheDefault": true,
12567
- "required": true,
12568
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
12569
- "hasDynamicHelp": true,
12570
- "multiple": false,
12571
- "type": "option"
12572
- }
12573
- },
12574
- "hasDynamicHelp": true,
12575
- "hiddenAliases": [],
12576
- "id": "hardis:project:fix:profiletabs",
12577
- "pluginAlias": "sfdx-hardis",
12578
- "pluginName": "sfdx-hardis",
12579
- "pluginType": "core",
12580
- "strict": true,
12581
- "enableJsonFlag": true,
12582
- "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
12583
- "requiresProject": true,
12584
- "isESM": true,
12585
- "relativePath": [
12586
- "lib",
12587
- "commands",
12588
- "hardis",
12589
- "project",
12590
- "fix",
12591
- "profiletabs.js"
12592
- ],
12593
- "aliasPermutations": [],
12594
- "permutations": [
12595
- "hardis:project:fix:profiletabs",
12596
- "project:hardis:fix:profiletabs",
12597
- "project:fix:hardis:profiletabs",
12598
- "project:fix:profiletabs:hardis",
12599
- "hardis:fix:project:profiletabs",
12600
- "fix:hardis:project:profiletabs",
12601
- "fix:project:hardis:profiletabs",
12602
- "fix:project:profiletabs:hardis",
12603
- "hardis:fix:profiletabs:project",
12604
- "fix:hardis:profiletabs:project",
12605
- "fix:profiletabs:hardis:project",
12606
- "fix:profiletabs:project:hardis",
12607
- "hardis:project:profiletabs:fix",
12608
- "project:hardis:profiletabs:fix",
12609
- "project:profiletabs:hardis:fix",
12610
- "project:profiletabs:fix:hardis",
12611
- "hardis:profiletabs:project:fix",
12612
- "profiletabs:hardis:project:fix",
12613
- "profiletabs:project:hardis:fix",
12614
- "profiletabs:project:fix:hardis",
12615
- "hardis:profiletabs:fix:project",
12616
- "profiletabs:hardis:fix:project",
12617
- "profiletabs:fix:hardis:project",
12618
- "profiletabs:fix:project:hardis"
12619
- ]
12620
- },
12621
- "hardis:project:fix:v53flexipages": {
12622
- "aliases": [],
12623
- "args": {},
12624
- "description": "Fix flexipages for apiVersion v53 (Winter22).\n\nNote: Update api version to 53.0 in package.xml and sfdx-project.json",
12625
- "examples": [
12626
- "$ sf hardis:project:fix:v53flexipages"
12627
- ],
12628
- "flags": {
12629
- "json": {
12630
- "description": "Format output as json.",
12631
- "helpGroup": "GLOBAL",
12632
- "name": "json",
12633
- "allowNo": false,
12634
- "type": "boolean"
12635
- },
12636
- "flags-dir": {
12637
- "helpGroup": "GLOBAL",
12638
- "name": "flags-dir",
12639
- "summary": "Import flag values from a directory.",
12640
- "hasDynamicHelp": false,
12641
- "multiple": false,
12642
- "type": "option"
12643
- },
12644
- "path": {
12645
- "char": "p",
12646
- "description": "Root folder",
12647
- "name": "path",
12648
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12649
- "hasDynamicHelp": false,
12650
- "multiple": false,
12651
- "type": "option"
12652
- },
12653
- "debug": {
12654
- "char": "d",
12655
- "description": "Activate debug mode (more logs)",
12656
- "name": "debug",
12657
- "allowNo": false,
12658
- "type": "boolean"
12659
- },
12660
- "websocket": {
12661
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12662
- "name": "websocket",
12663
- "hasDynamicHelp": false,
12664
- "multiple": false,
12665
- "type": "option"
12666
- },
12667
- "skipauth": {
12668
- "description": "Skip authentication check when a default username is required",
12669
- "name": "skipauth",
12670
- "allowNo": false,
12671
- "type": "boolean"
12672
- }
12673
- },
12674
- "hasDynamicHelp": false,
12675
- "hiddenAliases": [],
12676
- "id": "hardis:project:fix:v53flexipages",
12677
- "pluginAlias": "sfdx-hardis",
12678
- "pluginName": "sfdx-hardis",
12679
- "pluginType": "core",
12680
- "strict": true,
12681
- "enableJsonFlag": true,
12682
- "title": "Fix flexipages for v53",
12683
- "requiresProject": true,
12684
- "isESM": true,
12685
- "relativePath": [
12686
- "lib",
12687
- "commands",
12688
- "hardis",
12689
- "project",
12690
- "fix",
12691
- "v53flexipages.js"
12692
- ],
12693
- "aliasPermutations": [],
12694
- "permutations": [
12695
- "hardis:project:fix:v53flexipages",
12696
- "project:hardis:fix:v53flexipages",
12697
- "project:fix:hardis:v53flexipages",
12698
- "project:fix:v53flexipages:hardis",
12699
- "hardis:fix:project:v53flexipages",
12700
- "fix:hardis:project:v53flexipages",
12701
- "fix:project:hardis:v53flexipages",
12702
- "fix:project:v53flexipages:hardis",
12703
- "hardis:fix:v53flexipages:project",
12704
- "fix:hardis:v53flexipages:project",
12705
- "fix:v53flexipages:hardis:project",
12706
- "fix:v53flexipages:project:hardis",
12707
- "hardis:project:v53flexipages:fix",
12708
- "project:hardis:v53flexipages:fix",
12709
- "project:v53flexipages:hardis:fix",
12710
- "project:v53flexipages:fix:hardis",
12711
- "hardis:v53flexipages:project:fix",
12712
- "v53flexipages:hardis:project:fix",
12713
- "v53flexipages:project:hardis:fix",
12714
- "v53flexipages:project:fix:hardis",
12715
- "hardis:v53flexipages:fix:project",
12716
- "v53flexipages:hardis:fix:project",
12717
- "v53flexipages:fix:hardis:project",
12718
- "v53flexipages:fix:project:hardis"
12719
- ]
12720
- },
12721
12721
  "hardis:project:metadata:findduplicates": {
12722
12722
  "aliases": [],
12723
12723
  "args": {},
@@ -14805,5 +14805,5 @@
14805
14805
  ]
14806
14806
  }
14807
14807
  },
14808
- "version": "5.40.1-beta202506151204.0"
14808
+ "version": "5.41.1-alpha202506172136.0"
14809
14809
  }