sfdx-hardis 6.7.3 → 6.7.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.
Files changed (157) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/lib/commands/hardis/cache/clear.js +2 -2
  3. package/lib/commands/hardis/cache/clear.js.map +1 -1
  4. package/lib/commands/hardis/doc/extract/permsetgroups.js +8 -8
  5. package/lib/commands/hardis/doc/extract/permsetgroups.js.map +1 -1
  6. package/lib/commands/hardis/doc/fieldusage.js +5 -5
  7. package/lib/commands/hardis/doc/fieldusage.js.map +1 -1
  8. package/lib/commands/hardis/doc/flow2markdown.js +3 -3
  9. package/lib/commands/hardis/doc/flow2markdown.js.map +1 -1
  10. package/lib/commands/hardis/doc/mkdocs-to-cf.js +10 -10
  11. package/lib/commands/hardis/doc/mkdocs-to-cf.js.map +1 -1
  12. package/lib/commands/hardis/doc/mkdocs-to-salesforce.js +16 -17
  13. package/lib/commands/hardis/doc/mkdocs-to-salesforce.js.map +1 -1
  14. package/lib/commands/hardis/doc/override-prompts.js +7 -7
  15. package/lib/commands/hardis/doc/override-prompts.js.map +1 -1
  16. package/lib/commands/hardis/doc/packagexml2markdown.js +1 -1
  17. package/lib/commands/hardis/doc/packagexml2markdown.js.map +1 -1
  18. package/lib/commands/hardis/doc/plugin/generate.js +3 -3
  19. package/lib/commands/hardis/doc/plugin/generate.js.map +1 -1
  20. package/lib/commands/hardis/doc/project2markdown.js +7 -7
  21. package/lib/commands/hardis/doc/project2markdown.js.map +1 -1
  22. package/lib/commands/hardis/git/pull-requests/extract.js +4 -4
  23. package/lib/commands/hardis/git/pull-requests/extract.js.map +1 -1
  24. package/lib/commands/hardis/lint/access.js +4 -4
  25. package/lib/commands/hardis/lint/access.js.map +1 -1
  26. package/lib/commands/hardis/lint/metadatastatus.js +2 -2
  27. package/lib/commands/hardis/lint/metadatastatus.js.map +1 -1
  28. package/lib/commands/hardis/lint/missingattributes.js +3 -3
  29. package/lib/commands/hardis/lint/missingattributes.js.map +1 -1
  30. package/lib/commands/hardis/lint/unusedmetadatas.js +2 -2
  31. package/lib/commands/hardis/lint/unusedmetadatas.js.map +1 -1
  32. package/lib/commands/hardis/mdapi/deploy.js +1 -1
  33. package/lib/commands/hardis/mdapi/deploy.js.map +1 -1
  34. package/lib/commands/hardis/misc/custom-label-translations.js +7 -7
  35. package/lib/commands/hardis/misc/custom-label-translations.js.map +1 -1
  36. package/lib/commands/hardis/misc/purge-references.js +5 -5
  37. package/lib/commands/hardis/misc/purge-references.js.map +1 -1
  38. package/lib/commands/hardis/misc/servicenow-report.js +2 -2
  39. package/lib/commands/hardis/misc/servicenow-report.js.map +1 -1
  40. package/lib/commands/hardis/misc/toml2csv.js +1 -1
  41. package/lib/commands/hardis/misc/toml2csv.js.map +1 -1
  42. package/lib/commands/hardis/org/community/update.js +4 -4
  43. package/lib/commands/hardis/org/community/update.js.map +1 -1
  44. package/lib/commands/hardis/org/configure/data.js +4 -4
  45. package/lib/commands/hardis/org/configure/data.js.map +1 -1
  46. package/lib/commands/hardis/org/configure/files.js +2 -2
  47. package/lib/commands/hardis/org/configure/files.js.map +1 -1
  48. package/lib/commands/hardis/org/configure/monitoring.js +5 -5
  49. package/lib/commands/hardis/org/configure/monitoring.js.map +1 -1
  50. package/lib/commands/hardis/org/connect.js +2 -2
  51. package/lib/commands/hardis/org/connect.js.map +1 -1
  52. package/lib/commands/hardis/org/create.js +1 -1
  53. package/lib/commands/hardis/org/create.js.map +1 -1
  54. package/lib/commands/hardis/org/diagnose/legacyapi.js +1 -1
  55. package/lib/commands/hardis/org/diagnose/legacyapi.js.map +1 -1
  56. package/lib/commands/hardis/org/diagnose/unused-apex-classes.js +2 -2
  57. package/lib/commands/hardis/org/diagnose/unusedlicenses.js +1 -1
  58. package/lib/commands/hardis/org/files/export.js +2 -2
  59. package/lib/commands/hardis/org/files/export.js.map +1 -1
  60. package/lib/commands/hardis/org/files/import.js +2 -2
  61. package/lib/commands/hardis/org/files/import.js.map +1 -1
  62. package/lib/commands/hardis/org/monitor/backup.js +1 -1
  63. package/lib/commands/hardis/org/multi-org-query.js +1 -1
  64. package/lib/commands/hardis/org/purge/flow.js +4 -4
  65. package/lib/commands/hardis/org/purge/flow.js.map +1 -1
  66. package/lib/commands/hardis/org/refresh/after-refresh.js +11 -11
  67. package/lib/commands/hardis/org/refresh/after-refresh.js.map +1 -1
  68. package/lib/commands/hardis/org/refresh/before-refresh.js +1 -1
  69. package/lib/commands/hardis/org/retrieve/sources/dx.js +1 -1
  70. package/lib/commands/hardis/org/retrieve/sources/dx.js.map +1 -1
  71. package/lib/commands/hardis/org/user/activateinvalid.js +1 -1
  72. package/lib/commands/hardis/org/user/activateinvalid.js.map +1 -1
  73. package/lib/commands/hardis/org/user/freeze.js +2 -2
  74. package/lib/commands/hardis/org/user/freeze.js.map +1 -1
  75. package/lib/commands/hardis/org/user/unfreeze.js +1 -1
  76. package/lib/commands/hardis/org/user/unfreeze.js.map +1 -1
  77. package/lib/commands/hardis/package/mergexml.js +1 -1
  78. package/lib/commands/hardis/package/mergexml.js.map +1 -1
  79. package/lib/commands/hardis/project/configure/auth.js +1 -1
  80. package/lib/commands/hardis/project/configure/auth.js.map +1 -1
  81. package/lib/commands/hardis/project/create.js +1 -1
  82. package/lib/commands/hardis/project/create.js.map +1 -1
  83. package/lib/commands/hardis/project/deploy/notify.js +1 -1
  84. package/lib/commands/hardis/project/deploy/simulate.js +1 -1
  85. package/lib/commands/hardis/project/deploy/simulate.js.map +1 -1
  86. package/lib/commands/hardis/project/deploy/smart.js +4 -4
  87. package/lib/commands/hardis/project/deploy/sources/metadata.js +1 -1
  88. package/lib/commands/hardis/project/generate/flow-git-diff.js +1 -1
  89. package/lib/commands/hardis/project/generate/flow-git-diff.js.map +1 -1
  90. package/lib/commands/hardis/project/metadata/activate-decomposed.js +1 -1
  91. package/lib/commands/hardis/project/metadata/activate-decomposed.js.map +1 -1
  92. package/lib/commands/hardis/scratch/create.js +2 -2
  93. package/lib/commands/hardis/scratch/create.js.map +1 -1
  94. package/lib/commands/hardis/scratch/pull.js +2 -2
  95. package/lib/commands/hardis/scratch/pull.js.map +1 -1
  96. package/lib/commands/hardis/source/retrieve.js +1 -1
  97. package/lib/commands/hardis/work/new.js +34 -34
  98. package/lib/commands/hardis/work/new.js.map +1 -1
  99. package/lib/commands/hardis/work/refresh.js +1 -1
  100. package/lib/commands/hardis/work/resetselection.js +1 -1
  101. package/lib/commands/hardis/work/resetselection.js.map +1 -1
  102. package/lib/commands/hardis/work/save.js +55 -25
  103. package/lib/commands/hardis/work/save.js.map +1 -1
  104. package/lib/commands/hardis/work/ws.js +1 -1
  105. package/lib/common/aiProvider/index.js +1 -1
  106. package/lib/common/docBuilder/docBuilderRoot.js +1 -1
  107. package/lib/common/gitProvider/index.js +2 -2
  108. package/lib/common/gitProvider/utilsMarkdown.js +2 -2
  109. package/lib/common/metadata-utils/index.js +1 -1
  110. package/lib/common/metadata-utils/index.js.map +1 -1
  111. package/lib/common/ticketProvider/index.js +1 -1
  112. package/lib/common/utils/authUtils.js +3 -3
  113. package/lib/common/utils/authUtils.js.map +1 -1
  114. package/lib/common/utils/deployTipJson.js +2 -2
  115. package/lib/common/utils/deployTips.js +1 -1
  116. package/lib/common/utils/deployTipsList.js +1 -1
  117. package/lib/common/utils/deployUtils.js +7 -7
  118. package/lib/common/utils/deployUtils.js.map +1 -1
  119. package/lib/common/utils/filesUtils.js +5 -5
  120. package/lib/common/utils/filesUtils.js.map +1 -1
  121. package/lib/common/utils/flowVisualiser/flowParser.js +2 -2
  122. package/lib/common/utils/flowVisualiser/flowParser.js.map +1 -1
  123. package/lib/common/utils/gitUtils.js +1 -1
  124. package/lib/common/utils/gitUtils.js.map +1 -1
  125. package/lib/common/utils/index.js +15 -15
  126. package/lib/common/utils/index.js.map +1 -1
  127. package/lib/common/utils/markdownUtils.js +1 -1
  128. package/lib/common/utils/markdownUtils.js.map +1 -1
  129. package/lib/common/utils/mermaidUtils.js +6 -6
  130. package/lib/common/utils/mermaidUtils.js.map +1 -1
  131. package/lib/common/utils/notifUtils.js +1 -1
  132. package/lib/common/utils/orgConfigUtils.js +2 -2
  133. package/lib/common/utils/orgConfigUtils.js.map +1 -1
  134. package/lib/common/utils/orgUtils.js +7 -7
  135. package/lib/common/utils/orgUtils.js.map +1 -1
  136. package/lib/common/utils/poolUtils.js +6 -6
  137. package/lib/common/utils/poolUtils.js.map +1 -1
  138. package/lib/common/utils/prompts.js +4 -4
  139. package/lib/common/utils/prompts.js.map +1 -1
  140. package/lib/common/utils/refresh/connectedAppUtils.js +20 -20
  141. package/lib/common/utils/refresh/connectedAppUtils.js.map +1 -1
  142. package/lib/common/utils/wrapUtils.js +1 -1
  143. package/lib/common/utils/wrapUtils.js.map +1 -1
  144. package/lib/common/utils/xmlUtils.js +6 -6
  145. package/lib/common/utils/xmlUtils.js.map +1 -1
  146. package/lib/common/websocketClient.js +6 -6
  147. package/lib/common/websocketClient.js.map +1 -1
  148. package/lib/config/index.js +1 -1
  149. package/lib/config/index.js.map +1 -1
  150. package/lib/hooks/finally/notify.js +3 -3
  151. package/lib/hooks/finally/notify.js.map +1 -1
  152. package/lib/hooks/init/start-ws-client.js +1 -1
  153. package/lib/hooks/init/start-ws-client.js.map +1 -1
  154. package/lib/hooks/prerun/check-dependencies.js +6 -6
  155. package/lib/hooks/prerun/check-dependencies.js.map +1 -1
  156. package/oclif.manifest.json +643 -643
  157. package/package.json +1 -1
