sfdx-hardis 6.1.1 → 6.1.2

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.
@@ -57,12 +57,13 @@
57
57
  "world:hello"
58
58
  ]
59
59
  },
60
- "hardis:cache:clear": {
60
+ "hardis:auth:login": {
61
61
  "aliases": [],
62
62
  "args": {},
63
- "description": "\n## Command Behavior\n\n**Clears the local cache generated by the sfdx-hardis plugin.**\n\nThis command is designed to remove temporary files, stored configurations, and other cached data that sfdx-hardis uses to optimize its operations. Clearing the cache can be beneficial for:\n\n- **Troubleshooting:** Resolving unexpected behavior or inconsistencies.\n- **Disk Space Management:** Freeing up storage on your local machine.\n- **Ensuring Fresh Data:** Guaranteeing that the plugin operates with the most current data and configurations.\n\n## Technical explanations\n\nThe command's technical implementation is straightforward:\n\n- **Direct Function Call:** It directly invokes the `clearCache()` function, which is imported from \buri../../../common/cache/index.js\buri.\n- **Cache Management Logic:** The \buriclearCache()` function encapsulates the logic for identifying and removing the specific files and directories that constitute the sfdx-hardis cache.\n",
63
+ "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",
64
64
  "examples": [
65
- "$ sf hardis:cache:clear"
65
+ "$ sf hardis:auth:login",
66
+ "CI=true sf hardis:auth:login"
66
67
  ],
67
68
  "flags": {
68
69
  "json": {
@@ -80,6 +81,28 @@
80
81
  "multiple": false,
81
82
  "type": "option"
82
83
  },
84
+ "instanceurl": {
85
+ "char": "r",
86
+ "description": "URL of org instance",
87
+ "name": "instanceurl",
88
+ "hasDynamicHelp": false,
89
+ "multiple": false,
90
+ "type": "option"
91
+ },
92
+ "devhub": {
93
+ "char": "h",
94
+ "description": "Also connect associated DevHub",
95
+ "name": "devhub",
96
+ "allowNo": false,
97
+ "type": "boolean"
98
+ },
99
+ "scratchorg": {
100
+ "char": "s",
101
+ "description": "Scratch org",
102
+ "name": "scratchorg",
103
+ "allowNo": false,
104
+ "type": "boolean"
105
+ },
83
106
  "debug": {
84
107
  "char": "d",
85
108
  "description": "Activate debug mode (more logs)",
@@ -103,41 +126,38 @@
103
126
  },
104
127
  "hasDynamicHelp": false,
105
128
  "hiddenAliases": [],
106
- "id": "hardis:cache:clear",
129
+ "id": "hardis:auth:login",
107
130
  "pluginAlias": "sfdx-hardis",
108
131
  "pluginName": "sfdx-hardis",
109
132
  "pluginType": "core",
110
133
  "strict": true,
111
134
  "enableJsonFlag": true,
112
- "title": "Clear sfdx-hardis cache",
113
- "uiConfig": {
114
- "hide": true
115
- },
135
+ "title": "Login",
116
136
  "requiresProject": false,
117
137
  "isESM": true,
118
138
  "relativePath": [
119
139
  "lib",
120
140
  "commands",
121
141
  "hardis",
122
- "cache",
123
- "clear.js"
142
+ "auth",
143
+ "login.js"
124
144
  ],
125
145
  "aliasPermutations": [],
126
146
  "permutations": [
127
- "hardis:cache:clear",
128
- "cache:hardis:clear",
129
- "cache:clear:hardis",
130
- "hardis:clear:cache",
131
- "clear:hardis:cache",
132
- "clear:cache:hardis"
147
+ "hardis:auth:login",
148
+ "auth:hardis:login",
149
+ "auth:login:hardis",
150
+ "hardis:login:auth",
151
+ "login:hardis:auth",
152
+ "login:auth:hardis"
133
153
  ]
134
154
  },
135
- "hardis:config:get": {
155
+ "hardis:cache:clear": {
136
156
  "aliases": [],
137
157
  "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",
158
+ "description": "\n## Command Behavior\n\n**Clears the local cache generated by the sfdx-hardis plugin.**\n\nThis command is designed to remove temporary files, stored configurations, and other cached data that sfdx-hardis uses to optimize its operations. Clearing the cache can be beneficial for:\n\n- **Troubleshooting:** Resolving unexpected behavior or inconsistencies.\n- **Disk Space Management:** Freeing up storage on your local machine.\n- **Ensuring Fresh Data:** Guaranteeing that the plugin operates with the most current data and configurations.\n\n## Technical explanations\n\nThe command's technical implementation is straightforward:\n\n- **Direct Function Call:** It directly invokes the `clearCache()` function, which is imported from \buri../../../common/cache/index.js\buri.\n- **Cache Management Logic:** The \buriclearCache()` function encapsulates the logic for identifying and removing the specific files and directories that constitute the sfdx-hardis cache.\n",
139
159
  "examples": [
140
- "$ sf hardis:project:deploy:sources:metadata"
160
+ "$ sf hardis:cache:clear"
141
161
  ],
142
162
  "flags": {
143
163
  "json": {
@@ -155,20 +175,6 @@
155
175
  "multiple": false,
156
176
  "type": "option"
157
177
  },
158
- "level": {
159
- "char": "l",
160
- "description": "project,branch or user",
161
- "name": "level",
162
- "default": "project",
163
- "hasDynamicHelp": false,
164
- "multiple": false,
165
- "options": [
166
- "project",
167
- "branch",
168
- "user"
169
- ],
170
- "type": "option"
171
- },
172
178
  "debug": {
173
179
  "char": "d",
174
180
  "description": "Activate debug mode (more logs)",
@@ -192,39 +198,41 @@
192
198
  },
193
199
  "hasDynamicHelp": false,
194
200
  "hiddenAliases": [],
195
- "id": "hardis:config:get",
201
+ "id": "hardis:cache:clear",
196
202
  "pluginAlias": "sfdx-hardis",
197
203
  "pluginName": "sfdx-hardis",
198
204
  "pluginType": "core",
199
205
  "strict": true,
200
206
  "enableJsonFlag": true,
201
- "title": "Deploy metadata sources to org",
207
+ "title": "Clear sfdx-hardis cache",
208
+ "uiConfig": {
209
+ "hide": true
210
+ },
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
+ "cache",
218
+ "clear.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:cache:clear",
223
+ "cache:hardis:clear",
224
+ "cache:clear:hardis",
225
+ "hardis:clear:cache",
226
+ "clear:hardis:cache",
227
+ "clear:cache: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 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": {
@@ -3101,8 +3101,7 @@
3101
3101
  "title": "Create and initialize scratch org",
3102
3102
  "requiresProject": true,
3103
3103
  "requiresSfdxPlugins": [
3104
- "sfdmu",
3105
- "texei-sfdx-plugin"
3104
+ "sfdmu"
3106
3105
  ],
3107
3106
  "isESM": true,
3108
3107
  "relativePath": [
@@ -5489,12 +5488,15 @@
5489
5488
  "import:data:org:hardis"
5490
5489
  ]
5491
5490
  },
5492
- "hardis:org:files:export": {
5491
+ "hardis:org:diagnose:audittrail": {
5493
5492
  "aliases": [],
5494
5493
  "args": {},
5495
- "description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, and output naming conventions.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[![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.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project and `promptFilesExportConfiguration` for customizing export options.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues or API limits.\n</details>\n",
5494
+ "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",
5496
5495
  "examples": [
5497
- "$ sf hardis:org:files:export"
5496
+ "$ sf hardis:org:diagnose:audittrail",
5497
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5498
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5499
+ "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5498
5500
  ],
5499
5501
  "flags": {
5500
5502
  "json": {
@@ -5512,37 +5514,26 @@
5512
5514
  "multiple": false,
5513
5515
  "type": "option"
5514
5516
  },
5515
- "path": {
5516
- "char": "p",
5517
- "description": "Path to the file export project",
5518
- "name": "path",
5519
- "hasDynamicHelp": false,
5520
- "multiple": false,
5521
- "type": "option"
5522
- },
5523
- "chunksize": {
5524
- "char": "c",
5525
- "description": "Number of records to add in a chunk before it is processed",
5526
- "name": "chunksize",
5527
- "default": 1000,
5517
+ "excludeusers": {
5518
+ "char": "e",
5519
+ "description": "Comma-separated list of usernames to exclude",
5520
+ "name": "excludeusers",
5528
5521
  "hasDynamicHelp": false,
5529
5522
  "multiple": false,
5530
5523
  "type": "option"
5531
5524
  },
5532
- "polltimeout": {
5525
+ "lastndays": {
5533
5526
  "char": "t",
5534
- "description": "Timeout in MS for Bulk API calls",
5535
- "name": "polltimeout",
5536
- "default": 300000,
5527
+ "description": "Number of days to extract from today (included)",
5528
+ "name": "lastndays",
5537
5529
  "hasDynamicHelp": false,
5538
5530
  "multiple": false,
5539
5531
  "type": "option"
5540
5532
  },
5541
- "startchunknumber": {
5542
- "char": "s",
5543
- "description": "Chunk number to start from",
5544
- "name": "startchunknumber",
5545
- "default": 0,
5533
+ "outputfile": {
5534
+ "char": "f",
5535
+ "description": "Force the path and name of output report file. Must end with .csv",
5536
+ "name": "outputfile",
5546
5537
  "hasDynamicHelp": false,
5547
5538
  "multiple": false,
5548
5539
  "type": "option"
@@ -5585,13 +5576,13 @@
5585
5576
  },
5586
5577
  "hasDynamicHelp": true,
5587
5578
  "hiddenAliases": [],
5588
- "id": "hardis:org:files:export",
5579
+ "id": "hardis:org:diagnose:audittrail",
5589
5580
  "pluginAlias": "sfdx-hardis",
5590
5581
  "pluginName": "sfdx-hardis",
5591
5582
  "pluginType": "core",
5592
5583
  "strict": true,
5593
5584
  "enableJsonFlag": true,
5594
- "title": "Export files",
5585
+ "title": "Diagnose content of Setup Audit Trail",
5595
5586
  "requiresProject": false,
5596
5587
  "isESM": true,
5597
5588
  "relativePath": [
@@ -5599,297 +5590,43 @@
5599
5590
  "commands",
5600
5591
  "hardis",
5601
5592
  "org",
5602
- "files",
5603
- "export.js"
5593
+ "diagnose",
5594
+ "audittrail.js"
5604
5595
  ],
5605
5596
  "aliasPermutations": [],
5606
5597
  "permutations": [
5607
- "hardis:org:files:export",
5608
- "org:hardis:files:export",
5609
- "org:files:hardis:export",
5610
- "org:files:export:hardis",
5611
- "hardis:files:org:export",
5612
- "files:hardis:org:export",
5613
- "files:org:hardis:export",
5614
- "files:org:export:hardis",
5615
- "hardis:files:export:org",
5616
- "files:hardis:export:org",
5617
- "files:export:hardis:org",
5618
- "files:export:org:hardis",
5619
- "hardis:org:export:files",
5620
- "org:hardis:export:files",
5621
- "org:export:hardis:files",
5622
- "org:export:files:hardis",
5623
- "hardis:export:org:files",
5624
- "export:hardis:org:files",
5625
- "export:org:hardis:files",
5626
- "export:org:files:hardis",
5627
- "hardis:export:files:org",
5628
- "export:hardis:files:org",
5629
- "export:files:hardis:org",
5630
- "export:files:org:hardis"
5598
+ "hardis:org:diagnose:audittrail",
5599
+ "org:hardis:diagnose:audittrail",
5600
+ "org:diagnose:hardis:audittrail",
5601
+ "org:diagnose:audittrail:hardis",
5602
+ "hardis:diagnose:org:audittrail",
5603
+ "diagnose:hardis:org:audittrail",
5604
+ "diagnose:org:hardis:audittrail",
5605
+ "diagnose:org:audittrail:hardis",
5606
+ "hardis:diagnose:audittrail:org",
5607
+ "diagnose:hardis:audittrail:org",
5608
+ "diagnose:audittrail:hardis:org",
5609
+ "diagnose:audittrail:org:hardis",
5610
+ "hardis:org:audittrail:diagnose",
5611
+ "org:hardis:audittrail:diagnose",
5612
+ "org:audittrail:hardis:diagnose",
5613
+ "org:audittrail:diagnose:hardis",
5614
+ "hardis:audittrail:org:diagnose",
5615
+ "audittrail:hardis:org:diagnose",
5616
+ "audittrail:org:hardis:diagnose",
5617
+ "audittrail:org:diagnose:hardis",
5618
+ "hardis:audittrail:diagnose:org",
5619
+ "audittrail:hardis:diagnose:org",
5620
+ "audittrail:diagnose:hardis:org",
5621
+ "audittrail:diagnose:org:hardis"
5631
5622
  ]
5632
5623
  },
5633
- "hardis:org:files:import": {
5624
+ "hardis:org:diagnose:instanceupgrade": {
5634
5625
  "aliases": [],
5635
5626
  "args": {},
5636
- "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",
5627
+ "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",
5637
5628
  "examples": [
5638
- "$ sf hardis:org:files:import"
5639
- ],
5640
- "flags": {
5641
- "json": {
5642
- "description": "Format output as json.",
5643
- "helpGroup": "GLOBAL",
5644
- "name": "json",
5645
- "allowNo": false,
5646
- "type": "boolean"
5647
- },
5648
- "flags-dir": {
5649
- "helpGroup": "GLOBAL",
5650
- "name": "flags-dir",
5651
- "summary": "Import flag values from a directory.",
5652
- "hasDynamicHelp": false,
5653
- "multiple": false,
5654
- "type": "option"
5655
- },
5656
- "path": {
5657
- "char": "p",
5658
- "description": "Path to the file export project",
5659
- "name": "path",
5660
- "hasDynamicHelp": false,
5661
- "multiple": false,
5662
- "type": "option"
5663
- },
5664
- "overwrite": {
5665
- "char": "f",
5666
- "description": "Override existing files (doubles the number of API calls)",
5667
- "name": "overwrite",
5668
- "allowNo": false,
5669
- "type": "boolean"
5670
- },
5671
- "debug": {
5672
- "char": "d",
5673
- "description": "Activate debug mode (more logs)",
5674
- "name": "debug",
5675
- "allowNo": false,
5676
- "type": "boolean"
5677
- },
5678
- "websocket": {
5679
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5680
- "name": "websocket",
5681
- "hasDynamicHelp": false,
5682
- "multiple": false,
5683
- "type": "option"
5684
- },
5685
- "skipauth": {
5686
- "description": "Skip authentication check when a default username is required",
5687
- "name": "skipauth",
5688
- "allowNo": false,
5689
- "type": "boolean"
5690
- },
5691
- "target-org": {
5692
- "aliases": [
5693
- "targetusername",
5694
- "u"
5695
- ],
5696
- "char": "o",
5697
- "deprecateAliases": true,
5698
- "name": "target-org",
5699
- "noCacheDefault": true,
5700
- "required": true,
5701
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
5702
- "hasDynamicHelp": true,
5703
- "multiple": false,
5704
- "type": "option"
5705
- }
5706
- },
5707
- "hasDynamicHelp": true,
5708
- "hiddenAliases": [],
5709
- "id": "hardis:org:files:import",
5710
- "pluginAlias": "sfdx-hardis",
5711
- "pluginName": "sfdx-hardis",
5712
- "pluginType": "core",
5713
- "strict": true,
5714
- "enableJsonFlag": true,
5715
- "title": "Import files",
5716
- "requiresProject": false,
5717
- "isESM": true,
5718
- "relativePath": [
5719
- "lib",
5720
- "commands",
5721
- "hardis",
5722
- "org",
5723
- "files",
5724
- "import.js"
5725
- ],
5726
- "aliasPermutations": [],
5727
- "permutations": [
5728
- "hardis:org:files:import",
5729
- "org:hardis:files:import",
5730
- "org:files:hardis:import",
5731
- "org:files:import:hardis",
5732
- "hardis:files:org:import",
5733
- "files:hardis:org:import",
5734
- "files:org:hardis:import",
5735
- "files:org:import:hardis",
5736
- "hardis:files:import:org",
5737
- "files:hardis:import:org",
5738
- "files:import:hardis:org",
5739
- "files:import:org:hardis",
5740
- "hardis:org:import:files",
5741
- "org:hardis:import:files",
5742
- "org:import:hardis:files",
5743
- "org:import:files:hardis",
5744
- "hardis:import:org:files",
5745
- "import:hardis:org:files",
5746
- "import:org:hardis:files",
5747
- "import:org:files:hardis",
5748
- "hardis:import:files:org",
5749
- "import:hardis:files:org",
5750
- "import:files:hardis:org",
5751
- "import:files:org:hardis"
5752
- ]
5753
- },
5754
- "hardis:org:diagnose:audittrail": {
5755
- "aliases": [],
5756
- "args": {},
5757
- "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",
5758
- "examples": [
5759
- "$ sf hardis:org:diagnose:audittrail",
5760
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5761
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5762
- "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5763
- ],
5764
- "flags": {
5765
- "json": {
5766
- "description": "Format output as json.",
5767
- "helpGroup": "GLOBAL",
5768
- "name": "json",
5769
- "allowNo": false,
5770
- "type": "boolean"
5771
- },
5772
- "flags-dir": {
5773
- "helpGroup": "GLOBAL",
5774
- "name": "flags-dir",
5775
- "summary": "Import flag values from a directory.",
5776
- "hasDynamicHelp": false,
5777
- "multiple": false,
5778
- "type": "option"
5779
- },
5780
- "excludeusers": {
5781
- "char": "e",
5782
- "description": "Comma-separated list of usernames to exclude",
5783
- "name": "excludeusers",
5784
- "hasDynamicHelp": false,
5785
- "multiple": false,
5786
- "type": "option"
5787
- },
5788
- "lastndays": {
5789
- "char": "t",
5790
- "description": "Number of days to extract from today (included)",
5791
- "name": "lastndays",
5792
- "hasDynamicHelp": false,
5793
- "multiple": false,
5794
- "type": "option"
5795
- },
5796
- "outputfile": {
5797
- "char": "f",
5798
- "description": "Force the path and name of output report file. Must end with .csv",
5799
- "name": "outputfile",
5800
- "hasDynamicHelp": false,
5801
- "multiple": false,
5802
- "type": "option"
5803
- },
5804
- "debug": {
5805
- "char": "d",
5806
- "description": "Activate debug mode (more logs)",
5807
- "name": "debug",
5808
- "allowNo": false,
5809
- "type": "boolean"
5810
- },
5811
- "websocket": {
5812
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5813
- "name": "websocket",
5814
- "hasDynamicHelp": false,
5815
- "multiple": false,
5816
- "type": "option"
5817
- },
5818
- "skipauth": {
5819
- "description": "Skip authentication check when a default username is required",
5820
- "name": "skipauth",
5821
- "allowNo": false,
5822
- "type": "boolean"
5823
- },
5824
- "target-org": {
5825
- "aliases": [
5826
- "targetusername",
5827
- "u"
5828
- ],
5829
- "char": "o",
5830
- "deprecateAliases": true,
5831
- "name": "target-org",
5832
- "noCacheDefault": true,
5833
- "required": true,
5834
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
5835
- "hasDynamicHelp": true,
5836
- "multiple": false,
5837
- "type": "option"
5838
- }
5839
- },
5840
- "hasDynamicHelp": true,
5841
- "hiddenAliases": [],
5842
- "id": "hardis:org:diagnose:audittrail",
5843
- "pluginAlias": "sfdx-hardis",
5844
- "pluginName": "sfdx-hardis",
5845
- "pluginType": "core",
5846
- "strict": true,
5847
- "enableJsonFlag": true,
5848
- "title": "Diagnose content of Setup Audit Trail",
5849
- "requiresProject": false,
5850
- "isESM": true,
5851
- "relativePath": [
5852
- "lib",
5853
- "commands",
5854
- "hardis",
5855
- "org",
5856
- "diagnose",
5857
- "audittrail.js"
5858
- ],
5859
- "aliasPermutations": [],
5860
- "permutations": [
5861
- "hardis:org:diagnose:audittrail",
5862
- "org:hardis:diagnose:audittrail",
5863
- "org:diagnose:hardis:audittrail",
5864
- "org:diagnose:audittrail:hardis",
5865
- "hardis:diagnose:org:audittrail",
5866
- "diagnose:hardis:org:audittrail",
5867
- "diagnose:org:hardis:audittrail",
5868
- "diagnose:org:audittrail:hardis",
5869
- "hardis:diagnose:audittrail:org",
5870
- "diagnose:hardis:audittrail:org",
5871
- "diagnose:audittrail:hardis:org",
5872
- "diagnose:audittrail:org:hardis",
5873
- "hardis:org:audittrail:diagnose",
5874
- "org:hardis:audittrail:diagnose",
5875
- "org:audittrail:hardis:diagnose",
5876
- "org:audittrail:diagnose:hardis",
5877
- "hardis:audittrail:org:diagnose",
5878
- "audittrail:hardis:org:diagnose",
5879
- "audittrail:org:hardis:diagnose",
5880
- "audittrail:org:diagnose:hardis",
5881
- "hardis:audittrail:diagnose:org",
5882
- "audittrail:hardis:diagnose:org",
5883
- "audittrail:diagnose:hardis:org",
5884
- "audittrail:diagnose:org:hardis"
5885
- ]
5886
- },
5887
- "hardis:org:diagnose:instanceupgrade": {
5888
- "aliases": [],
5889
- "args": {},
5890
- "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",
5891
- "examples": [
5892
- "$ sf hardis:org:diagnose:instanceupgrade"
5629
+ "$ sf hardis:org:diagnose:instanceupgrade"
5893
5630
  ],
5894
5631
  "flags": {
5895
5632
  "json": {
@@ -6900,6 +6637,268 @@
6900
6637
  "unusedusers:diagnose:org:hardis"
6901
6638
  ]
6902
6639
  },
6640
+ "hardis:org:files:export": {
6641
+ "aliases": [],
6642
+ "args": {},
6643
+ "description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, and output naming conventions.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[![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.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project and `promptFilesExportConfiguration` for customizing export options.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues or API limits.\n</details>\n",
6644
+ "examples": [
6645
+ "$ sf hardis:org:files:export"
6646
+ ],
6647
+ "flags": {
6648
+ "json": {
6649
+ "description": "Format output as json.",
6650
+ "helpGroup": "GLOBAL",
6651
+ "name": "json",
6652
+ "allowNo": false,
6653
+ "type": "boolean"
6654
+ },
6655
+ "flags-dir": {
6656
+ "helpGroup": "GLOBAL",
6657
+ "name": "flags-dir",
6658
+ "summary": "Import flag values from a directory.",
6659
+ "hasDynamicHelp": false,
6660
+ "multiple": false,
6661
+ "type": "option"
6662
+ },
6663
+ "path": {
6664
+ "char": "p",
6665
+ "description": "Path to the file export project",
6666
+ "name": "path",
6667
+ "hasDynamicHelp": false,
6668
+ "multiple": false,
6669
+ "type": "option"
6670
+ },
6671
+ "chunksize": {
6672
+ "char": "c",
6673
+ "description": "Number of records to add in a chunk before it is processed",
6674
+ "name": "chunksize",
6675
+ "default": 1000,
6676
+ "hasDynamicHelp": false,
6677
+ "multiple": false,
6678
+ "type": "option"
6679
+ },
6680
+ "polltimeout": {
6681
+ "char": "t",
6682
+ "description": "Timeout in MS for Bulk API calls",
6683
+ "name": "polltimeout",
6684
+ "default": 300000,
6685
+ "hasDynamicHelp": false,
6686
+ "multiple": false,
6687
+ "type": "option"
6688
+ },
6689
+ "startchunknumber": {
6690
+ "char": "s",
6691
+ "description": "Chunk number to start from",
6692
+ "name": "startchunknumber",
6693
+ "default": 0,
6694
+ "hasDynamicHelp": false,
6695
+ "multiple": false,
6696
+ "type": "option"
6697
+ },
6698
+ "debug": {
6699
+ "char": "d",
6700
+ "description": "Activate debug mode (more logs)",
6701
+ "name": "debug",
6702
+ "allowNo": false,
6703
+ "type": "boolean"
6704
+ },
6705
+ "websocket": {
6706
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
6707
+ "name": "websocket",
6708
+ "hasDynamicHelp": false,
6709
+ "multiple": false,
6710
+ "type": "option"
6711
+ },
6712
+ "skipauth": {
6713
+ "description": "Skip authentication check when a default username is required",
6714
+ "name": "skipauth",
6715
+ "allowNo": false,
6716
+ "type": "boolean"
6717
+ },
6718
+ "target-org": {
6719
+ "aliases": [
6720
+ "targetusername",
6721
+ "u"
6722
+ ],
6723
+ "char": "o",
6724
+ "deprecateAliases": true,
6725
+ "name": "target-org",
6726
+ "noCacheDefault": true,
6727
+ "required": true,
6728
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
6729
+ "hasDynamicHelp": true,
6730
+ "multiple": false,
6731
+ "type": "option"
6732
+ }
6733
+ },
6734
+ "hasDynamicHelp": true,
6735
+ "hiddenAliases": [],
6736
+ "id": "hardis:org:files:export",
6737
+ "pluginAlias": "sfdx-hardis",
6738
+ "pluginName": "sfdx-hardis",
6739
+ "pluginType": "core",
6740
+ "strict": true,
6741
+ "enableJsonFlag": true,
6742
+ "title": "Export files",
6743
+ "requiresProject": false,
6744
+ "isESM": true,
6745
+ "relativePath": [
6746
+ "lib",
6747
+ "commands",
6748
+ "hardis",
6749
+ "org",
6750
+ "files",
6751
+ "export.js"
6752
+ ],
6753
+ "aliasPermutations": [],
6754
+ "permutations": [
6755
+ "hardis:org:files:export",
6756
+ "org:hardis:files:export",
6757
+ "org:files:hardis:export",
6758
+ "org:files:export:hardis",
6759
+ "hardis:files:org:export",
6760
+ "files:hardis:org:export",
6761
+ "files:org:hardis:export",
6762
+ "files:org:export:hardis",
6763
+ "hardis:files:export:org",
6764
+ "files:hardis:export:org",
6765
+ "files:export:hardis:org",
6766
+ "files:export:org:hardis",
6767
+ "hardis:org:export:files",
6768
+ "org:hardis:export:files",
6769
+ "org:export:hardis:files",
6770
+ "org:export:files:hardis",
6771
+ "hardis:export:org:files",
6772
+ "export:hardis:org:files",
6773
+ "export:org:hardis:files",
6774
+ "export:org:files:hardis",
6775
+ "hardis:export:files:org",
6776
+ "export:hardis:files:org",
6777
+ "export:files:hardis:org",
6778
+ "export:files:org:hardis"
6779
+ ]
6780
+ },
6781
+ "hardis:org:files:import": {
6782
+ "aliases": [],
6783
+ "args": {},
6784
+ "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",
6785
+ "examples": [
6786
+ "$ sf hardis:org:files:import"
6787
+ ],
6788
+ "flags": {
6789
+ "json": {
6790
+ "description": "Format output as json.",
6791
+ "helpGroup": "GLOBAL",
6792
+ "name": "json",
6793
+ "allowNo": false,
6794
+ "type": "boolean"
6795
+ },
6796
+ "flags-dir": {
6797
+ "helpGroup": "GLOBAL",
6798
+ "name": "flags-dir",
6799
+ "summary": "Import flag values from a directory.",
6800
+ "hasDynamicHelp": false,
6801
+ "multiple": false,
6802
+ "type": "option"
6803
+ },
6804
+ "path": {
6805
+ "char": "p",
6806
+ "description": "Path to the file export project",
6807
+ "name": "path",
6808
+ "hasDynamicHelp": false,
6809
+ "multiple": false,
6810
+ "type": "option"
6811
+ },
6812
+ "overwrite": {
6813
+ "char": "f",
6814
+ "description": "Override existing files (doubles the number of API calls)",
6815
+ "name": "overwrite",
6816
+ "allowNo": false,
6817
+ "type": "boolean"
6818
+ },
6819
+ "debug": {
6820
+ "char": "d",
6821
+ "description": "Activate debug mode (more logs)",
6822
+ "name": "debug",
6823
+ "allowNo": false,
6824
+ "type": "boolean"
6825
+ },
6826
+ "websocket": {
6827
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
6828
+ "name": "websocket",
6829
+ "hasDynamicHelp": false,
6830
+ "multiple": false,
6831
+ "type": "option"
6832
+ },
6833
+ "skipauth": {
6834
+ "description": "Skip authentication check when a default username is required",
6835
+ "name": "skipauth",
6836
+ "allowNo": false,
6837
+ "type": "boolean"
6838
+ },
6839
+ "target-org": {
6840
+ "aliases": [
6841
+ "targetusername",
6842
+ "u"
6843
+ ],
6844
+ "char": "o",
6845
+ "deprecateAliases": true,
6846
+ "name": "target-org",
6847
+ "noCacheDefault": true,
6848
+ "required": true,
6849
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
6850
+ "hasDynamicHelp": true,
6851
+ "multiple": false,
6852
+ "type": "option"
6853
+ }
6854
+ },
6855
+ "hasDynamicHelp": true,
6856
+ "hiddenAliases": [],
6857
+ "id": "hardis:org:files:import",
6858
+ "pluginAlias": "sfdx-hardis",
6859
+ "pluginName": "sfdx-hardis",
6860
+ "pluginType": "core",
6861
+ "strict": true,
6862
+ "enableJsonFlag": true,
6863
+ "title": "Import files",
6864
+ "requiresProject": false,
6865
+ "isESM": true,
6866
+ "relativePath": [
6867
+ "lib",
6868
+ "commands",
6869
+ "hardis",
6870
+ "org",
6871
+ "files",
6872
+ "import.js"
6873
+ ],
6874
+ "aliasPermutations": [],
6875
+ "permutations": [
6876
+ "hardis:org:files:import",
6877
+ "org:hardis:files:import",
6878
+ "org:files:hardis:import",
6879
+ "org:files:import:hardis",
6880
+ "hardis:files:org:import",
6881
+ "files:hardis:org:import",
6882
+ "files:org:hardis:import",
6883
+ "files:org:import:hardis",
6884
+ "hardis:files:import:org",
6885
+ "files:hardis:import:org",
6886
+ "files:import:hardis:org",
6887
+ "files:import:org:hardis",
6888
+ "hardis:org:import:files",
6889
+ "org:hardis:import:files",
6890
+ "org:import:hardis:files",
6891
+ "org:import:files:hardis",
6892
+ "hardis:import:org:files",
6893
+ "import:hardis:org:files",
6894
+ "import:org:hardis:files",
6895
+ "import:org:files:hardis",
6896
+ "hardis:import:files:org",
6897
+ "import:hardis:files:org",
6898
+ "import:files:hardis:org",
6899
+ "import:files:org:hardis"
6900
+ ]
6901
+ },
6903
6902
  "hardis:org:fix:listviewmine": {
6904
6903
  "aliases": [],
6905
6904
  "args": {},
@@ -9487,262 +9486,30 @@
9487
9486
  ],
9488
9487
  "aliasPermutations": [],
9489
9488
  "permutations": [
9490
- "hardis:project:audit:remotesites",
9491
- "project:hardis:audit:remotesites",
9492
- "project:audit:hardis:remotesites",
9493
- "project:audit:remotesites:hardis",
9494
- "hardis:audit:project:remotesites",
9495
- "audit:hardis:project:remotesites",
9496
- "audit:project:hardis:remotesites",
9497
- "audit:project:remotesites:hardis",
9498
- "hardis:audit:remotesites:project",
9499
- "audit:hardis:remotesites:project",
9500
- "audit:remotesites:hardis:project",
9501
- "audit:remotesites:project:hardis",
9502
- "hardis:project:remotesites:audit",
9503
- "project:hardis:remotesites:audit",
9504
- "project:remotesites:hardis:audit",
9505
- "project:remotesites:audit:hardis",
9506
- "hardis:remotesites:project:audit",
9507
- "remotesites:hardis:project:audit",
9508
- "remotesites:project:hardis:audit",
9509
- "remotesites:project:audit:hardis",
9510
- "hardis:remotesites:audit:project",
9511
- "remotesites:hardis:audit:project",
9512
- "remotesites:audit:hardis:project",
9513
- "remotesites:audit:project:hardis"
9514
- ]
9515
- },
9516
- "hardis:project:configure:auth": {
9517
- "aliases": [],
9518
- "args": {},
9519
- "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",
9520
- "examples": [
9521
- "$ sf hardis:project:configure:auth"
9522
- ],
9523
- "flags": {
9524
- "json": {
9525
- "description": "Format output as json.",
9526
- "helpGroup": "GLOBAL",
9527
- "name": "json",
9528
- "allowNo": false,
9529
- "type": "boolean"
9530
- },
9531
- "flags-dir": {
9532
- "helpGroup": "GLOBAL",
9533
- "name": "flags-dir",
9534
- "summary": "Import flag values from a directory.",
9535
- "hasDynamicHelp": false,
9536
- "multiple": false,
9537
- "type": "option"
9538
- },
9539
- "devhub": {
9540
- "char": "b",
9541
- "description": "Configure project DevHub",
9542
- "name": "devhub",
9543
- "allowNo": false,
9544
- "type": "boolean"
9545
- },
9546
- "debug": {
9547
- "char": "d",
9548
- "description": "Activate debug mode (more logs)",
9549
- "name": "debug",
9550
- "allowNo": false,
9551
- "type": "boolean"
9552
- },
9553
- "websocket": {
9554
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9555
- "name": "websocket",
9556
- "hasDynamicHelp": false,
9557
- "multiple": false,
9558
- "type": "option"
9559
- },
9560
- "skipauth": {
9561
- "description": "Skip authentication check when a default username is required",
9562
- "name": "skipauth",
9563
- "allowNo": false,
9564
- "type": "boolean"
9565
- },
9566
- "target-org": {
9567
- "aliases": [
9568
- "targetusername",
9569
- "u"
9570
- ],
9571
- "char": "o",
9572
- "deprecateAliases": true,
9573
- "name": "target-org",
9574
- "noCacheDefault": true,
9575
- "summary": "Username or alias of the target org.",
9576
- "hasDynamicHelp": true,
9577
- "multiple": false,
9578
- "type": "option"
9579
- },
9580
- "target-dev-hub": {
9581
- "aliases": [
9582
- "targetdevhubusername"
9583
- ],
9584
- "char": "v",
9585
- "deprecateAliases": true,
9586
- "name": "target-dev-hub",
9587
- "noCacheDefault": true,
9588
- "required": false,
9589
- "summary": "Username or alias of the Dev Hub org.",
9590
- "hasDynamicHelp": true,
9591
- "multiple": false,
9592
- "type": "option"
9593
- }
9594
- },
9595
- "hasDynamicHelp": true,
9596
- "hiddenAliases": [],
9597
- "id": "hardis:project:configure:auth",
9598
- "pluginAlias": "sfdx-hardis",
9599
- "pluginName": "sfdx-hardis",
9600
- "pluginType": "core",
9601
- "strict": true,
9602
- "enableJsonFlag": true,
9603
- "title": "Configure authentication",
9604
- "requiresProject": false,
9605
- "requiresDependencies": [
9606
- "openssl"
9607
- ],
9608
- "isESM": true,
9609
- "relativePath": [
9610
- "lib",
9611
- "commands",
9612
- "hardis",
9613
- "project",
9614
- "configure",
9615
- "auth.js"
9616
- ],
9617
- "aliasPermutations": [],
9618
- "permutations": [
9619
- "hardis:project:configure:auth",
9620
- "project:hardis:configure:auth",
9621
- "project:configure:hardis:auth",
9622
- "project:configure:auth:hardis",
9623
- "hardis:configure:project:auth",
9624
- "configure:hardis:project:auth",
9625
- "configure:project:hardis:auth",
9626
- "configure:project:auth:hardis",
9627
- "hardis:configure:auth:project",
9628
- "configure:hardis:auth:project",
9629
- "configure:auth:hardis:project",
9630
- "configure:auth:project:hardis",
9631
- "hardis:project:auth:configure",
9632
- "project:hardis:auth:configure",
9633
- "project:auth:hardis:configure",
9634
- "project:auth:configure:hardis",
9635
- "hardis:auth:project:configure",
9636
- "auth:hardis:project:configure",
9637
- "auth:project:hardis:configure",
9638
- "auth:project:configure:hardis",
9639
- "hardis:auth:configure:project",
9640
- "auth:hardis:configure:project",
9641
- "auth:configure:hardis:project",
9642
- "auth:configure:project:hardis"
9643
- ]
9644
- },
9645
- "hardis:project:convert:profilestopermsets": {
9646
- "aliases": [],
9647
- "args": {},
9648
- "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",
9649
- "examples": [
9650
- "$ sf hardis:project:convert:profilestopermsets"
9651
- ],
9652
- "flags": {
9653
- "json": {
9654
- "description": "Format output as json.",
9655
- "helpGroup": "GLOBAL",
9656
- "name": "json",
9657
- "allowNo": false,
9658
- "type": "boolean"
9659
- },
9660
- "flags-dir": {
9661
- "helpGroup": "GLOBAL",
9662
- "name": "flags-dir",
9663
- "summary": "Import flag values from a directory.",
9664
- "hasDynamicHelp": false,
9665
- "multiple": false,
9666
- "type": "option"
9667
- },
9668
- "except": {
9669
- "char": "e",
9670
- "description": "List of filters",
9671
- "name": "except",
9672
- "default": [],
9673
- "hasDynamicHelp": false,
9674
- "multiple": true,
9675
- "type": "option"
9676
- },
9677
- "debug": {
9678
- "char": "d",
9679
- "description": "Activate debug mode (more logs)",
9680
- "name": "debug",
9681
- "allowNo": false,
9682
- "type": "boolean"
9683
- },
9684
- "websocket": {
9685
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9686
- "name": "websocket",
9687
- "hasDynamicHelp": false,
9688
- "multiple": false,
9689
- "type": "option"
9690
- },
9691
- "skipauth": {
9692
- "description": "Skip authentication check when a default username is required",
9693
- "name": "skipauth",
9694
- "allowNo": false,
9695
- "type": "boolean"
9696
- }
9697
- },
9698
- "hasDynamicHelp": false,
9699
- "hiddenAliases": [],
9700
- "id": "hardis:project:convert:profilestopermsets",
9701
- "pluginAlias": "sfdx-hardis",
9702
- "pluginName": "sfdx-hardis",
9703
- "pluginType": "core",
9704
- "strict": true,
9705
- "enableJsonFlag": true,
9706
- "title": "Convert Profiles into Permission Sets",
9707
- "requiresProject": true,
9708
- "requiresSfdxPlugins": [
9709
- "shane-sfdx-plugins"
9710
- ],
9711
- "isESM": true,
9712
- "relativePath": [
9713
- "lib",
9714
- "commands",
9715
- "hardis",
9716
- "project",
9717
- "convert",
9718
- "profilestopermsets.js"
9719
- ],
9720
- "aliasPermutations": [],
9721
- "permutations": [
9722
- "hardis:project:convert:profilestopermsets",
9723
- "project:hardis:convert:profilestopermsets",
9724
- "project:convert:hardis:profilestopermsets",
9725
- "project:convert:profilestopermsets:hardis",
9726
- "hardis:convert:project:profilestopermsets",
9727
- "convert:hardis:project:profilestopermsets",
9728
- "convert:project:hardis:profilestopermsets",
9729
- "convert:project:profilestopermsets:hardis",
9730
- "hardis:convert:profilestopermsets:project",
9731
- "convert:hardis:profilestopermsets:project",
9732
- "convert:profilestopermsets:hardis:project",
9733
- "convert:profilestopermsets:project:hardis",
9734
- "hardis:project:profilestopermsets:convert",
9735
- "project:hardis:profilestopermsets:convert",
9736
- "project:profilestopermsets:hardis:convert",
9737
- "project:profilestopermsets:convert:hardis",
9738
- "hardis:profilestopermsets:project:convert",
9739
- "profilestopermsets:hardis:project:convert",
9740
- "profilestopermsets:project:hardis:convert",
9741
- "profilestopermsets:project:convert:hardis",
9742
- "hardis:profilestopermsets:convert:project",
9743
- "profilestopermsets:hardis:convert:project",
9744
- "profilestopermsets:convert:hardis:project",
9745
- "profilestopermsets:convert:project:hardis"
9489
+ "hardis:project:audit:remotesites",
9490
+ "project:hardis:audit:remotesites",
9491
+ "project:audit:hardis:remotesites",
9492
+ "project:audit:remotesites:hardis",
9493
+ "hardis:audit:project:remotesites",
9494
+ "audit:hardis:project:remotesites",
9495
+ "audit:project:hardis:remotesites",
9496
+ "audit:project:remotesites:hardis",
9497
+ "hardis:audit:remotesites:project",
9498
+ "audit:hardis:remotesites:project",
9499
+ "audit:remotesites:hardis:project",
9500
+ "audit:remotesites:project:hardis",
9501
+ "hardis:project:remotesites:audit",
9502
+ "project:hardis:remotesites:audit",
9503
+ "project:remotesites:hardis:audit",
9504
+ "project:remotesites:audit:hardis",
9505
+ "hardis:remotesites:project:audit",
9506
+ "remotesites:hardis:project:audit",
9507
+ "remotesites:project:hardis:audit",
9508
+ "remotesites:project:audit:hardis",
9509
+ "hardis:remotesites:audit:project",
9510
+ "remotesites:hardis:audit:project",
9511
+ "remotesites:audit:hardis:project",
9512
+ "remotesites:audit:project:hardis"
9746
9513
  ]
9747
9514
  },
9748
9515
  "hardis:project:clean:emptyitems": {
@@ -11230,6 +10997,238 @@
11230
10997
  "xml:clean:project:hardis"
11231
10998
  ]
11232
10999
  },
11000
+ "hardis:project:configure:auth": {
11001
+ "aliases": [],
11002
+ "args": {},
11003
+ "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",
11004
+ "examples": [
11005
+ "$ sf hardis:project:configure:auth"
11006
+ ],
11007
+ "flags": {
11008
+ "json": {
11009
+ "description": "Format output as json.",
11010
+ "helpGroup": "GLOBAL",
11011
+ "name": "json",
11012
+ "allowNo": false,
11013
+ "type": "boolean"
11014
+ },
11015
+ "flags-dir": {
11016
+ "helpGroup": "GLOBAL",
11017
+ "name": "flags-dir",
11018
+ "summary": "Import flag values from a directory.",
11019
+ "hasDynamicHelp": false,
11020
+ "multiple": false,
11021
+ "type": "option"
11022
+ },
11023
+ "devhub": {
11024
+ "char": "b",
11025
+ "description": "Configure project DevHub",
11026
+ "name": "devhub",
11027
+ "allowNo": false,
11028
+ "type": "boolean"
11029
+ },
11030
+ "debug": {
11031
+ "char": "d",
11032
+ "description": "Activate debug mode (more logs)",
11033
+ "name": "debug",
11034
+ "allowNo": false,
11035
+ "type": "boolean"
11036
+ },
11037
+ "websocket": {
11038
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11039
+ "name": "websocket",
11040
+ "hasDynamicHelp": false,
11041
+ "multiple": false,
11042
+ "type": "option"
11043
+ },
11044
+ "skipauth": {
11045
+ "description": "Skip authentication check when a default username is required",
11046
+ "name": "skipauth",
11047
+ "allowNo": false,
11048
+ "type": "boolean"
11049
+ },
11050
+ "target-org": {
11051
+ "aliases": [
11052
+ "targetusername",
11053
+ "u"
11054
+ ],
11055
+ "char": "o",
11056
+ "deprecateAliases": true,
11057
+ "name": "target-org",
11058
+ "noCacheDefault": true,
11059
+ "summary": "Username or alias of the target org.",
11060
+ "hasDynamicHelp": true,
11061
+ "multiple": false,
11062
+ "type": "option"
11063
+ },
11064
+ "target-dev-hub": {
11065
+ "aliases": [
11066
+ "targetdevhubusername"
11067
+ ],
11068
+ "char": "v",
11069
+ "deprecateAliases": true,
11070
+ "name": "target-dev-hub",
11071
+ "noCacheDefault": true,
11072
+ "required": false,
11073
+ "summary": "Username or alias of the Dev Hub org.",
11074
+ "hasDynamicHelp": true,
11075
+ "multiple": false,
11076
+ "type": "option"
11077
+ }
11078
+ },
11079
+ "hasDynamicHelp": true,
11080
+ "hiddenAliases": [],
11081
+ "id": "hardis:project:configure:auth",
11082
+ "pluginAlias": "sfdx-hardis",
11083
+ "pluginName": "sfdx-hardis",
11084
+ "pluginType": "core",
11085
+ "strict": true,
11086
+ "enableJsonFlag": true,
11087
+ "title": "Configure authentication",
11088
+ "requiresProject": false,
11089
+ "requiresDependencies": [
11090
+ "openssl"
11091
+ ],
11092
+ "isESM": true,
11093
+ "relativePath": [
11094
+ "lib",
11095
+ "commands",
11096
+ "hardis",
11097
+ "project",
11098
+ "configure",
11099
+ "auth.js"
11100
+ ],
11101
+ "aliasPermutations": [],
11102
+ "permutations": [
11103
+ "hardis:project:configure:auth",
11104
+ "project:hardis:configure:auth",
11105
+ "project:configure:hardis:auth",
11106
+ "project:configure:auth:hardis",
11107
+ "hardis:configure:project:auth",
11108
+ "configure:hardis:project:auth",
11109
+ "configure:project:hardis:auth",
11110
+ "configure:project:auth:hardis",
11111
+ "hardis:configure:auth:project",
11112
+ "configure:hardis:auth:project",
11113
+ "configure:auth:hardis:project",
11114
+ "configure:auth:project:hardis",
11115
+ "hardis:project:auth:configure",
11116
+ "project:hardis:auth:configure",
11117
+ "project:auth:hardis:configure",
11118
+ "project:auth:configure:hardis",
11119
+ "hardis:auth:project:configure",
11120
+ "auth:hardis:project:configure",
11121
+ "auth:project:hardis:configure",
11122
+ "auth:project:configure:hardis",
11123
+ "hardis:auth:configure:project",
11124
+ "auth:hardis:configure:project",
11125
+ "auth:configure:hardis:project",
11126
+ "auth:configure:project:hardis"
11127
+ ]
11128
+ },
11129
+ "hardis:project:convert:profilestopermsets": {
11130
+ "aliases": [],
11131
+ "args": {},
11132
+ "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",
11133
+ "examples": [
11134
+ "$ sf hardis:project:convert:profilestopermsets"
11135
+ ],
11136
+ "flags": {
11137
+ "json": {
11138
+ "description": "Format output as json.",
11139
+ "helpGroup": "GLOBAL",
11140
+ "name": "json",
11141
+ "allowNo": false,
11142
+ "type": "boolean"
11143
+ },
11144
+ "flags-dir": {
11145
+ "helpGroup": "GLOBAL",
11146
+ "name": "flags-dir",
11147
+ "summary": "Import flag values from a directory.",
11148
+ "hasDynamicHelp": false,
11149
+ "multiple": false,
11150
+ "type": "option"
11151
+ },
11152
+ "except": {
11153
+ "char": "e",
11154
+ "description": "List of filters",
11155
+ "name": "except",
11156
+ "default": [],
11157
+ "hasDynamicHelp": false,
11158
+ "multiple": true,
11159
+ "type": "option"
11160
+ },
11161
+ "debug": {
11162
+ "char": "d",
11163
+ "description": "Activate debug mode (more logs)",
11164
+ "name": "debug",
11165
+ "allowNo": false,
11166
+ "type": "boolean"
11167
+ },
11168
+ "websocket": {
11169
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11170
+ "name": "websocket",
11171
+ "hasDynamicHelp": false,
11172
+ "multiple": false,
11173
+ "type": "option"
11174
+ },
11175
+ "skipauth": {
11176
+ "description": "Skip authentication check when a default username is required",
11177
+ "name": "skipauth",
11178
+ "allowNo": false,
11179
+ "type": "boolean"
11180
+ }
11181
+ },
11182
+ "hasDynamicHelp": false,
11183
+ "hiddenAliases": [],
11184
+ "id": "hardis:project:convert:profilestopermsets",
11185
+ "pluginAlias": "sfdx-hardis",
11186
+ "pluginName": "sfdx-hardis",
11187
+ "pluginType": "core",
11188
+ "strict": true,
11189
+ "enableJsonFlag": true,
11190
+ "title": "Convert Profiles into Permission Sets",
11191
+ "requiresProject": true,
11192
+ "requiresSfdxPlugins": [
11193
+ "shane-sfdx-plugins"
11194
+ ],
11195
+ "isESM": true,
11196
+ "relativePath": [
11197
+ "lib",
11198
+ "commands",
11199
+ "hardis",
11200
+ "project",
11201
+ "convert",
11202
+ "profilestopermsets.js"
11203
+ ],
11204
+ "aliasPermutations": [],
11205
+ "permutations": [
11206
+ "hardis:project:convert:profilestopermsets",
11207
+ "project:hardis:convert:profilestopermsets",
11208
+ "project:convert:hardis:profilestopermsets",
11209
+ "project:convert:profilestopermsets:hardis",
11210
+ "hardis:convert:project:profilestopermsets",
11211
+ "convert:hardis:project:profilestopermsets",
11212
+ "convert:project:hardis:profilestopermsets",
11213
+ "convert:project:profilestopermsets:hardis",
11214
+ "hardis:convert:profilestopermsets:project",
11215
+ "convert:hardis:profilestopermsets:project",
11216
+ "convert:profilestopermsets:hardis:project",
11217
+ "convert:profilestopermsets:project:hardis",
11218
+ "hardis:project:profilestopermsets:convert",
11219
+ "project:hardis:profilestopermsets:convert",
11220
+ "project:profilestopermsets:hardis:convert",
11221
+ "project:profilestopermsets:convert:hardis",
11222
+ "hardis:profilestopermsets:project:convert",
11223
+ "profilestopermsets:hardis:project:convert",
11224
+ "profilestopermsets:project:hardis:convert",
11225
+ "profilestopermsets:project:convert:hardis",
11226
+ "hardis:profilestopermsets:convert:project",
11227
+ "profilestopermsets:hardis:convert:project",
11228
+ "profilestopermsets:convert:hardis:project",
11229
+ "profilestopermsets:convert:project:hardis"
11230
+ ]
11231
+ },
11233
11232
  "hardis:project:deploy:notify": {
11234
11233
  "aliases": [],
11235
11234
  "args": {},
@@ -15102,5 +15101,5 @@
15102
15101
  ]
15103
15102
  }
15104
15103
  },
15105
- "version": "6.1.1"
15104
+ "version": "6.1.2"
15106
15105
  }