sfdx-hardis 6.9.1-alpha202510262129.0 → 6.9.1-alpha202510262222.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/common/gitProvider/azureDevops.js +3 -2
- package/lib/common/gitProvider/azureDevops.js.map +1 -1
- package/lib/common/gitProvider/bitbucket.js +2 -1
- package/lib/common/gitProvider/bitbucket.js.map +1 -1
- package/lib/common/gitProvider/github.js +2 -0
- package/lib/common/gitProvider/github.js.map +1 -1
- package/lib/common/gitProvider/gitlab.js +2 -1
- package/lib/common/gitProvider/gitlab.js.map +1 -1
- package/oclif.manifest.json +730 -730
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -5539,12 +5539,15 @@
|
|
|
5539
5539
|
"import:data:org:hardis"
|
|
5540
5540
|
]
|
|
5541
5541
|
},
|
|
5542
|
-
"hardis:org:
|
|
5542
|
+
"hardis:org:diagnose:audittrail": {
|
|
5543
5543
|
"aliases": [],
|
|
5544
5544
|
"args": {},
|
|
5545
|
-
"description": "
|
|
5545
|
+
"description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nAlso detects updates of Custom Settings values (disable by defining `SKIP_AUDIT_TRAIL_CUSTOM_SETTINGS=true`)\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n - revokeduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n - CSPUserDisabled\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- External Objects\n - xdsEncryptedFieldChange\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n - siqUserAcceptedTOS\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedofflineuseroffon\n - changedprofileforuserstdtostd\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserAdminVerifiedStatusVerified\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedusername\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - changedUserPhoneVerifiedStatusVerified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suNetworkAdminLogin\n - suNetworkAdminLogout\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\n## Excel output example\n\n\n\n## Local output example\n\n\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-suspect-audit-trail/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
5546
5546
|
"examples": [
|
|
5547
|
-
"$ sf hardis:org:
|
|
5547
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5548
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5549
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5550
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5548
5551
|
],
|
|
5549
5552
|
"flags": {
|
|
5550
5553
|
"json": {
|
|
@@ -5562,48 +5565,30 @@
|
|
|
5562
5565
|
"multiple": false,
|
|
5563
5566
|
"type": "option"
|
|
5564
5567
|
},
|
|
5565
|
-
"
|
|
5566
|
-
"char": "
|
|
5567
|
-
"description": "
|
|
5568
|
-
"name": "
|
|
5569
|
-
"hasDynamicHelp": false,
|
|
5570
|
-
"multiple": false,
|
|
5571
|
-
"type": "option"
|
|
5572
|
-
},
|
|
5573
|
-
"chunksize": {
|
|
5574
|
-
"char": "c",
|
|
5575
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
5576
|
-
"name": "chunksize",
|
|
5577
|
-
"default": 1000,
|
|
5568
|
+
"excludeusers": {
|
|
5569
|
+
"char": "e",
|
|
5570
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5571
|
+
"name": "excludeusers",
|
|
5578
5572
|
"hasDynamicHelp": false,
|
|
5579
5573
|
"multiple": false,
|
|
5580
5574
|
"type": "option"
|
|
5581
5575
|
},
|
|
5582
|
-
"
|
|
5576
|
+
"lastndays": {
|
|
5583
5577
|
"char": "t",
|
|
5584
|
-
"description": "
|
|
5585
|
-
"name": "
|
|
5586
|
-
"default": 300000,
|
|
5578
|
+
"description": "Number of days to extract from today (included)",
|
|
5579
|
+
"name": "lastndays",
|
|
5587
5580
|
"hasDynamicHelp": false,
|
|
5588
5581
|
"multiple": false,
|
|
5589
5582
|
"type": "option"
|
|
5590
5583
|
},
|
|
5591
|
-
"
|
|
5592
|
-
"char": "
|
|
5593
|
-
"description": "
|
|
5594
|
-
"name": "
|
|
5595
|
-
"default": 0,
|
|
5584
|
+
"outputfile": {
|
|
5585
|
+
"char": "f",
|
|
5586
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5587
|
+
"name": "outputfile",
|
|
5596
5588
|
"hasDynamicHelp": false,
|
|
5597
5589
|
"multiple": false,
|
|
5598
5590
|
"type": "option"
|
|
5599
5591
|
},
|
|
5600
|
-
"resume": {
|
|
5601
|
-
"char": "r",
|
|
5602
|
-
"description": "Resume previous export by checking existing files (default in CI)",
|
|
5603
|
-
"name": "resume",
|
|
5604
|
-
"allowNo": false,
|
|
5605
|
-
"type": "boolean"
|
|
5606
|
-
},
|
|
5607
5592
|
"debug": {
|
|
5608
5593
|
"char": "d",
|
|
5609
5594
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5642,13 +5627,13 @@
|
|
|
5642
5627
|
},
|
|
5643
5628
|
"hasDynamicHelp": true,
|
|
5644
5629
|
"hiddenAliases": [],
|
|
5645
|
-
"id": "hardis:org:
|
|
5630
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5646
5631
|
"pluginAlias": "sfdx-hardis",
|
|
5647
5632
|
"pluginName": "sfdx-hardis",
|
|
5648
5633
|
"pluginType": "core",
|
|
5649
5634
|
"strict": true,
|
|
5650
5635
|
"enableJsonFlag": true,
|
|
5651
|
-
"title": "
|
|
5636
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5652
5637
|
"requiresProject": false,
|
|
5653
5638
|
"isESM": true,
|
|
5654
5639
|
"relativePath": [
|
|
@@ -5656,43 +5641,43 @@
|
|
|
5656
5641
|
"commands",
|
|
5657
5642
|
"hardis",
|
|
5658
5643
|
"org",
|
|
5659
|
-
"
|
|
5660
|
-
"
|
|
5644
|
+
"diagnose",
|
|
5645
|
+
"audittrail.js"
|
|
5661
5646
|
],
|
|
5662
5647
|
"aliasPermutations": [],
|
|
5663
5648
|
"permutations": [
|
|
5664
|
-
"hardis:org:
|
|
5665
|
-
"org:hardis:
|
|
5666
|
-
"org:
|
|
5667
|
-
"org:
|
|
5668
|
-
"hardis:
|
|
5669
|
-
"
|
|
5670
|
-
"
|
|
5671
|
-
"
|
|
5672
|
-
"hardis:
|
|
5673
|
-
"
|
|
5674
|
-
"
|
|
5675
|
-
"
|
|
5676
|
-
"hardis:org:
|
|
5677
|
-
"org:hardis:
|
|
5678
|
-
"org:
|
|
5679
|
-
"org:
|
|
5680
|
-
"hardis:
|
|
5681
|
-
"
|
|
5682
|
-
"
|
|
5683
|
-
"
|
|
5684
|
-
"hardis:
|
|
5685
|
-
"
|
|
5686
|
-
"
|
|
5687
|
-
"
|
|
5649
|
+
"hardis:org:diagnose:audittrail",
|
|
5650
|
+
"org:hardis:diagnose:audittrail",
|
|
5651
|
+
"org:diagnose:hardis:audittrail",
|
|
5652
|
+
"org:diagnose:audittrail:hardis",
|
|
5653
|
+
"hardis:diagnose:org:audittrail",
|
|
5654
|
+
"diagnose:hardis:org:audittrail",
|
|
5655
|
+
"diagnose:org:hardis:audittrail",
|
|
5656
|
+
"diagnose:org:audittrail:hardis",
|
|
5657
|
+
"hardis:diagnose:audittrail:org",
|
|
5658
|
+
"diagnose:hardis:audittrail:org",
|
|
5659
|
+
"diagnose:audittrail:hardis:org",
|
|
5660
|
+
"diagnose:audittrail:org:hardis",
|
|
5661
|
+
"hardis:org:audittrail:diagnose",
|
|
5662
|
+
"org:hardis:audittrail:diagnose",
|
|
5663
|
+
"org:audittrail:hardis:diagnose",
|
|
5664
|
+
"org:audittrail:diagnose:hardis",
|
|
5665
|
+
"hardis:audittrail:org:diagnose",
|
|
5666
|
+
"audittrail:hardis:org:diagnose",
|
|
5667
|
+
"audittrail:org:hardis:diagnose",
|
|
5668
|
+
"audittrail:org:diagnose:hardis",
|
|
5669
|
+
"hardis:audittrail:diagnose:org",
|
|
5670
|
+
"audittrail:hardis:diagnose:org",
|
|
5671
|
+
"audittrail:diagnose:hardis:org",
|
|
5672
|
+
"audittrail:diagnose:org:hardis"
|
|
5688
5673
|
]
|
|
5689
5674
|
},
|
|
5690
|
-
"hardis:org:
|
|
5675
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5691
5676
|
"aliases": [],
|
|
5692
5677
|
"args": {},
|
|
5693
|
-
"description": "\
|
|
5678
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the scheduled upgrade date for a Salesforce org's instance.**\n\nThis command provides crucial information about when your Salesforce instance will be upgraded to the next major release (Spring, Summer, or Winter). This is vital for release planning, testing, and ensuring compatibility with upcoming Salesforce features.\n\nKey functionalities:\n\n- **Instance Identification:** Determines the Salesforce instance name of your target org.\n- **Upgrade Date Retrieval:** Fetches the planned start time of the next major core service upgrade for that instance from the Salesforce Status API.\n- **Days Until Upgrade:** Calculates and displays the number of days remaining until the next major upgrade.\n- **Severity-Based Logging:** Adjusts the log severity (info, warning) based on the proximity of the upgrade date, providing a visual cue for urgency.\n- **Notifications:** Sends notifications to configured channels (e.g., Slack, MS Teams, Grafana) with the upgrade information, making it suitable for automated monitoring.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the `Organization` object in Salesforce to get the `InstanceName` of the target org.\n- **Salesforce Status API Integration:** It makes an HTTP GET request to the Salesforce Status API (`https://api.status.salesforce.com/v1/instances/{instanceName}/status`) to retrieve detailed information about the instance, including scheduled maintenances.\n- **Data Parsing:** It parses the JSON response from the Status API to extract the relevant major release upgrade information.\n- **Date Calculation:** Uses the `moment` library to calculate the difference in days between the current date and the planned upgrade date.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including the instance name, upgrade date, and days remaining, along with relevant metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the upgrade status and proximity.\n</details>\n",
|
|
5694
5679
|
"examples": [
|
|
5695
|
-
"$ sf hardis:org:
|
|
5680
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5696
5681
|
],
|
|
5697
5682
|
"flags": {
|
|
5698
5683
|
"json": {
|
|
@@ -5710,21 +5695,6 @@
|
|
|
5710
5695
|
"multiple": false,
|
|
5711
5696
|
"type": "option"
|
|
5712
5697
|
},
|
|
5713
|
-
"path": {
|
|
5714
|
-
"char": "p",
|
|
5715
|
-
"description": "Path to the file export project",
|
|
5716
|
-
"name": "path",
|
|
5717
|
-
"hasDynamicHelp": false,
|
|
5718
|
-
"multiple": false,
|
|
5719
|
-
"type": "option"
|
|
5720
|
-
},
|
|
5721
|
-
"overwrite": {
|
|
5722
|
-
"char": "f",
|
|
5723
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
5724
|
-
"name": "overwrite",
|
|
5725
|
-
"allowNo": false,
|
|
5726
|
-
"type": "boolean"
|
|
5727
|
-
},
|
|
5728
5698
|
"debug": {
|
|
5729
5699
|
"char": "d",
|
|
5730
5700
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5763,13 +5733,13 @@
|
|
|
5763
5733
|
},
|
|
5764
5734
|
"hasDynamicHelp": true,
|
|
5765
5735
|
"hiddenAliases": [],
|
|
5766
|
-
"id": "hardis:org:
|
|
5736
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
5767
5737
|
"pluginAlias": "sfdx-hardis",
|
|
5768
5738
|
"pluginName": "sfdx-hardis",
|
|
5769
5739
|
"pluginType": "core",
|
|
5770
5740
|
"strict": true,
|
|
5771
5741
|
"enableJsonFlag": true,
|
|
5772
|
-
"title": "
|
|
5742
|
+
"title": "Get Instance Upgrade date",
|
|
5773
5743
|
"requiresProject": false,
|
|
5774
5744
|
"isESM": true,
|
|
5775
5745
|
"relativePath": [
|
|
@@ -5777,44 +5747,46 @@
|
|
|
5777
5747
|
"commands",
|
|
5778
5748
|
"hardis",
|
|
5779
5749
|
"org",
|
|
5780
|
-
"
|
|
5781
|
-
"
|
|
5750
|
+
"diagnose",
|
|
5751
|
+
"instanceupgrade.js"
|
|
5782
5752
|
],
|
|
5783
5753
|
"aliasPermutations": [],
|
|
5784
5754
|
"permutations": [
|
|
5785
|
-
"hardis:org:
|
|
5786
|
-
"org:hardis:
|
|
5787
|
-
"org:
|
|
5788
|
-
"org:
|
|
5789
|
-
"hardis:
|
|
5790
|
-
"
|
|
5791
|
-
"
|
|
5792
|
-
"
|
|
5793
|
-
"hardis:
|
|
5794
|
-
"
|
|
5795
|
-
"
|
|
5796
|
-
"
|
|
5797
|
-
"hardis:org:
|
|
5798
|
-
"org:hardis:
|
|
5799
|
-
"org:
|
|
5800
|
-
"org:
|
|
5801
|
-
"hardis:
|
|
5802
|
-
"
|
|
5803
|
-
"
|
|
5804
|
-
"
|
|
5805
|
-
"hardis:
|
|
5806
|
-
"
|
|
5807
|
-
"
|
|
5808
|
-
"
|
|
5755
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
5756
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
5757
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
5758
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
5759
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
5760
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
5761
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
5762
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
5763
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
5764
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
5765
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
5766
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
5767
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
5768
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
5769
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
5770
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
5771
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
5772
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
5773
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
5774
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
5775
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
5776
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
5777
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
5778
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
5809
5779
|
]
|
|
5810
5780
|
},
|
|
5811
|
-
"hardis:org:
|
|
5781
|
+
"hardis:org:diagnose:legacyapi": {
|
|
5812
5782
|
"aliases": [],
|
|
5813
5783
|
"args": {},
|
|
5814
|
-
"description": "
|
|
5784
|
+
"description": "Checks if an org uses retired or someday retired API version\n\n\nSee article below\n\n[](https://nicolas.vuillamy.fr/handle-salesforce-api-versions-deprecation-like-a-pro-335065f52238)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-deprecated-api-calls/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
5815
5785
|
"examples": [
|
|
5816
|
-
"$ sf hardis:org:
|
|
5817
|
-
"$ sf hardis:org:
|
|
5786
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
5787
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
5788
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
5789
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5818
5790
|
],
|
|
5819
5791
|
"flags": {
|
|
5820
5792
|
"json": {
|
|
@@ -5832,10 +5804,28 @@
|
|
|
5832
5804
|
"multiple": false,
|
|
5833
5805
|
"type": "option"
|
|
5834
5806
|
},
|
|
5835
|
-
"
|
|
5807
|
+
"eventtype": {
|
|
5808
|
+
"char": "e",
|
|
5809
|
+
"description": "Type of EventLogFile event to analyze",
|
|
5810
|
+
"name": "eventtype",
|
|
5811
|
+
"default": "ApiTotalUsage",
|
|
5812
|
+
"hasDynamicHelp": false,
|
|
5813
|
+
"multiple": false,
|
|
5814
|
+
"type": "option"
|
|
5815
|
+
},
|
|
5816
|
+
"limit": {
|
|
5836
5817
|
"char": "l",
|
|
5837
|
-
"description": "
|
|
5838
|
-
"name": "
|
|
5818
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
5819
|
+
"name": "limit",
|
|
5820
|
+
"default": 999,
|
|
5821
|
+
"hasDynamicHelp": false,
|
|
5822
|
+
"multiple": false,
|
|
5823
|
+
"type": "option"
|
|
5824
|
+
},
|
|
5825
|
+
"outputfile": {
|
|
5826
|
+
"char": "f",
|
|
5827
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5828
|
+
"name": "outputfile",
|
|
5839
5829
|
"hasDynamicHelp": false,
|
|
5840
5830
|
"multiple": false,
|
|
5841
5831
|
"type": "option"
|
|
@@ -5878,60 +5868,57 @@
|
|
|
5878
5868
|
},
|
|
5879
5869
|
"hasDynamicHelp": true,
|
|
5880
5870
|
"hiddenAliases": [],
|
|
5881
|
-
"id": "hardis:org:
|
|
5871
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
5882
5872
|
"pluginAlias": "sfdx-hardis",
|
|
5883
5873
|
"pluginName": "sfdx-hardis",
|
|
5884
5874
|
"pluginType": "core",
|
|
5885
5875
|
"strict": true,
|
|
5886
5876
|
"enableJsonFlag": true,
|
|
5887
|
-
"title": "
|
|
5888
|
-
"requiresProject":
|
|
5877
|
+
"title": "Check for legacy API use",
|
|
5878
|
+
"requiresProject": false,
|
|
5889
5879
|
"isESM": true,
|
|
5890
5880
|
"relativePath": [
|
|
5891
5881
|
"lib",
|
|
5892
5882
|
"commands",
|
|
5893
5883
|
"hardis",
|
|
5894
5884
|
"org",
|
|
5895
|
-
"
|
|
5896
|
-
"
|
|
5885
|
+
"diagnose",
|
|
5886
|
+
"legacyapi.js"
|
|
5897
5887
|
],
|
|
5898
5888
|
"aliasPermutations": [],
|
|
5899
5889
|
"permutations": [
|
|
5900
|
-
"hardis:org:
|
|
5901
|
-
"org:hardis:
|
|
5902
|
-
"org:
|
|
5903
|
-
"org:
|
|
5904
|
-
"hardis:
|
|
5905
|
-
"
|
|
5906
|
-
"
|
|
5907
|
-
"
|
|
5908
|
-
"hardis:
|
|
5909
|
-
"
|
|
5910
|
-
"
|
|
5911
|
-
"
|
|
5912
|
-
"hardis:org:
|
|
5913
|
-
"org:hardis:
|
|
5914
|
-
"org:
|
|
5915
|
-
"org:
|
|
5916
|
-
"hardis:
|
|
5917
|
-
"
|
|
5918
|
-
"
|
|
5919
|
-
"
|
|
5920
|
-
"hardis:
|
|
5921
|
-
"
|
|
5922
|
-
"
|
|
5923
|
-
"
|
|
5924
|
-
]
|
|
5925
|
-
},
|
|
5926
|
-
"hardis:org:diagnose:
|
|
5927
|
-
"aliases": [],
|
|
5928
|
-
"args": {},
|
|
5929
|
-
"description": "
|
|
5890
|
+
"hardis:org:diagnose:legacyapi",
|
|
5891
|
+
"org:hardis:diagnose:legacyapi",
|
|
5892
|
+
"org:diagnose:hardis:legacyapi",
|
|
5893
|
+
"org:diagnose:legacyapi:hardis",
|
|
5894
|
+
"hardis:diagnose:org:legacyapi",
|
|
5895
|
+
"diagnose:hardis:org:legacyapi",
|
|
5896
|
+
"diagnose:org:hardis:legacyapi",
|
|
5897
|
+
"diagnose:org:legacyapi:hardis",
|
|
5898
|
+
"hardis:diagnose:legacyapi:org",
|
|
5899
|
+
"diagnose:hardis:legacyapi:org",
|
|
5900
|
+
"diagnose:legacyapi:hardis:org",
|
|
5901
|
+
"diagnose:legacyapi:org:hardis",
|
|
5902
|
+
"hardis:org:legacyapi:diagnose",
|
|
5903
|
+
"org:hardis:legacyapi:diagnose",
|
|
5904
|
+
"org:legacyapi:hardis:diagnose",
|
|
5905
|
+
"org:legacyapi:diagnose:hardis",
|
|
5906
|
+
"hardis:legacyapi:org:diagnose",
|
|
5907
|
+
"legacyapi:hardis:org:diagnose",
|
|
5908
|
+
"legacyapi:org:hardis:diagnose",
|
|
5909
|
+
"legacyapi:org:diagnose:hardis",
|
|
5910
|
+
"hardis:legacyapi:diagnose:org",
|
|
5911
|
+
"legacyapi:hardis:diagnose:org",
|
|
5912
|
+
"legacyapi:diagnose:hardis:org",
|
|
5913
|
+
"legacyapi:diagnose:org:hardis"
|
|
5914
|
+
]
|
|
5915
|
+
},
|
|
5916
|
+
"hardis:org:diagnose:licenses": {
|
|
5917
|
+
"aliases": [],
|
|
5918
|
+
"args": {},
|
|
5919
|
+
"description": "\n**Lists and analyzes User Licenses and Permission Set Licenses subscribed and used in a Salesforce org.**\n\nThis command provides a comprehensive overview of your Salesforce license consumption. It's particularly useful for:\n\n- **License Management:** Understanding which licenses are active, how many are available, and how many are being used.\n- **Cost Optimization:** Identifying unused or underutilized licenses that could be reallocated or decommissioned.\n- **Compliance:** Ensuring that your organization is compliant with Salesforce licensing agreements.\n- **Monitoring:** Tracking license usage trends over time.\n\nKey functionalities:\n\n- **User License Details:** Retrieves information about standard and custom User Licenses, including `MasterLabel`, `Name`, `TotalLicenses`, and `UsedLicenses`.\n- **Permission Set License Details:** Retrieves information about Permission Set Licenses, including `MasterLabel`, `PermissionSetLicenseKey`, `TotalLicenses`, and `UsedLicenses`.\n- **Used Licenses Filter:** The `--usedonly` flag allows you to filter the report to show only licenses that have at least one `UsedLicenses` count greater than zero.\n- **CSV Report Generation:** Generates a CSV file containing all the retrieved license information, suitable for detailed analysis.\n- **Notifications:** Sends notifications to configured channels (e.g., Grafana, Slack, MS Teams) with a summary of license usage, including lists of active and used licenses.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It executes SOQL queries against the `UserLicense` and `PermissionSetLicense` objects in Salesforce to retrieve license data.\n- **Data Transformation:** It processes the query results, reformatting the data to be more readable and consistent for reporting purposes (e.g., removing `Id` and `attributes`, renaming `PermissionSetLicenseKey` to `Name`).\n- **Data Aggregation:** It aggregates license information, creating a `licensesByKey` object for quick lookups and a `usedLicenses` array for a concise list of actively used licenses.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of license data.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the license extraction process and the used licenses.\n</details>\n",
|
|
5930
5920
|
"examples": [
|
|
5931
|
-
"$ sf hardis:org:diagnose:
|
|
5932
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5933
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5934
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5921
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
5935
5922
|
],
|
|
5936
5923
|
"flags": {
|
|
5937
5924
|
"json": {
|
|
@@ -5949,22 +5936,6 @@
|
|
|
5949
5936
|
"multiple": false,
|
|
5950
5937
|
"type": "option"
|
|
5951
5938
|
},
|
|
5952
|
-
"excludeusers": {
|
|
5953
|
-
"char": "e",
|
|
5954
|
-
"description": "Comma-separated list of usernames to exclude",
|
|
5955
|
-
"name": "excludeusers",
|
|
5956
|
-
"hasDynamicHelp": false,
|
|
5957
|
-
"multiple": false,
|
|
5958
|
-
"type": "option"
|
|
5959
|
-
},
|
|
5960
|
-
"lastndays": {
|
|
5961
|
-
"char": "t",
|
|
5962
|
-
"description": "Number of days to extract from today (included)",
|
|
5963
|
-
"name": "lastndays",
|
|
5964
|
-
"hasDynamicHelp": false,
|
|
5965
|
-
"multiple": false,
|
|
5966
|
-
"type": "option"
|
|
5967
|
-
},
|
|
5968
5939
|
"outputfile": {
|
|
5969
5940
|
"char": "f",
|
|
5970
5941
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -5973,6 +5944,13 @@
|
|
|
5973
5944
|
"multiple": false,
|
|
5974
5945
|
"type": "option"
|
|
5975
5946
|
},
|
|
5947
|
+
"usedonly": {
|
|
5948
|
+
"char": "u",
|
|
5949
|
+
"description": "Filter to have only used licenses",
|
|
5950
|
+
"name": "usedonly",
|
|
5951
|
+
"allowNo": false,
|
|
5952
|
+
"type": "boolean"
|
|
5953
|
+
},
|
|
5976
5954
|
"debug": {
|
|
5977
5955
|
"char": "d",
|
|
5978
5956
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6011,13 +5989,13 @@
|
|
|
6011
5989
|
},
|
|
6012
5990
|
"hasDynamicHelp": true,
|
|
6013
5991
|
"hiddenAliases": [],
|
|
6014
|
-
"id": "hardis:org:diagnose:
|
|
5992
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6015
5993
|
"pluginAlias": "sfdx-hardis",
|
|
6016
5994
|
"pluginName": "sfdx-hardis",
|
|
6017
5995
|
"pluginType": "core",
|
|
6018
5996
|
"strict": true,
|
|
6019
5997
|
"enableJsonFlag": true,
|
|
6020
|
-
"title": "
|
|
5998
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6021
5999
|
"requiresProject": false,
|
|
6022
6000
|
"isESM": true,
|
|
6023
6001
|
"relativePath": [
|
|
@@ -6026,42 +6004,42 @@
|
|
|
6026
6004
|
"hardis",
|
|
6027
6005
|
"org",
|
|
6028
6006
|
"diagnose",
|
|
6029
|
-
"
|
|
6007
|
+
"licenses.js"
|
|
6030
6008
|
],
|
|
6031
6009
|
"aliasPermutations": [],
|
|
6032
6010
|
"permutations": [
|
|
6033
|
-
"hardis:org:diagnose:
|
|
6034
|
-
"org:hardis:diagnose:
|
|
6035
|
-
"org:diagnose:hardis:
|
|
6036
|
-
"org:diagnose:
|
|
6037
|
-
"hardis:diagnose:org:
|
|
6038
|
-
"diagnose:hardis:org:
|
|
6039
|
-
"diagnose:org:hardis:
|
|
6040
|
-
"diagnose:org:
|
|
6041
|
-
"hardis:diagnose:
|
|
6042
|
-
"diagnose:hardis:
|
|
6043
|
-
"diagnose:
|
|
6044
|
-
"diagnose:
|
|
6045
|
-
"hardis:org:
|
|
6046
|
-
"org:hardis:
|
|
6047
|
-
"org:
|
|
6048
|
-
"org:
|
|
6049
|
-
"hardis:
|
|
6050
|
-
"
|
|
6051
|
-
"
|
|
6052
|
-
"
|
|
6053
|
-
"hardis:
|
|
6054
|
-
"
|
|
6055
|
-
"
|
|
6056
|
-
"
|
|
6011
|
+
"hardis:org:diagnose:licenses",
|
|
6012
|
+
"org:hardis:diagnose:licenses",
|
|
6013
|
+
"org:diagnose:hardis:licenses",
|
|
6014
|
+
"org:diagnose:licenses:hardis",
|
|
6015
|
+
"hardis:diagnose:org:licenses",
|
|
6016
|
+
"diagnose:hardis:org:licenses",
|
|
6017
|
+
"diagnose:org:hardis:licenses",
|
|
6018
|
+
"diagnose:org:licenses:hardis",
|
|
6019
|
+
"hardis:diagnose:licenses:org",
|
|
6020
|
+
"diagnose:hardis:licenses:org",
|
|
6021
|
+
"diagnose:licenses:hardis:org",
|
|
6022
|
+
"diagnose:licenses:org:hardis",
|
|
6023
|
+
"hardis:org:licenses:diagnose",
|
|
6024
|
+
"org:hardis:licenses:diagnose",
|
|
6025
|
+
"org:licenses:hardis:diagnose",
|
|
6026
|
+
"org:licenses:diagnose:hardis",
|
|
6027
|
+
"hardis:licenses:org:diagnose",
|
|
6028
|
+
"licenses:hardis:org:diagnose",
|
|
6029
|
+
"licenses:org:hardis:diagnose",
|
|
6030
|
+
"licenses:org:diagnose:hardis",
|
|
6031
|
+
"hardis:licenses:diagnose:org",
|
|
6032
|
+
"licenses:hardis:diagnose:org",
|
|
6033
|
+
"licenses:diagnose:hardis:org",
|
|
6034
|
+
"licenses:diagnose:org:hardis"
|
|
6057
6035
|
]
|
|
6058
6036
|
},
|
|
6059
|
-
"hardis:org:diagnose:
|
|
6037
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6060
6038
|
"aliases": [],
|
|
6061
6039
|
"args": {},
|
|
6062
|
-
"description": "
|
|
6040
|
+
"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",
|
|
6063
6041
|
"examples": [
|
|
6064
|
-
"$ sf hardis:org:diagnose:
|
|
6042
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6065
6043
|
],
|
|
6066
6044
|
"flags": {
|
|
6067
6045
|
"json": {
|
|
@@ -6079,6 +6057,14 @@
|
|
|
6079
6057
|
"multiple": false,
|
|
6080
6058
|
"type": "option"
|
|
6081
6059
|
},
|
|
6060
|
+
"outputfile": {
|
|
6061
|
+
"char": "f",
|
|
6062
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6063
|
+
"name": "outputfile",
|
|
6064
|
+
"hasDynamicHelp": false,
|
|
6065
|
+
"multiple": false,
|
|
6066
|
+
"type": "option"
|
|
6067
|
+
},
|
|
6082
6068
|
"debug": {
|
|
6083
6069
|
"char": "d",
|
|
6084
6070
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6117,13 +6103,13 @@
|
|
|
6117
6103
|
},
|
|
6118
6104
|
"hasDynamicHelp": true,
|
|
6119
6105
|
"hiddenAliases": [],
|
|
6120
|
-
"id": "hardis:org:diagnose:
|
|
6106
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6121
6107
|
"pluginAlias": "sfdx-hardis",
|
|
6122
6108
|
"pluginName": "sfdx-hardis",
|
|
6123
6109
|
"pluginType": "core",
|
|
6124
6110
|
"strict": true,
|
|
6125
6111
|
"enableJsonFlag": true,
|
|
6126
|
-
"title": "
|
|
6112
|
+
"title": "Check Release Updates of an org",
|
|
6127
6113
|
"requiresProject": false,
|
|
6128
6114
|
"isESM": true,
|
|
6129
6115
|
"relativePath": [
|
|
@@ -6132,45 +6118,42 @@
|
|
|
6132
6118
|
"hardis",
|
|
6133
6119
|
"org",
|
|
6134
6120
|
"diagnose",
|
|
6135
|
-
"
|
|
6121
|
+
"releaseupdates.js"
|
|
6136
6122
|
],
|
|
6137
6123
|
"aliasPermutations": [],
|
|
6138
6124
|
"permutations": [
|
|
6139
|
-
"hardis:org:diagnose:
|
|
6140
|
-
"org:hardis:diagnose:
|
|
6141
|
-
"org:diagnose:hardis:
|
|
6142
|
-
"org:diagnose:
|
|
6143
|
-
"hardis:diagnose:org:
|
|
6144
|
-
"diagnose:hardis:org:
|
|
6145
|
-
"diagnose:org:hardis:
|
|
6146
|
-
"diagnose:org:
|
|
6147
|
-
"hardis:diagnose:
|
|
6148
|
-
"diagnose:hardis:
|
|
6149
|
-
"diagnose:
|
|
6150
|
-
"diagnose:
|
|
6151
|
-
"hardis:org:
|
|
6152
|
-
"org:hardis:
|
|
6153
|
-
"org:
|
|
6154
|
-
"org:
|
|
6155
|
-
"hardis:
|
|
6156
|
-
"
|
|
6157
|
-
"
|
|
6158
|
-
"
|
|
6159
|
-
"hardis:
|
|
6160
|
-
"
|
|
6161
|
-
"
|
|
6162
|
-
"
|
|
6125
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6126
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6127
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6128
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6129
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6130
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6131
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6132
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6133
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6134
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6135
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6136
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6137
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6138
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6139
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6140
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6141
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6142
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6143
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6144
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6145
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6146
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6147
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6148
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6163
6149
|
]
|
|
6164
6150
|
},
|
|
6165
|
-
"hardis:org:diagnose:
|
|
6151
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
6166
6152
|
"aliases": [],
|
|
6167
6153
|
"args": {},
|
|
6168
|
-
"description": "
|
|
6154
|
+
"description": "\n## Command Behavior\n\n**Detects unsecured Connected Apps in a Salesforce org and generates detailed reports for security analysis.**\n\nThis command is a critical security diagnostic tool that helps administrators identify Connected Apps that may pose security risks due to improper configuration. It provides comprehensive analysis of OAuth tokens and Connected App security settings to ensure proper access control.\n\nKey functionalities:\n\n- **OAuth Token Analysis:** Queries all OAuth tokens in the org using SOQL to retrieve comprehensive token information including app names, users, authorization status, and usage statistics.\n- **Security Status Assessment:** Evaluates each Connected App's security configuration by checking the `IsUsingAdminAuthorization` flag to determine if admin pre-approval is required.\n- **Unsecured App Detection:** Identifies Connected Apps that allow users to authorize themselves without admin approval, which can pose security risks.\n- **Detailed Reporting:** Generates two comprehensive CSV reports:\n - **OAuth Tokens Report:** Lists all OAuth tokens with security status, user information, and usage data\n - **Connected Apps Summary:** Aggregates unsecured Connected Apps with counts of associated OAuth tokens\n- **Visual Indicators:** Uses status icons (❌ for unsecured, ✅ for secured) to provide immediate visual feedback on security status.\n- **Security Recommendations:** Provides actionable guidance on how to secure Connected Apps through proper configuration.\n- **Notifications:** Sends alerts to configured channels (Grafana, Slack, MS Teams) with security findings and attached reports.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-security/) and can output Grafana, Slack and MsTeams Notifications.\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/jHv8yrSK8Dg\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query Execution:** Executes a comprehensive SOQL query on the `OauthToken` object, joining with `AppMenuItem` and `User` objects to gather complete security context.\n- **Security Analysis Logic:** Analyzes the `AppMenuItem.IsUsingAdminAuthorization` field to determine if a Connected App requires admin pre-approval for user authorization.\n- **Data Transformation:** Processes raw SOQL results to add security status indicators and reorganize data for optimal reporting and analysis.\n- **Aggregation Processing:** Groups OAuth tokens by Connected App name to provide summary statistics and identify the most problematic applications.\n- **Report Generation:** Uses `generateCsvFile` to create structured CSV reports with proper formatting and metadata for easy analysis and sharing.\n- **Notification Integration:** Integrates with the `NotifProvider` to send security alerts with detailed metrics, including the number of unsecured Connected Apps and associated OAuth tokens.\n- **File Management:** Generates multiple output formats (CSV, XLSX) and manages file paths using `generateReportPath` for consistent report organization.\n- **Connection Management:** Uses `setConnectionVariables` to ensure proper authentication context for notification providers that require org connection details.\n</details>\n",
|
|
6169
6155
|
"examples": [
|
|
6170
|
-
"$ sf hardis:org:diagnose:
|
|
6171
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6172
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6173
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6156
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
6174
6157
|
],
|
|
6175
6158
|
"flags": {
|
|
6176
6159
|
"json": {
|
|
@@ -6188,24 +6171,6 @@
|
|
|
6188
6171
|
"multiple": false,
|
|
6189
6172
|
"type": "option"
|
|
6190
6173
|
},
|
|
6191
|
-
"eventtype": {
|
|
6192
|
-
"char": "e",
|
|
6193
|
-
"description": "Type of EventLogFile event to analyze",
|
|
6194
|
-
"name": "eventtype",
|
|
6195
|
-
"default": "ApiTotalUsage",
|
|
6196
|
-
"hasDynamicHelp": false,
|
|
6197
|
-
"multiple": false,
|
|
6198
|
-
"type": "option"
|
|
6199
|
-
},
|
|
6200
|
-
"limit": {
|
|
6201
|
-
"char": "l",
|
|
6202
|
-
"description": "Number of latest EventLogFile events to analyze",
|
|
6203
|
-
"name": "limit",
|
|
6204
|
-
"default": 999,
|
|
6205
|
-
"hasDynamicHelp": false,
|
|
6206
|
-
"multiple": false,
|
|
6207
|
-
"type": "option"
|
|
6208
|
-
},
|
|
6209
6174
|
"outputfile": {
|
|
6210
6175
|
"char": "f",
|
|
6211
6176
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6252,13 +6217,13 @@
|
|
|
6252
6217
|
},
|
|
6253
6218
|
"hasDynamicHelp": true,
|
|
6254
6219
|
"hiddenAliases": [],
|
|
6255
|
-
"id": "hardis:org:diagnose:
|
|
6220
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
6256
6221
|
"pluginAlias": "sfdx-hardis",
|
|
6257
6222
|
"pluginName": "sfdx-hardis",
|
|
6258
6223
|
"pluginType": "core",
|
|
6259
6224
|
"strict": true,
|
|
6260
6225
|
"enableJsonFlag": true,
|
|
6261
|
-
"title": "
|
|
6226
|
+
"title": "Detect Unsecured Connected Apps",
|
|
6262
6227
|
"requiresProject": false,
|
|
6263
6228
|
"isESM": true,
|
|
6264
6229
|
"relativePath": [
|
|
@@ -6267,53 +6232,54 @@
|
|
|
6267
6232
|
"hardis",
|
|
6268
6233
|
"org",
|
|
6269
6234
|
"diagnose",
|
|
6270
|
-
"
|
|
6235
|
+
"unsecure-connected-apps.js"
|
|
6271
6236
|
],
|
|
6272
6237
|
"aliasPermutations": [],
|
|
6273
6238
|
"permutations": [
|
|
6274
|
-
"hardis:org:diagnose:
|
|
6275
|
-
"org:hardis:diagnose:
|
|
6276
|
-
"org:diagnose:hardis:
|
|
6277
|
-
"org:diagnose:
|
|
6278
|
-
"hardis:diagnose:org:
|
|
6279
|
-
"diagnose:hardis:org:
|
|
6280
|
-
"diagnose:org:hardis:
|
|
6281
|
-
"diagnose:org:
|
|
6282
|
-
"hardis:diagnose:
|
|
6283
|
-
"diagnose:hardis:
|
|
6284
|
-
"diagnose:
|
|
6285
|
-
"diagnose:
|
|
6286
|
-
"hardis:org:
|
|
6287
|
-
"org:hardis:
|
|
6288
|
-
"org:
|
|
6289
|
-
"org:
|
|
6290
|
-
"hardis:
|
|
6291
|
-
"
|
|
6292
|
-
"
|
|
6293
|
-
"
|
|
6294
|
-
"hardis:
|
|
6295
|
-
"
|
|
6296
|
-
"
|
|
6297
|
-
"
|
|
6298
|
-
]
|
|
6299
|
-
},
|
|
6300
|
-
"hardis:org:diagnose:
|
|
6301
|
-
"aliases": [],
|
|
6302
|
-
"args": {},
|
|
6303
|
-
"description": "
|
|
6304
|
-
"examples": [
|
|
6305
|
-
"$ sf hardis:org:diagnose:
|
|
6306
|
-
|
|
6307
|
-
|
|
6308
|
-
|
|
6309
|
-
|
|
6310
|
-
"
|
|
6311
|
-
"
|
|
6312
|
-
"
|
|
6313
|
-
"
|
|
6314
|
-
|
|
6315
|
-
|
|
6316
|
-
|
|
6239
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
6240
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
6241
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
6242
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
6243
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
6244
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
6245
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
6246
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
6247
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
6248
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
6249
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
6250
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
6251
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
6252
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
6253
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
6254
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
6255
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
6256
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
6257
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
6258
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
6259
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
6260
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
6261
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
6262
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
6263
|
+
]
|
|
6264
|
+
},
|
|
6265
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6266
|
+
"aliases": [],
|
|
6267
|
+
"args": {},
|
|
6268
|
+
"description": "List all async Apex classes (Batch,Queueable,Schedulable) that has not been called for more than 365 days.\n \nThe result class list probably can be removed from the project, and that will improve your test classes performances 😊\n\nThe number of unused day is overridable using --days option. \n\nThe command uses queries on AsyncApexJob and CronTrigger technical tables to build the result.\n\nApex Classes CreatedBy and CreatedOn fields are calculated from MIN(date from git, date from org)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-apex-classes/) and can output Grafana, Slack and MsTeams Notifications.\n\n\n",
|
|
6269
|
+
"examples": [
|
|
6270
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6271
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6272
|
+
],
|
|
6273
|
+
"flags": {
|
|
6274
|
+
"json": {
|
|
6275
|
+
"description": "Format output as json.",
|
|
6276
|
+
"helpGroup": "GLOBAL",
|
|
6277
|
+
"name": "json",
|
|
6278
|
+
"allowNo": false,
|
|
6279
|
+
"type": "boolean"
|
|
6280
|
+
},
|
|
6281
|
+
"flags-dir": {
|
|
6282
|
+
"helpGroup": "GLOBAL",
|
|
6317
6283
|
"name": "flags-dir",
|
|
6318
6284
|
"summary": "Import flag values from a directory.",
|
|
6319
6285
|
"hasDynamicHelp": false,
|
|
@@ -6328,12 +6294,13 @@
|
|
|
6328
6294
|
"multiple": false,
|
|
6329
6295
|
"type": "option"
|
|
6330
6296
|
},
|
|
6331
|
-
"
|
|
6332
|
-
"char": "
|
|
6333
|
-
"description": "
|
|
6334
|
-
"name": "
|
|
6335
|
-
"
|
|
6336
|
-
"
|
|
6297
|
+
"days": {
|
|
6298
|
+
"char": "t",
|
|
6299
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6300
|
+
"name": "days",
|
|
6301
|
+
"hasDynamicHelp": false,
|
|
6302
|
+
"multiple": false,
|
|
6303
|
+
"type": "option"
|
|
6337
6304
|
},
|
|
6338
6305
|
"debug": {
|
|
6339
6306
|
"char": "d",
|
|
@@ -6373,13 +6340,13 @@
|
|
|
6373
6340
|
},
|
|
6374
6341
|
"hasDynamicHelp": true,
|
|
6375
6342
|
"hiddenAliases": [],
|
|
6376
|
-
"id": "hardis:org:diagnose:
|
|
6343
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6377
6344
|
"pluginAlias": "sfdx-hardis",
|
|
6378
6345
|
"pluginName": "sfdx-hardis",
|
|
6379
6346
|
"pluginType": "core",
|
|
6380
6347
|
"strict": true,
|
|
6381
6348
|
"enableJsonFlag": true,
|
|
6382
|
-
"title": "
|
|
6349
|
+
"title": "Detect unused Apex classes in an org",
|
|
6383
6350
|
"requiresProject": false,
|
|
6384
6351
|
"isESM": true,
|
|
6385
6352
|
"relativePath": [
|
|
@@ -6388,42 +6355,42 @@
|
|
|
6388
6355
|
"hardis",
|
|
6389
6356
|
"org",
|
|
6390
6357
|
"diagnose",
|
|
6391
|
-
"
|
|
6358
|
+
"unused-apex-classes.js"
|
|
6392
6359
|
],
|
|
6393
6360
|
"aliasPermutations": [],
|
|
6394
6361
|
"permutations": [
|
|
6395
|
-
"hardis:org:diagnose:
|
|
6396
|
-
"org:hardis:diagnose:
|
|
6397
|
-
"org:diagnose:hardis:
|
|
6398
|
-
"org:diagnose:
|
|
6399
|
-
"hardis:diagnose:org:
|
|
6400
|
-
"diagnose:hardis:org:
|
|
6401
|
-
"diagnose:org:hardis:
|
|
6402
|
-
"diagnose:org:
|
|
6403
|
-
"hardis:diagnose:
|
|
6404
|
-
"diagnose:hardis:
|
|
6405
|
-
"diagnose:
|
|
6406
|
-
"diagnose:
|
|
6407
|
-
"hardis:org:
|
|
6408
|
-
"org:hardis:
|
|
6409
|
-
"org:
|
|
6410
|
-
"org:
|
|
6411
|
-
"hardis:
|
|
6412
|
-
"
|
|
6413
|
-
"
|
|
6414
|
-
"
|
|
6415
|
-
"hardis:
|
|
6416
|
-
"
|
|
6417
|
-
"
|
|
6418
|
-
"
|
|
6362
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6363
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6364
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6365
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6366
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6367
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6368
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6369
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6370
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6371
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6372
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6373
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6374
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6375
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6376
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6377
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6378
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6379
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6380
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6381
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6382
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6383
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6384
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6385
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6419
6386
|
]
|
|
6420
6387
|
},
|
|
6421
|
-
"hardis:org:diagnose:
|
|
6388
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6422
6389
|
"aliases": [],
|
|
6423
6390
|
"args": {},
|
|
6424
|
-
"description": "
|
|
6391
|
+
"description": "\n## Command Behavior\n\n**Identifies and reports on potentially unused Connected Apps in a Salesforce org, suggesting candidates for deletion or deactivation.**\n\nThis command helps improve org security and reduce technical debt by pinpointing Connected Apps that are no longer actively used. Connected Apps can pose security risks if left unmonitored, and cleaning them up contributes to a healthier Salesforce environment.\n\nKey functionalities:\n\n- **Connected App Data Collection:** Gathers information about all Connected Apps in the org, including creation and last modified dates, and associated users.\n- **Usage Analysis:** Analyzes `LoginHistory` and `OAuthToken` records to determine the last usage date of each Connected App.\n- **Inactivity Detection:** Flags Connected Apps as potentially unused if they have no recent login history or OAuth token usage.\n- **Accessibility Check:** Examines Connected App metadata to identify if they are accessible (e.g., if they require admin approval and have no profiles or permission sets assigned).\n- **Ignored Apps:** Automatically ignores a predefined list of common Salesforce Connected Apps (e.g., `Salesforce CLI`, `Salesforce Mobile Dashboards`). You can extend this list by defining the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n- **CSV Report Generation:** Generates a CSV file containing details of all analyzed Connected Apps, including their usage status, last usage date, and reasons for being flagged as potentially unused.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of potentially unused Connected Apps.\n\n**Default Ignored Connected Apps:**\n\n- Ant Migration Tool\n- Chatter Desktop\n- Chatter Mobile for BlackBerry\n- Force.com IDE\n- OIQ_Integration\n- Salesforce CLI\n- Salesforce Files\n- Salesforce Mobile Dashboards\n- Salesforce Touch\n- Salesforce for Outlook\n- SalesforceA\n- SalesforceA for Android\n- SalesforceA for iOS\n- SalesforceDX Namespace Registry\n- SalesforceIQ\n\nYou can add more ignored apps by defining a comma-separated list of names in the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n\n_Example: \nALLOWED_INACTIVE_CONNECTED_APPS=My App 1,My App 2, My App 3_\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-connected-apps/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It performs SOQL queries against `ConnectedApplication`, `LoginHistory`, and `OAuthToken` objects to gather comprehensive data about Connected Apps and their usage.\n- **Temporary SFDX Project:** It creates a temporary SFDX project to retrieve Connected App metadata, allowing for local parsing and analysis of their XML files.\n- **Metadata Parsing:** It parses the `connectedApp-meta.xml` files to check for `isAdminApproved` and the presence of `profileName` or `permissionsetName` to determine accessibility.\n- **Data Correlation:** It correlates data from various Salesforce objects to build a complete picture of each Connected App's usage and status.\n- **Date Calculation:** Uses `moment` to calculate the time since the last OAuth token usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused Connected Apps.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **File System Operations:** Uses `fs-extra` for creating and removing temporary directories and files.\n- **Environment Variable Reading:** Reads the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable to customize the list of ignored Connected Apps.\n</details>\n",
|
|
6425
6392
|
"examples": [
|
|
6426
|
-
"$ sf hardis:org:diagnose:
|
|
6393
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6427
6394
|
],
|
|
6428
6395
|
"flags": {
|
|
6429
6396
|
"json": {
|
|
@@ -6487,13 +6454,30 @@
|
|
|
6487
6454
|
},
|
|
6488
6455
|
"hasDynamicHelp": true,
|
|
6489
6456
|
"hiddenAliases": [],
|
|
6490
|
-
"id": "hardis:org:diagnose:
|
|
6457
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6491
6458
|
"pluginAlias": "sfdx-hardis",
|
|
6492
6459
|
"pluginName": "sfdx-hardis",
|
|
6493
6460
|
"pluginType": "core",
|
|
6494
6461
|
"strict": true,
|
|
6495
6462
|
"enableJsonFlag": true,
|
|
6496
|
-
"title": "
|
|
6463
|
+
"title": "Unused Connected Apps in an org",
|
|
6464
|
+
"allowedInactiveConnectedApps": [
|
|
6465
|
+
"Ant Migration Tool",
|
|
6466
|
+
"Chatter Desktop",
|
|
6467
|
+
"Chatter Mobile for BlackBerry",
|
|
6468
|
+
"Force.com IDE",
|
|
6469
|
+
"OIQ_Integration",
|
|
6470
|
+
"Salesforce CLI",
|
|
6471
|
+
"Salesforce Files",
|
|
6472
|
+
"Salesforce Mobile Dashboards",
|
|
6473
|
+
"Salesforce Touch",
|
|
6474
|
+
"Salesforce for Outlook",
|
|
6475
|
+
"SalesforceA",
|
|
6476
|
+
"SalesforceA for Android",
|
|
6477
|
+
"SalesforceA for iOS",
|
|
6478
|
+
"SalesforceDX Namespace Registry",
|
|
6479
|
+
"SalesforceIQ"
|
|
6480
|
+
],
|
|
6497
6481
|
"requiresProject": false,
|
|
6498
6482
|
"isESM": true,
|
|
6499
6483
|
"relativePath": [
|
|
@@ -6502,42 +6486,43 @@
|
|
|
6502
6486
|
"hardis",
|
|
6503
6487
|
"org",
|
|
6504
6488
|
"diagnose",
|
|
6505
|
-
"
|
|
6489
|
+
"unused-connected-apps.js"
|
|
6506
6490
|
],
|
|
6507
6491
|
"aliasPermutations": [],
|
|
6508
6492
|
"permutations": [
|
|
6509
|
-
"hardis:org:diagnose:
|
|
6510
|
-
"org:hardis:diagnose:
|
|
6511
|
-
"org:diagnose:hardis:
|
|
6512
|
-
"org:diagnose:
|
|
6513
|
-
"hardis:diagnose:org:
|
|
6514
|
-
"diagnose:hardis:org:
|
|
6515
|
-
"diagnose:org:hardis:
|
|
6516
|
-
"diagnose:org:
|
|
6517
|
-
"hardis:diagnose:
|
|
6518
|
-
"diagnose:hardis:
|
|
6519
|
-
"diagnose:
|
|
6520
|
-
"diagnose:
|
|
6521
|
-
"hardis:org:
|
|
6522
|
-
"org:hardis:
|
|
6523
|
-
"org:
|
|
6524
|
-
"org:
|
|
6525
|
-
"hardis:
|
|
6526
|
-
"
|
|
6527
|
-
"
|
|
6528
|
-
"
|
|
6529
|
-
"hardis:
|
|
6530
|
-
"
|
|
6531
|
-
"
|
|
6532
|
-
"
|
|
6493
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6494
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6495
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6496
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6497
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6498
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6499
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6500
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6501
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6502
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6503
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6504
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6505
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6506
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6507
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6508
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6509
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6510
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6511
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6512
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6513
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6514
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6515
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6516
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6533
6517
|
]
|
|
6534
6518
|
},
|
|
6535
|
-
"hardis:org:diagnose:
|
|
6519
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6536
6520
|
"aliases": [],
|
|
6537
6521
|
"args": {},
|
|
6538
|
-
"description": "\n## Command Behavior\n\n**Detects
|
|
6522
|
+
"description": "\n## Command Behavior\n\n**Detects and suggests the deletion of unused Permission Set License Assignments in a Salesforce org.**\n\nWhen a Permission Set (PS) linked to a Permission Set License (PSL) is assigned to a user, a Permission Set License Assignment (PSLA) is automatically created. However, when that PS is unassigned from the user, the PSLA is *not* automatically deleted. This can lead to organizations being charged for unused PSLAs, representing a hidden cost and technical debt.\n\nThis command identifies such useless PSLAs and provides options to delete them, helping to optimize license usage and reduce unnecessary expenses.\n\nKey functionalities:\n\n- **PSLA Detection:** Queries the Salesforce org to find all active PSLAs.\n- **Usage Verification:** Correlates PSLAs with actual Permission Set Assignments and Permission Set Group Assignments to determine if the underlying Permission Sets are still assigned to the user.\n- **Special Case Handling:** Accounts for specific scenarios where profiles might implicitly assign PSLAs (e.g., `Salesforce API Only` profile assigning `SalesforceAPIIntegrationPsl`) and allows for always excluding certain PSLAs from the unused check.\n- **Reporting:** Generates a CSV report of all identified unused PSLAs, including the user and the associated Permission Set License.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of unused PSLAs.\n- **Interactive Deletion:** In non-CI environments, it offers an interactive prompt to bulk delete the identified unused PSLAs.\n\nMany thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command 😊\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves extensive querying of Salesforce objects and data correlation:\n\n- **SOQL Queries (Bulk API):** It uses `bulkQuery` and `bulkQueryChunksIn` to efficiently retrieve large volumes of data from `PermissionSetLicenseAssign`, `PermissionSetLicense`, `PermissionSet`, `PermissionSetGroupComponent`, and `PermissionSetAssignment` objects.\n- **Data Correlation:** It meticulously correlates data across these objects to determine if a `PermissionSetLicenseAssign` record has a corresponding active assignment to a Permission Set or Permission Set Group for the same user.\n- **Filtering Logic:** It applies complex filtering logic to exclude PSLAs that are genuinely in use or are part of predefined exceptions (e.g., `alwaysExcludeForActiveUsersPermissionSetLicenses`).\n- **Bulk Deletion:** If the user opts to delete unused PSLAs, it uses `bulkUpdate` with the `delete` operation to efficiently remove multiple records.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused PSLAs.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Interaction:** Uses `prompts` for interactive confirmation before performing deletion operations.\n</details>\n",
|
|
6539
6523
|
"examples": [
|
|
6540
|
-
"$ sf hardis:org:diagnose:
|
|
6524
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6525
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6541
6526
|
],
|
|
6542
6527
|
"flags": {
|
|
6543
6528
|
"json": {
|
|
@@ -6601,14 +6586,32 @@
|
|
|
6601
6586
|
},
|
|
6602
6587
|
"hasDynamicHelp": true,
|
|
6603
6588
|
"hiddenAliases": [],
|
|
6604
|
-
"id": "hardis:org:diagnose:
|
|
6589
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6605
6590
|
"pluginAlias": "sfdx-hardis",
|
|
6606
6591
|
"pluginName": "sfdx-hardis",
|
|
6607
6592
|
"pluginType": "core",
|
|
6608
6593
|
"strict": true,
|
|
6609
6594
|
"enableJsonFlag": true,
|
|
6610
|
-
"title": "Detect
|
|
6595
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6611
6596
|
"requiresProject": false,
|
|
6597
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6598
|
+
"Sales_User"
|
|
6599
|
+
],
|
|
6600
|
+
"permSetsPermSetLicenses": [
|
|
6601
|
+
{
|
|
6602
|
+
"permSet": "Sales_User",
|
|
6603
|
+
"permSetLicense": "SalesUserPsl"
|
|
6604
|
+
}
|
|
6605
|
+
],
|
|
6606
|
+
"profilesPermissionSetLicenses": [
|
|
6607
|
+
{
|
|
6608
|
+
"profile": "Salesforce API Only",
|
|
6609
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6610
|
+
}
|
|
6611
|
+
],
|
|
6612
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6613
|
+
"IdentityConnect"
|
|
6614
|
+
],
|
|
6612
6615
|
"isESM": true,
|
|
6613
6616
|
"relativePath": [
|
|
6614
6617
|
"lib",
|
|
@@ -6616,47 +6619,50 @@
|
|
|
6616
6619
|
"hardis",
|
|
6617
6620
|
"org",
|
|
6618
6621
|
"diagnose",
|
|
6619
|
-
"
|
|
6622
|
+
"unusedlicenses.js"
|
|
6620
6623
|
],
|
|
6621
6624
|
"aliasPermutations": [],
|
|
6622
6625
|
"permutations": [
|
|
6623
|
-
"hardis:org:diagnose:
|
|
6624
|
-
"org:hardis:diagnose:
|
|
6625
|
-
"org:diagnose:hardis:
|
|
6626
|
-
"org:diagnose:
|
|
6627
|
-
"hardis:diagnose:org:
|
|
6628
|
-
"diagnose:hardis:org:
|
|
6629
|
-
"diagnose:org:hardis:
|
|
6630
|
-
"diagnose:org:
|
|
6631
|
-
"hardis:diagnose:
|
|
6632
|
-
"diagnose:hardis:
|
|
6633
|
-
"diagnose:
|
|
6634
|
-
"diagnose:
|
|
6635
|
-
"hardis:org:
|
|
6636
|
-
"org:hardis:
|
|
6637
|
-
"org:
|
|
6638
|
-
"org:
|
|
6639
|
-
"hardis:
|
|
6640
|
-
"
|
|
6641
|
-
"
|
|
6642
|
-
"
|
|
6643
|
-
"hardis:
|
|
6644
|
-
"
|
|
6645
|
-
"
|
|
6646
|
-
"
|
|
6647
|
-
]
|
|
6648
|
-
},
|
|
6649
|
-
"hardis:org:diagnose:
|
|
6650
|
-
"aliases": [],
|
|
6651
|
-
"args": {},
|
|
6652
|
-
"description": "
|
|
6653
|
-
"examples": [
|
|
6654
|
-
"$ sf hardis:org:diagnose:
|
|
6655
|
-
"$ sf hardis:org:diagnose:
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
"
|
|
6659
|
-
|
|
6626
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6627
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6628
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6629
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6630
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6631
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6632
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6633
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6634
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6635
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6636
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6637
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6638
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6639
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6640
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6641
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6642
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6643
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6644
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6645
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6646
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6647
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6648
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6649
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
6650
|
+
]
|
|
6651
|
+
},
|
|
6652
|
+
"hardis:org:diagnose:unusedusers": {
|
|
6653
|
+
"aliases": [],
|
|
6654
|
+
"args": {},
|
|
6655
|
+
"description": "\n## Command Behavior\n\n**Detects and reports on inactive or unused Salesforce user accounts, helping to optimize license usage and enhance security.**\n\nEfficient user management is vital in Salesforce to ensure resources are optimized and costs are controlled. However, inactive or unused user accounts can often go unnoticed, leading to wasted licenses and potential security risks. This tool addresses this challenge by enabling administrators to identify users who haven't logged in within a specified period.\n\nBy analyzing user login activity and last login timestamps, this feature highlights inactive user accounts, allowing administrators to take appropriate action. Whether it's deactivating dormant accounts, freeing up licenses, or ensuring compliance with security policies, this functionality empowers administrators to maintain a lean and secure Salesforce environment.\n\nKey functionalities:\n\n- **Inactivity Detection:** Identifies users who have not logged in for a specified number of days (`--days` flag, default 180 days in CI, 365 days otherwise).\n- **License Type Filtering:** Allows filtering users by license type using `--licensetypes` (e.g., `all-crm`, `all-paying`) or specific license identifiers using `--licenseidentifiers`.\n - `all-crm`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT` licenses.\n - `all-paying`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT`, `PID_Customer_Community`, `PID_Customer_Community_Login`, `PID_Partner_Community`, `PID_Partner_Community_Login` licenses.\n - Note: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/sfdx_cli_reference/sforce_api_objects_userlicense.htm).\n- **Active User Retrieval:** The `--returnactiveusers` flag inverts the command, allowing you to retrieve active users who *have* logged in during the specified period.\n- **CSV Report Generation:** Generates a CSV file containing details of all identified users (inactive or active), including their last login date, profile, and license information.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of inactive or active users.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query (Bulk API):** It uses `bulkQuery` to efficiently retrieve user records from the Salesforce `User` object. The SOQL query dynamically constructs its WHERE clause based on the `--days`, `--licensetypes`, `--licenseidentifiers`, and `--returnactiveusers` flags.\n- **Interactive Prompts:** Uses `prompts` to interactively ask the user for the number of inactive days and license types if not provided via flags.\n- **License Mapping:** Internally maps common license type aliases (e.g., `all-crm`) to their corresponding Salesforce `LicenseDefinitionKey` values.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of users.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides a summary of the findings in the console, indicating the number of inactive or active users found.\n</details>",
|
|
6656
|
+
"examples": [
|
|
6657
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6658
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6659
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6660
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6661
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6662
|
+
],
|
|
6663
|
+
"flags": {
|
|
6664
|
+
"json": {
|
|
6665
|
+
"description": "Format output as json.",
|
|
6660
6666
|
"helpGroup": "GLOBAL",
|
|
6661
6667
|
"name": "json",
|
|
6662
6668
|
"allowNo": false,
|
|
@@ -6686,6 +6692,33 @@
|
|
|
6686
6692
|
"multiple": false,
|
|
6687
6693
|
"type": "option"
|
|
6688
6694
|
},
|
|
6695
|
+
"licensetypes": {
|
|
6696
|
+
"char": "l",
|
|
6697
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6698
|
+
"name": "licensetypes",
|
|
6699
|
+
"hasDynamicHelp": false,
|
|
6700
|
+
"multiple": false,
|
|
6701
|
+
"options": [
|
|
6702
|
+
"all",
|
|
6703
|
+
"all-crm",
|
|
6704
|
+
"all-paying"
|
|
6705
|
+
],
|
|
6706
|
+
"type": "option"
|
|
6707
|
+
},
|
|
6708
|
+
"licenseidentifiers": {
|
|
6709
|
+
"char": "i",
|
|
6710
|
+
"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",
|
|
6711
|
+
"name": "licenseidentifiers",
|
|
6712
|
+
"hasDynamicHelp": false,
|
|
6713
|
+
"multiple": false,
|
|
6714
|
+
"type": "option"
|
|
6715
|
+
},
|
|
6716
|
+
"returnactiveusers": {
|
|
6717
|
+
"description": "Inverts the command by returning the active users",
|
|
6718
|
+
"name": "returnactiveusers",
|
|
6719
|
+
"allowNo": false,
|
|
6720
|
+
"type": "boolean"
|
|
6721
|
+
},
|
|
6689
6722
|
"debug": {
|
|
6690
6723
|
"char": "d",
|
|
6691
6724
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6724,13 +6757,13 @@
|
|
|
6724
6757
|
},
|
|
6725
6758
|
"hasDynamicHelp": true,
|
|
6726
6759
|
"hiddenAliases": [],
|
|
6727
|
-
"id": "hardis:org:diagnose:
|
|
6760
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
6728
6761
|
"pluginAlias": "sfdx-hardis",
|
|
6729
6762
|
"pluginName": "sfdx-hardis",
|
|
6730
6763
|
"pluginType": "core",
|
|
6731
6764
|
"strict": true,
|
|
6732
6765
|
"enableJsonFlag": true,
|
|
6733
|
-
"title": "Detect unused
|
|
6766
|
+
"title": "Detect unused Users in Salesforce",
|
|
6734
6767
|
"requiresProject": false,
|
|
6735
6768
|
"isESM": true,
|
|
6736
6769
|
"relativePath": [
|
|
@@ -6739,42 +6772,42 @@
|
|
|
6739
6772
|
"hardis",
|
|
6740
6773
|
"org",
|
|
6741
6774
|
"diagnose",
|
|
6742
|
-
"
|
|
6775
|
+
"unusedusers.js"
|
|
6743
6776
|
],
|
|
6744
6777
|
"aliasPermutations": [],
|
|
6745
6778
|
"permutations": [
|
|
6746
|
-
"hardis:org:diagnose:
|
|
6747
|
-
"org:hardis:diagnose:
|
|
6748
|
-
"org:diagnose:hardis:
|
|
6749
|
-
"org:diagnose:
|
|
6750
|
-
"hardis:diagnose:org:
|
|
6751
|
-
"diagnose:hardis:org:
|
|
6752
|
-
"diagnose:org:hardis:
|
|
6753
|
-
"diagnose:org:
|
|
6754
|
-
"hardis:diagnose:
|
|
6755
|
-
"diagnose:hardis:
|
|
6756
|
-
"diagnose:
|
|
6757
|
-
"diagnose:
|
|
6758
|
-
"hardis:org:
|
|
6759
|
-
"org:hardis:
|
|
6760
|
-
"org:
|
|
6761
|
-
"org:
|
|
6762
|
-
"hardis:
|
|
6763
|
-
"
|
|
6764
|
-
"
|
|
6765
|
-
"
|
|
6766
|
-
"hardis:
|
|
6767
|
-
"
|
|
6768
|
-
"
|
|
6769
|
-
"
|
|
6779
|
+
"hardis:org:diagnose:unusedusers",
|
|
6780
|
+
"org:hardis:diagnose:unusedusers",
|
|
6781
|
+
"org:diagnose:hardis:unusedusers",
|
|
6782
|
+
"org:diagnose:unusedusers:hardis",
|
|
6783
|
+
"hardis:diagnose:org:unusedusers",
|
|
6784
|
+
"diagnose:hardis:org:unusedusers",
|
|
6785
|
+
"diagnose:org:hardis:unusedusers",
|
|
6786
|
+
"diagnose:org:unusedusers:hardis",
|
|
6787
|
+
"hardis:diagnose:unusedusers:org",
|
|
6788
|
+
"diagnose:hardis:unusedusers:org",
|
|
6789
|
+
"diagnose:unusedusers:hardis:org",
|
|
6790
|
+
"diagnose:unusedusers:org:hardis",
|
|
6791
|
+
"hardis:org:unusedusers:diagnose",
|
|
6792
|
+
"org:hardis:unusedusers:diagnose",
|
|
6793
|
+
"org:unusedusers:hardis:diagnose",
|
|
6794
|
+
"org:unusedusers:diagnose:hardis",
|
|
6795
|
+
"hardis:unusedusers:org:diagnose",
|
|
6796
|
+
"unusedusers:hardis:org:diagnose",
|
|
6797
|
+
"unusedusers:org:hardis:diagnose",
|
|
6798
|
+
"unusedusers:org:diagnose:hardis",
|
|
6799
|
+
"hardis:unusedusers:diagnose:org",
|
|
6800
|
+
"unusedusers:hardis:diagnose:org",
|
|
6801
|
+
"unusedusers:diagnose:hardis:org",
|
|
6802
|
+
"unusedusers:diagnose:org:hardis"
|
|
6770
6803
|
]
|
|
6771
6804
|
},
|
|
6772
|
-
"hardis:org:
|
|
6805
|
+
"hardis:org:files:export": {
|
|
6773
6806
|
"aliases": [],
|
|
6774
6807
|
"args": {},
|
|
6775
|
-
"description": "\n## Command Behavior\n\n**
|
|
6808
|
+
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
|
|
6776
6809
|
"examples": [
|
|
6777
|
-
"$ sf hardis:org:
|
|
6810
|
+
"$ sf hardis:org:files:export"
|
|
6778
6811
|
],
|
|
6779
6812
|
"flags": {
|
|
6780
6813
|
"json": {
|
|
@@ -6792,14 +6825,48 @@
|
|
|
6792
6825
|
"multiple": false,
|
|
6793
6826
|
"type": "option"
|
|
6794
6827
|
},
|
|
6795
|
-
"
|
|
6796
|
-
"char": "
|
|
6797
|
-
"description": "
|
|
6798
|
-
"name": "
|
|
6828
|
+
"path": {
|
|
6829
|
+
"char": "p",
|
|
6830
|
+
"description": "Path to the file export project",
|
|
6831
|
+
"name": "path",
|
|
6832
|
+
"hasDynamicHelp": false,
|
|
6833
|
+
"multiple": false,
|
|
6834
|
+
"type": "option"
|
|
6835
|
+
},
|
|
6836
|
+
"chunksize": {
|
|
6837
|
+
"char": "c",
|
|
6838
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
6839
|
+
"name": "chunksize",
|
|
6840
|
+
"default": 1000,
|
|
6799
6841
|
"hasDynamicHelp": false,
|
|
6800
6842
|
"multiple": false,
|
|
6801
6843
|
"type": "option"
|
|
6802
6844
|
},
|
|
6845
|
+
"polltimeout": {
|
|
6846
|
+
"char": "t",
|
|
6847
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
6848
|
+
"name": "polltimeout",
|
|
6849
|
+
"default": 300000,
|
|
6850
|
+
"hasDynamicHelp": false,
|
|
6851
|
+
"multiple": false,
|
|
6852
|
+
"type": "option"
|
|
6853
|
+
},
|
|
6854
|
+
"startchunknumber": {
|
|
6855
|
+
"char": "s",
|
|
6856
|
+
"description": "Chunk number to start from",
|
|
6857
|
+
"name": "startchunknumber",
|
|
6858
|
+
"default": 0,
|
|
6859
|
+
"hasDynamicHelp": false,
|
|
6860
|
+
"multiple": false,
|
|
6861
|
+
"type": "option"
|
|
6862
|
+
},
|
|
6863
|
+
"resume": {
|
|
6864
|
+
"char": "r",
|
|
6865
|
+
"description": "Resume previous export by checking existing files (default in CI)",
|
|
6866
|
+
"name": "resume",
|
|
6867
|
+
"allowNo": false,
|
|
6868
|
+
"type": "boolean"
|
|
6869
|
+
},
|
|
6803
6870
|
"debug": {
|
|
6804
6871
|
"char": "d",
|
|
6805
6872
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6838,30 +6905,13 @@
|
|
|
6838
6905
|
},
|
|
6839
6906
|
"hasDynamicHelp": true,
|
|
6840
6907
|
"hiddenAliases": [],
|
|
6841
|
-
"id": "hardis:org:
|
|
6908
|
+
"id": "hardis:org:files:export",
|
|
6842
6909
|
"pluginAlias": "sfdx-hardis",
|
|
6843
6910
|
"pluginName": "sfdx-hardis",
|
|
6844
6911
|
"pluginType": "core",
|
|
6845
6912
|
"strict": true,
|
|
6846
6913
|
"enableJsonFlag": true,
|
|
6847
|
-
"title": "
|
|
6848
|
-
"allowedInactiveConnectedApps": [
|
|
6849
|
-
"Ant Migration Tool",
|
|
6850
|
-
"Chatter Desktop",
|
|
6851
|
-
"Chatter Mobile for BlackBerry",
|
|
6852
|
-
"Force.com IDE",
|
|
6853
|
-
"OIQ_Integration",
|
|
6854
|
-
"Salesforce CLI",
|
|
6855
|
-
"Salesforce Files",
|
|
6856
|
-
"Salesforce Mobile Dashboards",
|
|
6857
|
-
"Salesforce Touch",
|
|
6858
|
-
"Salesforce for Outlook",
|
|
6859
|
-
"SalesforceA",
|
|
6860
|
-
"SalesforceA for Android",
|
|
6861
|
-
"SalesforceA for iOS",
|
|
6862
|
-
"SalesforceDX Namespace Registry",
|
|
6863
|
-
"SalesforceIQ"
|
|
6864
|
-
],
|
|
6914
|
+
"title": "Export files",
|
|
6865
6915
|
"requiresProject": false,
|
|
6866
6916
|
"isESM": true,
|
|
6867
6917
|
"relativePath": [
|
|
@@ -6869,44 +6919,43 @@
|
|
|
6869
6919
|
"commands",
|
|
6870
6920
|
"hardis",
|
|
6871
6921
|
"org",
|
|
6872
|
-
"
|
|
6873
|
-
"
|
|
6922
|
+
"files",
|
|
6923
|
+
"export.js"
|
|
6874
6924
|
],
|
|
6875
6925
|
"aliasPermutations": [],
|
|
6876
6926
|
"permutations": [
|
|
6877
|
-
"hardis:org:
|
|
6878
|
-
"org:hardis:
|
|
6879
|
-
"org:
|
|
6880
|
-
"org:
|
|
6881
|
-
"hardis:
|
|
6882
|
-
"
|
|
6883
|
-
"
|
|
6884
|
-
"
|
|
6885
|
-
"hardis:
|
|
6886
|
-
"
|
|
6887
|
-
"
|
|
6888
|
-
"
|
|
6889
|
-
"hardis:org:
|
|
6890
|
-
"org:hardis:
|
|
6891
|
-
"org:
|
|
6892
|
-
"org:
|
|
6893
|
-
"hardis:
|
|
6894
|
-
"
|
|
6895
|
-
"
|
|
6896
|
-
"
|
|
6897
|
-
"hardis:
|
|
6898
|
-
"
|
|
6899
|
-
"
|
|
6900
|
-
"
|
|
6927
|
+
"hardis:org:files:export",
|
|
6928
|
+
"org:hardis:files:export",
|
|
6929
|
+
"org:files:hardis:export",
|
|
6930
|
+
"org:files:export:hardis",
|
|
6931
|
+
"hardis:files:org:export",
|
|
6932
|
+
"files:hardis:org:export",
|
|
6933
|
+
"files:org:hardis:export",
|
|
6934
|
+
"files:org:export:hardis",
|
|
6935
|
+
"hardis:files:export:org",
|
|
6936
|
+
"files:hardis:export:org",
|
|
6937
|
+
"files:export:hardis:org",
|
|
6938
|
+
"files:export:org:hardis",
|
|
6939
|
+
"hardis:org:export:files",
|
|
6940
|
+
"org:hardis:export:files",
|
|
6941
|
+
"org:export:hardis:files",
|
|
6942
|
+
"org:export:files:hardis",
|
|
6943
|
+
"hardis:export:org:files",
|
|
6944
|
+
"export:hardis:org:files",
|
|
6945
|
+
"export:org:hardis:files",
|
|
6946
|
+
"export:org:files:hardis",
|
|
6947
|
+
"hardis:export:files:org",
|
|
6948
|
+
"export:hardis:files:org",
|
|
6949
|
+
"export:files:hardis:org",
|
|
6950
|
+
"export:files:org:hardis"
|
|
6901
6951
|
]
|
|
6902
6952
|
},
|
|
6903
|
-
"hardis:org:
|
|
6953
|
+
"hardis:org:files:import": {
|
|
6904
6954
|
"aliases": [],
|
|
6905
6955
|
"args": {},
|
|
6906
|
-
"description": "\
|
|
6956
|
+
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
|
|
6907
6957
|
"examples": [
|
|
6908
|
-
"$ sf hardis:org:
|
|
6909
|
-
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6958
|
+
"$ sf hardis:org:files:import"
|
|
6910
6959
|
],
|
|
6911
6960
|
"flags": {
|
|
6912
6961
|
"json": {
|
|
@@ -6924,14 +6973,21 @@
|
|
|
6924
6973
|
"multiple": false,
|
|
6925
6974
|
"type": "option"
|
|
6926
6975
|
},
|
|
6927
|
-
"
|
|
6928
|
-
"char": "
|
|
6929
|
-
"description": "
|
|
6930
|
-
"name": "
|
|
6976
|
+
"path": {
|
|
6977
|
+
"char": "p",
|
|
6978
|
+
"description": "Path to the file export project",
|
|
6979
|
+
"name": "path",
|
|
6931
6980
|
"hasDynamicHelp": false,
|
|
6932
6981
|
"multiple": false,
|
|
6933
6982
|
"type": "option"
|
|
6934
6983
|
},
|
|
6984
|
+
"overwrite": {
|
|
6985
|
+
"char": "f",
|
|
6986
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
6987
|
+
"name": "overwrite",
|
|
6988
|
+
"allowNo": false,
|
|
6989
|
+
"type": "boolean"
|
|
6990
|
+
},
|
|
6935
6991
|
"debug": {
|
|
6936
6992
|
"char": "d",
|
|
6937
6993
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6970,79 +7026,58 @@
|
|
|
6970
7026
|
},
|
|
6971
7027
|
"hasDynamicHelp": true,
|
|
6972
7028
|
"hiddenAliases": [],
|
|
6973
|
-
"id": "hardis:org:
|
|
7029
|
+
"id": "hardis:org:files:import",
|
|
6974
7030
|
"pluginAlias": "sfdx-hardis",
|
|
6975
7031
|
"pluginName": "sfdx-hardis",
|
|
6976
7032
|
"pluginType": "core",
|
|
6977
7033
|
"strict": true,
|
|
6978
7034
|
"enableJsonFlag": true,
|
|
6979
|
-
"title": "
|
|
7035
|
+
"title": "Import files",
|
|
6980
7036
|
"requiresProject": false,
|
|
6981
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
6982
|
-
"Sales_User"
|
|
6983
|
-
],
|
|
6984
|
-
"permSetsPermSetLicenses": [
|
|
6985
|
-
{
|
|
6986
|
-
"permSet": "Sales_User",
|
|
6987
|
-
"permSetLicense": "SalesUserPsl"
|
|
6988
|
-
}
|
|
6989
|
-
],
|
|
6990
|
-
"profilesPermissionSetLicenses": [
|
|
6991
|
-
{
|
|
6992
|
-
"profile": "Salesforce API Only",
|
|
6993
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6994
|
-
}
|
|
6995
|
-
],
|
|
6996
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6997
|
-
"IdentityConnect"
|
|
6998
|
-
],
|
|
6999
7037
|
"isESM": true,
|
|
7000
7038
|
"relativePath": [
|
|
7001
7039
|
"lib",
|
|
7002
7040
|
"commands",
|
|
7003
7041
|
"hardis",
|
|
7004
7042
|
"org",
|
|
7005
|
-
"
|
|
7006
|
-
"
|
|
7043
|
+
"files",
|
|
7044
|
+
"import.js"
|
|
7007
7045
|
],
|
|
7008
7046
|
"aliasPermutations": [],
|
|
7009
7047
|
"permutations": [
|
|
7010
|
-
"hardis:org:
|
|
7011
|
-
"org:hardis:
|
|
7012
|
-
"org:
|
|
7013
|
-
"org:
|
|
7014
|
-
"hardis:
|
|
7015
|
-
"
|
|
7016
|
-
"
|
|
7017
|
-
"
|
|
7018
|
-
"hardis:
|
|
7019
|
-
"
|
|
7020
|
-
"
|
|
7021
|
-
"
|
|
7022
|
-
"hardis:org:
|
|
7023
|
-
"org:hardis:
|
|
7024
|
-
"org:
|
|
7025
|
-
"org:
|
|
7026
|
-
"hardis:
|
|
7027
|
-
"
|
|
7028
|
-
"
|
|
7029
|
-
"
|
|
7030
|
-
"hardis:
|
|
7031
|
-
"
|
|
7032
|
-
"
|
|
7033
|
-
"
|
|
7048
|
+
"hardis:org:files:import",
|
|
7049
|
+
"org:hardis:files:import",
|
|
7050
|
+
"org:files:hardis:import",
|
|
7051
|
+
"org:files:import:hardis",
|
|
7052
|
+
"hardis:files:org:import",
|
|
7053
|
+
"files:hardis:org:import",
|
|
7054
|
+
"files:org:hardis:import",
|
|
7055
|
+
"files:org:import:hardis",
|
|
7056
|
+
"hardis:files:import:org",
|
|
7057
|
+
"files:hardis:import:org",
|
|
7058
|
+
"files:import:hardis:org",
|
|
7059
|
+
"files:import:org:hardis",
|
|
7060
|
+
"hardis:org:import:files",
|
|
7061
|
+
"org:hardis:import:files",
|
|
7062
|
+
"org:import:hardis:files",
|
|
7063
|
+
"org:import:files:hardis",
|
|
7064
|
+
"hardis:import:org:files",
|
|
7065
|
+
"import:hardis:org:files",
|
|
7066
|
+
"import:org:hardis:files",
|
|
7067
|
+
"import:org:files:hardis",
|
|
7068
|
+
"hardis:import:files:org",
|
|
7069
|
+
"import:hardis:files:org",
|
|
7070
|
+
"import:files:hardis:org",
|
|
7071
|
+
"import:files:org:hardis"
|
|
7034
7072
|
]
|
|
7035
7073
|
},
|
|
7036
|
-
"hardis:org:
|
|
7074
|
+
"hardis:org:fix:listviewmine": {
|
|
7037
7075
|
"aliases": [],
|
|
7038
7076
|
"args": {},
|
|
7039
|
-
"description": "
|
|
7077
|
+
"description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
|
|
7040
7078
|
"examples": [
|
|
7041
|
-
"$ sf hardis:org:
|
|
7042
|
-
"$ sf hardis:org:
|
|
7043
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
7044
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7045
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7079
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
7080
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
7046
7081
|
],
|
|
7047
7082
|
"flags": {
|
|
7048
7083
|
"json": {
|
|
@@ -7060,49 +7095,14 @@
|
|
|
7060
7095
|
"multiple": false,
|
|
7061
7096
|
"type": "option"
|
|
7062
7097
|
},
|
|
7063
|
-
"
|
|
7064
|
-
"char": "f",
|
|
7065
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7066
|
-
"name": "outputfile",
|
|
7067
|
-
"hasDynamicHelp": false,
|
|
7068
|
-
"multiple": false,
|
|
7069
|
-
"type": "option"
|
|
7070
|
-
},
|
|
7071
|
-
"days": {
|
|
7072
|
-
"char": "t",
|
|
7073
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7074
|
-
"name": "days",
|
|
7075
|
-
"hasDynamicHelp": false,
|
|
7076
|
-
"multiple": false,
|
|
7077
|
-
"type": "option"
|
|
7078
|
-
},
|
|
7079
|
-
"licensetypes": {
|
|
7098
|
+
"listviews": {
|
|
7080
7099
|
"char": "l",
|
|
7081
|
-
"description": "
|
|
7082
|
-
"name": "
|
|
7083
|
-
"hasDynamicHelp": false,
|
|
7084
|
-
"multiple": false,
|
|
7085
|
-
"options": [
|
|
7086
|
-
"all",
|
|
7087
|
-
"all-crm",
|
|
7088
|
-
"all-paying"
|
|
7089
|
-
],
|
|
7090
|
-
"type": "option"
|
|
7091
|
-
},
|
|
7092
|
-
"licenseidentifiers": {
|
|
7093
|
-
"char": "i",
|
|
7094
|
-
"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",
|
|
7095
|
-
"name": "licenseidentifiers",
|
|
7100
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
7101
|
+
"name": "listviews",
|
|
7096
7102
|
"hasDynamicHelp": false,
|
|
7097
7103
|
"multiple": false,
|
|
7098
7104
|
"type": "option"
|
|
7099
7105
|
},
|
|
7100
|
-
"returnactiveusers": {
|
|
7101
|
-
"description": "Inverts the command by returning the active users",
|
|
7102
|
-
"name": "returnactiveusers",
|
|
7103
|
-
"allowNo": false,
|
|
7104
|
-
"type": "boolean"
|
|
7105
|
-
},
|
|
7106
7106
|
"debug": {
|
|
7107
7107
|
"char": "d",
|
|
7108
7108
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7141,49 +7141,49 @@
|
|
|
7141
7141
|
},
|
|
7142
7142
|
"hasDynamicHelp": true,
|
|
7143
7143
|
"hiddenAliases": [],
|
|
7144
|
-
"id": "hardis:org:
|
|
7145
|
-
"pluginAlias": "sfdx-hardis",
|
|
7146
|
-
"pluginName": "sfdx-hardis",
|
|
7147
|
-
"pluginType": "core",
|
|
7148
|
-
"strict": true,
|
|
7149
|
-
"enableJsonFlag": true,
|
|
7150
|
-
"title": "
|
|
7151
|
-
"requiresProject":
|
|
7152
|
-
"isESM": true,
|
|
7153
|
-
"relativePath": [
|
|
7154
|
-
"lib",
|
|
7155
|
-
"commands",
|
|
7156
|
-
"hardis",
|
|
7157
|
-
"org",
|
|
7158
|
-
"
|
|
7159
|
-
"
|
|
7160
|
-
],
|
|
7161
|
-
"aliasPermutations": [],
|
|
7162
|
-
"permutations": [
|
|
7163
|
-
"hardis:org:
|
|
7164
|
-
"org:hardis:
|
|
7165
|
-
"org:
|
|
7166
|
-
"org:
|
|
7167
|
-
"hardis:
|
|
7168
|
-
"
|
|
7169
|
-
"
|
|
7170
|
-
"
|
|
7171
|
-
"hardis:
|
|
7172
|
-
"
|
|
7173
|
-
"
|
|
7174
|
-
"
|
|
7175
|
-
"hardis:org:
|
|
7176
|
-
"org:hardis:
|
|
7177
|
-
"org:
|
|
7178
|
-
"org:
|
|
7179
|
-
"hardis:
|
|
7180
|
-
"
|
|
7181
|
-
"
|
|
7182
|
-
"
|
|
7183
|
-
"hardis:
|
|
7184
|
-
"
|
|
7185
|
-
"
|
|
7186
|
-
"
|
|
7144
|
+
"id": "hardis:org:fix:listviewmine",
|
|
7145
|
+
"pluginAlias": "sfdx-hardis",
|
|
7146
|
+
"pluginName": "sfdx-hardis",
|
|
7147
|
+
"pluginType": "core",
|
|
7148
|
+
"strict": true,
|
|
7149
|
+
"enableJsonFlag": true,
|
|
7150
|
+
"title": "Fix listviews with ",
|
|
7151
|
+
"requiresProject": true,
|
|
7152
|
+
"isESM": true,
|
|
7153
|
+
"relativePath": [
|
|
7154
|
+
"lib",
|
|
7155
|
+
"commands",
|
|
7156
|
+
"hardis",
|
|
7157
|
+
"org",
|
|
7158
|
+
"fix",
|
|
7159
|
+
"listviewmine.js"
|
|
7160
|
+
],
|
|
7161
|
+
"aliasPermutations": [],
|
|
7162
|
+
"permutations": [
|
|
7163
|
+
"hardis:org:fix:listviewmine",
|
|
7164
|
+
"org:hardis:fix:listviewmine",
|
|
7165
|
+
"org:fix:hardis:listviewmine",
|
|
7166
|
+
"org:fix:listviewmine:hardis",
|
|
7167
|
+
"hardis:fix:org:listviewmine",
|
|
7168
|
+
"fix:hardis:org:listviewmine",
|
|
7169
|
+
"fix:org:hardis:listviewmine",
|
|
7170
|
+
"fix:org:listviewmine:hardis",
|
|
7171
|
+
"hardis:fix:listviewmine:org",
|
|
7172
|
+
"fix:hardis:listviewmine:org",
|
|
7173
|
+
"fix:listviewmine:hardis:org",
|
|
7174
|
+
"fix:listviewmine:org:hardis",
|
|
7175
|
+
"hardis:org:listviewmine:fix",
|
|
7176
|
+
"org:hardis:listviewmine:fix",
|
|
7177
|
+
"org:listviewmine:hardis:fix",
|
|
7178
|
+
"org:listviewmine:fix:hardis",
|
|
7179
|
+
"hardis:listviewmine:org:fix",
|
|
7180
|
+
"listviewmine:hardis:org:fix",
|
|
7181
|
+
"listviewmine:org:hardis:fix",
|
|
7182
|
+
"listviewmine:org:fix:hardis",
|
|
7183
|
+
"hardis:listviewmine:fix:org",
|
|
7184
|
+
"listviewmine:hardis:fix:org",
|
|
7185
|
+
"listviewmine:fix:hardis:org",
|
|
7186
|
+
"listviewmine:fix:org:hardis"
|
|
7187
7187
|
]
|
|
7188
7188
|
},
|
|
7189
7189
|
"hardis:org:generate:packagexmlfull": {
|
|
@@ -8057,6 +8057,113 @@
|
|
|
8057
8057
|
"flow:purge:org:hardis"
|
|
8058
8058
|
]
|
|
8059
8059
|
},
|
|
8060
|
+
"hardis:org:retrieve:packageconfig": {
|
|
8061
|
+
"aliases": [],
|
|
8062
|
+
"args": {},
|
|
8063
|
+
"description": "\n**Retrieves the installed package configuration from a Salesforce org and optionally updates the local project configuration.**\n\nThis command is useful for maintaining an accurate record of installed packages within your Salesforce project, which is crucial for managing dependencies and ensuring consistent deployments across environments.\n\nKey functionalities:\n\n- **Package Listing:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a list of all installed packages.\n- **Configuration Update:** Offers the option to update your local project's configuration with the retrieved list of installed packages. This can be beneficial for automating package installations during environment setup or CI/CD processes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Org Connection:** It establishes a connection to the target Salesforce org using the provided or prompted username.\n- **Metadata Retrieval:** It utilizes `MetadataUtils.listInstalledPackages` to query the Salesforce org and obtain details about the installed packages.\n- **Interactive Prompt:** It uses the `prompts` library to ask the user whether they want to update their local project configuration with the retrieved package list.\n- **Configuration Management:** If the user confirms, it calls `managePackageConfig` to update the project's configuration file (likely `.sfdx-hardis.yml`) with the new package information.\n- **User Feedback:** Provides clear messages to the user about the success of the package retrieval and configuration update.\n</details>\n",
|
|
8064
|
+
"examples": [
|
|
8065
|
+
"$ sf hardis:org:retrieve:packageconfig",
|
|
8066
|
+
"sf hardis:org:retrieve:packageconfig -u myOrg"
|
|
8067
|
+
],
|
|
8068
|
+
"flags": {
|
|
8069
|
+
"json": {
|
|
8070
|
+
"description": "Format output as json.",
|
|
8071
|
+
"helpGroup": "GLOBAL",
|
|
8072
|
+
"name": "json",
|
|
8073
|
+
"allowNo": false,
|
|
8074
|
+
"type": "boolean"
|
|
8075
|
+
},
|
|
8076
|
+
"flags-dir": {
|
|
8077
|
+
"helpGroup": "GLOBAL",
|
|
8078
|
+
"name": "flags-dir",
|
|
8079
|
+
"summary": "Import flag values from a directory.",
|
|
8080
|
+
"hasDynamicHelp": false,
|
|
8081
|
+
"multiple": false,
|
|
8082
|
+
"type": "option"
|
|
8083
|
+
},
|
|
8084
|
+
"debug": {
|
|
8085
|
+
"char": "d",
|
|
8086
|
+
"description": "Activate debug mode (more logs)",
|
|
8087
|
+
"name": "debug",
|
|
8088
|
+
"allowNo": false,
|
|
8089
|
+
"type": "boolean"
|
|
8090
|
+
},
|
|
8091
|
+
"websocket": {
|
|
8092
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8093
|
+
"name": "websocket",
|
|
8094
|
+
"hasDynamicHelp": false,
|
|
8095
|
+
"multiple": false,
|
|
8096
|
+
"type": "option"
|
|
8097
|
+
},
|
|
8098
|
+
"skipauth": {
|
|
8099
|
+
"description": "Skip authentication check when a default username is required",
|
|
8100
|
+
"name": "skipauth",
|
|
8101
|
+
"allowNo": false,
|
|
8102
|
+
"type": "boolean"
|
|
8103
|
+
},
|
|
8104
|
+
"target-org": {
|
|
8105
|
+
"aliases": [
|
|
8106
|
+
"targetusername",
|
|
8107
|
+
"u"
|
|
8108
|
+
],
|
|
8109
|
+
"char": "o",
|
|
8110
|
+
"deprecateAliases": true,
|
|
8111
|
+
"name": "target-org",
|
|
8112
|
+
"noCacheDefault": true,
|
|
8113
|
+
"required": true,
|
|
8114
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8115
|
+
"hasDynamicHelp": true,
|
|
8116
|
+
"multiple": false,
|
|
8117
|
+
"type": "option"
|
|
8118
|
+
}
|
|
8119
|
+
},
|
|
8120
|
+
"hasDynamicHelp": true,
|
|
8121
|
+
"hiddenAliases": [],
|
|
8122
|
+
"id": "hardis:org:retrieve:packageconfig",
|
|
8123
|
+
"pluginAlias": "sfdx-hardis",
|
|
8124
|
+
"pluginName": "sfdx-hardis",
|
|
8125
|
+
"pluginType": "core",
|
|
8126
|
+
"strict": true,
|
|
8127
|
+
"enableJsonFlag": true,
|
|
8128
|
+
"title": "Retrieve package configuration from an org",
|
|
8129
|
+
"requiresProject": false,
|
|
8130
|
+
"isESM": true,
|
|
8131
|
+
"relativePath": [
|
|
8132
|
+
"lib",
|
|
8133
|
+
"commands",
|
|
8134
|
+
"hardis",
|
|
8135
|
+
"org",
|
|
8136
|
+
"retrieve",
|
|
8137
|
+
"packageconfig.js"
|
|
8138
|
+
],
|
|
8139
|
+
"aliasPermutations": [],
|
|
8140
|
+
"permutations": [
|
|
8141
|
+
"hardis:org:retrieve:packageconfig",
|
|
8142
|
+
"org:hardis:retrieve:packageconfig",
|
|
8143
|
+
"org:retrieve:hardis:packageconfig",
|
|
8144
|
+
"org:retrieve:packageconfig:hardis",
|
|
8145
|
+
"hardis:retrieve:org:packageconfig",
|
|
8146
|
+
"retrieve:hardis:org:packageconfig",
|
|
8147
|
+
"retrieve:org:hardis:packageconfig",
|
|
8148
|
+
"retrieve:org:packageconfig:hardis",
|
|
8149
|
+
"hardis:retrieve:packageconfig:org",
|
|
8150
|
+
"retrieve:hardis:packageconfig:org",
|
|
8151
|
+
"retrieve:packageconfig:hardis:org",
|
|
8152
|
+
"retrieve:packageconfig:org:hardis",
|
|
8153
|
+
"hardis:org:packageconfig:retrieve",
|
|
8154
|
+
"org:hardis:packageconfig:retrieve",
|
|
8155
|
+
"org:packageconfig:hardis:retrieve",
|
|
8156
|
+
"org:packageconfig:retrieve:hardis",
|
|
8157
|
+
"hardis:packageconfig:org:retrieve",
|
|
8158
|
+
"packageconfig:hardis:org:retrieve",
|
|
8159
|
+
"packageconfig:org:hardis:retrieve",
|
|
8160
|
+
"packageconfig:org:retrieve:hardis",
|
|
8161
|
+
"hardis:packageconfig:retrieve:org",
|
|
8162
|
+
"packageconfig:hardis:retrieve:org",
|
|
8163
|
+
"packageconfig:retrieve:hardis:org",
|
|
8164
|
+
"packageconfig:retrieve:org:hardis"
|
|
8165
|
+
]
|
|
8166
|
+
},
|
|
8060
8167
|
"hardis:org:refresh:after-refresh": {
|
|
8061
8168
|
"aliases": [],
|
|
8062
8169
|
"args": {},
|
|
@@ -8296,113 +8403,6 @@
|
|
|
8296
8403
|
"before-refresh:refresh:org:hardis"
|
|
8297
8404
|
]
|
|
8298
8405
|
},
|
|
8299
|
-
"hardis:org:retrieve:packageconfig": {
|
|
8300
|
-
"aliases": [],
|
|
8301
|
-
"args": {},
|
|
8302
|
-
"description": "\n**Retrieves the installed package configuration from a Salesforce org and optionally updates the local project configuration.**\n\nThis command is useful for maintaining an accurate record of installed packages within your Salesforce project, which is crucial for managing dependencies and ensuring consistent deployments across environments.\n\nKey functionalities:\n\n- **Package Listing:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a list of all installed packages.\n- **Configuration Update:** Offers the option to update your local project's configuration with the retrieved list of installed packages. This can be beneficial for automating package installations during environment setup or CI/CD processes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Org Connection:** It establishes a connection to the target Salesforce org using the provided or prompted username.\n- **Metadata Retrieval:** It utilizes `MetadataUtils.listInstalledPackages` to query the Salesforce org and obtain details about the installed packages.\n- **Interactive Prompt:** It uses the `prompts` library to ask the user whether they want to update their local project configuration with the retrieved package list.\n- **Configuration Management:** If the user confirms, it calls `managePackageConfig` to update the project's configuration file (likely `.sfdx-hardis.yml`) with the new package information.\n- **User Feedback:** Provides clear messages to the user about the success of the package retrieval and configuration update.\n</details>\n",
|
|
8303
|
-
"examples": [
|
|
8304
|
-
"$ sf hardis:org:retrieve:packageconfig",
|
|
8305
|
-
"sf hardis:org:retrieve:packageconfig -u myOrg"
|
|
8306
|
-
],
|
|
8307
|
-
"flags": {
|
|
8308
|
-
"json": {
|
|
8309
|
-
"description": "Format output as json.",
|
|
8310
|
-
"helpGroup": "GLOBAL",
|
|
8311
|
-
"name": "json",
|
|
8312
|
-
"allowNo": false,
|
|
8313
|
-
"type": "boolean"
|
|
8314
|
-
},
|
|
8315
|
-
"flags-dir": {
|
|
8316
|
-
"helpGroup": "GLOBAL",
|
|
8317
|
-
"name": "flags-dir",
|
|
8318
|
-
"summary": "Import flag values from a directory.",
|
|
8319
|
-
"hasDynamicHelp": false,
|
|
8320
|
-
"multiple": false,
|
|
8321
|
-
"type": "option"
|
|
8322
|
-
},
|
|
8323
|
-
"debug": {
|
|
8324
|
-
"char": "d",
|
|
8325
|
-
"description": "Activate debug mode (more logs)",
|
|
8326
|
-
"name": "debug",
|
|
8327
|
-
"allowNo": false,
|
|
8328
|
-
"type": "boolean"
|
|
8329
|
-
},
|
|
8330
|
-
"websocket": {
|
|
8331
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8332
|
-
"name": "websocket",
|
|
8333
|
-
"hasDynamicHelp": false,
|
|
8334
|
-
"multiple": false,
|
|
8335
|
-
"type": "option"
|
|
8336
|
-
},
|
|
8337
|
-
"skipauth": {
|
|
8338
|
-
"description": "Skip authentication check when a default username is required",
|
|
8339
|
-
"name": "skipauth",
|
|
8340
|
-
"allowNo": false,
|
|
8341
|
-
"type": "boolean"
|
|
8342
|
-
},
|
|
8343
|
-
"target-org": {
|
|
8344
|
-
"aliases": [
|
|
8345
|
-
"targetusername",
|
|
8346
|
-
"u"
|
|
8347
|
-
],
|
|
8348
|
-
"char": "o",
|
|
8349
|
-
"deprecateAliases": true,
|
|
8350
|
-
"name": "target-org",
|
|
8351
|
-
"noCacheDefault": true,
|
|
8352
|
-
"required": true,
|
|
8353
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8354
|
-
"hasDynamicHelp": true,
|
|
8355
|
-
"multiple": false,
|
|
8356
|
-
"type": "option"
|
|
8357
|
-
}
|
|
8358
|
-
},
|
|
8359
|
-
"hasDynamicHelp": true,
|
|
8360
|
-
"hiddenAliases": [],
|
|
8361
|
-
"id": "hardis:org:retrieve:packageconfig",
|
|
8362
|
-
"pluginAlias": "sfdx-hardis",
|
|
8363
|
-
"pluginName": "sfdx-hardis",
|
|
8364
|
-
"pluginType": "core",
|
|
8365
|
-
"strict": true,
|
|
8366
|
-
"enableJsonFlag": true,
|
|
8367
|
-
"title": "Retrieve package configuration from an org",
|
|
8368
|
-
"requiresProject": false,
|
|
8369
|
-
"isESM": true,
|
|
8370
|
-
"relativePath": [
|
|
8371
|
-
"lib",
|
|
8372
|
-
"commands",
|
|
8373
|
-
"hardis",
|
|
8374
|
-
"org",
|
|
8375
|
-
"retrieve",
|
|
8376
|
-
"packageconfig.js"
|
|
8377
|
-
],
|
|
8378
|
-
"aliasPermutations": [],
|
|
8379
|
-
"permutations": [
|
|
8380
|
-
"hardis:org:retrieve:packageconfig",
|
|
8381
|
-
"org:hardis:retrieve:packageconfig",
|
|
8382
|
-
"org:retrieve:hardis:packageconfig",
|
|
8383
|
-
"org:retrieve:packageconfig:hardis",
|
|
8384
|
-
"hardis:retrieve:org:packageconfig",
|
|
8385
|
-
"retrieve:hardis:org:packageconfig",
|
|
8386
|
-
"retrieve:org:hardis:packageconfig",
|
|
8387
|
-
"retrieve:org:packageconfig:hardis",
|
|
8388
|
-
"hardis:retrieve:packageconfig:org",
|
|
8389
|
-
"retrieve:hardis:packageconfig:org",
|
|
8390
|
-
"retrieve:packageconfig:hardis:org",
|
|
8391
|
-
"retrieve:packageconfig:org:hardis",
|
|
8392
|
-
"hardis:org:packageconfig:retrieve",
|
|
8393
|
-
"org:hardis:packageconfig:retrieve",
|
|
8394
|
-
"org:packageconfig:hardis:retrieve",
|
|
8395
|
-
"org:packageconfig:retrieve:hardis",
|
|
8396
|
-
"hardis:packageconfig:org:retrieve",
|
|
8397
|
-
"packageconfig:hardis:org:retrieve",
|
|
8398
|
-
"packageconfig:org:hardis:retrieve",
|
|
8399
|
-
"packageconfig:org:retrieve:hardis",
|
|
8400
|
-
"hardis:packageconfig:retrieve:org",
|
|
8401
|
-
"packageconfig:hardis:retrieve:org",
|
|
8402
|
-
"packageconfig:retrieve:hardis:org",
|
|
8403
|
-
"packageconfig:retrieve:org:hardis"
|
|
8404
|
-
]
|
|
8405
|
-
},
|
|
8406
8406
|
"hardis:org:test:apex": {
|
|
8407
8407
|
"aliases": [],
|
|
8408
8408
|
"args": {},
|
|
@@ -15370,5 +15370,5 @@
|
|
|
15370
15370
|
]
|
|
15371
15371
|
}
|
|
15372
15372
|
},
|
|
15373
|
-
"version": "6.9.1-
|
|
15373
|
+
"version": "6.9.1-alpha202510262222.0"
|
|
15374
15374
|
}
|