sfdx-hardis 6.0.1-beta202508101506.0 → 6.0.2-beta202508111351.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 -1
- package/README.md +3 -3
- package/lib/commands/hardis/doc/fieldusage.js +4 -2
- package/lib/commands/hardis/doc/fieldusage.js.map +1 -1
- package/lib/commands/hardis/doc/project2markdown.js +1 -1
- package/lib/commands/hardis/doc/project2markdown.js.map +1 -1
- package/lib/commands/hardis/lint/access.js +3 -3
- package/lib/commands/hardis/lint/access.js.map +1 -1
- package/lib/commands/hardis/org/configure/data.js +19 -5
- package/lib/commands/hardis/org/configure/data.js.map +1 -1
- package/lib/commands/hardis/org/configure/files.js +6 -1
- package/lib/commands/hardis/org/configure/files.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/licenses.js +2 -2
- package/lib/commands/hardis/org/diagnose/licenses.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/releaseupdates.js +3 -3
- package/lib/commands/hardis/org/diagnose/releaseupdates.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/unused-apex-classes.js +3 -4
- package/lib/commands/hardis/org/diagnose/unused-apex-classes.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/unused-connected-apps.js +3 -4
- package/lib/commands/hardis/org/diagnose/unused-connected-apps.js.map +1 -1
- package/lib/commands/hardis/org/generate/packagexmlfull.js +1 -1
- package/lib/commands/hardis/org/generate/packagexmlfull.js.map +1 -1
- package/lib/commands/hardis/org/monitor/all.js +3 -3
- package/lib/commands/hardis/org/monitor/all.js.map +1 -1
- package/lib/commands/hardis/org/monitor/limits.js +2 -2
- package/lib/commands/hardis/org/monitor/limits.js.map +1 -1
- package/lib/commands/hardis/org/purge/flow.js +7 -5
- package/lib/commands/hardis/org/purge/flow.js.map +1 -1
- package/lib/commands/hardis/org/select.js +1 -1
- package/lib/commands/hardis/org/user/activateinvalid.js +6 -4
- package/lib/commands/hardis/org/user/activateinvalid.js.map +1 -1
- package/lib/commands/hardis/org/user/freeze.js +4 -6
- package/lib/commands/hardis/org/user/freeze.js.map +1 -1
- package/lib/commands/hardis/org/user/unfreeze.js +4 -6
- package/lib/commands/hardis/org/user/unfreeze.js.map +1 -1
- package/lib/commands/hardis/project/audit/apiversion.js +3 -3
- package/lib/commands/hardis/project/audit/apiversion.js.map +1 -1
- package/lib/commands/hardis/project/audit/callincallout.js +4 -2
- package/lib/commands/hardis/project/audit/callincallout.js.map +1 -1
- package/lib/commands/hardis/project/audit/remotesites.js +4 -2
- package/lib/commands/hardis/project/audit/remotesites.js.map +1 -1
- package/lib/commands/hardis/project/clean/references.js +3 -4
- package/lib/commands/hardis/project/clean/references.js.map +1 -1
- package/lib/commands/hardis/project/generate/bypass.js +5 -3
- package/lib/commands/hardis/project/generate/bypass.js.map +1 -1
- package/lib/commands/hardis/project/generate/gitdelta.js +2 -2
- package/lib/commands/hardis/project/generate/gitdelta.js.map +1 -1
- package/lib/commands/hardis/scratch/pull.js +3 -0
- package/lib/commands/hardis/scratch/pull.js.map +1 -1
- package/lib/commands/hardis/work/new.js +20 -20
- package/lib/commands/hardis/work/new.js.map +1 -1
- package/lib/commands/hardis/work/refresh.js +2 -2
- package/lib/commands/hardis/work/refresh.js.map +1 -1
- package/lib/commands/hardis/work/save.js +23 -19
- package/lib/commands/hardis/work/save.js.map +1 -1
- package/lib/common/gitProvider/index.d.ts +2 -0
- package/lib/common/gitProvider/index.js +55 -0
- package/lib/common/gitProvider/index.js.map +1 -1
- package/lib/common/utils/deployUtils.js +19 -7
- package/lib/common/utils/deployUtils.js.map +1 -1
- package/lib/common/utils/filesUtils.js +2 -2
- package/lib/common/utils/filesUtils.js.map +1 -1
- package/lib/common/utils/gitUtils.js +27 -5
- package/lib/common/utils/gitUtils.js.map +1 -1
- package/lib/common/utils/index.d.ts +1 -0
- package/lib/common/utils/index.js +62 -4
- package/lib/common/utils/index.js.map +1 -1
- package/lib/common/utils/orgUtils.js +1 -1
- package/lib/common/utils/orgUtils.js.map +1 -1
- package/lib/common/utils/prompts.js +3 -3
- package/lib/common/utils/prompts.js.map +1 -1
- package/lib/common/utils/xmlUtils.js +1 -4
- package/lib/common/utils/xmlUtils.js.map +1 -1
- package/lib/common/websocketClient.d.ts +4 -2
- package/lib/common/websocketClient.js +6 -2
- package/lib/common/websocketClient.js.map +1 -1
- package/messages/org.md +2 -2
- package/oclif.lock +1 -9
- package/oclif.manifest.json +1007 -1007
- package/package.json +1 -2
package/oclif.manifest.json
CHANGED
|
@@ -3914,7 +3914,7 @@
|
|
|
3914
3914
|
"hardis:work:new": {
|
|
3915
3915
|
"aliases": [],
|
|
3916
3916
|
"args": {},
|
|
3917
|
-
"description": "\n## Command Behavior\n\n**Assisted menu to start working on a Salesforce
|
|
3917
|
+
"description": "\n## Command Behavior\n\n**Assisted menu to start working on a Salesforce User Story, streamlining the setup of your development environment.**\n\nThis command guides you through the process of preparing your local environment and a Salesforce org for a new development or configuration based User Story. It automates several steps, ensuring consistency and adherence to project standards.\n\nKey features include:\n\n- **Git Branch Management:** Ensures your local Git repository is up-to-date with the target branch and creates a new Git branch with a formatted name based on your User Story details. Branch naming conventions can be customized via the `branchPrefixChoices` property in `.sfdx-hardis.yml`.\n- **Org Provisioning & Initialization:** Facilitates the creation and initialization of either a scratch org or a source-tracked sandbox. The configuration for org initialization (e.g., package installation, source push, permission set assignments, Apex script execution, data loading) can be defined in `config/.sfdx-hardis.yml- **Project-Specific Configuration:** Supports defining multiple target branches (`availableTargetBranches`) and projects (`availableProjects`) in `.sfdx-hardis.yml`, allowing for tailored User Stories workflows.\n- **User Story Name Validation:** Enforces User Story name formatting using `newTaskNameRegex` and provides examples via `newTaskNameRegexExample- **Shared Development Sandboxes:** Accounts for scenarios with shared development sandboxes, adjusting prompts to prevent accidental overwrites.\n\nAdvanced instructions are available in the [Create New User Story documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-create-new-task/).\n\n## Technical explanations\n\nThe command's logic orchestrates various underlying processes:\n\n- **Git Operations:** Utilizes `checkGitClean`, `ensureGitBranch`, `gitCheckOutRemote`, and `git().pull()` to manage Git repository state and branches.\n- **Interactive Prompts:** Leverages the `prompts` library to gather user input for User Story type, source types, and User Story names.\n- **Configuration Management:** Reads and applies project-specific configurations from `.sfdx-hardis.yml` using `getConfig` and `setConfig- **Org Initialization Utilities:** Calls a suite of utility functions for org setup, including `initApexScripts`, `initOrgData`, `initOrgMetadatas`, `initPermissionSetAssignments`, `installPackages`, and `makeSureOrgIsConnected- **Salesforce CLI Interaction:** Executes Salesforce CLI commands (e.g., `sf config set target-org`, `sf org open`, `sf project delete tracking`) via `execCommand` and `execSfdxJson- **Dynamic Org Selection:** Presents choices for scratch orgs or sandboxes based on project configuration and existing orgs, dynamically calling `ScratchCreate.run` or `SandboxCreate.run` as needed.\n- **WebSocket Communication:** Sends refresh status messages via `WebSocketClient.sendRefreshStatusMessage()` to update connected VS Code clients.\n",
|
|
3918
3918
|
"examples": [
|
|
3919
3919
|
"$ sf hardis:work:new"
|
|
3920
3920
|
],
|
|
@@ -3991,7 +3991,7 @@
|
|
|
3991
3991
|
"pluginType": "core",
|
|
3992
3992
|
"strict": true,
|
|
3993
3993
|
"enableJsonFlag": true,
|
|
3994
|
-
"title": "New
|
|
3994
|
+
"title": "New User Story",
|
|
3995
3995
|
"requiresProject": true,
|
|
3996
3996
|
"isESM": true,
|
|
3997
3997
|
"relativePath": [
|
|
@@ -4085,7 +4085,7 @@
|
|
|
4085
4085
|
"pluginType": "core",
|
|
4086
4086
|
"strict": true,
|
|
4087
4087
|
"enableJsonFlag": true,
|
|
4088
|
-
"title": "Refresh
|
|
4088
|
+
"title": "Refresh User Story branch",
|
|
4089
4089
|
"requiresProject": true,
|
|
4090
4090
|
"isESM": true,
|
|
4091
4091
|
"relativePath": [
|
|
@@ -4195,7 +4195,7 @@
|
|
|
4195
4195
|
"hardis:work:save": {
|
|
4196
4196
|
"aliases": [],
|
|
4197
4197
|
"args": {},
|
|
4198
|
-
"description": "\n## Command Behavior\n\n**Guides the user through the process of saving their work, preparing it for a
|
|
4198
|
+
"description": "\n## Command Behavior\n\n**Guides the user through the process of saving their work, preparing it for a Merge Request (also named Pull Request), and pushing changes to the remote Git repository.**\n\nThis command automates several critical steps involved in finalizing a development User Story and integrating it into the main codebase. It ensures that your local changes are properly synchronized, cleaned, and committed before being pushed.\n\nKey functionalities include:\n\n- **Git Status Management:** Ensures a clean Git working directory by handling ongoing merges and unstaging files.\n- **Org Synchronization (Optional):** Prompts the user to pull the latest metadata updates from their scratch org or source-tracked sandbox, ensuring local files reflect the org's state.\n- **Package.xml Updates:** Automatically generates `package.xml` and `destructiveChanges.xml` files based on the Git delta between your current branch and the target branch, reflecting added, modified, and deleted metadata.\n- **Automated Source Cleaning:** Applies predefined cleaning operations to your local Salesforce sources, such as removing unwanted references, minimizing profiles, or cleaning XML files based on configurations in your `.sfdx-hardis.yml`.\n - `autoCleanTypes`: A list of automated source cleanings, configurable via [hardis:project:clean:references](${CONSTANTS.DOC_URL_ROOT}/hardis/project/clean/references/).\n - `autoRemoveUserPermissions`: A list of user permissions to automatically remove from profile metadata.\n- **Deployment Plan Generation:** Builds an automated deployment plan based on the updated `package.xml` and configured deployment splits.\n- **Commit and Push:** Guides the user to commit the changes and push them to the remote Git repository, optionally handling force pushes if a branch reset occurred.\n- **Merge Request Guidance:** Provides information and links to facilitate the creation of a merge request after the changes are pushed.\n\nExample `.sfdx-hardis.yml` configuration:\n\n```yaml\nautoCleanTypes:\n - checkPermissions\n - destructivechanges\n - datadotcom\n - minimizeProfiles\n - listViewsMine\nautoRemoveUserPermissions:\n - EnableCommunityAppLauncher\n - FieldServiceAccess\n - OmnichannelInventorySync\n - SendExternalEmailAvailable\n - UseOmnichannelInventoryAPIs\n - ViewDataLeakageEvents\n - ViewMLModels\n - ViewPlatformEvents\n - WorkCalibrationUser\n```\n\nAdvanced instructions are available in the [Publish a User Story documentation](${CONSTANTS.DOC_URL_ROOT}/salesforce-ci-cd-publish-task/).\n\n## Technical explanations\n\nThe command's technical implementation involves a series of orchestrated steps:\n\n- **Git Integration:** Extensively uses the `git` utility for status checks, adding files, committing, and pushing. It also leverages `sfdx-git-delta` for generating metadata differences between Git revisions.\n- **Interactive Prompts:** Employs the `prompts` library to interact with the user for decisions like pulling sources or pushing commits.\n- **Configuration Management:** Reads and updates project and user configurations using `getConfig` and `setConfig` to store preferences and deployment plans.\n- **Metadata Synchronization:** Calls `forceSourcePull` to retrieve metadata from the org and `callSfdxGitDelta` to generate `package.xml` and `destructiveChanges.xml` based on Git changes.\n- **XML Manipulation:** Utilizes `appendPackageXmlFilesContent`, `removePackageXmlFilesContent`, `parseXmlFile`, and `writeXmlFile` for modifying `package.xml` and `destructiveChanges.xml` files.\n- **Automated Cleaning:** Integrates with `CleanReferences.run` and `CleanXml.run` commands to perform automated cleaning operations on the Salesforce source files.\n- **Deployment Plan Building:** Dynamically constructs a deployment plan by analyzing the `package.xml` content and applying configured deployment splits.\n- **WebSocket Communication:** Uses `WebSocketClient.sendRefreshStatusMessage` to notify connected VS Code clients about status updates.\n- **External Tool Integration:** Requires the `sfdx-git-delta` plugin to be installed for its core functionality.\n",
|
|
4199
4199
|
"examples": [
|
|
4200
4200
|
"$ sf hardis:work:task:save",
|
|
4201
4201
|
"$ sf hardis:work:task:save --nopull --nogit --noclean"
|
|
@@ -4294,7 +4294,7 @@
|
|
|
4294
4294
|
"pluginType": "core",
|
|
4295
4295
|
"strict": true,
|
|
4296
4296
|
"enableJsonFlag": true,
|
|
4297
|
-
"title": "Save
|
|
4297
|
+
"title": "Save User Story",
|
|
4298
4298
|
"requiresProject": true,
|
|
4299
4299
|
"requiresSfdxPlugins": [
|
|
4300
4300
|
"sfdx-git-delta"
|
|
@@ -5482,12 +5482,15 @@
|
|
|
5482
5482
|
"import:data:org:hardis"
|
|
5483
5483
|
]
|
|
5484
5484
|
},
|
|
5485
|
-
"hardis:org:
|
|
5485
|
+
"hardis:org:diagnose:audittrail": {
|
|
5486
5486
|
"aliases": [],
|
|
5487
5487
|
"args": {},
|
|
5488
|
-
"description": "
|
|
5488
|
+
"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",
|
|
5489
5489
|
"examples": [
|
|
5490
|
-
"$ sf hardis:org:
|
|
5490
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5491
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5492
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5493
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5491
5494
|
],
|
|
5492
5495
|
"flags": {
|
|
5493
5496
|
"json": {
|
|
@@ -5505,37 +5508,26 @@
|
|
|
5505
5508
|
"multiple": false,
|
|
5506
5509
|
"type": "option"
|
|
5507
5510
|
},
|
|
5508
|
-
"
|
|
5509
|
-
"char": "
|
|
5510
|
-
"description": "
|
|
5511
|
-
"name": "
|
|
5512
|
-
"hasDynamicHelp": false,
|
|
5513
|
-
"multiple": false,
|
|
5514
|
-
"type": "option"
|
|
5515
|
-
},
|
|
5516
|
-
"chunksize": {
|
|
5517
|
-
"char": "c",
|
|
5518
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
5519
|
-
"name": "chunksize",
|
|
5520
|
-
"default": 1000,
|
|
5511
|
+
"excludeusers": {
|
|
5512
|
+
"char": "e",
|
|
5513
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5514
|
+
"name": "excludeusers",
|
|
5521
5515
|
"hasDynamicHelp": false,
|
|
5522
5516
|
"multiple": false,
|
|
5523
5517
|
"type": "option"
|
|
5524
5518
|
},
|
|
5525
|
-
"
|
|
5519
|
+
"lastndays": {
|
|
5526
5520
|
"char": "t",
|
|
5527
|
-
"description": "
|
|
5528
|
-
"name": "
|
|
5529
|
-
"default": 300000,
|
|
5521
|
+
"description": "Number of days to extract from today (included)",
|
|
5522
|
+
"name": "lastndays",
|
|
5530
5523
|
"hasDynamicHelp": false,
|
|
5531
5524
|
"multiple": false,
|
|
5532
5525
|
"type": "option"
|
|
5533
5526
|
},
|
|
5534
|
-
"
|
|
5535
|
-
"char": "
|
|
5536
|
-
"description": "
|
|
5537
|
-
"name": "
|
|
5538
|
-
"default": 0,
|
|
5527
|
+
"outputfile": {
|
|
5528
|
+
"char": "f",
|
|
5529
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5530
|
+
"name": "outputfile",
|
|
5539
5531
|
"hasDynamicHelp": false,
|
|
5540
5532
|
"multiple": false,
|
|
5541
5533
|
"type": "option"
|
|
@@ -5578,13 +5570,13 @@
|
|
|
5578
5570
|
},
|
|
5579
5571
|
"hasDynamicHelp": true,
|
|
5580
5572
|
"hiddenAliases": [],
|
|
5581
|
-
"id": "hardis:org:
|
|
5573
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5582
5574
|
"pluginAlias": "sfdx-hardis",
|
|
5583
5575
|
"pluginName": "sfdx-hardis",
|
|
5584
5576
|
"pluginType": "core",
|
|
5585
5577
|
"strict": true,
|
|
5586
5578
|
"enableJsonFlag": true,
|
|
5587
|
-
"title": "
|
|
5579
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5588
5580
|
"requiresProject": false,
|
|
5589
5581
|
"isESM": true,
|
|
5590
5582
|
"relativePath": [
|
|
@@ -5592,43 +5584,43 @@
|
|
|
5592
5584
|
"commands",
|
|
5593
5585
|
"hardis",
|
|
5594
5586
|
"org",
|
|
5595
|
-
"
|
|
5596
|
-
"
|
|
5587
|
+
"diagnose",
|
|
5588
|
+
"audittrail.js"
|
|
5597
5589
|
],
|
|
5598
5590
|
"aliasPermutations": [],
|
|
5599
5591
|
"permutations": [
|
|
5600
|
-
"hardis:org:
|
|
5601
|
-
"org:hardis:
|
|
5602
|
-
"org:
|
|
5603
|
-
"org:
|
|
5604
|
-
"hardis:
|
|
5605
|
-
"
|
|
5606
|
-
"
|
|
5607
|
-
"
|
|
5608
|
-
"hardis:
|
|
5609
|
-
"
|
|
5610
|
-
"
|
|
5611
|
-
"
|
|
5612
|
-
"hardis:org:
|
|
5613
|
-
"org:hardis:
|
|
5614
|
-
"org:
|
|
5615
|
-
"org:
|
|
5616
|
-
"hardis:
|
|
5617
|
-
"
|
|
5618
|
-
"
|
|
5619
|
-
"
|
|
5620
|
-
"hardis:
|
|
5621
|
-
"
|
|
5622
|
-
"
|
|
5623
|
-
"
|
|
5592
|
+
"hardis:org:diagnose:audittrail",
|
|
5593
|
+
"org:hardis:diagnose:audittrail",
|
|
5594
|
+
"org:diagnose:hardis:audittrail",
|
|
5595
|
+
"org:diagnose:audittrail:hardis",
|
|
5596
|
+
"hardis:diagnose:org:audittrail",
|
|
5597
|
+
"diagnose:hardis:org:audittrail",
|
|
5598
|
+
"diagnose:org:hardis:audittrail",
|
|
5599
|
+
"diagnose:org:audittrail:hardis",
|
|
5600
|
+
"hardis:diagnose:audittrail:org",
|
|
5601
|
+
"diagnose:hardis:audittrail:org",
|
|
5602
|
+
"diagnose:audittrail:hardis:org",
|
|
5603
|
+
"diagnose:audittrail:org:hardis",
|
|
5604
|
+
"hardis:org:audittrail:diagnose",
|
|
5605
|
+
"org:hardis:audittrail:diagnose",
|
|
5606
|
+
"org:audittrail:hardis:diagnose",
|
|
5607
|
+
"org:audittrail:diagnose:hardis",
|
|
5608
|
+
"hardis:audittrail:org:diagnose",
|
|
5609
|
+
"audittrail:hardis:org:diagnose",
|
|
5610
|
+
"audittrail:org:hardis:diagnose",
|
|
5611
|
+
"audittrail:org:diagnose:hardis",
|
|
5612
|
+
"hardis:audittrail:diagnose:org",
|
|
5613
|
+
"audittrail:hardis:diagnose:org",
|
|
5614
|
+
"audittrail:diagnose:hardis:org",
|
|
5615
|
+
"audittrail:diagnose:org:hardis"
|
|
5624
5616
|
]
|
|
5625
5617
|
},
|
|
5626
|
-
"hardis:org:
|
|
5618
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5627
5619
|
"aliases": [],
|
|
5628
5620
|
"args": {},
|
|
5629
|
-
"description": "\
|
|
5621
|
+
"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## Technical explanations\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",
|
|
5630
5622
|
"examples": [
|
|
5631
|
-
"$ sf hardis:org:
|
|
5623
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5632
5624
|
],
|
|
5633
5625
|
"flags": {
|
|
5634
5626
|
"json": {
|
|
@@ -5646,21 +5638,6 @@
|
|
|
5646
5638
|
"multiple": false,
|
|
5647
5639
|
"type": "option"
|
|
5648
5640
|
},
|
|
5649
|
-
"path": {
|
|
5650
|
-
"char": "p",
|
|
5651
|
-
"description": "Path to the file export project",
|
|
5652
|
-
"name": "path",
|
|
5653
|
-
"hasDynamicHelp": false,
|
|
5654
|
-
"multiple": false,
|
|
5655
|
-
"type": "option"
|
|
5656
|
-
},
|
|
5657
|
-
"overwrite": {
|
|
5658
|
-
"char": "f",
|
|
5659
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
5660
|
-
"name": "overwrite",
|
|
5661
|
-
"allowNo": false,
|
|
5662
|
-
"type": "boolean"
|
|
5663
|
-
},
|
|
5664
5641
|
"debug": {
|
|
5665
5642
|
"char": "d",
|
|
5666
5643
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5699,13 +5676,13 @@
|
|
|
5699
5676
|
},
|
|
5700
5677
|
"hasDynamicHelp": true,
|
|
5701
5678
|
"hiddenAliases": [],
|
|
5702
|
-
"id": "hardis:org:
|
|
5679
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
5703
5680
|
"pluginAlias": "sfdx-hardis",
|
|
5704
5681
|
"pluginName": "sfdx-hardis",
|
|
5705
5682
|
"pluginType": "core",
|
|
5706
5683
|
"strict": true,
|
|
5707
5684
|
"enableJsonFlag": true,
|
|
5708
|
-
"title": "
|
|
5685
|
+
"title": "Get Instance Upgrade date",
|
|
5709
5686
|
"requiresProject": false,
|
|
5710
5687
|
"isESM": true,
|
|
5711
5688
|
"relativePath": [
|
|
@@ -5713,44 +5690,46 @@
|
|
|
5713
5690
|
"commands",
|
|
5714
5691
|
"hardis",
|
|
5715
5692
|
"org",
|
|
5716
|
-
"
|
|
5717
|
-
"
|
|
5693
|
+
"diagnose",
|
|
5694
|
+
"instanceupgrade.js"
|
|
5718
5695
|
],
|
|
5719
5696
|
"aliasPermutations": [],
|
|
5720
5697
|
"permutations": [
|
|
5721
|
-
"hardis:org:
|
|
5722
|
-
"org:hardis:
|
|
5723
|
-
"org:
|
|
5724
|
-
"org:
|
|
5725
|
-
"hardis:
|
|
5726
|
-
"
|
|
5727
|
-
"
|
|
5728
|
-
"
|
|
5729
|
-
"hardis:
|
|
5730
|
-
"
|
|
5731
|
-
"
|
|
5732
|
-
"
|
|
5733
|
-
"hardis:org:
|
|
5734
|
-
"org:hardis:
|
|
5735
|
-
"org:
|
|
5736
|
-
"org:
|
|
5737
|
-
"hardis:
|
|
5738
|
-
"
|
|
5739
|
-
"
|
|
5740
|
-
"
|
|
5741
|
-
"hardis:
|
|
5742
|
-
"
|
|
5743
|
-
"
|
|
5744
|
-
"
|
|
5698
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
5699
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
5700
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
5701
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
5702
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
5703
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
5704
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
5705
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
5706
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
5707
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
5708
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
5709
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
5710
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
5711
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
5712
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
5713
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
5714
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
5715
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
5716
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
5717
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
5718
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
5719
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
5720
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
5721
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
5745
5722
|
]
|
|
5746
5723
|
},
|
|
5747
|
-
"hardis:org:
|
|
5724
|
+
"hardis:org:diagnose:legacyapi": {
|
|
5748
5725
|
"aliases": [],
|
|
5749
5726
|
"args": {},
|
|
5750
|
-
"description": "
|
|
5727
|
+
"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",
|
|
5751
5728
|
"examples": [
|
|
5752
|
-
"$ sf hardis:org:
|
|
5753
|
-
"$ sf hardis:org:
|
|
5729
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
5730
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
5731
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
5732
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5754
5733
|
],
|
|
5755
5734
|
"flags": {
|
|
5756
5735
|
"json": {
|
|
@@ -5768,10 +5747,28 @@
|
|
|
5768
5747
|
"multiple": false,
|
|
5769
5748
|
"type": "option"
|
|
5770
5749
|
},
|
|
5771
|
-
"
|
|
5750
|
+
"eventtype": {
|
|
5751
|
+
"char": "e",
|
|
5752
|
+
"description": "Type of EventLogFile event to analyze",
|
|
5753
|
+
"name": "eventtype",
|
|
5754
|
+
"default": "ApiTotalUsage",
|
|
5755
|
+
"hasDynamicHelp": false,
|
|
5756
|
+
"multiple": false,
|
|
5757
|
+
"type": "option"
|
|
5758
|
+
},
|
|
5759
|
+
"limit": {
|
|
5772
5760
|
"char": "l",
|
|
5773
|
-
"description": "
|
|
5774
|
-
"name": "
|
|
5761
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
5762
|
+
"name": "limit",
|
|
5763
|
+
"default": 999,
|
|
5764
|
+
"hasDynamicHelp": false,
|
|
5765
|
+
"multiple": false,
|
|
5766
|
+
"type": "option"
|
|
5767
|
+
},
|
|
5768
|
+
"outputfile": {
|
|
5769
|
+
"char": "f",
|
|
5770
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5771
|
+
"name": "outputfile",
|
|
5775
5772
|
"hasDynamicHelp": false,
|
|
5776
5773
|
"multiple": false,
|
|
5777
5774
|
"type": "option"
|
|
@@ -5814,62 +5811,60 @@
|
|
|
5814
5811
|
},
|
|
5815
5812
|
"hasDynamicHelp": true,
|
|
5816
5813
|
"hiddenAliases": [],
|
|
5817
|
-
"id": "hardis:org:
|
|
5814
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
5818
5815
|
"pluginAlias": "sfdx-hardis",
|
|
5819
5816
|
"pluginName": "sfdx-hardis",
|
|
5820
5817
|
"pluginType": "core",
|
|
5821
5818
|
"strict": true,
|
|
5822
5819
|
"enableJsonFlag": true,
|
|
5823
|
-
"title": "
|
|
5824
|
-
"requiresProject":
|
|
5820
|
+
"title": "Check for legacy API use",
|
|
5821
|
+
"requiresProject": false,
|
|
5825
5822
|
"isESM": true,
|
|
5826
5823
|
"relativePath": [
|
|
5827
5824
|
"lib",
|
|
5828
5825
|
"commands",
|
|
5829
5826
|
"hardis",
|
|
5830
5827
|
"org",
|
|
5831
|
-
"
|
|
5832
|
-
"
|
|
5828
|
+
"diagnose",
|
|
5829
|
+
"legacyapi.js"
|
|
5833
5830
|
],
|
|
5834
5831
|
"aliasPermutations": [],
|
|
5835
5832
|
"permutations": [
|
|
5836
|
-
"hardis:org:
|
|
5837
|
-
"org:hardis:
|
|
5838
|
-
"org:
|
|
5839
|
-
"org:
|
|
5840
|
-
"hardis:
|
|
5841
|
-
"
|
|
5842
|
-
"
|
|
5843
|
-
"
|
|
5844
|
-
"hardis:
|
|
5845
|
-
"
|
|
5846
|
-
"
|
|
5847
|
-
"
|
|
5848
|
-
"hardis:org:
|
|
5849
|
-
"org:hardis:
|
|
5850
|
-
"org:
|
|
5851
|
-
"org:
|
|
5852
|
-
"hardis:
|
|
5853
|
-
"
|
|
5854
|
-
"
|
|
5855
|
-
"
|
|
5856
|
-
"hardis:
|
|
5857
|
-
"
|
|
5858
|
-
"
|
|
5859
|
-
"
|
|
5860
|
-
]
|
|
5861
|
-
},
|
|
5862
|
-
"hardis:org:
|
|
5863
|
-
"aliases": [],
|
|
5864
|
-
"args": {},
|
|
5865
|
-
"description": "\n
|
|
5866
|
-
"examples": [
|
|
5867
|
-
"$ sf hardis:org:
|
|
5868
|
-
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
"flags": {
|
|
5872
|
-
"json": {
|
|
5833
|
+
"hardis:org:diagnose:legacyapi",
|
|
5834
|
+
"org:hardis:diagnose:legacyapi",
|
|
5835
|
+
"org:diagnose:hardis:legacyapi",
|
|
5836
|
+
"org:diagnose:legacyapi:hardis",
|
|
5837
|
+
"hardis:diagnose:org:legacyapi",
|
|
5838
|
+
"diagnose:hardis:org:legacyapi",
|
|
5839
|
+
"diagnose:org:hardis:legacyapi",
|
|
5840
|
+
"diagnose:org:legacyapi:hardis",
|
|
5841
|
+
"hardis:diagnose:legacyapi:org",
|
|
5842
|
+
"diagnose:hardis:legacyapi:org",
|
|
5843
|
+
"diagnose:legacyapi:hardis:org",
|
|
5844
|
+
"diagnose:legacyapi:org:hardis",
|
|
5845
|
+
"hardis:org:legacyapi:diagnose",
|
|
5846
|
+
"org:hardis:legacyapi:diagnose",
|
|
5847
|
+
"org:legacyapi:hardis:diagnose",
|
|
5848
|
+
"org:legacyapi:diagnose:hardis",
|
|
5849
|
+
"hardis:legacyapi:org:diagnose",
|
|
5850
|
+
"legacyapi:hardis:org:diagnose",
|
|
5851
|
+
"legacyapi:org:hardis:diagnose",
|
|
5852
|
+
"legacyapi:org:diagnose:hardis",
|
|
5853
|
+
"hardis:legacyapi:diagnose:org",
|
|
5854
|
+
"legacyapi:hardis:diagnose:org",
|
|
5855
|
+
"legacyapi:diagnose:hardis:org",
|
|
5856
|
+
"legacyapi:diagnose:org:hardis"
|
|
5857
|
+
]
|
|
5858
|
+
},
|
|
5859
|
+
"hardis:org:diagnose:licenses": {
|
|
5860
|
+
"aliases": [],
|
|
5861
|
+
"args": {},
|
|
5862
|
+
"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## Technical explanations\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",
|
|
5863
|
+
"examples": [
|
|
5864
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
5865
|
+
],
|
|
5866
|
+
"flags": {
|
|
5867
|
+
"json": {
|
|
5873
5868
|
"description": "Format output as json.",
|
|
5874
5869
|
"helpGroup": "GLOBAL",
|
|
5875
5870
|
"name": "json",
|
|
@@ -5885,12 +5880,20 @@
|
|
|
5885
5880
|
"type": "option"
|
|
5886
5881
|
},
|
|
5887
5882
|
"outputfile": {
|
|
5888
|
-
"
|
|
5883
|
+
"char": "f",
|
|
5884
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5889
5885
|
"name": "outputfile",
|
|
5890
5886
|
"hasDynamicHelp": false,
|
|
5891
5887
|
"multiple": false,
|
|
5892
5888
|
"type": "option"
|
|
5893
5889
|
},
|
|
5890
|
+
"usedonly": {
|
|
5891
|
+
"char": "u",
|
|
5892
|
+
"description": "Filter to have only used licenses",
|
|
5893
|
+
"name": "usedonly",
|
|
5894
|
+
"allowNo": false,
|
|
5895
|
+
"type": "boolean"
|
|
5896
|
+
},
|
|
5894
5897
|
"debug": {
|
|
5895
5898
|
"char": "d",
|
|
5896
5899
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5929,13 +5932,13 @@
|
|
|
5929
5932
|
},
|
|
5930
5933
|
"hasDynamicHelp": true,
|
|
5931
5934
|
"hiddenAliases": [],
|
|
5932
|
-
"id": "hardis:org:
|
|
5935
|
+
"id": "hardis:org:diagnose:licenses",
|
|
5933
5936
|
"pluginAlias": "sfdx-hardis",
|
|
5934
5937
|
"pluginName": "sfdx-hardis",
|
|
5935
5938
|
"pluginType": "core",
|
|
5936
5939
|
"strict": true,
|
|
5937
5940
|
"enableJsonFlag": true,
|
|
5938
|
-
"title": "
|
|
5941
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
5939
5942
|
"requiresProject": false,
|
|
5940
5943
|
"isESM": true,
|
|
5941
5944
|
"relativePath": [
|
|
@@ -5943,46 +5946,43 @@
|
|
|
5943
5946
|
"commands",
|
|
5944
5947
|
"hardis",
|
|
5945
5948
|
"org",
|
|
5946
|
-
"
|
|
5947
|
-
"
|
|
5949
|
+
"diagnose",
|
|
5950
|
+
"licenses.js"
|
|
5948
5951
|
],
|
|
5949
5952
|
"aliasPermutations": [],
|
|
5950
5953
|
"permutations": [
|
|
5951
|
-
"hardis:org:
|
|
5952
|
-
"org:hardis:
|
|
5953
|
-
"org:
|
|
5954
|
-
"org:
|
|
5955
|
-
"hardis:
|
|
5956
|
-
"
|
|
5957
|
-
"
|
|
5958
|
-
"
|
|
5959
|
-
"hardis:
|
|
5960
|
-
"
|
|
5961
|
-
"
|
|
5962
|
-
"
|
|
5963
|
-
"hardis:org:
|
|
5964
|
-
"org:hardis:
|
|
5965
|
-
"org:
|
|
5966
|
-
"org:
|
|
5967
|
-
"hardis:
|
|
5968
|
-
"
|
|
5969
|
-
"
|
|
5970
|
-
"
|
|
5971
|
-
"hardis:
|
|
5972
|
-
"
|
|
5973
|
-
"
|
|
5974
|
-
"
|
|
5954
|
+
"hardis:org:diagnose:licenses",
|
|
5955
|
+
"org:hardis:diagnose:licenses",
|
|
5956
|
+
"org:diagnose:hardis:licenses",
|
|
5957
|
+
"org:diagnose:licenses:hardis",
|
|
5958
|
+
"hardis:diagnose:org:licenses",
|
|
5959
|
+
"diagnose:hardis:org:licenses",
|
|
5960
|
+
"diagnose:org:hardis:licenses",
|
|
5961
|
+
"diagnose:org:licenses:hardis",
|
|
5962
|
+
"hardis:diagnose:licenses:org",
|
|
5963
|
+
"diagnose:hardis:licenses:org",
|
|
5964
|
+
"diagnose:licenses:hardis:org",
|
|
5965
|
+
"diagnose:licenses:org:hardis",
|
|
5966
|
+
"hardis:org:licenses:diagnose",
|
|
5967
|
+
"org:hardis:licenses:diagnose",
|
|
5968
|
+
"org:licenses:hardis:diagnose",
|
|
5969
|
+
"org:licenses:diagnose:hardis",
|
|
5970
|
+
"hardis:licenses:org:diagnose",
|
|
5971
|
+
"licenses:hardis:org:diagnose",
|
|
5972
|
+
"licenses:org:hardis:diagnose",
|
|
5973
|
+
"licenses:org:diagnose:hardis",
|
|
5974
|
+
"hardis:licenses:diagnose:org",
|
|
5975
|
+
"licenses:hardis:diagnose:org",
|
|
5976
|
+
"licenses:diagnose:hardis:org",
|
|
5977
|
+
"licenses:diagnose:org:hardis"
|
|
5975
5978
|
]
|
|
5976
5979
|
},
|
|
5977
|
-
"hardis:org:diagnose:
|
|
5980
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
5978
5981
|
"aliases": [],
|
|
5979
5982
|
"args": {},
|
|
5980
|
-
"description": "Export
|
|
5983
|
+
"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",
|
|
5981
5984
|
"examples": [
|
|
5982
|
-
"$ sf hardis:org:diagnose:
|
|
5983
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5984
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5985
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5985
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
5986
5986
|
],
|
|
5987
5987
|
"flags": {
|
|
5988
5988
|
"json": {
|
|
@@ -6000,22 +6000,6 @@
|
|
|
6000
6000
|
"multiple": false,
|
|
6001
6001
|
"type": "option"
|
|
6002
6002
|
},
|
|
6003
|
-
"excludeusers": {
|
|
6004
|
-
"char": "e",
|
|
6005
|
-
"description": "Comma-separated list of usernames to exclude",
|
|
6006
|
-
"name": "excludeusers",
|
|
6007
|
-
"hasDynamicHelp": false,
|
|
6008
|
-
"multiple": false,
|
|
6009
|
-
"type": "option"
|
|
6010
|
-
},
|
|
6011
|
-
"lastndays": {
|
|
6012
|
-
"char": "t",
|
|
6013
|
-
"description": "Number of days to extract from today (included)",
|
|
6014
|
-
"name": "lastndays",
|
|
6015
|
-
"hasDynamicHelp": false,
|
|
6016
|
-
"multiple": false,
|
|
6017
|
-
"type": "option"
|
|
6018
|
-
},
|
|
6019
6003
|
"outputfile": {
|
|
6020
6004
|
"char": "f",
|
|
6021
6005
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6062,13 +6046,13 @@
|
|
|
6062
6046
|
},
|
|
6063
6047
|
"hasDynamicHelp": true,
|
|
6064
6048
|
"hiddenAliases": [],
|
|
6065
|
-
"id": "hardis:org:diagnose:
|
|
6049
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6066
6050
|
"pluginAlias": "sfdx-hardis",
|
|
6067
6051
|
"pluginName": "sfdx-hardis",
|
|
6068
6052
|
"pluginType": "core",
|
|
6069
6053
|
"strict": true,
|
|
6070
6054
|
"enableJsonFlag": true,
|
|
6071
|
-
"title": "
|
|
6055
|
+
"title": "Check Release Updates of an org",
|
|
6072
6056
|
"requiresProject": false,
|
|
6073
6057
|
"isESM": true,
|
|
6074
6058
|
"relativePath": [
|
|
@@ -6077,42 +6061,43 @@
|
|
|
6077
6061
|
"hardis",
|
|
6078
6062
|
"org",
|
|
6079
6063
|
"diagnose",
|
|
6080
|
-
"
|
|
6064
|
+
"releaseupdates.js"
|
|
6081
6065
|
],
|
|
6082
6066
|
"aliasPermutations": [],
|
|
6083
6067
|
"permutations": [
|
|
6084
|
-
"hardis:org:diagnose:
|
|
6085
|
-
"org:hardis:diagnose:
|
|
6086
|
-
"org:diagnose:hardis:
|
|
6087
|
-
"org:diagnose:
|
|
6088
|
-
"hardis:diagnose:org:
|
|
6089
|
-
"diagnose:hardis:org:
|
|
6090
|
-
"diagnose:org:hardis:
|
|
6091
|
-
"diagnose:org:
|
|
6092
|
-
"hardis:diagnose:
|
|
6093
|
-
"diagnose:hardis:
|
|
6094
|
-
"diagnose:
|
|
6095
|
-
"diagnose:
|
|
6096
|
-
"hardis:org:
|
|
6097
|
-
"org:hardis:
|
|
6098
|
-
"org:
|
|
6099
|
-
"org:
|
|
6100
|
-
"hardis:
|
|
6101
|
-
"
|
|
6102
|
-
"
|
|
6103
|
-
"
|
|
6104
|
-
"hardis:
|
|
6105
|
-
"
|
|
6106
|
-
"
|
|
6107
|
-
"
|
|
6068
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6069
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6070
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6071
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6072
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6073
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6074
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6075
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6076
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6077
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6078
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6079
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6080
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6081
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6082
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6083
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6084
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6085
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6086
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6087
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6088
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6089
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6090
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6091
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6108
6092
|
]
|
|
6109
6093
|
},
|
|
6110
|
-
"hardis:org:diagnose:
|
|
6094
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6111
6095
|
"aliases": [],
|
|
6112
6096
|
"args": {},
|
|
6113
|
-
"description": "
|
|
6097
|
+
"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",
|
|
6114
6098
|
"examples": [
|
|
6115
|
-
"$ sf hardis:org:diagnose:
|
|
6099
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6100
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6116
6101
|
],
|
|
6117
6102
|
"flags": {
|
|
6118
6103
|
"json": {
|
|
@@ -6130,6 +6115,22 @@
|
|
|
6130
6115
|
"multiple": false,
|
|
6131
6116
|
"type": "option"
|
|
6132
6117
|
},
|
|
6118
|
+
"outputfile": {
|
|
6119
|
+
"char": "f",
|
|
6120
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6121
|
+
"name": "outputfile",
|
|
6122
|
+
"hasDynamicHelp": false,
|
|
6123
|
+
"multiple": false,
|
|
6124
|
+
"type": "option"
|
|
6125
|
+
},
|
|
6126
|
+
"days": {
|
|
6127
|
+
"char": "t",
|
|
6128
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6129
|
+
"name": "days",
|
|
6130
|
+
"hasDynamicHelp": false,
|
|
6131
|
+
"multiple": false,
|
|
6132
|
+
"type": "option"
|
|
6133
|
+
},
|
|
6133
6134
|
"debug": {
|
|
6134
6135
|
"char": "d",
|
|
6135
6136
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6168,13 +6169,13 @@
|
|
|
6168
6169
|
},
|
|
6169
6170
|
"hasDynamicHelp": true,
|
|
6170
6171
|
"hiddenAliases": [],
|
|
6171
|
-
"id": "hardis:org:diagnose:
|
|
6172
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6172
6173
|
"pluginAlias": "sfdx-hardis",
|
|
6173
6174
|
"pluginName": "sfdx-hardis",
|
|
6174
6175
|
"pluginType": "core",
|
|
6175
6176
|
"strict": true,
|
|
6176
6177
|
"enableJsonFlag": true,
|
|
6177
|
-
"title": "
|
|
6178
|
+
"title": "Detect unused Apex classes in an org",
|
|
6178
6179
|
"requiresProject": false,
|
|
6179
6180
|
"isESM": true,
|
|
6180
6181
|
"relativePath": [
|
|
@@ -6183,76 +6184,55 @@
|
|
|
6183
6184
|
"hardis",
|
|
6184
6185
|
"org",
|
|
6185
6186
|
"diagnose",
|
|
6186
|
-
"
|
|
6187
|
+
"unused-apex-classes.js"
|
|
6187
6188
|
],
|
|
6188
6189
|
"aliasPermutations": [],
|
|
6189
6190
|
"permutations": [
|
|
6190
|
-
"hardis:org:diagnose:
|
|
6191
|
-
"org:hardis:diagnose:
|
|
6192
|
-
"org:diagnose:hardis:
|
|
6193
|
-
"org:diagnose:
|
|
6194
|
-
"hardis:diagnose:org:
|
|
6195
|
-
"diagnose:hardis:org:
|
|
6196
|
-
"diagnose:org:hardis:
|
|
6197
|
-
"diagnose:org:
|
|
6198
|
-
"hardis:diagnose:
|
|
6199
|
-
"diagnose:hardis:
|
|
6200
|
-
"diagnose:
|
|
6201
|
-
"diagnose:
|
|
6202
|
-
"hardis:org:
|
|
6203
|
-
"org:hardis:
|
|
6204
|
-
"org:
|
|
6205
|
-
"org:
|
|
6206
|
-
"hardis:
|
|
6207
|
-
"
|
|
6208
|
-
"
|
|
6209
|
-
"
|
|
6210
|
-
"hardis:
|
|
6211
|
-
"
|
|
6212
|
-
"
|
|
6213
|
-
"
|
|
6214
|
-
]
|
|
6215
|
-
},
|
|
6216
|
-
"hardis:org:diagnose:
|
|
6217
|
-
"aliases": [],
|
|
6218
|
-
"args": {},
|
|
6219
|
-
"description": "
|
|
6220
|
-
"examples": [
|
|
6221
|
-
"$ sf hardis:org:diagnose:
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
"
|
|
6225
|
-
|
|
6226
|
-
|
|
6227
|
-
|
|
6228
|
-
"
|
|
6229
|
-
"
|
|
6230
|
-
"name": "json",
|
|
6231
|
-
"allowNo": false,
|
|
6232
|
-
"type": "boolean"
|
|
6233
|
-
},
|
|
6234
|
-
"flags-dir": {
|
|
6235
|
-
"helpGroup": "GLOBAL",
|
|
6236
|
-
"name": "flags-dir",
|
|
6237
|
-
"summary": "Import flag values from a directory.",
|
|
6238
|
-
"hasDynamicHelp": false,
|
|
6239
|
-
"multiple": false,
|
|
6240
|
-
"type": "option"
|
|
6241
|
-
},
|
|
6242
|
-
"eventtype": {
|
|
6243
|
-
"char": "e",
|
|
6244
|
-
"description": "Type of EventLogFile event to analyze",
|
|
6245
|
-
"name": "eventtype",
|
|
6246
|
-
"default": "ApiTotalUsage",
|
|
6247
|
-
"hasDynamicHelp": false,
|
|
6248
|
-
"multiple": false,
|
|
6249
|
-
"type": "option"
|
|
6191
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6192
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6193
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6194
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6195
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6196
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6197
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6198
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6199
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6200
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6201
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6202
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6203
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6204
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6205
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6206
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6207
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6208
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6209
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6210
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6211
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6212
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6213
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6214
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6215
|
+
]
|
|
6216
|
+
},
|
|
6217
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6218
|
+
"aliases": [],
|
|
6219
|
+
"args": {},
|
|
6220
|
+
"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## Technical explanations\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",
|
|
6221
|
+
"examples": [
|
|
6222
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6223
|
+
],
|
|
6224
|
+
"flags": {
|
|
6225
|
+
"json": {
|
|
6226
|
+
"description": "Format output as json.",
|
|
6227
|
+
"helpGroup": "GLOBAL",
|
|
6228
|
+
"name": "json",
|
|
6229
|
+
"allowNo": false,
|
|
6230
|
+
"type": "boolean"
|
|
6250
6231
|
},
|
|
6251
|
-
"
|
|
6252
|
-
"
|
|
6253
|
-
"
|
|
6254
|
-
"
|
|
6255
|
-
"default": 999,
|
|
6232
|
+
"flags-dir": {
|
|
6233
|
+
"helpGroup": "GLOBAL",
|
|
6234
|
+
"name": "flags-dir",
|
|
6235
|
+
"summary": "Import flag values from a directory.",
|
|
6256
6236
|
"hasDynamicHelp": false,
|
|
6257
6237
|
"multiple": false,
|
|
6258
6238
|
"type": "option"
|
|
@@ -6303,13 +6283,30 @@
|
|
|
6303
6283
|
},
|
|
6304
6284
|
"hasDynamicHelp": true,
|
|
6305
6285
|
"hiddenAliases": [],
|
|
6306
|
-
"id": "hardis:org:diagnose:
|
|
6286
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6307
6287
|
"pluginAlias": "sfdx-hardis",
|
|
6308
6288
|
"pluginName": "sfdx-hardis",
|
|
6309
6289
|
"pluginType": "core",
|
|
6310
6290
|
"strict": true,
|
|
6311
6291
|
"enableJsonFlag": true,
|
|
6312
|
-
"title": "
|
|
6292
|
+
"title": "Unused Connected Apps in an org",
|
|
6293
|
+
"allowedInactiveConnectedApps": [
|
|
6294
|
+
"Ant Migration Tool",
|
|
6295
|
+
"Chatter Desktop",
|
|
6296
|
+
"Chatter Mobile for BlackBerry",
|
|
6297
|
+
"Force.com IDE",
|
|
6298
|
+
"OIQ_Integration",
|
|
6299
|
+
"Salesforce CLI",
|
|
6300
|
+
"Salesforce Files",
|
|
6301
|
+
"Salesforce Mobile Dashboards",
|
|
6302
|
+
"Salesforce Touch",
|
|
6303
|
+
"Salesforce for Outlook",
|
|
6304
|
+
"SalesforceA",
|
|
6305
|
+
"SalesforceA for Android",
|
|
6306
|
+
"SalesforceA for iOS",
|
|
6307
|
+
"SalesforceDX Namespace Registry",
|
|
6308
|
+
"SalesforceIQ"
|
|
6309
|
+
],
|
|
6313
6310
|
"requiresProject": false,
|
|
6314
6311
|
"isESM": true,
|
|
6315
6312
|
"relativePath": [
|
|
@@ -6318,42 +6315,43 @@
|
|
|
6318
6315
|
"hardis",
|
|
6319
6316
|
"org",
|
|
6320
6317
|
"diagnose",
|
|
6321
|
-
"
|
|
6318
|
+
"unused-connected-apps.js"
|
|
6322
6319
|
],
|
|
6323
6320
|
"aliasPermutations": [],
|
|
6324
6321
|
"permutations": [
|
|
6325
|
-
"hardis:org:diagnose:
|
|
6326
|
-
"org:hardis:diagnose:
|
|
6327
|
-
"org:diagnose:hardis:
|
|
6328
|
-
"org:diagnose:
|
|
6329
|
-
"hardis:diagnose:org:
|
|
6330
|
-
"diagnose:hardis:org:
|
|
6331
|
-
"diagnose:org:hardis:
|
|
6332
|
-
"diagnose:org:
|
|
6333
|
-
"hardis:diagnose:
|
|
6334
|
-
"diagnose:hardis:
|
|
6335
|
-
"diagnose:
|
|
6336
|
-
"diagnose:
|
|
6337
|
-
"hardis:org:
|
|
6338
|
-
"org:hardis:
|
|
6339
|
-
"org:
|
|
6340
|
-
"org:
|
|
6341
|
-
"hardis:
|
|
6342
|
-
"
|
|
6343
|
-
"
|
|
6344
|
-
"
|
|
6345
|
-
"hardis:
|
|
6346
|
-
"
|
|
6347
|
-
"
|
|
6348
|
-
"
|
|
6322
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6323
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6324
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6325
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6326
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6327
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6328
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6329
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6330
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6331
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6332
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6333
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6334
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6335
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6336
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6337
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6338
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6339
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6340
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6341
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6342
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6343
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6344
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6345
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6349
6346
|
]
|
|
6350
6347
|
},
|
|
6351
|
-
"hardis:org:diagnose:
|
|
6348
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6352
6349
|
"aliases": [],
|
|
6353
6350
|
"args": {},
|
|
6354
|
-
"description": "\n**
|
|
6351
|
+
"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## Technical explanations\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",
|
|
6355
6352
|
"examples": [
|
|
6356
|
-
"$ sf hardis:org:diagnose:
|
|
6353
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6354
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6357
6355
|
],
|
|
6358
6356
|
"flags": {
|
|
6359
6357
|
"json": {
|
|
@@ -6379,13 +6377,6 @@
|
|
|
6379
6377
|
"multiple": false,
|
|
6380
6378
|
"type": "option"
|
|
6381
6379
|
},
|
|
6382
|
-
"usedonly": {
|
|
6383
|
-
"char": "u",
|
|
6384
|
-
"description": "Filter to have only used licenses",
|
|
6385
|
-
"name": "usedonly",
|
|
6386
|
-
"allowNo": false,
|
|
6387
|
-
"type": "boolean"
|
|
6388
|
-
},
|
|
6389
6380
|
"debug": {
|
|
6390
6381
|
"char": "d",
|
|
6391
6382
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6424,14 +6415,32 @@
|
|
|
6424
6415
|
},
|
|
6425
6416
|
"hasDynamicHelp": true,
|
|
6426
6417
|
"hiddenAliases": [],
|
|
6427
|
-
"id": "hardis:org:diagnose:
|
|
6418
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6428
6419
|
"pluginAlias": "sfdx-hardis",
|
|
6429
6420
|
"pluginName": "sfdx-hardis",
|
|
6430
6421
|
"pluginType": "core",
|
|
6431
6422
|
"strict": true,
|
|
6432
6423
|
"enableJsonFlag": true,
|
|
6433
|
-
"title": "
|
|
6424
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6434
6425
|
"requiresProject": false,
|
|
6426
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6427
|
+
"Sales_User"
|
|
6428
|
+
],
|
|
6429
|
+
"permSetsPermSetLicenses": [
|
|
6430
|
+
{
|
|
6431
|
+
"permSet": "Sales_User",
|
|
6432
|
+
"permSetLicense": "SalesUserPsl"
|
|
6433
|
+
}
|
|
6434
|
+
],
|
|
6435
|
+
"profilesPermissionSetLicenses": [
|
|
6436
|
+
{
|
|
6437
|
+
"profile": "Salesforce API Only",
|
|
6438
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6439
|
+
}
|
|
6440
|
+
],
|
|
6441
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6442
|
+
"IdentityConnect"
|
|
6443
|
+
],
|
|
6435
6444
|
"isESM": true,
|
|
6436
6445
|
"relativePath": [
|
|
6437
6446
|
"lib",
|
|
@@ -6439,42 +6448,46 @@
|
|
|
6439
6448
|
"hardis",
|
|
6440
6449
|
"org",
|
|
6441
6450
|
"diagnose",
|
|
6442
|
-
"
|
|
6451
|
+
"unusedlicenses.js"
|
|
6443
6452
|
],
|
|
6444
6453
|
"aliasPermutations": [],
|
|
6445
6454
|
"permutations": [
|
|
6446
|
-
"hardis:org:diagnose:
|
|
6447
|
-
"org:hardis:diagnose:
|
|
6448
|
-
"org:diagnose:hardis:
|
|
6449
|
-
"org:diagnose:
|
|
6450
|
-
"hardis:diagnose:org:
|
|
6451
|
-
"diagnose:hardis:org:
|
|
6452
|
-
"diagnose:org:hardis:
|
|
6453
|
-
"diagnose:org:
|
|
6454
|
-
"hardis:diagnose:
|
|
6455
|
-
"diagnose:hardis:
|
|
6456
|
-
"diagnose:
|
|
6457
|
-
"diagnose:
|
|
6458
|
-
"hardis:org:
|
|
6459
|
-
"org:hardis:
|
|
6460
|
-
"org:
|
|
6461
|
-
"org:
|
|
6462
|
-
"hardis:
|
|
6463
|
-
"
|
|
6464
|
-
"
|
|
6465
|
-
"
|
|
6466
|
-
"hardis:
|
|
6467
|
-
"
|
|
6468
|
-
"
|
|
6469
|
-
"
|
|
6455
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6456
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6457
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6458
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6459
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6460
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6461
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6462
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6463
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6464
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6465
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6466
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6467
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6468
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6469
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6470
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6471
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6472
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6473
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6474
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6475
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6476
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6477
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6478
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
6470
6479
|
]
|
|
6471
6480
|
},
|
|
6472
|
-
"hardis:org:diagnose:
|
|
6481
|
+
"hardis:org:diagnose:unusedusers": {
|
|
6473
6482
|
"aliases": [],
|
|
6474
6483
|
"args": {},
|
|
6475
|
-
"description": "
|
|
6484
|
+
"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## Technical explanations\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",
|
|
6476
6485
|
"examples": [
|
|
6477
|
-
"$ sf hardis:org:diagnose:
|
|
6486
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6487
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6488
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6489
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6490
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6478
6491
|
],
|
|
6479
6492
|
"flags": {
|
|
6480
6493
|
"json": {
|
|
@@ -6500,22 +6513,57 @@
|
|
|
6500
6513
|
"multiple": false,
|
|
6501
6514
|
"type": "option"
|
|
6502
6515
|
},
|
|
6503
|
-
"
|
|
6504
|
-
"char": "
|
|
6505
|
-
"description": "
|
|
6506
|
-
"name": "
|
|
6507
|
-
"
|
|
6508
|
-
"
|
|
6516
|
+
"days": {
|
|
6517
|
+
"char": "t",
|
|
6518
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6519
|
+
"name": "days",
|
|
6520
|
+
"hasDynamicHelp": false,
|
|
6521
|
+
"multiple": false,
|
|
6522
|
+
"type": "option"
|
|
6509
6523
|
},
|
|
6510
|
-
"
|
|
6511
|
-
"
|
|
6512
|
-
"
|
|
6524
|
+
"licensetypes": {
|
|
6525
|
+
"char": "l",
|
|
6526
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6527
|
+
"name": "licensetypes",
|
|
6513
6528
|
"hasDynamicHelp": false,
|
|
6514
6529
|
"multiple": false,
|
|
6530
|
+
"options": [
|
|
6531
|
+
"all",
|
|
6532
|
+
"all-crm",
|
|
6533
|
+
"all-paying"
|
|
6534
|
+
],
|
|
6515
6535
|
"type": "option"
|
|
6516
6536
|
},
|
|
6517
|
-
"
|
|
6518
|
-
"
|
|
6537
|
+
"licenseidentifiers": {
|
|
6538
|
+
"char": "i",
|
|
6539
|
+
"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",
|
|
6540
|
+
"name": "licenseidentifiers",
|
|
6541
|
+
"hasDynamicHelp": false,
|
|
6542
|
+
"multiple": false,
|
|
6543
|
+
"type": "option"
|
|
6544
|
+
},
|
|
6545
|
+
"returnactiveusers": {
|
|
6546
|
+
"description": "Inverts the command by returning the active users",
|
|
6547
|
+
"name": "returnactiveusers",
|
|
6548
|
+
"allowNo": false,
|
|
6549
|
+
"type": "boolean"
|
|
6550
|
+
},
|
|
6551
|
+
"debug": {
|
|
6552
|
+
"char": "d",
|
|
6553
|
+
"description": "Activate debug mode (more logs)",
|
|
6554
|
+
"name": "debug",
|
|
6555
|
+
"allowNo": false,
|
|
6556
|
+
"type": "boolean"
|
|
6557
|
+
},
|
|
6558
|
+
"websocket": {
|
|
6559
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
6560
|
+
"name": "websocket",
|
|
6561
|
+
"hasDynamicHelp": false,
|
|
6562
|
+
"multiple": false,
|
|
6563
|
+
"type": "option"
|
|
6564
|
+
},
|
|
6565
|
+
"skipauth": {
|
|
6566
|
+
"description": "Skip authentication check when a default username is required",
|
|
6519
6567
|
"name": "skipauth",
|
|
6520
6568
|
"allowNo": false,
|
|
6521
6569
|
"type": "boolean"
|
|
@@ -6538,13 +6586,13 @@
|
|
|
6538
6586
|
},
|
|
6539
6587
|
"hasDynamicHelp": true,
|
|
6540
6588
|
"hiddenAliases": [],
|
|
6541
|
-
"id": "hardis:org:diagnose:
|
|
6589
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
6542
6590
|
"pluginAlias": "sfdx-hardis",
|
|
6543
6591
|
"pluginName": "sfdx-hardis",
|
|
6544
6592
|
"pluginType": "core",
|
|
6545
6593
|
"strict": true,
|
|
6546
6594
|
"enableJsonFlag": true,
|
|
6547
|
-
"title": "
|
|
6595
|
+
"title": "Detect unused Users in Salesforce",
|
|
6548
6596
|
"requiresProject": false,
|
|
6549
6597
|
"isESM": true,
|
|
6550
6598
|
"relativePath": [
|
|
@@ -6553,43 +6601,42 @@
|
|
|
6553
6601
|
"hardis",
|
|
6554
6602
|
"org",
|
|
6555
6603
|
"diagnose",
|
|
6556
|
-
"
|
|
6604
|
+
"unusedusers.js"
|
|
6557
6605
|
],
|
|
6558
6606
|
"aliasPermutations": [],
|
|
6559
6607
|
"permutations": [
|
|
6560
|
-
"hardis:org:diagnose:
|
|
6561
|
-
"org:hardis:diagnose:
|
|
6562
|
-
"org:diagnose:hardis:
|
|
6563
|
-
"org:diagnose:
|
|
6564
|
-
"hardis:diagnose:org:
|
|
6565
|
-
"diagnose:hardis:org:
|
|
6566
|
-
"diagnose:org:hardis:
|
|
6567
|
-
"diagnose:org:
|
|
6568
|
-
"hardis:diagnose:
|
|
6569
|
-
"diagnose:hardis:
|
|
6570
|
-
"diagnose:
|
|
6571
|
-
"diagnose:
|
|
6572
|
-
"hardis:org:
|
|
6573
|
-
"org:hardis:
|
|
6574
|
-
"org:
|
|
6575
|
-
"org:
|
|
6576
|
-
"hardis:
|
|
6577
|
-
"
|
|
6578
|
-
"
|
|
6579
|
-
"
|
|
6580
|
-
"hardis:
|
|
6581
|
-
"
|
|
6582
|
-
"
|
|
6583
|
-
"
|
|
6608
|
+
"hardis:org:diagnose:unusedusers",
|
|
6609
|
+
"org:hardis:diagnose:unusedusers",
|
|
6610
|
+
"org:diagnose:hardis:unusedusers",
|
|
6611
|
+
"org:diagnose:unusedusers:hardis",
|
|
6612
|
+
"hardis:diagnose:org:unusedusers",
|
|
6613
|
+
"diagnose:hardis:org:unusedusers",
|
|
6614
|
+
"diagnose:org:hardis:unusedusers",
|
|
6615
|
+
"diagnose:org:unusedusers:hardis",
|
|
6616
|
+
"hardis:diagnose:unusedusers:org",
|
|
6617
|
+
"diagnose:hardis:unusedusers:org",
|
|
6618
|
+
"diagnose:unusedusers:hardis:org",
|
|
6619
|
+
"diagnose:unusedusers:org:hardis",
|
|
6620
|
+
"hardis:org:unusedusers:diagnose",
|
|
6621
|
+
"org:hardis:unusedusers:diagnose",
|
|
6622
|
+
"org:unusedusers:hardis:diagnose",
|
|
6623
|
+
"org:unusedusers:diagnose:hardis",
|
|
6624
|
+
"hardis:unusedusers:org:diagnose",
|
|
6625
|
+
"unusedusers:hardis:org:diagnose",
|
|
6626
|
+
"unusedusers:org:hardis:diagnose",
|
|
6627
|
+
"unusedusers:org:diagnose:hardis",
|
|
6628
|
+
"hardis:unusedusers:diagnose:org",
|
|
6629
|
+
"unusedusers:hardis:diagnose:org",
|
|
6630
|
+
"unusedusers:diagnose:hardis:org",
|
|
6631
|
+
"unusedusers:diagnose:org:hardis"
|
|
6584
6632
|
]
|
|
6585
6633
|
},
|
|
6586
|
-
"hardis:org:
|
|
6634
|
+
"hardis:org:files:export": {
|
|
6587
6635
|
"aliases": [],
|
|
6588
6636
|
"args": {},
|
|
6589
|
-
"description": "
|
|
6637
|
+
"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, and output naming conventions.\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## Technical explanations\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.\n- **File Download:** Downloads the actual file content from Salesforce.\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 and `promptFilesExportConfiguration` for customizing export options.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues or API limits.\n",
|
|
6590
6638
|
"examples": [
|
|
6591
|
-
"$ sf hardis:org:
|
|
6592
|
-
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6639
|
+
"$ sf hardis:org:files:export"
|
|
6593
6640
|
],
|
|
6594
6641
|
"flags": {
|
|
6595
6642
|
"json": {
|
|
@@ -6607,18 +6654,37 @@
|
|
|
6607
6654
|
"multiple": false,
|
|
6608
6655
|
"type": "option"
|
|
6609
6656
|
},
|
|
6610
|
-
"
|
|
6611
|
-
"char": "
|
|
6612
|
-
"description": "
|
|
6613
|
-
"name": "
|
|
6657
|
+
"path": {
|
|
6658
|
+
"char": "p",
|
|
6659
|
+
"description": "Path to the file export project",
|
|
6660
|
+
"name": "path",
|
|
6614
6661
|
"hasDynamicHelp": false,
|
|
6615
6662
|
"multiple": false,
|
|
6616
6663
|
"type": "option"
|
|
6617
6664
|
},
|
|
6618
|
-
"
|
|
6665
|
+
"chunksize": {
|
|
6666
|
+
"char": "c",
|
|
6667
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
6668
|
+
"name": "chunksize",
|
|
6669
|
+
"default": 1000,
|
|
6670
|
+
"hasDynamicHelp": false,
|
|
6671
|
+
"multiple": false,
|
|
6672
|
+
"type": "option"
|
|
6673
|
+
},
|
|
6674
|
+
"polltimeout": {
|
|
6619
6675
|
"char": "t",
|
|
6620
|
-
"description": "
|
|
6621
|
-
"name": "
|
|
6676
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
6677
|
+
"name": "polltimeout",
|
|
6678
|
+
"default": 300000,
|
|
6679
|
+
"hasDynamicHelp": false,
|
|
6680
|
+
"multiple": false,
|
|
6681
|
+
"type": "option"
|
|
6682
|
+
},
|
|
6683
|
+
"startchunknumber": {
|
|
6684
|
+
"char": "s",
|
|
6685
|
+
"description": "Chunk number to start from",
|
|
6686
|
+
"name": "startchunknumber",
|
|
6687
|
+
"default": 0,
|
|
6622
6688
|
"hasDynamicHelp": false,
|
|
6623
6689
|
"multiple": false,
|
|
6624
6690
|
"type": "option"
|
|
@@ -6661,13 +6727,13 @@
|
|
|
6661
6727
|
},
|
|
6662
6728
|
"hasDynamicHelp": true,
|
|
6663
6729
|
"hiddenAliases": [],
|
|
6664
|
-
"id": "hardis:org:
|
|
6730
|
+
"id": "hardis:org:files:export",
|
|
6665
6731
|
"pluginAlias": "sfdx-hardis",
|
|
6666
6732
|
"pluginName": "sfdx-hardis",
|
|
6667
6733
|
"pluginType": "core",
|
|
6668
6734
|
"strict": true,
|
|
6669
6735
|
"enableJsonFlag": true,
|
|
6670
|
-
"title": "
|
|
6736
|
+
"title": "Export files",
|
|
6671
6737
|
"requiresProject": false,
|
|
6672
6738
|
"isESM": true,
|
|
6673
6739
|
"relativePath": [
|
|
@@ -6675,43 +6741,43 @@
|
|
|
6675
6741
|
"commands",
|
|
6676
6742
|
"hardis",
|
|
6677
6743
|
"org",
|
|
6678
|
-
"
|
|
6679
|
-
"
|
|
6744
|
+
"files",
|
|
6745
|
+
"export.js"
|
|
6680
6746
|
],
|
|
6681
6747
|
"aliasPermutations": [],
|
|
6682
6748
|
"permutations": [
|
|
6683
|
-
"hardis:org:
|
|
6684
|
-
"org:hardis:
|
|
6685
|
-
"org:
|
|
6686
|
-
"org:
|
|
6687
|
-
"hardis:
|
|
6688
|
-
"
|
|
6689
|
-
"
|
|
6690
|
-
"
|
|
6691
|
-
"hardis:
|
|
6692
|
-
"
|
|
6693
|
-
"
|
|
6694
|
-
"
|
|
6695
|
-
"hardis:org:
|
|
6696
|
-
"org:hardis:
|
|
6697
|
-
"org:
|
|
6698
|
-
"org:
|
|
6699
|
-
"hardis:
|
|
6700
|
-
"
|
|
6701
|
-
"
|
|
6702
|
-
"
|
|
6703
|
-
"hardis:
|
|
6704
|
-
"
|
|
6705
|
-
"
|
|
6706
|
-
"
|
|
6749
|
+
"hardis:org:files:export",
|
|
6750
|
+
"org:hardis:files:export",
|
|
6751
|
+
"org:files:hardis:export",
|
|
6752
|
+
"org:files:export:hardis",
|
|
6753
|
+
"hardis:files:org:export",
|
|
6754
|
+
"files:hardis:org:export",
|
|
6755
|
+
"files:org:hardis:export",
|
|
6756
|
+
"files:org:export:hardis",
|
|
6757
|
+
"hardis:files:export:org",
|
|
6758
|
+
"files:hardis:export:org",
|
|
6759
|
+
"files:export:hardis:org",
|
|
6760
|
+
"files:export:org:hardis",
|
|
6761
|
+
"hardis:org:export:files",
|
|
6762
|
+
"org:hardis:export:files",
|
|
6763
|
+
"org:export:hardis:files",
|
|
6764
|
+
"org:export:files:hardis",
|
|
6765
|
+
"hardis:export:org:files",
|
|
6766
|
+
"export:hardis:org:files",
|
|
6767
|
+
"export:org:hardis:files",
|
|
6768
|
+
"export:org:files:hardis",
|
|
6769
|
+
"hardis:export:files:org",
|
|
6770
|
+
"export:hardis:files:org",
|
|
6771
|
+
"export:files:hardis:org",
|
|
6772
|
+
"export:files:org:hardis"
|
|
6707
6773
|
]
|
|
6708
6774
|
},
|
|
6709
|
-
"hardis:org:
|
|
6775
|
+
"hardis:org:files:import": {
|
|
6710
6776
|
"aliases": [],
|
|
6711
6777
|
"args": {},
|
|
6712
|
-
"description": "\
|
|
6778
|
+
"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## Technical explanations\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",
|
|
6713
6779
|
"examples": [
|
|
6714
|
-
"$ sf hardis:org:
|
|
6780
|
+
"$ sf hardis:org:files:import"
|
|
6715
6781
|
],
|
|
6716
6782
|
"flags": {
|
|
6717
6783
|
"json": {
|
|
@@ -6729,14 +6795,21 @@
|
|
|
6729
6795
|
"multiple": false,
|
|
6730
6796
|
"type": "option"
|
|
6731
6797
|
},
|
|
6732
|
-
"
|
|
6733
|
-
"char": "
|
|
6734
|
-
"description": "
|
|
6735
|
-
"name": "
|
|
6798
|
+
"path": {
|
|
6799
|
+
"char": "p",
|
|
6800
|
+
"description": "Path to the file export project",
|
|
6801
|
+
"name": "path",
|
|
6736
6802
|
"hasDynamicHelp": false,
|
|
6737
6803
|
"multiple": false,
|
|
6738
6804
|
"type": "option"
|
|
6739
6805
|
},
|
|
6806
|
+
"overwrite": {
|
|
6807
|
+
"char": "f",
|
|
6808
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
6809
|
+
"name": "overwrite",
|
|
6810
|
+
"allowNo": false,
|
|
6811
|
+
"type": "boolean"
|
|
6812
|
+
},
|
|
6740
6813
|
"debug": {
|
|
6741
6814
|
"char": "d",
|
|
6742
6815
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6775,30 +6848,13 @@
|
|
|
6775
6848
|
},
|
|
6776
6849
|
"hasDynamicHelp": true,
|
|
6777
6850
|
"hiddenAliases": [],
|
|
6778
|
-
"id": "hardis:org:
|
|
6851
|
+
"id": "hardis:org:files:import",
|
|
6779
6852
|
"pluginAlias": "sfdx-hardis",
|
|
6780
6853
|
"pluginName": "sfdx-hardis",
|
|
6781
6854
|
"pluginType": "core",
|
|
6782
6855
|
"strict": true,
|
|
6783
6856
|
"enableJsonFlag": true,
|
|
6784
|
-
"title": "
|
|
6785
|
-
"allowedInactiveConnectedApps": [
|
|
6786
|
-
"Ant Migration Tool",
|
|
6787
|
-
"Chatter Desktop",
|
|
6788
|
-
"Chatter Mobile for BlackBerry",
|
|
6789
|
-
"Force.com IDE",
|
|
6790
|
-
"OIQ_Integration",
|
|
6791
|
-
"Salesforce CLI",
|
|
6792
|
-
"Salesforce Files",
|
|
6793
|
-
"Salesforce Mobile Dashboards",
|
|
6794
|
-
"Salesforce Touch",
|
|
6795
|
-
"Salesforce for Outlook",
|
|
6796
|
-
"SalesforceA",
|
|
6797
|
-
"SalesforceA for Android",
|
|
6798
|
-
"SalesforceA for iOS",
|
|
6799
|
-
"SalesforceDX Namespace Registry",
|
|
6800
|
-
"SalesforceIQ"
|
|
6801
|
-
],
|
|
6857
|
+
"title": "Import files",
|
|
6802
6858
|
"requiresProject": false,
|
|
6803
6859
|
"isESM": true,
|
|
6804
6860
|
"relativePath": [
|
|
@@ -6806,44 +6862,44 @@
|
|
|
6806
6862
|
"commands",
|
|
6807
6863
|
"hardis",
|
|
6808
6864
|
"org",
|
|
6809
|
-
"
|
|
6810
|
-
"
|
|
6865
|
+
"files",
|
|
6866
|
+
"import.js"
|
|
6811
6867
|
],
|
|
6812
6868
|
"aliasPermutations": [],
|
|
6813
6869
|
"permutations": [
|
|
6814
|
-
"hardis:org:
|
|
6815
|
-
"org:hardis:
|
|
6816
|
-
"org:
|
|
6817
|
-
"org:
|
|
6818
|
-
"hardis:
|
|
6819
|
-
"
|
|
6820
|
-
"
|
|
6821
|
-
"
|
|
6822
|
-
"hardis:
|
|
6823
|
-
"
|
|
6824
|
-
"
|
|
6825
|
-
"
|
|
6826
|
-
"hardis:org:
|
|
6827
|
-
"org:hardis:
|
|
6828
|
-
"org:
|
|
6829
|
-
"org:
|
|
6830
|
-
"hardis:
|
|
6831
|
-
"
|
|
6832
|
-
"
|
|
6833
|
-
"
|
|
6834
|
-
"hardis:
|
|
6835
|
-
"
|
|
6836
|
-
"
|
|
6837
|
-
"
|
|
6870
|
+
"hardis:org:files:import",
|
|
6871
|
+
"org:hardis:files:import",
|
|
6872
|
+
"org:files:hardis:import",
|
|
6873
|
+
"org:files:import:hardis",
|
|
6874
|
+
"hardis:files:org:import",
|
|
6875
|
+
"files:hardis:org:import",
|
|
6876
|
+
"files:org:hardis:import",
|
|
6877
|
+
"files:org:import:hardis",
|
|
6878
|
+
"hardis:files:import:org",
|
|
6879
|
+
"files:hardis:import:org",
|
|
6880
|
+
"files:import:hardis:org",
|
|
6881
|
+
"files:import:org:hardis",
|
|
6882
|
+
"hardis:org:import:files",
|
|
6883
|
+
"org:hardis:import:files",
|
|
6884
|
+
"org:import:hardis:files",
|
|
6885
|
+
"org:import:files:hardis",
|
|
6886
|
+
"hardis:import:org:files",
|
|
6887
|
+
"import:hardis:org:files",
|
|
6888
|
+
"import:org:hardis:files",
|
|
6889
|
+
"import:org:files:hardis",
|
|
6890
|
+
"hardis:import:files:org",
|
|
6891
|
+
"import:hardis:files:org",
|
|
6892
|
+
"import:files:hardis:org",
|
|
6893
|
+
"import:files:org:hardis"
|
|
6838
6894
|
]
|
|
6839
6895
|
},
|
|
6840
|
-
"hardis:org:
|
|
6896
|
+
"hardis:org:fix:listviewmine": {
|
|
6841
6897
|
"aliases": [],
|
|
6842
6898
|
"args": {},
|
|
6843
|
-
"description": "
|
|
6899
|
+
"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",
|
|
6844
6900
|
"examples": [
|
|
6845
|
-
"$ sf hardis:org:
|
|
6846
|
-
"$ sf hardis:org:
|
|
6901
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
6902
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
6847
6903
|
],
|
|
6848
6904
|
"flags": {
|
|
6849
6905
|
"json": {
|
|
@@ -6861,10 +6917,10 @@
|
|
|
6861
6917
|
"multiple": false,
|
|
6862
6918
|
"type": "option"
|
|
6863
6919
|
},
|
|
6864
|
-
"
|
|
6865
|
-
"char": "
|
|
6866
|
-
"description": "
|
|
6867
|
-
"name": "
|
|
6920
|
+
"listviews": {
|
|
6921
|
+
"char": "l",
|
|
6922
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
6923
|
+
"name": "listviews",
|
|
6868
6924
|
"hasDynamicHelp": false,
|
|
6869
6925
|
"multiple": false,
|
|
6870
6926
|
"type": "option"
|
|
@@ -6907,79 +6963,59 @@
|
|
|
6907
6963
|
},
|
|
6908
6964
|
"hasDynamicHelp": true,
|
|
6909
6965
|
"hiddenAliases": [],
|
|
6910
|
-
"id": "hardis:org:
|
|
6966
|
+
"id": "hardis:org:fix:listviewmine",
|
|
6911
6967
|
"pluginAlias": "sfdx-hardis",
|
|
6912
6968
|
"pluginName": "sfdx-hardis",
|
|
6913
6969
|
"pluginType": "core",
|
|
6914
6970
|
"strict": true,
|
|
6915
6971
|
"enableJsonFlag": true,
|
|
6916
|
-
"title": "
|
|
6917
|
-
"requiresProject":
|
|
6918
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
6919
|
-
"Sales_User"
|
|
6920
|
-
],
|
|
6921
|
-
"permSetsPermSetLicenses": [
|
|
6922
|
-
{
|
|
6923
|
-
"permSet": "Sales_User",
|
|
6924
|
-
"permSetLicense": "SalesUserPsl"
|
|
6925
|
-
}
|
|
6926
|
-
],
|
|
6927
|
-
"profilesPermissionSetLicenses": [
|
|
6928
|
-
{
|
|
6929
|
-
"profile": "Salesforce API Only",
|
|
6930
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6931
|
-
}
|
|
6932
|
-
],
|
|
6933
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6934
|
-
"IdentityConnect"
|
|
6935
|
-
],
|
|
6972
|
+
"title": "Fix listviews with ",
|
|
6973
|
+
"requiresProject": true,
|
|
6936
6974
|
"isESM": true,
|
|
6937
6975
|
"relativePath": [
|
|
6938
6976
|
"lib",
|
|
6939
6977
|
"commands",
|
|
6940
6978
|
"hardis",
|
|
6941
6979
|
"org",
|
|
6942
|
-
"
|
|
6943
|
-
"
|
|
6980
|
+
"fix",
|
|
6981
|
+
"listviewmine.js"
|
|
6944
6982
|
],
|
|
6945
6983
|
"aliasPermutations": [],
|
|
6946
6984
|
"permutations": [
|
|
6947
|
-
"hardis:org:
|
|
6948
|
-
"org:hardis:
|
|
6949
|
-
"org:
|
|
6950
|
-
"org:
|
|
6951
|
-
"hardis:
|
|
6952
|
-
"
|
|
6953
|
-
"
|
|
6954
|
-
"
|
|
6955
|
-
"hardis:
|
|
6956
|
-
"
|
|
6957
|
-
"
|
|
6958
|
-
"
|
|
6959
|
-
"hardis:org:
|
|
6960
|
-
"org:hardis:
|
|
6961
|
-
"org:
|
|
6962
|
-
"org:
|
|
6963
|
-
"hardis:
|
|
6964
|
-
"
|
|
6965
|
-
"
|
|
6966
|
-
"
|
|
6967
|
-
"hardis:
|
|
6968
|
-
"
|
|
6969
|
-
"
|
|
6970
|
-
"
|
|
6985
|
+
"hardis:org:fix:listviewmine",
|
|
6986
|
+
"org:hardis:fix:listviewmine",
|
|
6987
|
+
"org:fix:hardis:listviewmine",
|
|
6988
|
+
"org:fix:listviewmine:hardis",
|
|
6989
|
+
"hardis:fix:org:listviewmine",
|
|
6990
|
+
"fix:hardis:org:listviewmine",
|
|
6991
|
+
"fix:org:hardis:listviewmine",
|
|
6992
|
+
"fix:org:listviewmine:hardis",
|
|
6993
|
+
"hardis:fix:listviewmine:org",
|
|
6994
|
+
"fix:hardis:listviewmine:org",
|
|
6995
|
+
"fix:listviewmine:hardis:org",
|
|
6996
|
+
"fix:listviewmine:org:hardis",
|
|
6997
|
+
"hardis:org:listviewmine:fix",
|
|
6998
|
+
"org:hardis:listviewmine:fix",
|
|
6999
|
+
"org:listviewmine:hardis:fix",
|
|
7000
|
+
"org:listviewmine:fix:hardis",
|
|
7001
|
+
"hardis:listviewmine:org:fix",
|
|
7002
|
+
"listviewmine:hardis:org:fix",
|
|
7003
|
+
"listviewmine:org:hardis:fix",
|
|
7004
|
+
"listviewmine:org:fix:hardis",
|
|
7005
|
+
"hardis:listviewmine:fix:org",
|
|
7006
|
+
"listviewmine:hardis:fix:org",
|
|
7007
|
+
"listviewmine:fix:hardis:org",
|
|
7008
|
+
"listviewmine:fix:org:hardis"
|
|
6971
7009
|
]
|
|
6972
7010
|
},
|
|
6973
|
-
"hardis:org:
|
|
7011
|
+
"hardis:org:generate:packagexmlfull": {
|
|
6974
7012
|
"aliases": [],
|
|
6975
7013
|
"args": {},
|
|
6976
|
-
"description": "\n## Command Behavior\n\n**
|
|
7014
|
+
"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.\n\n## Technical explanations\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",
|
|
6977
7015
|
"examples": [
|
|
6978
|
-
"$ sf hardis:org:
|
|
6979
|
-
"$ sf hardis:org:
|
|
6980
|
-
"$ sf hardis:org:
|
|
6981
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6982
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7016
|
+
"$ sf hardis:org:generate:packagexmlfull",
|
|
7017
|
+
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
7018
|
+
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
6983
7019
|
],
|
|
6984
7020
|
"flags": {
|
|
6985
7021
|
"json": {
|
|
@@ -6998,48 +7034,12 @@
|
|
|
6998
7034
|
"type": "option"
|
|
6999
7035
|
},
|
|
7000
7036
|
"outputfile": {
|
|
7001
|
-
"
|
|
7002
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7037
|
+
"description": "Output package.xml file",
|
|
7003
7038
|
"name": "outputfile",
|
|
7004
7039
|
"hasDynamicHelp": false,
|
|
7005
7040
|
"multiple": false,
|
|
7006
7041
|
"type": "option"
|
|
7007
7042
|
},
|
|
7008
|
-
"days": {
|
|
7009
|
-
"char": "t",
|
|
7010
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7011
|
-
"name": "days",
|
|
7012
|
-
"hasDynamicHelp": false,
|
|
7013
|
-
"multiple": false,
|
|
7014
|
-
"type": "option"
|
|
7015
|
-
},
|
|
7016
|
-
"licensetypes": {
|
|
7017
|
-
"char": "l",
|
|
7018
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
7019
|
-
"name": "licensetypes",
|
|
7020
|
-
"hasDynamicHelp": false,
|
|
7021
|
-
"multiple": false,
|
|
7022
|
-
"options": [
|
|
7023
|
-
"all",
|
|
7024
|
-
"all-crm",
|
|
7025
|
-
"all-paying"
|
|
7026
|
-
],
|
|
7027
|
-
"type": "option"
|
|
7028
|
-
},
|
|
7029
|
-
"licenseidentifiers": {
|
|
7030
|
-
"char": "i",
|
|
7031
|
-
"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",
|
|
7032
|
-
"name": "licenseidentifiers",
|
|
7033
|
-
"hasDynamicHelp": false,
|
|
7034
|
-
"multiple": false,
|
|
7035
|
-
"type": "option"
|
|
7036
|
-
},
|
|
7037
|
-
"returnactiveusers": {
|
|
7038
|
-
"description": "Inverts the command by returning the active users",
|
|
7039
|
-
"name": "returnactiveusers",
|
|
7040
|
-
"allowNo": false,
|
|
7041
|
-
"type": "boolean"
|
|
7042
|
-
},
|
|
7043
7043
|
"debug": {
|
|
7044
7044
|
"char": "d",
|
|
7045
7045
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7078,13 +7078,13 @@
|
|
|
7078
7078
|
},
|
|
7079
7079
|
"hasDynamicHelp": true,
|
|
7080
7080
|
"hiddenAliases": [],
|
|
7081
|
-
"id": "hardis:org:
|
|
7081
|
+
"id": "hardis:org:generate:packagexmlfull",
|
|
7082
7082
|
"pluginAlias": "sfdx-hardis",
|
|
7083
7083
|
"pluginName": "sfdx-hardis",
|
|
7084
7084
|
"pluginType": "core",
|
|
7085
7085
|
"strict": true,
|
|
7086
7086
|
"enableJsonFlag": true,
|
|
7087
|
-
"title": "
|
|
7087
|
+
"title": "Generate Full Org package.xml",
|
|
7088
7088
|
"requiresProject": false,
|
|
7089
7089
|
"isESM": true,
|
|
7090
7090
|
"relativePath": [
|
|
@@ -7092,35 +7092,35 @@
|
|
|
7092
7092
|
"commands",
|
|
7093
7093
|
"hardis",
|
|
7094
7094
|
"org",
|
|
7095
|
-
"
|
|
7096
|
-
"
|
|
7095
|
+
"generate",
|
|
7096
|
+
"packagexmlfull.js"
|
|
7097
7097
|
],
|
|
7098
7098
|
"aliasPermutations": [],
|
|
7099
7099
|
"permutations": [
|
|
7100
|
-
"hardis:org:
|
|
7101
|
-
"org:hardis:
|
|
7102
|
-
"org:
|
|
7103
|
-
"org:
|
|
7104
|
-
"hardis:
|
|
7105
|
-
"
|
|
7106
|
-
"
|
|
7107
|
-
"
|
|
7108
|
-
"hardis:
|
|
7109
|
-
"
|
|
7110
|
-
"
|
|
7111
|
-
"
|
|
7112
|
-
"hardis:org:
|
|
7113
|
-
"org:hardis:
|
|
7114
|
-
"org:
|
|
7115
|
-
"org:
|
|
7116
|
-
"hardis:
|
|
7117
|
-
"
|
|
7118
|
-
"
|
|
7119
|
-
"
|
|
7120
|
-
"hardis:
|
|
7121
|
-
"
|
|
7122
|
-
"
|
|
7123
|
-
"
|
|
7100
|
+
"hardis:org:generate:packagexmlfull",
|
|
7101
|
+
"org:hardis:generate:packagexmlfull",
|
|
7102
|
+
"org:generate:hardis:packagexmlfull",
|
|
7103
|
+
"org:generate:packagexmlfull:hardis",
|
|
7104
|
+
"hardis:generate:org:packagexmlfull",
|
|
7105
|
+
"generate:hardis:org:packagexmlfull",
|
|
7106
|
+
"generate:org:hardis:packagexmlfull",
|
|
7107
|
+
"generate:org:packagexmlfull:hardis",
|
|
7108
|
+
"hardis:generate:packagexmlfull:org",
|
|
7109
|
+
"generate:hardis:packagexmlfull:org",
|
|
7110
|
+
"generate:packagexmlfull:hardis:org",
|
|
7111
|
+
"generate:packagexmlfull:org:hardis",
|
|
7112
|
+
"hardis:org:packagexmlfull:generate",
|
|
7113
|
+
"org:hardis:packagexmlfull:generate",
|
|
7114
|
+
"org:packagexmlfull:hardis:generate",
|
|
7115
|
+
"org:packagexmlfull:generate:hardis",
|
|
7116
|
+
"hardis:packagexmlfull:org:generate",
|
|
7117
|
+
"packagexmlfull:hardis:org:generate",
|
|
7118
|
+
"packagexmlfull:org:hardis:generate",
|
|
7119
|
+
"packagexmlfull:org:generate:hardis",
|
|
7120
|
+
"hardis:packagexmlfull:generate:org",
|
|
7121
|
+
"packagexmlfull:hardis:generate:org",
|
|
7122
|
+
"packagexmlfull:generate:hardis:org",
|
|
7123
|
+
"packagexmlfull:generate:org:hardis"
|
|
7124
7124
|
]
|
|
7125
7125
|
},
|
|
7126
7126
|
"hardis:org:monitor:all": {
|
|
@@ -8847,6 +8847,135 @@
|
|
|
8847
8847
|
"promote:version:package:hardis"
|
|
8848
8848
|
]
|
|
8849
8849
|
},
|
|
8850
|
+
"hardis:project:configure:auth": {
|
|
8851
|
+
"aliases": [],
|
|
8852
|
+
"args": {},
|
|
8853
|
+
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n## Technical explanations\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
8854
|
+
"examples": [
|
|
8855
|
+
"$ sf hardis:project:configure:auth"
|
|
8856
|
+
],
|
|
8857
|
+
"flags": {
|
|
8858
|
+
"json": {
|
|
8859
|
+
"description": "Format output as json.",
|
|
8860
|
+
"helpGroup": "GLOBAL",
|
|
8861
|
+
"name": "json",
|
|
8862
|
+
"allowNo": false,
|
|
8863
|
+
"type": "boolean"
|
|
8864
|
+
},
|
|
8865
|
+
"flags-dir": {
|
|
8866
|
+
"helpGroup": "GLOBAL",
|
|
8867
|
+
"name": "flags-dir",
|
|
8868
|
+
"summary": "Import flag values from a directory.",
|
|
8869
|
+
"hasDynamicHelp": false,
|
|
8870
|
+
"multiple": false,
|
|
8871
|
+
"type": "option"
|
|
8872
|
+
},
|
|
8873
|
+
"devhub": {
|
|
8874
|
+
"char": "b",
|
|
8875
|
+
"description": "Configure project DevHub",
|
|
8876
|
+
"name": "devhub",
|
|
8877
|
+
"allowNo": false,
|
|
8878
|
+
"type": "boolean"
|
|
8879
|
+
},
|
|
8880
|
+
"debug": {
|
|
8881
|
+
"char": "d",
|
|
8882
|
+
"description": "Activate debug mode (more logs)",
|
|
8883
|
+
"name": "debug",
|
|
8884
|
+
"allowNo": false,
|
|
8885
|
+
"type": "boolean"
|
|
8886
|
+
},
|
|
8887
|
+
"websocket": {
|
|
8888
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8889
|
+
"name": "websocket",
|
|
8890
|
+
"hasDynamicHelp": false,
|
|
8891
|
+
"multiple": false,
|
|
8892
|
+
"type": "option"
|
|
8893
|
+
},
|
|
8894
|
+
"skipauth": {
|
|
8895
|
+
"description": "Skip authentication check when a default username is required",
|
|
8896
|
+
"name": "skipauth",
|
|
8897
|
+
"allowNo": false,
|
|
8898
|
+
"type": "boolean"
|
|
8899
|
+
},
|
|
8900
|
+
"target-org": {
|
|
8901
|
+
"aliases": [
|
|
8902
|
+
"targetusername",
|
|
8903
|
+
"u"
|
|
8904
|
+
],
|
|
8905
|
+
"char": "o",
|
|
8906
|
+
"deprecateAliases": true,
|
|
8907
|
+
"name": "target-org",
|
|
8908
|
+
"noCacheDefault": true,
|
|
8909
|
+
"summary": "Username or alias of the target org.",
|
|
8910
|
+
"hasDynamicHelp": true,
|
|
8911
|
+
"multiple": false,
|
|
8912
|
+
"type": "option"
|
|
8913
|
+
},
|
|
8914
|
+
"target-dev-hub": {
|
|
8915
|
+
"aliases": [
|
|
8916
|
+
"targetdevhubusername"
|
|
8917
|
+
],
|
|
8918
|
+
"char": "v",
|
|
8919
|
+
"deprecateAliases": true,
|
|
8920
|
+
"name": "target-dev-hub",
|
|
8921
|
+
"noCacheDefault": true,
|
|
8922
|
+
"required": false,
|
|
8923
|
+
"summary": "Username or alias of the Dev Hub org.",
|
|
8924
|
+
"hasDynamicHelp": true,
|
|
8925
|
+
"multiple": false,
|
|
8926
|
+
"type": "option"
|
|
8927
|
+
}
|
|
8928
|
+
},
|
|
8929
|
+
"hasDynamicHelp": true,
|
|
8930
|
+
"hiddenAliases": [],
|
|
8931
|
+
"id": "hardis:project:configure:auth",
|
|
8932
|
+
"pluginAlias": "sfdx-hardis",
|
|
8933
|
+
"pluginName": "sfdx-hardis",
|
|
8934
|
+
"pluginType": "core",
|
|
8935
|
+
"strict": true,
|
|
8936
|
+
"enableJsonFlag": true,
|
|
8937
|
+
"title": "Configure authentication",
|
|
8938
|
+
"requiresProject": false,
|
|
8939
|
+
"requiresDependencies": [
|
|
8940
|
+
"openssl"
|
|
8941
|
+
],
|
|
8942
|
+
"isESM": true,
|
|
8943
|
+
"relativePath": [
|
|
8944
|
+
"lib",
|
|
8945
|
+
"commands",
|
|
8946
|
+
"hardis",
|
|
8947
|
+
"project",
|
|
8948
|
+
"configure",
|
|
8949
|
+
"auth.js"
|
|
8950
|
+
],
|
|
8951
|
+
"aliasPermutations": [],
|
|
8952
|
+
"permutations": [
|
|
8953
|
+
"hardis:project:configure:auth",
|
|
8954
|
+
"project:hardis:configure:auth",
|
|
8955
|
+
"project:configure:hardis:auth",
|
|
8956
|
+
"project:configure:auth:hardis",
|
|
8957
|
+
"hardis:configure:project:auth",
|
|
8958
|
+
"configure:hardis:project:auth",
|
|
8959
|
+
"configure:project:hardis:auth",
|
|
8960
|
+
"configure:project:auth:hardis",
|
|
8961
|
+
"hardis:configure:auth:project",
|
|
8962
|
+
"configure:hardis:auth:project",
|
|
8963
|
+
"configure:auth:hardis:project",
|
|
8964
|
+
"configure:auth:project:hardis",
|
|
8965
|
+
"hardis:project:auth:configure",
|
|
8966
|
+
"project:hardis:auth:configure",
|
|
8967
|
+
"project:auth:hardis:configure",
|
|
8968
|
+
"project:auth:configure:hardis",
|
|
8969
|
+
"hardis:auth:project:configure",
|
|
8970
|
+
"auth:hardis:project:configure",
|
|
8971
|
+
"auth:project:hardis:configure",
|
|
8972
|
+
"auth:project:configure:hardis",
|
|
8973
|
+
"hardis:auth:configure:project",
|
|
8974
|
+
"auth:hardis:configure:project",
|
|
8975
|
+
"auth:configure:hardis:project",
|
|
8976
|
+
"auth:configure:project:hardis"
|
|
8977
|
+
]
|
|
8978
|
+
},
|
|
8850
8979
|
"hardis:project:audit:apiversion": {
|
|
8851
8980
|
"aliases": [],
|
|
8852
8981
|
"args": {},
|
|
@@ -9306,154 +9435,25 @@
|
|
|
9306
9435
|
"multiple": false,
|
|
9307
9436
|
"type": "option"
|
|
9308
9437
|
},
|
|
9309
|
-
"skipauth": {
|
|
9310
|
-
"description": "Skip authentication check when a default username is required",
|
|
9311
|
-
"name": "skipauth",
|
|
9312
|
-
"allowNo": false,
|
|
9313
|
-
"type": "boolean"
|
|
9314
|
-
}
|
|
9315
|
-
},
|
|
9316
|
-
"hasDynamicHelp": false,
|
|
9317
|
-
"hiddenAliases": [],
|
|
9318
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
9319
|
-
"pluginAlias": "sfdx-hardis",
|
|
9320
|
-
"pluginName": "sfdx-hardis",
|
|
9321
|
-
"pluginType": "core",
|
|
9322
|
-
"strict": true,
|
|
9323
|
-
"enableJsonFlag": true,
|
|
9324
|
-
"title": "Convert Profiles into Permission Sets",
|
|
9325
|
-
"requiresProject": true,
|
|
9326
|
-
"requiresSfdxPlugins": [
|
|
9327
|
-
"shane-sfdx-plugins"
|
|
9328
|
-
],
|
|
9329
|
-
"isESM": true,
|
|
9330
|
-
"relativePath": [
|
|
9331
|
-
"lib",
|
|
9332
|
-
"commands",
|
|
9333
|
-
"hardis",
|
|
9334
|
-
"project",
|
|
9335
|
-
"convert",
|
|
9336
|
-
"profilestopermsets.js"
|
|
9337
|
-
],
|
|
9338
|
-
"aliasPermutations": [],
|
|
9339
|
-
"permutations": [
|
|
9340
|
-
"hardis:project:convert:profilestopermsets",
|
|
9341
|
-
"project:hardis:convert:profilestopermsets",
|
|
9342
|
-
"project:convert:hardis:profilestopermsets",
|
|
9343
|
-
"project:convert:profilestopermsets:hardis",
|
|
9344
|
-
"hardis:convert:project:profilestopermsets",
|
|
9345
|
-
"convert:hardis:project:profilestopermsets",
|
|
9346
|
-
"convert:project:hardis:profilestopermsets",
|
|
9347
|
-
"convert:project:profilestopermsets:hardis",
|
|
9348
|
-
"hardis:convert:profilestopermsets:project",
|
|
9349
|
-
"convert:hardis:profilestopermsets:project",
|
|
9350
|
-
"convert:profilestopermsets:hardis:project",
|
|
9351
|
-
"convert:profilestopermsets:project:hardis",
|
|
9352
|
-
"hardis:project:profilestopermsets:convert",
|
|
9353
|
-
"project:hardis:profilestopermsets:convert",
|
|
9354
|
-
"project:profilestopermsets:hardis:convert",
|
|
9355
|
-
"project:profilestopermsets:convert:hardis",
|
|
9356
|
-
"hardis:profilestopermsets:project:convert",
|
|
9357
|
-
"profilestopermsets:hardis:project:convert",
|
|
9358
|
-
"profilestopermsets:project:hardis:convert",
|
|
9359
|
-
"profilestopermsets:project:convert:hardis",
|
|
9360
|
-
"hardis:profilestopermsets:convert:project",
|
|
9361
|
-
"profilestopermsets:hardis:convert:project",
|
|
9362
|
-
"profilestopermsets:convert:hardis:project",
|
|
9363
|
-
"profilestopermsets:convert:project:hardis"
|
|
9364
|
-
]
|
|
9365
|
-
},
|
|
9366
|
-
"hardis:project:configure:auth": {
|
|
9367
|
-
"aliases": [],
|
|
9368
|
-
"args": {},
|
|
9369
|
-
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n## Technical explanations\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
9370
|
-
"examples": [
|
|
9371
|
-
"$ sf hardis:project:configure:auth"
|
|
9372
|
-
],
|
|
9373
|
-
"flags": {
|
|
9374
|
-
"json": {
|
|
9375
|
-
"description": "Format output as json.",
|
|
9376
|
-
"helpGroup": "GLOBAL",
|
|
9377
|
-
"name": "json",
|
|
9378
|
-
"allowNo": false,
|
|
9379
|
-
"type": "boolean"
|
|
9380
|
-
},
|
|
9381
|
-
"flags-dir": {
|
|
9382
|
-
"helpGroup": "GLOBAL",
|
|
9383
|
-
"name": "flags-dir",
|
|
9384
|
-
"summary": "Import flag values from a directory.",
|
|
9385
|
-
"hasDynamicHelp": false,
|
|
9386
|
-
"multiple": false,
|
|
9387
|
-
"type": "option"
|
|
9388
|
-
},
|
|
9389
|
-
"devhub": {
|
|
9390
|
-
"char": "b",
|
|
9391
|
-
"description": "Configure project DevHub",
|
|
9392
|
-
"name": "devhub",
|
|
9393
|
-
"allowNo": false,
|
|
9394
|
-
"type": "boolean"
|
|
9395
|
-
},
|
|
9396
|
-
"debug": {
|
|
9397
|
-
"char": "d",
|
|
9398
|
-
"description": "Activate debug mode (more logs)",
|
|
9399
|
-
"name": "debug",
|
|
9400
|
-
"allowNo": false,
|
|
9401
|
-
"type": "boolean"
|
|
9402
|
-
},
|
|
9403
|
-
"websocket": {
|
|
9404
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9405
|
-
"name": "websocket",
|
|
9406
|
-
"hasDynamicHelp": false,
|
|
9407
|
-
"multiple": false,
|
|
9408
|
-
"type": "option"
|
|
9409
|
-
},
|
|
9410
|
-
"skipauth": {
|
|
9411
|
-
"description": "Skip authentication check when a default username is required",
|
|
9412
|
-
"name": "skipauth",
|
|
9413
|
-
"allowNo": false,
|
|
9414
|
-
"type": "boolean"
|
|
9415
|
-
},
|
|
9416
|
-
"target-org": {
|
|
9417
|
-
"aliases": [
|
|
9418
|
-
"targetusername",
|
|
9419
|
-
"u"
|
|
9420
|
-
],
|
|
9421
|
-
"char": "o",
|
|
9422
|
-
"deprecateAliases": true,
|
|
9423
|
-
"name": "target-org",
|
|
9424
|
-
"noCacheDefault": true,
|
|
9425
|
-
"summary": "Username or alias of the target org.",
|
|
9426
|
-
"hasDynamicHelp": true,
|
|
9427
|
-
"multiple": false,
|
|
9428
|
-
"type": "option"
|
|
9429
|
-
},
|
|
9430
|
-
"target-dev-hub": {
|
|
9431
|
-
"aliases": [
|
|
9432
|
-
"targetdevhubusername"
|
|
9433
|
-
],
|
|
9434
|
-
"char": "v",
|
|
9435
|
-
"deprecateAliases": true,
|
|
9436
|
-
"name": "target-dev-hub",
|
|
9437
|
-
"noCacheDefault": true,
|
|
9438
|
-
"required": false,
|
|
9439
|
-
"summary": "Username or alias of the Dev Hub org.",
|
|
9440
|
-
"hasDynamicHelp": true,
|
|
9441
|
-
"multiple": false,
|
|
9442
|
-
"type": "option"
|
|
9438
|
+
"skipauth": {
|
|
9439
|
+
"description": "Skip authentication check when a default username is required",
|
|
9440
|
+
"name": "skipauth",
|
|
9441
|
+
"allowNo": false,
|
|
9442
|
+
"type": "boolean"
|
|
9443
9443
|
}
|
|
9444
9444
|
},
|
|
9445
|
-
"hasDynamicHelp":
|
|
9445
|
+
"hasDynamicHelp": false,
|
|
9446
9446
|
"hiddenAliases": [],
|
|
9447
|
-
"id": "hardis:project:
|
|
9447
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
9448
9448
|
"pluginAlias": "sfdx-hardis",
|
|
9449
9449
|
"pluginName": "sfdx-hardis",
|
|
9450
9450
|
"pluginType": "core",
|
|
9451
9451
|
"strict": true,
|
|
9452
9452
|
"enableJsonFlag": true,
|
|
9453
|
-
"title": "
|
|
9454
|
-
"requiresProject":
|
|
9455
|
-
"
|
|
9456
|
-
"
|
|
9453
|
+
"title": "Convert Profiles into Permission Sets",
|
|
9454
|
+
"requiresProject": true,
|
|
9455
|
+
"requiresSfdxPlugins": [
|
|
9456
|
+
"shane-sfdx-plugins"
|
|
9457
9457
|
],
|
|
9458
9458
|
"isESM": true,
|
|
9459
9459
|
"relativePath": [
|
|
@@ -9461,35 +9461,35 @@
|
|
|
9461
9461
|
"commands",
|
|
9462
9462
|
"hardis",
|
|
9463
9463
|
"project",
|
|
9464
|
-
"
|
|
9465
|
-
"
|
|
9464
|
+
"convert",
|
|
9465
|
+
"profilestopermsets.js"
|
|
9466
9466
|
],
|
|
9467
9467
|
"aliasPermutations": [],
|
|
9468
9468
|
"permutations": [
|
|
9469
|
-
"hardis:project:
|
|
9470
|
-
"project:hardis:
|
|
9471
|
-
"project:
|
|
9472
|
-
"project:
|
|
9473
|
-
"hardis:
|
|
9474
|
-
"
|
|
9475
|
-
"
|
|
9476
|
-
"
|
|
9477
|
-
"hardis:
|
|
9478
|
-
"
|
|
9479
|
-
"
|
|
9480
|
-
"
|
|
9481
|
-
"hardis:project:
|
|
9482
|
-
"project:hardis:
|
|
9483
|
-
"project:
|
|
9484
|
-
"project:
|
|
9485
|
-
"hardis:
|
|
9486
|
-
"
|
|
9487
|
-
"
|
|
9488
|
-
"
|
|
9489
|
-
"hardis:
|
|
9490
|
-
"
|
|
9491
|
-
"
|
|
9492
|
-
"
|
|
9469
|
+
"hardis:project:convert:profilestopermsets",
|
|
9470
|
+
"project:hardis:convert:profilestopermsets",
|
|
9471
|
+
"project:convert:hardis:profilestopermsets",
|
|
9472
|
+
"project:convert:profilestopermsets:hardis",
|
|
9473
|
+
"hardis:convert:project:profilestopermsets",
|
|
9474
|
+
"convert:hardis:project:profilestopermsets",
|
|
9475
|
+
"convert:project:hardis:profilestopermsets",
|
|
9476
|
+
"convert:project:profilestopermsets:hardis",
|
|
9477
|
+
"hardis:convert:profilestopermsets:project",
|
|
9478
|
+
"convert:hardis:profilestopermsets:project",
|
|
9479
|
+
"convert:profilestopermsets:hardis:project",
|
|
9480
|
+
"convert:profilestopermsets:project:hardis",
|
|
9481
|
+
"hardis:project:profilestopermsets:convert",
|
|
9482
|
+
"project:hardis:profilestopermsets:convert",
|
|
9483
|
+
"project:profilestopermsets:hardis:convert",
|
|
9484
|
+
"project:profilestopermsets:convert:hardis",
|
|
9485
|
+
"hardis:profilestopermsets:project:convert",
|
|
9486
|
+
"profilestopermsets:hardis:project:convert",
|
|
9487
|
+
"profilestopermsets:project:hardis:convert",
|
|
9488
|
+
"profilestopermsets:project:convert:hardis",
|
|
9489
|
+
"hardis:profilestopermsets:convert:project",
|
|
9490
|
+
"profilestopermsets:hardis:convert:project",
|
|
9491
|
+
"profilestopermsets:convert:hardis:project",
|
|
9492
|
+
"profilestopermsets:convert:project:hardis"
|
|
9493
9493
|
]
|
|
9494
9494
|
},
|
|
9495
9495
|
"hardis:project:clean:emptyitems": {
|
|
@@ -10977,6 +10977,221 @@
|
|
|
10977
10977
|
"xml:clean:project:hardis"
|
|
10978
10978
|
]
|
|
10979
10979
|
},
|
|
10980
|
+
"hardis:project:fix:profiletabs": {
|
|
10981
|
+
"aliases": [],
|
|
10982
|
+
"args": {},
|
|
10983
|
+
"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## Technical explanations\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",
|
|
10984
|
+
"examples": [
|
|
10985
|
+
"$ sf hardis:project:fix:profiletabs"
|
|
10986
|
+
],
|
|
10987
|
+
"flags": {
|
|
10988
|
+
"json": {
|
|
10989
|
+
"description": "Format output as json.",
|
|
10990
|
+
"helpGroup": "GLOBAL",
|
|
10991
|
+
"name": "json",
|
|
10992
|
+
"allowNo": false,
|
|
10993
|
+
"type": "boolean"
|
|
10994
|
+
},
|
|
10995
|
+
"flags-dir": {
|
|
10996
|
+
"helpGroup": "GLOBAL",
|
|
10997
|
+
"name": "flags-dir",
|
|
10998
|
+
"summary": "Import flag values from a directory.",
|
|
10999
|
+
"hasDynamicHelp": false,
|
|
11000
|
+
"multiple": false,
|
|
11001
|
+
"type": "option"
|
|
11002
|
+
},
|
|
11003
|
+
"path": {
|
|
11004
|
+
"char": "p",
|
|
11005
|
+
"description": "Root folder",
|
|
11006
|
+
"name": "path",
|
|
11007
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
11008
|
+
"hasDynamicHelp": false,
|
|
11009
|
+
"multiple": false,
|
|
11010
|
+
"type": "option"
|
|
11011
|
+
},
|
|
11012
|
+
"debug": {
|
|
11013
|
+
"char": "d",
|
|
11014
|
+
"description": "Activate debug mode (more logs)",
|
|
11015
|
+
"name": "debug",
|
|
11016
|
+
"allowNo": false,
|
|
11017
|
+
"type": "boolean"
|
|
11018
|
+
},
|
|
11019
|
+
"websocket": {
|
|
11020
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11021
|
+
"name": "websocket",
|
|
11022
|
+
"hasDynamicHelp": false,
|
|
11023
|
+
"multiple": false,
|
|
11024
|
+
"type": "option"
|
|
11025
|
+
},
|
|
11026
|
+
"skipauth": {
|
|
11027
|
+
"description": "Skip authentication check when a default username is required",
|
|
11028
|
+
"name": "skipauth",
|
|
11029
|
+
"allowNo": false,
|
|
11030
|
+
"type": "boolean"
|
|
11031
|
+
},
|
|
11032
|
+
"target-org": {
|
|
11033
|
+
"aliases": [
|
|
11034
|
+
"targetusername",
|
|
11035
|
+
"u"
|
|
11036
|
+
],
|
|
11037
|
+
"char": "o",
|
|
11038
|
+
"deprecateAliases": true,
|
|
11039
|
+
"name": "target-org",
|
|
11040
|
+
"noCacheDefault": true,
|
|
11041
|
+
"required": true,
|
|
11042
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
11043
|
+
"hasDynamicHelp": true,
|
|
11044
|
+
"multiple": false,
|
|
11045
|
+
"type": "option"
|
|
11046
|
+
}
|
|
11047
|
+
},
|
|
11048
|
+
"hasDynamicHelp": true,
|
|
11049
|
+
"hiddenAliases": [],
|
|
11050
|
+
"id": "hardis:project:fix:profiletabs",
|
|
11051
|
+
"pluginAlias": "sfdx-hardis",
|
|
11052
|
+
"pluginName": "sfdx-hardis",
|
|
11053
|
+
"pluginType": "core",
|
|
11054
|
+
"strict": true,
|
|
11055
|
+
"enableJsonFlag": true,
|
|
11056
|
+
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
11057
|
+
"requiresProject": true,
|
|
11058
|
+
"isESM": true,
|
|
11059
|
+
"relativePath": [
|
|
11060
|
+
"lib",
|
|
11061
|
+
"commands",
|
|
11062
|
+
"hardis",
|
|
11063
|
+
"project",
|
|
11064
|
+
"fix",
|
|
11065
|
+
"profiletabs.js"
|
|
11066
|
+
],
|
|
11067
|
+
"aliasPermutations": [],
|
|
11068
|
+
"permutations": [
|
|
11069
|
+
"hardis:project:fix:profiletabs",
|
|
11070
|
+
"project:hardis:fix:profiletabs",
|
|
11071
|
+
"project:fix:hardis:profiletabs",
|
|
11072
|
+
"project:fix:profiletabs:hardis",
|
|
11073
|
+
"hardis:fix:project:profiletabs",
|
|
11074
|
+
"fix:hardis:project:profiletabs",
|
|
11075
|
+
"fix:project:hardis:profiletabs",
|
|
11076
|
+
"fix:project:profiletabs:hardis",
|
|
11077
|
+
"hardis:fix:profiletabs:project",
|
|
11078
|
+
"fix:hardis:profiletabs:project",
|
|
11079
|
+
"fix:profiletabs:hardis:project",
|
|
11080
|
+
"fix:profiletabs:project:hardis",
|
|
11081
|
+
"hardis:project:profiletabs:fix",
|
|
11082
|
+
"project:hardis:profiletabs:fix",
|
|
11083
|
+
"project:profiletabs:hardis:fix",
|
|
11084
|
+
"project:profiletabs:fix:hardis",
|
|
11085
|
+
"hardis:profiletabs:project:fix",
|
|
11086
|
+
"profiletabs:hardis:project:fix",
|
|
11087
|
+
"profiletabs:project:hardis:fix",
|
|
11088
|
+
"profiletabs:project:fix:hardis",
|
|
11089
|
+
"hardis:profiletabs:fix:project",
|
|
11090
|
+
"profiletabs:hardis:fix:project",
|
|
11091
|
+
"profiletabs:fix:hardis:project",
|
|
11092
|
+
"profiletabs:fix:project:hardis"
|
|
11093
|
+
]
|
|
11094
|
+
},
|
|
11095
|
+
"hardis:project:fix:v53flexipages": {
|
|
11096
|
+
"aliases": [],
|
|
11097
|
+
"args": {},
|
|
11098
|
+
"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## Technical explanations\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",
|
|
11099
|
+
"examples": [
|
|
11100
|
+
"$ sf hardis:project:fix:v53flexipages"
|
|
11101
|
+
],
|
|
11102
|
+
"flags": {
|
|
11103
|
+
"json": {
|
|
11104
|
+
"description": "Format output as json.",
|
|
11105
|
+
"helpGroup": "GLOBAL",
|
|
11106
|
+
"name": "json",
|
|
11107
|
+
"allowNo": false,
|
|
11108
|
+
"type": "boolean"
|
|
11109
|
+
},
|
|
11110
|
+
"flags-dir": {
|
|
11111
|
+
"helpGroup": "GLOBAL",
|
|
11112
|
+
"name": "flags-dir",
|
|
11113
|
+
"summary": "Import flag values from a directory.",
|
|
11114
|
+
"hasDynamicHelp": false,
|
|
11115
|
+
"multiple": false,
|
|
11116
|
+
"type": "option"
|
|
11117
|
+
},
|
|
11118
|
+
"path": {
|
|
11119
|
+
"char": "p",
|
|
11120
|
+
"description": "Root folder",
|
|
11121
|
+
"name": "path",
|
|
11122
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
11123
|
+
"hasDynamicHelp": false,
|
|
11124
|
+
"multiple": false,
|
|
11125
|
+
"type": "option"
|
|
11126
|
+
},
|
|
11127
|
+
"debug": {
|
|
11128
|
+
"char": "d",
|
|
11129
|
+
"description": "Activate debug mode (more logs)",
|
|
11130
|
+
"name": "debug",
|
|
11131
|
+
"allowNo": false,
|
|
11132
|
+
"type": "boolean"
|
|
11133
|
+
},
|
|
11134
|
+
"websocket": {
|
|
11135
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11136
|
+
"name": "websocket",
|
|
11137
|
+
"hasDynamicHelp": false,
|
|
11138
|
+
"multiple": false,
|
|
11139
|
+
"type": "option"
|
|
11140
|
+
},
|
|
11141
|
+
"skipauth": {
|
|
11142
|
+
"description": "Skip authentication check when a default username is required",
|
|
11143
|
+
"name": "skipauth",
|
|
11144
|
+
"allowNo": false,
|
|
11145
|
+
"type": "boolean"
|
|
11146
|
+
}
|
|
11147
|
+
},
|
|
11148
|
+
"hasDynamicHelp": false,
|
|
11149
|
+
"hiddenAliases": [],
|
|
11150
|
+
"id": "hardis:project:fix:v53flexipages",
|
|
11151
|
+
"pluginAlias": "sfdx-hardis",
|
|
11152
|
+
"pluginName": "sfdx-hardis",
|
|
11153
|
+
"pluginType": "core",
|
|
11154
|
+
"strict": true,
|
|
11155
|
+
"enableJsonFlag": true,
|
|
11156
|
+
"title": "Fix flexipages for v53",
|
|
11157
|
+
"requiresProject": true,
|
|
11158
|
+
"isESM": true,
|
|
11159
|
+
"relativePath": [
|
|
11160
|
+
"lib",
|
|
11161
|
+
"commands",
|
|
11162
|
+
"hardis",
|
|
11163
|
+
"project",
|
|
11164
|
+
"fix",
|
|
11165
|
+
"v53flexipages.js"
|
|
11166
|
+
],
|
|
11167
|
+
"aliasPermutations": [],
|
|
11168
|
+
"permutations": [
|
|
11169
|
+
"hardis:project:fix:v53flexipages",
|
|
11170
|
+
"project:hardis:fix:v53flexipages",
|
|
11171
|
+
"project:fix:hardis:v53flexipages",
|
|
11172
|
+
"project:fix:v53flexipages:hardis",
|
|
11173
|
+
"hardis:fix:project:v53flexipages",
|
|
11174
|
+
"fix:hardis:project:v53flexipages",
|
|
11175
|
+
"fix:project:hardis:v53flexipages",
|
|
11176
|
+
"fix:project:v53flexipages:hardis",
|
|
11177
|
+
"hardis:fix:v53flexipages:project",
|
|
11178
|
+
"fix:hardis:v53flexipages:project",
|
|
11179
|
+
"fix:v53flexipages:hardis:project",
|
|
11180
|
+
"fix:v53flexipages:project:hardis",
|
|
11181
|
+
"hardis:project:v53flexipages:fix",
|
|
11182
|
+
"project:hardis:v53flexipages:fix",
|
|
11183
|
+
"project:v53flexipages:hardis:fix",
|
|
11184
|
+
"project:v53flexipages:fix:hardis",
|
|
11185
|
+
"hardis:v53flexipages:project:fix",
|
|
11186
|
+
"v53flexipages:hardis:project:fix",
|
|
11187
|
+
"v53flexipages:project:hardis:fix",
|
|
11188
|
+
"v53flexipages:project:fix:hardis",
|
|
11189
|
+
"hardis:v53flexipages:fix:project",
|
|
11190
|
+
"v53flexipages:hardis:fix:project",
|
|
11191
|
+
"v53flexipages:fix:hardis:project",
|
|
11192
|
+
"v53flexipages:fix:project:hardis"
|
|
11193
|
+
]
|
|
11194
|
+
},
|
|
10980
11195
|
"hardis:project:deploy:notify": {
|
|
10981
11196
|
"aliases": [],
|
|
10982
11197
|
"args": {},
|
|
@@ -12152,221 +12367,6 @@
|
|
|
12152
12367
|
"validate:deploy:project:hardis"
|
|
12153
12368
|
]
|
|
12154
12369
|
},
|
|
12155
|
-
"hardis:project:fix:profiletabs": {
|
|
12156
|
-
"aliases": [],
|
|
12157
|
-
"args": {},
|
|
12158
|
-
"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## Technical explanations\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",
|
|
12159
|
-
"examples": [
|
|
12160
|
-
"$ sf hardis:project:fix:profiletabs"
|
|
12161
|
-
],
|
|
12162
|
-
"flags": {
|
|
12163
|
-
"json": {
|
|
12164
|
-
"description": "Format output as json.",
|
|
12165
|
-
"helpGroup": "GLOBAL",
|
|
12166
|
-
"name": "json",
|
|
12167
|
-
"allowNo": false,
|
|
12168
|
-
"type": "boolean"
|
|
12169
|
-
},
|
|
12170
|
-
"flags-dir": {
|
|
12171
|
-
"helpGroup": "GLOBAL",
|
|
12172
|
-
"name": "flags-dir",
|
|
12173
|
-
"summary": "Import flag values from a directory.",
|
|
12174
|
-
"hasDynamicHelp": false,
|
|
12175
|
-
"multiple": false,
|
|
12176
|
-
"type": "option"
|
|
12177
|
-
},
|
|
12178
|
-
"path": {
|
|
12179
|
-
"char": "p",
|
|
12180
|
-
"description": "Root folder",
|
|
12181
|
-
"name": "path",
|
|
12182
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12183
|
-
"hasDynamicHelp": false,
|
|
12184
|
-
"multiple": false,
|
|
12185
|
-
"type": "option"
|
|
12186
|
-
},
|
|
12187
|
-
"debug": {
|
|
12188
|
-
"char": "d",
|
|
12189
|
-
"description": "Activate debug mode (more logs)",
|
|
12190
|
-
"name": "debug",
|
|
12191
|
-
"allowNo": false,
|
|
12192
|
-
"type": "boolean"
|
|
12193
|
-
},
|
|
12194
|
-
"websocket": {
|
|
12195
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12196
|
-
"name": "websocket",
|
|
12197
|
-
"hasDynamicHelp": false,
|
|
12198
|
-
"multiple": false,
|
|
12199
|
-
"type": "option"
|
|
12200
|
-
},
|
|
12201
|
-
"skipauth": {
|
|
12202
|
-
"description": "Skip authentication check when a default username is required",
|
|
12203
|
-
"name": "skipauth",
|
|
12204
|
-
"allowNo": false,
|
|
12205
|
-
"type": "boolean"
|
|
12206
|
-
},
|
|
12207
|
-
"target-org": {
|
|
12208
|
-
"aliases": [
|
|
12209
|
-
"targetusername",
|
|
12210
|
-
"u"
|
|
12211
|
-
],
|
|
12212
|
-
"char": "o",
|
|
12213
|
-
"deprecateAliases": true,
|
|
12214
|
-
"name": "target-org",
|
|
12215
|
-
"noCacheDefault": true,
|
|
12216
|
-
"required": true,
|
|
12217
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
12218
|
-
"hasDynamicHelp": true,
|
|
12219
|
-
"multiple": false,
|
|
12220
|
-
"type": "option"
|
|
12221
|
-
}
|
|
12222
|
-
},
|
|
12223
|
-
"hasDynamicHelp": true,
|
|
12224
|
-
"hiddenAliases": [],
|
|
12225
|
-
"id": "hardis:project:fix:profiletabs",
|
|
12226
|
-
"pluginAlias": "sfdx-hardis",
|
|
12227
|
-
"pluginName": "sfdx-hardis",
|
|
12228
|
-
"pluginType": "core",
|
|
12229
|
-
"strict": true,
|
|
12230
|
-
"enableJsonFlag": true,
|
|
12231
|
-
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
12232
|
-
"requiresProject": true,
|
|
12233
|
-
"isESM": true,
|
|
12234
|
-
"relativePath": [
|
|
12235
|
-
"lib",
|
|
12236
|
-
"commands",
|
|
12237
|
-
"hardis",
|
|
12238
|
-
"project",
|
|
12239
|
-
"fix",
|
|
12240
|
-
"profiletabs.js"
|
|
12241
|
-
],
|
|
12242
|
-
"aliasPermutations": [],
|
|
12243
|
-
"permutations": [
|
|
12244
|
-
"hardis:project:fix:profiletabs",
|
|
12245
|
-
"project:hardis:fix:profiletabs",
|
|
12246
|
-
"project:fix:hardis:profiletabs",
|
|
12247
|
-
"project:fix:profiletabs:hardis",
|
|
12248
|
-
"hardis:fix:project:profiletabs",
|
|
12249
|
-
"fix:hardis:project:profiletabs",
|
|
12250
|
-
"fix:project:hardis:profiletabs",
|
|
12251
|
-
"fix:project:profiletabs:hardis",
|
|
12252
|
-
"hardis:fix:profiletabs:project",
|
|
12253
|
-
"fix:hardis:profiletabs:project",
|
|
12254
|
-
"fix:profiletabs:hardis:project",
|
|
12255
|
-
"fix:profiletabs:project:hardis",
|
|
12256
|
-
"hardis:project:profiletabs:fix",
|
|
12257
|
-
"project:hardis:profiletabs:fix",
|
|
12258
|
-
"project:profiletabs:hardis:fix",
|
|
12259
|
-
"project:profiletabs:fix:hardis",
|
|
12260
|
-
"hardis:profiletabs:project:fix",
|
|
12261
|
-
"profiletabs:hardis:project:fix",
|
|
12262
|
-
"profiletabs:project:hardis:fix",
|
|
12263
|
-
"profiletabs:project:fix:hardis",
|
|
12264
|
-
"hardis:profiletabs:fix:project",
|
|
12265
|
-
"profiletabs:hardis:fix:project",
|
|
12266
|
-
"profiletabs:fix:hardis:project",
|
|
12267
|
-
"profiletabs:fix:project:hardis"
|
|
12268
|
-
]
|
|
12269
|
-
},
|
|
12270
|
-
"hardis:project:fix:v53flexipages": {
|
|
12271
|
-
"aliases": [],
|
|
12272
|
-
"args": {},
|
|
12273
|
-
"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## Technical explanations\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",
|
|
12274
|
-
"examples": [
|
|
12275
|
-
"$ sf hardis:project:fix:v53flexipages"
|
|
12276
|
-
],
|
|
12277
|
-
"flags": {
|
|
12278
|
-
"json": {
|
|
12279
|
-
"description": "Format output as json.",
|
|
12280
|
-
"helpGroup": "GLOBAL",
|
|
12281
|
-
"name": "json",
|
|
12282
|
-
"allowNo": false,
|
|
12283
|
-
"type": "boolean"
|
|
12284
|
-
},
|
|
12285
|
-
"flags-dir": {
|
|
12286
|
-
"helpGroup": "GLOBAL",
|
|
12287
|
-
"name": "flags-dir",
|
|
12288
|
-
"summary": "Import flag values from a directory.",
|
|
12289
|
-
"hasDynamicHelp": false,
|
|
12290
|
-
"multiple": false,
|
|
12291
|
-
"type": "option"
|
|
12292
|
-
},
|
|
12293
|
-
"path": {
|
|
12294
|
-
"char": "p",
|
|
12295
|
-
"description": "Root folder",
|
|
12296
|
-
"name": "path",
|
|
12297
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12298
|
-
"hasDynamicHelp": false,
|
|
12299
|
-
"multiple": false,
|
|
12300
|
-
"type": "option"
|
|
12301
|
-
},
|
|
12302
|
-
"debug": {
|
|
12303
|
-
"char": "d",
|
|
12304
|
-
"description": "Activate debug mode (more logs)",
|
|
12305
|
-
"name": "debug",
|
|
12306
|
-
"allowNo": false,
|
|
12307
|
-
"type": "boolean"
|
|
12308
|
-
},
|
|
12309
|
-
"websocket": {
|
|
12310
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12311
|
-
"name": "websocket",
|
|
12312
|
-
"hasDynamicHelp": false,
|
|
12313
|
-
"multiple": false,
|
|
12314
|
-
"type": "option"
|
|
12315
|
-
},
|
|
12316
|
-
"skipauth": {
|
|
12317
|
-
"description": "Skip authentication check when a default username is required",
|
|
12318
|
-
"name": "skipauth",
|
|
12319
|
-
"allowNo": false,
|
|
12320
|
-
"type": "boolean"
|
|
12321
|
-
}
|
|
12322
|
-
},
|
|
12323
|
-
"hasDynamicHelp": false,
|
|
12324
|
-
"hiddenAliases": [],
|
|
12325
|
-
"id": "hardis:project:fix:v53flexipages",
|
|
12326
|
-
"pluginAlias": "sfdx-hardis",
|
|
12327
|
-
"pluginName": "sfdx-hardis",
|
|
12328
|
-
"pluginType": "core",
|
|
12329
|
-
"strict": true,
|
|
12330
|
-
"enableJsonFlag": true,
|
|
12331
|
-
"title": "Fix flexipages for v53",
|
|
12332
|
-
"requiresProject": true,
|
|
12333
|
-
"isESM": true,
|
|
12334
|
-
"relativePath": [
|
|
12335
|
-
"lib",
|
|
12336
|
-
"commands",
|
|
12337
|
-
"hardis",
|
|
12338
|
-
"project",
|
|
12339
|
-
"fix",
|
|
12340
|
-
"v53flexipages.js"
|
|
12341
|
-
],
|
|
12342
|
-
"aliasPermutations": [],
|
|
12343
|
-
"permutations": [
|
|
12344
|
-
"hardis:project:fix:v53flexipages",
|
|
12345
|
-
"project:hardis:fix:v53flexipages",
|
|
12346
|
-
"project:fix:hardis:v53flexipages",
|
|
12347
|
-
"project:fix:v53flexipages:hardis",
|
|
12348
|
-
"hardis:fix:project:v53flexipages",
|
|
12349
|
-
"fix:hardis:project:v53flexipages",
|
|
12350
|
-
"fix:project:hardis:v53flexipages",
|
|
12351
|
-
"fix:project:v53flexipages:hardis",
|
|
12352
|
-
"hardis:fix:v53flexipages:project",
|
|
12353
|
-
"fix:hardis:v53flexipages:project",
|
|
12354
|
-
"fix:v53flexipages:hardis:project",
|
|
12355
|
-
"fix:v53flexipages:project:hardis",
|
|
12356
|
-
"hardis:project:v53flexipages:fix",
|
|
12357
|
-
"project:hardis:v53flexipages:fix",
|
|
12358
|
-
"project:v53flexipages:hardis:fix",
|
|
12359
|
-
"project:v53flexipages:fix:hardis",
|
|
12360
|
-
"hardis:v53flexipages:project:fix",
|
|
12361
|
-
"v53flexipages:hardis:project:fix",
|
|
12362
|
-
"v53flexipages:project:hardis:fix",
|
|
12363
|
-
"v53flexipages:project:fix:hardis",
|
|
12364
|
-
"hardis:v53flexipages:fix:project",
|
|
12365
|
-
"v53flexipages:hardis:fix:project",
|
|
12366
|
-
"v53flexipages:fix:hardis:project",
|
|
12367
|
-
"v53flexipages:fix:project:hardis"
|
|
12368
|
-
]
|
|
12369
|
-
},
|
|
12370
12370
|
"hardis:project:generate:bypass": {
|
|
12371
12371
|
"aliases": [],
|
|
12372
12372
|
"args": {},
|
|
@@ -14849,5 +14849,5 @@
|
|
|
14849
14849
|
]
|
|
14850
14850
|
}
|
|
14851
14851
|
},
|
|
14852
|
-
"version": "6.0.
|
|
14852
|
+
"version": "6.0.2-beta202508111351.0"
|
|
14853
14853
|
}
|