sfdx-hardis 6.4.3 → 6.5.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/CHANGELOG.md +13 -3
- package/lib/commands/hardis/org/diagnose/unsecure-connected-apps.js +32 -3
- package/lib/commands/hardis/org/diagnose/unsecure-connected-apps.js.map +1 -1
- package/lib/commands/hardis/org/files/export.js +56 -4
- package/lib/commands/hardis/org/files/export.js.map +1 -1
- package/lib/common/utils/filesUtils.d.ts +34 -14
- package/lib/common/utils/filesUtils.js +260 -70
- package/lib/common/utils/filesUtils.js.map +1 -1
- package/lib/common/utils/index.js +14 -4
- package/lib/common/utils/index.js.map +1 -1
- package/lib/common/utils/limitUtils.d.ts +42 -0
- package/lib/common/utils/limitUtils.js +163 -0
- package/lib/common/utils/limitUtils.js.map +1 -0
- package/oclif.manifest.json +1016 -1009
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -5538,12 +5538,15 @@
|
|
|
5538
5538
|
"import:data:org:hardis"
|
|
5539
5539
|
]
|
|
5540
5540
|
},
|
|
5541
|
-
"hardis:org:
|
|
5541
|
+
"hardis:org:diagnose:audittrail": {
|
|
5542
5542
|
"aliases": [],
|
|
5543
5543
|
"args": {},
|
|
5544
|
-
"description": "
|
|
5544
|
+
"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",
|
|
5545
5545
|
"examples": [
|
|
5546
|
-
"$ sf hardis:org:
|
|
5546
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5547
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5548
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5549
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5547
5550
|
],
|
|
5548
5551
|
"flags": {
|
|
5549
5552
|
"json": {
|
|
@@ -5561,37 +5564,26 @@
|
|
|
5561
5564
|
"multiple": false,
|
|
5562
5565
|
"type": "option"
|
|
5563
5566
|
},
|
|
5564
|
-
"
|
|
5565
|
-
"char": "
|
|
5566
|
-
"description": "
|
|
5567
|
-
"name": "
|
|
5568
|
-
"hasDynamicHelp": false,
|
|
5569
|
-
"multiple": false,
|
|
5570
|
-
"type": "option"
|
|
5571
|
-
},
|
|
5572
|
-
"chunksize": {
|
|
5573
|
-
"char": "c",
|
|
5574
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
5575
|
-
"name": "chunksize",
|
|
5576
|
-
"default": 1000,
|
|
5567
|
+
"excludeusers": {
|
|
5568
|
+
"char": "e",
|
|
5569
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5570
|
+
"name": "excludeusers",
|
|
5577
5571
|
"hasDynamicHelp": false,
|
|
5578
5572
|
"multiple": false,
|
|
5579
5573
|
"type": "option"
|
|
5580
5574
|
},
|
|
5581
|
-
"
|
|
5575
|
+
"lastndays": {
|
|
5582
5576
|
"char": "t",
|
|
5583
|
-
"description": "
|
|
5584
|
-
"name": "
|
|
5585
|
-
"default": 300000,
|
|
5577
|
+
"description": "Number of days to extract from today (included)",
|
|
5578
|
+
"name": "lastndays",
|
|
5586
5579
|
"hasDynamicHelp": false,
|
|
5587
5580
|
"multiple": false,
|
|
5588
5581
|
"type": "option"
|
|
5589
5582
|
},
|
|
5590
|
-
"
|
|
5591
|
-
"char": "
|
|
5592
|
-
"description": "
|
|
5593
|
-
"name": "
|
|
5594
|
-
"default": 0,
|
|
5583
|
+
"outputfile": {
|
|
5584
|
+
"char": "f",
|
|
5585
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5586
|
+
"name": "outputfile",
|
|
5595
5587
|
"hasDynamicHelp": false,
|
|
5596
5588
|
"multiple": false,
|
|
5597
5589
|
"type": "option"
|
|
@@ -5634,13 +5626,13 @@
|
|
|
5634
5626
|
},
|
|
5635
5627
|
"hasDynamicHelp": true,
|
|
5636
5628
|
"hiddenAliases": [],
|
|
5637
|
-
"id": "hardis:org:
|
|
5629
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5638
5630
|
"pluginAlias": "sfdx-hardis",
|
|
5639
5631
|
"pluginName": "sfdx-hardis",
|
|
5640
5632
|
"pluginType": "core",
|
|
5641
5633
|
"strict": true,
|
|
5642
5634
|
"enableJsonFlag": true,
|
|
5643
|
-
"title": "
|
|
5635
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5644
5636
|
"requiresProject": false,
|
|
5645
5637
|
"isESM": true,
|
|
5646
5638
|
"relativePath": [
|
|
@@ -5648,43 +5640,43 @@
|
|
|
5648
5640
|
"commands",
|
|
5649
5641
|
"hardis",
|
|
5650
5642
|
"org",
|
|
5651
|
-
"
|
|
5652
|
-
"
|
|
5643
|
+
"diagnose",
|
|
5644
|
+
"audittrail.js"
|
|
5653
5645
|
],
|
|
5654
5646
|
"aliasPermutations": [],
|
|
5655
5647
|
"permutations": [
|
|
5656
|
-
"hardis:org:
|
|
5657
|
-
"org:hardis:
|
|
5658
|
-
"org:
|
|
5659
|
-
"org:
|
|
5660
|
-
"hardis:
|
|
5661
|
-
"
|
|
5662
|
-
"
|
|
5663
|
-
"
|
|
5664
|
-
"hardis:
|
|
5665
|
-
"
|
|
5666
|
-
"
|
|
5667
|
-
"
|
|
5668
|
-
"hardis:org:
|
|
5669
|
-
"org:hardis:
|
|
5670
|
-
"org:
|
|
5671
|
-
"org:
|
|
5672
|
-
"hardis:
|
|
5673
|
-
"
|
|
5674
|
-
"
|
|
5675
|
-
"
|
|
5676
|
-
"hardis:
|
|
5677
|
-
"
|
|
5678
|
-
"
|
|
5679
|
-
"
|
|
5648
|
+
"hardis:org:diagnose:audittrail",
|
|
5649
|
+
"org:hardis:diagnose:audittrail",
|
|
5650
|
+
"org:diagnose:hardis:audittrail",
|
|
5651
|
+
"org:diagnose:audittrail:hardis",
|
|
5652
|
+
"hardis:diagnose:org:audittrail",
|
|
5653
|
+
"diagnose:hardis:org:audittrail",
|
|
5654
|
+
"diagnose:org:hardis:audittrail",
|
|
5655
|
+
"diagnose:org:audittrail:hardis",
|
|
5656
|
+
"hardis:diagnose:audittrail:org",
|
|
5657
|
+
"diagnose:hardis:audittrail:org",
|
|
5658
|
+
"diagnose:audittrail:hardis:org",
|
|
5659
|
+
"diagnose:audittrail:org:hardis",
|
|
5660
|
+
"hardis:org:audittrail:diagnose",
|
|
5661
|
+
"org:hardis:audittrail:diagnose",
|
|
5662
|
+
"org:audittrail:hardis:diagnose",
|
|
5663
|
+
"org:audittrail:diagnose:hardis",
|
|
5664
|
+
"hardis:audittrail:org:diagnose",
|
|
5665
|
+
"audittrail:hardis:org:diagnose",
|
|
5666
|
+
"audittrail:org:hardis:diagnose",
|
|
5667
|
+
"audittrail:org:diagnose:hardis",
|
|
5668
|
+
"hardis:audittrail:diagnose:org",
|
|
5669
|
+
"audittrail:hardis:diagnose:org",
|
|
5670
|
+
"audittrail:diagnose:hardis:org",
|
|
5671
|
+
"audittrail:diagnose:org:hardis"
|
|
5680
5672
|
]
|
|
5681
5673
|
},
|
|
5682
|
-
"hardis:org:
|
|
5674
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5683
5675
|
"aliases": [],
|
|
5684
5676
|
"args": {},
|
|
5685
|
-
"description": "\
|
|
5677
|
+
"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",
|
|
5686
5678
|
"examples": [
|
|
5687
|
-
"$ sf hardis:org:
|
|
5679
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5688
5680
|
],
|
|
5689
5681
|
"flags": {
|
|
5690
5682
|
"json": {
|
|
@@ -5702,21 +5694,6 @@
|
|
|
5702
5694
|
"multiple": false,
|
|
5703
5695
|
"type": "option"
|
|
5704
5696
|
},
|
|
5705
|
-
"path": {
|
|
5706
|
-
"char": "p",
|
|
5707
|
-
"description": "Path to the file export project",
|
|
5708
|
-
"name": "path",
|
|
5709
|
-
"hasDynamicHelp": false,
|
|
5710
|
-
"multiple": false,
|
|
5711
|
-
"type": "option"
|
|
5712
|
-
},
|
|
5713
|
-
"overwrite": {
|
|
5714
|
-
"char": "f",
|
|
5715
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
5716
|
-
"name": "overwrite",
|
|
5717
|
-
"allowNo": false,
|
|
5718
|
-
"type": "boolean"
|
|
5719
|
-
},
|
|
5720
5697
|
"debug": {
|
|
5721
5698
|
"char": "d",
|
|
5722
5699
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5755,13 +5732,13 @@
|
|
|
5755
5732
|
},
|
|
5756
5733
|
"hasDynamicHelp": true,
|
|
5757
5734
|
"hiddenAliases": [],
|
|
5758
|
-
"id": "hardis:org:
|
|
5735
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
5759
5736
|
"pluginAlias": "sfdx-hardis",
|
|
5760
5737
|
"pluginName": "sfdx-hardis",
|
|
5761
5738
|
"pluginType": "core",
|
|
5762
5739
|
"strict": true,
|
|
5763
5740
|
"enableJsonFlag": true,
|
|
5764
|
-
"title": "
|
|
5741
|
+
"title": "Get Instance Upgrade date",
|
|
5765
5742
|
"requiresProject": false,
|
|
5766
5743
|
"isESM": true,
|
|
5767
5744
|
"relativePath": [
|
|
@@ -5769,44 +5746,46 @@
|
|
|
5769
5746
|
"commands",
|
|
5770
5747
|
"hardis",
|
|
5771
5748
|
"org",
|
|
5772
|
-
"
|
|
5773
|
-
"
|
|
5749
|
+
"diagnose",
|
|
5750
|
+
"instanceupgrade.js"
|
|
5774
5751
|
],
|
|
5775
5752
|
"aliasPermutations": [],
|
|
5776
5753
|
"permutations": [
|
|
5777
|
-
"hardis:org:
|
|
5778
|
-
"org:hardis:
|
|
5779
|
-
"org:
|
|
5780
|
-
"org:
|
|
5781
|
-
"hardis:
|
|
5782
|
-
"
|
|
5783
|
-
"
|
|
5784
|
-
"
|
|
5785
|
-
"hardis:
|
|
5786
|
-
"
|
|
5787
|
-
"
|
|
5788
|
-
"
|
|
5789
|
-
"hardis:org:
|
|
5790
|
-
"org:hardis:
|
|
5791
|
-
"org:
|
|
5792
|
-
"org:
|
|
5793
|
-
"hardis:
|
|
5794
|
-
"
|
|
5795
|
-
"
|
|
5796
|
-
"
|
|
5797
|
-
"hardis:
|
|
5798
|
-
"
|
|
5799
|
-
"
|
|
5800
|
-
"
|
|
5754
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
5755
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
5756
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
5757
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
5758
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
5759
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
5760
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
5761
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
5762
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
5763
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
5764
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
5765
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
5766
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
5767
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
5768
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
5769
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
5770
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
5771
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
5772
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
5773
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
5774
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
5775
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
5776
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
5777
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
5801
5778
|
]
|
|
5802
5779
|
},
|
|
5803
|
-
"hardis:org:
|
|
5780
|
+
"hardis:org:diagnose:legacyapi": {
|
|
5804
5781
|
"aliases": [],
|
|
5805
5782
|
"args": {},
|
|
5806
|
-
"description": "
|
|
5783
|
+
"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",
|
|
5807
5784
|
"examples": [
|
|
5808
|
-
"$ sf hardis:org:
|
|
5809
|
-
"$ sf hardis:org:
|
|
5785
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
5786
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
5787
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
5788
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5810
5789
|
],
|
|
5811
5790
|
"flags": {
|
|
5812
5791
|
"json": {
|
|
@@ -5824,10 +5803,28 @@
|
|
|
5824
5803
|
"multiple": false,
|
|
5825
5804
|
"type": "option"
|
|
5826
5805
|
},
|
|
5827
|
-
"
|
|
5806
|
+
"eventtype": {
|
|
5807
|
+
"char": "e",
|
|
5808
|
+
"description": "Type of EventLogFile event to analyze",
|
|
5809
|
+
"name": "eventtype",
|
|
5810
|
+
"default": "ApiTotalUsage",
|
|
5811
|
+
"hasDynamicHelp": false,
|
|
5812
|
+
"multiple": false,
|
|
5813
|
+
"type": "option"
|
|
5814
|
+
},
|
|
5815
|
+
"limit": {
|
|
5828
5816
|
"char": "l",
|
|
5829
|
-
"description": "
|
|
5830
|
-
"name": "
|
|
5817
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
5818
|
+
"name": "limit",
|
|
5819
|
+
"default": 999,
|
|
5820
|
+
"hasDynamicHelp": false,
|
|
5821
|
+
"multiple": false,
|
|
5822
|
+
"type": "option"
|
|
5823
|
+
},
|
|
5824
|
+
"outputfile": {
|
|
5825
|
+
"char": "f",
|
|
5826
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5827
|
+
"name": "outputfile",
|
|
5831
5828
|
"hasDynamicHelp": false,
|
|
5832
5829
|
"multiple": false,
|
|
5833
5830
|
"type": "option"
|
|
@@ -5870,63 +5867,61 @@
|
|
|
5870
5867
|
},
|
|
5871
5868
|
"hasDynamicHelp": true,
|
|
5872
5869
|
"hiddenAliases": [],
|
|
5873
|
-
"id": "hardis:org:
|
|
5870
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
5874
5871
|
"pluginAlias": "sfdx-hardis",
|
|
5875
5872
|
"pluginName": "sfdx-hardis",
|
|
5876
5873
|
"pluginType": "core",
|
|
5877
5874
|
"strict": true,
|
|
5878
5875
|
"enableJsonFlag": true,
|
|
5879
|
-
"title": "
|
|
5880
|
-
"requiresProject":
|
|
5876
|
+
"title": "Check for legacy API use",
|
|
5877
|
+
"requiresProject": false,
|
|
5881
5878
|
"isESM": true,
|
|
5882
5879
|
"relativePath": [
|
|
5883
5880
|
"lib",
|
|
5884
5881
|
"commands",
|
|
5885
5882
|
"hardis",
|
|
5886
5883
|
"org",
|
|
5887
|
-
"
|
|
5888
|
-
"
|
|
5884
|
+
"diagnose",
|
|
5885
|
+
"legacyapi.js"
|
|
5889
5886
|
],
|
|
5890
5887
|
"aliasPermutations": [],
|
|
5891
5888
|
"permutations": [
|
|
5892
|
-
"hardis:org:
|
|
5893
|
-
"org:hardis:
|
|
5894
|
-
"org:
|
|
5895
|
-
"org:
|
|
5896
|
-
"hardis:
|
|
5897
|
-
"
|
|
5898
|
-
"
|
|
5899
|
-
"
|
|
5900
|
-
"hardis:
|
|
5901
|
-
"
|
|
5902
|
-
"
|
|
5903
|
-
"
|
|
5904
|
-
"hardis:org:
|
|
5905
|
-
"org:hardis:
|
|
5906
|
-
"org:
|
|
5907
|
-
"org:
|
|
5908
|
-
"hardis:
|
|
5909
|
-
"
|
|
5910
|
-
"
|
|
5911
|
-
"
|
|
5912
|
-
"hardis:
|
|
5913
|
-
"
|
|
5914
|
-
"
|
|
5915
|
-
"
|
|
5916
|
-
]
|
|
5917
|
-
},
|
|
5918
|
-
"hardis:org:
|
|
5919
|
-
"aliases": [],
|
|
5920
|
-
"args": {},
|
|
5921
|
-
"description": "\n
|
|
5922
|
-
"examples": [
|
|
5923
|
-
"$ sf hardis:org:
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
"json": {
|
|
5929
|
-
"description": "Format output as json.",
|
|
5889
|
+
"hardis:org:diagnose:legacyapi",
|
|
5890
|
+
"org:hardis:diagnose:legacyapi",
|
|
5891
|
+
"org:diagnose:hardis:legacyapi",
|
|
5892
|
+
"org:diagnose:legacyapi:hardis",
|
|
5893
|
+
"hardis:diagnose:org:legacyapi",
|
|
5894
|
+
"diagnose:hardis:org:legacyapi",
|
|
5895
|
+
"diagnose:org:hardis:legacyapi",
|
|
5896
|
+
"diagnose:org:legacyapi:hardis",
|
|
5897
|
+
"hardis:diagnose:legacyapi:org",
|
|
5898
|
+
"diagnose:hardis:legacyapi:org",
|
|
5899
|
+
"diagnose:legacyapi:hardis:org",
|
|
5900
|
+
"diagnose:legacyapi:org:hardis",
|
|
5901
|
+
"hardis:org:legacyapi:diagnose",
|
|
5902
|
+
"org:hardis:legacyapi:diagnose",
|
|
5903
|
+
"org:legacyapi:hardis:diagnose",
|
|
5904
|
+
"org:legacyapi:diagnose:hardis",
|
|
5905
|
+
"hardis:legacyapi:org:diagnose",
|
|
5906
|
+
"legacyapi:hardis:org:diagnose",
|
|
5907
|
+
"legacyapi:org:hardis:diagnose",
|
|
5908
|
+
"legacyapi:org:diagnose:hardis",
|
|
5909
|
+
"hardis:legacyapi:diagnose:org",
|
|
5910
|
+
"legacyapi:hardis:diagnose:org",
|
|
5911
|
+
"legacyapi:diagnose:hardis:org",
|
|
5912
|
+
"legacyapi:diagnose:org:hardis"
|
|
5913
|
+
]
|
|
5914
|
+
},
|
|
5915
|
+
"hardis:org:diagnose:licenses": {
|
|
5916
|
+
"aliases": [],
|
|
5917
|
+
"args": {},
|
|
5918
|
+
"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",
|
|
5919
|
+
"examples": [
|
|
5920
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
5921
|
+
],
|
|
5922
|
+
"flags": {
|
|
5923
|
+
"json": {
|
|
5924
|
+
"description": "Format output as json.",
|
|
5930
5925
|
"helpGroup": "GLOBAL",
|
|
5931
5926
|
"name": "json",
|
|
5932
5927
|
"allowNo": false,
|
|
@@ -5941,12 +5936,20 @@
|
|
|
5941
5936
|
"type": "option"
|
|
5942
5937
|
},
|
|
5943
5938
|
"outputfile": {
|
|
5944
|
-
"
|
|
5939
|
+
"char": "f",
|
|
5940
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5945
5941
|
"name": "outputfile",
|
|
5946
5942
|
"hasDynamicHelp": false,
|
|
5947
5943
|
"multiple": false,
|
|
5948
5944
|
"type": "option"
|
|
5949
5945
|
},
|
|
5946
|
+
"usedonly": {
|
|
5947
|
+
"char": "u",
|
|
5948
|
+
"description": "Filter to have only used licenses",
|
|
5949
|
+
"name": "usedonly",
|
|
5950
|
+
"allowNo": false,
|
|
5951
|
+
"type": "boolean"
|
|
5952
|
+
},
|
|
5950
5953
|
"debug": {
|
|
5951
5954
|
"char": "d",
|
|
5952
5955
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5954,13 +5957,6 @@
|
|
|
5954
5957
|
"allowNo": false,
|
|
5955
5958
|
"type": "boolean"
|
|
5956
5959
|
},
|
|
5957
|
-
"no-prompt": {
|
|
5958
|
-
"char": "n",
|
|
5959
|
-
"description": "Do not prompt for org username, use the default one",
|
|
5960
|
-
"name": "no-prompt",
|
|
5961
|
-
"allowNo": false,
|
|
5962
|
-
"type": "boolean"
|
|
5963
|
-
},
|
|
5964
5960
|
"websocket": {
|
|
5965
5961
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5966
5962
|
"name": "websocket",
|
|
@@ -5992,13 +5988,13 @@
|
|
|
5992
5988
|
},
|
|
5993
5989
|
"hasDynamicHelp": true,
|
|
5994
5990
|
"hiddenAliases": [],
|
|
5995
|
-
"id": "hardis:org:
|
|
5991
|
+
"id": "hardis:org:diagnose:licenses",
|
|
5996
5992
|
"pluginAlias": "sfdx-hardis",
|
|
5997
5993
|
"pluginName": "sfdx-hardis",
|
|
5998
5994
|
"pluginType": "core",
|
|
5999
5995
|
"strict": true,
|
|
6000
5996
|
"enableJsonFlag": true,
|
|
6001
|
-
"title": "
|
|
5997
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6002
5998
|
"requiresProject": false,
|
|
6003
5999
|
"isESM": true,
|
|
6004
6000
|
"relativePath": [
|
|
@@ -6006,46 +6002,43 @@
|
|
|
6006
6002
|
"commands",
|
|
6007
6003
|
"hardis",
|
|
6008
6004
|
"org",
|
|
6009
|
-
"
|
|
6010
|
-
"
|
|
6005
|
+
"diagnose",
|
|
6006
|
+
"licenses.js"
|
|
6011
6007
|
],
|
|
6012
6008
|
"aliasPermutations": [],
|
|
6013
6009
|
"permutations": [
|
|
6014
|
-
"hardis:org:
|
|
6015
|
-
"org:hardis:
|
|
6016
|
-
"org:
|
|
6017
|
-
"org:
|
|
6018
|
-
"hardis:
|
|
6019
|
-
"
|
|
6020
|
-
"
|
|
6021
|
-
"
|
|
6022
|
-
"hardis:
|
|
6023
|
-
"
|
|
6024
|
-
"
|
|
6025
|
-
"
|
|
6026
|
-
"hardis:org:
|
|
6027
|
-
"org:hardis:
|
|
6028
|
-
"org:
|
|
6029
|
-
"org:
|
|
6030
|
-
"hardis:
|
|
6031
|
-
"
|
|
6032
|
-
"
|
|
6033
|
-
"
|
|
6034
|
-
"hardis:
|
|
6035
|
-
"
|
|
6036
|
-
"
|
|
6037
|
-
"
|
|
6010
|
+
"hardis:org:diagnose:licenses",
|
|
6011
|
+
"org:hardis:diagnose:licenses",
|
|
6012
|
+
"org:diagnose:hardis:licenses",
|
|
6013
|
+
"org:diagnose:licenses:hardis",
|
|
6014
|
+
"hardis:diagnose:org:licenses",
|
|
6015
|
+
"diagnose:hardis:org:licenses",
|
|
6016
|
+
"diagnose:org:hardis:licenses",
|
|
6017
|
+
"diagnose:org:licenses:hardis",
|
|
6018
|
+
"hardis:diagnose:licenses:org",
|
|
6019
|
+
"diagnose:hardis:licenses:org",
|
|
6020
|
+
"diagnose:licenses:hardis:org",
|
|
6021
|
+
"diagnose:licenses:org:hardis",
|
|
6022
|
+
"hardis:org:licenses:diagnose",
|
|
6023
|
+
"org:hardis:licenses:diagnose",
|
|
6024
|
+
"org:licenses:hardis:diagnose",
|
|
6025
|
+
"org:licenses:diagnose:hardis",
|
|
6026
|
+
"hardis:licenses:org:diagnose",
|
|
6027
|
+
"licenses:hardis:org:diagnose",
|
|
6028
|
+
"licenses:org:hardis:diagnose",
|
|
6029
|
+
"licenses:org:diagnose:hardis",
|
|
6030
|
+
"hardis:licenses:diagnose:org",
|
|
6031
|
+
"licenses:hardis:diagnose:org",
|
|
6032
|
+
"licenses:diagnose:hardis:org",
|
|
6033
|
+
"licenses:diagnose:org:hardis"
|
|
6038
6034
|
]
|
|
6039
6035
|
},
|
|
6040
|
-
"hardis:org:diagnose:
|
|
6036
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6041
6037
|
"aliases": [],
|
|
6042
6038
|
"args": {},
|
|
6043
|
-
"description": "Export
|
|
6039
|
+
"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",
|
|
6044
6040
|
"examples": [
|
|
6045
|
-
"$ sf hardis:org:diagnose:
|
|
6046
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
6047
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
6048
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
6041
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6049
6042
|
],
|
|
6050
6043
|
"flags": {
|
|
6051
6044
|
"json": {
|
|
@@ -6063,22 +6056,6 @@
|
|
|
6063
6056
|
"multiple": false,
|
|
6064
6057
|
"type": "option"
|
|
6065
6058
|
},
|
|
6066
|
-
"excludeusers": {
|
|
6067
|
-
"char": "e",
|
|
6068
|
-
"description": "Comma-separated list of usernames to exclude",
|
|
6069
|
-
"name": "excludeusers",
|
|
6070
|
-
"hasDynamicHelp": false,
|
|
6071
|
-
"multiple": false,
|
|
6072
|
-
"type": "option"
|
|
6073
|
-
},
|
|
6074
|
-
"lastndays": {
|
|
6075
|
-
"char": "t",
|
|
6076
|
-
"description": "Number of days to extract from today (included)",
|
|
6077
|
-
"name": "lastndays",
|
|
6078
|
-
"hasDynamicHelp": false,
|
|
6079
|
-
"multiple": false,
|
|
6080
|
-
"type": "option"
|
|
6081
|
-
},
|
|
6082
6059
|
"outputfile": {
|
|
6083
6060
|
"char": "f",
|
|
6084
6061
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6125,13 +6102,13 @@
|
|
|
6125
6102
|
},
|
|
6126
6103
|
"hasDynamicHelp": true,
|
|
6127
6104
|
"hiddenAliases": [],
|
|
6128
|
-
"id": "hardis:org:diagnose:
|
|
6105
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6129
6106
|
"pluginAlias": "sfdx-hardis",
|
|
6130
6107
|
"pluginName": "sfdx-hardis",
|
|
6131
6108
|
"pluginType": "core",
|
|
6132
6109
|
"strict": true,
|
|
6133
6110
|
"enableJsonFlag": true,
|
|
6134
|
-
"title": "
|
|
6111
|
+
"title": "Check Release Updates of an org",
|
|
6135
6112
|
"requiresProject": false,
|
|
6136
6113
|
"isESM": true,
|
|
6137
6114
|
"relativePath": [
|
|
@@ -6140,42 +6117,42 @@
|
|
|
6140
6117
|
"hardis",
|
|
6141
6118
|
"org",
|
|
6142
6119
|
"diagnose",
|
|
6143
|
-
"
|
|
6120
|
+
"releaseupdates.js"
|
|
6144
6121
|
],
|
|
6145
6122
|
"aliasPermutations": [],
|
|
6146
6123
|
"permutations": [
|
|
6147
|
-
"hardis:org:diagnose:
|
|
6148
|
-
"org:hardis:diagnose:
|
|
6149
|
-
"org:diagnose:hardis:
|
|
6150
|
-
"org:diagnose:
|
|
6151
|
-
"hardis:diagnose:org:
|
|
6152
|
-
"diagnose:hardis:org:
|
|
6153
|
-
"diagnose:org:hardis:
|
|
6154
|
-
"diagnose:org:
|
|
6155
|
-
"hardis:diagnose:
|
|
6156
|
-
"diagnose:hardis:
|
|
6157
|
-
"diagnose:
|
|
6158
|
-
"diagnose:
|
|
6159
|
-
"hardis:org:
|
|
6160
|
-
"org:hardis:
|
|
6161
|
-
"org:
|
|
6162
|
-
"org:
|
|
6163
|
-
"hardis:
|
|
6164
|
-
"
|
|
6165
|
-
"
|
|
6166
|
-
"
|
|
6167
|
-
"hardis:
|
|
6168
|
-
"
|
|
6169
|
-
"
|
|
6170
|
-
"
|
|
6124
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6125
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6126
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6127
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6128
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6129
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6130
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6131
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6132
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6133
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6134
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6135
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6136
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6137
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6138
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6139
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6140
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6141
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6142
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6143
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6144
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6145
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6146
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6147
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6171
6148
|
]
|
|
6172
6149
|
},
|
|
6173
|
-
"hardis:org:diagnose:
|
|
6150
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
6174
6151
|
"aliases": [],
|
|
6175
6152
|
"args": {},
|
|
6176
|
-
"description": "\n## Command Behavior\n\n**
|
|
6153
|
+
"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",
|
|
6177
6154
|
"examples": [
|
|
6178
|
-
"$ sf hardis:org:diagnose:
|
|
6155
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
6179
6156
|
],
|
|
6180
6157
|
"flags": {
|
|
6181
6158
|
"json": {
|
|
@@ -6193,6 +6170,14 @@
|
|
|
6193
6170
|
"multiple": false,
|
|
6194
6171
|
"type": "option"
|
|
6195
6172
|
},
|
|
6173
|
+
"outputfile": {
|
|
6174
|
+
"char": "f",
|
|
6175
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6176
|
+
"name": "outputfile",
|
|
6177
|
+
"hasDynamicHelp": false,
|
|
6178
|
+
"multiple": false,
|
|
6179
|
+
"type": "option"
|
|
6180
|
+
},
|
|
6196
6181
|
"debug": {
|
|
6197
6182
|
"char": "d",
|
|
6198
6183
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6231,13 +6216,13 @@
|
|
|
6231
6216
|
},
|
|
6232
6217
|
"hasDynamicHelp": true,
|
|
6233
6218
|
"hiddenAliases": [],
|
|
6234
|
-
"id": "hardis:org:diagnose:
|
|
6219
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
6235
6220
|
"pluginAlias": "sfdx-hardis",
|
|
6236
6221
|
"pluginName": "sfdx-hardis",
|
|
6237
6222
|
"pluginType": "core",
|
|
6238
6223
|
"strict": true,
|
|
6239
6224
|
"enableJsonFlag": true,
|
|
6240
|
-
"title": "
|
|
6225
|
+
"title": "Detect Unsecured Connected Apps",
|
|
6241
6226
|
"requiresProject": false,
|
|
6242
6227
|
"isESM": true,
|
|
6243
6228
|
"relativePath": [
|
|
@@ -6246,45 +6231,43 @@
|
|
|
6246
6231
|
"hardis",
|
|
6247
6232
|
"org",
|
|
6248
6233
|
"diagnose",
|
|
6249
|
-
"
|
|
6234
|
+
"unsecure-connected-apps.js"
|
|
6250
6235
|
],
|
|
6251
6236
|
"aliasPermutations": [],
|
|
6252
6237
|
"permutations": [
|
|
6253
|
-
"hardis:org:diagnose:
|
|
6254
|
-
"org:hardis:diagnose:
|
|
6255
|
-
"org:diagnose:hardis:
|
|
6256
|
-
"org:diagnose:
|
|
6257
|
-
"hardis:diagnose:org:
|
|
6258
|
-
"diagnose:hardis:org:
|
|
6259
|
-
"diagnose:org:hardis:
|
|
6260
|
-
"diagnose:org:
|
|
6261
|
-
"hardis:diagnose:
|
|
6262
|
-
"diagnose:hardis:
|
|
6263
|
-
"diagnose:
|
|
6264
|
-
"diagnose:
|
|
6265
|
-
"hardis:org:
|
|
6266
|
-
"org:hardis:
|
|
6267
|
-
"org:
|
|
6268
|
-
"org:
|
|
6269
|
-
"hardis:
|
|
6270
|
-
"
|
|
6271
|
-
"
|
|
6272
|
-
"
|
|
6273
|
-
"hardis:
|
|
6274
|
-
"
|
|
6275
|
-
"
|
|
6276
|
-
"
|
|
6238
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
6239
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
6240
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
6241
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
6242
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
6243
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
6244
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
6245
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
6246
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
6247
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
6248
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
6249
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
6250
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
6251
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
6252
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
6253
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
6254
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
6255
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
6256
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
6257
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
6258
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
6259
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
6260
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
6261
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
6277
6262
|
]
|
|
6278
6263
|
},
|
|
6279
|
-
"hardis:org:diagnose:
|
|
6264
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6280
6265
|
"aliases": [],
|
|
6281
6266
|
"args": {},
|
|
6282
|
-
"description": "
|
|
6267
|
+
"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",
|
|
6283
6268
|
"examples": [
|
|
6284
|
-
"$ sf hardis:org:diagnose:
|
|
6285
|
-
"$ sf hardis:org:diagnose:
|
|
6286
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6287
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6269
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6270
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6288
6271
|
],
|
|
6289
6272
|
"flags": {
|
|
6290
6273
|
"json": {
|
|
@@ -6302,24 +6285,6 @@
|
|
|
6302
6285
|
"multiple": false,
|
|
6303
6286
|
"type": "option"
|
|
6304
6287
|
},
|
|
6305
|
-
"eventtype": {
|
|
6306
|
-
"char": "e",
|
|
6307
|
-
"description": "Type of EventLogFile event to analyze",
|
|
6308
|
-
"name": "eventtype",
|
|
6309
|
-
"default": "ApiTotalUsage",
|
|
6310
|
-
"hasDynamicHelp": false,
|
|
6311
|
-
"multiple": false,
|
|
6312
|
-
"type": "option"
|
|
6313
|
-
},
|
|
6314
|
-
"limit": {
|
|
6315
|
-
"char": "l",
|
|
6316
|
-
"description": "Number of latest EventLogFile events to analyze",
|
|
6317
|
-
"name": "limit",
|
|
6318
|
-
"default": 999,
|
|
6319
|
-
"hasDynamicHelp": false,
|
|
6320
|
-
"multiple": false,
|
|
6321
|
-
"type": "option"
|
|
6322
|
-
},
|
|
6323
6288
|
"outputfile": {
|
|
6324
6289
|
"char": "f",
|
|
6325
6290
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6328,6 +6293,14 @@
|
|
|
6328
6293
|
"multiple": false,
|
|
6329
6294
|
"type": "option"
|
|
6330
6295
|
},
|
|
6296
|
+
"days": {
|
|
6297
|
+
"char": "t",
|
|
6298
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6299
|
+
"name": "days",
|
|
6300
|
+
"hasDynamicHelp": false,
|
|
6301
|
+
"multiple": false,
|
|
6302
|
+
"type": "option"
|
|
6303
|
+
},
|
|
6331
6304
|
"debug": {
|
|
6332
6305
|
"char": "d",
|
|
6333
6306
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6366,13 +6339,13 @@
|
|
|
6366
6339
|
},
|
|
6367
6340
|
"hasDynamicHelp": true,
|
|
6368
6341
|
"hiddenAliases": [],
|
|
6369
|
-
"id": "hardis:org:diagnose:
|
|
6342
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6370
6343
|
"pluginAlias": "sfdx-hardis",
|
|
6371
6344
|
"pluginName": "sfdx-hardis",
|
|
6372
6345
|
"pluginType": "core",
|
|
6373
6346
|
"strict": true,
|
|
6374
6347
|
"enableJsonFlag": true,
|
|
6375
|
-
"title": "
|
|
6348
|
+
"title": "Detect unused Apex classes in an org",
|
|
6376
6349
|
"requiresProject": false,
|
|
6377
6350
|
"isESM": true,
|
|
6378
6351
|
"relativePath": [
|
|
@@ -6381,42 +6354,42 @@
|
|
|
6381
6354
|
"hardis",
|
|
6382
6355
|
"org",
|
|
6383
6356
|
"diagnose",
|
|
6384
|
-
"
|
|
6357
|
+
"unused-apex-classes.js"
|
|
6385
6358
|
],
|
|
6386
6359
|
"aliasPermutations": [],
|
|
6387
6360
|
"permutations": [
|
|
6388
|
-
"hardis:org:diagnose:
|
|
6389
|
-
"org:hardis:diagnose:
|
|
6390
|
-
"org:diagnose:hardis:
|
|
6391
|
-
"org:diagnose:
|
|
6392
|
-
"hardis:diagnose:org:
|
|
6393
|
-
"diagnose:hardis:org:
|
|
6394
|
-
"diagnose:org:hardis:
|
|
6395
|
-
"diagnose:org:
|
|
6396
|
-
"hardis:diagnose:
|
|
6397
|
-
"diagnose:hardis:
|
|
6398
|
-
"diagnose:
|
|
6399
|
-
"diagnose:
|
|
6400
|
-
"hardis:org:
|
|
6401
|
-
"org:hardis:
|
|
6402
|
-
"org:
|
|
6403
|
-
"org:
|
|
6404
|
-
"hardis:
|
|
6405
|
-
"
|
|
6406
|
-
"
|
|
6407
|
-
"
|
|
6408
|
-
"hardis:
|
|
6409
|
-
"
|
|
6410
|
-
"
|
|
6411
|
-
"
|
|
6361
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6362
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6363
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6364
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6365
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6366
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6367
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6368
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6369
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6370
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6371
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6372
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6373
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6374
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6375
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6376
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6377
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6378
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6379
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6380
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6381
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6382
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6383
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6384
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6412
6385
|
]
|
|
6413
6386
|
},
|
|
6414
|
-
"hardis:org:diagnose:
|
|
6387
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6415
6388
|
"aliases": [],
|
|
6416
6389
|
"args": {},
|
|
6417
|
-
"description": "\n
|
|
6390
|
+
"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",
|
|
6418
6391
|
"examples": [
|
|
6419
|
-
"$ sf hardis:org:diagnose:
|
|
6392
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6420
6393
|
],
|
|
6421
6394
|
"flags": {
|
|
6422
6395
|
"json": {
|
|
@@ -6442,13 +6415,6 @@
|
|
|
6442
6415
|
"multiple": false,
|
|
6443
6416
|
"type": "option"
|
|
6444
6417
|
},
|
|
6445
|
-
"usedonly": {
|
|
6446
|
-
"char": "u",
|
|
6447
|
-
"description": "Filter to have only used licenses",
|
|
6448
|
-
"name": "usedonly",
|
|
6449
|
-
"allowNo": false,
|
|
6450
|
-
"type": "boolean"
|
|
6451
|
-
},
|
|
6452
6418
|
"debug": {
|
|
6453
6419
|
"char": "d",
|
|
6454
6420
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6487,13 +6453,30 @@
|
|
|
6487
6453
|
},
|
|
6488
6454
|
"hasDynamicHelp": true,
|
|
6489
6455
|
"hiddenAliases": [],
|
|
6490
|
-
"id": "hardis:org:diagnose:
|
|
6456
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6491
6457
|
"pluginAlias": "sfdx-hardis",
|
|
6492
6458
|
"pluginName": "sfdx-hardis",
|
|
6493
6459
|
"pluginType": "core",
|
|
6494
6460
|
"strict": true,
|
|
6495
6461
|
"enableJsonFlag": true,
|
|
6496
|
-
"title": "
|
|
6462
|
+
"title": "Unused Connected Apps in an org",
|
|
6463
|
+
"allowedInactiveConnectedApps": [
|
|
6464
|
+
"Ant Migration Tool",
|
|
6465
|
+
"Chatter Desktop",
|
|
6466
|
+
"Chatter Mobile for BlackBerry",
|
|
6467
|
+
"Force.com IDE",
|
|
6468
|
+
"OIQ_Integration",
|
|
6469
|
+
"Salesforce CLI",
|
|
6470
|
+
"Salesforce Files",
|
|
6471
|
+
"Salesforce Mobile Dashboards",
|
|
6472
|
+
"Salesforce Touch",
|
|
6473
|
+
"Salesforce for Outlook",
|
|
6474
|
+
"SalesforceA",
|
|
6475
|
+
"SalesforceA for Android",
|
|
6476
|
+
"SalesforceA for iOS",
|
|
6477
|
+
"SalesforceDX Namespace Registry",
|
|
6478
|
+
"SalesforceIQ"
|
|
6479
|
+
],
|
|
6497
6480
|
"requiresProject": false,
|
|
6498
6481
|
"isESM": true,
|
|
6499
6482
|
"relativePath": [
|
|
@@ -6502,42 +6485,43 @@
|
|
|
6502
6485
|
"hardis",
|
|
6503
6486
|
"org",
|
|
6504
6487
|
"diagnose",
|
|
6505
|
-
"
|
|
6488
|
+
"unused-connected-apps.js"
|
|
6506
6489
|
],
|
|
6507
6490
|
"aliasPermutations": [],
|
|
6508
6491
|
"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
|
-
"
|
|
6492
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6493
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6494
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6495
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6496
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6497
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6498
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6499
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6500
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6501
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6502
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6503
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6504
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6505
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6506
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6507
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6508
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6509
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6510
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6511
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6512
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6513
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6514
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6515
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6533
6516
|
]
|
|
6534
6517
|
},
|
|
6535
|
-
"hardis:org:diagnose:
|
|
6518
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6536
6519
|
"aliases": [],
|
|
6537
6520
|
"args": {},
|
|
6538
|
-
"description": "
|
|
6521
|
+
"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
6522
|
"examples": [
|
|
6540
|
-
"$ sf hardis:org:diagnose:
|
|
6523
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6524
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6541
6525
|
],
|
|
6542
6526
|
"flags": {
|
|
6543
6527
|
"json": {
|
|
@@ -6601,14 +6585,32 @@
|
|
|
6601
6585
|
},
|
|
6602
6586
|
"hasDynamicHelp": true,
|
|
6603
6587
|
"hiddenAliases": [],
|
|
6604
|
-
"id": "hardis:org:diagnose:
|
|
6588
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6605
6589
|
"pluginAlias": "sfdx-hardis",
|
|
6606
6590
|
"pluginName": "sfdx-hardis",
|
|
6607
6591
|
"pluginType": "core",
|
|
6608
6592
|
"strict": true,
|
|
6609
6593
|
"enableJsonFlag": true,
|
|
6610
|
-
"title": "
|
|
6594
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6611
6595
|
"requiresProject": false,
|
|
6596
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6597
|
+
"Sales_User"
|
|
6598
|
+
],
|
|
6599
|
+
"permSetsPermSetLicenses": [
|
|
6600
|
+
{
|
|
6601
|
+
"permSet": "Sales_User",
|
|
6602
|
+
"permSetLicense": "SalesUserPsl"
|
|
6603
|
+
}
|
|
6604
|
+
],
|
|
6605
|
+
"profilesPermissionSetLicenses": [
|
|
6606
|
+
{
|
|
6607
|
+
"profile": "Salesforce API Only",
|
|
6608
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6609
|
+
}
|
|
6610
|
+
],
|
|
6611
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6612
|
+
"IdentityConnect"
|
|
6613
|
+
],
|
|
6612
6614
|
"isESM": true,
|
|
6613
6615
|
"relativePath": [
|
|
6614
6616
|
"lib",
|
|
@@ -6616,42 +6618,46 @@
|
|
|
6616
6618
|
"hardis",
|
|
6617
6619
|
"org",
|
|
6618
6620
|
"diagnose",
|
|
6619
|
-
"
|
|
6621
|
+
"unusedlicenses.js"
|
|
6620
6622
|
],
|
|
6621
6623
|
"aliasPermutations": [],
|
|
6622
6624
|
"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
|
-
"
|
|
6625
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6626
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6627
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6628
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6629
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6630
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6631
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6632
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6633
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6634
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6635
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6636
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6637
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6638
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6639
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6640
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6641
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6642
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6643
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6644
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6645
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6646
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6647
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6648
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
6647
6649
|
]
|
|
6648
6650
|
},
|
|
6649
|
-
"hardis:org:diagnose:
|
|
6651
|
+
"hardis:org:diagnose:unusedusers": {
|
|
6650
6652
|
"aliases": [],
|
|
6651
6653
|
"args": {},
|
|
6652
|
-
"description": "\n## Command Behavior\n\n**Detects
|
|
6654
|
+
"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>",
|
|
6653
6655
|
"examples": [
|
|
6654
|
-
"$ sf hardis:org:diagnose:
|
|
6656
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6657
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6658
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6659
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6660
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6655
6661
|
],
|
|
6656
6662
|
"flags": {
|
|
6657
6663
|
"json": {
|
|
@@ -6677,6 +6683,41 @@
|
|
|
6677
6683
|
"multiple": false,
|
|
6678
6684
|
"type": "option"
|
|
6679
6685
|
},
|
|
6686
|
+
"days": {
|
|
6687
|
+
"char": "t",
|
|
6688
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6689
|
+
"name": "days",
|
|
6690
|
+
"hasDynamicHelp": false,
|
|
6691
|
+
"multiple": false,
|
|
6692
|
+
"type": "option"
|
|
6693
|
+
},
|
|
6694
|
+
"licensetypes": {
|
|
6695
|
+
"char": "l",
|
|
6696
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6697
|
+
"name": "licensetypes",
|
|
6698
|
+
"hasDynamicHelp": false,
|
|
6699
|
+
"multiple": false,
|
|
6700
|
+
"options": [
|
|
6701
|
+
"all",
|
|
6702
|
+
"all-crm",
|
|
6703
|
+
"all-paying"
|
|
6704
|
+
],
|
|
6705
|
+
"type": "option"
|
|
6706
|
+
},
|
|
6707
|
+
"licenseidentifiers": {
|
|
6708
|
+
"char": "i",
|
|
6709
|
+
"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",
|
|
6710
|
+
"name": "licenseidentifiers",
|
|
6711
|
+
"hasDynamicHelp": false,
|
|
6712
|
+
"multiple": false,
|
|
6713
|
+
"type": "option"
|
|
6714
|
+
},
|
|
6715
|
+
"returnactiveusers": {
|
|
6716
|
+
"description": "Inverts the command by returning the active users",
|
|
6717
|
+
"name": "returnactiveusers",
|
|
6718
|
+
"allowNo": false,
|
|
6719
|
+
"type": "boolean"
|
|
6720
|
+
},
|
|
6680
6721
|
"debug": {
|
|
6681
6722
|
"char": "d",
|
|
6682
6723
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6715,13 +6756,13 @@
|
|
|
6715
6756
|
},
|
|
6716
6757
|
"hasDynamicHelp": true,
|
|
6717
6758
|
"hiddenAliases": [],
|
|
6718
|
-
"id": "hardis:org:diagnose:
|
|
6759
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
6719
6760
|
"pluginAlias": "sfdx-hardis",
|
|
6720
6761
|
"pluginName": "sfdx-hardis",
|
|
6721
6762
|
"pluginType": "core",
|
|
6722
6763
|
"strict": true,
|
|
6723
6764
|
"enableJsonFlag": true,
|
|
6724
|
-
"title": "Detect
|
|
6765
|
+
"title": "Detect unused Users in Salesforce",
|
|
6725
6766
|
"requiresProject": false,
|
|
6726
6767
|
"isESM": true,
|
|
6727
6768
|
"relativePath": [
|
|
@@ -6730,43 +6771,43 @@
|
|
|
6730
6771
|
"hardis",
|
|
6731
6772
|
"org",
|
|
6732
6773
|
"diagnose",
|
|
6733
|
-
"
|
|
6774
|
+
"unusedusers.js"
|
|
6734
6775
|
],
|
|
6735
6776
|
"aliasPermutations": [],
|
|
6736
6777
|
"permutations": [
|
|
6737
|
-
"hardis:org:diagnose:
|
|
6738
|
-
"org:hardis:diagnose:
|
|
6739
|
-
"org:diagnose:hardis:
|
|
6740
|
-
"org:diagnose:
|
|
6741
|
-
"hardis:diagnose:org:
|
|
6742
|
-
"diagnose:hardis:org:
|
|
6743
|
-
"diagnose:org:hardis:
|
|
6744
|
-
"diagnose:org:
|
|
6745
|
-
"hardis:diagnose:
|
|
6746
|
-
"diagnose:hardis:
|
|
6747
|
-
"diagnose:
|
|
6748
|
-
"diagnose:
|
|
6749
|
-
"hardis:org:
|
|
6750
|
-
"org:hardis:
|
|
6751
|
-
"org:
|
|
6752
|
-
"org:
|
|
6753
|
-
"hardis:
|
|
6754
|
-
"
|
|
6755
|
-
"
|
|
6756
|
-
"
|
|
6757
|
-
"hardis:
|
|
6758
|
-
"
|
|
6759
|
-
"
|
|
6760
|
-
"
|
|
6778
|
+
"hardis:org:diagnose:unusedusers",
|
|
6779
|
+
"org:hardis:diagnose:unusedusers",
|
|
6780
|
+
"org:diagnose:hardis:unusedusers",
|
|
6781
|
+
"org:diagnose:unusedusers:hardis",
|
|
6782
|
+
"hardis:diagnose:org:unusedusers",
|
|
6783
|
+
"diagnose:hardis:org:unusedusers",
|
|
6784
|
+
"diagnose:org:hardis:unusedusers",
|
|
6785
|
+
"diagnose:org:unusedusers:hardis",
|
|
6786
|
+
"hardis:diagnose:unusedusers:org",
|
|
6787
|
+
"diagnose:hardis:unusedusers:org",
|
|
6788
|
+
"diagnose:unusedusers:hardis:org",
|
|
6789
|
+
"diagnose:unusedusers:org:hardis",
|
|
6790
|
+
"hardis:org:unusedusers:diagnose",
|
|
6791
|
+
"org:hardis:unusedusers:diagnose",
|
|
6792
|
+
"org:unusedusers:hardis:diagnose",
|
|
6793
|
+
"org:unusedusers:diagnose:hardis",
|
|
6794
|
+
"hardis:unusedusers:org:diagnose",
|
|
6795
|
+
"unusedusers:hardis:org:diagnose",
|
|
6796
|
+
"unusedusers:org:hardis:diagnose",
|
|
6797
|
+
"unusedusers:org:diagnose:hardis",
|
|
6798
|
+
"hardis:unusedusers:diagnose:org",
|
|
6799
|
+
"unusedusers:hardis:diagnose:org",
|
|
6800
|
+
"unusedusers:diagnose:hardis:org",
|
|
6801
|
+
"unusedusers:diagnose:org:hardis"
|
|
6761
6802
|
]
|
|
6762
6803
|
},
|
|
6763
|
-
"hardis:org:
|
|
6804
|
+
"hardis:org:fix:listviewmine": {
|
|
6764
6805
|
"aliases": [],
|
|
6765
6806
|
"args": {},
|
|
6766
|
-
"description": "
|
|
6807
|
+
"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",
|
|
6767
6808
|
"examples": [
|
|
6768
|
-
"$ sf hardis:org:
|
|
6769
|
-
"$ sf hardis:org:
|
|
6809
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
6810
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
6770
6811
|
],
|
|
6771
6812
|
"flags": {
|
|
6772
6813
|
"json": {
|
|
@@ -6784,18 +6825,10 @@
|
|
|
6784
6825
|
"multiple": false,
|
|
6785
6826
|
"type": "option"
|
|
6786
6827
|
},
|
|
6787
|
-
"
|
|
6788
|
-
"char": "
|
|
6789
|
-
"description": "
|
|
6790
|
-
"name": "
|
|
6791
|
-
"hasDynamicHelp": false,
|
|
6792
|
-
"multiple": false,
|
|
6793
|
-
"type": "option"
|
|
6794
|
-
},
|
|
6795
|
-
"days": {
|
|
6796
|
-
"char": "t",
|
|
6797
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6798
|
-
"name": "days",
|
|
6828
|
+
"listviews": {
|
|
6829
|
+
"char": "l",
|
|
6830
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
6831
|
+
"name": "listviews",
|
|
6799
6832
|
"hasDynamicHelp": false,
|
|
6800
6833
|
"multiple": false,
|
|
6801
6834
|
"type": "option"
|
|
@@ -6838,57 +6871,57 @@
|
|
|
6838
6871
|
},
|
|
6839
6872
|
"hasDynamicHelp": true,
|
|
6840
6873
|
"hiddenAliases": [],
|
|
6841
|
-
"id": "hardis:org:
|
|
6874
|
+
"id": "hardis:org:fix:listviewmine",
|
|
6842
6875
|
"pluginAlias": "sfdx-hardis",
|
|
6843
6876
|
"pluginName": "sfdx-hardis",
|
|
6844
6877
|
"pluginType": "core",
|
|
6845
6878
|
"strict": true,
|
|
6846
6879
|
"enableJsonFlag": true,
|
|
6847
|
-
"title": "
|
|
6848
|
-
"requiresProject":
|
|
6880
|
+
"title": "Fix listviews with ",
|
|
6881
|
+
"requiresProject": true,
|
|
6849
6882
|
"isESM": true,
|
|
6850
6883
|
"relativePath": [
|
|
6851
6884
|
"lib",
|
|
6852
6885
|
"commands",
|
|
6853
6886
|
"hardis",
|
|
6854
6887
|
"org",
|
|
6855
|
-
"
|
|
6856
|
-
"
|
|
6888
|
+
"fix",
|
|
6889
|
+
"listviewmine.js"
|
|
6857
6890
|
],
|
|
6858
6891
|
"aliasPermutations": [],
|
|
6859
6892
|
"permutations": [
|
|
6860
|
-
"hardis:org:
|
|
6861
|
-
"org:hardis:
|
|
6862
|
-
"org:
|
|
6863
|
-
"org:
|
|
6864
|
-
"hardis:
|
|
6865
|
-
"
|
|
6866
|
-
"
|
|
6867
|
-
"
|
|
6868
|
-
"hardis:
|
|
6869
|
-
"
|
|
6870
|
-
"
|
|
6871
|
-
"
|
|
6872
|
-
"hardis:org:
|
|
6873
|
-
"org:hardis:
|
|
6874
|
-
"org:
|
|
6875
|
-
"org:
|
|
6876
|
-
"hardis:
|
|
6877
|
-
"
|
|
6878
|
-
"
|
|
6879
|
-
"
|
|
6880
|
-
"hardis:
|
|
6881
|
-
"
|
|
6882
|
-
"
|
|
6883
|
-
"
|
|
6893
|
+
"hardis:org:fix:listviewmine",
|
|
6894
|
+
"org:hardis:fix:listviewmine",
|
|
6895
|
+
"org:fix:hardis:listviewmine",
|
|
6896
|
+
"org:fix:listviewmine:hardis",
|
|
6897
|
+
"hardis:fix:org:listviewmine",
|
|
6898
|
+
"fix:hardis:org:listviewmine",
|
|
6899
|
+
"fix:org:hardis:listviewmine",
|
|
6900
|
+
"fix:org:listviewmine:hardis",
|
|
6901
|
+
"hardis:fix:listviewmine:org",
|
|
6902
|
+
"fix:hardis:listviewmine:org",
|
|
6903
|
+
"fix:listviewmine:hardis:org",
|
|
6904
|
+
"fix:listviewmine:org:hardis",
|
|
6905
|
+
"hardis:org:listviewmine:fix",
|
|
6906
|
+
"org:hardis:listviewmine:fix",
|
|
6907
|
+
"org:listviewmine:hardis:fix",
|
|
6908
|
+
"org:listviewmine:fix:hardis",
|
|
6909
|
+
"hardis:listviewmine:org:fix",
|
|
6910
|
+
"listviewmine:hardis:org:fix",
|
|
6911
|
+
"listviewmine:org:hardis:fix",
|
|
6912
|
+
"listviewmine:org:fix:hardis",
|
|
6913
|
+
"hardis:listviewmine:fix:org",
|
|
6914
|
+
"listviewmine:hardis:fix:org",
|
|
6915
|
+
"listviewmine:fix:hardis:org",
|
|
6916
|
+
"listviewmine:fix:org:hardis"
|
|
6884
6917
|
]
|
|
6885
6918
|
},
|
|
6886
|
-
"hardis:org:
|
|
6919
|
+
"hardis:org:files:export": {
|
|
6887
6920
|
"aliases": [],
|
|
6888
6921
|
"args": {},
|
|
6889
|
-
"description": "\n## Command Behavior\n\n**
|
|
6922
|
+
"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",
|
|
6890
6923
|
"examples": [
|
|
6891
|
-
"$ sf hardis:org:
|
|
6924
|
+
"$ sf hardis:org:files:export"
|
|
6892
6925
|
],
|
|
6893
6926
|
"flags": {
|
|
6894
6927
|
"json": {
|
|
@@ -6906,14 +6939,48 @@
|
|
|
6906
6939
|
"multiple": false,
|
|
6907
6940
|
"type": "option"
|
|
6908
6941
|
},
|
|
6909
|
-
"
|
|
6910
|
-
"char": "
|
|
6911
|
-
"description": "
|
|
6912
|
-
"name": "
|
|
6942
|
+
"path": {
|
|
6943
|
+
"char": "p",
|
|
6944
|
+
"description": "Path to the file export project",
|
|
6945
|
+
"name": "path",
|
|
6946
|
+
"hasDynamicHelp": false,
|
|
6947
|
+
"multiple": false,
|
|
6948
|
+
"type": "option"
|
|
6949
|
+
},
|
|
6950
|
+
"chunksize": {
|
|
6951
|
+
"char": "c",
|
|
6952
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
6953
|
+
"name": "chunksize",
|
|
6954
|
+
"default": 1000,
|
|
6955
|
+
"hasDynamicHelp": false,
|
|
6956
|
+
"multiple": false,
|
|
6957
|
+
"type": "option"
|
|
6958
|
+
},
|
|
6959
|
+
"polltimeout": {
|
|
6960
|
+
"char": "t",
|
|
6961
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
6962
|
+
"name": "polltimeout",
|
|
6963
|
+
"default": 300000,
|
|
6964
|
+
"hasDynamicHelp": false,
|
|
6965
|
+
"multiple": false,
|
|
6966
|
+
"type": "option"
|
|
6967
|
+
},
|
|
6968
|
+
"startchunknumber": {
|
|
6969
|
+
"char": "s",
|
|
6970
|
+
"description": "Chunk number to start from",
|
|
6971
|
+
"name": "startchunknumber",
|
|
6972
|
+
"default": 0,
|
|
6913
6973
|
"hasDynamicHelp": false,
|
|
6914
6974
|
"multiple": false,
|
|
6915
6975
|
"type": "option"
|
|
6916
6976
|
},
|
|
6977
|
+
"resume": {
|
|
6978
|
+
"char": "r",
|
|
6979
|
+
"description": "Resume previous export by checking existing files (default in CI)",
|
|
6980
|
+
"name": "resume",
|
|
6981
|
+
"allowNo": false,
|
|
6982
|
+
"type": "boolean"
|
|
6983
|
+
},
|
|
6917
6984
|
"debug": {
|
|
6918
6985
|
"char": "d",
|
|
6919
6986
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6952,30 +7019,13 @@
|
|
|
6952
7019
|
},
|
|
6953
7020
|
"hasDynamicHelp": true,
|
|
6954
7021
|
"hiddenAliases": [],
|
|
6955
|
-
"id": "hardis:org:
|
|
7022
|
+
"id": "hardis:org:files:export",
|
|
6956
7023
|
"pluginAlias": "sfdx-hardis",
|
|
6957
7024
|
"pluginName": "sfdx-hardis",
|
|
6958
7025
|
"pluginType": "core",
|
|
6959
7026
|
"strict": true,
|
|
6960
7027
|
"enableJsonFlag": true,
|
|
6961
|
-
"title": "
|
|
6962
|
-
"allowedInactiveConnectedApps": [
|
|
6963
|
-
"Ant Migration Tool",
|
|
6964
|
-
"Chatter Desktop",
|
|
6965
|
-
"Chatter Mobile for BlackBerry",
|
|
6966
|
-
"Force.com IDE",
|
|
6967
|
-
"OIQ_Integration",
|
|
6968
|
-
"Salesforce CLI",
|
|
6969
|
-
"Salesforce Files",
|
|
6970
|
-
"Salesforce Mobile Dashboards",
|
|
6971
|
-
"Salesforce Touch",
|
|
6972
|
-
"Salesforce for Outlook",
|
|
6973
|
-
"SalesforceA",
|
|
6974
|
-
"SalesforceA for Android",
|
|
6975
|
-
"SalesforceA for iOS",
|
|
6976
|
-
"SalesforceDX Namespace Registry",
|
|
6977
|
-
"SalesforceIQ"
|
|
6978
|
-
],
|
|
7028
|
+
"title": "Export files",
|
|
6979
7029
|
"requiresProject": false,
|
|
6980
7030
|
"isESM": true,
|
|
6981
7031
|
"relativePath": [
|
|
@@ -6983,44 +7033,43 @@
|
|
|
6983
7033
|
"commands",
|
|
6984
7034
|
"hardis",
|
|
6985
7035
|
"org",
|
|
6986
|
-
"
|
|
6987
|
-
"
|
|
7036
|
+
"files",
|
|
7037
|
+
"export.js"
|
|
6988
7038
|
],
|
|
6989
7039
|
"aliasPermutations": [],
|
|
6990
7040
|
"permutations": [
|
|
6991
|
-
"hardis:org:
|
|
6992
|
-
"org:hardis:
|
|
6993
|
-
"org:
|
|
6994
|
-
"org:
|
|
6995
|
-
"hardis:
|
|
6996
|
-
"
|
|
6997
|
-
"
|
|
6998
|
-
"
|
|
6999
|
-
"hardis:
|
|
7000
|
-
"
|
|
7001
|
-
"
|
|
7002
|
-
"
|
|
7003
|
-
"hardis:org:
|
|
7004
|
-
"org:hardis:
|
|
7005
|
-
"org:
|
|
7006
|
-
"org:
|
|
7007
|
-
"hardis:
|
|
7008
|
-
"
|
|
7009
|
-
"
|
|
7010
|
-
"
|
|
7011
|
-
"hardis:
|
|
7012
|
-
"
|
|
7013
|
-
"
|
|
7014
|
-
"
|
|
7041
|
+
"hardis:org:files:export",
|
|
7042
|
+
"org:hardis:files:export",
|
|
7043
|
+
"org:files:hardis:export",
|
|
7044
|
+
"org:files:export:hardis",
|
|
7045
|
+
"hardis:files:org:export",
|
|
7046
|
+
"files:hardis:org:export",
|
|
7047
|
+
"files:org:hardis:export",
|
|
7048
|
+
"files:org:export:hardis",
|
|
7049
|
+
"hardis:files:export:org",
|
|
7050
|
+
"files:hardis:export:org",
|
|
7051
|
+
"files:export:hardis:org",
|
|
7052
|
+
"files:export:org:hardis",
|
|
7053
|
+
"hardis:org:export:files",
|
|
7054
|
+
"org:hardis:export:files",
|
|
7055
|
+
"org:export:hardis:files",
|
|
7056
|
+
"org:export:files:hardis",
|
|
7057
|
+
"hardis:export:org:files",
|
|
7058
|
+
"export:hardis:org:files",
|
|
7059
|
+
"export:org:hardis:files",
|
|
7060
|
+
"export:org:files:hardis",
|
|
7061
|
+
"hardis:export:files:org",
|
|
7062
|
+
"export:hardis:files:org",
|
|
7063
|
+
"export:files:hardis:org",
|
|
7064
|
+
"export:files:org:hardis"
|
|
7015
7065
|
]
|
|
7016
7066
|
},
|
|
7017
|
-
"hardis:org:
|
|
7067
|
+
"hardis:org:files:import": {
|
|
7018
7068
|
"aliases": [],
|
|
7019
7069
|
"args": {},
|
|
7020
|
-
"description": "\
|
|
7070
|
+
"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",
|
|
7021
7071
|
"examples": [
|
|
7022
|
-
"$ sf hardis:org:
|
|
7023
|
-
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
7072
|
+
"$ sf hardis:org:files:import"
|
|
7024
7073
|
],
|
|
7025
7074
|
"flags": {
|
|
7026
7075
|
"json": {
|
|
@@ -7038,14 +7087,21 @@
|
|
|
7038
7087
|
"multiple": false,
|
|
7039
7088
|
"type": "option"
|
|
7040
7089
|
},
|
|
7041
|
-
"
|
|
7042
|
-
"char": "
|
|
7043
|
-
"description": "
|
|
7044
|
-
"name": "
|
|
7090
|
+
"path": {
|
|
7091
|
+
"char": "p",
|
|
7092
|
+
"description": "Path to the file export project",
|
|
7093
|
+
"name": "path",
|
|
7045
7094
|
"hasDynamicHelp": false,
|
|
7046
7095
|
"multiple": false,
|
|
7047
7096
|
"type": "option"
|
|
7048
7097
|
},
|
|
7098
|
+
"overwrite": {
|
|
7099
|
+
"char": "f",
|
|
7100
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
7101
|
+
"name": "overwrite",
|
|
7102
|
+
"allowNo": false,
|
|
7103
|
+
"type": "boolean"
|
|
7104
|
+
},
|
|
7049
7105
|
"debug": {
|
|
7050
7106
|
"char": "d",
|
|
7051
7107
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7084,79 +7140,59 @@
|
|
|
7084
7140
|
},
|
|
7085
7141
|
"hasDynamicHelp": true,
|
|
7086
7142
|
"hiddenAliases": [],
|
|
7087
|
-
"id": "hardis:org:
|
|
7143
|
+
"id": "hardis:org:files:import",
|
|
7088
7144
|
"pluginAlias": "sfdx-hardis",
|
|
7089
7145
|
"pluginName": "sfdx-hardis",
|
|
7090
7146
|
"pluginType": "core",
|
|
7091
7147
|
"strict": true,
|
|
7092
7148
|
"enableJsonFlag": true,
|
|
7093
|
-
"title": "
|
|
7149
|
+
"title": "Import files",
|
|
7094
7150
|
"requiresProject": false,
|
|
7095
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
7096
|
-
"Sales_User"
|
|
7097
|
-
],
|
|
7098
|
-
"permSetsPermSetLicenses": [
|
|
7099
|
-
{
|
|
7100
|
-
"permSet": "Sales_User",
|
|
7101
|
-
"permSetLicense": "SalesUserPsl"
|
|
7102
|
-
}
|
|
7103
|
-
],
|
|
7104
|
-
"profilesPermissionSetLicenses": [
|
|
7105
|
-
{
|
|
7106
|
-
"profile": "Salesforce API Only",
|
|
7107
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
7108
|
-
}
|
|
7109
|
-
],
|
|
7110
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
7111
|
-
"IdentityConnect"
|
|
7112
|
-
],
|
|
7113
7151
|
"isESM": true,
|
|
7114
7152
|
"relativePath": [
|
|
7115
7153
|
"lib",
|
|
7116
7154
|
"commands",
|
|
7117
7155
|
"hardis",
|
|
7118
7156
|
"org",
|
|
7119
|
-
"
|
|
7120
|
-
"
|
|
7157
|
+
"files",
|
|
7158
|
+
"import.js"
|
|
7121
7159
|
],
|
|
7122
7160
|
"aliasPermutations": [],
|
|
7123
7161
|
"permutations": [
|
|
7124
|
-
"hardis:org:
|
|
7125
|
-
"org:hardis:
|
|
7126
|
-
"org:
|
|
7127
|
-
"org:
|
|
7128
|
-
"hardis:
|
|
7129
|
-
"
|
|
7130
|
-
"
|
|
7131
|
-
"
|
|
7132
|
-
"hardis:
|
|
7133
|
-
"
|
|
7134
|
-
"
|
|
7135
|
-
"
|
|
7136
|
-
"hardis:org:
|
|
7137
|
-
"org:hardis:
|
|
7138
|
-
"org:
|
|
7139
|
-
"org:
|
|
7140
|
-
"hardis:
|
|
7141
|
-
"
|
|
7142
|
-
"
|
|
7143
|
-
"
|
|
7144
|
-
"hardis:
|
|
7145
|
-
"
|
|
7146
|
-
"
|
|
7147
|
-
"
|
|
7162
|
+
"hardis:org:files:import",
|
|
7163
|
+
"org:hardis:files:import",
|
|
7164
|
+
"org:files:hardis:import",
|
|
7165
|
+
"org:files:import:hardis",
|
|
7166
|
+
"hardis:files:org:import",
|
|
7167
|
+
"files:hardis:org:import",
|
|
7168
|
+
"files:org:hardis:import",
|
|
7169
|
+
"files:org:import:hardis",
|
|
7170
|
+
"hardis:files:import:org",
|
|
7171
|
+
"files:hardis:import:org",
|
|
7172
|
+
"files:import:hardis:org",
|
|
7173
|
+
"files:import:org:hardis",
|
|
7174
|
+
"hardis:org:import:files",
|
|
7175
|
+
"org:hardis:import:files",
|
|
7176
|
+
"org:import:hardis:files",
|
|
7177
|
+
"org:import:files:hardis",
|
|
7178
|
+
"hardis:import:org:files",
|
|
7179
|
+
"import:hardis:org:files",
|
|
7180
|
+
"import:org:hardis:files",
|
|
7181
|
+
"import:org:files:hardis",
|
|
7182
|
+
"hardis:import:files:org",
|
|
7183
|
+
"import:hardis:files:org",
|
|
7184
|
+
"import:files:hardis:org",
|
|
7185
|
+
"import:files:org:hardis"
|
|
7148
7186
|
]
|
|
7149
7187
|
},
|
|
7150
|
-
"hardis:org:
|
|
7188
|
+
"hardis:org:generate:packagexmlfull": {
|
|
7151
7189
|
"aliases": [],
|
|
7152
7190
|
"args": {},
|
|
7153
|
-
"description": "\n## Command Behavior\n\n**
|
|
7191
|
+
"description": "\n## Command Behavior\n\n**Generates a comprehensive `package.xml` file for a Salesforce org, including all metadata components, even managed ones.**\n\nThis command is essential for various Salesforce development and administration tasks, especially when you need a complete snapshot of an org's metadata. It goes beyond typical source tracking by including managed package components, which is crucial for understanding the full metadata footprint of an org.\n\nKey functionalities:\n\n- **Full Org Metadata Retrieval:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a complete list of all metadata types and their members.\n- **Managed Package Inclusion:** Unlike standard source retrieval, this command explicitly includes metadata from managed packages, providing a truly comprehensive `package.xml`.\n- **Customizable Output:** Allows you to specify the output file path for the generated `package.xml`.\n- **Interactive Org Selection:** If no target org is specified, it interactively prompts the user to choose an org. (or use --no-prompt to skip this step)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce Metadata API Interaction:** It leverages the Salesforce Metadata API to list all available metadata types and then retrieve all components for each type.\n- **`buildOrgManifest` Utility:** The core logic for querying the org's metadata and constructing the `package.xml` is encapsulated within the `buildOrgManifest` utility function.\n- **XML Generation:** It dynamically builds the XML structure of the `package.xml` file, including the `types` and `members` elements for all retrieved metadata.\n- **File System Operations:** It writes the generated `package.xml` file to the specified output path.\n- **Interactive Prompts:** Uses `promptOrgUsernameDefault` to guide the user in selecting the target Salesforce org.\n</details>\n",
|
|
7154
7192
|
"examples": [
|
|
7155
|
-
"$ sf hardis:org:
|
|
7156
|
-
"$ sf hardis:org:
|
|
7157
|
-
"$ sf hardis:org:
|
|
7158
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7159
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7193
|
+
"$ sf hardis:org:generate:packagexmlfull",
|
|
7194
|
+
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
7195
|
+
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
7160
7196
|
],
|
|
7161
7197
|
"flags": {
|
|
7162
7198
|
"json": {
|
|
@@ -7175,48 +7211,12 @@
|
|
|
7175
7211
|
"type": "option"
|
|
7176
7212
|
},
|
|
7177
7213
|
"outputfile": {
|
|
7178
|
-
"
|
|
7179
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7214
|
+
"description": "Output package.xml file",
|
|
7180
7215
|
"name": "outputfile",
|
|
7181
7216
|
"hasDynamicHelp": false,
|
|
7182
7217
|
"multiple": false,
|
|
7183
7218
|
"type": "option"
|
|
7184
7219
|
},
|
|
7185
|
-
"days": {
|
|
7186
|
-
"char": "t",
|
|
7187
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7188
|
-
"name": "days",
|
|
7189
|
-
"hasDynamicHelp": false,
|
|
7190
|
-
"multiple": false,
|
|
7191
|
-
"type": "option"
|
|
7192
|
-
},
|
|
7193
|
-
"licensetypes": {
|
|
7194
|
-
"char": "l",
|
|
7195
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
7196
|
-
"name": "licensetypes",
|
|
7197
|
-
"hasDynamicHelp": false,
|
|
7198
|
-
"multiple": false,
|
|
7199
|
-
"options": [
|
|
7200
|
-
"all",
|
|
7201
|
-
"all-crm",
|
|
7202
|
-
"all-paying"
|
|
7203
|
-
],
|
|
7204
|
-
"type": "option"
|
|
7205
|
-
},
|
|
7206
|
-
"licenseidentifiers": {
|
|
7207
|
-
"char": "i",
|
|
7208
|
-
"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",
|
|
7209
|
-
"name": "licenseidentifiers",
|
|
7210
|
-
"hasDynamicHelp": false,
|
|
7211
|
-
"multiple": false,
|
|
7212
|
-
"type": "option"
|
|
7213
|
-
},
|
|
7214
|
-
"returnactiveusers": {
|
|
7215
|
-
"description": "Inverts the command by returning the active users",
|
|
7216
|
-
"name": "returnactiveusers",
|
|
7217
|
-
"allowNo": false,
|
|
7218
|
-
"type": "boolean"
|
|
7219
|
-
},
|
|
7220
7220
|
"debug": {
|
|
7221
7221
|
"char": "d",
|
|
7222
7222
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7224,6 +7224,13 @@
|
|
|
7224
7224
|
"allowNo": false,
|
|
7225
7225
|
"type": "boolean"
|
|
7226
7226
|
},
|
|
7227
|
+
"no-prompt": {
|
|
7228
|
+
"char": "n",
|
|
7229
|
+
"description": "Do not prompt for org username, use the default one",
|
|
7230
|
+
"name": "no-prompt",
|
|
7231
|
+
"allowNo": false,
|
|
7232
|
+
"type": "boolean"
|
|
7233
|
+
},
|
|
7227
7234
|
"websocket": {
|
|
7228
7235
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7229
7236
|
"name": "websocket",
|
|
@@ -7255,13 +7262,13 @@
|
|
|
7255
7262
|
},
|
|
7256
7263
|
"hasDynamicHelp": true,
|
|
7257
7264
|
"hiddenAliases": [],
|
|
7258
|
-
"id": "hardis:org:
|
|
7265
|
+
"id": "hardis:org:generate:packagexmlfull",
|
|
7259
7266
|
"pluginAlias": "sfdx-hardis",
|
|
7260
7267
|
"pluginName": "sfdx-hardis",
|
|
7261
7268
|
"pluginType": "core",
|
|
7262
7269
|
"strict": true,
|
|
7263
7270
|
"enableJsonFlag": true,
|
|
7264
|
-
"title": "
|
|
7271
|
+
"title": "Generate Full Org package.xml",
|
|
7265
7272
|
"requiresProject": false,
|
|
7266
7273
|
"isESM": true,
|
|
7267
7274
|
"relativePath": [
|
|
@@ -7269,35 +7276,35 @@
|
|
|
7269
7276
|
"commands",
|
|
7270
7277
|
"hardis",
|
|
7271
7278
|
"org",
|
|
7272
|
-
"
|
|
7273
|
-
"
|
|
7274
|
-
],
|
|
7275
|
-
"aliasPermutations": [],
|
|
7276
|
-
"permutations": [
|
|
7277
|
-
"hardis:org:
|
|
7278
|
-
"org:hardis:
|
|
7279
|
-
"org:
|
|
7280
|
-
"org:
|
|
7281
|
-
"hardis:
|
|
7282
|
-
"
|
|
7283
|
-
"
|
|
7284
|
-
"
|
|
7285
|
-
"hardis:
|
|
7286
|
-
"
|
|
7287
|
-
"
|
|
7288
|
-
"
|
|
7289
|
-
"hardis:org:
|
|
7290
|
-
"org:hardis:
|
|
7291
|
-
"org:
|
|
7292
|
-
"org:
|
|
7293
|
-
"hardis:
|
|
7294
|
-
"
|
|
7295
|
-
"
|
|
7296
|
-
"
|
|
7297
|
-
"hardis:
|
|
7298
|
-
"
|
|
7299
|
-
"
|
|
7300
|
-
"
|
|
7279
|
+
"generate",
|
|
7280
|
+
"packagexmlfull.js"
|
|
7281
|
+
],
|
|
7282
|
+
"aliasPermutations": [],
|
|
7283
|
+
"permutations": [
|
|
7284
|
+
"hardis:org:generate:packagexmlfull",
|
|
7285
|
+
"org:hardis:generate:packagexmlfull",
|
|
7286
|
+
"org:generate:hardis:packagexmlfull",
|
|
7287
|
+
"org:generate:packagexmlfull:hardis",
|
|
7288
|
+
"hardis:generate:org:packagexmlfull",
|
|
7289
|
+
"generate:hardis:org:packagexmlfull",
|
|
7290
|
+
"generate:org:hardis:packagexmlfull",
|
|
7291
|
+
"generate:org:packagexmlfull:hardis",
|
|
7292
|
+
"hardis:generate:packagexmlfull:org",
|
|
7293
|
+
"generate:hardis:packagexmlfull:org",
|
|
7294
|
+
"generate:packagexmlfull:hardis:org",
|
|
7295
|
+
"generate:packagexmlfull:org:hardis",
|
|
7296
|
+
"hardis:org:packagexmlfull:generate",
|
|
7297
|
+
"org:hardis:packagexmlfull:generate",
|
|
7298
|
+
"org:packagexmlfull:hardis:generate",
|
|
7299
|
+
"org:packagexmlfull:generate:hardis",
|
|
7300
|
+
"hardis:packagexmlfull:org:generate",
|
|
7301
|
+
"packagexmlfull:hardis:org:generate",
|
|
7302
|
+
"packagexmlfull:org:hardis:generate",
|
|
7303
|
+
"packagexmlfull:org:generate:hardis",
|
|
7304
|
+
"hardis:packagexmlfull:generate:org",
|
|
7305
|
+
"packagexmlfull:hardis:generate:org",
|
|
7306
|
+
"packagexmlfull:generate:hardis:org",
|
|
7307
|
+
"packagexmlfull:generate:org:hardis"
|
|
7301
7308
|
]
|
|
7302
7309
|
},
|
|
7303
7310
|
"hardis:org:monitor:all": {
|
|
@@ -9811,109 +9818,6 @@
|
|
|
9811
9818
|
"auth:configure:project:hardis"
|
|
9812
9819
|
]
|
|
9813
9820
|
},
|
|
9814
|
-
"hardis:project:convert:profilestopermsets": {
|
|
9815
|
-
"aliases": [],
|
|
9816
|
-
"args": {},
|
|
9817
|
-
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
9818
|
-
"examples": [
|
|
9819
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
9820
|
-
],
|
|
9821
|
-
"flags": {
|
|
9822
|
-
"json": {
|
|
9823
|
-
"description": "Format output as json.",
|
|
9824
|
-
"helpGroup": "GLOBAL",
|
|
9825
|
-
"name": "json",
|
|
9826
|
-
"allowNo": false,
|
|
9827
|
-
"type": "boolean"
|
|
9828
|
-
},
|
|
9829
|
-
"flags-dir": {
|
|
9830
|
-
"helpGroup": "GLOBAL",
|
|
9831
|
-
"name": "flags-dir",
|
|
9832
|
-
"summary": "Import flag values from a directory.",
|
|
9833
|
-
"hasDynamicHelp": false,
|
|
9834
|
-
"multiple": false,
|
|
9835
|
-
"type": "option"
|
|
9836
|
-
},
|
|
9837
|
-
"except": {
|
|
9838
|
-
"char": "e",
|
|
9839
|
-
"description": "List of filters",
|
|
9840
|
-
"name": "except",
|
|
9841
|
-
"default": [],
|
|
9842
|
-
"hasDynamicHelp": false,
|
|
9843
|
-
"multiple": true,
|
|
9844
|
-
"type": "option"
|
|
9845
|
-
},
|
|
9846
|
-
"debug": {
|
|
9847
|
-
"char": "d",
|
|
9848
|
-
"description": "Activate debug mode (more logs)",
|
|
9849
|
-
"name": "debug",
|
|
9850
|
-
"allowNo": false,
|
|
9851
|
-
"type": "boolean"
|
|
9852
|
-
},
|
|
9853
|
-
"websocket": {
|
|
9854
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9855
|
-
"name": "websocket",
|
|
9856
|
-
"hasDynamicHelp": false,
|
|
9857
|
-
"multiple": false,
|
|
9858
|
-
"type": "option"
|
|
9859
|
-
},
|
|
9860
|
-
"skipauth": {
|
|
9861
|
-
"description": "Skip authentication check when a default username is required",
|
|
9862
|
-
"name": "skipauth",
|
|
9863
|
-
"allowNo": false,
|
|
9864
|
-
"type": "boolean"
|
|
9865
|
-
}
|
|
9866
|
-
},
|
|
9867
|
-
"hasDynamicHelp": false,
|
|
9868
|
-
"hiddenAliases": [],
|
|
9869
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
9870
|
-
"pluginAlias": "sfdx-hardis",
|
|
9871
|
-
"pluginName": "sfdx-hardis",
|
|
9872
|
-
"pluginType": "core",
|
|
9873
|
-
"strict": true,
|
|
9874
|
-
"enableJsonFlag": true,
|
|
9875
|
-
"title": "Convert Profiles into Permission Sets",
|
|
9876
|
-
"requiresProject": true,
|
|
9877
|
-
"requiresSfdxPlugins": [
|
|
9878
|
-
"shane-sfdx-plugins"
|
|
9879
|
-
],
|
|
9880
|
-
"isESM": true,
|
|
9881
|
-
"relativePath": [
|
|
9882
|
-
"lib",
|
|
9883
|
-
"commands",
|
|
9884
|
-
"hardis",
|
|
9885
|
-
"project",
|
|
9886
|
-
"convert",
|
|
9887
|
-
"profilestopermsets.js"
|
|
9888
|
-
],
|
|
9889
|
-
"aliasPermutations": [],
|
|
9890
|
-
"permutations": [
|
|
9891
|
-
"hardis:project:convert:profilestopermsets",
|
|
9892
|
-
"project:hardis:convert:profilestopermsets",
|
|
9893
|
-
"project:convert:hardis:profilestopermsets",
|
|
9894
|
-
"project:convert:profilestopermsets:hardis",
|
|
9895
|
-
"hardis:convert:project:profilestopermsets",
|
|
9896
|
-
"convert:hardis:project:profilestopermsets",
|
|
9897
|
-
"convert:project:hardis:profilestopermsets",
|
|
9898
|
-
"convert:project:profilestopermsets:hardis",
|
|
9899
|
-
"hardis:convert:profilestopermsets:project",
|
|
9900
|
-
"convert:hardis:profilestopermsets:project",
|
|
9901
|
-
"convert:profilestopermsets:hardis:project",
|
|
9902
|
-
"convert:profilestopermsets:project:hardis",
|
|
9903
|
-
"hardis:project:profilestopermsets:convert",
|
|
9904
|
-
"project:hardis:profilestopermsets:convert",
|
|
9905
|
-
"project:profilestopermsets:hardis:convert",
|
|
9906
|
-
"project:profilestopermsets:convert:hardis",
|
|
9907
|
-
"hardis:profilestopermsets:project:convert",
|
|
9908
|
-
"profilestopermsets:hardis:project:convert",
|
|
9909
|
-
"profilestopermsets:project:hardis:convert",
|
|
9910
|
-
"profilestopermsets:project:convert:hardis",
|
|
9911
|
-
"hardis:profilestopermsets:convert:project",
|
|
9912
|
-
"profilestopermsets:hardis:convert:project",
|
|
9913
|
-
"profilestopermsets:convert:hardis:project",
|
|
9914
|
-
"profilestopermsets:convert:project:hardis"
|
|
9915
|
-
]
|
|
9916
|
-
},
|
|
9917
9821
|
"hardis:project:clean:emptyitems": {
|
|
9918
9822
|
"aliases": [],
|
|
9919
9823
|
"args": {},
|
|
@@ -11293,140 +11197,40 @@
|
|
|
11293
11197
|
},
|
|
11294
11198
|
"folder": {
|
|
11295
11199
|
"char": "f",
|
|
11296
|
-
"description": "Root folder",
|
|
11297
|
-
"name": "folder",
|
|
11298
|
-
"default": "force-app",
|
|
11299
|
-
"hasDynamicHelp": false,
|
|
11300
|
-
"multiple": false,
|
|
11301
|
-
"type": "option"
|
|
11302
|
-
},
|
|
11303
|
-
"globpattern": {
|
|
11304
|
-
"char": "p",
|
|
11305
|
-
"dependsOn": [
|
|
11306
|
-
"xpath"
|
|
11307
|
-
],
|
|
11308
|
-
"description": "Glob pattern to find files to clean. Ex: /**/*.flexipage-meta.xml",
|
|
11309
|
-
"name": "globpattern",
|
|
11310
|
-
"hasDynamicHelp": false,
|
|
11311
|
-
"multiple": false,
|
|
11312
|
-
"type": "option"
|
|
11313
|
-
},
|
|
11314
|
-
"xpath": {
|
|
11315
|
-
"char": "x",
|
|
11316
|
-
"dependsOn": [
|
|
11317
|
-
"globpattern"
|
|
11318
|
-
],
|
|
11319
|
-
"description": "XPath to use to detect the elements to remove. Ex: //ns:flexiPageRegions//ns:name[contains(text(),'dashboardName')]",
|
|
11320
|
-
"name": "xpath",
|
|
11321
|
-
"hasDynamicHelp": false,
|
|
11322
|
-
"multiple": false,
|
|
11323
|
-
"type": "option"
|
|
11324
|
-
},
|
|
11325
|
-
"namespace": {
|
|
11326
|
-
"char": "n",
|
|
11327
|
-
"description": "XML Namespace to use",
|
|
11328
|
-
"name": "namespace",
|
|
11329
|
-
"default": "http://soap.sforce.com/2006/04/metadata",
|
|
11330
|
-
"hasDynamicHelp": false,
|
|
11331
|
-
"multiple": false,
|
|
11332
|
-
"type": "option"
|
|
11333
|
-
},
|
|
11334
|
-
"debug": {
|
|
11335
|
-
"char": "d",
|
|
11336
|
-
"description": "Activate debug mode (more logs)",
|
|
11337
|
-
"name": "debug",
|
|
11338
|
-
"allowNo": false,
|
|
11339
|
-
"type": "boolean"
|
|
11340
|
-
},
|
|
11341
|
-
"websocket": {
|
|
11342
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11343
|
-
"name": "websocket",
|
|
11344
|
-
"hasDynamicHelp": false,
|
|
11345
|
-
"multiple": false,
|
|
11346
|
-
"type": "option"
|
|
11347
|
-
},
|
|
11348
|
-
"skipauth": {
|
|
11349
|
-
"description": "Skip authentication check when a default username is required",
|
|
11350
|
-
"name": "skipauth",
|
|
11351
|
-
"allowNo": false,
|
|
11352
|
-
"type": "boolean"
|
|
11353
|
-
}
|
|
11354
|
-
},
|
|
11355
|
-
"hasDynamicHelp": false,
|
|
11356
|
-
"hiddenAliases": [],
|
|
11357
|
-
"id": "hardis:project:clean:xml",
|
|
11358
|
-
"pluginAlias": "sfdx-hardis",
|
|
11359
|
-
"pluginName": "sfdx-hardis",
|
|
11360
|
-
"pluginType": "core",
|
|
11361
|
-
"strict": true,
|
|
11362
|
-
"enableJsonFlag": true,
|
|
11363
|
-
"title": "Clean retrieved empty items in dx sources",
|
|
11364
|
-
"requiresProject": true,
|
|
11365
|
-
"isESM": true,
|
|
11366
|
-
"relativePath": [
|
|
11367
|
-
"lib",
|
|
11368
|
-
"commands",
|
|
11369
|
-
"hardis",
|
|
11370
|
-
"project",
|
|
11371
|
-
"clean",
|
|
11372
|
-
"xml.js"
|
|
11373
|
-
],
|
|
11374
|
-
"aliasPermutations": [],
|
|
11375
|
-
"permutations": [
|
|
11376
|
-
"hardis:project:clean:xml",
|
|
11377
|
-
"project:hardis:clean:xml",
|
|
11378
|
-
"project:clean:hardis:xml",
|
|
11379
|
-
"project:clean:xml:hardis",
|
|
11380
|
-
"hardis:clean:project:xml",
|
|
11381
|
-
"clean:hardis:project:xml",
|
|
11382
|
-
"clean:project:hardis:xml",
|
|
11383
|
-
"clean:project:xml:hardis",
|
|
11384
|
-
"hardis:clean:xml:project",
|
|
11385
|
-
"clean:hardis:xml:project",
|
|
11386
|
-
"clean:xml:hardis:project",
|
|
11387
|
-
"clean:xml:project:hardis",
|
|
11388
|
-
"hardis:project:xml:clean",
|
|
11389
|
-
"project:hardis:xml:clean",
|
|
11390
|
-
"project:xml:hardis:clean",
|
|
11391
|
-
"project:xml:clean:hardis",
|
|
11392
|
-
"hardis:xml:project:clean",
|
|
11393
|
-
"xml:hardis:project:clean",
|
|
11394
|
-
"xml:project:hardis:clean",
|
|
11395
|
-
"xml:project:clean:hardis",
|
|
11396
|
-
"hardis:xml:clean:project",
|
|
11397
|
-
"xml:hardis:clean:project",
|
|
11398
|
-
"xml:clean:hardis:project",
|
|
11399
|
-
"xml:clean:project:hardis"
|
|
11400
|
-
]
|
|
11401
|
-
},
|
|
11402
|
-
"hardis:project:fix:profiletabs": {
|
|
11403
|
-
"aliases": [],
|
|
11404
|
-
"args": {},
|
|
11405
|
-
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
11406
|
-
"examples": [
|
|
11407
|
-
"$ sf hardis:project:fix:profiletabs"
|
|
11408
|
-
],
|
|
11409
|
-
"flags": {
|
|
11410
|
-
"json": {
|
|
11411
|
-
"description": "Format output as json.",
|
|
11412
|
-
"helpGroup": "GLOBAL",
|
|
11413
|
-
"name": "json",
|
|
11414
|
-
"allowNo": false,
|
|
11415
|
-
"type": "boolean"
|
|
11416
|
-
},
|
|
11417
|
-
"flags-dir": {
|
|
11418
|
-
"helpGroup": "GLOBAL",
|
|
11419
|
-
"name": "flags-dir",
|
|
11420
|
-
"summary": "Import flag values from a directory.",
|
|
11200
|
+
"description": "Root folder",
|
|
11201
|
+
"name": "folder",
|
|
11202
|
+
"default": "force-app",
|
|
11421
11203
|
"hasDynamicHelp": false,
|
|
11422
11204
|
"multiple": false,
|
|
11423
11205
|
"type": "option"
|
|
11424
11206
|
},
|
|
11425
|
-
"
|
|
11207
|
+
"globpattern": {
|
|
11426
11208
|
"char": "p",
|
|
11427
|
-
"
|
|
11428
|
-
|
|
11429
|
-
|
|
11209
|
+
"dependsOn": [
|
|
11210
|
+
"xpath"
|
|
11211
|
+
],
|
|
11212
|
+
"description": "Glob pattern to find files to clean. Ex: /**/*.flexipage-meta.xml",
|
|
11213
|
+
"name": "globpattern",
|
|
11214
|
+
"hasDynamicHelp": false,
|
|
11215
|
+
"multiple": false,
|
|
11216
|
+
"type": "option"
|
|
11217
|
+
},
|
|
11218
|
+
"xpath": {
|
|
11219
|
+
"char": "x",
|
|
11220
|
+
"dependsOn": [
|
|
11221
|
+
"globpattern"
|
|
11222
|
+
],
|
|
11223
|
+
"description": "XPath to use to detect the elements to remove. Ex: //ns:flexiPageRegions//ns:name[contains(text(),'dashboardName')]",
|
|
11224
|
+
"name": "xpath",
|
|
11225
|
+
"hasDynamicHelp": false,
|
|
11226
|
+
"multiple": false,
|
|
11227
|
+
"type": "option"
|
|
11228
|
+
},
|
|
11229
|
+
"namespace": {
|
|
11230
|
+
"char": "n",
|
|
11231
|
+
"description": "XML Namespace to use",
|
|
11232
|
+
"name": "namespace",
|
|
11233
|
+
"default": "http://soap.sforce.com/2006/04/metadata",
|
|
11430
11234
|
"hasDynamicHelp": false,
|
|
11431
11235
|
"multiple": false,
|
|
11432
11236
|
"type": "option"
|
|
@@ -11450,32 +11254,17 @@
|
|
|
11450
11254
|
"name": "skipauth",
|
|
11451
11255
|
"allowNo": false,
|
|
11452
11256
|
"type": "boolean"
|
|
11453
|
-
},
|
|
11454
|
-
"target-org": {
|
|
11455
|
-
"aliases": [
|
|
11456
|
-
"targetusername",
|
|
11457
|
-
"u"
|
|
11458
|
-
],
|
|
11459
|
-
"char": "o",
|
|
11460
|
-
"deprecateAliases": true,
|
|
11461
|
-
"name": "target-org",
|
|
11462
|
-
"noCacheDefault": true,
|
|
11463
|
-
"required": true,
|
|
11464
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
11465
|
-
"hasDynamicHelp": true,
|
|
11466
|
-
"multiple": false,
|
|
11467
|
-
"type": "option"
|
|
11468
11257
|
}
|
|
11469
11258
|
},
|
|
11470
|
-
"hasDynamicHelp":
|
|
11259
|
+
"hasDynamicHelp": false,
|
|
11471
11260
|
"hiddenAliases": [],
|
|
11472
|
-
"id": "hardis:project:
|
|
11261
|
+
"id": "hardis:project:clean:xml",
|
|
11473
11262
|
"pluginAlias": "sfdx-hardis",
|
|
11474
11263
|
"pluginName": "sfdx-hardis",
|
|
11475
11264
|
"pluginType": "core",
|
|
11476
11265
|
"strict": true,
|
|
11477
11266
|
"enableJsonFlag": true,
|
|
11478
|
-
"title": "
|
|
11267
|
+
"title": "Clean retrieved empty items in dx sources",
|
|
11479
11268
|
"requiresProject": true,
|
|
11480
11269
|
"isESM": true,
|
|
11481
11270
|
"relativePath": [
|
|
@@ -11483,43 +11272,43 @@
|
|
|
11483
11272
|
"commands",
|
|
11484
11273
|
"hardis",
|
|
11485
11274
|
"project",
|
|
11486
|
-
"
|
|
11487
|
-
"
|
|
11275
|
+
"clean",
|
|
11276
|
+
"xml.js"
|
|
11488
11277
|
],
|
|
11489
11278
|
"aliasPermutations": [],
|
|
11490
11279
|
"permutations": [
|
|
11491
|
-
"hardis:project:
|
|
11492
|
-
"project:hardis:
|
|
11493
|
-
"project:
|
|
11494
|
-
"project:
|
|
11495
|
-
"hardis:
|
|
11496
|
-
"
|
|
11497
|
-
"
|
|
11498
|
-
"
|
|
11499
|
-
"hardis:
|
|
11500
|
-
"
|
|
11501
|
-
"
|
|
11502
|
-
"
|
|
11503
|
-
"hardis:project:
|
|
11504
|
-
"project:hardis:
|
|
11505
|
-
"project:
|
|
11506
|
-
"project:
|
|
11507
|
-
"hardis:
|
|
11508
|
-
"
|
|
11509
|
-
"
|
|
11510
|
-
"
|
|
11511
|
-
"hardis:
|
|
11512
|
-
"
|
|
11513
|
-
"
|
|
11514
|
-
"
|
|
11280
|
+
"hardis:project:clean:xml",
|
|
11281
|
+
"project:hardis:clean:xml",
|
|
11282
|
+
"project:clean:hardis:xml",
|
|
11283
|
+
"project:clean:xml:hardis",
|
|
11284
|
+
"hardis:clean:project:xml",
|
|
11285
|
+
"clean:hardis:project:xml",
|
|
11286
|
+
"clean:project:hardis:xml",
|
|
11287
|
+
"clean:project:xml:hardis",
|
|
11288
|
+
"hardis:clean:xml:project",
|
|
11289
|
+
"clean:hardis:xml:project",
|
|
11290
|
+
"clean:xml:hardis:project",
|
|
11291
|
+
"clean:xml:project:hardis",
|
|
11292
|
+
"hardis:project:xml:clean",
|
|
11293
|
+
"project:hardis:xml:clean",
|
|
11294
|
+
"project:xml:hardis:clean",
|
|
11295
|
+
"project:xml:clean:hardis",
|
|
11296
|
+
"hardis:xml:project:clean",
|
|
11297
|
+
"xml:hardis:project:clean",
|
|
11298
|
+
"xml:project:hardis:clean",
|
|
11299
|
+
"xml:project:clean:hardis",
|
|
11300
|
+
"hardis:xml:clean:project",
|
|
11301
|
+
"xml:hardis:clean:project",
|
|
11302
|
+
"xml:clean:hardis:project",
|
|
11303
|
+
"xml:clean:project:hardis"
|
|
11515
11304
|
]
|
|
11516
11305
|
},
|
|
11517
|
-
"hardis:project:
|
|
11306
|
+
"hardis:project:convert:profilestopermsets": {
|
|
11518
11307
|
"aliases": [],
|
|
11519
11308
|
"args": {},
|
|
11520
|
-
"description": "\n## Command Behavior\n\n**
|
|
11309
|
+
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
11521
11310
|
"examples": [
|
|
11522
|
-
"$ sf hardis:project:
|
|
11311
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
11523
11312
|
],
|
|
11524
11313
|
"flags": {
|
|
11525
11314
|
"json": {
|
|
@@ -11537,13 +11326,13 @@
|
|
|
11537
11326
|
"multiple": false,
|
|
11538
11327
|
"type": "option"
|
|
11539
11328
|
},
|
|
11540
|
-
"
|
|
11541
|
-
"char": "
|
|
11542
|
-
"description": "
|
|
11543
|
-
"name": "
|
|
11544
|
-
"default":
|
|
11329
|
+
"except": {
|
|
11330
|
+
"char": "e",
|
|
11331
|
+
"description": "List of filters",
|
|
11332
|
+
"name": "except",
|
|
11333
|
+
"default": [],
|
|
11545
11334
|
"hasDynamicHelp": false,
|
|
11546
|
-
"multiple":
|
|
11335
|
+
"multiple": true,
|
|
11547
11336
|
"type": "option"
|
|
11548
11337
|
},
|
|
11549
11338
|
"debug": {
|
|
@@ -11569,49 +11358,52 @@
|
|
|
11569
11358
|
},
|
|
11570
11359
|
"hasDynamicHelp": false,
|
|
11571
11360
|
"hiddenAliases": [],
|
|
11572
|
-
"id": "hardis:project:
|
|
11361
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
11573
11362
|
"pluginAlias": "sfdx-hardis",
|
|
11574
11363
|
"pluginName": "sfdx-hardis",
|
|
11575
11364
|
"pluginType": "core",
|
|
11576
11365
|
"strict": true,
|
|
11577
11366
|
"enableJsonFlag": true,
|
|
11578
|
-
"title": "
|
|
11367
|
+
"title": "Convert Profiles into Permission Sets",
|
|
11579
11368
|
"requiresProject": true,
|
|
11369
|
+
"requiresSfdxPlugins": [
|
|
11370
|
+
"shane-sfdx-plugins"
|
|
11371
|
+
],
|
|
11580
11372
|
"isESM": true,
|
|
11581
11373
|
"relativePath": [
|
|
11582
11374
|
"lib",
|
|
11583
11375
|
"commands",
|
|
11584
11376
|
"hardis",
|
|
11585
11377
|
"project",
|
|
11586
|
-
"
|
|
11587
|
-
"
|
|
11378
|
+
"convert",
|
|
11379
|
+
"profilestopermsets.js"
|
|
11588
11380
|
],
|
|
11589
11381
|
"aliasPermutations": [],
|
|
11590
11382
|
"permutations": [
|
|
11591
|
-
"hardis:project:
|
|
11592
|
-
"project:hardis:
|
|
11593
|
-
"project:
|
|
11594
|
-
"project:
|
|
11595
|
-
"hardis:
|
|
11596
|
-
"
|
|
11597
|
-
"
|
|
11598
|
-
"
|
|
11599
|
-
"hardis:
|
|
11600
|
-
"
|
|
11601
|
-
"
|
|
11602
|
-
"
|
|
11603
|
-
"hardis:project:
|
|
11604
|
-
"project:hardis:
|
|
11605
|
-
"project:
|
|
11606
|
-
"project:
|
|
11607
|
-
"hardis:
|
|
11608
|
-
"
|
|
11609
|
-
"
|
|
11610
|
-
"
|
|
11611
|
-
"hardis:
|
|
11612
|
-
"
|
|
11613
|
-
"
|
|
11614
|
-
"
|
|
11383
|
+
"hardis:project:convert:profilestopermsets",
|
|
11384
|
+
"project:hardis:convert:profilestopermsets",
|
|
11385
|
+
"project:convert:hardis:profilestopermsets",
|
|
11386
|
+
"project:convert:profilestopermsets:hardis",
|
|
11387
|
+
"hardis:convert:project:profilestopermsets",
|
|
11388
|
+
"convert:hardis:project:profilestopermsets",
|
|
11389
|
+
"convert:project:hardis:profilestopermsets",
|
|
11390
|
+
"convert:project:profilestopermsets:hardis",
|
|
11391
|
+
"hardis:convert:profilestopermsets:project",
|
|
11392
|
+
"convert:hardis:profilestopermsets:project",
|
|
11393
|
+
"convert:profilestopermsets:hardis:project",
|
|
11394
|
+
"convert:profilestopermsets:project:hardis",
|
|
11395
|
+
"hardis:project:profilestopermsets:convert",
|
|
11396
|
+
"project:hardis:profilestopermsets:convert",
|
|
11397
|
+
"project:profilestopermsets:hardis:convert",
|
|
11398
|
+
"project:profilestopermsets:convert:hardis",
|
|
11399
|
+
"hardis:profilestopermsets:project:convert",
|
|
11400
|
+
"profilestopermsets:hardis:project:convert",
|
|
11401
|
+
"profilestopermsets:project:hardis:convert",
|
|
11402
|
+
"profilestopermsets:project:convert:hardis",
|
|
11403
|
+
"hardis:profilestopermsets:convert:project",
|
|
11404
|
+
"profilestopermsets:hardis:convert:project",
|
|
11405
|
+
"profilestopermsets:convert:hardis:project",
|
|
11406
|
+
"profilestopermsets:convert:project:hardis"
|
|
11615
11407
|
]
|
|
11616
11408
|
},
|
|
11617
11409
|
"hardis:project:deploy:notify": {
|
|
@@ -12789,14 +12581,127 @@
|
|
|
12789
12581
|
"validate:deploy:project:hardis"
|
|
12790
12582
|
]
|
|
12791
12583
|
},
|
|
12792
|
-
"hardis:project:
|
|
12584
|
+
"hardis:project:fix:profiletabs": {
|
|
12585
|
+
"aliases": [],
|
|
12586
|
+
"args": {},
|
|
12587
|
+
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
12588
|
+
"examples": [
|
|
12589
|
+
"$ sf hardis:project:fix:profiletabs"
|
|
12590
|
+
],
|
|
12591
|
+
"flags": {
|
|
12592
|
+
"json": {
|
|
12593
|
+
"description": "Format output as json.",
|
|
12594
|
+
"helpGroup": "GLOBAL",
|
|
12595
|
+
"name": "json",
|
|
12596
|
+
"allowNo": false,
|
|
12597
|
+
"type": "boolean"
|
|
12598
|
+
},
|
|
12599
|
+
"flags-dir": {
|
|
12600
|
+
"helpGroup": "GLOBAL",
|
|
12601
|
+
"name": "flags-dir",
|
|
12602
|
+
"summary": "Import flag values from a directory.",
|
|
12603
|
+
"hasDynamicHelp": false,
|
|
12604
|
+
"multiple": false,
|
|
12605
|
+
"type": "option"
|
|
12606
|
+
},
|
|
12607
|
+
"path": {
|
|
12608
|
+
"char": "p",
|
|
12609
|
+
"description": "Root folder",
|
|
12610
|
+
"name": "path",
|
|
12611
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12612
|
+
"hasDynamicHelp": false,
|
|
12613
|
+
"multiple": false,
|
|
12614
|
+
"type": "option"
|
|
12615
|
+
},
|
|
12616
|
+
"debug": {
|
|
12617
|
+
"char": "d",
|
|
12618
|
+
"description": "Activate debug mode (more logs)",
|
|
12619
|
+
"name": "debug",
|
|
12620
|
+
"allowNo": false,
|
|
12621
|
+
"type": "boolean"
|
|
12622
|
+
},
|
|
12623
|
+
"websocket": {
|
|
12624
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12625
|
+
"name": "websocket",
|
|
12626
|
+
"hasDynamicHelp": false,
|
|
12627
|
+
"multiple": false,
|
|
12628
|
+
"type": "option"
|
|
12629
|
+
},
|
|
12630
|
+
"skipauth": {
|
|
12631
|
+
"description": "Skip authentication check when a default username is required",
|
|
12632
|
+
"name": "skipauth",
|
|
12633
|
+
"allowNo": false,
|
|
12634
|
+
"type": "boolean"
|
|
12635
|
+
},
|
|
12636
|
+
"target-org": {
|
|
12637
|
+
"aliases": [
|
|
12638
|
+
"targetusername",
|
|
12639
|
+
"u"
|
|
12640
|
+
],
|
|
12641
|
+
"char": "o",
|
|
12642
|
+
"deprecateAliases": true,
|
|
12643
|
+
"name": "target-org",
|
|
12644
|
+
"noCacheDefault": true,
|
|
12645
|
+
"required": true,
|
|
12646
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
12647
|
+
"hasDynamicHelp": true,
|
|
12648
|
+
"multiple": false,
|
|
12649
|
+
"type": "option"
|
|
12650
|
+
}
|
|
12651
|
+
},
|
|
12652
|
+
"hasDynamicHelp": true,
|
|
12653
|
+
"hiddenAliases": [],
|
|
12654
|
+
"id": "hardis:project:fix:profiletabs",
|
|
12655
|
+
"pluginAlias": "sfdx-hardis",
|
|
12656
|
+
"pluginName": "sfdx-hardis",
|
|
12657
|
+
"pluginType": "core",
|
|
12658
|
+
"strict": true,
|
|
12659
|
+
"enableJsonFlag": true,
|
|
12660
|
+
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
12661
|
+
"requiresProject": true,
|
|
12662
|
+
"isESM": true,
|
|
12663
|
+
"relativePath": [
|
|
12664
|
+
"lib",
|
|
12665
|
+
"commands",
|
|
12666
|
+
"hardis",
|
|
12667
|
+
"project",
|
|
12668
|
+
"fix",
|
|
12669
|
+
"profiletabs.js"
|
|
12670
|
+
],
|
|
12671
|
+
"aliasPermutations": [],
|
|
12672
|
+
"permutations": [
|
|
12673
|
+
"hardis:project:fix:profiletabs",
|
|
12674
|
+
"project:hardis:fix:profiletabs",
|
|
12675
|
+
"project:fix:hardis:profiletabs",
|
|
12676
|
+
"project:fix:profiletabs:hardis",
|
|
12677
|
+
"hardis:fix:project:profiletabs",
|
|
12678
|
+
"fix:hardis:project:profiletabs",
|
|
12679
|
+
"fix:project:hardis:profiletabs",
|
|
12680
|
+
"fix:project:profiletabs:hardis",
|
|
12681
|
+
"hardis:fix:profiletabs:project",
|
|
12682
|
+
"fix:hardis:profiletabs:project",
|
|
12683
|
+
"fix:profiletabs:hardis:project",
|
|
12684
|
+
"fix:profiletabs:project:hardis",
|
|
12685
|
+
"hardis:project:profiletabs:fix",
|
|
12686
|
+
"project:hardis:profiletabs:fix",
|
|
12687
|
+
"project:profiletabs:hardis:fix",
|
|
12688
|
+
"project:profiletabs:fix:hardis",
|
|
12689
|
+
"hardis:profiletabs:project:fix",
|
|
12690
|
+
"profiletabs:hardis:project:fix",
|
|
12691
|
+
"profiletabs:project:hardis:fix",
|
|
12692
|
+
"profiletabs:project:fix:hardis",
|
|
12693
|
+
"hardis:profiletabs:fix:project",
|
|
12694
|
+
"profiletabs:hardis:fix:project",
|
|
12695
|
+
"profiletabs:fix:hardis:project",
|
|
12696
|
+
"profiletabs:fix:project:hardis"
|
|
12697
|
+
]
|
|
12698
|
+
},
|
|
12699
|
+
"hardis:project:fix:v53flexipages": {
|
|
12793
12700
|
"aliases": [],
|
|
12794
12701
|
"args": {},
|
|
12795
|
-
"description": "
|
|
12702
|
+
"description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
|
|
12796
12703
|
"examples": [
|
|
12797
|
-
"
|
|
12798
|
-
"\n$ sf hardis:project:metadata:findduplicates --file layout.layout-meta.xml\n[sfdx-hardis] Duplicate values in layout.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : Name\n",
|
|
12799
|
-
"\n$ sf hardis:project.metadata:findduplicates -f \"force-app/main/default/**/*.xml\"\n[sfdx-hardis] hardis:project:metadata:findduplicates execution time 0:00:00.397\n[sfdx-hardis] Duplicate values in layout1.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : CreatedById\n\n[sfdx-hardis] Duplicate values in layout2.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : LastModifiedById, Name\n"
|
|
12704
|
+
"$ sf hardis:project:fix:v53flexipages"
|
|
12800
12705
|
],
|
|
12801
12706
|
"flags": {
|
|
12802
12707
|
"json": {
|
|
@@ -12814,14 +12719,22 @@
|
|
|
12814
12719
|
"multiple": false,
|
|
12815
12720
|
"type": "option"
|
|
12816
12721
|
},
|
|
12817
|
-
"
|
|
12818
|
-
"char": "
|
|
12819
|
-
"description": "
|
|
12820
|
-
"name": "
|
|
12722
|
+
"path": {
|
|
12723
|
+
"char": "p",
|
|
12724
|
+
"description": "Root folder",
|
|
12725
|
+
"name": "path",
|
|
12726
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12821
12727
|
"hasDynamicHelp": false,
|
|
12822
|
-
"multiple":
|
|
12728
|
+
"multiple": false,
|
|
12823
12729
|
"type": "option"
|
|
12824
12730
|
},
|
|
12731
|
+
"debug": {
|
|
12732
|
+
"char": "d",
|
|
12733
|
+
"description": "Activate debug mode (more logs)",
|
|
12734
|
+
"name": "debug",
|
|
12735
|
+
"allowNo": false,
|
|
12736
|
+
"type": "boolean"
|
|
12737
|
+
},
|
|
12825
12738
|
"websocket": {
|
|
12826
12739
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12827
12740
|
"name": "websocket",
|
|
@@ -12838,32 +12751,13 @@
|
|
|
12838
12751
|
},
|
|
12839
12752
|
"hasDynamicHelp": false,
|
|
12840
12753
|
"hiddenAliases": [],
|
|
12841
|
-
"id": "hardis:project:
|
|
12754
|
+
"id": "hardis:project:fix:v53flexipages",
|
|
12842
12755
|
"pluginAlias": "sfdx-hardis",
|
|
12843
12756
|
"pluginName": "sfdx-hardis",
|
|
12844
12757
|
"pluginType": "core",
|
|
12845
12758
|
"strict": true,
|
|
12846
12759
|
"enableJsonFlag": true,
|
|
12847
|
-
"
|
|
12848
|
-
"layout": [
|
|
12849
|
-
"Layout.layoutSections.layoutColumns.layoutItems.field",
|
|
12850
|
-
"Layout.quickActionListItems.quickActionName"
|
|
12851
|
-
],
|
|
12852
|
-
"profile": [
|
|
12853
|
-
"Profile.fieldPermissions.field",
|
|
12854
|
-
"Profile.objectPermissions.object",
|
|
12855
|
-
"Profile.classAccesses.apexClass"
|
|
12856
|
-
],
|
|
12857
|
-
"labels": [
|
|
12858
|
-
"CustomLabels.labels.fullName"
|
|
12859
|
-
],
|
|
12860
|
-
"permissionset": [
|
|
12861
|
-
"PermissionSet.fieldPermissions.field",
|
|
12862
|
-
"PermissionSet.objectPermissions.object",
|
|
12863
|
-
"PermissionSet.classAccesses.apexClass"
|
|
12864
|
-
]
|
|
12865
|
-
},
|
|
12866
|
-
"title": "XML duplicate values finder",
|
|
12760
|
+
"title": "Fix flexipages for v53",
|
|
12867
12761
|
"requiresProject": true,
|
|
12868
12762
|
"isESM": true,
|
|
12869
12763
|
"relativePath": [
|
|
@@ -12871,35 +12765,35 @@
|
|
|
12871
12765
|
"commands",
|
|
12872
12766
|
"hardis",
|
|
12873
12767
|
"project",
|
|
12874
|
-
"
|
|
12875
|
-
"
|
|
12768
|
+
"fix",
|
|
12769
|
+
"v53flexipages.js"
|
|
12876
12770
|
],
|
|
12877
12771
|
"aliasPermutations": [],
|
|
12878
12772
|
"permutations": [
|
|
12879
|
-
"hardis:project:
|
|
12880
|
-
"project:hardis:
|
|
12881
|
-
"project:
|
|
12882
|
-
"project:
|
|
12883
|
-
"hardis:
|
|
12884
|
-
"
|
|
12885
|
-
"
|
|
12886
|
-
"
|
|
12887
|
-
"hardis:
|
|
12888
|
-
"
|
|
12889
|
-
"
|
|
12890
|
-
"
|
|
12891
|
-
"hardis:project:
|
|
12892
|
-
"project:hardis:
|
|
12893
|
-
"project:
|
|
12894
|
-
"project:
|
|
12895
|
-
"hardis:
|
|
12896
|
-
"
|
|
12897
|
-
"
|
|
12898
|
-
"
|
|
12899
|
-
"hardis:
|
|
12900
|
-
"
|
|
12901
|
-
"
|
|
12902
|
-
"
|
|
12773
|
+
"hardis:project:fix:v53flexipages",
|
|
12774
|
+
"project:hardis:fix:v53flexipages",
|
|
12775
|
+
"project:fix:hardis:v53flexipages",
|
|
12776
|
+
"project:fix:v53flexipages:hardis",
|
|
12777
|
+
"hardis:fix:project:v53flexipages",
|
|
12778
|
+
"fix:hardis:project:v53flexipages",
|
|
12779
|
+
"fix:project:hardis:v53flexipages",
|
|
12780
|
+
"fix:project:v53flexipages:hardis",
|
|
12781
|
+
"hardis:fix:v53flexipages:project",
|
|
12782
|
+
"fix:hardis:v53flexipages:project",
|
|
12783
|
+
"fix:v53flexipages:hardis:project",
|
|
12784
|
+
"fix:v53flexipages:project:hardis",
|
|
12785
|
+
"hardis:project:v53flexipages:fix",
|
|
12786
|
+
"project:hardis:v53flexipages:fix",
|
|
12787
|
+
"project:v53flexipages:hardis:fix",
|
|
12788
|
+
"project:v53flexipages:fix:hardis",
|
|
12789
|
+
"hardis:v53flexipages:project:fix",
|
|
12790
|
+
"v53flexipages:hardis:project:fix",
|
|
12791
|
+
"v53flexipages:project:hardis:fix",
|
|
12792
|
+
"v53flexipages:project:fix:hardis",
|
|
12793
|
+
"hardis:v53flexipages:fix:project",
|
|
12794
|
+
"v53flexipages:hardis:fix:project",
|
|
12795
|
+
"v53flexipages:fix:hardis:project",
|
|
12796
|
+
"v53flexipages:fix:project:hardis"
|
|
12903
12797
|
]
|
|
12904
12798
|
},
|
|
12905
12799
|
"hardis:project:generate:bypass": {
|
|
@@ -13297,6 +13191,119 @@
|
|
|
13297
13191
|
"gitdelta:generate:project:hardis"
|
|
13298
13192
|
]
|
|
13299
13193
|
},
|
|
13194
|
+
"hardis:project:metadata:findduplicates": {
|
|
13195
|
+
"aliases": [],
|
|
13196
|
+
"args": {},
|
|
13197
|
+
"description": "find duplicate values in XML file(s).\n Find duplicate values in XML file(s). Keys to be checked can be configured in `config/sfdx-hardis.yml` using property metadataDuplicateFindKeys.\n\nDefault config :\nmetadataDuplicateFindKeys :\n[object Object]\n",
|
|
13198
|
+
"examples": [
|
|
13199
|
+
"\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Layout xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <layoutSections>\n ...\n <layoutColumns>\n <layoutItems>\n <behavior>Required</behavior>\n <field>Name</field>\n </layoutItems>\n <layoutItems>\n <behavior>Required</behavior>\n <field>Name</field>\n </layoutItems>\n </layoutColumns>\n </layoutSections>\n</Layout>\n",
|
|
13200
|
+
"\n$ sf hardis:project:metadata:findduplicates --file layout.layout-meta.xml\n[sfdx-hardis] Duplicate values in layout.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : Name\n",
|
|
13201
|
+
"\n$ sf hardis:project.metadata:findduplicates -f \"force-app/main/default/**/*.xml\"\n[sfdx-hardis] hardis:project:metadata:findduplicates execution time 0:00:00.397\n[sfdx-hardis] Duplicate values in layout1.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : CreatedById\n\n[sfdx-hardis] Duplicate values in layout2.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : LastModifiedById, Name\n"
|
|
13202
|
+
],
|
|
13203
|
+
"flags": {
|
|
13204
|
+
"json": {
|
|
13205
|
+
"description": "Format output as json.",
|
|
13206
|
+
"helpGroup": "GLOBAL",
|
|
13207
|
+
"name": "json",
|
|
13208
|
+
"allowNo": false,
|
|
13209
|
+
"type": "boolean"
|
|
13210
|
+
},
|
|
13211
|
+
"flags-dir": {
|
|
13212
|
+
"helpGroup": "GLOBAL",
|
|
13213
|
+
"name": "flags-dir",
|
|
13214
|
+
"summary": "Import flag values from a directory.",
|
|
13215
|
+
"hasDynamicHelp": false,
|
|
13216
|
+
"multiple": false,
|
|
13217
|
+
"type": "option"
|
|
13218
|
+
},
|
|
13219
|
+
"files": {
|
|
13220
|
+
"char": "f",
|
|
13221
|
+
"description": "XML metadata files path",
|
|
13222
|
+
"name": "files",
|
|
13223
|
+
"hasDynamicHelp": false,
|
|
13224
|
+
"multiple": true,
|
|
13225
|
+
"type": "option"
|
|
13226
|
+
},
|
|
13227
|
+
"websocket": {
|
|
13228
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
13229
|
+
"name": "websocket",
|
|
13230
|
+
"hasDynamicHelp": false,
|
|
13231
|
+
"multiple": false,
|
|
13232
|
+
"type": "option"
|
|
13233
|
+
},
|
|
13234
|
+
"skipauth": {
|
|
13235
|
+
"description": "Skip authentication check when a default username is required",
|
|
13236
|
+
"name": "skipauth",
|
|
13237
|
+
"allowNo": false,
|
|
13238
|
+
"type": "boolean"
|
|
13239
|
+
}
|
|
13240
|
+
},
|
|
13241
|
+
"hasDynamicHelp": false,
|
|
13242
|
+
"hiddenAliases": [],
|
|
13243
|
+
"id": "hardis:project:metadata:findduplicates",
|
|
13244
|
+
"pluginAlias": "sfdx-hardis",
|
|
13245
|
+
"pluginName": "sfdx-hardis",
|
|
13246
|
+
"pluginType": "core",
|
|
13247
|
+
"strict": true,
|
|
13248
|
+
"enableJsonFlag": true,
|
|
13249
|
+
"metadataDuplicateFindKeys": {
|
|
13250
|
+
"layout": [
|
|
13251
|
+
"Layout.layoutSections.layoutColumns.layoutItems.field",
|
|
13252
|
+
"Layout.quickActionListItems.quickActionName"
|
|
13253
|
+
],
|
|
13254
|
+
"profile": [
|
|
13255
|
+
"Profile.fieldPermissions.field",
|
|
13256
|
+
"Profile.objectPermissions.object",
|
|
13257
|
+
"Profile.classAccesses.apexClass"
|
|
13258
|
+
],
|
|
13259
|
+
"labels": [
|
|
13260
|
+
"CustomLabels.labels.fullName"
|
|
13261
|
+
],
|
|
13262
|
+
"permissionset": [
|
|
13263
|
+
"PermissionSet.fieldPermissions.field",
|
|
13264
|
+
"PermissionSet.objectPermissions.object",
|
|
13265
|
+
"PermissionSet.classAccesses.apexClass"
|
|
13266
|
+
]
|
|
13267
|
+
},
|
|
13268
|
+
"title": "XML duplicate values finder",
|
|
13269
|
+
"requiresProject": true,
|
|
13270
|
+
"isESM": true,
|
|
13271
|
+
"relativePath": [
|
|
13272
|
+
"lib",
|
|
13273
|
+
"commands",
|
|
13274
|
+
"hardis",
|
|
13275
|
+
"project",
|
|
13276
|
+
"metadata",
|
|
13277
|
+
"findduplicates.js"
|
|
13278
|
+
],
|
|
13279
|
+
"aliasPermutations": [],
|
|
13280
|
+
"permutations": [
|
|
13281
|
+
"hardis:project:metadata:findduplicates",
|
|
13282
|
+
"project:hardis:metadata:findduplicates",
|
|
13283
|
+
"project:metadata:hardis:findduplicates",
|
|
13284
|
+
"project:metadata:findduplicates:hardis",
|
|
13285
|
+
"hardis:metadata:project:findduplicates",
|
|
13286
|
+
"metadata:hardis:project:findduplicates",
|
|
13287
|
+
"metadata:project:hardis:findduplicates",
|
|
13288
|
+
"metadata:project:findduplicates:hardis",
|
|
13289
|
+
"hardis:metadata:findduplicates:project",
|
|
13290
|
+
"metadata:hardis:findduplicates:project",
|
|
13291
|
+
"metadata:findduplicates:hardis:project",
|
|
13292
|
+
"metadata:findduplicates:project:hardis",
|
|
13293
|
+
"hardis:project:findduplicates:metadata",
|
|
13294
|
+
"project:hardis:findduplicates:metadata",
|
|
13295
|
+
"project:findduplicates:hardis:metadata",
|
|
13296
|
+
"project:findduplicates:metadata:hardis",
|
|
13297
|
+
"hardis:findduplicates:project:metadata",
|
|
13298
|
+
"findduplicates:hardis:project:metadata",
|
|
13299
|
+
"findduplicates:project:hardis:metadata",
|
|
13300
|
+
"findduplicates:project:metadata:hardis",
|
|
13301
|
+
"hardis:findduplicates:metadata:project",
|
|
13302
|
+
"findduplicates:hardis:metadata:project",
|
|
13303
|
+
"findduplicates:metadata:hardis:project",
|
|
13304
|
+
"findduplicates:metadata:project:hardis"
|
|
13305
|
+
]
|
|
13306
|
+
},
|
|
13300
13307
|
"hardis:scratch:pool:create": {
|
|
13301
13308
|
"aliases": [],
|
|
13302
13309
|
"args": {},
|
|
@@ -15271,5 +15278,5 @@
|
|
|
15271
15278
|
]
|
|
15272
15279
|
}
|
|
15273
15280
|
},
|
|
15274
|
-
"version": "6.
|
|
15281
|
+
"version": "6.5.0"
|
|
15275
15282
|
}
|