sfdx-hardis 6.14.4-beta202512080425.0 → 6.14.4

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.
@@ -132,12 +132,13 @@
132
132
  "clear:cache:hardis"
133
133
  ]
134
134
  },
135
- "hardis:config:get": {
135
+ "hardis:auth:login": {
136
136
  "aliases": [],
137
137
  "args": {},
138
- "description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
138
+ "description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
139
139
  "examples": [
140
- "$ sf hardis:project:deploy:sources:metadata"
140
+ "$ sf hardis:auth:login",
141
+ "CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
141
142
  ],
142
143
  "flags": {
143
144
  "json": {
@@ -155,20 +156,28 @@
155
156
  "multiple": false,
156
157
  "type": "option"
157
158
  },
158
- "level": {
159
- "char": "l",
160
- "description": "project,branch or user",
161
- "name": "level",
162
- "default": "project",
159
+ "instanceurl": {
160
+ "char": "r",
161
+ "description": "URL of org instance",
162
+ "name": "instanceurl",
163
163
  "hasDynamicHelp": false,
164
164
  "multiple": false,
165
- "options": [
166
- "project",
167
- "branch",
168
- "user"
169
- ],
170
165
  "type": "option"
171
166
  },
167
+ "devhub": {
168
+ "char": "h",
169
+ "description": "Also connect associated DevHub",
170
+ "name": "devhub",
171
+ "allowNo": false,
172
+ "type": "boolean"
173
+ },
174
+ "scratchorg": {
175
+ "char": "s",
176
+ "description": "Scratch org",
177
+ "name": "scratchorg",
178
+ "allowNo": false,
179
+ "type": "boolean"
180
+ },
172
181
  "debug": {
173
182
  "char": "d",
174
183
  "description": "Activate debug mode (more logs)",
@@ -192,39 +201,38 @@
192
201
  },
193
202
  "hasDynamicHelp": false,
194
203
  "hiddenAliases": [],
195
- "id": "hardis:config:get",
204
+ "id": "hardis:auth:login",
196
205
  "pluginAlias": "sfdx-hardis",
197
206
  "pluginName": "sfdx-hardis",
198
207
  "pluginType": "core",
199
208
  "strict": true,
200
209
  "enableJsonFlag": true,
201
- "title": "Deploy metadata sources to org",
210
+ "title": "Login",
202
211
  "requiresProject": false,
203
212
  "isESM": true,
204
213
  "relativePath": [
205
214
  "lib",
206
215
  "commands",
207
216
  "hardis",
208
- "config",
209
- "get.js"
217
+ "auth",
218
+ "login.js"
210
219
  ],
211
220
  "aliasPermutations": [],
212
221
  "permutations": [
213
- "hardis:config:get",
214
- "config:hardis:get",
215
- "config:get:hardis",
216
- "hardis:get:config",
217
- "get:hardis:config",
218
- "get:config:hardis"
222
+ "hardis:auth:login",
223
+ "auth:hardis:login",
224
+ "auth:login:hardis",
225
+ "hardis:login:auth",
226
+ "login:hardis:auth",
227
+ "login:auth:hardis"
219
228
  ]
220
229
  },
221
- "hardis:auth:login": {
230
+ "hardis:config:get": {
222
231
  "aliases": [],
223
232
  "args": {},
224
- "description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
233
+ "description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
225
234
  "examples": [
226
- "$ sf hardis:auth:login",
227
- "CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
235
+ "$ sf hardis:project:deploy:sources:metadata"
228
236
  ],
229
237
  "flags": {
230
238
  "json": {
@@ -242,28 +250,20 @@
242
250
  "multiple": false,
243
251
  "type": "option"
244
252
  },
245
- "instanceurl": {
246
- "char": "r",
247
- "description": "URL of org instance",
248
- "name": "instanceurl",
253
+ "level": {
254
+ "char": "l",
255
+ "description": "project,branch or user",
256
+ "name": "level",
257
+ "default": "project",
249
258
  "hasDynamicHelp": false,
250
259
  "multiple": false,
260
+ "options": [
261
+ "project",
262
+ "branch",
263
+ "user"
264
+ ],
251
265
  "type": "option"
252
266
  },
253
- "devhub": {
254
- "char": "h",
255
- "description": "Also connect associated DevHub",
256
- "name": "devhub",
257
- "allowNo": false,
258
- "type": "boolean"
259
- },
260
- "scratchorg": {
261
- "char": "s",
262
- "description": "Scratch org",
263
- "name": "scratchorg",
264
- "allowNo": false,
265
- "type": "boolean"
266
- },
267
267
  "debug": {
268
268
  "char": "d",
269
269
  "description": "Activate debug mode (more logs)",
@@ -287,30 +287,30 @@
287
287
  },
288
288
  "hasDynamicHelp": false,
289
289
  "hiddenAliases": [],
290
- "id": "hardis:auth:login",
290
+ "id": "hardis:config:get",
291
291
  "pluginAlias": "sfdx-hardis",
292
292
  "pluginName": "sfdx-hardis",
293
293
  "pluginType": "core",
294
294
  "strict": true,
295
295
  "enableJsonFlag": true,
296
- "title": "Login",
296
+ "title": "Deploy metadata sources to org",
297
297
  "requiresProject": false,
298
298
  "isESM": true,
299
299
  "relativePath": [
300
300
  "lib",
301
301
  "commands",
302
302
  "hardis",
303
- "auth",
304
- "login.js"
303
+ "config",
304
+ "get.js"
305
305
  ],
306
306
  "aliasPermutations": [],
307
307
  "permutations": [
308
- "hardis:auth:login",
309
- "auth:hardis:login",
310
- "auth:login:hardis",
311
- "hardis:login:auth",
312
- "login:hardis:auth",
313
- "login:auth:hardis"
308
+ "hardis:config:get",
309
+ "config:hardis:get",
310
+ "config:get:hardis",
311
+ "hardis:get:config",
312
+ "get:hardis:config",
313
+ "get:config:hardis"
314
314
  ]
315
315
  },
316
316
  "hardis:doc:fieldusage": {
@@ -5539,12 +5539,15 @@
5539
5539
  "import:data:org:hardis"
5540
5540
  ]
5541
5541
  },
5542
- "hardis:org:files:export": {
5542
+ "hardis:org:diagnose:audittrail": {
5543
5543
  "aliases": [],
5544
5544
  "args": {},
5545
- "description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
5545
+ "description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nAlso detects updates of Custom Settings values (disable by defining `SKIP_AUDIT_TRAIL_CUSTOM_SETTINGS=true`)\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n - revokeduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n - CSPUserDisabled\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- External Objects\n - xdsEncryptedFieldChange\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n - siqUserAcceptedTOS\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedofflineuseroffon\n - changedprofileforuserstdtostd\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserAdminVerifiedStatusVerified\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedusername\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - changedUserPhoneVerifiedStatusVerified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suNetworkAdminLogin\n - suNetworkAdminLogout\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\n## Excel output example\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-monitoring-audittrail-excel.jpg)\n\n## Local output example\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-monitoring-audittrail-local.jpg)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-suspect-audit-trail/) and can output Grafana, Slack and MsTeams Notifications.\n",
5546
5546
  "examples": [
5547
- "$ sf hardis:org:files:export"
5547
+ "$ sf hardis:org:diagnose:audittrail",
5548
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5549
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5550
+ "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5548
5551
  ],
5549
5552
  "flags": {
5550
5553
  "json": {
@@ -5562,48 +5565,30 @@
5562
5565
  "multiple": false,
5563
5566
  "type": "option"
5564
5567
  },
5565
- "path": {
5566
- "char": "p",
5567
- "description": "Path to the file export project",
5568
- "name": "path",
5569
- "hasDynamicHelp": false,
5570
- "multiple": false,
5571
- "type": "option"
5572
- },
5573
- "chunksize": {
5574
- "char": "c",
5575
- "description": "Number of records to add in a chunk before it is processed",
5576
- "name": "chunksize",
5577
- "default": 1000,
5568
+ "excludeusers": {
5569
+ "char": "e",
5570
+ "description": "Comma-separated list of usernames to exclude",
5571
+ "name": "excludeusers",
5578
5572
  "hasDynamicHelp": false,
5579
5573
  "multiple": false,
5580
5574
  "type": "option"
5581
5575
  },
5582
- "polltimeout": {
5576
+ "lastndays": {
5583
5577
  "char": "t",
5584
- "description": "Timeout in MS for Bulk API calls",
5585
- "name": "polltimeout",
5586
- "default": 300000,
5578
+ "description": "Number of days to extract from today (included)",
5579
+ "name": "lastndays",
5587
5580
  "hasDynamicHelp": false,
5588
5581
  "multiple": false,
5589
5582
  "type": "option"
5590
5583
  },
5591
- "startchunknumber": {
5592
- "char": "s",
5593
- "description": "Chunk number to start from",
5594
- "name": "startchunknumber",
5595
- "default": 0,
5584
+ "outputfile": {
5585
+ "char": "f",
5586
+ "description": "Force the path and name of output report file. Must end with .csv",
5587
+ "name": "outputfile",
5596
5588
  "hasDynamicHelp": false,
5597
5589
  "multiple": false,
5598
5590
  "type": "option"
5599
5591
  },
5600
- "resume": {
5601
- "char": "r",
5602
- "description": "Resume previous export by checking existing files (default in CI)",
5603
- "name": "resume",
5604
- "allowNo": false,
5605
- "type": "boolean"
5606
- },
5607
5592
  "debug": {
5608
5593
  "char": "d",
5609
5594
  "description": "Activate debug mode (more logs)",
@@ -5642,13 +5627,13 @@
5642
5627
  },
5643
5628
  "hasDynamicHelp": true,
5644
5629
  "hiddenAliases": [],
5645
- "id": "hardis:org:files:export",
5630
+ "id": "hardis:org:diagnose:audittrail",
5646
5631
  "pluginAlias": "sfdx-hardis",
5647
5632
  "pluginName": "sfdx-hardis",
5648
5633
  "pluginType": "core",
5649
5634
  "strict": true,
5650
5635
  "enableJsonFlag": true,
5651
- "title": "Export files",
5636
+ "title": "Diagnose content of Setup Audit Trail",
5652
5637
  "requiresProject": false,
5653
5638
  "isESM": true,
5654
5639
  "relativePath": [
@@ -5656,43 +5641,43 @@
5656
5641
  "commands",
5657
5642
  "hardis",
5658
5643
  "org",
5659
- "files",
5660
- "export.js"
5644
+ "diagnose",
5645
+ "audittrail.js"
5661
5646
  ],
5662
5647
  "aliasPermutations": [],
5663
5648
  "permutations": [
5664
- "hardis:org:files:export",
5665
- "org:hardis:files:export",
5666
- "org:files:hardis:export",
5667
- "org:files:export:hardis",
5668
- "hardis:files:org:export",
5669
- "files:hardis:org:export",
5670
- "files:org:hardis:export",
5671
- "files:org:export:hardis",
5672
- "hardis:files:export:org",
5673
- "files:hardis:export:org",
5674
- "files:export:hardis:org",
5675
- "files:export:org:hardis",
5676
- "hardis:org:export:files",
5677
- "org:hardis:export:files",
5678
- "org:export:hardis:files",
5679
- "org:export:files:hardis",
5680
- "hardis:export:org:files",
5681
- "export:hardis:org:files",
5682
- "export:org:hardis:files",
5683
- "export:org:files:hardis",
5684
- "hardis:export:files:org",
5685
- "export:hardis:files:org",
5686
- "export:files:hardis:org",
5687
- "export:files:org:hardis"
5649
+ "hardis:org:diagnose:audittrail",
5650
+ "org:hardis:diagnose:audittrail",
5651
+ "org:diagnose:hardis:audittrail",
5652
+ "org:diagnose:audittrail:hardis",
5653
+ "hardis:diagnose:org:audittrail",
5654
+ "diagnose:hardis:org:audittrail",
5655
+ "diagnose:org:hardis:audittrail",
5656
+ "diagnose:org:audittrail:hardis",
5657
+ "hardis:diagnose:audittrail:org",
5658
+ "diagnose:hardis:audittrail:org",
5659
+ "diagnose:audittrail:hardis:org",
5660
+ "diagnose:audittrail:org:hardis",
5661
+ "hardis:org:audittrail:diagnose",
5662
+ "org:hardis:audittrail:diagnose",
5663
+ "org:audittrail:hardis:diagnose",
5664
+ "org:audittrail:diagnose:hardis",
5665
+ "hardis:audittrail:org:diagnose",
5666
+ "audittrail:hardis:org:diagnose",
5667
+ "audittrail:org:hardis:diagnose",
5668
+ "audittrail:org:diagnose:hardis",
5669
+ "hardis:audittrail:diagnose:org",
5670
+ "audittrail:hardis:diagnose:org",
5671
+ "audittrail:diagnose:hardis:org",
5672
+ "audittrail:diagnose:org:hardis"
5688
5673
  ]
5689
5674
  },
5690
- "hardis:org:files:import": {
5675
+ "hardis:org:diagnose:instanceupgrade": {
5691
5676
  "aliases": [],
5692
5677
  "args": {},
5693
- "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[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
5678
+ "description": "\n## Command Behavior\n\n**Retrieves and displays the scheduled upgrade date for a Salesforce org's instance.**\n\nThis command provides crucial information about when your Salesforce instance will be upgraded to the next major release (Spring, Summer, or Winter). This is vital for release planning, testing, and ensuring compatibility with upcoming Salesforce features.\n\nKey functionalities:\n\n- **Instance Identification:** Determines the Salesforce instance name of your target org.\n- **Upgrade Date Retrieval:** Fetches the planned start time of the next major core service upgrade for that instance from the Salesforce Status API.\n- **Days Until Upgrade:** Calculates and displays the number of days remaining until the next major upgrade.\n- **Severity-Based Logging:** Adjusts the log severity (info, warning) based on the proximity of the upgrade date, providing a visual cue for urgency.\n- **Notifications:** Sends notifications to configured channels (e.g., Slack, MS Teams, Grafana) with the upgrade information, making it suitable for automated monitoring.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the `Organization` object in Salesforce to get the `InstanceName` of the target org.\n- **Salesforce Status API Integration:** It makes an HTTP GET request to the Salesforce Status API (`https://api.status.salesforce.com/v1/instances/{instanceName}/status`) to retrieve detailed information about the instance, including scheduled maintenances.\n- **Data Parsing:** It parses the JSON response from the Status API to extract the relevant major release upgrade information.\n- **Date Calculation:** Uses the `moment` library to calculate the difference in days between the current date and the planned upgrade date.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including the instance name, upgrade date, and days remaining, along with relevant metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the upgrade status and proximity.\n</details>\n",
5694
5679
  "examples": [
5695
- "$ sf hardis:org:files:import"
5680
+ "$ sf hardis:org:diagnose:instanceupgrade"
5696
5681
  ],
5697
5682
  "flags": {
5698
5683
  "json": {
@@ -5710,21 +5695,6 @@
5710
5695
  "multiple": false,
5711
5696
  "type": "option"
5712
5697
  },
5713
- "path": {
5714
- "char": "p",
5715
- "description": "Path to the file export project",
5716
- "name": "path",
5717
- "hasDynamicHelp": false,
5718
- "multiple": false,
5719
- "type": "option"
5720
- },
5721
- "overwrite": {
5722
- "char": "f",
5723
- "description": "Override existing files (doubles the number of API calls)",
5724
- "name": "overwrite",
5725
- "allowNo": false,
5726
- "type": "boolean"
5727
- },
5728
5698
  "debug": {
5729
5699
  "char": "d",
5730
5700
  "description": "Activate debug mode (more logs)",
@@ -5763,13 +5733,13 @@
5763
5733
  },
5764
5734
  "hasDynamicHelp": true,
5765
5735
  "hiddenAliases": [],
5766
- "id": "hardis:org:files:import",
5736
+ "id": "hardis:org:diagnose:instanceupgrade",
5767
5737
  "pluginAlias": "sfdx-hardis",
5768
5738
  "pluginName": "sfdx-hardis",
5769
5739
  "pluginType": "core",
5770
5740
  "strict": true,
5771
5741
  "enableJsonFlag": true,
5772
- "title": "Import files",
5742
+ "title": "Get Instance Upgrade date",
5773
5743
  "requiresProject": false,
5774
5744
  "isESM": true,
5775
5745
  "relativePath": [
@@ -5777,247 +5747,8 @@
5777
5747
  "commands",
5778
5748
  "hardis",
5779
5749
  "org",
5780
- "files",
5781
- "import.js"
5782
- ],
5783
- "aliasPermutations": [],
5784
- "permutations": [
5785
- "hardis:org:files:import",
5786
- "org:hardis:files:import",
5787
- "org:files:hardis:import",
5788
- "org:files:import:hardis",
5789
- "hardis:files:org:import",
5790
- "files:hardis:org:import",
5791
- "files:org:hardis:import",
5792
- "files:org:import:hardis",
5793
- "hardis:files:import:org",
5794
- "files:hardis:import:org",
5795
- "files:import:hardis:org",
5796
- "files:import:org:hardis",
5797
- "hardis:org:import:files",
5798
- "org:hardis:import:files",
5799
- "org:import:hardis:files",
5800
- "org:import:files:hardis",
5801
- "hardis:import:org:files",
5802
- "import:hardis:org:files",
5803
- "import:org:hardis:files",
5804
- "import:org:files:hardis",
5805
- "hardis:import:files:org",
5806
- "import:hardis:files:org",
5807
- "import:files:hardis:org",
5808
- "import:files:org:hardis"
5809
- ]
5810
- },
5811
- "hardis:org:diagnose:audittrail": {
5812
- "aliases": [],
5813
- "args": {},
5814
- "description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nAlso detects updates of Custom Settings values (disable by defining `SKIP_AUDIT_TRAIL_CUSTOM_SETTINGS=true`)\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n - revokeduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n - CSPUserDisabled\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- External Objects\n - xdsEncryptedFieldChange\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n - siqUserAcceptedTOS\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedofflineuseroffon\n - changedprofileforuserstdtostd\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserAdminVerifiedStatusVerified\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedusername\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - changedUserPhoneVerifiedStatusVerified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suNetworkAdminLogin\n - suNetworkAdminLogout\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\n## Excel output example\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-monitoring-audittrail-excel.jpg)\n\n## Local output example\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-monitoring-audittrail-local.jpg)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-suspect-audit-trail/) and can output Grafana, Slack and MsTeams Notifications.\n",
5815
- "examples": [
5816
- "$ sf hardis:org:diagnose:audittrail",
5817
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5818
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5819
- "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5820
- ],
5821
- "flags": {
5822
- "json": {
5823
- "description": "Format output as json.",
5824
- "helpGroup": "GLOBAL",
5825
- "name": "json",
5826
- "allowNo": false,
5827
- "type": "boolean"
5828
- },
5829
- "flags-dir": {
5830
- "helpGroup": "GLOBAL",
5831
- "name": "flags-dir",
5832
- "summary": "Import flag values from a directory.",
5833
- "hasDynamicHelp": false,
5834
- "multiple": false,
5835
- "type": "option"
5836
- },
5837
- "excludeusers": {
5838
- "char": "e",
5839
- "description": "Comma-separated list of usernames to exclude",
5840
- "name": "excludeusers",
5841
- "hasDynamicHelp": false,
5842
- "multiple": false,
5843
- "type": "option"
5844
- },
5845
- "lastndays": {
5846
- "char": "t",
5847
- "description": "Number of days to extract from today (included)",
5848
- "name": "lastndays",
5849
- "hasDynamicHelp": false,
5850
- "multiple": false,
5851
- "type": "option"
5852
- },
5853
- "outputfile": {
5854
- "char": "f",
5855
- "description": "Force the path and name of output report file. Must end with .csv",
5856
- "name": "outputfile",
5857
- "hasDynamicHelp": false,
5858
- "multiple": false,
5859
- "type": "option"
5860
- },
5861
- "debug": {
5862
- "char": "d",
5863
- "description": "Activate debug mode (more logs)",
5864
- "name": "debug",
5865
- "allowNo": false,
5866
- "type": "boolean"
5867
- },
5868
- "websocket": {
5869
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5870
- "name": "websocket",
5871
- "hasDynamicHelp": false,
5872
- "multiple": false,
5873
- "type": "option"
5874
- },
5875
- "skipauth": {
5876
- "description": "Skip authentication check when a default username is required",
5877
- "name": "skipauth",
5878
- "allowNo": false,
5879
- "type": "boolean"
5880
- },
5881
- "target-org": {
5882
- "aliases": [
5883
- "targetusername",
5884
- "u"
5885
- ],
5886
- "char": "o",
5887
- "deprecateAliases": true,
5888
- "name": "target-org",
5889
- "noCacheDefault": true,
5890
- "required": true,
5891
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
5892
- "hasDynamicHelp": true,
5893
- "multiple": false,
5894
- "type": "option"
5895
- }
5896
- },
5897
- "hasDynamicHelp": true,
5898
- "hiddenAliases": [],
5899
- "id": "hardis:org:diagnose:audittrail",
5900
- "pluginAlias": "sfdx-hardis",
5901
- "pluginName": "sfdx-hardis",
5902
- "pluginType": "core",
5903
- "strict": true,
5904
- "enableJsonFlag": true,
5905
- "title": "Diagnose content of Setup Audit Trail",
5906
- "requiresProject": false,
5907
- "isESM": true,
5908
- "relativePath": [
5909
- "lib",
5910
- "commands",
5911
- "hardis",
5912
- "org",
5913
- "diagnose",
5914
- "audittrail.js"
5915
- ],
5916
- "aliasPermutations": [],
5917
- "permutations": [
5918
- "hardis:org:diagnose:audittrail",
5919
- "org:hardis:diagnose:audittrail",
5920
- "org:diagnose:hardis:audittrail",
5921
- "org:diagnose:audittrail:hardis",
5922
- "hardis:diagnose:org:audittrail",
5923
- "diagnose:hardis:org:audittrail",
5924
- "diagnose:org:hardis:audittrail",
5925
- "diagnose:org:audittrail:hardis",
5926
- "hardis:diagnose:audittrail:org",
5927
- "diagnose:hardis:audittrail:org",
5928
- "diagnose:audittrail:hardis:org",
5929
- "diagnose:audittrail:org:hardis",
5930
- "hardis:org:audittrail:diagnose",
5931
- "org:hardis:audittrail:diagnose",
5932
- "org:audittrail:hardis:diagnose",
5933
- "org:audittrail:diagnose:hardis",
5934
- "hardis:audittrail:org:diagnose",
5935
- "audittrail:hardis:org:diagnose",
5936
- "audittrail:org:hardis:diagnose",
5937
- "audittrail:org:diagnose:hardis",
5938
- "hardis:audittrail:diagnose:org",
5939
- "audittrail:hardis:diagnose:org",
5940
- "audittrail:diagnose:hardis:org",
5941
- "audittrail:diagnose:org:hardis"
5942
- ]
5943
- },
5944
- "hardis:org:diagnose:instanceupgrade": {
5945
- "aliases": [],
5946
- "args": {},
5947
- "description": "\n## Command Behavior\n\n**Retrieves and displays the scheduled upgrade date for a Salesforce org's instance.**\n\nThis command provides crucial information about when your Salesforce instance will be upgraded to the next major release (Spring, Summer, or Winter). This is vital for release planning, testing, and ensuring compatibility with upcoming Salesforce features.\n\nKey functionalities:\n\n- **Instance Identification:** Determines the Salesforce instance name of your target org.\n- **Upgrade Date Retrieval:** Fetches the planned start time of the next major core service upgrade for that instance from the Salesforce Status API.\n- **Days Until Upgrade:** Calculates and displays the number of days remaining until the next major upgrade.\n- **Severity-Based Logging:** Adjusts the log severity (info, warning) based on the proximity of the upgrade date, providing a visual cue for urgency.\n- **Notifications:** Sends notifications to configured channels (e.g., Slack, MS Teams, Grafana) with the upgrade information, making it suitable for automated monitoring.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the `Organization` object in Salesforce to get the `InstanceName` of the target org.\n- **Salesforce Status API Integration:** It makes an HTTP GET request to the Salesforce Status API (`https://api.status.salesforce.com/v1/instances/{instanceName}/status`) to retrieve detailed information about the instance, including scheduled maintenances.\n- **Data Parsing:** It parses the JSON response from the Status API to extract the relevant major release upgrade information.\n- **Date Calculation:** Uses the `moment` library to calculate the difference in days between the current date and the planned upgrade date.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including the instance name, upgrade date, and days remaining, along with relevant metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the upgrade status and proximity.\n</details>\n",
5948
- "examples": [
5949
- "$ sf hardis:org:diagnose:instanceupgrade"
5950
- ],
5951
- "flags": {
5952
- "json": {
5953
- "description": "Format output as json.",
5954
- "helpGroup": "GLOBAL",
5955
- "name": "json",
5956
- "allowNo": false,
5957
- "type": "boolean"
5958
- },
5959
- "flags-dir": {
5960
- "helpGroup": "GLOBAL",
5961
- "name": "flags-dir",
5962
- "summary": "Import flag values from a directory.",
5963
- "hasDynamicHelp": false,
5964
- "multiple": false,
5965
- "type": "option"
5966
- },
5967
- "debug": {
5968
- "char": "d",
5969
- "description": "Activate debug mode (more logs)",
5970
- "name": "debug",
5971
- "allowNo": false,
5972
- "type": "boolean"
5973
- },
5974
- "websocket": {
5975
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5976
- "name": "websocket",
5977
- "hasDynamicHelp": false,
5978
- "multiple": false,
5979
- "type": "option"
5980
- },
5981
- "skipauth": {
5982
- "description": "Skip authentication check when a default username is required",
5983
- "name": "skipauth",
5984
- "allowNo": false,
5985
- "type": "boolean"
5986
- },
5987
- "target-org": {
5988
- "aliases": [
5989
- "targetusername",
5990
- "u"
5991
- ],
5992
- "char": "o",
5993
- "deprecateAliases": true,
5994
- "name": "target-org",
5995
- "noCacheDefault": true,
5996
- "required": true,
5997
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
5998
- "hasDynamicHelp": true,
5999
- "multiple": false,
6000
- "type": "option"
6001
- }
6002
- },
6003
- "hasDynamicHelp": true,
6004
- "hiddenAliases": [],
6005
- "id": "hardis:org:diagnose:instanceupgrade",
6006
- "pluginAlias": "sfdx-hardis",
6007
- "pluginName": "sfdx-hardis",
6008
- "pluginType": "core",
6009
- "strict": true,
6010
- "enableJsonFlag": true,
6011
- "title": "Get Instance Upgrade date",
6012
- "requiresProject": false,
6013
- "isESM": true,
6014
- "relativePath": [
6015
- "lib",
6016
- "commands",
6017
- "hardis",
6018
- "org",
6019
- "diagnose",
6020
- "instanceupgrade.js"
5750
+ "diagnose",
5751
+ "instanceupgrade.js"
6021
5752
  ],
6022
5753
  "aliasPermutations": [],
6023
5754
  "permutations": [
@@ -7206,13 +6937,12 @@
7206
6937
  "unusedusers:diagnose:org:hardis"
7207
6938
  ]
7208
6939
  },
7209
- "hardis:org:fix:listviewmine": {
6940
+ "hardis:org:files:export": {
7210
6941
  "aliases": [],
7211
6942
  "args": {},
7212
- "description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[![Invalid scope:Mine, not allowed ? Deploy your ListViews anyway !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-scope-mine.jpg)](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
6943
+ "description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
7213
6944
  "examples": [
7214
- "$ sf hardis:org:fix:listviewmine",
7215
- "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
6945
+ "$ sf hardis:org:files:export"
7216
6946
  ],
7217
6947
  "flags": {
7218
6948
  "json": {
@@ -7230,20 +6960,290 @@
7230
6960
  "multiple": false,
7231
6961
  "type": "option"
7232
6962
  },
7233
- "listviews": {
7234
- "char": "l",
7235
- "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
7236
- "name": "listviews",
6963
+ "path": {
6964
+ "char": "p",
6965
+ "description": "Path to the file export project",
6966
+ "name": "path",
7237
6967
  "hasDynamicHelp": false,
7238
6968
  "multiple": false,
7239
6969
  "type": "option"
7240
6970
  },
7241
- "debug": {
7242
- "char": "d",
7243
- "description": "Activate debug mode (more logs)",
7244
- "name": "debug",
7245
- "allowNo": false,
7246
- "type": "boolean"
6971
+ "chunksize": {
6972
+ "char": "c",
6973
+ "description": "Number of records to add in a chunk before it is processed",
6974
+ "name": "chunksize",
6975
+ "default": 1000,
6976
+ "hasDynamicHelp": false,
6977
+ "multiple": false,
6978
+ "type": "option"
6979
+ },
6980
+ "polltimeout": {
6981
+ "char": "t",
6982
+ "description": "Timeout in MS for Bulk API calls",
6983
+ "name": "polltimeout",
6984
+ "default": 300000,
6985
+ "hasDynamicHelp": false,
6986
+ "multiple": false,
6987
+ "type": "option"
6988
+ },
6989
+ "startchunknumber": {
6990
+ "char": "s",
6991
+ "description": "Chunk number to start from",
6992
+ "name": "startchunknumber",
6993
+ "default": 0,
6994
+ "hasDynamicHelp": false,
6995
+ "multiple": false,
6996
+ "type": "option"
6997
+ },
6998
+ "resume": {
6999
+ "char": "r",
7000
+ "description": "Resume previous export by checking existing files (default in CI)",
7001
+ "name": "resume",
7002
+ "allowNo": false,
7003
+ "type": "boolean"
7004
+ },
7005
+ "debug": {
7006
+ "char": "d",
7007
+ "description": "Activate debug mode (more logs)",
7008
+ "name": "debug",
7009
+ "allowNo": false,
7010
+ "type": "boolean"
7011
+ },
7012
+ "websocket": {
7013
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
7014
+ "name": "websocket",
7015
+ "hasDynamicHelp": false,
7016
+ "multiple": false,
7017
+ "type": "option"
7018
+ },
7019
+ "skipauth": {
7020
+ "description": "Skip authentication check when a default username is required",
7021
+ "name": "skipauth",
7022
+ "allowNo": false,
7023
+ "type": "boolean"
7024
+ },
7025
+ "target-org": {
7026
+ "aliases": [
7027
+ "targetusername",
7028
+ "u"
7029
+ ],
7030
+ "char": "o",
7031
+ "deprecateAliases": true,
7032
+ "name": "target-org",
7033
+ "noCacheDefault": true,
7034
+ "required": true,
7035
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
7036
+ "hasDynamicHelp": true,
7037
+ "multiple": false,
7038
+ "type": "option"
7039
+ }
7040
+ },
7041
+ "hasDynamicHelp": true,
7042
+ "hiddenAliases": [],
7043
+ "id": "hardis:org:files:export",
7044
+ "pluginAlias": "sfdx-hardis",
7045
+ "pluginName": "sfdx-hardis",
7046
+ "pluginType": "core",
7047
+ "strict": true,
7048
+ "enableJsonFlag": true,
7049
+ "title": "Export files",
7050
+ "requiresProject": false,
7051
+ "isESM": true,
7052
+ "relativePath": [
7053
+ "lib",
7054
+ "commands",
7055
+ "hardis",
7056
+ "org",
7057
+ "files",
7058
+ "export.js"
7059
+ ],
7060
+ "aliasPermutations": [],
7061
+ "permutations": [
7062
+ "hardis:org:files:export",
7063
+ "org:hardis:files:export",
7064
+ "org:files:hardis:export",
7065
+ "org:files:export:hardis",
7066
+ "hardis:files:org:export",
7067
+ "files:hardis:org:export",
7068
+ "files:org:hardis:export",
7069
+ "files:org:export:hardis",
7070
+ "hardis:files:export:org",
7071
+ "files:hardis:export:org",
7072
+ "files:export:hardis:org",
7073
+ "files:export:org:hardis",
7074
+ "hardis:org:export:files",
7075
+ "org:hardis:export:files",
7076
+ "org:export:hardis:files",
7077
+ "org:export:files:hardis",
7078
+ "hardis:export:org:files",
7079
+ "export:hardis:org:files",
7080
+ "export:org:hardis:files",
7081
+ "export:org:files:hardis",
7082
+ "hardis:export:files:org",
7083
+ "export:hardis:files:org",
7084
+ "export:files:hardis:org",
7085
+ "export:files:org:hardis"
7086
+ ]
7087
+ },
7088
+ "hardis:org:files:import": {
7089
+ "aliases": [],
7090
+ "args": {},
7091
+ "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[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
7092
+ "examples": [
7093
+ "$ sf hardis:org:files:import"
7094
+ ],
7095
+ "flags": {
7096
+ "json": {
7097
+ "description": "Format output as json.",
7098
+ "helpGroup": "GLOBAL",
7099
+ "name": "json",
7100
+ "allowNo": false,
7101
+ "type": "boolean"
7102
+ },
7103
+ "flags-dir": {
7104
+ "helpGroup": "GLOBAL",
7105
+ "name": "flags-dir",
7106
+ "summary": "Import flag values from a directory.",
7107
+ "hasDynamicHelp": false,
7108
+ "multiple": false,
7109
+ "type": "option"
7110
+ },
7111
+ "path": {
7112
+ "char": "p",
7113
+ "description": "Path to the file export project",
7114
+ "name": "path",
7115
+ "hasDynamicHelp": false,
7116
+ "multiple": false,
7117
+ "type": "option"
7118
+ },
7119
+ "overwrite": {
7120
+ "char": "f",
7121
+ "description": "Override existing files (doubles the number of API calls)",
7122
+ "name": "overwrite",
7123
+ "allowNo": false,
7124
+ "type": "boolean"
7125
+ },
7126
+ "debug": {
7127
+ "char": "d",
7128
+ "description": "Activate debug mode (more logs)",
7129
+ "name": "debug",
7130
+ "allowNo": false,
7131
+ "type": "boolean"
7132
+ },
7133
+ "websocket": {
7134
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
7135
+ "name": "websocket",
7136
+ "hasDynamicHelp": false,
7137
+ "multiple": false,
7138
+ "type": "option"
7139
+ },
7140
+ "skipauth": {
7141
+ "description": "Skip authentication check when a default username is required",
7142
+ "name": "skipauth",
7143
+ "allowNo": false,
7144
+ "type": "boolean"
7145
+ },
7146
+ "target-org": {
7147
+ "aliases": [
7148
+ "targetusername",
7149
+ "u"
7150
+ ],
7151
+ "char": "o",
7152
+ "deprecateAliases": true,
7153
+ "name": "target-org",
7154
+ "noCacheDefault": true,
7155
+ "required": true,
7156
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
7157
+ "hasDynamicHelp": true,
7158
+ "multiple": false,
7159
+ "type": "option"
7160
+ }
7161
+ },
7162
+ "hasDynamicHelp": true,
7163
+ "hiddenAliases": [],
7164
+ "id": "hardis:org:files:import",
7165
+ "pluginAlias": "sfdx-hardis",
7166
+ "pluginName": "sfdx-hardis",
7167
+ "pluginType": "core",
7168
+ "strict": true,
7169
+ "enableJsonFlag": true,
7170
+ "title": "Import files",
7171
+ "requiresProject": false,
7172
+ "isESM": true,
7173
+ "relativePath": [
7174
+ "lib",
7175
+ "commands",
7176
+ "hardis",
7177
+ "org",
7178
+ "files",
7179
+ "import.js"
7180
+ ],
7181
+ "aliasPermutations": [],
7182
+ "permutations": [
7183
+ "hardis:org:files:import",
7184
+ "org:hardis:files:import",
7185
+ "org:files:hardis:import",
7186
+ "org:files:import:hardis",
7187
+ "hardis:files:org:import",
7188
+ "files:hardis:org:import",
7189
+ "files:org:hardis:import",
7190
+ "files:org:import:hardis",
7191
+ "hardis:files:import:org",
7192
+ "files:hardis:import:org",
7193
+ "files:import:hardis:org",
7194
+ "files:import:org:hardis",
7195
+ "hardis:org:import:files",
7196
+ "org:hardis:import:files",
7197
+ "org:import:hardis:files",
7198
+ "org:import:files:hardis",
7199
+ "hardis:import:org:files",
7200
+ "import:hardis:org:files",
7201
+ "import:org:hardis:files",
7202
+ "import:org:files:hardis",
7203
+ "hardis:import:files:org",
7204
+ "import:hardis:files:org",
7205
+ "import:files:hardis:org",
7206
+ "import:files:org:hardis"
7207
+ ]
7208
+ },
7209
+ "hardis:org:fix:listviewmine": {
7210
+ "aliases": [],
7211
+ "args": {},
7212
+ "description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[![Invalid scope:Mine, not allowed ? Deploy your ListViews anyway !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-scope-mine.jpg)](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
7213
+ "examples": [
7214
+ "$ sf hardis:org:fix:listviewmine",
7215
+ "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
7216
+ ],
7217
+ "flags": {
7218
+ "json": {
7219
+ "description": "Format output as json.",
7220
+ "helpGroup": "GLOBAL",
7221
+ "name": "json",
7222
+ "allowNo": false,
7223
+ "type": "boolean"
7224
+ },
7225
+ "flags-dir": {
7226
+ "helpGroup": "GLOBAL",
7227
+ "name": "flags-dir",
7228
+ "summary": "Import flag values from a directory.",
7229
+ "hasDynamicHelp": false,
7230
+ "multiple": false,
7231
+ "type": "option"
7232
+ },
7233
+ "listviews": {
7234
+ "char": "l",
7235
+ "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
7236
+ "name": "listviews",
7237
+ "hasDynamicHelp": false,
7238
+ "multiple": false,
7239
+ "type": "option"
7240
+ },
7241
+ "debug": {
7242
+ "char": "d",
7243
+ "description": "Activate debug mode (more logs)",
7244
+ "name": "debug",
7245
+ "allowNo": false,
7246
+ "type": "boolean"
7247
7247
  },
7248
7248
  "websocket": {
7249
7249
  "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
@@ -7905,262 +7905,23 @@
7905
7905
  "hardis:monitor:org:limits",
7906
7906
  "monitor:hardis:org:limits",
7907
7907
  "monitor:org:hardis:limits",
7908
- "monitor:org:limits:hardis",
7909
- "hardis:monitor:limits:org",
7910
- "monitor:hardis:limits:org",
7911
- "monitor:limits:hardis:org",
7912
- "monitor:limits:org:hardis",
7913
- "hardis:org:limits:monitor",
7914
- "org:hardis:limits:monitor",
7915
- "org:limits:hardis:monitor",
7916
- "org:limits:monitor:hardis",
7917
- "hardis:limits:org:monitor",
7918
- "limits:hardis:org:monitor",
7919
- "limits:org:hardis:monitor",
7920
- "limits:org:monitor:hardis",
7921
- "hardis:limits:monitor:org",
7922
- "limits:hardis:monitor:org",
7923
- "limits:monitor:hardis:org",
7924
- "limits:monitor:org:hardis"
7925
- ]
7926
- },
7927
- "hardis:org:refresh:after-refresh": {
7928
- "aliases": [],
7929
- "args": {},
7930
- "description": "\n## Command Behavior\n\n**Restores all previously backed-up Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata to a Salesforce org after a sandbox refresh.**\n\nThis command is the second step in the sandbox refresh process. It scans the backup folder created before the refresh, allows interactive or flag-driven selection of items to restore, and automates cleanup and redeployment to the refreshed org while preserving credentials and configuration.\n\nKey functionalities:\n\n- **Choose a backup to restore:** Lets you pick the saved sandbox project that contains the artifacts to restore.\n- **Select which items to restore:** Finds Connected App XMLs, certificates, custom settings and other artifacts and lets you pick what to restore (or restore all).\n- **Safety checks and validation:** Confirms files exist and prompts before making changes to the target org.\n- **Prepare org for restore:** Optionally cleans up existing Connected Apps so saved apps can be re-deployed without conflict.\n- **Redeploy saved artifacts:** Restores Connected Apps (with saved secrets), certificates, SAML SSO configs, custom settings and other metadata.\n- **Handle SAML configs:** Cleans and updates SAML XML files and helps you choose certificates to wire into restored configs.\n- **Restore records:** Optionally runs data import from selected SFDMU workspaces to restore record data.\n- **Reporting & persistence:** Sends restore reports and can update project config to record what was restored.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run after a sandbox refresh to re-apply saved metadata, credentials and data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Backup Folder Handling:** Reads the immediate subfolders of `scripts/sandbox-refresh/` and validates the chosen project contains the expected `manifest/` and `force-app` layout.\n- **Metadata & Deployment APIs:** Uses `sf project deploy start --manifest` for package-based deploys, `sf project deploy start --metadata-dir` for MDAPI artifacts (certificates), and utility functions for Connected App deployment that preserve consumer secrets.\n- **SAML Handling:** Queries active certificates via tooling API, updates SAML XML files, and deploys using `sf project deploy start -m SamlSsoConfig`.\n- **Records Handling:** Uses interactive selection of SFDMU workspaces and runs data import utilities to restore records.\n- **Error Handling & Summary:** Aggregates results, logs success/warnings/errors, and returns a structured result indicating which items were restored and any failures.\n\n</details>\n",
7931
- "examples": [
7932
- "$ sf hardis:org:refresh:after-refresh",
7933
- "$ sf hardis:org:refresh:after-refresh --name \"MyConnectedApp\" // Process specific app, no selection prompt",
7934
- "$ sf hardis:org:refresh:after-refresh --name \"App1,App2,App3\" // Process multiple apps, no selection prompt",
7935
- "$ sf hardis:org:refresh:after-refresh --all // Process all apps, no selection prompt",
7936
- "$ sf hardis:org:refresh:after-refresh --target-org myDevOrg"
7937
- ],
7938
- "flags": {
7939
- "json": {
7940
- "description": "Format output as json.",
7941
- "helpGroup": "GLOBAL",
7942
- "name": "json",
7943
- "allowNo": false,
7944
- "type": "boolean"
7945
- },
7946
- "flags-dir": {
7947
- "helpGroup": "GLOBAL",
7948
- "name": "flags-dir",
7949
- "summary": "Import flag values from a directory.",
7950
- "hasDynamicHelp": false,
7951
- "multiple": false,
7952
- "type": "option"
7953
- },
7954
- "target-org": {
7955
- "char": "o",
7956
- "name": "target-org",
7957
- "noCacheDefault": true,
7958
- "required": true,
7959
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
7960
- "hasDynamicHelp": true,
7961
- "multiple": false,
7962
- "type": "option"
7963
- },
7964
- "name": {
7965
- "char": "n",
7966
- "description": "Connected App name(s) to process (bypasses selection prompt). For multiple apps, separate with commas (e.g., \"App1,App2\")",
7967
- "name": "name",
7968
- "summary": "Filter according to Name criteria",
7969
- "hasDynamicHelp": false,
7970
- "multiple": false,
7971
- "type": "option"
7972
- },
7973
- "all": {
7974
- "char": "a",
7975
- "description": "If set, all Connected Apps from the local repository will be processed. Takes precedence over --name if both are specified.",
7976
- "name": "all",
7977
- "summary": "Process all Connected Apps without selection prompt",
7978
- "allowNo": false,
7979
- "type": "boolean"
7980
- },
7981
- "websocket": {
7982
- "description": "WebSocket host:port for VS Code SFDX Hardis UI integration",
7983
- "name": "websocket",
7984
- "summary": "Websocket host:port for VsCode SFDX Hardis UI integration",
7985
- "hasDynamicHelp": false,
7986
- "multiple": false,
7987
- "type": "option"
7988
- },
7989
- "skipauth": {
7990
- "description": "Skip authentication check when a default username is required",
7991
- "name": "skipauth",
7992
- "summary": "Skip authentication check when a default username is required",
7993
- "allowNo": false,
7994
- "type": "boolean"
7995
- }
7996
- },
7997
- "hasDynamicHelp": true,
7998
- "hiddenAliases": [],
7999
- "id": "hardis:org:refresh:after-refresh",
8000
- "pluginAlias": "sfdx-hardis",
8001
- "pluginName": "sfdx-hardis",
8002
- "pluginType": "core",
8003
- "strict": true,
8004
- "enableJsonFlag": true,
8005
- "title": "Restore Connected Apps after org refresh",
8006
- "requiresProject": true,
8007
- "isESM": true,
8008
- "relativePath": [
8009
- "lib",
8010
- "commands",
8011
- "hardis",
8012
- "org",
8013
- "refresh",
8014
- "after-refresh.js"
8015
- ],
8016
- "aliasPermutations": [],
8017
- "permutations": [
8018
- "hardis:org:refresh:after-refresh",
8019
- "org:hardis:refresh:after-refresh",
8020
- "org:refresh:hardis:after-refresh",
8021
- "org:refresh:after-refresh:hardis",
8022
- "hardis:refresh:org:after-refresh",
8023
- "refresh:hardis:org:after-refresh",
8024
- "refresh:org:hardis:after-refresh",
8025
- "refresh:org:after-refresh:hardis",
8026
- "hardis:refresh:after-refresh:org",
8027
- "refresh:hardis:after-refresh:org",
8028
- "refresh:after-refresh:hardis:org",
8029
- "refresh:after-refresh:org:hardis",
8030
- "hardis:org:after-refresh:refresh",
8031
- "org:hardis:after-refresh:refresh",
8032
- "org:after-refresh:hardis:refresh",
8033
- "org:after-refresh:refresh:hardis",
8034
- "hardis:after-refresh:org:refresh",
8035
- "after-refresh:hardis:org:refresh",
8036
- "after-refresh:org:hardis:refresh",
8037
- "after-refresh:org:refresh:hardis",
8038
- "hardis:after-refresh:refresh:org",
8039
- "after-refresh:hardis:refresh:org",
8040
- "after-refresh:refresh:hardis:org",
8041
- "after-refresh:refresh:org:hardis"
8042
- ]
8043
- },
8044
- "hardis:org:refresh:before-refresh": {
8045
- "aliases": [],
8046
- "args": {},
8047
- "description": "\n## Command Behavior\n\n**Backs up all Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata from a Salesforce org before a sandbox refresh, enabling full restoration after the refresh.**\n\nThis command prepares a complete backup prior to a sandbox refresh. It creates a dedicated project under `scripts/sandbox-refresh/<sandbox-folder>`, retrieves metadata and data, attempts to capture Connected App consumer secrets, and can optionally delete the apps so they can be reuploaded after the refresh.\n\nKey functionalities:\n\n- **Create a save project:** Generates a dedicated project folder to store all artifacts for the sandbox backup.\n- **Find and select Connected Apps:** Lists Connected Apps in the org and lets you pick specific apps, use a name filter, or process all apps.\n- **Save metadata for restore:** Builds a manifest and retrieves the metadata types you choose so they can be restored after the refresh.\n- **Capture Consumer Secrets:** Attempts to capture Connected App consumer secrets automatically (opens a browser session when possible) and falls back to a short manual prompt when needed.\n- **Collect certificates:** Saves certificate files and their definitions so they can be redeployed later.\n- **Export custom settings & records:** Lets you pick custom settings to export as JSON and optionally export records using configured data workspaces.\n- **Persist choices & report:** Stores your backup choices in project config and sends report files for traceability.\n- **Optional cleanup:** Can delete backed-up Connected Apps from the org so they can be re-uploaded cleanly after the refresh.\n- **Interactive safety checks:** Prompts you to confirm package contents and other potentially destructive actions; sensible defaults are chosen where appropriate.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run before a sandbox refresh so that all credentials, certificates, metadata and data can be restored afterwards.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Salesforce CLI Integration:** Uses `sf org list metadata`, `sf project retrieve start`, `sf project generate`, `sf project deploy start`, and `sf data tree export`/`import` where applicable.\n- **Metadata Handling:** Writes and reads package XML files under the generated project (`manifest/`), copies MDAPI certificate artifacts into `force-app/main/default/certs`, and produces `package-metadata-to-restore.xml` for post-refresh deployment.\n- **Consumer Secret Handling:** Uses `puppeteer-core` with an executable path from `getChromeExecutablePath()` (env var `PUPPETEER_EXECUTABLE_PATH` may be required). Falls back to manual prompt when browser automation cannot be used.\n- **Data & Records:** Exports custom settings to JSON and supports exporting records through SFDMU workspaces chosen interactively.\n- **Config & Reporting:** Updates project/user config under `config/.sfdx-hardis.yml#refreshSandboxConfig` and reports artifacts to the WebSocket client.\n- **Error Handling:** Provides clear error messages and a summary response object indicating success/failure and which secrets were captured.\n\n</details>\n",
8048
- "examples": [
8049
- "$ sf hardis:org:refresh:before-refresh",
8050
- "$ sf hardis:org:refresh:before-refresh --name \"MyConnectedApp\"",
8051
- "$ sf hardis:org:refresh:before-refresh --name \"App1,App2,App3\"",
8052
- "$ sf hardis:org:refresh:before-refresh --all",
8053
- "$ sf hardis:org:refresh:before-refresh --delete"
8054
- ],
8055
- "flags": {
8056
- "json": {
8057
- "description": "Format output as json.",
8058
- "helpGroup": "GLOBAL",
8059
- "name": "json",
8060
- "allowNo": false,
8061
- "type": "boolean"
8062
- },
8063
- "flags-dir": {
8064
- "helpGroup": "GLOBAL",
8065
- "name": "flags-dir",
8066
- "summary": "Import flag values from a directory.",
8067
- "hasDynamicHelp": false,
8068
- "multiple": false,
8069
- "type": "option"
8070
- },
8071
- "target-org": {
8072
- "char": "o",
8073
- "name": "target-org",
8074
- "noCacheDefault": true,
8075
- "required": true,
8076
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
8077
- "hasDynamicHelp": true,
8078
- "multiple": false,
8079
- "type": "option"
8080
- },
8081
- "delete": {
8082
- "char": "d",
8083
- "description": "By default, Connected Apps are not deleted from the org after saving. Set this flag to force their deletion so they will be able to be reuploaded again after refreshing the org.",
8084
- "name": "delete",
8085
- "summary": "Delete Connected Apps from org after saving",
8086
- "allowNo": false,
8087
- "type": "boolean"
8088
- },
8089
- "name": {
8090
- "char": "n",
8091
- "description": "Connected App name(s) to process. For multiple apps, separate with commas (e.g., \"App1,App2\")",
8092
- "name": "name",
8093
- "summary": "Filter according to Name criteria",
8094
- "hasDynamicHelp": false,
8095
- "multiple": false,
8096
- "type": "option"
8097
- },
8098
- "all": {
8099
- "char": "a",
8100
- "description": "If set, all Connected Apps from the org will be processed. Takes precedence over --name if both are specified.",
8101
- "name": "all",
8102
- "summary": "Process all Connected Apps without selection prompt",
8103
- "allowNo": false,
8104
- "type": "boolean"
8105
- },
8106
- "websocket": {
8107
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
8108
- "name": "websocket",
8109
- "hasDynamicHelp": false,
8110
- "multiple": false,
8111
- "type": "option"
8112
- },
8113
- "skipauth": {
8114
- "description": "Skip authentication check when a default username is required",
8115
- "name": "skipauth",
8116
- "allowNo": false,
8117
- "type": "boolean"
8118
- }
8119
- },
8120
- "hasDynamicHelp": true,
8121
- "hiddenAliases": [],
8122
- "id": "hardis:org:refresh:before-refresh",
8123
- "pluginAlias": "sfdx-hardis",
8124
- "pluginName": "sfdx-hardis",
8125
- "pluginType": "core",
8126
- "strict": true,
8127
- "enableJsonFlag": true,
8128
- "requiresProject": true,
8129
- "isESM": true,
8130
- "relativePath": [
8131
- "lib",
8132
- "commands",
8133
- "hardis",
8134
- "org",
8135
- "refresh",
8136
- "before-refresh.js"
8137
- ],
8138
- "aliasPermutations": [],
8139
- "permutations": [
8140
- "hardis:org:refresh:before-refresh",
8141
- "org:hardis:refresh:before-refresh",
8142
- "org:refresh:hardis:before-refresh",
8143
- "org:refresh:before-refresh:hardis",
8144
- "hardis:refresh:org:before-refresh",
8145
- "refresh:hardis:org:before-refresh",
8146
- "refresh:org:hardis:before-refresh",
8147
- "refresh:org:before-refresh:hardis",
8148
- "hardis:refresh:before-refresh:org",
8149
- "refresh:hardis:before-refresh:org",
8150
- "refresh:before-refresh:hardis:org",
8151
- "refresh:before-refresh:org:hardis",
8152
- "hardis:org:before-refresh:refresh",
8153
- "org:hardis:before-refresh:refresh",
8154
- "org:before-refresh:hardis:refresh",
8155
- "org:before-refresh:refresh:hardis",
8156
- "hardis:before-refresh:org:refresh",
8157
- "before-refresh:hardis:org:refresh",
8158
- "before-refresh:org:hardis:refresh",
8159
- "before-refresh:org:refresh:hardis",
8160
- "hardis:before-refresh:refresh:org",
8161
- "before-refresh:hardis:refresh:org",
8162
- "before-refresh:refresh:hardis:org",
8163
- "before-refresh:refresh:org:hardis"
7908
+ "monitor:org:limits:hardis",
7909
+ "hardis:monitor:limits:org",
7910
+ "monitor:hardis:limits:org",
7911
+ "monitor:limits:hardis:org",
7912
+ "monitor:limits:org:hardis",
7913
+ "hardis:org:limits:monitor",
7914
+ "org:hardis:limits:monitor",
7915
+ "org:limits:hardis:monitor",
7916
+ "org:limits:monitor:hardis",
7917
+ "hardis:limits:org:monitor",
7918
+ "limits:hardis:org:monitor",
7919
+ "limits:org:hardis:monitor",
7920
+ "limits:org:monitor:hardis",
7921
+ "hardis:limits:monitor:org",
7922
+ "limits:hardis:monitor:org",
7923
+ "limits:monitor:hardis:org",
7924
+ "limits:monitor:org:hardis"
8164
7925
  ]
8165
7926
  },
8166
7927
  "hardis:org:purge:apexlog": {
@@ -8545,6 +8306,245 @@
8545
8306
  "profile:purge:org:hardis"
8546
8307
  ]
8547
8308
  },
8309
+ "hardis:org:refresh:after-refresh": {
8310
+ "aliases": [],
8311
+ "args": {},
8312
+ "description": "\n## Command Behavior\n\n**Restores all previously backed-up Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata to a Salesforce org after a sandbox refresh.**\n\nThis command is the second step in the sandbox refresh process. It scans the backup folder created before the refresh, allows interactive or flag-driven selection of items to restore, and automates cleanup and redeployment to the refreshed org while preserving credentials and configuration.\n\nKey functionalities:\n\n- **Choose a backup to restore:** Lets you pick the saved sandbox project that contains the artifacts to restore.\n- **Select which items to restore:** Finds Connected App XMLs, certificates, custom settings and other artifacts and lets you pick what to restore (or restore all).\n- **Safety checks and validation:** Confirms files exist and prompts before making changes to the target org.\n- **Prepare org for restore:** Optionally cleans up existing Connected Apps so saved apps can be re-deployed without conflict.\n- **Redeploy saved artifacts:** Restores Connected Apps (with saved secrets), certificates, SAML SSO configs, custom settings and other metadata.\n- **Handle SAML configs:** Cleans and updates SAML XML files and helps you choose certificates to wire into restored configs.\n- **Restore records:** Optionally runs data import from selected SFDMU workspaces to restore record data.\n- **Reporting & persistence:** Sends restore reports and can update project config to record what was restored.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run after a sandbox refresh to re-apply saved metadata, credentials and data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Backup Folder Handling:** Reads the immediate subfolders of `scripts/sandbox-refresh/` and validates the chosen project contains the expected `manifest/` and `force-app` layout.\n- **Metadata & Deployment APIs:** Uses `sf project deploy start --manifest` for package-based deploys, `sf project deploy start --metadata-dir` for MDAPI artifacts (certificates), and utility functions for Connected App deployment that preserve consumer secrets.\n- **SAML Handling:** Queries active certificates via tooling API, updates SAML XML files, and deploys using `sf project deploy start -m SamlSsoConfig`.\n- **Records Handling:** Uses interactive selection of SFDMU workspaces and runs data import utilities to restore records.\n- **Error Handling & Summary:** Aggregates results, logs success/warnings/errors, and returns a structured result indicating which items were restored and any failures.\n\n</details>\n",
8313
+ "examples": [
8314
+ "$ sf hardis:org:refresh:after-refresh",
8315
+ "$ sf hardis:org:refresh:after-refresh --name \"MyConnectedApp\" // Process specific app, no selection prompt",
8316
+ "$ sf hardis:org:refresh:after-refresh --name \"App1,App2,App3\" // Process multiple apps, no selection prompt",
8317
+ "$ sf hardis:org:refresh:after-refresh --all // Process all apps, no selection prompt",
8318
+ "$ sf hardis:org:refresh:after-refresh --target-org myDevOrg"
8319
+ ],
8320
+ "flags": {
8321
+ "json": {
8322
+ "description": "Format output as json.",
8323
+ "helpGroup": "GLOBAL",
8324
+ "name": "json",
8325
+ "allowNo": false,
8326
+ "type": "boolean"
8327
+ },
8328
+ "flags-dir": {
8329
+ "helpGroup": "GLOBAL",
8330
+ "name": "flags-dir",
8331
+ "summary": "Import flag values from a directory.",
8332
+ "hasDynamicHelp": false,
8333
+ "multiple": false,
8334
+ "type": "option"
8335
+ },
8336
+ "target-org": {
8337
+ "char": "o",
8338
+ "name": "target-org",
8339
+ "noCacheDefault": true,
8340
+ "required": true,
8341
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
8342
+ "hasDynamicHelp": true,
8343
+ "multiple": false,
8344
+ "type": "option"
8345
+ },
8346
+ "name": {
8347
+ "char": "n",
8348
+ "description": "Connected App name(s) to process (bypasses selection prompt). For multiple apps, separate with commas (e.g., \"App1,App2\")",
8349
+ "name": "name",
8350
+ "summary": "Filter according to Name criteria",
8351
+ "hasDynamicHelp": false,
8352
+ "multiple": false,
8353
+ "type": "option"
8354
+ },
8355
+ "all": {
8356
+ "char": "a",
8357
+ "description": "If set, all Connected Apps from the local repository will be processed. Takes precedence over --name if both are specified.",
8358
+ "name": "all",
8359
+ "summary": "Process all Connected Apps without selection prompt",
8360
+ "allowNo": false,
8361
+ "type": "boolean"
8362
+ },
8363
+ "websocket": {
8364
+ "description": "WebSocket host:port for VS Code SFDX Hardis UI integration",
8365
+ "name": "websocket",
8366
+ "summary": "Websocket host:port for VsCode SFDX Hardis UI integration",
8367
+ "hasDynamicHelp": false,
8368
+ "multiple": false,
8369
+ "type": "option"
8370
+ },
8371
+ "skipauth": {
8372
+ "description": "Skip authentication check when a default username is required",
8373
+ "name": "skipauth",
8374
+ "summary": "Skip authentication check when a default username is required",
8375
+ "allowNo": false,
8376
+ "type": "boolean"
8377
+ }
8378
+ },
8379
+ "hasDynamicHelp": true,
8380
+ "hiddenAliases": [],
8381
+ "id": "hardis:org:refresh:after-refresh",
8382
+ "pluginAlias": "sfdx-hardis",
8383
+ "pluginName": "sfdx-hardis",
8384
+ "pluginType": "core",
8385
+ "strict": true,
8386
+ "enableJsonFlag": true,
8387
+ "title": "Restore Connected Apps after org refresh",
8388
+ "requiresProject": true,
8389
+ "isESM": true,
8390
+ "relativePath": [
8391
+ "lib",
8392
+ "commands",
8393
+ "hardis",
8394
+ "org",
8395
+ "refresh",
8396
+ "after-refresh.js"
8397
+ ],
8398
+ "aliasPermutations": [],
8399
+ "permutations": [
8400
+ "hardis:org:refresh:after-refresh",
8401
+ "org:hardis:refresh:after-refresh",
8402
+ "org:refresh:hardis:after-refresh",
8403
+ "org:refresh:after-refresh:hardis",
8404
+ "hardis:refresh:org:after-refresh",
8405
+ "refresh:hardis:org:after-refresh",
8406
+ "refresh:org:hardis:after-refresh",
8407
+ "refresh:org:after-refresh:hardis",
8408
+ "hardis:refresh:after-refresh:org",
8409
+ "refresh:hardis:after-refresh:org",
8410
+ "refresh:after-refresh:hardis:org",
8411
+ "refresh:after-refresh:org:hardis",
8412
+ "hardis:org:after-refresh:refresh",
8413
+ "org:hardis:after-refresh:refresh",
8414
+ "org:after-refresh:hardis:refresh",
8415
+ "org:after-refresh:refresh:hardis",
8416
+ "hardis:after-refresh:org:refresh",
8417
+ "after-refresh:hardis:org:refresh",
8418
+ "after-refresh:org:hardis:refresh",
8419
+ "after-refresh:org:refresh:hardis",
8420
+ "hardis:after-refresh:refresh:org",
8421
+ "after-refresh:hardis:refresh:org",
8422
+ "after-refresh:refresh:hardis:org",
8423
+ "after-refresh:refresh:org:hardis"
8424
+ ]
8425
+ },
8426
+ "hardis:org:refresh:before-refresh": {
8427
+ "aliases": [],
8428
+ "args": {},
8429
+ "description": "\n## Command Behavior\n\n**Backs up all Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata from a Salesforce org before a sandbox refresh, enabling full restoration after the refresh.**\n\nThis command prepares a complete backup prior to a sandbox refresh. It creates a dedicated project under `scripts/sandbox-refresh/<sandbox-folder>`, retrieves metadata and data, attempts to capture Connected App consumer secrets, and can optionally delete the apps so they can be reuploaded after the refresh.\n\nKey functionalities:\n\n- **Create a save project:** Generates a dedicated project folder to store all artifacts for the sandbox backup.\n- **Find and select Connected Apps:** Lists Connected Apps in the org and lets you pick specific apps, use a name filter, or process all apps.\n- **Save metadata for restore:** Builds a manifest and retrieves the metadata types you choose so they can be restored after the refresh.\n- **Capture Consumer Secrets:** Attempts to capture Connected App consumer secrets automatically (opens a browser session when possible) and falls back to a short manual prompt when needed.\n- **Collect certificates:** Saves certificate files and their definitions so they can be redeployed later.\n- **Export custom settings & records:** Lets you pick custom settings to export as JSON and optionally export records using configured data workspaces.\n- **Persist choices & report:** Stores your backup choices in project config and sends report files for traceability.\n- **Optional cleanup:** Can delete backed-up Connected Apps from the org so they can be re-uploaded cleanly after the refresh.\n- **Interactive safety checks:** Prompts you to confirm package contents and other potentially destructive actions; sensible defaults are chosen where appropriate.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run before a sandbox refresh so that all credentials, certificates, metadata and data can be restored afterwards.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Salesforce CLI Integration:** Uses `sf org list metadata`, `sf project retrieve start`, `sf project generate`, `sf project deploy start`, and `sf data tree export`/`import` where applicable.\n- **Metadata Handling:** Writes and reads package XML files under the generated project (`manifest/`), copies MDAPI certificate artifacts into `force-app/main/default/certs`, and produces `package-metadata-to-restore.xml` for post-refresh deployment.\n- **Consumer Secret Handling:** Uses `puppeteer-core` with an executable path from `getChromeExecutablePath()` (env var `PUPPETEER_EXECUTABLE_PATH` may be required). Falls back to manual prompt when browser automation cannot be used.\n- **Data & Records:** Exports custom settings to JSON and supports exporting records through SFDMU workspaces chosen interactively.\n- **Config & Reporting:** Updates project/user config under `config/.sfdx-hardis.yml#refreshSandboxConfig` and reports artifacts to the WebSocket client.\n- **Error Handling:** Provides clear error messages and a summary response object indicating success/failure and which secrets were captured.\n\n</details>\n",
8430
+ "examples": [
8431
+ "$ sf hardis:org:refresh:before-refresh",
8432
+ "$ sf hardis:org:refresh:before-refresh --name \"MyConnectedApp\"",
8433
+ "$ sf hardis:org:refresh:before-refresh --name \"App1,App2,App3\"",
8434
+ "$ sf hardis:org:refresh:before-refresh --all",
8435
+ "$ sf hardis:org:refresh:before-refresh --delete"
8436
+ ],
8437
+ "flags": {
8438
+ "json": {
8439
+ "description": "Format output as json.",
8440
+ "helpGroup": "GLOBAL",
8441
+ "name": "json",
8442
+ "allowNo": false,
8443
+ "type": "boolean"
8444
+ },
8445
+ "flags-dir": {
8446
+ "helpGroup": "GLOBAL",
8447
+ "name": "flags-dir",
8448
+ "summary": "Import flag values from a directory.",
8449
+ "hasDynamicHelp": false,
8450
+ "multiple": false,
8451
+ "type": "option"
8452
+ },
8453
+ "target-org": {
8454
+ "char": "o",
8455
+ "name": "target-org",
8456
+ "noCacheDefault": true,
8457
+ "required": true,
8458
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
8459
+ "hasDynamicHelp": true,
8460
+ "multiple": false,
8461
+ "type": "option"
8462
+ },
8463
+ "delete": {
8464
+ "char": "d",
8465
+ "description": "By default, Connected Apps are not deleted from the org after saving. Set this flag to force their deletion so they will be able to be reuploaded again after refreshing the org.",
8466
+ "name": "delete",
8467
+ "summary": "Delete Connected Apps from org after saving",
8468
+ "allowNo": false,
8469
+ "type": "boolean"
8470
+ },
8471
+ "name": {
8472
+ "char": "n",
8473
+ "description": "Connected App name(s) to process. For multiple apps, separate with commas (e.g., \"App1,App2\")",
8474
+ "name": "name",
8475
+ "summary": "Filter according to Name criteria",
8476
+ "hasDynamicHelp": false,
8477
+ "multiple": false,
8478
+ "type": "option"
8479
+ },
8480
+ "all": {
8481
+ "char": "a",
8482
+ "description": "If set, all Connected Apps from the org will be processed. Takes precedence over --name if both are specified.",
8483
+ "name": "all",
8484
+ "summary": "Process all Connected Apps without selection prompt",
8485
+ "allowNo": false,
8486
+ "type": "boolean"
8487
+ },
8488
+ "websocket": {
8489
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
8490
+ "name": "websocket",
8491
+ "hasDynamicHelp": false,
8492
+ "multiple": false,
8493
+ "type": "option"
8494
+ },
8495
+ "skipauth": {
8496
+ "description": "Skip authentication check when a default username is required",
8497
+ "name": "skipauth",
8498
+ "allowNo": false,
8499
+ "type": "boolean"
8500
+ }
8501
+ },
8502
+ "hasDynamicHelp": true,
8503
+ "hiddenAliases": [],
8504
+ "id": "hardis:org:refresh:before-refresh",
8505
+ "pluginAlias": "sfdx-hardis",
8506
+ "pluginName": "sfdx-hardis",
8507
+ "pluginType": "core",
8508
+ "strict": true,
8509
+ "enableJsonFlag": true,
8510
+ "requiresProject": true,
8511
+ "isESM": true,
8512
+ "relativePath": [
8513
+ "lib",
8514
+ "commands",
8515
+ "hardis",
8516
+ "org",
8517
+ "refresh",
8518
+ "before-refresh.js"
8519
+ ],
8520
+ "aliasPermutations": [],
8521
+ "permutations": [
8522
+ "hardis:org:refresh:before-refresh",
8523
+ "org:hardis:refresh:before-refresh",
8524
+ "org:refresh:hardis:before-refresh",
8525
+ "org:refresh:before-refresh:hardis",
8526
+ "hardis:refresh:org:before-refresh",
8527
+ "refresh:hardis:org:before-refresh",
8528
+ "refresh:org:hardis:before-refresh",
8529
+ "refresh:org:before-refresh:hardis",
8530
+ "hardis:refresh:before-refresh:org",
8531
+ "refresh:hardis:before-refresh:org",
8532
+ "refresh:before-refresh:hardis:org",
8533
+ "refresh:before-refresh:org:hardis",
8534
+ "hardis:org:before-refresh:refresh",
8535
+ "org:hardis:before-refresh:refresh",
8536
+ "org:before-refresh:hardis:refresh",
8537
+ "org:before-refresh:refresh:hardis",
8538
+ "hardis:before-refresh:org:refresh",
8539
+ "before-refresh:hardis:org:refresh",
8540
+ "before-refresh:org:hardis:refresh",
8541
+ "before-refresh:org:refresh:hardis",
8542
+ "hardis:before-refresh:refresh:org",
8543
+ "before-refresh:hardis:refresh:org",
8544
+ "before-refresh:refresh:hardis:org",
8545
+ "before-refresh:refresh:org:hardis"
8546
+ ]
8547
+ },
8548
8548
  "hardis:org:retrieve:packageconfig": {
8549
8549
  "aliases": [],
8550
8550
  "args": {},
@@ -9913,262 +9913,30 @@
9913
9913
  ],
9914
9914
  "aliasPermutations": [],
9915
9915
  "permutations": [
9916
- "hardis:project:audit:remotesites",
9917
- "project:hardis:audit:remotesites",
9918
- "project:audit:hardis:remotesites",
9919
- "project:audit:remotesites:hardis",
9920
- "hardis:audit:project:remotesites",
9921
- "audit:hardis:project:remotesites",
9922
- "audit:project:hardis:remotesites",
9923
- "audit:project:remotesites:hardis",
9924
- "hardis:audit:remotesites:project",
9925
- "audit:hardis:remotesites:project",
9926
- "audit:remotesites:hardis:project",
9927
- "audit:remotesites:project:hardis",
9928
- "hardis:project:remotesites:audit",
9929
- "project:hardis:remotesites:audit",
9930
- "project:remotesites:hardis:audit",
9931
- "project:remotesites:audit:hardis",
9932
- "hardis:remotesites:project:audit",
9933
- "remotesites:hardis:project:audit",
9934
- "remotesites:project:hardis:audit",
9935
- "remotesites:project:audit:hardis",
9936
- "hardis:remotesites:audit:project",
9937
- "remotesites:hardis:audit:project",
9938
- "remotesites:audit:hardis:project",
9939
- "remotesites:audit:project:hardis"
9940
- ]
9941
- },
9942
- "hardis:project:configure:auth": {
9943
- "aliases": [],
9944
- "args": {},
9945
- "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<details markdown=\"1\">\n<summary>Technical explanations</summary>\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",
9946
- "examples": [
9947
- "$ sf hardis:project:configure:auth"
9948
- ],
9949
- "flags": {
9950
- "json": {
9951
- "description": "Format output as json.",
9952
- "helpGroup": "GLOBAL",
9953
- "name": "json",
9954
- "allowNo": false,
9955
- "type": "boolean"
9956
- },
9957
- "flags-dir": {
9958
- "helpGroup": "GLOBAL",
9959
- "name": "flags-dir",
9960
- "summary": "Import flag values from a directory.",
9961
- "hasDynamicHelp": false,
9962
- "multiple": false,
9963
- "type": "option"
9964
- },
9965
- "devhub": {
9966
- "char": "b",
9967
- "description": "Configure project DevHub",
9968
- "name": "devhub",
9969
- "allowNo": false,
9970
- "type": "boolean"
9971
- },
9972
- "debug": {
9973
- "char": "d",
9974
- "description": "Activate debug mode (more logs)",
9975
- "name": "debug",
9976
- "allowNo": false,
9977
- "type": "boolean"
9978
- },
9979
- "websocket": {
9980
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9981
- "name": "websocket",
9982
- "hasDynamicHelp": false,
9983
- "multiple": false,
9984
- "type": "option"
9985
- },
9986
- "skipauth": {
9987
- "description": "Skip authentication check when a default username is required",
9988
- "name": "skipauth",
9989
- "allowNo": false,
9990
- "type": "boolean"
9991
- },
9992
- "target-org": {
9993
- "aliases": [
9994
- "targetusername",
9995
- "u"
9996
- ],
9997
- "char": "o",
9998
- "deprecateAliases": true,
9999
- "name": "target-org",
10000
- "noCacheDefault": true,
10001
- "summary": "Username or alias of the target org.",
10002
- "hasDynamicHelp": true,
10003
- "multiple": false,
10004
- "type": "option"
10005
- },
10006
- "target-dev-hub": {
10007
- "aliases": [
10008
- "targetdevhubusername"
10009
- ],
10010
- "char": "v",
10011
- "deprecateAliases": true,
10012
- "name": "target-dev-hub",
10013
- "noCacheDefault": true,
10014
- "required": false,
10015
- "summary": "Username or alias of the Dev Hub org.",
10016
- "hasDynamicHelp": true,
10017
- "multiple": false,
10018
- "type": "option"
10019
- }
10020
- },
10021
- "hasDynamicHelp": true,
10022
- "hiddenAliases": [],
10023
- "id": "hardis:project:configure:auth",
10024
- "pluginAlias": "sfdx-hardis",
10025
- "pluginName": "sfdx-hardis",
10026
- "pluginType": "core",
10027
- "strict": true,
10028
- "enableJsonFlag": true,
10029
- "title": "Configure authentication",
10030
- "requiresProject": false,
10031
- "requiresDependencies": [
10032
- "openssl"
10033
- ],
10034
- "isESM": true,
10035
- "relativePath": [
10036
- "lib",
10037
- "commands",
10038
- "hardis",
10039
- "project",
10040
- "configure",
10041
- "auth.js"
10042
- ],
10043
- "aliasPermutations": [],
10044
- "permutations": [
10045
- "hardis:project:configure:auth",
10046
- "project:hardis:configure:auth",
10047
- "project:configure:hardis:auth",
10048
- "project:configure:auth:hardis",
10049
- "hardis:configure:project:auth",
10050
- "configure:hardis:project:auth",
10051
- "configure:project:hardis:auth",
10052
- "configure:project:auth:hardis",
10053
- "hardis:configure:auth:project",
10054
- "configure:hardis:auth:project",
10055
- "configure:auth:hardis:project",
10056
- "configure:auth:project:hardis",
10057
- "hardis:project:auth:configure",
10058
- "project:hardis:auth:configure",
10059
- "project:auth:hardis:configure",
10060
- "project:auth:configure:hardis",
10061
- "hardis:auth:project:configure",
10062
- "auth:hardis:project:configure",
10063
- "auth:project:hardis:configure",
10064
- "auth:project:configure:hardis",
10065
- "hardis:auth:configure:project",
10066
- "auth:hardis:configure:project",
10067
- "auth:configure:hardis:project",
10068
- "auth:configure:project:hardis"
10069
- ]
10070
- },
10071
- "hardis:project:convert:profilestopermsets": {
10072
- "aliases": [],
10073
- "args": {},
10074
- "description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
10075
- "examples": [
10076
- "$ sf hardis:project:convert:profilestopermsets"
10077
- ],
10078
- "flags": {
10079
- "json": {
10080
- "description": "Format output as json.",
10081
- "helpGroup": "GLOBAL",
10082
- "name": "json",
10083
- "allowNo": false,
10084
- "type": "boolean"
10085
- },
10086
- "flags-dir": {
10087
- "helpGroup": "GLOBAL",
10088
- "name": "flags-dir",
10089
- "summary": "Import flag values from a directory.",
10090
- "hasDynamicHelp": false,
10091
- "multiple": false,
10092
- "type": "option"
10093
- },
10094
- "except": {
10095
- "char": "e",
10096
- "description": "List of filters",
10097
- "name": "except",
10098
- "default": [],
10099
- "hasDynamicHelp": false,
10100
- "multiple": true,
10101
- "type": "option"
10102
- },
10103
- "debug": {
10104
- "char": "d",
10105
- "description": "Activate debug mode (more logs)",
10106
- "name": "debug",
10107
- "allowNo": false,
10108
- "type": "boolean"
10109
- },
10110
- "websocket": {
10111
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
10112
- "name": "websocket",
10113
- "hasDynamicHelp": false,
10114
- "multiple": false,
10115
- "type": "option"
10116
- },
10117
- "skipauth": {
10118
- "description": "Skip authentication check when a default username is required",
10119
- "name": "skipauth",
10120
- "allowNo": false,
10121
- "type": "boolean"
10122
- }
10123
- },
10124
- "hasDynamicHelp": false,
10125
- "hiddenAliases": [],
10126
- "id": "hardis:project:convert:profilestopermsets",
10127
- "pluginAlias": "sfdx-hardis",
10128
- "pluginName": "sfdx-hardis",
10129
- "pluginType": "core",
10130
- "strict": true,
10131
- "enableJsonFlag": true,
10132
- "title": "Convert Profiles into Permission Sets",
10133
- "requiresProject": true,
10134
- "requiresSfdxPlugins": [
10135
- "shane-sfdx-plugins"
10136
- ],
10137
- "isESM": true,
10138
- "relativePath": [
10139
- "lib",
10140
- "commands",
10141
- "hardis",
10142
- "project",
10143
- "convert",
10144
- "profilestopermsets.js"
10145
- ],
10146
- "aliasPermutations": [],
10147
- "permutations": [
10148
- "hardis:project:convert:profilestopermsets",
10149
- "project:hardis:convert:profilestopermsets",
10150
- "project:convert:hardis:profilestopermsets",
10151
- "project:convert:profilestopermsets:hardis",
10152
- "hardis:convert:project:profilestopermsets",
10153
- "convert:hardis:project:profilestopermsets",
10154
- "convert:project:hardis:profilestopermsets",
10155
- "convert:project:profilestopermsets:hardis",
10156
- "hardis:convert:profilestopermsets:project",
10157
- "convert:hardis:profilestopermsets:project",
10158
- "convert:profilestopermsets:hardis:project",
10159
- "convert:profilestopermsets:project:hardis",
10160
- "hardis:project:profilestopermsets:convert",
10161
- "project:hardis:profilestopermsets:convert",
10162
- "project:profilestopermsets:hardis:convert",
10163
- "project:profilestopermsets:convert:hardis",
10164
- "hardis:profilestopermsets:project:convert",
10165
- "profilestopermsets:hardis:project:convert",
10166
- "profilestopermsets:project:hardis:convert",
10167
- "profilestopermsets:project:convert:hardis",
10168
- "hardis:profilestopermsets:convert:project",
10169
- "profilestopermsets:hardis:convert:project",
10170
- "profilestopermsets:convert:hardis:project",
10171
- "profilestopermsets:convert:project:hardis"
9916
+ "hardis:project:audit:remotesites",
9917
+ "project:hardis:audit:remotesites",
9918
+ "project:audit:hardis:remotesites",
9919
+ "project:audit:remotesites:hardis",
9920
+ "hardis:audit:project:remotesites",
9921
+ "audit:hardis:project:remotesites",
9922
+ "audit:project:hardis:remotesites",
9923
+ "audit:project:remotesites:hardis",
9924
+ "hardis:audit:remotesites:project",
9925
+ "audit:hardis:remotesites:project",
9926
+ "audit:remotesites:hardis:project",
9927
+ "audit:remotesites:project:hardis",
9928
+ "hardis:project:remotesites:audit",
9929
+ "project:hardis:remotesites:audit",
9930
+ "project:remotesites:hardis:audit",
9931
+ "project:remotesites:audit:hardis",
9932
+ "hardis:remotesites:project:audit",
9933
+ "remotesites:hardis:project:audit",
9934
+ "remotesites:project:hardis:audit",
9935
+ "remotesites:project:audit:hardis",
9936
+ "hardis:remotesites:audit:project",
9937
+ "remotesites:hardis:audit:project",
9938
+ "remotesites:audit:hardis:project",
9939
+ "remotesites:audit:project:hardis"
10172
9940
  ]
10173
9941
  },
10174
9942
  "hardis:project:clean:emptyitems": {
@@ -11757,6 +11525,238 @@
11757
11525
  "xml:clean:project:hardis"
11758
11526
  ]
11759
11527
  },
11528
+ "hardis:project:configure:auth": {
11529
+ "aliases": [],
11530
+ "args": {},
11531
+ "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<details markdown=\"1\">\n<summary>Technical explanations</summary>\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",
11532
+ "examples": [
11533
+ "$ sf hardis:project:configure:auth"
11534
+ ],
11535
+ "flags": {
11536
+ "json": {
11537
+ "description": "Format output as json.",
11538
+ "helpGroup": "GLOBAL",
11539
+ "name": "json",
11540
+ "allowNo": false,
11541
+ "type": "boolean"
11542
+ },
11543
+ "flags-dir": {
11544
+ "helpGroup": "GLOBAL",
11545
+ "name": "flags-dir",
11546
+ "summary": "Import flag values from a directory.",
11547
+ "hasDynamicHelp": false,
11548
+ "multiple": false,
11549
+ "type": "option"
11550
+ },
11551
+ "devhub": {
11552
+ "char": "b",
11553
+ "description": "Configure project DevHub",
11554
+ "name": "devhub",
11555
+ "allowNo": false,
11556
+ "type": "boolean"
11557
+ },
11558
+ "debug": {
11559
+ "char": "d",
11560
+ "description": "Activate debug mode (more logs)",
11561
+ "name": "debug",
11562
+ "allowNo": false,
11563
+ "type": "boolean"
11564
+ },
11565
+ "websocket": {
11566
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11567
+ "name": "websocket",
11568
+ "hasDynamicHelp": false,
11569
+ "multiple": false,
11570
+ "type": "option"
11571
+ },
11572
+ "skipauth": {
11573
+ "description": "Skip authentication check when a default username is required",
11574
+ "name": "skipauth",
11575
+ "allowNo": false,
11576
+ "type": "boolean"
11577
+ },
11578
+ "target-org": {
11579
+ "aliases": [
11580
+ "targetusername",
11581
+ "u"
11582
+ ],
11583
+ "char": "o",
11584
+ "deprecateAliases": true,
11585
+ "name": "target-org",
11586
+ "noCacheDefault": true,
11587
+ "summary": "Username or alias of the target org.",
11588
+ "hasDynamicHelp": true,
11589
+ "multiple": false,
11590
+ "type": "option"
11591
+ },
11592
+ "target-dev-hub": {
11593
+ "aliases": [
11594
+ "targetdevhubusername"
11595
+ ],
11596
+ "char": "v",
11597
+ "deprecateAliases": true,
11598
+ "name": "target-dev-hub",
11599
+ "noCacheDefault": true,
11600
+ "required": false,
11601
+ "summary": "Username or alias of the Dev Hub org.",
11602
+ "hasDynamicHelp": true,
11603
+ "multiple": false,
11604
+ "type": "option"
11605
+ }
11606
+ },
11607
+ "hasDynamicHelp": true,
11608
+ "hiddenAliases": [],
11609
+ "id": "hardis:project:configure:auth",
11610
+ "pluginAlias": "sfdx-hardis",
11611
+ "pluginName": "sfdx-hardis",
11612
+ "pluginType": "core",
11613
+ "strict": true,
11614
+ "enableJsonFlag": true,
11615
+ "title": "Configure authentication",
11616
+ "requiresProject": false,
11617
+ "requiresDependencies": [
11618
+ "openssl"
11619
+ ],
11620
+ "isESM": true,
11621
+ "relativePath": [
11622
+ "lib",
11623
+ "commands",
11624
+ "hardis",
11625
+ "project",
11626
+ "configure",
11627
+ "auth.js"
11628
+ ],
11629
+ "aliasPermutations": [],
11630
+ "permutations": [
11631
+ "hardis:project:configure:auth",
11632
+ "project:hardis:configure:auth",
11633
+ "project:configure:hardis:auth",
11634
+ "project:configure:auth:hardis",
11635
+ "hardis:configure:project:auth",
11636
+ "configure:hardis:project:auth",
11637
+ "configure:project:hardis:auth",
11638
+ "configure:project:auth:hardis",
11639
+ "hardis:configure:auth:project",
11640
+ "configure:hardis:auth:project",
11641
+ "configure:auth:hardis:project",
11642
+ "configure:auth:project:hardis",
11643
+ "hardis:project:auth:configure",
11644
+ "project:hardis:auth:configure",
11645
+ "project:auth:hardis:configure",
11646
+ "project:auth:configure:hardis",
11647
+ "hardis:auth:project:configure",
11648
+ "auth:hardis:project:configure",
11649
+ "auth:project:hardis:configure",
11650
+ "auth:project:configure:hardis",
11651
+ "hardis:auth:configure:project",
11652
+ "auth:hardis:configure:project",
11653
+ "auth:configure:hardis:project",
11654
+ "auth:configure:project:hardis"
11655
+ ]
11656
+ },
11657
+ "hardis:project:convert:profilestopermsets": {
11658
+ "aliases": [],
11659
+ "args": {},
11660
+ "description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
11661
+ "examples": [
11662
+ "$ sf hardis:project:convert:profilestopermsets"
11663
+ ],
11664
+ "flags": {
11665
+ "json": {
11666
+ "description": "Format output as json.",
11667
+ "helpGroup": "GLOBAL",
11668
+ "name": "json",
11669
+ "allowNo": false,
11670
+ "type": "boolean"
11671
+ },
11672
+ "flags-dir": {
11673
+ "helpGroup": "GLOBAL",
11674
+ "name": "flags-dir",
11675
+ "summary": "Import flag values from a directory.",
11676
+ "hasDynamicHelp": false,
11677
+ "multiple": false,
11678
+ "type": "option"
11679
+ },
11680
+ "except": {
11681
+ "char": "e",
11682
+ "description": "List of filters",
11683
+ "name": "except",
11684
+ "default": [],
11685
+ "hasDynamicHelp": false,
11686
+ "multiple": true,
11687
+ "type": "option"
11688
+ },
11689
+ "debug": {
11690
+ "char": "d",
11691
+ "description": "Activate debug mode (more logs)",
11692
+ "name": "debug",
11693
+ "allowNo": false,
11694
+ "type": "boolean"
11695
+ },
11696
+ "websocket": {
11697
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11698
+ "name": "websocket",
11699
+ "hasDynamicHelp": false,
11700
+ "multiple": false,
11701
+ "type": "option"
11702
+ },
11703
+ "skipauth": {
11704
+ "description": "Skip authentication check when a default username is required",
11705
+ "name": "skipauth",
11706
+ "allowNo": false,
11707
+ "type": "boolean"
11708
+ }
11709
+ },
11710
+ "hasDynamicHelp": false,
11711
+ "hiddenAliases": [],
11712
+ "id": "hardis:project:convert:profilestopermsets",
11713
+ "pluginAlias": "sfdx-hardis",
11714
+ "pluginName": "sfdx-hardis",
11715
+ "pluginType": "core",
11716
+ "strict": true,
11717
+ "enableJsonFlag": true,
11718
+ "title": "Convert Profiles into Permission Sets",
11719
+ "requiresProject": true,
11720
+ "requiresSfdxPlugins": [
11721
+ "shane-sfdx-plugins"
11722
+ ],
11723
+ "isESM": true,
11724
+ "relativePath": [
11725
+ "lib",
11726
+ "commands",
11727
+ "hardis",
11728
+ "project",
11729
+ "convert",
11730
+ "profilestopermsets.js"
11731
+ ],
11732
+ "aliasPermutations": [],
11733
+ "permutations": [
11734
+ "hardis:project:convert:profilestopermsets",
11735
+ "project:hardis:convert:profilestopermsets",
11736
+ "project:convert:hardis:profilestopermsets",
11737
+ "project:convert:profilestopermsets:hardis",
11738
+ "hardis:convert:project:profilestopermsets",
11739
+ "convert:hardis:project:profilestopermsets",
11740
+ "convert:project:hardis:profilestopermsets",
11741
+ "convert:project:profilestopermsets:hardis",
11742
+ "hardis:convert:profilestopermsets:project",
11743
+ "convert:hardis:profilestopermsets:project",
11744
+ "convert:profilestopermsets:hardis:project",
11745
+ "convert:profilestopermsets:project:hardis",
11746
+ "hardis:project:profilestopermsets:convert",
11747
+ "project:hardis:profilestopermsets:convert",
11748
+ "project:profilestopermsets:hardis:convert",
11749
+ "project:profilestopermsets:convert:hardis",
11750
+ "hardis:profilestopermsets:project:convert",
11751
+ "profilestopermsets:hardis:project:convert",
11752
+ "profilestopermsets:project:hardis:convert",
11753
+ "profilestopermsets:project:convert:hardis",
11754
+ "hardis:profilestopermsets:convert:project",
11755
+ "profilestopermsets:hardis:convert:project",
11756
+ "profilestopermsets:convert:hardis:project",
11757
+ "profilestopermsets:convert:project:hardis"
11758
+ ]
11759
+ },
11760
11760
  "hardis:project:deploy:notify": {
11761
11761
  "aliases": [],
11762
11762
  "args": {},
@@ -15719,5 +15719,5 @@
15719
15719
  ]
15720
15720
  }
15721
15721
  },
15722
- "version": "6.14.4-beta202512080425.0"
15722
+ "version": "6.14.4"
15723
15723
  }