@@ -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 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 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": {
@@ -863,7 +863,7 @@
863
863
  "hardis:doc:project2markdown": {
864
864
  "aliases": [],
865
865
  "args": {},
866
- "description": "Generates a markdown documentation from a SFDX project\n\n- Objects (with fields, validation rules, relationships and dependencies)\n- Automations\n - Approval Processes\n - Assignment Rules\n - AutoResponse Rules\n - Escalation Rules\n - Flows\n- Authorizations\n - Profiles\n - Permission Set Groups\n - Permission Sets\n- Code\n - Apex\n - Lightning Web Components\n- Lightning Pages\n- Packages\n- SFDX-Hardis Config\n- Branches & Orgs\n- Manifests\n\nCan work on any sfdx project, no need for it to be a sfdx-hardis flavored one.\n\nGenerates markdown files will be written in **docs** folder (except README.md where a link to doc index is added)\n\n- You can customize the pages following [mkdocs-material setup documentation](https://squidfunk.github.io/mkdocs-material/setup/)\n- You can manually add new markdown files in the \"docs\" folder to extend this documentation and add references to them in \"mkdocs.yml\"\n- You can also add images in folder \"docs/assets\" and embed them in markdown files.\n\nTo read Flow documentations if your markdown reader doesn't handle MermaidJS syntax, this command could require @mermaid-js/mermaid-cli\n\n- Run `npm install @mermaid-js/mermaid-cli --global` if puppeteer works in your environment\n- It can also be run as a docker image\n\nBoth modes will be tried by default, but you can also force one of them by defining environment variable `MERMAID_MODES=docker` or `MERMAID_MODES=cli`\n\n_sfdx-hardis docker image is alpine-based and does not succeed to run mermaid/puppeteer: if you can help, please submit a PR !_\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n\n![Screenshot flow doc](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-flow-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc-2.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-object-diagram.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc-profile.gif)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-doc-apex.png)\n\nIf it is a sfdx-hardis CI/CD project, a diagram of the branches and orgs strategy will be generated.\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-doc-branches-strategy.jpg)\n\nIf [AI integration](https://sfdx-hardis.cloudity.com/salesforce-ai-setup/) is configured, documentation will contain a summary of the Flow.\n\n- Use variable PROMPTS_LANGUAGE (ex: PROMPTS_LANGUAGE=fr) to force language for LLM calls (default:en)\n\nIf you have a complex strategy, you might need to input property **mergeTargets** in branch-scoped sfdx-hardis.yml file to have a correct diagram.\n\nDefine DO_NOT_OVERWRITE_INDEX_MD=true to avoid overwriting the index.md file in docs folder, useful if you want to keep your own index.md file.\n\n## Doc HTML Pages\n\nTo read the documentation as HTML pages, run the following code (you need [**Python**](https://www.python.org/downloads/) on your computer)\n\n```python\npip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists || python -m pip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists || py -m pip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists\nmkdocs serve -v || python -m mkdocs serve -v || py -m mkdocs serve -v\n```\n\nTo just generate HTML pages that you can host anywhere, run `mkdocs build -v || python -m mkdocs build -v || py -m mkdocs build -v`\n\n",
866
+ "description": "Generates Markdown documentation from a SFDX project\n\n- Objects (with fields, validation rules, relationships and dependencies)\n- Automations\n - Approval Processes\n - Assignment Rules\n - AutoResponse Rules\n - Escalation Rules\n - Flows\n- Authorizations\n - Profiles\n - Permission Set Groups\n - Permission Sets\n- Code\n - Apex\n - Lightning Web Components\n- Lightning Pages\n- Packages\n- SFDX-Hardis Config\n- Branches & Orgs\n- Manifests\n\nCan work on any sfdx project, no need for it to be a sfdx-hardis flavored one.\n\nGenerated markdown files will be written in the **docs** folder (except README.md, where a link to the doc index is added).\n\n- You can customize the pages following [mkdocs-material setup documentation](https://squidfunk.github.io/mkdocs-material/setup/)\n- You can manually add new markdown files in the \"docs\" folder to extend this documentation and add references to them in \"mkdocs.yml\"\n- You can also add images in folder \"docs/assets\" and embed them in markdown files.\n\nTo read flow documentation, if your markdown reader doesn't handle MermaidJS syntax this command may require @mermaid-js/mermaid-cli.\n\n- Run `npm install @mermaid-js/mermaid-cli --global` if puppeteer works in your environment\n- It can also be run as a docker image\n\nBoth modes will be tried by default, but you can also force one of them by defining environment variable `MERMAID_MODES=docker` or `MERMAID_MODES=cli`\n\n_sfdx-hardis docker image is alpine-based and does not succeed to run mermaid/puppeteer: if you can help, please submit a PR !_\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n\n![Screenshot flow doc](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-flow-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc-2.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-object-diagram.jpg)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-project-doc-profile.gif)\n\n![Screenshot project documentation](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-doc-apex.png)\n\nIf it is a sfdx-hardis CI/CD project, a diagram of the branches and orgs strategy will be generated.\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-doc-branches-strategy.jpg)\n\nIf [AI integration](https://sfdx-hardis.cloudity.com/salesforce-ai-setup/) is configured, documentation will contain a summary of the Flow.\n\n- Use variable PROMPTS_LANGUAGE (ex: PROMPTS_LANGUAGE=fr) to force language for LLM calls (default:en)\n\nIf you have a complex strategy, you might need to input property **mergeTargets** in branch-scoped sfdx-hardis.yml file to have a correct diagram.\n\nDefine DO_NOT_OVERWRITE_INDEX_MD=true to avoid overwriting the index.md file in docs folder, useful if you want to keep your own index.md file.\n\n## Doc HTML Pages\n\nTo read the documentation as HTML pages, run the following code (you need [**Python**](https://www.python.org/downloads/) on your computer)\n\n```python\npip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists || python -m pip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists || py -m pip install mkdocs-material mkdocs-exclude-search mdx_truly_sane_lists\nmkdocs serve -v || python -m mkdocs serve -v || py -m mkdocs serve -v\n```\n\nTo just generate HTML pages that you can host anywhere, run `mkdocs build -v || python -m mkdocs build -v || py -m mkdocs build -v`\n\n",
867
867
  "examples": [
868
868
  "$ sf hardis:doc:project2markdown",
869
869
  "$ sf hardis:doc:project2markdown --with-history",
@@ -1105,9 +1105,9 @@
1105
1105
  }
1106
1106
  ],
1107
1107
  "messages": {
1108
- "header": "Check if elements(apex class and field) are at least in one permission set",
1109
- "allElementsHaveRights": "All elements are included in at least one Permission set or Profile",
1110
- "someElementsDontHaveRights": "Some elements are not included in at least one Permission set or Profile"
1108
+ "header": "Check if elements (Apex classes and custom fields) are included in at least one Permission Set or Profile.",
1109
+ "allElementsHaveRights": "All elements are included in at least one Permission Set or Profile.",
1110
+ "someElementsDontHaveRights": "Some elements are not included in any Permission Set or Profile."
1111
1111
  },
1112
1112
  "isESM": true,
