sfdx-hardis 5.44.2-alpha202507220945.0 → 5.44.2-alpha202507221024.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.
@@ -5476,15 +5476,13 @@
5476
5476
  "import:data:org:hardis"
5477
5477
  ]
5478
5478
  },
5479
- "hardis:org:diagnose:audittrail": {
5479
+ "hardis:org:fix:listviewmine": {
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- External Objects\n - xdsEncryptedFieldChange\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n - siqUserAcceptedTOS\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedofflineuseroffon\n - changedprofileforuserstdtostd\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserAdminVerifiedStatusVerified\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedusername\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - changedUserPhoneVerifiedStatusVerified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suNetworkAdminLogin\n - suNetworkAdminLogout\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\n## Excel output example\n\n![](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": "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",
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:fix:listviewmine",
5485
+ "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
5488
5486
  ],
5489
5487
  "flags": {
5490
5488
  "json": {
@@ -5502,26 +5500,10 @@
5502
5500
  "multiple": false,
5503
5501
  "type": "option"
5504
5502
  },
5505
- "excludeusers": {
5506
- "char": "e",
5507
- "description": "Comma-separated list of usernames to exclude",
5508
- "name": "excludeusers",
5509
- "hasDynamicHelp": false,
5510
- "multiple": false,
5511
- "type": "option"
5512
- },
5513
- "lastndays": {
5514
- "char": "t",
5515
- "description": "Number of days to extract from today (included)",
5516
- "name": "lastndays",
5517
- "hasDynamicHelp": false,
5518
- "multiple": false,
5519
- "type": "option"
5520
- },
5521
- "outputfile": {
5522
- "char": "f",
5523
- "description": "Force the path and name of output report file. Must end with .csv",
5524
- "name": "outputfile",
5503
+ "listviews": {
5504
+ "char": "l",
5505
+ "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
5506
+ "name": "listviews",
5525
5507
  "hasDynamicHelp": false,
5526
5508
  "multiple": false,
5527
5509
  "type": "option"
@@ -5564,57 +5546,57 @@
5564
5546
  },
5565
5547
  "hasDynamicHelp": true,
5566
5548
  "hiddenAliases": [],
5567
- "id": "hardis:org:diagnose:audittrail",
5549
+ "id": "hardis:org:fix:listviewmine",
5568
5550
  "pluginAlias": "sfdx-hardis",
5569
5551
  "pluginName": "sfdx-hardis",
5570
5552
  "pluginType": "core",
5571
5553
  "strict": true,
5572
5554
  "enableJsonFlag": true,
5573
- "title": "Diagnose content of Setup Audit Trail",
5574
- "requiresProject": false,
5555
+ "title": "Fix listviews with ",
5556
+ "requiresProject": true,
5575
5557
  "isESM": true,
5576
5558
  "relativePath": [
5577
5559
  "lib",
5578
5560
  "commands",
5579
5561
  "hardis",
5580
5562
  "org",
5581
- "diagnose",
5582
- "audittrail.js"
5563
+ "fix",
5564
+ "listviewmine.js"
5583
5565
  ],
5584
5566
  "aliasPermutations": [],
5585
5567
  "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"
5568
+ "hardis:org:fix:listviewmine",
5569
+ "org:hardis:fix:listviewmine",
5570
+ "org:fix:hardis:listviewmine",
5571
+ "org:fix:listviewmine:hardis",
5572
+ "hardis:fix:org:listviewmine",
5573
+ "fix:hardis:org:listviewmine",
5574
+ "fix:org:hardis:listviewmine",
5575
+ "fix:org:listviewmine:hardis",
5576
+ "hardis:fix:listviewmine:org",
5577
+ "fix:hardis:listviewmine:org",
5578
+ "fix:listviewmine:hardis:org",
5579
+ "fix:listviewmine:org:hardis",
5580
+ "hardis:org:listviewmine:fix",
5581
+ "org:hardis:listviewmine:fix",
5582
+ "org:listviewmine:hardis:fix",
5583
+ "org:listviewmine:fix:hardis",
5584
+ "hardis:listviewmine:org:fix",
5585
+ "listviewmine:hardis:org:fix",
5586
+ "listviewmine:org:hardis:fix",
5587
+ "listviewmine:org:fix:hardis",
5588
+ "hardis:listviewmine:fix:org",
5589
+ "listviewmine:hardis:fix:org",
5590
+ "listviewmine:fix:hardis:org",
5591
+ "listviewmine:fix:org:hardis"
5610
5592
  ]
5611
5593
  },
5612
- "hardis:org:diagnose:instanceupgrade": {
5594
+ "hardis:org:files:export": {
5613
5595
  "aliases": [],
5614
5596
  "args": {},
5615
- "description": "Get the date when the org instance will be upgraded (to Spring, Summer or Winter)\n ",
5597
+ "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",
5616
5598
  "examples": [
5617
- "$ sf hardis:org:diagnose:instanceupgrade"
5599
+ "$ sf hardis:org:files:export"
5618
5600
  ],
5619
5601
  "flags": {
5620
5602
  "json": {
@@ -5632,6 +5614,41 @@
5632
5614
  "multiple": false,
5633
5615
  "type": "option"
5634
5616
  },
5617
+ "path": {
5618
+ "char": "p",
5619
+ "description": "Path to the file export project",
5620
+ "name": "path",
5621
+ "hasDynamicHelp": false,
5622
+ "multiple": false,
5623
+ "type": "option"
5624
+ },
5625
+ "chunksize": {
5626
+ "char": "c",
5627
+ "description": "Number of records to add in a chunk before it is processed",
5628
+ "name": "chunksize",
5629
+ "default": 1000,
5630
+ "hasDynamicHelp": false,
5631
+ "multiple": false,
5632
+ "type": "option"
5633
+ },
5634
+ "polltimeout": {
5635
+ "char": "t",
5636
+ "description": "Timeout in MS for Bulk API calls",
5637
+ "name": "polltimeout",
5638
+ "default": 300000,
5639
+ "hasDynamicHelp": false,
5640
+ "multiple": false,
5641
+ "type": "option"
5642
+ },
5643
+ "startchunknumber": {
5644
+ "char": "s",
5645
+ "description": "Chunk number to start from",
5646
+ "name": "startchunknumber",
5647
+ "default": 0,
5648
+ "hasDynamicHelp": false,
5649
+ "multiple": false,
5650
+ "type": "option"
5651
+ },
5635
5652
  "debug": {
5636
5653
  "char": "d",
5637
5654
  "description": "Activate debug mode (more logs)",
@@ -5670,13 +5687,13 @@
5670
5687
  },
5671
5688
  "hasDynamicHelp": true,
5672
5689
  "hiddenAliases": [],
5673
- "id": "hardis:org:diagnose:instanceupgrade",
5690
+ "id": "hardis:org:files:export",
5674
5691
  "pluginAlias": "sfdx-hardis",
5675
5692
  "pluginName": "sfdx-hardis",
5676
5693
  "pluginType": "core",
5677
5694
  "strict": true,
5678
5695
  "enableJsonFlag": true,
5679
- "title": "Get Instance Upgrade date",
5696
+ "title": "Export files",
5680
5697
  "requiresProject": false,
5681
5698
  "isESM": true,
5682
5699
  "relativePath": [
@@ -5684,46 +5701,43 @@
5684
5701
  "commands",
5685
5702
  "hardis",
5686
5703
  "org",
5687
- "diagnose",
5688
- "instanceupgrade.js"
5704
+ "files",
5705
+ "export.js"
5689
5706
  ],
5690
5707
  "aliasPermutations": [],
5691
5708
  "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"
5709
+ "hardis:org:files:export",
5710
+ "org:hardis:files:export",
5711
+ "org:files:hardis:export",
5712
+ "org:files:export:hardis",
5713
+ "hardis:files:org:export",
5714
+ "files:hardis:org:export",
5715
+ "files:org:hardis:export",
5716
+ "files:org:export:hardis",
5717
+ "hardis:files:export:org",
5718
+ "files:hardis:export:org",
5719
+ "files:export:hardis:org",
5720
+ "files:export:org:hardis",
5721
+ "hardis:org:export:files",
5722
+ "org:hardis:export:files",
5723
+ "org:export:hardis:files",
5724
+ "org:export:files:hardis",
5725
+ "hardis:export:org:files",
5726
+ "export:hardis:org:files",
5727
+ "export:org:hardis:files",
5728
+ "export:org:files:hardis",
5729
+ "hardis:export:files:org",
5730
+ "export:hardis:files:org",
5731
+ "export:files:hardis:org",
5732
+ "export:files:org:hardis"
5716
5733
  ]
5717
5734
  },
5718
- "hardis:org:diagnose:legacyapi": {
5735
+ "hardis:org:files:import": {
5719
5736
  "aliases": [],
5720
5737
  "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",
5738
+ "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",
5722
5739
  "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"
5740
+ "$ sf hardis:org:files:import"
5727
5741
  ],
5728
5742
  "flags": {
5729
5743
  "json": {
@@ -5741,31 +5755,20 @@
5741
5755
  "multiple": false,
5742
5756
  "type": "option"
5743
5757
  },
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": {
5754
- "char": "l",
5755
- "description": "Number of latest EventLogFile events to analyze",
5756
- "name": "limit",
5757
- "default": 999,
5758
+ "path": {
5759
+ "char": "p",
5760
+ "description": "Path to the file export project",
5761
+ "name": "path",
5758
5762
  "hasDynamicHelp": false,
5759
5763
  "multiple": false,
5760
5764
  "type": "option"
5761
5765
  },
5762
- "outputfile": {
5766
+ "overwrite": {
5763
5767
  "char": "f",
5764
- "description": "Force the path and name of output report file. Must end with .csv",
5765
- "name": "outputfile",
5766
- "hasDynamicHelp": false,
5767
- "multiple": false,
5768
- "type": "option"
5768
+ "description": "Override existing files (doubles the number of API calls)",
5769
+ "name": "overwrite",
5770
+ "allowNo": false,
5771
+ "type": "boolean"
5769
5772
  },
5770
5773
  "debug": {
5771
5774
  "char": "d",
@@ -5805,13 +5808,13 @@
5805
5808
  },
5806
5809
  "hasDynamicHelp": true,
5807
5810
  "hiddenAliases": [],
5808
- "id": "hardis:org:diagnose:legacyapi",
5811
+ "id": "hardis:org:files:import",
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",
5817
+ "title": "Import files",
5815
5818
  "requiresProject": false,
5816
5819
  "isESM": true,
5817
5820
  "relativePath": [
@@ -5819,43 +5822,45 @@
5819
5822
  "commands",
5820
5823
  "hardis",
5821
5824
  "org",
5822
- "diagnose",
5823
- "legacyapi.js"
5825
+ "files",
5826
+ "import.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:files:import",
5831
+ "org:hardis:files:import",
5832
+ "org:files:hardis:import",
5833
+ "org:files:import:hardis",
5834
+ "hardis:files:org:import",
5835
+ "files:hardis:org:import",
5836
+ "files:org:hardis:import",
5837
+ "files:org:import:hardis",
5838
+ "hardis:files:import:org",
5839
+ "files:hardis:import:org",
5840
+ "files:import:hardis:org",
5841
+ "files:import:org:hardis",
5842
+ "hardis:org:import:files",
5843
+ "org:hardis:import:files",
5844
+ "org:import:hardis:files",
5845
+ "org:import:files:hardis",
5846
+ "hardis:import:org:files",
5847
+ "import:hardis:org:files",
5848
+ "import:org:hardis:files",
5849
+ "import:org:files:hardis",
5850
+ "hardis:import:files:org",
5851
+ "import:hardis:files:org",
5852
+ "import:files:hardis:org",
5853
+ "import:files:org:hardis"
5851
5854
  ]
5852
5855
  },
5853
- "hardis:org:diagnose:licenses": {
5856
+ "hardis:org:generate:packagexmlfull": {
5854
5857
  "aliases": [],
5855
5858
  "args": {},
5856
- "description": "Mostly used for monitoring (Grafana) but you can also use it manually :)",
5859
+ "description": "Generates full org package.xml, including managed items",
5857
5860
  "examples": [
5858
- "$ sf hardis:org:diagnose:licenses"
5861
+ "$ sf hardis:org:generate:packagexmlfull",
5862
+ "$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
5863
+ "$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
5859
5864
  ],
5860
5865
  "flags": {
5861
5866
  "json": {
@@ -5874,20 +5879,12 @@
5874
5879
  "type": "option"
5875
5880
  },
5876
5881
  "outputfile": {
5877
- "char": "f",
5878
- "description": "Force the path and name of output report file. Must end with .csv",
5882
+ "description": "Output package.xml file",
5879
5883
  "name": "outputfile",
5880
5884
  "hasDynamicHelp": false,
5881
5885
  "multiple": false,
5882
5886
  "type": "option"
5883
5887
  },
5884
- "usedonly": {
5885
- "char": "u",
5886
- "description": "Filter to have only used licenses",
5887
- "name": "usedonly",
5888
- "allowNo": false,
5889
- "type": "boolean"
5890
- },
5891
5888
  "debug": {
5892
5889
  "char": "d",
5893
5890
  "description": "Activate debug mode (more logs)",
@@ -5926,13 +5923,13 @@
5926
5923
  },
5927
5924
  "hasDynamicHelp": true,
5928
5925
  "hiddenAliases": [],
5929
- "id": "hardis:org:diagnose:licenses",
5926
+ "id": "hardis:org:generate:packagexmlfull",
5930
5927
  "pluginAlias": "sfdx-hardis",
5931
5928
  "pluginName": "sfdx-hardis",
5932
5929
  "pluginType": "core",
5933
5930
  "strict": true,
5934
5931
  "enableJsonFlag": true,
5935
- "title": "List licenses subscribed and used in a Salesforce org",
5932
+ "title": "Generate Full Org package.xml",
5936
5933
  "requiresProject": false,
5937
5934
  "isESM": true,
5938
5935
  "relativePath": [
@@ -5940,43 +5937,46 @@
5940
5937
  "commands",
5941
5938
  "hardis",
5942
5939
  "org",
5943
- "diagnose",
5944
- "licenses.js"
5940
+ "generate",
5941
+ "packagexmlfull.js"
5945
5942
  ],
5946
5943
  "aliasPermutations": [],
5947
5944
  "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"
5945
+ "hardis:org:generate:packagexmlfull",
5946
+ "org:hardis:generate:packagexmlfull",
5947
+ "org:generate:hardis:packagexmlfull",
5948
+ "org:generate:packagexmlfull:hardis",
5949
+ "hardis:generate:org:packagexmlfull",
5950
+ "generate:hardis:org:packagexmlfull",
5951
+ "generate:org:hardis:packagexmlfull",
5952
+ "generate:org:packagexmlfull:hardis",
5953
+ "hardis:generate:packagexmlfull:org",
5954
+ "generate:hardis:packagexmlfull:org",
5955
+ "generate:packagexmlfull:hardis:org",
5956
+ "generate:packagexmlfull:org:hardis",
5957
+ "hardis:org:packagexmlfull:generate",
5958
+ "org:hardis:packagexmlfull:generate",
5959
+ "org:packagexmlfull:hardis:generate",
5960
+ "org:packagexmlfull:generate:hardis",
5961
+ "hardis:packagexmlfull:org:generate",
5962
+ "packagexmlfull:hardis:org:generate",
5963
+ "packagexmlfull:org:hardis:generate",
5964
+ "packagexmlfull:org:generate:hardis",
5965
+ "hardis:packagexmlfull:generate:org",
5966
+ "packagexmlfull:hardis:generate:org",
5967
+ "packagexmlfull:generate:hardis:org",
5968
+ "packagexmlfull:generate:org:hardis"
5972
5969
  ]
5973
5970
  },
5974
- "hardis:org:diagnose:releaseupdates": {
5971
+ "hardis:org:diagnose:audittrail": {
5975
5972
  "aliases": [],
5976
5973
  "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",
5974
+ "description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nAlso detects updates of Custom Settings values (disable by defining `SKIP_AUDIT_TRAIL_CUSTOM_SETTINGS=true`)\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n - revokeduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n - CSPUserDisabled\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- External Objects\n - xdsEncryptedFieldChange\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n - siqUserAcceptedTOS\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedofflineuseroffon\n - changedprofileforuserstdtostd\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserAdminVerifiedStatusVerified\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedusername\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - changedUserPhoneVerifiedStatusVerified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suNetworkAdminLogin\n - suNetworkAdminLogout\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\n## Excel output example\n\n![](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",
5978
5975
  "examples": [
5979
- "$ sf hardis:org:diagnose:releaseupdates"
5976
+ "$ sf hardis:org:diagnose:audittrail",
5977
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5978
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5979
+ "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5980
5980
  ],
5981
5981
  "flags": {
5982
5982
  "json": {
@@ -5994,6 +5994,22 @@
5994
5994
  "multiple": false,
5995
5995
  "type": "option"
5996
5996
  },
5997
+ "excludeusers": {
5998
+ "char": "e",
5999
+ "description": "Comma-separated list of usernames to exclude",
6000
+ "name": "excludeusers",
6001
+ "hasDynamicHelp": false,
6002
+ "multiple": false,
6003
+ "type": "option"
6004
+ },
6005
+ "lastndays": {
6006
+ "char": "t",
6007
+ "description": "Number of days to extract from today (included)",
6008
+ "name": "lastndays",
6009
+ "hasDynamicHelp": false,
6010
+ "multiple": false,
6011
+ "type": "option"
6012
+ },
5997
6013
  "outputfile": {
5998
6014
  "char": "f",
5999
6015
  "description": "Force the path and name of output report file. Must end with .csv",
@@ -6040,13 +6056,13 @@
6040
6056
  },
6041
6057
  "hasDynamicHelp": true,
6042
6058
  "hiddenAliases": [],
6043
- "id": "hardis:org:diagnose:releaseupdates",
6059
+ "id": "hardis:org:diagnose:audittrail",
6044
6060
  "pluginAlias": "sfdx-hardis",
6045
6061
  "pluginName": "sfdx-hardis",
6046
6062
  "pluginType": "core",
6047
6063
  "strict": true,
6048
6064
  "enableJsonFlag": true,
6049
- "title": "Check Release Updates of an org",
6065
+ "title": "Diagnose content of Setup Audit Trail",
6050
6066
  "requiresProject": false,
6051
6067
  "isESM": true,
6052
6068
  "relativePath": [
@@ -6055,43 +6071,42 @@
6055
6071
  "hardis",
6056
6072
  "org",
6057
6073
  "diagnose",
6058
- "releaseupdates.js"
6074
+ "audittrail.js"
6059
6075
  ],
6060
6076
  "aliasPermutations": [],
6061
6077
  "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"
6078
+ "hardis:org:diagnose:audittrail",
6079
+ "org:hardis:diagnose:audittrail",
6080
+ "org:diagnose:hardis:audittrail",
6081
+ "org:diagnose:audittrail:hardis",
6082
+ "hardis:diagnose:org:audittrail",
6083
+ "diagnose:hardis:org:audittrail",
6084
+ "diagnose:org:hardis:audittrail",
6085
+ "diagnose:org:audittrail:hardis",
6086
+ "hardis:diagnose:audittrail:org",
6087
+ "diagnose:hardis:audittrail:org",
6088
+ "diagnose:audittrail:hardis:org",
6089
+ "diagnose:audittrail:org:hardis",
6090
+ "hardis:org:audittrail:diagnose",
6091
+ "org:hardis:audittrail:diagnose",
6092
+ "org:audittrail:hardis:diagnose",
6093
+ "org:audittrail:diagnose:hardis",
6094
+ "hardis:audittrail:org:diagnose",
6095
+ "audittrail:hardis:org:diagnose",
6096
+ "audittrail:org:hardis:diagnose",
6097
+ "audittrail:org:diagnose:hardis",
6098
+ "hardis:audittrail:diagnose:org",
6099
+ "audittrail:hardis:diagnose:org",
6100
+ "audittrail:diagnose:hardis:org",
6101
+ "audittrail:diagnose:org:hardis"
6086
6102
  ]
6087
6103
  },
6088
- "hardis:org:diagnose:unused-apex-classes": {
6104
+ "hardis:org:diagnose:instanceupgrade": {
6089
6105
  "aliases": [],
6090
6106
  "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",
6107
+ "description": "Get the date when the org instance will be upgraded (to Spring, Summer or Winter)\n ",
6092
6108
  "examples": [
6093
- "$ sf hardis:org:diagnose:unused-apex-classes",
6094
- "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
6109
+ "$ sf hardis:org:diagnose:instanceupgrade"
6095
6110
  ],
6096
6111
  "flags": {
6097
6112
  "json": {
@@ -6109,22 +6124,6 @@
6109
6124
  "multiple": false,
6110
6125
  "type": "option"
6111
6126
  },
6112
- "outputfile": {
6113
- "char": "f",
6114
- "description": "Force the path and name of output report file. Must end with .csv",
6115
- "name": "outputfile",
6116
- "hasDynamicHelp": false,
6117
- "multiple": false,
6118
- "type": "option"
6119
- },
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",
6124
- "hasDynamicHelp": false,
6125
- "multiple": false,
6126
- "type": "option"
6127
- },
6128
6127
  "debug": {
6129
6128
  "char": "d",
6130
6129
  "description": "Activate debug mode (more logs)",
@@ -6163,13 +6162,13 @@
6163
6162
  },
6164
6163
  "hasDynamicHelp": true,
6165
6164
  "hiddenAliases": [],
6166
- "id": "hardis:org:diagnose:unused-apex-classes",
6165
+ "id": "hardis:org:diagnose:instanceupgrade",
6167
6166
  "pluginAlias": "sfdx-hardis",
6168
6167
  "pluginName": "sfdx-hardis",
6169
6168
  "pluginType": "core",
6170
6169
  "strict": true,
6171
6170
  "enableJsonFlag": true,
6172
- "title": "Detect unused Apex classes in an org",
6171
+ "title": "Get Instance Upgrade date",
6173
6172
  "requiresProject": false,
6174
6173
  "isESM": true,
6175
6174
  "relativePath": [
@@ -6178,57 +6177,78 @@
6178
6177
  "hardis",
6179
6178
  "org",
6180
6179
  "diagnose",
6181
- "unused-apex-classes.js"
6180
+ "instanceupgrade.js"
6182
6181
  ],
6183
6182
  "aliasPermutations": [],
6184
6183
  "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"
6209
- ]
6210
- },
6211
- "hardis:org:diagnose:unused-connected-apps": {
6212
- "aliases": [],
6213
- "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",
6215
- "examples": [
6216
- "$ sf hardis:org:diagnose:unused-connected-apps"
6217
- ],
6218
- "flags": {
6219
- "json": {
6220
- "description": "Format output as json.",
6221
- "helpGroup": "GLOBAL",
6222
- "name": "json",
6223
- "allowNo": false,
6224
- "type": "boolean"
6225
- },
6226
- "flags-dir": {
6227
- "helpGroup": "GLOBAL",
6228
- "name": "flags-dir",
6229
- "summary": "Import flag values from a directory.",
6230
- "hasDynamicHelp": false,
6231
- "multiple": false,
6184
+ "hardis:org:diagnose:instanceupgrade",
6185
+ "org:hardis:diagnose:instanceupgrade",
6186
+ "org:diagnose:hardis:instanceupgrade",
6187
+ "org:diagnose:instanceupgrade:hardis",
6188
+ "hardis:diagnose:org:instanceupgrade",
6189
+ "diagnose:hardis:org:instanceupgrade",
6190
+ "diagnose:org:hardis:instanceupgrade",
6191
+ "diagnose:org:instanceupgrade:hardis",
6192
+ "hardis:diagnose:instanceupgrade:org",
6193
+ "diagnose:hardis:instanceupgrade:org",
6194
+ "diagnose:instanceupgrade:hardis:org",
6195
+ "diagnose:instanceupgrade:org:hardis",
6196
+ "hardis:org:instanceupgrade:diagnose",
6197
+ "org:hardis:instanceupgrade:diagnose",
6198
+ "org:instanceupgrade:hardis:diagnose",
6199
+ "org:instanceupgrade:diagnose:hardis",
6200
+ "hardis:instanceupgrade:org:diagnose",
6201
+ "instanceupgrade:hardis:org:diagnose",
6202
+ "instanceupgrade:org:hardis:diagnose",
6203
+ "instanceupgrade:org:diagnose:hardis",
6204
+ "hardis:instanceupgrade:diagnose:org",
6205
+ "instanceupgrade:hardis:diagnose:org",
6206
+ "instanceupgrade:diagnose:hardis:org",
6207
+ "instanceupgrade:diagnose:org:hardis"
6208
+ ]
6209
+ },
6210
+ "hardis:org:diagnose:legacyapi": {
6211
+ "aliases": [],
6212
+ "args": {},
6213
+ "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",
6214
+ "examples": [
6215
+ "$ sf hardis:org:diagnose:legacyapi",
6216
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
6217
+ "$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
6218
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
6219
+ ],
6220
+ "flags": {
6221
+ "json": {
6222
+ "description": "Format output as json.",
6223
+ "helpGroup": "GLOBAL",
6224
+ "name": "json",
6225
+ "allowNo": false,
6226
+ "type": "boolean"
6227
+ },
6228
+ "flags-dir": {
6229
+ "helpGroup": "GLOBAL",
6230
+ "name": "flags-dir",
6231
+ "summary": "Import flag values from a directory.",
6232
+ "hasDynamicHelp": false,
6233
+ "multiple": false,
6234
+ "type": "option"
6235
+ },
6236
+ "eventtype": {
6237
+ "char": "e",
6238
+ "description": "Type of EventLogFile event to analyze",
6239
+ "name": "eventtype",
6240
+ "default": "ApiTotalUsage",
6241
+ "hasDynamicHelp": false,
6242
+ "multiple": false,
6243
+ "type": "option"
6244
+ },
6245
+ "limit": {
6246
+ "char": "l",
6247
+ "description": "Number of latest EventLogFile events to analyze",
6248
+ "name": "limit",
6249
+ "default": 999,
6250
+ "hasDynamicHelp": false,
6251
+ "multiple": false,
6232
6252
  "type": "option"
6233
6253
  },
6234
6254
  "outputfile": {
@@ -6277,30 +6297,13 @@
6277
6297
  },
6278
6298
  "hasDynamicHelp": true,
6279
6299
  "hiddenAliases": [],
6280
- "id": "hardis:org:diagnose:unused-connected-apps",
6300
+ "id": "hardis:org:diagnose:legacyapi",
6281
6301
  "pluginAlias": "sfdx-hardis",
6282
6302
  "pluginName": "sfdx-hardis",
6283
6303
  "pluginType": "core",
6284
6304
  "strict": true,
6285
6305
  "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
- ],
6306
+ "title": "Check for legacy API use",
6304
6307
  "requiresProject": false,
6305
6308
  "isESM": true,
6306
6309
  "relativePath": [
@@ -6309,43 +6312,42 @@
6309
6312
  "hardis",
6310
6313
  "org",
6311
6314
  "diagnose",
6312
- "unused-connected-apps.js"
6315
+ "legacyapi.js"
6313
6316
  ],
6314
6317
  "aliasPermutations": [],
6315
6318
  "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"
6319
+ "hardis:org:diagnose:legacyapi",
6320
+ "org:hardis:diagnose:legacyapi",
6321
+ "org:diagnose:hardis:legacyapi",
6322
+ "org:diagnose:legacyapi:hardis",
6323
+ "hardis:diagnose:org:legacyapi",
6324
+ "diagnose:hardis:org:legacyapi",
6325
+ "diagnose:org:hardis:legacyapi",
6326
+ "diagnose:org:legacyapi:hardis",
6327
+ "hardis:diagnose:legacyapi:org",
6328
+ "diagnose:hardis:legacyapi:org",
6329
+ "diagnose:legacyapi:hardis:org",
6330
+ "diagnose:legacyapi:org:hardis",
6331
+ "hardis:org:legacyapi:diagnose",
6332
+ "org:hardis:legacyapi:diagnose",
6333
+ "org:legacyapi:hardis:diagnose",
6334
+ "org:legacyapi:diagnose:hardis",
6335
+ "hardis:legacyapi:org:diagnose",
6336
+ "legacyapi:hardis:org:diagnose",
6337
+ "legacyapi:org:hardis:diagnose",
6338
+ "legacyapi:org:diagnose:hardis",
6339
+ "hardis:legacyapi:diagnose:org",
6340
+ "legacyapi:hardis:diagnose:org",
6341
+ "legacyapi:diagnose:hardis:org",
6342
+ "legacyapi:diagnose:org:hardis"
6340
6343
  ]
6341
6344
  },
6342
- "hardis:org:diagnose:unusedlicenses": {
6345
+ "hardis:org:diagnose:licenses": {
6343
6346
  "aliases": [],
6344
6347
  "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",
6348
+ "description": "Mostly used for monitoring (Grafana) but you can also use it manually :)",
6346
6349
  "examples": [
6347
- "$ sf hardis:org:diagnose:unusedlicenses",
6348
- "$ sf hardis:org:diagnose:unusedlicenses --fix"
6350
+ "$ sf hardis:org:diagnose:licenses"
6349
6351
  ],
6350
6352
  "flags": {
6351
6353
  "json": {
@@ -6371,6 +6373,13 @@
6371
6373
  "multiple": false,
6372
6374
  "type": "option"
6373
6375
  },
6376
+ "usedonly": {
6377
+ "char": "u",
6378
+ "description": "Filter to have only used licenses",
6379
+ "name": "usedonly",
6380
+ "allowNo": false,
6381
+ "type": "boolean"
6382
+ },
6374
6383
  "debug": {
6375
6384
  "char": "d",
6376
6385
  "description": "Activate debug mode (more logs)",
@@ -6409,32 +6418,14 @@
6409
6418
  },
6410
6419
  "hasDynamicHelp": true,
6411
6420
  "hiddenAliases": [],
6412
- "id": "hardis:org:diagnose:unusedlicenses",
6421
+ "id": "hardis:org:diagnose:licenses",
6413
6422
  "pluginAlias": "sfdx-hardis",
6414
6423
  "pluginName": "sfdx-hardis",
6415
6424
  "pluginType": "core",
6416
6425
  "strict": true,
6417
6426
  "enableJsonFlag": true,
6418
- "title": "Detect unused Permission Set Licenses (beta)",
6427
+ "title": "List licenses subscribed and used in a Salesforce org",
6419
6428
  "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
6429
  "isESM": true,
6439
6430
  "relativePath": [
6440
6431
  "lib",
@@ -6442,46 +6433,42 @@
6442
6433
  "hardis",
6443
6434
  "org",
6444
6435
  "diagnose",
6445
- "unusedlicenses.js"
6436
+ "licenses.js"
6446
6437
  ],
6447
6438
  "aliasPermutations": [],
6448
6439
  "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"
6440
+ "hardis:org:diagnose:licenses",
6441
+ "org:hardis:diagnose:licenses",
6442
+ "org:diagnose:hardis:licenses",
6443
+ "org:diagnose:licenses:hardis",
6444
+ "hardis:diagnose:org:licenses",
6445
+ "diagnose:hardis:org:licenses",
6446
+ "diagnose:org:hardis:licenses",
6447
+ "diagnose:org:licenses:hardis",
6448
+ "hardis:diagnose:licenses:org",
6449
+ "diagnose:hardis:licenses:org",
6450
+ "diagnose:licenses:hardis:org",
6451
+ "diagnose:licenses:org:hardis",
6452
+ "hardis:org:licenses:diagnose",
6453
+ "org:hardis:licenses:diagnose",
6454
+ "org:licenses:hardis:diagnose",
6455
+ "org:licenses:diagnose:hardis",
6456
+ "hardis:licenses:org:diagnose",
6457
+ "licenses:hardis:org:diagnose",
6458
+ "licenses:org:hardis:diagnose",
6459
+ "licenses:org:diagnose:hardis",
6460
+ "hardis:licenses:diagnose:org",
6461
+ "licenses:hardis:diagnose:org",
6462
+ "licenses:diagnose:hardis:org",
6463
+ "licenses:diagnose:org:hardis"
6473
6464
  ]
6474
6465
  },
6475
- "hardis:org:diagnose:unusedusers": {
6466
+ "hardis:org:diagnose:releaseupdates": {
6476
6467
  "aliases": [],
6477
6468
  "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",
6469
+ "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",
6479
6470
  "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"
6471
+ "$ sf hardis:org:diagnose:releaseupdates"
6485
6472
  ],
6486
6473
  "flags": {
6487
6474
  "json": {
@@ -6507,51 +6494,16 @@
6507
6494
  "multiple": false,
6508
6495
  "type": "option"
6509
6496
  },
6510
- "days": {
6511
- "char": "t",
6512
- "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
6513
- "name": "days",
6514
- "hasDynamicHelp": false,
6515
- "multiple": false,
6516
- "type": "option"
6517
- },
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
- "debug": {
6546
- "char": "d",
6547
- "description": "Activate debug mode (more logs)",
6548
- "name": "debug",
6549
- "allowNo": false,
6550
- "type": "boolean"
6551
- },
6552
- "websocket": {
6553
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
6554
- "name": "websocket",
6497
+ "debug": {
6498
+ "char": "d",
6499
+ "description": "Activate debug mode (more logs)",
6500
+ "name": "debug",
6501
+ "allowNo": false,
6502
+ "type": "boolean"
6503
+ },
6504
+ "websocket": {
6505
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
6506
+ "name": "websocket",
6555
6507
  "hasDynamicHelp": false,
6556
6508
  "multiple": false,
6557
6509
  "type": "option"
@@ -6580,13 +6532,13 @@
6580
6532
  },
6581
6533
  "hasDynamicHelp": true,
6582
6534
  "hiddenAliases": [],
6583
- "id": "hardis:org:diagnose:unusedusers",
6535
+ "id": "hardis:org:diagnose:releaseupdates",
6584
6536
  "pluginAlias": "sfdx-hardis",
6585
6537
  "pluginName": "sfdx-hardis",
6586
6538
  "pluginType": "core",
6587
6539
  "strict": true,
6588
6540
  "enableJsonFlag": true,
6589
- "title": "Detect unused Users in Salesforce",
6541
+ "title": "Check Release Updates of an org",
6590
6542
  "requiresProject": false,
6591
6543
  "isESM": true,
6592
6544
  "relativePath": [
@@ -6595,42 +6547,43 @@
6595
6547
  "hardis",
6596
6548
  "org",
6597
6549
  "diagnose",
6598
- "unusedusers.js"
6550
+ "releaseupdates.js"
6599
6551
  ],
6600
6552
  "aliasPermutations": [],
6601
6553
  "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"
6554
+ "hardis:org:diagnose:releaseupdates",
6555
+ "org:hardis:diagnose:releaseupdates",
6556
+ "org:diagnose:hardis:releaseupdates",
6557
+ "org:diagnose:releaseupdates:hardis",
6558
+ "hardis:diagnose:org:releaseupdates",
6559
+ "diagnose:hardis:org:releaseupdates",
6560
+ "diagnose:org:hardis:releaseupdates",
6561
+ "diagnose:org:releaseupdates:hardis",
6562
+ "hardis:diagnose:releaseupdates:org",
6563
+ "diagnose:hardis:releaseupdates:org",
6564
+ "diagnose:releaseupdates:hardis:org",
6565
+ "diagnose:releaseupdates:org:hardis",
6566
+ "hardis:org:releaseupdates:diagnose",
6567
+ "org:hardis:releaseupdates:diagnose",
6568
+ "org:releaseupdates:hardis:diagnose",
6569
+ "org:releaseupdates:diagnose:hardis",
6570
+ "hardis:releaseupdates:org:diagnose",
6571
+ "releaseupdates:hardis:org:diagnose",
6572
+ "releaseupdates:org:hardis:diagnose",
6573
+ "releaseupdates:org:diagnose:hardis",
6574
+ "hardis:releaseupdates:diagnose:org",
6575
+ "releaseupdates:hardis:diagnose:org",
6576
+ "releaseupdates:diagnose:hardis:org",
6577
+ "releaseupdates:diagnose:org:hardis"
6626
6578
  ]
6627
6579
  },
6628
- "hardis:org:files:export": {
6580
+ "hardis:org:diagnose:unused-apex-classes": {
6629
6581
  "aliases": [],
6630
6582
  "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",
6583
+ "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",
6632
6584
  "examples": [
6633
- "$ sf hardis:org:files:export"
6585
+ "$ sf hardis:org:diagnose:unused-apex-classes",
6586
+ "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
6634
6587
  ],
6635
6588
  "flags": {
6636
6589
  "json": {
@@ -6648,37 +6601,18 @@
6648
6601
  "multiple": false,
6649
6602
  "type": "option"
6650
6603
  },
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,
6604
+ "outputfile": {
6605
+ "char": "f",
6606
+ "description": "Force the path and name of output report file. Must end with .csv",
6607
+ "name": "outputfile",
6664
6608
  "hasDynamicHelp": false,
6665
6609
  "multiple": false,
6666
6610
  "type": "option"
6667
6611
  },
6668
- "polltimeout": {
6612
+ "days": {
6669
6613
  "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,
6614
+ "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
6615
+ "name": "days",
6682
6616
  "hasDynamicHelp": false,
6683
6617
  "multiple": false,
6684
6618
  "type": "option"
@@ -6721,13 +6655,13 @@
6721
6655
  },
6722
6656
  "hasDynamicHelp": true,
6723
6657
  "hiddenAliases": [],
6724
- "id": "hardis:org:files:export",
6658
+ "id": "hardis:org:diagnose:unused-apex-classes",
6725
6659
  "pluginAlias": "sfdx-hardis",
6726
6660
  "pluginName": "sfdx-hardis",
6727
6661
  "pluginType": "core",
6728
6662
  "strict": true,
6729
6663
  "enableJsonFlag": true,
6730
- "title": "Export files",
6664
+ "title": "Detect unused Apex classes in an org",
6731
6665
  "requiresProject": false,
6732
6666
  "isESM": true,
6733
6667
  "relativePath": [
@@ -6735,43 +6669,43 @@
6735
6669
  "commands",
6736
6670
  "hardis",
6737
6671
  "org",
6738
- "files",
6739
- "export.js"
6672
+ "diagnose",
6673
+ "unused-apex-classes.js"
6740
6674
  ],
6741
6675
  "aliasPermutations": [],
6742
6676
  "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"
6677
+ "hardis:org:diagnose:unused-apex-classes",
6678
+ "org:hardis:diagnose:unused-apex-classes",
6679
+ "org:diagnose:hardis:unused-apex-classes",
6680
+ "org:diagnose:unused-apex-classes:hardis",
6681
+ "hardis:diagnose:org:unused-apex-classes",
6682
+ "diagnose:hardis:org:unused-apex-classes",
6683
+ "diagnose:org:hardis:unused-apex-classes",
6684
+ "diagnose:org:unused-apex-classes:hardis",
6685
+ "hardis:diagnose:unused-apex-classes:org",
6686
+ "diagnose:hardis:unused-apex-classes:org",
6687
+ "diagnose:unused-apex-classes:hardis:org",
6688
+ "diagnose:unused-apex-classes:org:hardis",
6689
+ "hardis:org:unused-apex-classes:diagnose",
6690
+ "org:hardis:unused-apex-classes:diagnose",
6691
+ "org:unused-apex-classes:hardis:diagnose",
6692
+ "org:unused-apex-classes:diagnose:hardis",
6693
+ "hardis:unused-apex-classes:org:diagnose",
6694
+ "unused-apex-classes:hardis:org:diagnose",
6695
+ "unused-apex-classes:org:hardis:diagnose",
6696
+ "unused-apex-classes:org:diagnose:hardis",
6697
+ "hardis:unused-apex-classes:diagnose:org",
6698
+ "unused-apex-classes:hardis:diagnose:org",
6699
+ "unused-apex-classes:diagnose:hardis:org",
6700
+ "unused-apex-classes:diagnose:org:hardis"
6767
6701
  ]
6768
6702
  },
6769
- "hardis:org:files:import": {
6703
+ "hardis:org:diagnose:unused-connected-apps": {
6770
6704
  "aliases": [],
6771
6705
  "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",
6706
+ "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",
6773
6707
  "examples": [
6774
- "$ sf hardis:org:files:import"
6708
+ "$ sf hardis:org:diagnose:unused-connected-apps"
6775
6709
  ],
6776
6710
  "flags": {
6777
6711
  "json": {
@@ -6789,21 +6723,14 @@
6789
6723
  "multiple": false,
6790
6724
  "type": "option"
6791
6725
  },
6792
- "path": {
6793
- "char": "p",
6794
- "description": "Path to the file export project",
6795
- "name": "path",
6726
+ "outputfile": {
6727
+ "char": "f",
6728
+ "description": "Force the path and name of output report file. Must end with .csv",
6729
+ "name": "outputfile",
6796
6730
  "hasDynamicHelp": false,
6797
6731
  "multiple": false,
6798
6732
  "type": "option"
6799
6733
  },
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
6734
  "debug": {
6808
6735
  "char": "d",
6809
6736
  "description": "Activate debug mode (more logs)",
@@ -6842,13 +6769,30 @@
6842
6769
  },
6843
6770
  "hasDynamicHelp": true,
6844
6771
  "hiddenAliases": [],
6845
- "id": "hardis:org:files:import",
6772
+ "id": "hardis:org:diagnose:unused-connected-apps",
6846
6773
  "pluginAlias": "sfdx-hardis",
6847
6774
  "pluginName": "sfdx-hardis",
6848
6775
  "pluginType": "core",
6849
6776
  "strict": true,
6850
6777
  "enableJsonFlag": true,
6851
- "title": "Import files",
6778
+ "title": "Unused Connected Apps in an org",
6779
+ "allowedInactiveConnectedApps": [
6780
+ "Ant Migration Tool",
6781
+ "Chatter Desktop",
6782
+ "Chatter Mobile for BlackBerry",
6783
+ "Force.com IDE",
6784
+ "OIQ_Integration",
6785
+ "Salesforce CLI",
6786
+ "Salesforce Files",
6787
+ "Salesforce Mobile Dashboards",
6788
+ "Salesforce Touch",
6789
+ "Salesforce for Outlook",
6790
+ "SalesforceA",
6791
+ "SalesforceA for Android",
6792
+ "SalesforceA for iOS",
6793
+ "SalesforceDX Namespace Registry",
6794
+ "SalesforceIQ"
6795
+ ],
6852
6796
  "requiresProject": false,
6853
6797
  "isESM": true,
6854
6798
  "relativePath": [
@@ -6856,44 +6800,44 @@
6856
6800
  "commands",
6857
6801
  "hardis",
6858
6802
  "org",
6859
- "files",
6860
- "import.js"
6803
+ "diagnose",
6804
+ "unused-connected-apps.js"
6861
6805
  ],
6862
6806
  "aliasPermutations": [],
6863
6807
  "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"
6808
+ "hardis:org:diagnose:unused-connected-apps",
6809
+ "org:hardis:diagnose:unused-connected-apps",
6810
+ "org:diagnose:hardis:unused-connected-apps",
6811
+ "org:diagnose:unused-connected-apps:hardis",
6812
+ "hardis:diagnose:org:unused-connected-apps",
6813
+ "diagnose:hardis:org:unused-connected-apps",
6814
+ "diagnose:org:hardis:unused-connected-apps",
6815
+ "diagnose:org:unused-connected-apps:hardis",
6816
+ "hardis:diagnose:unused-connected-apps:org",
6817
+ "diagnose:hardis:unused-connected-apps:org",
6818
+ "diagnose:unused-connected-apps:hardis:org",
6819
+ "diagnose:unused-connected-apps:org:hardis",
6820
+ "hardis:org:unused-connected-apps:diagnose",
6821
+ "org:hardis:unused-connected-apps:diagnose",
6822
+ "org:unused-connected-apps:hardis:diagnose",
6823
+ "org:unused-connected-apps:diagnose:hardis",
6824
+ "hardis:unused-connected-apps:org:diagnose",
6825
+ "unused-connected-apps:hardis:org:diagnose",
6826
+ "unused-connected-apps:org:hardis:diagnose",
6827
+ "unused-connected-apps:org:diagnose:hardis",
6828
+ "hardis:unused-connected-apps:diagnose:org",
6829
+ "unused-connected-apps:hardis:diagnose:org",
6830
+ "unused-connected-apps:diagnose:hardis:org",
6831
+ "unused-connected-apps:diagnose:org:hardis"
6888
6832
  ]
6889
6833
  },
6890
- "hardis:org:fix:listviewmine": {
6834
+ "hardis:org:diagnose:unusedlicenses": {
6891
6835
  "aliases": [],
6892
6836
  "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",
6837
+ "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",
6894
6838
  "examples": [
6895
- "$ sf hardis:org:fix:listviewmine",
6896
- "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
6839
+ "$ sf hardis:org:diagnose:unusedlicenses",
6840
+ "$ sf hardis:org:diagnose:unusedlicenses --fix"
6897
6841
  ],
6898
6842
  "flags": {
6899
6843
  "json": {
@@ -6911,10 +6855,10 @@
6911
6855
  "multiple": false,
6912
6856
  "type": "option"
6913
6857
  },
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",
6858
+ "outputfile": {
6859
+ "char": "f",
6860
+ "description": "Force the path and name of output report file. Must end with .csv",
6861
+ "name": "outputfile",
6918
6862
  "hasDynamicHelp": false,
6919
6863
  "multiple": false,
6920
6864
  "type": "option"
@@ -6957,59 +6901,79 @@
6957
6901
  },
6958
6902
  "hasDynamicHelp": true,
6959
6903
  "hiddenAliases": [],
6960
- "id": "hardis:org:fix:listviewmine",
6904
+ "id": "hardis:org:diagnose:unusedlicenses",
6961
6905
  "pluginAlias": "sfdx-hardis",
6962
6906
  "pluginName": "sfdx-hardis",
6963
6907
  "pluginType": "core",
6964
6908
  "strict": true,
6965
6909
  "enableJsonFlag": true,
6966
- "title": "Fix listviews with ",
6967
- "requiresProject": true,
6910
+ "title": "Detect unused Permission Set Licenses (beta)",
6911
+ "requiresProject": false,
6912
+ "additionalPermissionSetsToAlwaysGet": [
6913
+ "Sales_User"
6914
+ ],
6915
+ "permSetsPermSetLicenses": [
6916
+ {
6917
+ "permSet": "Sales_User",
6918
+ "permSetLicense": "SalesUserPsl"
6919
+ }
6920
+ ],
6921
+ "profilesPermissionSetLicenses": [
6922
+ {
6923
+ "profile": "Salesforce API Only",
6924
+ "permSetLicense": "SalesforceAPIIntegrationPsl"
6925
+ }
6926
+ ],
6927
+ "alwaysExcludeForActiveUsersPermissionSetLicenses": [
6928
+ "IdentityConnect"
6929
+ ],
6968
6930
  "isESM": true,
6969
6931
  "relativePath": [
6970
6932
  "lib",
6971
6933
  "commands",
6972
6934
  "hardis",
6973
6935
  "org",
6974
- "fix",
6975
- "listviewmine.js"
6936
+ "diagnose",
6937
+ "unusedlicenses.js"
6976
6938
  ],
6977
6939
  "aliasPermutations": [],
6978
6940
  "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"
6941
+ "hardis:org:diagnose:unusedlicenses",
6942
+ "org:hardis:diagnose:unusedlicenses",
6943
+ "org:diagnose:hardis:unusedlicenses",
6944
+ "org:diagnose:unusedlicenses:hardis",
6945
+ "hardis:diagnose:org:unusedlicenses",
6946
+ "diagnose:hardis:org:unusedlicenses",
6947
+ "diagnose:org:hardis:unusedlicenses",
6948
+ "diagnose:org:unusedlicenses:hardis",
6949
+ "hardis:diagnose:unusedlicenses:org",
6950
+ "diagnose:hardis:unusedlicenses:org",
6951
+ "diagnose:unusedlicenses:hardis:org",
6952
+ "diagnose:unusedlicenses:org:hardis",
6953
+ "hardis:org:unusedlicenses:diagnose",
6954
+ "org:hardis:unusedlicenses:diagnose",
6955
+ "org:unusedlicenses:hardis:diagnose",
6956
+ "org:unusedlicenses:diagnose:hardis",
6957
+ "hardis:unusedlicenses:org:diagnose",
6958
+ "unusedlicenses:hardis:org:diagnose",
6959
+ "unusedlicenses:org:hardis:diagnose",
6960
+ "unusedlicenses:org:diagnose:hardis",
6961
+ "hardis:unusedlicenses:diagnose:org",
6962
+ "unusedlicenses:hardis:diagnose:org",
6963
+ "unusedlicenses:diagnose:hardis:org",
6964
+ "unusedlicenses:diagnose:org:hardis"
7003
6965
  ]
7004
6966
  },
7005
- "hardis:org:generate:packagexmlfull": {
6967
+ "hardis:org:diagnose:unusedusers": {
7006
6968
  "aliases": [],
7007
6969
  "args": {},
7008
- "description": "Generates full org package.xml, including managed items",
6970
+ "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",
7009
6971
  "examples": [
7010
- "$ sf hardis:org:generate:packagexmlfull",
7011
- "$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
7012
- "$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
6972
+ "$ sf hardis:org:diagnose:unusedusers",
6973
+ "$ sf hardis:org:diagnose:unusedusers --days 365",
6974
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
6975
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
6976
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
7013
6977
  ],
7014
6978
  "flags": {
7015
6979
  "json": {
@@ -7019,21 +6983,57 @@
7019
6983
  "allowNo": false,
7020
6984
  "type": "boolean"
7021
6985
  },
7022
- "flags-dir": {
7023
- "helpGroup": "GLOBAL",
7024
- "name": "flags-dir",
7025
- "summary": "Import flag values from a directory.",
6986
+ "flags-dir": {
6987
+ "helpGroup": "GLOBAL",
6988
+ "name": "flags-dir",
6989
+ "summary": "Import flag values from a directory.",
6990
+ "hasDynamicHelp": false,
6991
+ "multiple": false,
6992
+ "type": "option"
6993
+ },
6994
+ "outputfile": {
6995
+ "char": "f",
6996
+ "description": "Force the path and name of output report file. Must end with .csv",
6997
+ "name": "outputfile",
6998
+ "hasDynamicHelp": false,
6999
+ "multiple": false,
7000
+ "type": "option"
7001
+ },
7002
+ "days": {
7003
+ "char": "t",
7004
+ "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
7005
+ "name": "days",
7006
+ "hasDynamicHelp": false,
7007
+ "multiple": false,
7008
+ "type": "option"
7009
+ },
7010
+ "licensetypes": {
7011
+ "char": "l",
7012
+ "description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
7013
+ "name": "licensetypes",
7026
7014
  "hasDynamicHelp": false,
7027
7015
  "multiple": false,
7016
+ "options": [
7017
+ "all",
7018
+ "all-crm",
7019
+ "all-paying"
7020
+ ],
7028
7021
  "type": "option"
7029
7022
  },
7030
- "outputfile": {
7031
- "description": "Output package.xml file",
7032
- "name": "outputfile",
7023
+ "licenseidentifiers": {
7024
+ "char": "i",
7025
+ "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",
7026
+ "name": "licenseidentifiers",
7033
7027
  "hasDynamicHelp": false,
7034
7028
  "multiple": false,
7035
7029
  "type": "option"
7036
7030
  },
7031
+ "returnactiveusers": {
7032
+ "description": "Inverts the command by returning the active users",
7033
+ "name": "returnactiveusers",
7034
+ "allowNo": false,
7035
+ "type": "boolean"
7036
+ },
7037
7037
  "debug": {
7038
7038
  "char": "d",
7039
7039
  "description": "Activate debug mode (more logs)",
@@ -7072,13 +7072,13 @@
7072
7072
  },
7073
7073
  "hasDynamicHelp": true,
7074
7074
  "hiddenAliases": [],
7075
- "id": "hardis:org:generate:packagexmlfull",
7075
+ "id": "hardis:org:diagnose:unusedusers",
7076
7076
  "pluginAlias": "sfdx-hardis",
7077
7077
  "pluginName": "sfdx-hardis",
7078
7078
  "pluginType": "core",
7079
7079
  "strict": true,
7080
7080
  "enableJsonFlag": true,
7081
- "title": "Generate Full Org package.xml",
7081
+ "title": "Detect unused Users in Salesforce",
7082
7082
  "requiresProject": false,
7083
7083
  "isESM": true,
7084
7084
  "relativePath": [
@@ -7086,35 +7086,35 @@
7086
7086
  "commands",
7087
7087
  "hardis",
7088
7088
  "org",
7089
- "generate",
7090
- "packagexmlfull.js"
7089
+ "diagnose",
7090
+ "unusedusers.js"
7091
7091
  ],
7092
7092
  "aliasPermutations": [],
7093
7093
  "permutations": [
7094
- "hardis:org:generate:packagexmlfull",
7095
- "org:hardis:generate:packagexmlfull",
7096
- "org:generate:hardis:packagexmlfull",
7097
- "org:generate:packagexmlfull:hardis",
7098
- "hardis:generate:org:packagexmlfull",
7099
- "generate:hardis:org:packagexmlfull",
7100
- "generate:org:hardis:packagexmlfull",
7101
- "generate:org:packagexmlfull:hardis",
7102
- "hardis:generate:packagexmlfull:org",
7103
- "generate:hardis:packagexmlfull:org",
7104
- "generate:packagexmlfull:hardis:org",
7105
- "generate:packagexmlfull:org:hardis",
7106
- "hardis:org:packagexmlfull:generate",
7107
- "org:hardis:packagexmlfull:generate",
7108
- "org:packagexmlfull:hardis:generate",
7109
- "org:packagexmlfull:generate:hardis",
7110
- "hardis:packagexmlfull:org:generate",
7111
- "packagexmlfull:hardis:org:generate",
7112
- "packagexmlfull:org:hardis:generate",
7113
- "packagexmlfull:org:generate:hardis",
7114
- "hardis:packagexmlfull:generate:org",
7115
- "packagexmlfull:hardis:generate:org",
7116
- "packagexmlfull:generate:hardis:org",
7117
- "packagexmlfull:generate:org:hardis"
7094
+ "hardis:org:diagnose:unusedusers",
7095
+ "org:hardis:diagnose:unusedusers",
7096
+ "org:diagnose:hardis:unusedusers",
7097
+ "org:diagnose:unusedusers:hardis",
7098
+ "hardis:diagnose:org:unusedusers",
7099
+ "diagnose:hardis:org:unusedusers",
7100
+ "diagnose:org:hardis:unusedusers",
7101
+ "diagnose:org:unusedusers:hardis",
7102
+ "hardis:diagnose:unusedusers:org",
7103
+ "diagnose:hardis:unusedusers:org",
7104
+ "diagnose:unusedusers:hardis:org",
7105
+ "diagnose:unusedusers:org:hardis",
7106
+ "hardis:org:unusedusers:diagnose",
7107
+ "org:hardis:unusedusers:diagnose",
7108
+ "org:unusedusers:hardis:diagnose",
7109
+ "org:unusedusers:diagnose:hardis",
7110
+ "hardis:unusedusers:org:diagnose",
7111
+ "unusedusers:hardis:org:diagnose",
7112
+ "unusedusers:org:hardis:diagnose",
7113
+ "unusedusers:org:diagnose:hardis",
7114
+ "hardis:unusedusers:diagnose:org",
7115
+ "unusedusers:hardis:diagnose:org",
7116
+ "unusedusers:diagnose:hardis:org",
7117
+ "unusedusers:diagnose:org:hardis"
7118
7118
  ]
7119
7119
  },
7120
7120
  "hardis:org:monitor:all": {
@@ -10971,6 +10971,221 @@
10971
10971
  "xml:clean:project:hardis"
10972
10972
  ]
10973
10973
  },
10974
+ "hardis:project:fix:profiletabs": {
10975
+ "aliases": [],
10976
+ "args": {},
10977
+ "description": "Interactive prompts to add tab visibilities that are not retrieved by project retrieve start",
10978
+ "examples": [
10979
+ "$ sf hardis:project:fix:profiletabs"
10980
+ ],
10981
+ "flags": {
10982
+ "json": {
10983
+ "description": "Format output as json.",
10984
+ "helpGroup": "GLOBAL",
10985
+ "name": "json",
10986
+ "allowNo": false,
10987
+ "type": "boolean"
10988
+ },
10989
+ "flags-dir": {
10990
+ "helpGroup": "GLOBAL",
10991
+ "name": "flags-dir",
10992
+ "summary": "Import flag values from a directory.",
10993
+ "hasDynamicHelp": false,
10994
+ "multiple": false,
10995
+ "type": "option"
10996
+ },
10997
+ "path": {
10998
+ "char": "p",
10999
+ "description": "Root folder",
11000
+ "name": "path",
11001
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11002
+ "hasDynamicHelp": false,
11003
+ "multiple": false,
11004
+ "type": "option"
11005
+ },
11006
+ "debug": {
11007
+ "char": "d",
11008
+ "description": "Activate debug mode (more logs)",
11009
+ "name": "debug",
11010
+ "allowNo": false,
11011
+ "type": "boolean"
11012
+ },
11013
+ "websocket": {
11014
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11015
+ "name": "websocket",
11016
+ "hasDynamicHelp": false,
11017
+ "multiple": false,
11018
+ "type": "option"
11019
+ },
11020
+ "skipauth": {
11021
+ "description": "Skip authentication check when a default username is required",
11022
+ "name": "skipauth",
11023
+ "allowNo": false,
11024
+ "type": "boolean"
11025
+ },
11026
+ "target-org": {
11027
+ "aliases": [
11028
+ "targetusername",
11029
+ "u"
11030
+ ],
11031
+ "char": "o",
11032
+ "deprecateAliases": true,
11033
+ "name": "target-org",
11034
+ "noCacheDefault": true,
11035
+ "required": true,
11036
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
11037
+ "hasDynamicHelp": true,
11038
+ "multiple": false,
11039
+ "type": "option"
11040
+ }
11041
+ },
11042
+ "hasDynamicHelp": true,
11043
+ "hiddenAliases": [],
11044
+ "id": "hardis:project:fix:profiletabs",
11045
+ "pluginAlias": "sfdx-hardis",
11046
+ "pluginName": "sfdx-hardis",
11047
+ "pluginType": "core",
11048
+ "strict": true,
11049
+ "enableJsonFlag": true,
11050
+ "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
11051
+ "requiresProject": true,
11052
+ "isESM": true,
11053
+ "relativePath": [
11054
+ "lib",
11055
+ "commands",
11056
+ "hardis",
11057
+ "project",
11058
+ "fix",
11059
+ "profiletabs.js"
11060
+ ],
11061
+ "aliasPermutations": [],
11062
+ "permutations": [
11063
+ "hardis:project:fix:profiletabs",
11064
+ "project:hardis:fix:profiletabs",
11065
+ "project:fix:hardis:profiletabs",
11066
+ "project:fix:profiletabs:hardis",
11067
+ "hardis:fix:project:profiletabs",
11068
+ "fix:hardis:project:profiletabs",
11069
+ "fix:project:hardis:profiletabs",
11070
+ "fix:project:profiletabs:hardis",
11071
+ "hardis:fix:profiletabs:project",
11072
+ "fix:hardis:profiletabs:project",
11073
+ "fix:profiletabs:hardis:project",
11074
+ "fix:profiletabs:project:hardis",
11075
+ "hardis:project:profiletabs:fix",
11076
+ "project:hardis:profiletabs:fix",
11077
+ "project:profiletabs:hardis:fix",
11078
+ "project:profiletabs:fix:hardis",
11079
+ "hardis:profiletabs:project:fix",
11080
+ "profiletabs:hardis:project:fix",
11081
+ "profiletabs:project:hardis:fix",
11082
+ "profiletabs:project:fix:hardis",
11083
+ "hardis:profiletabs:fix:project",
11084
+ "profiletabs:hardis:fix:project",
11085
+ "profiletabs:fix:hardis:project",
11086
+ "profiletabs:fix:project:hardis"
11087
+ ]
11088
+ },
11089
+ "hardis:project:fix:v53flexipages": {
11090
+ "aliases": [],
11091
+ "args": {},
11092
+ "description": "Fix flexipages for apiVersion v53 (Winter22).\n\nNote: Update api version to 53.0 in package.xml and sfdx-project.json",
11093
+ "examples": [
11094
+ "$ sf hardis:project:fix:v53flexipages"
11095
+ ],
11096
+ "flags": {
11097
+ "json": {
11098
+ "description": "Format output as json.",
11099
+ "helpGroup": "GLOBAL",
11100
+ "name": "json",
11101
+ "allowNo": false,
11102
+ "type": "boolean"
11103
+ },
11104
+ "flags-dir": {
11105
+ "helpGroup": "GLOBAL",
11106
+ "name": "flags-dir",
11107
+ "summary": "Import flag values from a directory.",
11108
+ "hasDynamicHelp": false,
11109
+ "multiple": false,
11110
+ "type": "option"
11111
+ },
11112
+ "path": {
11113
+ "char": "p",
11114
+ "description": "Root folder",
11115
+ "name": "path",
11116
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11117
+ "hasDynamicHelp": false,
11118
+ "multiple": false,
11119
+ "type": "option"
11120
+ },
11121
+ "debug": {
11122
+ "char": "d",
11123
+ "description": "Activate debug mode (more logs)",
11124
+ "name": "debug",
11125
+ "allowNo": false,
11126
+ "type": "boolean"
11127
+ },
11128
+ "websocket": {
11129
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11130
+ "name": "websocket",
11131
+ "hasDynamicHelp": false,
11132
+ "multiple": false,
11133
+ "type": "option"
11134
+ },
11135
+ "skipauth": {
11136
+ "description": "Skip authentication check when a default username is required",
11137
+ "name": "skipauth",
11138
+ "allowNo": false,
11139
+ "type": "boolean"
11140
+ }
11141
+ },
11142
+ "hasDynamicHelp": false,
11143
+ "hiddenAliases": [],
11144
+ "id": "hardis:project:fix:v53flexipages",
11145
+ "pluginAlias": "sfdx-hardis",
11146
+ "pluginName": "sfdx-hardis",
11147
+ "pluginType": "core",
11148
+ "strict": true,
11149
+ "enableJsonFlag": true,
11150
+ "title": "Fix flexipages for v53",
11151
+ "requiresProject": true,
11152
+ "isESM": true,
11153
+ "relativePath": [
11154
+ "lib",
11155
+ "commands",
11156
+ "hardis",
11157
+ "project",
11158
+ "fix",
11159
+ "v53flexipages.js"
11160
+ ],
11161
+ "aliasPermutations": [],
11162
+ "permutations": [
11163
+ "hardis:project:fix:v53flexipages",
11164
+ "project:hardis:fix:v53flexipages",
11165
+ "project:fix:hardis:v53flexipages",
11166
+ "project:fix:v53flexipages:hardis",
11167
+ "hardis:fix:project:v53flexipages",
11168
+ "fix:hardis:project:v53flexipages",
11169
+ "fix:project:hardis:v53flexipages",
11170
+ "fix:project:v53flexipages:hardis",
11171
+ "hardis:fix:v53flexipages:project",
11172
+ "fix:hardis:v53flexipages:project",
11173
+ "fix:v53flexipages:hardis:project",
11174
+ "fix:v53flexipages:project:hardis",
11175
+ "hardis:project:v53flexipages:fix",
11176
+ "project:hardis:v53flexipages:fix",
11177
+ "project:v53flexipages:hardis:fix",
11178
+ "project:v53flexipages:fix:hardis",
11179
+ "hardis:v53flexipages:project:fix",
11180
+ "v53flexipages:hardis:project:fix",
11181
+ "v53flexipages:project:hardis:fix",
11182
+ "v53flexipages:project:fix:hardis",
11183
+ "hardis:v53flexipages:fix:project",
11184
+ "v53flexipages:hardis:fix:project",
11185
+ "v53flexipages:fix:hardis:project",
11186
+ "v53flexipages:fix:project:hardis"
11187
+ ]
11188
+ },
10974
11189
  "hardis:project:deploy:notify": {
10975
11190
  "aliases": [],
10976
11191
  "args": {},
@@ -12146,221 +12361,6 @@
12146
12361
  "validate:deploy:project:hardis"
12147
12362
  ]
12148
12363
  },
12149
- "hardis:project:fix:profiletabs": {
12150
- "aliases": [],
12151
- "args": {},
12152
- "description": "Interactive prompts to add tab visibilities that are not retrieved by project retrieve start",
12153
- "examples": [
12154
- "$ sf hardis:project:fix:profiletabs"
12155
- ],
12156
- "flags": {
12157
- "json": {
12158
- "description": "Format output as json.",
12159
- "helpGroup": "GLOBAL",
12160
- "name": "json",
12161
- "allowNo": false,
12162
- "type": "boolean"
12163
- },
12164
- "flags-dir": {
12165
- "helpGroup": "GLOBAL",
12166
- "name": "flags-dir",
12167
- "summary": "Import flag values from a directory.",
12168
- "hasDynamicHelp": false,
12169
- "multiple": false,
12170
- "type": "option"
12171
- },
12172
- "path": {
12173
- "char": "p",
12174
- "description": "Root folder",
12175
- "name": "path",
12176
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12177
- "hasDynamicHelp": false,
12178
- "multiple": false,
12179
- "type": "option"
12180
- },
12181
- "debug": {
12182
- "char": "d",
12183
- "description": "Activate debug mode (more logs)",
12184
- "name": "debug",
12185
- "allowNo": false,
12186
- "type": "boolean"
12187
- },
12188
- "websocket": {
12189
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12190
- "name": "websocket",
12191
- "hasDynamicHelp": false,
12192
- "multiple": false,
12193
- "type": "option"
12194
- },
12195
- "skipauth": {
12196
- "description": "Skip authentication check when a default username is required",
12197
- "name": "skipauth",
12198
- "allowNo": false,
12199
- "type": "boolean"
12200
- },
12201
- "target-org": {
12202
- "aliases": [
12203
- "targetusername",
12204
- "u"
12205
- ],
12206
- "char": "o",
12207
- "deprecateAliases": true,
12208
- "name": "target-org",
12209
- "noCacheDefault": true,
12210
- "required": true,
12211
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
12212
- "hasDynamicHelp": true,
12213
- "multiple": false,
12214
- "type": "option"
12215
- }
12216
- },
12217
- "hasDynamicHelp": true,
12218
- "hiddenAliases": [],
12219
- "id": "hardis:project:fix:profiletabs",
12220
- "pluginAlias": "sfdx-hardis",
12221
- "pluginName": "sfdx-hardis",
12222
- "pluginType": "core",
12223
- "strict": true,
12224
- "enableJsonFlag": true,
12225
- "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
12226
- "requiresProject": true,
12227
- "isESM": true,
12228
- "relativePath": [
12229
- "lib",
12230
- "commands",
12231
- "hardis",
12232
- "project",
12233
- "fix",
12234
- "profiletabs.js"
12235
- ],
12236
- "aliasPermutations": [],
12237
- "permutations": [
12238
- "hardis:project:fix:profiletabs",
12239
- "project:hardis:fix:profiletabs",
12240
- "project:fix:hardis:profiletabs",
12241
- "project:fix:profiletabs:hardis",
12242
- "hardis:fix:project:profiletabs",
12243
- "fix:hardis:project:profiletabs",
12244
- "fix:project:hardis:profiletabs",
12245
- "fix:project:profiletabs:hardis",
12246
- "hardis:fix:profiletabs:project",
12247
- "fix:hardis:profiletabs:project",
12248
- "fix:profiletabs:hardis:project",
12249
- "fix:profiletabs:project:hardis",
12250
- "hardis:project:profiletabs:fix",
12251
- "project:hardis:profiletabs:fix",
12252
- "project:profiletabs:hardis:fix",
12253
- "project:profiletabs:fix:hardis",
12254
- "hardis:profiletabs:project:fix",
12255
- "profiletabs:hardis:project:fix",
12256
- "profiletabs:project:hardis:fix",
12257
- "profiletabs:project:fix:hardis",
12258
- "hardis:profiletabs:fix:project",
12259
- "profiletabs:hardis:fix:project",
12260
- "profiletabs:fix:hardis:project",
12261
- "profiletabs:fix:project:hardis"
12262
- ]
12263
- },
12264
- "hardis:project:fix:v53flexipages": {
12265
- "aliases": [],
12266
- "args": {},
12267
- "description": "Fix flexipages for apiVersion v53 (Winter22).\n\nNote: Update api version to 53.0 in package.xml and sfdx-project.json",
12268
- "examples": [
12269
- "$ sf hardis:project:fix:v53flexipages"
12270
- ],
12271
- "flags": {
12272
- "json": {
12273
- "description": "Format output as json.",
12274
- "helpGroup": "GLOBAL",
12275
- "name": "json",
12276
- "allowNo": false,
12277
- "type": "boolean"
12278
- },
12279
- "flags-dir": {
12280
- "helpGroup": "GLOBAL",
12281
- "name": "flags-dir",
12282
- "summary": "Import flag values from a directory.",
12283
- "hasDynamicHelp": false,
12284
- "multiple": false,
12285
- "type": "option"
12286
- },
12287
- "path": {
12288
- "char": "p",
12289
- "description": "Root folder",
12290
- "name": "path",
12291
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12292
- "hasDynamicHelp": false,
12293
- "multiple": false,
12294
- "type": "option"
12295
- },
12296
- "debug": {
12297
- "char": "d",
12298
- "description": "Activate debug mode (more logs)",
12299
- "name": "debug",
12300
- "allowNo": false,
12301
- "type": "boolean"
12302
- },
12303
- "websocket": {
12304
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12305
- "name": "websocket",
12306
- "hasDynamicHelp": false,
12307
- "multiple": false,
12308
- "type": "option"
12309
- },
12310
- "skipauth": {
12311
- "description": "Skip authentication check when a default username is required",
12312
- "name": "skipauth",
12313
- "allowNo": false,
12314
- "type": "boolean"
12315
- }
12316
- },
12317
- "hasDynamicHelp": false,
12318
- "hiddenAliases": [],
12319
- "id": "hardis:project:fix:v53flexipages",
12320
- "pluginAlias": "sfdx-hardis",
12321
- "pluginName": "sfdx-hardis",
12322
- "pluginType": "core",
12323
- "strict": true,
12324
- "enableJsonFlag": true,
12325
- "title": "Fix flexipages for v53",
12326
- "requiresProject": true,
12327
- "isESM": true,
12328
- "relativePath": [
12329
- "lib",
12330
- "commands",
12331
- "hardis",
12332
- "project",
12333
- "fix",
12334
- "v53flexipages.js"
12335
- ],
12336
- "aliasPermutations": [],
12337
- "permutations": [
12338
- "hardis:project:fix:v53flexipages",
12339
- "project:hardis:fix:v53flexipages",
12340
- "project:fix:hardis:v53flexipages",
12341
- "project:fix:v53flexipages:hardis",
12342
- "hardis:fix:project:v53flexipages",
12343
- "fix:hardis:project:v53flexipages",
12344
- "fix:project:hardis:v53flexipages",
12345
- "fix:project:v53flexipages:hardis",
12346
- "hardis:fix:v53flexipages:project",
12347
- "fix:hardis:v53flexipages:project",
12348
- "fix:v53flexipages:hardis:project",
12349
- "fix:v53flexipages:project:hardis",
12350
- "hardis:project:v53flexipages:fix",
12351
- "project:hardis:v53flexipages:fix",
12352
- "project:v53flexipages:hardis:fix",
12353
- "project:v53flexipages:fix:hardis",
12354
- "hardis:v53flexipages:project:fix",
12355
- "v53flexipages:hardis:project:fix",
12356
- "v53flexipages:project:hardis:fix",
12357
- "v53flexipages:project:fix:hardis",
12358
- "hardis:v53flexipages:fix:project",
12359
- "v53flexipages:hardis:fix:project",
12360
- "v53flexipages:fix:hardis:project",
12361
- "v53flexipages:fix:project:hardis"
12362
- ]
12363
- },
12364
12364
  "hardis:project:generate:bypass": {
12365
12365
  "aliases": [],
12366
12366
  "args": {},
@@ -14843,5 +14843,5 @@
14843
14843
  ]
14844
14844
  }
14845
14845
  },
14846
- "version": "5.44.2-alpha202507220945.0"
14846
+ "version": "5.44.2-alpha202507221024.0"
14847
14847
  }