1113
1113
  "relativePath": [
@@ -2181,7 +2181,7 @@
2181
2181
  "hardis:org:multi-org-query": {
2182
2182
  "aliases": [],
2183
2183
  "args": {},
2184
- "description": "\n**Executes a SOQL query across multiple Salesforce organizations and consolidates the results into a single report.**\n\nThis command is highly valuable for administrators and developers who need to gather consistent data from various Salesforce environments (e.g., sandboxes, production orgs) for reporting, auditing, or comparison purposes. It streamlines the process of querying multiple orgs, eliminating the need to log into each one individually.\n\nKey functionalities:\n\n- **Flexible Query Input:** You can provide a custom SOQL query directly using the `--query` flag, or select from a list of predefined query templates (e.g., `active-users`, `all-users`) using the `--query-template` flag.\n- **Multiple Org Targeting:** Specify a list of Salesforce org usernames or aliases using the `--target-orgs` flag. If not provided, an interactive menu will allow you to select multiple authenticated orgs.\n- **Consolidated Report:** All query results from the different orgs are combined into a single CSV file, making data analysis and comparison straightforward.\n- **Authentication Handling:** For CI/CD jobs, ensure that the target orgs are already authenticated using Salesforce CLI. In interactive mode, it will prompt for authentication if an org is not connected.\n\n**Visual Demo:**\n\n[![Use in VsCode SFDX Hardis !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/multi-org-query-demo.gif)](https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-sfdx-hardis)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Org Authentication and Connection:** It uses `AuthInfo.create` and `Connection.create` to establish connections to each target Salesforce org. It also leverages `makeSureOrgIsConnected` and `promptOrgList` for interactive org selection and authentication checks.\n- **SOQL Query Execution (Bulk API):** It executes the specified SOQL query against each connected org using `bulkQuery` for efficient data retrieval, especially for large datasets.\n- **Data Aggregation:** It collects the records from each org's query result and adds metadata about the source org (instance URL, alias, username) to each record, enabling easy identification of data origin in the consolidated report.\n- **Report Generation:** It uses `generateCsvFile` to create the final CSV report and `generateReportPath` to determine the output file location.\n- **Interactive Prompts:** The `prompts` library is used to guide the user through selecting a query template or entering a custom query, and for selecting target orgs if not provided as command-line arguments.\n- **Error Handling:** It logs errors for any orgs where the query fails, ensuring that the overall process continues and provides a clear summary of successes and failures.\n</details>\n",
2184
+ "description": "\n**Executes a SOQL query across multiple Salesforce organizations and consolidates the results into a single report.**\n\nThis command is highly valuable for administrators and developers who need to gather consistent data from various Salesforce environments (e.g., sandboxes, production orgs) for reporting, auditing, or comparison purposes. It streamlines the process of querying multiple orgs, eliminating the need to log into each one individually.\n\nKey functionalities:\n\n- **Flexible Query Input:** You can provide a custom SOQL query directly using the `--query` flag, or select from a list of predefined query templates (e.g., `active-users`, `all-users`) using the `--query-template` flag.\n- **Multiple Org Targeting:** Specify a list of Salesforce org usernames or aliases using the `--target-orgs` flag. If not provided, an interactive menu will allow you to select multiple authenticated orgs.\n- **Consolidated Report:** All query results from the different orgs are combined into a single CSV file, making data analysis and comparison straightforward.\n- **Authentication Handling:** For CI/CD jobs, ensure that the target orgs are already authenticated using Salesforce CLI. In interactive mode, it will prompt for authentication if an org is not connected.\n\n**Visual Demo:**\n\n[![Use in VS Code SFDX Hardis !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/multi-org-query-demo.gif)](https://marketplace.visualstudio.com/items?itemName=NicolasVuillamy.vscode-sfdx-hardis)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Org Authentication and Connection:** It uses `AuthInfo.create` and `Connection.create` to establish connections to each target Salesforce org. It also leverages `makeSureOrgIsConnected` and `promptOrgList` for interactive org selection and authentication checks.\n- **SOQL Query Execution (Bulk API):** It executes the specified SOQL query against each connected org using `bulkQuery` for efficient data retrieval, especially for large datasets.\n- **Data Aggregation:** It collects the records from each org's query result and adds metadata about the source org (instance URL, alias, username) to each record, enabling easy identification of data origin in the consolidated report.\n- **Report Generation:** It uses `generateCsvFile` to create the final CSV report and `generateReportPath` to determine the output file location.\n- **Interactive Prompts:** The `prompts` library is used to guide the user through selecting a query template or entering a custom query, and for selecting target orgs if not provided as command-line arguments.\n- **Error Handling:** It logs errors for any orgs where the query fails, ensuring that the overall process continues and provides a clear summary of successes and failures.\n</details>\n",
2185
2185
  "examples": [
2186
2186
  "$ sf hardis:org:multi-org-query",
2187
2187
  "$ sf hardis:org:multi-org-query --query \"SELECT Id,Username FROM User\"",
@@ -4341,7 +4341,7 @@
4341
4341
  "hardis:work:ws": {
4342
4342
  "aliases": [],
4343
4343
  "args": {},
4344
- "description": "\n## Command Behavior\n\n**Performs technical operations related to WebSocket communication, primarily for internal use by the sfdx-hardis VS Code Extension.**\n\nThis command is not intended for direct end-user interaction. It facilitates communication between the sfdx-hardis CLI and the VS Code Extension, enabling features like real-time status updates and plugin refreshes.\n\nKey functionalities:\n\n- **Refresh Status (`--event refreshStatus`):** Sends a message to the VS Code Extension to refresh its displayed status, ensuring that the UI reflects the latest state of Salesforce orgs or project activities.\n- **Refresh Plugins (`--event refreshPlugins`):** Sends a message to the VS Code Extension to refresh its loaded plugins, useful after installing or updating sfdx-hardis or other related extensions.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **WebSocketClient:** It utilizes the `WebSocketClient` utility to establish and manage WebSocket connections.\n- **Event-Driven Communication:** It listens for specific events (e.g., `refreshStatus`, `refreshPlugins`) and triggers corresponding actions on the connected WebSocket client.\n- **Internal Use:** This command is primarily called programmatically by the VS Code Extension to maintain synchronization and provide a seamless user experience.\n</details>\n",
4344
+ "description": "\n## Command Behavior\n\n**Performs technical operations related to WebSocket communication, primarily for internal use by the sfdx-hardis VS Code extension.**\n\nThis command is not intended for direct end-user interaction. It facilitates communication between the sfdx-hardis CLI and the VS Code Extension, enabling features like real-time status updates and plugin refreshes.\n\nKey functionalities:\n\n- **Refresh Status (`--event refreshStatus`):** Sends a message to the VS Code Extension to refresh its displayed status, ensuring that the UI reflects the latest state of Salesforce orgs or project activities.\n- **Refresh Plugins (`--event refreshPlugins`):** Sends a message to the VS Code Extension to refresh its loaded plugins, useful after installing or updating sfdx-hardis or other related extensions.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **WebSocketClient:** It utilizes the `WebSocketClient` utility to establish and manage WebSocket connections.\n- **Event-Driven Communication:** It listens for specific events (e.g., `refreshStatus`, `refreshPlugins`) and triggers corresponding actions on the connected WebSocket client.\n- **Internal Use:** This command is primarily called programmatically by the VS Code Extension to maintain synchronization and provide a seamless user experience.\n</details>\n",
4345
4345
  "examples": [
4346
4346
  "$ sf hardis:work:ws --event refreshStatus"
4347
4347
  ],
@@ -5538,12 +5538,15 @@
5538
5538
  "import:data:org:hardis"
5539
5539
  ]
5540
5540
  },
5541
- "hardis:org:files:export": {
5541
+ "hardis:org:diagnose:audittrail": {
5542
5542
  "aliases": [],
5543
5543
  "args": {},
5544
- "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",
5544
+ "description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nAlso detects updates of Custom Settings values (disable by defining `SKIP_AUDIT_TRAIL_CUSTOM_SETTINGS=true`)\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n - revokeduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n - CSPUserDisabled\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- External Objects\n - xdsEncryptedFieldChange\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n - siqUserAcceptedTOS\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedofflineuseroffon\n - changedprofileforuserstdtostd\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserAdminVerifiedStatusVerified\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedusername\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - changedUserPhoneVerifiedStatusVerified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suNetworkAdminLogin\n - suNetworkAdminLogout\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\n## Excel output example\n\n![](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",
5545
5545
  "examples": [
5546
- "$ sf hardis:org:files:export"
5546
+ "$ sf hardis:org:diagnose:audittrail",
5547
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5548
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5549
+ "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5547
5550
  ],
5548
5551
  "flags": {
5549
5552
  "json": {
@@ -5561,48 +5564,30 @@
5561
5564
  "multiple": false,
5562
5565
  "type": "option"
5563
5566
  },
5564
- "path": {
5565
- "char": "p",
5566
- "description": "Path to the file export project",
5567
- "name": "path",
5568
- "hasDynamicHelp": false,
5569
- "multiple": false,
5570
- "type": "option"
5571
- },
5572
- "chunksize": {
5573
- "char": "c",
5574
- "description": "Number of records to add in a chunk before it is processed",
5575
- "name": "chunksize",
5576
- "default": 1000,
5567
+ "excludeusers": {
5568
+ "char": "e",
5569
+ "description": "Comma-separated list of usernames to exclude",
5570
+ "name": "excludeusers",
5577
5571
  "hasDynamicHelp": false,
5578
5572
  "multiple": false,
5579
5573
  "type": "option"
5580
5574
  },
5581
- "polltimeout": {
5575
+ "lastndays": {
5582
5576
  "char": "t",
5583
- "description": "Timeout in MS for Bulk API calls",
5584
- "name": "polltimeout",
5585
- "default": 300000,
5577
+ "description": "Number of days to extract from today (included)",
5578
+ "name": "lastndays",
5586
5579
  "hasDynamicHelp": false,
5587
5580
  "multiple": false,
5588
5581
  "type": "option"
5589
5582
  },
5590
- "startchunknumber": {
5591
- "char": "s",
5592
- "description": "Chunk number to start from",
5593
- "name": "startchunknumber",
5594
- "default": 0,
5583
+ "outputfile": {
5584
+ "char": "f",
5585
+ "description": "Force the path and name of output report file. Must end with .csv",
5586
+ "name": "outputfile",
5595
5587
  "hasDynamicHelp": false,
5596
5588
  "multiple": false,
5597
5589
  "type": "option"
5598
5590
  },
5599
- "resume": {
5600
- "char": "r",
5601
- "description": "Resume previous export by checking existing files (default in CI)",
5602
- "name": "resume",
5603
- "allowNo": false,
5604
- "type": "boolean"
5605
- },
5606
5591
  "debug": {
5607
5592
  "char": "d",
5608
5593
  "description": "Activate debug mode (more logs)",
@@ -5641,13 +5626,13 @@
5641
5626
  },
5642
5627
  "hasDynamicHelp": true,
5643
5628
  "hiddenAliases": [],
5644
- "id": "hardis:org:files:export",
5629
+ "id": "hardis:org:diagnose:audittrail",
5645
5630
  "pluginAlias": "sfdx-hardis",
5646
5631
  "pluginName": "sfdx-hardis",
5647
5632
  "pluginType": "core",
5648
5633
  "strict": true,
5649
5634
  "enableJsonFlag": true,
5650
- "title": "Export files",
5635
+ "title": "Diagnose content of Setup Audit Trail",
5651
5636
  "requiresProject": false,
5652
5637
  "isESM": true,
5653
5638
  "relativePath": [
@@ -5655,43 +5640,43 @@
5655
5640
  "commands",
5656
5641
  "hardis",
5657
5642
  "org",
5658
- "files",
5659
- "export.js"
5643
+ "diagnose",
5644
+ "audittrail.js"
5660
5645
  ],
5661
5646
  "aliasPermutations": [],
5662
5647
  "permutations": [
5663
- "hardis:org:files:export",
5664
- "org:hardis:files:export",
5665
- "org:files:hardis:export",
5666
- "org:files:export:hardis",
5667
- "hardis:files:org:export",
5668
- "files:hardis:org:export",
5669
- "files:org:hardis:export",
5670
- "files:org:export:hardis",
5671
- "hardis:files:export:org",
5672
- "files:hardis:export:org",
5673
- "files:export:hardis:org",
5674
- "files:export:org:hardis",
5675
- "hardis:org:export:files",
5676
- "org:hardis:export:files",
5677
- "org:export:hardis:files",
5678
- "org:export:files:hardis",
5679
- "hardis:export:org:files",
5680
- "export:hardis:org:files",
5681
- "export:org:hardis:files",
5682
- "export:org:files:hardis",
5683
- "hardis:export:files:org",
5684
- "export:hardis:files:org",
5685
- "export:files:hardis:org",
5686
- "export:files:org:hardis"
5648
+ "hardis:org:diagnose:audittrail",
5649
+ "org:hardis:diagnose:audittrail",
5650
+ "org:diagnose:hardis:audittrail",
5651
+ "org:diagnose:audittrail:hardis",
5652
+ "hardis:diagnose:org:audittrail",
5653
+ "diagnose:hardis:org:audittrail",
5654
+ "diagnose:org:hardis:audittrail",
5655
+ "diagnose:org:audittrail:hardis",
5656
+ "hardis:diagnose:audittrail:org",
5657
+ "diagnose:hardis:audittrail:org",
5658
+ "diagnose:audittrail:hardis:org",
5659
+ "diagnose:audittrail:org:hardis",
5660
+ "hardis:org:audittrail:diagnose",
5661
+ "org:hardis:audittrail:diagnose",
5662
+ "org:audittrail:hardis:diagnose",
5663
+ "org:audittrail:diagnose:hardis",
5664
+ "hardis:audittrail:org:diagnose",
5665
+ "audittrail:hardis:org:diagnose",
5666
+ "audittrail:org:hardis:diagnose",
5667
+ "audittrail:org:diagnose:hardis",
5668
+ "hardis:audittrail:diagnose:org",
5669
+ "audittrail:hardis:diagnose:org",
5670
+ "audittrail:diagnose:hardis:org",
5671
+ "audittrail:diagnose:org:hardis"
5687
5672
  ]
5688
5673
  },
5689
- "hardis:org:files:import": {
5674
+ "hardis:org:diagnose:instanceupgrade": {
5690
5675
  "aliases": [],
5691
5676
  "args": {},
5692
- "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",
5677
+ "description": "\n## Command Behavior\n\n**Retrieves and displays the scheduled upgrade date for a Salesforce org's instance.**\n\nThis command provides crucial information about when your Salesforce instance will be upgraded to the next major release (Spring, Summer, or Winter). This is vital for release planning, testing, and ensuring compatibility with upcoming Salesforce features.\n\nKey functionalities:\n\n- **Instance Identification:** Determines the Salesforce instance name of your target org.\n- **Upgrade Date Retrieval:** Fetches the planned start time of the next major core service upgrade for that instance from the Salesforce Status API.\n- **Days Until Upgrade:** Calculates and displays the number of days remaining until the next major upgrade.\n- **Severity-Based Logging:** Adjusts the log severity (info, warning) based on the proximity of the upgrade date, providing a visual cue for urgency.\n- **Notifications:** Sends notifications to configured channels (e.g., Slack, MS Teams, Grafana) with the upgrade information, making it suitable for automated monitoring.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the `Organization` object in Salesforce to get the `InstanceName` of the target org.\n- **Salesforce Status API Integration:** It makes an HTTP GET request to the Salesforce Status API (`https://api.status.salesforce.com/v1/instances/{instanceName}/status`) to retrieve detailed information about the instance, including scheduled maintenances.\n- **Data Parsing:** It parses the JSON response from the Status API to extract the relevant major release upgrade information.\n- **Date Calculation:** Uses the `moment` library to calculate the difference in days between the current date and the planned upgrade date.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including the instance name, upgrade date, and days remaining, along with relevant metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the upgrade status and proximity.\n</details>\n",
5693
5678
  "examples": [
5694
- "$ sf hardis:org:files:import"
5679
+ "$ sf hardis:org:diagnose:instanceupgrade"
5695
5680
  ],
5696
5681
  "flags": {
5697
5682
  "json": {
@@ -5709,21 +5694,6 @@
5709
5694
  "multiple": false,
5710
5695
  "type": "option"
5711
5696
  },
5712
- "path": {
5713
- "char": "p",
5714
- "description": "Path to the file export project",
5715
- "name": "path",
5716
- "hasDynamicHelp": false,
5717
- "multiple": false,
5718
- "type": "option"
5719
- },
5720
- "overwrite": {
5721
- "char": "f",
5722
- "description": "Override existing files (doubles the number of API calls)",
5723
- "name": "overwrite",
5724
- "allowNo": false,
5725
- "type": "boolean"
5726
- },
5727
5697
  "debug": {
5728
5698
  "char": "d",
5729
5699
  "description": "Activate debug mode (more logs)",
@@ -5762,13 +5732,13 @@
5762
5732
  },
5763
5733
  "hasDynamicHelp": true,
5764
5734
  "hiddenAliases": [],
5765
- "id": "hardis:org:files:import",
5735
+ "id": "hardis:org:diagnose:instanceupgrade",
5766
5736
  "pluginAlias": "sfdx-hardis",
5767
5737
  "pluginName": "sfdx-hardis",
5768
5738
  "pluginType": "core",
5769
5739
  "strict": true,
5770
5740
  "enableJsonFlag": true,
5771
- "title": "Import files",
5741
+ "title": "Get Instance Upgrade date",
5772
5742
  "requiresProject": false,
5773
5743
  "isESM": true,
5774
5744
  "relativePath": [
@@ -5776,247 +5746,8 @@
5776
5746
  "commands",
5777
5747
  "hardis",
5778
5748
  "org",
5779
- "files",
5780
- "import.js"
5781
- ],
5782
- "aliasPermutations": [],
5783
- "permutations": [
5784
- "hardis:org:files:import",
5785
- "org:hardis:files:import",
5786
- "org:files:hardis:import",
5787
- "org:files:import:hardis",
5788
- "hardis:files:org:import",
5789
- "files:hardis:org:import",
5790
- "files:org:hardis:import",
5791
- "files:org:import:hardis",
5792
- "hardis:files:import:org",
5793
- "files:hardis:import:org",
5794
- "files:import:hardis:org",
5795
- "files:import:org:hardis",
5796
- "hardis:org:import:files",
5797
- "org:hardis:import:files",
5798
- "org:import:hardis:files",
5799
- "org:import:files:hardis",
5800
- "hardis:import:org:files",
5801
- "import:hardis:org:files",
5802
- "import:org:hardis:files",
5803
- "import:org:files:hardis",
5804
- "hardis:import:files:org",
5805
- "import:hardis:files:org",
5806
- "import:files:hardis:org",
5807
- "import:files:org:hardis"
5808
- ]
5809
- },
5810
- "hardis:org:diagnose:audittrail": {
5811
- "aliases": [],
5812
- "args": {},
5813
- "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",
5814
- "examples": [
5815
- "$ sf hardis:org:diagnose:audittrail",
5816
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5817
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5818
- "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5819
- ],
5820
- "flags": {
5821
- "json": {
5822
- "description": "Format output as json.",
5823
- "helpGroup": "GLOBAL",
5824
- "name": "json",
5825
- "allowNo": false,
5826
- "type": "boolean"
5827
- },
5828
- "flags-dir": {
5829
- "helpGroup": "GLOBAL",
5830
- "name": "flags-dir",
5831
- "summary": "Import flag values from a directory.",
5832
- "hasDynamicHelp": false,
5833
- "multiple": false,
5834
- "type": "option"
5835
- },
5836
- "excludeusers": {
5837
- "char": "e",
5838
- "description": "Comma-separated list of usernames to exclude",
5839
- "name": "excludeusers",
5840
- "hasDynamicHelp": false,
5841
- "multiple": false,
5842
- "type": "option"
5843
- },
5844
- "lastndays": {
5845
- "char": "t",
5846
- "description": "Number of days to extract from today (included)",
5847
- "name": "lastndays",
5848
- "hasDynamicHelp": false,
5849
- "multiple": false,
5850
- "type": "option"
5851
- },
5852
- "outputfile": {
5853
- "char": "f",
5854
- "description": "Force the path and name of output report file. Must end with .csv",
5855
- "name": "outputfile",
5856
- "hasDynamicHelp": false,
5857
- "multiple": false,
5858
- "type": "option"
5859
- },
5860
- "debug": {
5861
- "char": "d",
5862
- "description": "Activate debug mode (more logs)",
5863
- "name": "debug",
5864
- "allowNo": false,
5865
- "type": "boolean"
5866
- },
5867
- "websocket": {
5868
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5869
- "name": "websocket",
5870
- "hasDynamicHelp": false,
5871
- "multiple": false,
5872
- "type": "option"
5873
- },
5874
- "skipauth": {
5875
- "description": "Skip authentication check when a default username is required",
5876
- "name": "skipauth",
5877
- "allowNo": false,
5878
- "type": "boolean"
5879
- },
5880
- "target-org": {
5881
- "aliases": [
5882
- "targetusername",
5883
- "u"
5884
- ],
5885
- "char": "o",
5886
- "deprecateAliases": true,
5887
- "name": "target-org",
5888
- "noCacheDefault": true,
5889
- "required": true,
5890
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
5891
- "hasDynamicHelp": true,
5892
- "multiple": false,
5893
- "type": "option"
5894
- }
5895
- },
5896
- "hasDynamicHelp": true,
5897
- "hiddenAliases": [],
5898
- "id": "hardis:org:diagnose:audittrail",
5899
- "pluginAlias": "sfdx-hardis",
5900
- "pluginName": "sfdx-hardis",
5901
- "pluginType": "core",
5902
- "strict": true,
5903
- "enableJsonFlag": true,
5904
- "title": "Diagnose content of Setup Audit Trail",
5905
- "requiresProject": false,
5906
- "isESM": true,
5907
- "relativePath": [
5908
- "lib",
5909
- "commands",
5910
- "hardis",
5911
- "org",
5912
- "diagnose",
5913
- "audittrail.js"
5914
- ],
5915
- "aliasPermutations": [],
5916
- "permutations": [
5917
- "hardis:org:diagnose:audittrail",
5918
- "org:hardis:diagnose:audittrail",
5919
- "org:diagnose:hardis:audittrail",
5920
- "org:diagnose:audittrail:hardis",
5921
- "hardis:diagnose:org:audittrail",
5922
- "diagnose:hardis:org:audittrail",
5923
- "diagnose:org:hardis:audittrail",
5924
- "diagnose:org:audittrail:hardis",
5925
- "hardis:diagnose:audittrail:org",
5926
- "diagnose:hardis:audittrail:org",
5927
- "diagnose:audittrail:hardis:org",
5928
- "diagnose:audittrail:org:hardis",
5929
- "hardis:org:audittrail:diagnose",
5930
- "org:hardis:audittrail:diagnose",
5931
- "org:audittrail:hardis:diagnose",
5932
- "org:audittrail:diagnose:hardis",
5933
- "hardis:audittrail:org:diagnose",
5934
- "audittrail:hardis:org:diagnose",
5935
- "audittrail:org:hardis:diagnose",
5936
- "audittrail:org:diagnose:hardis",
5937
- "hardis:audittrail:diagnose:org",
5938
- "audittrail:hardis:diagnose:org",
5939
- "audittrail:diagnose:hardis:org",
5940
- "audittrail:diagnose:org:hardis"
5941
- ]
5942
- },
5943
- "hardis:org:diagnose:instanceupgrade": {
5944
- "aliases": [],
5945
- "args": {},
5946
- "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",
5947
- "examples": [
5948
- "$ sf hardis:org:diagnose:instanceupgrade"
5949
- ],
5950
- "flags": {
5951
- "json": {
5952
- "description": "Format output as json.",
5953
- "helpGroup": "GLOBAL",
5954
- "name": "json",
5955
- "allowNo": false,
5956
- "type": "boolean"
5957
- },
5958
- "flags-dir": {
5959
- "helpGroup": "GLOBAL",
5960
- "name": "flags-dir",
5961
- "summary": "Import flag values from a directory.",
5962
- "hasDynamicHelp": false,
5963
- "multiple": false,
5964
- "type": "option"
5965
- },
5966
- "debug": {
5967
- "char": "d",
5968
- "description": "Activate debug mode (more logs)",
5969
- "name": "debug",
5970
- "allowNo": false,
5971
- "type": "boolean"
5972
- },
5973
- "websocket": {
5974
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5975
- "name": "websocket",
5976
- "hasDynamicHelp": false,
5977
- "multiple": false,
5978
- "type": "option"
5979
- },
5980
- "skipauth": {
5981
- "description": "Skip authentication check when a default username is required",
5982
- "name": "skipauth",
5983
- "allowNo": false,
5984
- "type": "boolean"
5985
- },
5986
- "target-org": {
5987
- "aliases": [
5988
- "targetusername",
5989
- "u"
5990
- ],
5991
- "char": "o",
5992
- "deprecateAliases": true,
5993
- "name": "target-org",
5994
- "noCacheDefault": true,
5995
- "required": true,
5996
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
5997
- "hasDynamicHelp": true,
5998
- "multiple": false,
5999
- "type": "option"
6000
- }
6001
- },
6002
- "hasDynamicHelp": true,
6003
- "hiddenAliases": [],
6004
- "id": "hardis:org:diagnose:instanceupgrade",
6005
- "pluginAlias": "sfdx-hardis",
6006
- "pluginName": "sfdx-hardis",
6007
- "pluginType": "core",
6008
- "strict": true,
6009
- "enableJsonFlag": true,
6010
- "title": "Get Instance Upgrade date",
6011
- "requiresProject": false,
6012
- "isESM": true,
6013
- "relativePath": [
6014
- "lib",
6015
- "commands",
6016
- "hardis",
6017
- "org",
6018
- "diagnose",
6019
- "instanceupgrade.js"
5749
+ "diagnose",
5750
+ "instanceupgrade.js"
6020
5751
  ],
6021
5752
  "aliasPermutations": [],
6022
5753
  "permutations": [
@@ -6533,7 +6264,7 @@
6533
6264
  "hardis:org:diagnose:unused-apex-classes": {
6534
6265
  "aliases": [],
6535
6266
  "args": {},
6536
- "description": "List all async Apex classes (Batch,Queueable,Schedulable) that has not been called for more than 365 days.\n \nThe result class list probably can be removed from the project, and that will improve your test classes performances :)\n\nThe number of unused day is overridable using --days option. \n\nThe command uses queries on AsyncApexJob and CronTrigger technical tables to build the result.\n\nApex Classes CreatedBy and CreatedOn fields are calculated from MIN(date from git, date from org)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-apex-classes/) and can output Grafana, Slack and MsTeams Notifications.\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-monitoring-unused-apex-grafana.jpg)\n",
6267
+ "description": "List all async Apex classes (Batch,Queueable,Schedulable) that has not been called for more than 365 days.\n \nThe result class list probably can be removed from the project, and that will improve your test classes performances 😊\n\nThe number of unused day is overridable using --days option. \n\nThe command uses queries on AsyncApexJob and CronTrigger technical tables to build the result.\n\nApex Classes CreatedBy and CreatedOn fields are calculated from MIN(date from git, date from org)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-apex-classes/) and can output Grafana, Slack and MsTeams Notifications.\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-monitoring-unused-apex-grafana.jpg)\n",
6537
6268
  "examples": [
6538
6269
  "$ sf hardis:org:diagnose:unused-apex-classes",
6539
6270
  "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
@@ -6787,7 +6518,7 @@
6787
6518
  "hardis:org:diagnose:unusedlicenses": {
6788
6519
  "aliases": [],
6789
6520
  "args": {},
6790
- "description": "\n## Command Behavior\n\n**Detects and suggests the deletion of unused Permission Set License Assignments in a Salesforce org.**\n\nWhen a Permission Set (PS) linked to a Permission Set License (PSL) is assigned to a user, a Permission Set License Assignment (PSLA) is automatically created. However, when that PS is unassigned from the user, the PSLA is *not* automatically deleted. This can lead to organizations being charged for unused PSLAs, representing a hidden cost and technical debt.\n\nThis command identifies such useless PSLAs and provides options to delete them, helping to optimize license usage and reduce unnecessary expenses.\n\nKey functionalities:\n\n- **PSLA Detection:** Queries the Salesforce org to find all active PSLAs.\n- **Usage Verification:** Correlates PSLAs with actual Permission Set Assignments and Permission Set Group Assignments to determine if the underlying Permission Sets are still assigned to the user.\n- **Special Case Handling:** Accounts for specific scenarios where profiles might implicitly assign PSLAs (e.g., `Salesforce API Only` profile assigning `SalesforceAPIIntegrationPsl`) and allows for always excluding certain PSLAs from the unused check.\n- **Reporting:** Generates a CSV report of all identified unused PSLAs, including the user and the associated Permission Set License.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of unused PSLAs.\n- **Interactive Deletion:** In non-CI environments, it offers an interactive prompt to bulk delete the identified unused PSLAs.\n\nMany thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command :)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves extensive querying of Salesforce objects and data correlation:\n\n- **SOQL Queries (Bulk API):** It uses `bulkQuery` and `bulkQueryChunksIn` to efficiently retrieve large volumes of data from `PermissionSetLicenseAssign`, `PermissionSetLicense`, `PermissionSet`, `PermissionSetGroupComponent`, and `PermissionSetAssignment` objects.\n- **Data Correlation:** It meticulously correlates data across these objects to determine if a `PermissionSetLicenseAssign` record has a corresponding active assignment to a Permission Set or Permission Set Group for the same user.\n- **Filtering Logic:** It applies complex filtering logic to exclude PSLAs that are genuinely in use or are part of predefined exceptions (e.g., `alwaysExcludeForActiveUsersPermissionSetLicenses`).\n- **Bulk Deletion:** If the user opts to delete unused PSLAs, it uses `bulkUpdate` with the `delete` operation to efficiently remove multiple records.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused PSLAs.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Interaction:** Uses `prompts` for interactive confirmation before performing deletion operations.\n</details>\n",
6521
+ "description": "\n## Command Behavior\n\n**Detects and suggests the deletion of unused Permission Set License Assignments in a Salesforce org.**\n\nWhen a Permission Set (PS) linked to a Permission Set License (PSL) is assigned to a user, a Permission Set License Assignment (PSLA) is automatically created. However, when that PS is unassigned from the user, the PSLA is *not* automatically deleted. This can lead to organizations being charged for unused PSLAs, representing a hidden cost and technical debt.\n\nThis command identifies such useless PSLAs and provides options to delete them, helping to optimize license usage and reduce unnecessary expenses.\n\nKey functionalities:\n\n- **PSLA Detection:** Queries the Salesforce org to find all active PSLAs.\n- **Usage Verification:** Correlates PSLAs with actual Permission Set Assignments and Permission Set Group Assignments to determine if the underlying Permission Sets are still assigned to the user.\n- **Special Case Handling:** Accounts for specific scenarios where profiles might implicitly assign PSLAs (e.g., `Salesforce API Only` profile assigning `SalesforceAPIIntegrationPsl`) and allows for always excluding certain PSLAs from the unused check.\n- **Reporting:** Generates a CSV report of all identified unused PSLAs, including the user and the associated Permission Set License.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of unused PSLAs.\n- **Interactive Deletion:** In non-CI environments, it offers an interactive prompt to bulk delete the identified unused PSLAs.\n\nMany thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command 😊\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves extensive querying of Salesforce objects and data correlation:\n\n- **SOQL Queries (Bulk API):** It uses `bulkQuery` and `bulkQueryChunksIn` to efficiently retrieve large volumes of data from `PermissionSetLicenseAssign`, `PermissionSetLicense`, `PermissionSet`, `PermissionSetGroupComponent`, and `PermissionSetAssignment` objects.\n- **Data Correlation:** It meticulously correlates data across these objects to determine if a `PermissionSetLicenseAssign` record has a corresponding active assignment to a Permission Set or Permission Set Group for the same user.\n- **Filtering Logic:** It applies complex filtering logic to exclude PSLAs that are genuinely in use or are part of predefined exceptions (e.g., `alwaysExcludeForActiveUsersPermissionSetLicenses`).\n- **Bulk Deletion:** If the user opts to delete unused PSLAs, it uses `bulkUpdate` with the `delete` operation to efficiently remove multiple records.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused PSLAs.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Interaction:** Uses `prompts` for interactive confirmation before performing deletion operations.\n</details>\n",
6791
6522
  "examples": [
6792
6523
  "$ sf hardis:org:diagnose:unusedlicenses",
6793
6524
  "$ sf hardis:org:diagnose:unusedlicenses --fix"
@@ -7070,6 +6801,275 @@
7070
6801
  "unusedusers:diagnose:org:hardis"
7071
6802
  ]
7072
6803
  },
6804
+ "hardis:org:files:export": {
6805
+ "aliases": [],
6806
+ "args": {},
6807
+ "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",
6808
+ "examples": [
6809
+ "$ sf hardis:org:files:export"
6810
+ ],
6811
+ "flags": {
6812
+ "json": {
6813
+ "description": "Format output as json.",
6814
+ "helpGroup": "GLOBAL",
6815
+ "name": "json",
6816
+ "allowNo": false,
6817
+ "type": "boolean"
6818
+ },
6819
+ "flags-dir": {
6820
+ "helpGroup": "GLOBAL",
6821
+ "name": "flags-dir",
6822
+ "summary": "Import flag values from a directory.",
6823
+ "hasDynamicHelp": false,
6824
+ "multiple": false,
6825
+ "type": "option"
6826
+ },
6827
+ "path": {
6828
+ "char": "p",
6829
+ "description": "Path to the file export project",
6830
+ "name": "path",
6831
+ "hasDynamicHelp": false,
6832
+ "multiple": false,
6833
+ "type": "option"
6834
+ },
6835
+ "chunksize": {
6836
+ "char": "c",
6837
+ "description": "Number of records to add in a chunk before it is processed",
6838
+ "name": "chunksize",
6839
+ "default": 1000,
6840
+ "hasDynamicHelp": false,
6841
+ "multiple": false,
6842
+ "type": "option"
6843
+ },
6844
+ "polltimeout": {
6845
+ "char": "t",
6846
+ "description": "Timeout in MS for Bulk API calls",
6847
+ "name": "polltimeout",
6848
+ "default": 300000,
6849
+ "hasDynamicHelp": false,
6850
+ "multiple": false,
6851
+ "type": "option"
6852
+ },
6853
+ "startchunknumber": {
6854
+ "char": "s",
6855
+ "description": "Chunk number to start from",
6856
+ "name": "startchunknumber",
6857
+ "default": 0,
6858
+ "hasDynamicHelp": false,
6859
+ "multiple": false,
6860
+ "type": "option"
6861
+ },
6862
+ "resume": {
6863
+ "char": "r",
6864
+ "description": "Resume previous export by checking existing files (default in CI)",
6865
+ "name": "resume",
6866
+ "allowNo": false,
6867
+ "type": "boolean"
6868
+ },
6869
+ "debug": {
6870
+ "char": "d",
6871
+ "description": "Activate debug mode (more logs)",
6872
+ "name": "debug",
6873
+ "allowNo": false,
6874
+ "type": "boolean"
6875
+ },
6876
+ "websocket": {
6877
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
6878
+ "name": "websocket",
6879
+ "hasDynamicHelp": false,
6880
+ "multiple": false,
6881
+ "type": "option"
6882
+ },
6883
+ "skipauth": {
6884
+ "description": "Skip authentication check when a default username is required",
6885
+ "name": "skipauth",
6886
+ "allowNo": false,
6887
+ "type": "boolean"
6888
+ },
6889
+ "target-org": {
6890
+ "aliases": [
6891
+ "targetusername",
6892
+ "u"
6893
+ ],
6894
+ "char": "o",
6895
+ "deprecateAliases": true,
6896
+ "name": "target-org",
6897
+ "noCacheDefault": true,
6898
+ "required": true,
6899
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
6900
+ "hasDynamicHelp": true,
6901
+ "multiple": false,
6902
+ "type": "option"
6903
+ }
6904
+ },
6905
+ "hasDynamicHelp": true,
6906
+ "hiddenAliases": [],
6907
+ "id": "hardis:org:files:export",
6908
+ "pluginAlias": "sfdx-hardis",
6909
+ "pluginName": "sfdx-hardis",
6910
+ "pluginType": "core",
6911
+ "strict": true,
6912
+ "enableJsonFlag": true,
6913
+ "title": "Export files",
6914
+ "requiresProject": false,
6915
+ "isESM": true,
6916
+ "relativePath": [
6917
+ "lib",
6918
+ "commands",
6919
+ "hardis",
6920
+ "org",
6921
+ "files",
6922
+ "export.js"
6923
+ ],
6924
+ "aliasPermutations": [],
6925
+ "permutations": [
6926
+ "hardis:org:files:export",
6927
+ "org:hardis:files:export",
6928
+ "org:files:hardis:export",
6929
+ "org:files:export:hardis",
6930
+ "hardis:files:org:export",
6931
+ "files:hardis:org:export",
6932
+ "files:org:hardis:export",
6933
+ "files:org:export:hardis",
6934
+ "hardis:files:export:org",
6935
+ "files:hardis:export:org",
6936
+ "files:export:hardis:org",
6937
+ "files:export:org:hardis",
6938
+ "hardis:org:export:files",
6939
+ "org:hardis:export:files",
6940
+ "org:export:hardis:files",
6941
+ "org:export:files:hardis",
6942
+ "hardis:export:org:files",
6943
+ "export:hardis:org:files",
6944
+ "export:org:hardis:files",
6945
+ "export:org:files:hardis",
6946
+ "hardis:export:files:org",
6947
+ "export:hardis:files:org",
6948
+ "export:files:hardis:org",
6949
+ "export:files:org:hardis"
6950
+ ]
6951
+ },
6952
+ "hardis:org:files:import": {
6953
+ "aliases": [],
6954
+ "args": {},
6955
+ "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",
6956
+ "examples": [
6957
+ "$ sf hardis:org:files:import"
6958
+ ],
6959
+ "flags": {
6960
+ "json": {
6961
+ "description": "Format output as json.",
6962
+ "helpGroup": "GLOBAL",
6963
+ "name": "json",
6964
+ "allowNo": false,
6965
+ "type": "boolean"
6966
+ },
6967
+ "flags-dir": {
6968
+ "helpGroup": "GLOBAL",
6969
+ "name": "flags-dir",
6970
+ "summary": "Import flag values from a directory.",
6971
+ "hasDynamicHelp": false,
6972
+ "multiple": false,
6973
+ "type": "option"
6974
+ },
6975
+ "path": {
6976
+ "char": "p",
6977
+ "description": "Path to the file export project",
6978
+ "name": "path",
6979
+ "hasDynamicHelp": false,
6980
+ "multiple": false,
6981
+ "type": "option"
6982
+ },
6983
+ "overwrite": {
6984
+ "char": "f",
6985
+ "description": "Override existing files (doubles the number of API calls)",
6986
+ "name": "overwrite",
6987
+ "allowNo": false,
6988
+ "type": "boolean"
6989
+ },
6990
+ "debug": {
6991
+ "char": "d",
6992
+ "description": "Activate debug mode (more logs)",
6993
+ "name": "debug",
6994
+ "allowNo": false,
6995
+ "type": "boolean"
6996
+ },
6997
+ "websocket": {
6998
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
6999
+ "name": "websocket",
7000
+ "hasDynamicHelp": false,
7001
+ "multiple": false,
7002
+ "type": "option"
7003
+ },
7004
+ "skipauth": {
7005
+ "description": "Skip authentication check when a default username is required",
7006
+ "name": "skipauth",
7007
+ "allowNo": false,
7008
+ "type": "boolean"
7009
+ },
7010
+ "target-org": {
7011
+ "aliases": [
7012
+ "targetusername",
7013
+ "u"
7014
+ ],
7015
+ "char": "o",
7016
+ "deprecateAliases": true,
7017
+ "name": "target-org",
7018
+ "noCacheDefault": true,
7019
+ "required": true,
7020
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
7021
+ "hasDynamicHelp": true,
7022
+ "multiple": false,
7023
+ "type": "option"
7024
+ }
7025
+ },
7026
+ "hasDynamicHelp": true,
7027
+ "hiddenAliases": [],
7028
+ "id": "hardis:org:files:import",
7029
+ "pluginAlias": "sfdx-hardis",
7030
+ "pluginName": "sfdx-hardis",
7031
+ "pluginType": "core",
7032
+ "strict": true,
7033
+ "enableJsonFlag": true,
7034
+ "title": "Import files",
7035
+ "requiresProject": false,
7036
+ "isESM": true,
7037
+ "relativePath": [
7038
+ "lib",
7039
+ "commands",
7040
+ "hardis",
7041
+ "org",
7042
+ "files",
7043
+ "import.js"
7044
+ ],
7045
+ "aliasPermutations": [],
7046
+ "permutations": [
7047
+ "hardis:org:files:import",
7048
+ "org:hardis:files:import",
7049
+ "org:files:hardis:import",
7050
+ "org:files:import:hardis",
7051
+ "hardis:files:org:import",
7052
+ "files:hardis:org:import",
7053
+ "files:org:hardis:import",
7054
+ "files:org:import:hardis",
7055
+ "hardis:files:import:org",
7056
+ "files:hardis:import:org",
7057
+ "files:import:hardis:org",
7058
+ "files:import:org:hardis",
7059
+ "hardis:org:import:files",
7060
+ "org:hardis:import:files",
7061
+ "org:import:hardis:files",
7062
+ "org:import:files:hardis",
7063
+ "hardis:import:org:files",
7064
+ "import:hardis:org:files",
7065
+ "import:org:hardis:files",
7066
+ "import:org:files:hardis",
7067
+ "hardis:import:files:org",
7068
+ "import:hardis:files:org",
7069
+ "import:files:hardis:org",
7070
+ "import:files:org:hardis"
7071
+ ]
7072
+ },
7073
7073
  "hardis:org:fix:listviewmine": {
7074
7074
  "aliases": [],
7075
7075
  "args": {},
@@ -8111,7 +8111,7 @@
8111
8111
  "type": "boolean"
8112
8112
  },
8113
8113
  "websocket": {
8114
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
8114
+ "description": "WebSocket host:port for VS Code SFDX Hardis UI integration",
8115
8115
  "name": "websocket",
8116
8116
  "summary": "Websocket host:port for VsCode SFDX Hardis UI integration",
8117
8117
  "hasDynamicHelp": false,
@@ -9663,262 +9663,30 @@
9663
9663
  ],
9664
9664
  "aliasPermutations": [],
9665
9665
  "permutations": [
9666
- "hardis:project:audit:remotesites",
9667
- "project:hardis:audit:remotesites",
9668
- "project:audit:hardis:remotesites",
9669
- "project:audit:remotesites:hardis",
9670
- "hardis:audit:project:remotesites",
9671
- "audit:hardis:project:remotesites",
9672
- "audit:project:hardis:remotesites",
9673
- "audit:project:remotesites:hardis",
9674
- "hardis:audit:remotesites:project",
9675
- "audit:hardis:remotesites:project",
9676
- "audit:remotesites:hardis:project",
9677
- "audit:remotesites:project:hardis",
9678
- "hardis:project:remotesites:audit",
9679
- "project:hardis:remotesites:audit",
9680
- "project:remotesites:hardis:audit",
9681
- "project:remotesites:audit:hardis",
9682
- "hardis:remotesites:project:audit",
9683
- "remotesites:hardis:project:audit",
9684
- "remotesites:project:hardis:audit",
9685
- "remotesites:project:audit:hardis",
9686
- "hardis:remotesites:audit:project",
9687
- "remotesites:hardis:audit:project",
9688
- "remotesites:audit:hardis:project",
9689
- "remotesites:audit:project:hardis"
9690
- ]
9691
- },
9692
- "hardis:project:configure:auth": {
9693
- "aliases": [],
9694
- "args": {},
9695
- "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",
9696
- "examples": [
9697
- "$ sf hardis:project:configure:auth"
9698
- ],
9699
- "flags": {
9700
- "json": {
9701
- "description": "Format output as json.",
9702
- "helpGroup": "GLOBAL",
9703
- "name": "json",
9704
- "allowNo": false,
9705
- "type": "boolean"
9706
- },
9707
- "flags-dir": {
9708
- "helpGroup": "GLOBAL",
9709
- "name": "flags-dir",
9710
- "summary": "Import flag values from a directory.",
9711
- "hasDynamicHelp": false,
9712
- "multiple": false,
9713
- "type": "option"
9714
- },
9715
- "devhub": {
9716
- "char": "b",
9717
- "description": "Configure project DevHub",
9718
- "name": "devhub",
9719
- "allowNo": false,
9720
- "type": "boolean"
9721
- },
9722
- "debug": {
9723
- "char": "d",
9724
- "description": "Activate debug mode (more logs)",
9725
- "name": "debug",
9726
- "allowNo": false,
9727
- "type": "boolean"
9728
- },
9729
- "websocket": {
9730
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9731
- "name": "websocket",
9732
- "hasDynamicHelp": false,
9733
- "multiple": false,
9734
- "type": "option"
9735
- },
9736
- "skipauth": {
9737
- "description": "Skip authentication check when a default username is required",
9738
- "name": "skipauth",
9739
- "allowNo": false,
9740
- "type": "boolean"
9741
- },
9742
- "target-org": {
9743
- "aliases": [
9744
- "targetusername",
9745
- "u"
9746
- ],
9747
- "char": "o",
9748
- "deprecateAliases": true,
9749
- "name": "target-org",
9750
- "noCacheDefault": true,
9751
- "summary": "Username or alias of the target org.",
9752
- "hasDynamicHelp": true,
9753
- "multiple": false,
9754
- "type": "option"
9755
- },
9756
- "target-dev-hub": {
9757
- "aliases": [
9758
- "targetdevhubusername"
9759
- ],
9760
- "char": "v",
9761
- "deprecateAliases": true,
9762
- "name": "target-dev-hub",
9763
- "noCacheDefault": true,
9764
- "required": false,
9765
- "summary": "Username or alias of the Dev Hub org.",
9766
- "hasDynamicHelp": true,
9767
- "multiple": false,
9768
- "type": "option"
9769
- }
9770
- },
9771
- "hasDynamicHelp": true,
9772
- "hiddenAliases": [],
9773
- "id": "hardis:project:configure:auth",
9774
- "pluginAlias": "sfdx-hardis",
9775
- "pluginName": "sfdx-hardis",
9776
- "pluginType": "core",
9777
- "strict": true,
9778
- "enableJsonFlag": true,
9779
- "title": "Configure authentication",
9780
- "requiresProject": false,
9781
- "requiresDependencies": [
9782
- "openssl"
9783
- ],
9784
- "isESM": true,
9785
- "relativePath": [
9786
- "lib",
9787
- "commands",
9788
- "hardis",
9789
- "project",
9790
- "configure",
9791
- "auth.js"
9792
- ],
9793
- "aliasPermutations": [],
9794
- "permutations": [
9795
- "hardis:project:configure:auth",
9796
- "project:hardis:configure:auth",
9797
- "project:configure:hardis:auth",
9798
- "project:configure:auth:hardis",
9799
- "hardis:configure:project:auth",
9800
- "configure:hardis:project:auth",
9801
- "configure:project:hardis:auth",
9802
- "configure:project:auth:hardis",
9803
- "hardis:configure:auth:project",
9804
- "configure:hardis:auth:project",
9805
- "configure:auth:hardis:project",
9806
- "configure:auth:project:hardis",
9807
- "hardis:project:auth:configure",
9808
- "project:hardis:auth:configure",
9809
- "project:auth:hardis:configure",
9810
- "project:auth:configure:hardis",
9811
- "hardis:auth:project:configure",
9812
- "auth:hardis:project:configure",
9813
- "auth:project:hardis:configure",
9814
- "auth:project:configure:hardis",
9815
- "hardis:auth:configure:project",
9816
- "auth:hardis:configure:project",
9817
- "auth:configure:hardis:project",
9818
- "auth:configure:project:hardis"
9819
- ]
9820
- },
9821
- "hardis:project:convert:profilestopermsets": {
9822
- "aliases": [],
9823
- "args": {},
9824
- "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",
9825
- "examples": [
9826
- "$ sf hardis:project:convert:profilestopermsets"
9827
- ],
9828
- "flags": {
9829
- "json": {
9830
- "description": "Format output as json.",
9831
- "helpGroup": "GLOBAL",
9832
- "name": "json",
9833
- "allowNo": false,
9834
- "type": "boolean"
9835
- },
9836
- "flags-dir": {
9837
- "helpGroup": "GLOBAL",
9838
- "name": "flags-dir",
9839
- "summary": "Import flag values from a directory.",
9840
- "hasDynamicHelp": false,
9841
- "multiple": false,
9842
- "type": "option"
9843
- },
9844
- "except": {
9845
- "char": "e",
9846
- "description": "List of filters",
9847
- "name": "except",
9848
- "default": [],
9849
- "hasDynamicHelp": false,
9850
- "multiple": true,
9851
- "type": "option"
9852
- },
9853
- "debug": {
9854
- "char": "d",
9855
- "description": "Activate debug mode (more logs)",
9856
- "name": "debug",
9857
- "allowNo": false,
9858
- "type": "boolean"
9859
- },
9860
- "websocket": {
9861
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9862
- "name": "websocket",
9863
- "hasDynamicHelp": false,
9864
- "multiple": false,
9865
- "type": "option"
9866
- },
9867
- "skipauth": {
9868
- "description": "Skip authentication check when a default username is required",
9869
- "name": "skipauth",
9870
- "allowNo": false,
9871
- "type": "boolean"
9872
- }
9873
- },
9874
- "hasDynamicHelp": false,
9875
- "hiddenAliases": [],
9876
- "id": "hardis:project:convert:profilestopermsets",
9877
- "pluginAlias": "sfdx-hardis",
9878
- "pluginName": "sfdx-hardis",
9879
- "pluginType": "core",
9880
- "strict": true,
9881
- "enableJsonFlag": true,
9882
- "title": "Convert Profiles into Permission Sets",
9883
- "requiresProject": true,
9884
- "requiresSfdxPlugins": [
9885
- "shane-sfdx-plugins"
9886
- ],
9887
- "isESM": true,
9888
- "relativePath": [
9889
- "lib",
9890
- "commands",
9891
- "hardis",
9892
- "project",
9893
- "convert",
9894
- "profilestopermsets.js"
9895
- ],
9896
- "aliasPermutations": [],
9897
- "permutations": [
9898
- "hardis:project:convert:profilestopermsets",
9899
- "project:hardis:convert:profilestopermsets",
9900
- "project:convert:hardis:profilestopermsets",
9901
- "project:convert:profilestopermsets:hardis",
9902
- "hardis:convert:project:profilestopermsets",
9903
- "convert:hardis:project:profilestopermsets",
9904
- "convert:project:hardis:profilestopermsets",
9905
- "convert:project:profilestopermsets:hardis",
9906
- "hardis:convert:profilestopermsets:project",
9907
- "convert:hardis:profilestopermsets:project",
9908
- "convert:profilestopermsets:hardis:project",
9909
- "convert:profilestopermsets:project:hardis",
9910
- "hardis:project:profilestopermsets:convert",
9911
- "project:hardis:profilestopermsets:convert",
9912
- "project:profilestopermsets:hardis:convert",
9913
- "project:profilestopermsets:convert:hardis",
9914
- "hardis:profilestopermsets:project:convert",
9915
- "profilestopermsets:hardis:project:convert",
9916
- "profilestopermsets:project:hardis:convert",
9917
- "profilestopermsets:project:convert:hardis",
9918
- "hardis:profilestopermsets:convert:project",
9919
- "profilestopermsets:hardis:convert:project",
9920
- "profilestopermsets:convert:hardis:project",
9921
- "profilestopermsets:convert:project:hardis"
9666
+ "hardis:project:audit:remotesites",
9667
+ "project:hardis:audit:remotesites",
9668
+ "project:audit:hardis:remotesites",
9669
+ "project:audit:remotesites:hardis",
9670
+ "hardis:audit:project:remotesites",
9671
+ "audit:hardis:project:remotesites",
9672
+ "audit:project:hardis:remotesites",
9673
+ "audit:project:remotesites:hardis",
9674
+ "hardis:audit:remotesites:project",
9675
+ "audit:hardis:remotesites:project",
9676
+ "audit:remotesites:hardis:project",
9677
+ "audit:remotesites:project:hardis",
9678
+ "hardis:project:remotesites:audit",
9679
+ "project:hardis:remotesites:audit",
9680
+ "project:remotesites:hardis:audit",
9681
+ "project:remotesites:audit:hardis",
9682
+ "hardis:remotesites:project:audit",
9683
+ "remotesites:hardis:project:audit",
9684
+ "remotesites:project:hardis:audit",
9685
+ "remotesites:project:audit:hardis",
9686
+ "hardis:remotesites:audit:project",
9687
+ "remotesites:hardis:audit:project",
9688
+ "remotesites:audit:hardis:project",
9689
+ "remotesites:audit:project:hardis"
9922
9690
  ]
9923
9691
  },
9924
9692
  "hardis:project:clean:emptyitems": {
@@ -11406,6 +11174,238 @@
11406
11174
  "xml:clean:project:hardis"
11407
11175
  ]
11408
11176
  },
11177
+ "hardis:project:configure:auth": {
11178
+ "aliases": [],
11179
+ "args": {},
11180
+ "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",
11181
+ "examples": [
11182
+ "$ sf hardis:project:configure:auth"
11183
+ ],
11184
+ "flags": {
11185
+ "json": {
11186
+ "description": "Format output as json.",
11187
+ "helpGroup": "GLOBAL",
11188
+ "name": "json",
11189
+ "allowNo": false,
11190
+ "type": "boolean"
11191
+ },
11192
+ "flags-dir": {
11193
+ "helpGroup": "GLOBAL",
11194
+ "name": "flags-dir",
11195
+ "summary": "Import flag values from a directory.",
11196
+ "hasDynamicHelp": false,
11197
+ "multiple": false,
11198
+ "type": "option"
11199
+ },
11200
+ "devhub": {
11201
+ "char": "b",
11202
+ "description": "Configure project DevHub",
11203
+ "name": "devhub",
11204
+ "allowNo": false,
11205
+ "type": "boolean"
11206
+ },
11207
+ "debug": {
11208
+ "char": "d",
11209
+ "description": "Activate debug mode (more logs)",
11210
+ "name": "debug",
11211
+ "allowNo": false,
11212
+ "type": "boolean"
11213
+ },
11214
+ "websocket": {
11215
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11216
+ "name": "websocket",
11217
+ "hasDynamicHelp": false,
11218
+ "multiple": false,
11219
+ "type": "option"
11220
+ },
11221
+ "skipauth": {
11222
+ "description": "Skip authentication check when a default username is required",
11223
+ "name": "skipauth",
11224
+ "allowNo": false,
11225
+ "type": "boolean"
11226
+ },
11227
+ "target-org": {
11228
+ "aliases": [
11229
+ "targetusername",
11230
+ "u"
11231
+ ],
11232
+ "char": "o",
11233
+ "deprecateAliases": true,
11234
+ "name": "target-org",
11235
+ "noCacheDefault": true,
11236
+ "summary": "Username or alias of the target org.",
11237
+ "hasDynamicHelp": true,
11238
+ "multiple": false,
11239
+ "type": "option"
11240
+ },
11241
+ "target-dev-hub": {
11242
+ "aliases": [
11243
+ "targetdevhubusername"
11244
+ ],
11245
+ "char": "v",
11246
+ "deprecateAliases": true,
11247
+ "name": "target-dev-hub",
11248
+ "noCacheDefault": true,
11249
+ "required": false,
11250
+ "summary": "Username or alias of the Dev Hub org.",
11251
+ "hasDynamicHelp": true,
11252
+ "multiple": false,
11253
+ "type": "option"
11254
+ }
11255
+ },
11256
+ "hasDynamicHelp": true,
11257
+ "hiddenAliases": [],
11258
+ "id": "hardis:project:configure:auth",
11259
+ "pluginAlias": "sfdx-hardis",
11260
+ "pluginName": "sfdx-hardis",
11261
+ "pluginType": "core",
11262
+ "strict": true,
11263
+ "enableJsonFlag": true,
11264
+ "title": "Configure authentication",
11265
+ "requiresProject": false,
11266
+ "requiresDependencies": [
11267
+ "openssl"
11268
+ ],
11269
+ "isESM": true,
11270
+ "relativePath": [
11271
+ "lib",
11272
+ "commands",
11273
+ "hardis",
11274
+ "project",
11275
+ "configure",
11276
+ "auth.js"
11277
+ ],
11278
+ "aliasPermutations": [],
11279
+ "permutations": [
11280
+ "hardis:project:configure:auth",
11281
+ "project:hardis:configure:auth",
11282
+ "project:configure:hardis:auth",
11283
+ "project:configure:auth:hardis",
11284
+ "hardis:configure:project:auth",
11285
+ "configure:hardis:project:auth",
11286
+ "configure:project:hardis:auth",
11287
+ "configure:project:auth:hardis",
11288
+ "hardis:configure:auth:project",
11289
+ "configure:hardis:auth:project",
11290
+ "configure:auth:hardis:project",
11291
+ "configure:auth:project:hardis",
11292
+ "hardis:project:auth:configure",
11293
+ "project:hardis:auth:configure",
11294
+ "project:auth:hardis:configure",
11295
+ "project:auth:configure:hardis",
11296
+ "hardis:auth:project:configure",
11297
+ "auth:hardis:project:configure",
11298
+ "auth:project:hardis:configure",
11299
+ "auth:project:configure:hardis",
11300
+ "hardis:auth:configure:project",
11301
+ "auth:hardis:configure:project",
11302
+ "auth:configure:hardis:project",
11303
+ "auth:configure:project:hardis"
11304
+ ]
11305
+ },
11306
+ "hardis:project:convert:profilestopermsets": {
11307
+ "aliases": [],
11308
+ "args": {},
11309
+ "description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
11310
+ "examples": [
11311
+ "$ sf hardis:project:convert:profilestopermsets"
11312
+ ],
11313
+ "flags": {
11314
+ "json": {
11315
+ "description": "Format output as json.",
11316
+ "helpGroup": "GLOBAL",
11317
+ "name": "json",
11318
+ "allowNo": false,
11319
+ "type": "boolean"
11320
+ },
11321
+ "flags-dir": {
11322
+ "helpGroup": "GLOBAL",
11323
+ "name": "flags-dir",
11324
+ "summary": "Import flag values from a directory.",
11325
+ "hasDynamicHelp": false,
11326
+ "multiple": false,
11327
+ "type": "option"
11328
+ },
11329
+ "except": {
11330
+ "char": "e",
11331
+ "description": "List of filters",
11332
+ "name": "except",
11333
+ "default": [],
11334
+ "hasDynamicHelp": false,
11335
+ "multiple": true,
11336
+ "type": "option"
11337
+ },
11338
+ "debug": {
11339
+ "char": "d",
11340
+ "description": "Activate debug mode (more logs)",
11341
+ "name": "debug",
11342
+ "allowNo": false,
11343
+ "type": "boolean"
11344
+ },
11345
+ "websocket": {
11346
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11347
+ "name": "websocket",
11348
+ "hasDynamicHelp": false,
11349
+ "multiple": false,
11350
+ "type": "option"
11351
+ },
11352
+ "skipauth": {
11353
+ "description": "Skip authentication check when a default username is required",
11354
+ "name": "skipauth",
11355
+ "allowNo": false,
11356
+ "type": "boolean"
11357
+ }
11358
+ },
11359
+ "hasDynamicHelp": false,
11360
+ "hiddenAliases": [],
11361
+ "id": "hardis:project:convert:profilestopermsets",
11362
+ "pluginAlias": "sfdx-hardis",
11363
+ "pluginName": "sfdx-hardis",
11364
+ "pluginType": "core",
11365
+ "strict": true,
11366
+ "enableJsonFlag": true,
11367
+ "title": "Convert Profiles into Permission Sets",
11368
+ "requiresProject": true,
11369
+ "requiresSfdxPlugins": [
11370
+ "shane-sfdx-plugins"
11371
+ ],
11372
+ "isESM": true,
11373
+ "relativePath": [
11374
+ "lib",
11375
+ "commands",
11376
+ "hardis",
11377
+ "project",
11378
+ "convert",
11379
+ "profilestopermsets.js"
11380
+ ],
11381
+ "aliasPermutations": [],
11382
+ "permutations": [
11383
+ "hardis:project:convert:profilestopermsets",
11384
+ "project:hardis:convert:profilestopermsets",
11385
+ "project:convert:hardis:profilestopermsets",
11386
+ "project:convert:profilestopermsets:hardis",
11387
+ "hardis:convert:project:profilestopermsets",
11388
+ "convert:hardis:project:profilestopermsets",
11389
+ "convert:project:hardis:profilestopermsets",
11390
+ "convert:project:profilestopermsets:hardis",
11391
+ "hardis:convert:profilestopermsets:project",
11392
+ "convert:hardis:profilestopermsets:project",
11393
+ "convert:profilestopermsets:hardis:project",
11394
+ "convert:profilestopermsets:project:hardis",
11395
+ "hardis:project:profilestopermsets:convert",
11396
+ "project:hardis:profilestopermsets:convert",
11397
+ "project:profilestopermsets:hardis:convert",
11398
+ "project:profilestopermsets:convert:hardis",
11399
+ "hardis:profilestopermsets:project:convert",
11400
+ "profilestopermsets:hardis:project:convert",
11401
+ "profilestopermsets:project:hardis:convert",
11402
+ "profilestopermsets:project:convert:hardis",
11403
+ "hardis:profilestopermsets:convert:project",
11404
+ "profilestopermsets:hardis:convert:project",
11405
+ "profilestopermsets:convert:hardis:project",
11406
+ "profilestopermsets:convert:project:hardis"
11407
+ ]
11408
+ },
11409
11409
  "hardis:project:deploy:notify": {
11410
11410
  "aliases": [],
11411
11411
  "args": {},
@@ -11763,7 +11763,7 @@
11763
11763
  "pluginType": "core",
11764
11764
  "strict": true,
11765
11765
  "enableJsonFlag": true,
11766
- "title": "Simulate the deployment of a metadata in an org prompted to the user\nUsed by VsCode Extension",
11766
+ "title": "Simulate the deployment of metadata in an org prompted to the user.\nUsed by VS Code extension.",
11767
11767
  "requiresProject": true,
11768
11768
  "isESM": true,
11769
11769
  "relativePath": [
@@ -15369,5 +15369,5 @@
15369
15369
  ]
15370
15370
  }
15371
15371
  },
15372
- "version": "6.7.3"
15372
+ "version": "6.7.4"
15373
15373
  }