sfdx-hardis 6.16.1-beta202512161830.0 → 6.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +18 -6
  2. package/lib/commands/hardis/datacloud/extract/agentforce-conversations.d.ts +14 -0
  3. package/lib/commands/hardis/datacloud/extract/agentforce-conversations.js +283 -0
  4. package/lib/commands/hardis/datacloud/extract/agentforce-conversations.js.map +1 -0
  5. package/lib/commands/hardis/datacloud/extract/agentforce-feedback.d.ts +14 -0
  6. package/lib/commands/hardis/datacloud/extract/agentforce-feedback.js +331 -0
  7. package/lib/commands/hardis/datacloud/extract/agentforce-feedback.js.map +1 -0
  8. package/lib/commands/hardis/datacloud/sql-query.d.ts +14 -0
  9. package/lib/commands/hardis/datacloud/sql-query.js +145 -0
  10. package/lib/commands/hardis/datacloud/sql-query.js.map +1 -0
  11. package/lib/commands/hardis/org/select.js +1 -1
  12. package/lib/commands/hardis/org/select.js.map +1 -1
  13. package/lib/common/notifProvider/emailProvider.js +6 -1
  14. package/lib/common/notifProvider/emailProvider.js.map +1 -1
  15. package/lib/common/notifProvider/index.d.ts +2 -1
  16. package/lib/common/notifProvider/index.js.map +1 -1
  17. package/lib/common/notifProvider/notifProviderRoot.js +3 -0
  18. package/lib/common/notifProvider/notifProviderRoot.js.map +1 -1
  19. package/lib/common/utils/agentforceQueryUtils.d.ts +48 -0
  20. package/lib/common/utils/agentforceQueryUtils.js +373 -0
  21. package/lib/common/utils/agentforceQueryUtils.js.map +1 -0
  22. package/lib/common/utils/authUtils.js +16 -3
  23. package/lib/common/utils/authUtils.js.map +1 -1
  24. package/lib/common/utils/dataCloudUtils.d.ts +39 -0
  25. package/lib/common/utils/dataCloudUtils.js +279 -0
  26. package/lib/common/utils/dataCloudUtils.js.map +1 -0
  27. package/lib/common/utils/filesUtils.d.ts +12 -13
  28. package/lib/common/utils/filesUtils.js +114 -43
  29. package/lib/common/utils/filesUtils.js.map +1 -1
  30. package/lib/common/utils/orgUtils.js +5 -1
  31. package/lib/common/utils/orgUtils.js.map +1 -1
  32. package/lib/common/utils/utilsAgentforceQuery.d.ts +1 -0
  33. package/lib/common/utils/utilsAgentforceQuery.js +2 -0
  34. package/lib/common/utils/utilsAgentforceQuery.js.map +1 -0
  35. package/oclif.lock +697 -697
  36. package/oclif.manifest.json +1660 -1275
  37. package/package.json +5 -5
@@ -132,6 +132,101 @@
132
132
  "clear:cache:hardis"
133
133
  ]
134
134
  },
135
+ "hardis:auth:login": {
136
+ "aliases": [],
137
+ "args": {},
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
+ "examples": [
140
+ "$ sf hardis:auth:login",
141
+ "CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
142
+ ],
143
+ "flags": {
144
+ "json": {
145
+ "description": "Format output as json.",
146
+ "helpGroup": "GLOBAL",
147
+ "name": "json",
148
+ "allowNo": false,
149
+ "type": "boolean"
150
+ },
151
+ "flags-dir": {
152
+ "helpGroup": "GLOBAL",
153
+ "name": "flags-dir",
154
+ "summary": "Import flag values from a directory.",
155
+ "hasDynamicHelp": false,
156
+ "multiple": false,
157
+ "type": "option"
158
+ },
159
+ "instanceurl": {
160
+ "char": "r",
161
+ "description": "URL of org instance",
162
+ "name": "instanceurl",
163
+ "hasDynamicHelp": false,
164
+ "multiple": false,
165
+ "type": "option"
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
+ },
181
+ "debug": {
182
+ "char": "d",
183
+ "description": "Activate debug mode (more logs)",
184
+ "name": "debug",
185
+ "allowNo": false,
186
+ "type": "boolean"
187
+ },
188
+ "websocket": {
189
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
190
+ "name": "websocket",
191
+ "hasDynamicHelp": false,
192
+ "multiple": false,
193
+ "type": "option"
194
+ },
195
+ "skipauth": {
196
+ "description": "Skip authentication check when a default username is required",
197
+ "name": "skipauth",
198
+ "allowNo": false,
199
+ "type": "boolean"
200
+ }
201
+ },
202
+ "hasDynamicHelp": false,
203
+ "hiddenAliases": [],
204
+ "id": "hardis:auth:login",
205
+ "pluginAlias": "sfdx-hardis",
206
+ "pluginName": "sfdx-hardis",
207
+ "pluginType": "core",
208
+ "strict": true,
209
+ "enableJsonFlag": true,
210
+ "title": "Login",
211
+ "requiresProject": false,
212
+ "isESM": true,
213
+ "relativePath": [
214
+ "lib",
215
+ "commands",
216
+ "hardis",
217
+ "auth",
218
+ "login.js"
219
+ ],
220
+ "aliasPermutations": [],
221
+ "permutations": [
222
+ "hardis:auth:login",
223
+ "auth:hardis:login",
224
+ "auth:login:hardis",
225
+ "hardis:login:auth",
226
+ "login:hardis:auth",
227
+ "login:auth:hardis"
228
+ ]
229
+ },
135
230
  "hardis:config:get": {
136
231
  "aliases": [],
137
232
  "args": {},
@@ -218,13 +313,14 @@
218
313
  "get:config:hardis"
219
314
  ]
220
315
  },
221
- "hardis:auth:login": {
316
+ "hardis:datacloud:sql-query": {
222
317
  "aliases": [],
223
318
  "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",
319
+ "description": "\n## Command Behavior\n\n**Executes a SQL query against Salesforce Data Cloud and exports the results.**\n\nThis command lets you run ad-hoc or predefined SQL queries on Data Cloud objects, view the results in the CLI, and export them for further analysis.\n\nKey functionalities:\n\n- **Query input:** Accepts inline SQL via `-q`, a predefined saved query name, or an interactive prompt when no query is provided.\n- **Test shortcut:** `-q test` runs a sample query on `ssot__Account__dlm` (sorted by created date, limited to 5000 rows).\n- **Export:** Generates CSV and XLSX reports for the returned rows with auto-generated filenames (override with `--outputfile`).\n- **Logging:** Prints a JSON summary (excluding full records) and supports debug output via `--debug`.\n- **Org targeting:** Works with the provided or default org connection; respects websocket and skipauth flags.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Query resolution:**\n - If `-q` is provided, it is used directly (with a special `test` branch loading a canned query).\n - If absent, prompts the user to select from predefined queries on disk (via `listAvailableDataCloudQueries` / `loadDataCloudQueryFromFile`), or enter a custom query. Custom queries can be optionally saved locally (`saveDataCloudQueryToFile`).\n- **Execution:** Calls `dataCloudSqlQuery` with the resolved SQL against the target org connection.\n- **Output handling:** Logs the full result JSON to the terminal; emits a sanitized summary to `uxLog` (records removed for readability).\n- **File generation:** Uses `generateReportPath` to build the output path and `generateCsvFile` to produce CSV/XLSX exports with a `DataCloud Sql Query Results` title.\n- **CLI UX:** Employs `prompts` for interactive selection/input and `uxLog` for consistent colored logging with chalk.\n</details>\n",
225
320
  "examples": [
226
- "$ sf hardis:auth:login",
227
- "CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
321
+ "$ sf hardis:datacloud:sql-query",
322
+ "$ sf hardis:datacloud:sql-query -q \"SELECT ssot__Name__c, ssot__CreatedDate__c FROM ssot__Account__dlm LIMIT 10\"",
323
+ "$ sf hardis:datacloud:sql-query -q test"
228
324
  ],
229
325
  "flags": {
230
326
  "json": {
@@ -242,27 +338,21 @@
242
338
  "multiple": false,
243
339
  "type": "option"
244
340
  },
245
- "instanceurl": {
246
- "char": "r",
247
- "description": "URL of org instance",
248
- "name": "instanceurl",
341
+ "query": {
342
+ "char": "q",
343
+ "description": "Data Cloud query string",
344
+ "name": "query",
249
345
  "hasDynamicHelp": false,
250
346
  "multiple": false,
251
347
  "type": "option"
252
348
  },
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"
349
+ "outputfile": {
350
+ "char": "f",
351
+ "description": "Force the path and name of output report file. Must end with .csv",
352
+ "name": "outputfile",
353
+ "hasDynamicHelp": false,
354
+ "multiple": false,
355
+ "type": "option"
266
356
  },
267
357
  "debug": {
268
358
  "char": "d",
@@ -283,34 +373,49 @@
283
373
  "name": "skipauth",
284
374
  "allowNo": false,
285
375
  "type": "boolean"
376
+ },
377
+ "target-org": {
378
+ "aliases": [
379
+ "targetusername",
380
+ "u"
381
+ ],
382
+ "char": "o",
383
+ "deprecateAliases": true,
384
+ "name": "target-org",
385
+ "noCacheDefault": true,
386
+ "required": true,
387
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
388
+ "hasDynamicHelp": true,
389
+ "multiple": false,
390
+ "type": "option"
286
391
  }
287
392
  },
288
- "hasDynamicHelp": false,
393
+ "hasDynamicHelp": true,
289
394
  "hiddenAliases": [],
290
- "id": "hardis:auth:login",
395
+ "id": "hardis:datacloud:sql-query",
291
396
  "pluginAlias": "sfdx-hardis",
292
397
  "pluginName": "sfdx-hardis",
293
398
  "pluginType": "core",
294
399
  "strict": true,
295
400
  "enableJsonFlag": true,
296
- "title": "Login",
401
+ "title": "Execute a SQL query on Data Cloud",
297
402
  "requiresProject": false,
298
403
  "isESM": true,
299
404
  "relativePath": [
300
405
  "lib",
301
406
  "commands",
302
407
  "hardis",
303
- "auth",
304
- "login.js"
408
+ "datacloud",
409
+ "sql-query.js"
305
410
  ],
306
411
  "aliasPermutations": [],
307
412
  "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"
413
+ "hardis:datacloud:sql-query",
414
+ "datacloud:hardis:sql-query",
415
+ "datacloud:sql-query:hardis",
416
+ "hardis:sql-query:datacloud",
417
+ "sql-query:hardis:datacloud",
418
+ "sql-query:datacloud:hardis"
314
419
  ]
315
420
  },
316
421
  "hardis:doc:fieldusage": {
@@ -4422,12 +4527,12 @@
4422
4527
  "ws:work:hardis"
4423
4528
  ]
4424
4529
  },
4425
- "hardis:doc:extract:permsetgroups": {
4530
+ "hardis:datacloud:extract:agentforce-conversations": {
4426
4531
  "aliases": [],
4427
4532
  "args": {},
4428
- "description": "\n## Command Behavior\n\n**Extracts and documents Salesforce Permission Set Groups and their assigned Permission Sets.**\n\nThis command generates two types of output: a CSV file and a Markdown file, providing a clear overview of how Permission Set Groups are structured and what Permission Sets they contain within your Salesforce project. This is particularly useful for:\n\n- **Documentation:** Creating human-readable documentation of your permission architecture.\n- **Auditing:** Understanding the composition of permission sets for security and compliance checks.\n- **Analysis:** Gaining insights into how permissions are bundled and assigned in your Salesforce environment.\n\nThe generated CSV file provides a structured, machine-readable format, while the Markdown file offers a more descriptive, human-friendly view, including the group's name, label, description, and a list of its constituent permission sets.\n\n## Technical explanations\n\nThe command performs the following technical steps:\n\n- **File Discovery:** It uses `glob` to find all `.permissionsetgroup-meta.xml` files within the current working directory, respecting `.gitignore` patterns.\n- **XML Parsing:** For each discovered Permission Set Group XML file, it parses the XML content using `parseXmlFile` to extract relevant information such as the group's name, label, description, and the names of the Permission Sets it contains.\n- **Data Structuring:** The extracted data is then structured into a list of objects, making it easy to process.\n- **CSV Generation:** It constructs a CSV file with two columns: 'Permission set group' and 'Permission sets'. The 'Permission sets' column lists all assigned permission sets for each group, enclosed in quotes and separated by commas. The CSV file is saved to a temporary directory or a user-specified path.\n- **Markdown Generation:** It generates a Markdown file (`docs/permission-set-groups.md`) that includes a title, a table of contents, and detailed sections for each Permission Set Group. Each section lists the group's name, label, description, and a bulleted list of its assigned Permission Sets.\n- **File System Operations:** It uses `fs-extra` to ensure output directories exist and to write the generated CSV and Markdown files.\n- **VS Code Integration:** It uses `WebSocketClient.requestOpenFile` to automatically open the generated CSV and Markdown files in VS Code, enhancing the user experience.\n",
4533
+ "description": "\n## Command Behavior\n\n**Extracts Agentforce conversations data from Data Cloud and generates a detailed report.**\n\nThis command allows you to retrieve and analyze conversations between users and Agentforce agents. It fetches conversation details, including transcripts, user utterances, agent responses, and any associated feedback.\n\nKey functionalities:\n\n- **Data Extraction:** Queries Data Cloud for Agentforce conversation records.\n- **Transcript Retrieval:** Fetches full conversation transcripts associated with the sessions.\n- **Filtering:** Supports filtering by date range (from/to) or a rolling window (last N days).\n- **Report Generation:** Creates a CSV and XLSX report containing:\n - User information\n - Date and time\n - Full conversation transcript\n - Feedback sentiment and message (if available)\n - Direct link to the conversation in Salesforce\n- **Link Generation:** Generates clickable URLs to view the conversation in the Agentforce Analytics dashboard.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Data Cloud Query:** Executes a SQL query against Data Cloud tables (`GenAIGeneration__dlm`, `GenAIGatewayRequest__dlm`, etc.) to retrieve conversation metadata and individual turns.\n- **Session Management:** Extracts session IDs from the initial query results.\n- **Transcript Fetching:** Asynchronously fetches full conversation transcripts for the identified sessions in chunks to handle large volumes efficiently.\n- **Data Merging:** Combines the SQL query results with the fetched transcripts, prioritizing full transcripts over individual turn data when available.\n- **URL Construction:** dynamically builds deep links to the Salesforce Lightning Experience for each conversation based on the org's instance URL and conversation ID.\n- **File Output:** Uses `generateCsvFile` to output the processed data into CSV and XLSX formats with custom column widths and formatting.\n- **Exclusion Filters:** Supports excluding specific conversations or sessions via environment variables `AGENTFORCE_FEEDBACK_EXCLUDED_CONV_IDS` and `AGENTFORCE_EXCLUDED_SESSION_IDS` (comma-separated IDs).\n</details>\n",
4429
4534
  "examples": [
4430
- "$ sf hardis:doc:extract:permsetgroups"
4535
+ "$ sf hardis:datacloud:extract:agentforce-conversations"
4431
4536
  ],
4432
4537
  "flags": {
4433
4538
  "json": {
@@ -4460,6 +4565,27 @@
4460
4565
  "allowNo": false,
4461
4566
  "type": "boolean"
4462
4567
  },
4568
+ "date-from": {
4569
+ "description": "Optional ISO-8601 timestamp (UTC) to include conversations starting from this date",
4570
+ "name": "date-from",
4571
+ "hasDynamicHelp": false,
4572
+ "multiple": false,
4573
+ "type": "option"
4574
+ },
4575
+ "date-to": {
4576
+ "description": "Optional ISO-8601 timestamp (UTC) to include conversations up to this date",
4577
+ "name": "date-to",
4578
+ "hasDynamicHelp": false,
4579
+ "multiple": false,
4580
+ "type": "option"
4581
+ },
4582
+ "last-n-days": {
4583
+ "description": "Optional rolling window (days) to include only the most recent conversations",
4584
+ "name": "last-n-days",
4585
+ "hasDynamicHelp": false,
4586
+ "multiple": false,
4587
+ "type": "option"
4588
+ },
4463
4589
  "websocket": {
4464
4590
  "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
4465
4591
  "name": "websocket",
@@ -4472,61 +4598,78 @@
4472
4598
  "name": "skipauth",
4473
4599
  "allowNo": false,
4474
4600
  "type": "boolean"
4601
+ },
4602
+ "target-org": {
4603
+ "aliases": [
4604
+ "targetusername",
4605
+ "u"
4606
+ ],
4607
+ "char": "o",
4608
+ "deprecateAliases": true,
4609
+ "name": "target-org",
4610
+ "noCacheDefault": true,
4611
+ "required": true,
4612
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
4613
+ "hasDynamicHelp": true,
4614
+ "multiple": false,
4615
+ "type": "option"
4475
4616
  }
4476
4617
  },
4477
- "hasDynamicHelp": false,
4618
+ "hasDynamicHelp": true,
4478
4619
  "hiddenAliases": [],
4479
- "id": "hardis:doc:extract:permsetgroups",
4620
+ "id": "hardis:datacloud:extract:agentforce-conversations",
4480
4621
  "pluginAlias": "sfdx-hardis",
4481
4622
  "pluginName": "sfdx-hardis",
4482
4623
  "pluginType": "core",
4483
4624
  "strict": true,
4484
4625
  "enableJsonFlag": true,
4485
- "title": "Generate project documentation",
4486
- "requiresProject": true,
4626
+ "title": "Extract Agentforce Conversations Data from Data Cloud",
4627
+ "requiresProject": false,
4487
4628
  "isESM": true,
4488
4629
  "relativePath": [
4489
4630
  "lib",
4490
4631
  "commands",
4491
4632
  "hardis",
4492
- "doc",
4633
+ "datacloud",
4493
4634
  "extract",
4494
- "permsetgroups.js"
4635
+ "agentforce-conversations.js"
4495
4636
  ],
4496
4637
  "aliasPermutations": [],
4497
4638
  "permutations": [
4498
- "hardis:doc:extract:permsetgroups",
4499
- "doc:hardis:extract:permsetgroups",
4500
- "doc:extract:hardis:permsetgroups",
4501
- "doc:extract:permsetgroups:hardis",
4502
- "hardis:extract:doc:permsetgroups",
4503
- "extract:hardis:doc:permsetgroups",
4504
- "extract:doc:hardis:permsetgroups",
4505
- "extract:doc:permsetgroups:hardis",
4506
- "hardis:extract:permsetgroups:doc",
4507
- "extract:hardis:permsetgroups:doc",
4508
- "extract:permsetgroups:hardis:doc",
4509
- "extract:permsetgroups:doc:hardis",
4510
- "hardis:doc:permsetgroups:extract",
4511
- "doc:hardis:permsetgroups:extract",
4512
- "doc:permsetgroups:hardis:extract",
4513
- "doc:permsetgroups:extract:hardis",
4514
- "hardis:permsetgroups:doc:extract",
4515
- "permsetgroups:hardis:doc:extract",
4516
- "permsetgroups:doc:hardis:extract",
4517
- "permsetgroups:doc:extract:hardis",
4518
- "hardis:permsetgroups:extract:doc",
4519
- "permsetgroups:hardis:extract:doc",
4520
- "permsetgroups:extract:hardis:doc",
4521
- "permsetgroups:extract:doc:hardis"
4522
- ]
4523
- },
4524
- "hardis:doc:plugin:generate": {
4639
+ "hardis:datacloud:extract:agentforce-conversations",
4640
+ "datacloud:hardis:extract:agentforce-conversations",
4641
+ "datacloud:extract:hardis:agentforce-conversations",
4642
+ "datacloud:extract:agentforce-conversations:hardis",
4643
+ "hardis:extract:datacloud:agentforce-conversations",
4644
+ "extract:hardis:datacloud:agentforce-conversations",
4645
+ "extract:datacloud:hardis:agentforce-conversations",
4646
+ "extract:datacloud:agentforce-conversations:hardis",
4647
+ "hardis:extract:agentforce-conversations:datacloud",
4648
+ "extract:hardis:agentforce-conversations:datacloud",
4649
+ "extract:agentforce-conversations:hardis:datacloud",
4650
+ "extract:agentforce-conversations:datacloud:hardis",
4651
+ "hardis:datacloud:agentforce-conversations:extract",
4652
+ "datacloud:hardis:agentforce-conversations:extract",
4653
+ "datacloud:agentforce-conversations:hardis:extract",
4654
+ "datacloud:agentforce-conversations:extract:hardis",
4655
+ "hardis:agentforce-conversations:datacloud:extract",
4656
+ "agentforce-conversations:hardis:datacloud:extract",
4657
+ "agentforce-conversations:datacloud:hardis:extract",
4658
+ "agentforce-conversations:datacloud:extract:hardis",
4659
+ "hardis:agentforce-conversations:extract:datacloud",
4660
+ "agentforce-conversations:hardis:extract:datacloud",
4661
+ "agentforce-conversations:extract:hardis:datacloud",
4662
+ "agentforce-conversations:extract:datacloud:hardis"
4663
+ ]
4664
+ },
4665
+ "hardis:datacloud:extract:agentforce-feedback": {
4525
4666
  "aliases": [],
4526
4667
  "args": {},
4527
- "description": "\n## Command Behavior\n\n**Generates Markdown documentation for an SF CLI plugin, ready for conversion into HTML with MkDocs.**\n\nThis command automates the creation of comprehensive documentation for your Salesforce CLI plugin. It processes your plugin's commands and their flags to generate structured Markdown files, which can then be used with MkDocs to produce a professional-looking website.\n\nKey functionalities:\n\n- **Command Documentation:** Generates a dedicated Markdown file for each command, including its description, parameters (flags), and examples.\n- **Index and Commands Pages:** Creates an `index.md` and `commands.md` file that list all available commands, providing an overview and easy navigation.\n- **MkDocs Integration:** Sets up the basic MkDocs project structure and updates the `mkdocs.yml` navigation to include the generated command documentation.\n- **Default File Copying:** Copies essential MkDocs configuration files and GitHub Actions workflows to your project, streamlining the setup for continuous documentation deployment.\n\n**Post-Generation Steps:**\n\nAfter the initial run, you will need to manually update:\n\n- `mkdocs.yml`: Customize the project title, theme, and other MkDocs settings.\n- `.github/workflows/build-deploy-docs.yml`: Configure the GitHub Actions workflow for automatic documentation deployment.\n- `docs/javascripts/gtag.js`: If desired, set up Google Analytics tracking.\n\nFinally, activate GitHub Pages with `gh_pages` as the target branch. This will enable automatic documentation rebuilding and publishing to GitHub Pages upon each merge into your `master`/`main` branch.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Plugin Configuration Loading:** It loads the SF CLI plugin's configuration using `@oclif/core`'s `Config.load()`, which provides access to all registered commands and their metadata.\n- **Command Iteration:** It iterates through each command defined in the plugin's configuration.\n- **Markdown File Generation:** For each command, it constructs a Markdown file (`.md`) containing:\n - The command ID as the main heading.\n - The command's `description` property.\n - A table of parameters (flags), including their name, type, description, default value, required status, and available options. It dynamically extracts this information from the command's `flags` property.\n - Code blocks for each example provided in the command's `examples` property.\n- **Navigation Structure:** It builds a nested JavaScript object (`commandsNav`) that mirrors the command hierarchy, which is then converted to YAML and inserted into `mkdocs.yml` to create the navigation menu.\n- **Index and Commands Page Generation:** It reads the project's `README.md` and extracts relevant sections to create the `index.md` file. It also generates a separate `commands.md` file listing all commands.\n- **File System Operations:** It uses `fs-extra` to create directories, copy default MkDocs files (`defaults/mkdocs`), and write the generated Markdown and YAML files.\n- **YAML Serialization:** It uses `js-yaml` to serialize the navigation object into YAML format for `mkdocs.yml`.\n</details>\n",
4668
+ "description": "\n## Command Behavior\n\n**Extracts Agentforce feedback data (Good/Bad) from Data Cloud and sends notifications.**\n\nThis command focuses on retrieving explicit feedback provided by users during or after Agentforce conversations. It helps in monitoring agent performance and user satisfaction by aggregating positive and negative feedback.\n\nKey functionalities:\n\n- **Feedback Extraction:** Queries Data Cloud specifically for conversations where feedback (GOOD or BAD) was recorded.\n- **Transcript Context:** Retrieves the full conversation transcript to provide context for the feedback.\n- **Filtering:** Supports filtering by date range or rolling window.\n- **Report Generation:** Generates a CSV and XLSX report detailing:\n - User and Date\n - Feedback type (GOOD/BAD) and message\n - Full conversation context\n - Direct link to the conversation\n- **Notifications:** Sends a summary notification (e.g., to Slack, Teams) with the count of Good vs. Bad feedback and attaches the report.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Targeted Query:** Executes a SQL query filtering `GenAIFeedback__dlm` for 'GOOD' or 'BAD' values, joining with generation and session tables.\n- **Transcript Enrichment:** Fetches full transcripts for the sessions associated with the feedback to provide a complete view of the interaction.\n- **Deduplication:** Implements logic to deduplicate feedback records, ensuring the most recent feedback for a conversation is used.\n- **Statistics Calculation:** Computes aggregate statistics (count of Good vs. Bad feedback) for reporting.\n- **Notification Integration:** Uses `NotifProvider` to broadcast the feedback summary and the generated report file to configured channels (Slack, MS Teams, etc.).\n- **Exclusion Filters:** Supports excluding specific conversations or sessions via environment variables `AGENTFORCE_FEEDBACK_EXCLUDED_CONV_IDS` and `AGENTFORCE_EXCLUDED_SESSION_IDS` (comma-separated IDs).\n</details>\n",
4528
4669
  "examples": [
4529
- "$ sf hardis:doc:plugin:generate"
4670
+ "$ sf hardis:datacloud:extract:agentforce-feedback",
4671
+ "$ sf hardis:datacloud:extract:agentforce-feedback --target-org myorg@example.com",
4672
+ "$ sf hardis:datacloud:extract:agentforce-feedback --outputfile ./reports/agentforce-feedback.csv"
4530
4673
  ],
4531
4674
  "flags": {
4532
4675
  "json": {
@@ -4544,6 +4687,14 @@
4544
4687
  "multiple": false,
4545
4688
  "type": "option"
4546
4689
  },
4690
+ "outputfile": {
4691
+ "char": "f",
4692
+ "description": "Force the path and name of output report file. Must end with .csv",
4693
+ "name": "outputfile",
4694
+ "hasDynamicHelp": false,
4695
+ "multiple": false,
4696
+ "type": "option"
4697
+ },
4547
4698
  "debug": {
4548
4699
  "char": "d",
4549
4700
  "description": "Activate debug mode (more logs)",
@@ -4551,6 +4702,35 @@
4551
4702
  "allowNo": false,
4552
4703
  "type": "boolean"
4553
4704
  },
4705
+ "conversation-time-filter": {
4706
+ "description": "Time filter (days) appended to the Lightning analytics URL when generating conversation links",
4707
+ "name": "conversation-time-filter",
4708
+ "default": 30,
4709
+ "hasDynamicHelp": false,
4710
+ "multiple": false,
4711
+ "type": "option"
4712
+ },
4713
+ "date-from": {
4714
+ "description": "Optional ISO-8601 timestamp (UTC) to include conversations starting from this date",
4715
+ "name": "date-from",
4716
+ "hasDynamicHelp": false,
4717
+ "multiple": false,
4718
+ "type": "option"
4719
+ },
4720
+ "date-to": {
4721
+ "description": "Optional ISO-8601 timestamp (UTC) to include conversations up to this date",
4722
+ "name": "date-to",
4723
+ "hasDynamicHelp": false,
4724
+ "multiple": false,
4725
+ "type": "option"
4726
+ },
4727
+ "last-n-days": {
4728
+ "description": "Optional rolling window (days) to include only the most recent conversations",
4729
+ "name": "last-n-days",
4730
+ "hasDynamicHelp": false,
4731
+ "multiple": false,
4732
+ "type": "option"
4733
+ },
4554
4734
  "websocket": {
4555
4735
  "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
4556
4736
  "name": "websocket",
@@ -4563,18 +4743,223 @@
4563
4743
  "name": "skipauth",
4564
4744
  "allowNo": false,
4565
4745
  "type": "boolean"
4566
- }
4567
- },
4568
- "hasDynamicHelp": false,
4569
- "hiddenAliases": [],
4570
- "id": "hardis:doc:plugin:generate",
4571
- "pluginAlias": "sfdx-hardis",
4572
- "pluginName": "sfdx-hardis",
4573
- "pluginType": "core",
4574
- "strict": true,
4575
- "enableJsonFlag": true,
4576
- "title": "Generate SF Cli Plugin Documentation",
4577
- "requiresProject": false,
4746
+ },
4747
+ "target-org": {
4748
+ "aliases": [
4749
+ "targetusername",
4750
+ "u"
4751
+ ],
4752
+ "char": "o",
4753
+ "deprecateAliases": true,
4754
+ "name": "target-org",
4755
+ "noCacheDefault": true,
4756
+ "required": true,
4757
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
4758
+ "hasDynamicHelp": true,
4759
+ "multiple": false,
4760
+ "type": "option"
4761
+ }
4762
+ },
4763
+ "hasDynamicHelp": true,
4764
+ "hiddenAliases": [],
4765
+ "id": "hardis:datacloud:extract:agentforce-feedback",
4766
+ "pluginAlias": "sfdx-hardis",
4767
+ "pluginName": "sfdx-hardis",
4768
+ "pluginType": "core",
4769
+ "strict": true,
4770
+ "enableJsonFlag": true,
4771
+ "title": "Extract Agentforce Feedback Data from Data Cloud",
4772
+ "requiresProject": false,
4773
+ "isESM": true,
4774
+ "relativePath": [
4775
+ "lib",
4776
+ "commands",
4777
+ "hardis",
4778
+ "datacloud",
4779
+ "extract",
4780
+ "agentforce-feedback.js"
4781
+ ],
4782
+ "aliasPermutations": [],
4783
+ "permutations": [
4784
+ "hardis:datacloud:extract:agentforce-feedback",
4785
+ "datacloud:hardis:extract:agentforce-feedback",
4786
+ "datacloud:extract:hardis:agentforce-feedback",
4787
+ "datacloud:extract:agentforce-feedback:hardis",
4788
+ "hardis:extract:datacloud:agentforce-feedback",
4789
+ "extract:hardis:datacloud:agentforce-feedback",
4790
+ "extract:datacloud:hardis:agentforce-feedback",
4791
+ "extract:datacloud:agentforce-feedback:hardis",
4792
+ "hardis:extract:agentforce-feedback:datacloud",
4793
+ "extract:hardis:agentforce-feedback:datacloud",
4794
+ "extract:agentforce-feedback:hardis:datacloud",
4795
+ "extract:agentforce-feedback:datacloud:hardis",
4796
+ "hardis:datacloud:agentforce-feedback:extract",
4797
+ "datacloud:hardis:agentforce-feedback:extract",
4798
+ "datacloud:agentforce-feedback:hardis:extract",
4799
+ "datacloud:agentforce-feedback:extract:hardis",
4800
+ "hardis:agentforce-feedback:datacloud:extract",
4801
+ "agentforce-feedback:hardis:datacloud:extract",
4802
+ "agentforce-feedback:datacloud:hardis:extract",
4803
+ "agentforce-feedback:datacloud:extract:hardis",
4804
+ "hardis:agentforce-feedback:extract:datacloud",
4805
+ "agentforce-feedback:hardis:extract:datacloud",
4806
+ "agentforce-feedback:extract:hardis:datacloud",
4807
+ "agentforce-feedback:extract:datacloud:hardis"
4808
+ ]
4809
+ },
4810
+ "hardis:doc:extract:permsetgroups": {
4811
+ "aliases": [],
4812
+ "args": {},
4813
+ "description": "\n## Command Behavior\n\n**Extracts and documents Salesforce Permission Set Groups and their assigned Permission Sets.**\n\nThis command generates two types of output: a CSV file and a Markdown file, providing a clear overview of how Permission Set Groups are structured and what Permission Sets they contain within your Salesforce project. This is particularly useful for:\n\n- **Documentation:** Creating human-readable documentation of your permission architecture.\n- **Auditing:** Understanding the composition of permission sets for security and compliance checks.\n- **Analysis:** Gaining insights into how permissions are bundled and assigned in your Salesforce environment.\n\nThe generated CSV file provides a structured, machine-readable format, while the Markdown file offers a more descriptive, human-friendly view, including the group's name, label, description, and a list of its constituent permission sets.\n\n## Technical explanations\n\nThe command performs the following technical steps:\n\n- **File Discovery:** It uses `glob` to find all `.permissionsetgroup-meta.xml` files within the current working directory, respecting `.gitignore` patterns.\n- **XML Parsing:** For each discovered Permission Set Group XML file, it parses the XML content using `parseXmlFile` to extract relevant information such as the group's name, label, description, and the names of the Permission Sets it contains.\n- **Data Structuring:** The extracted data is then structured into a list of objects, making it easy to process.\n- **CSV Generation:** It constructs a CSV file with two columns: 'Permission set group' and 'Permission sets'. The 'Permission sets' column lists all assigned permission sets for each group, enclosed in quotes and separated by commas. The CSV file is saved to a temporary directory or a user-specified path.\n- **Markdown Generation:** It generates a Markdown file (`docs/permission-set-groups.md`) that includes a title, a table of contents, and detailed sections for each Permission Set Group. Each section lists the group's name, label, description, and a bulleted list of its assigned Permission Sets.\n- **File System Operations:** It uses `fs-extra` to ensure output directories exist and to write the generated CSV and Markdown files.\n- **VS Code Integration:** It uses `WebSocketClient.requestOpenFile` to automatically open the generated CSV and Markdown files in VS Code, enhancing the user experience.\n",
4814
+ "examples": [
4815
+ "$ sf hardis:doc:extract:permsetgroups"
4816
+ ],
4817
+ "flags": {
4818
+ "json": {
4819
+ "description": "Format output as json.",
4820
+ "helpGroup": "GLOBAL",
4821
+ "name": "json",
4822
+ "allowNo": false,
4823
+ "type": "boolean"
4824
+ },
4825
+ "flags-dir": {
4826
+ "helpGroup": "GLOBAL",
4827
+ "name": "flags-dir",
4828
+ "summary": "Import flag values from a directory.",
4829
+ "hasDynamicHelp": false,
4830
+ "multiple": false,
4831
+ "type": "option"
4832
+ },
4833
+ "outputfile": {
4834
+ "char": "f",
4835
+ "description": "Force the path and name of output report file. Must end with .csv",
4836
+ "name": "outputfile",
4837
+ "hasDynamicHelp": false,
4838
+ "multiple": false,
4839
+ "type": "option"
4840
+ },
4841
+ "debug": {
4842
+ "char": "d",
4843
+ "description": "Activate debug mode (more logs)",
4844
+ "name": "debug",
4845
+ "allowNo": false,
4846
+ "type": "boolean"
4847
+ },
4848
+ "websocket": {
4849
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
4850
+ "name": "websocket",
4851
+ "hasDynamicHelp": false,
4852
+ "multiple": false,
4853
+ "type": "option"
4854
+ },
4855
+ "skipauth": {
4856
+ "description": "Skip authentication check when a default username is required",
4857
+ "name": "skipauth",
4858
+ "allowNo": false,
4859
+ "type": "boolean"
4860
+ }
4861
+ },
4862
+ "hasDynamicHelp": false,
4863
+ "hiddenAliases": [],
4864
+ "id": "hardis:doc:extract:permsetgroups",
4865
+ "pluginAlias": "sfdx-hardis",
4866
+ "pluginName": "sfdx-hardis",
4867
+ "pluginType": "core",
4868
+ "strict": true,
4869
+ "enableJsonFlag": true,
4870
+ "title": "Generate project documentation",
4871
+ "requiresProject": true,
4872
+ "isESM": true,
4873
+ "relativePath": [
4874
+ "lib",
4875
+ "commands",
4876
+ "hardis",
4877
+ "doc",
4878
+ "extract",
4879
+ "permsetgroups.js"
4880
+ ],
4881
+ "aliasPermutations": [],
4882
+ "permutations": [
4883
+ "hardis:doc:extract:permsetgroups",
4884
+ "doc:hardis:extract:permsetgroups",
4885
+ "doc:extract:hardis:permsetgroups",
4886
+ "doc:extract:permsetgroups:hardis",
4887
+ "hardis:extract:doc:permsetgroups",
4888
+ "extract:hardis:doc:permsetgroups",
4889
+ "extract:doc:hardis:permsetgroups",
4890
+ "extract:doc:permsetgroups:hardis",
4891
+ "hardis:extract:permsetgroups:doc",
4892
+ "extract:hardis:permsetgroups:doc",
4893
+ "extract:permsetgroups:hardis:doc",
4894
+ "extract:permsetgroups:doc:hardis",
4895
+ "hardis:doc:permsetgroups:extract",
4896
+ "doc:hardis:permsetgroups:extract",
4897
+ "doc:permsetgroups:hardis:extract",
4898
+ "doc:permsetgroups:extract:hardis",
4899
+ "hardis:permsetgroups:doc:extract",
4900
+ "permsetgroups:hardis:doc:extract",
4901
+ "permsetgroups:doc:hardis:extract",
4902
+ "permsetgroups:doc:extract:hardis",
4903
+ "hardis:permsetgroups:extract:doc",
4904
+ "permsetgroups:hardis:extract:doc",
4905
+ "permsetgroups:extract:hardis:doc",
4906
+ "permsetgroups:extract:doc:hardis"
4907
+ ]
4908
+ },
4909
+ "hardis:doc:plugin:generate": {
4910
+ "aliases": [],
4911
+ "args": {},
4912
+ "description": "\n## Command Behavior\n\n**Generates Markdown documentation for an SF CLI plugin, ready for conversion into HTML with MkDocs.**\n\nThis command automates the creation of comprehensive documentation for your Salesforce CLI plugin. It processes your plugin's commands and their flags to generate structured Markdown files, which can then be used with MkDocs to produce a professional-looking website.\n\nKey functionalities:\n\n- **Command Documentation:** Generates a dedicated Markdown file for each command, including its description, parameters (flags), and examples.\n- **Index and Commands Pages:** Creates an `index.md` and `commands.md` file that list all available commands, providing an overview and easy navigation.\n- **MkDocs Integration:** Sets up the basic MkDocs project structure and updates the `mkdocs.yml` navigation to include the generated command documentation.\n- **Default File Copying:** Copies essential MkDocs configuration files and GitHub Actions workflows to your project, streamlining the setup for continuous documentation deployment.\n\n**Post-Generation Steps:**\n\nAfter the initial run, you will need to manually update:\n\n- `mkdocs.yml`: Customize the project title, theme, and other MkDocs settings.\n- `.github/workflows/build-deploy-docs.yml`: Configure the GitHub Actions workflow for automatic documentation deployment.\n- `docs/javascripts/gtag.js`: If desired, set up Google Analytics tracking.\n\nFinally, activate GitHub Pages with `gh_pages` as the target branch. This will enable automatic documentation rebuilding and publishing to GitHub Pages upon each merge into your `master`/`main` branch.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Plugin Configuration Loading:** It loads the SF CLI plugin's configuration using `@oclif/core`'s `Config.load()`, which provides access to all registered commands and their metadata.\n- **Command Iteration:** It iterates through each command defined in the plugin's configuration.\n- **Markdown File Generation:** For each command, it constructs a Markdown file (`.md`) containing:\n - The command ID as the main heading.\n - The command's `description` property.\n - A table of parameters (flags), including their name, type, description, default value, required status, and available options. It dynamically extracts this information from the command's `flags` property.\n - Code blocks for each example provided in the command's `examples` property.\n- **Navigation Structure:** It builds a nested JavaScript object (`commandsNav`) that mirrors the command hierarchy, which is then converted to YAML and inserted into `mkdocs.yml` to create the navigation menu.\n- **Index and Commands Page Generation:** It reads the project's `README.md` and extracts relevant sections to create the `index.md` file. It also generates a separate `commands.md` file listing all commands.\n- **File System Operations:** It uses `fs-extra` to create directories, copy default MkDocs files (`defaults/mkdocs`), and write the generated Markdown and YAML files.\n- **YAML Serialization:** It uses `js-yaml` to serialize the navigation object into YAML format for `mkdocs.yml`.\n</details>\n",
4913
+ "examples": [
4914
+ "$ sf hardis:doc:plugin:generate"
4915
+ ],
4916
+ "flags": {
4917
+ "json": {
4918
+ "description": "Format output as json.",
4919
+ "helpGroup": "GLOBAL",
4920
+ "name": "json",
4921
+ "allowNo": false,
4922
+ "type": "boolean"
4923
+ },
4924
+ "flags-dir": {
4925
+ "helpGroup": "GLOBAL",
4926
+ "name": "flags-dir",
4927
+ "summary": "Import flag values from a directory.",
4928
+ "hasDynamicHelp": false,
4929
+ "multiple": false,
4930
+ "type": "option"
4931
+ },
4932
+ "debug": {
4933
+ "char": "d",
4934
+ "description": "Activate debug mode (more logs)",
4935
+ "name": "debug",
4936
+ "allowNo": false,
4937
+ "type": "boolean"
4938
+ },
4939
+ "websocket": {
4940
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
4941
+ "name": "websocket",
4942
+ "hasDynamicHelp": false,
4943
+ "multiple": false,
4944
+ "type": "option"
4945
+ },
4946
+ "skipauth": {
4947
+ "description": "Skip authentication check when a default username is required",
4948
+ "name": "skipauth",
4949
+ "allowNo": false,
4950
+ "type": "boolean"
4951
+ }
4952
+ },
4953
+ "hasDynamicHelp": false,
4954
+ "hiddenAliases": [],
4955
+ "id": "hardis:doc:plugin:generate",
4956
+ "pluginAlias": "sfdx-hardis",
4957
+ "pluginName": "sfdx-hardis",
4958
+ "pluginType": "core",
4959
+ "strict": true,
4960
+ "enableJsonFlag": true,
4961
+ "title": "Generate SF Cli Plugin Documentation",
4962
+ "requiresProject": false,
4578
4963
  "isESM": true,
4579
4964
  "relativePath": [
4580
4965
  "lib",
@@ -5539,12 +5924,15 @@
5539
5924
  "import:data:org:hardis"
5540
5925
  ]
5541
5926
  },
5542
- "hardis:org:files:export": {
5927
+ "hardis:org:diagnose:audittrail": {
5543
5928
  "aliases": [],
5544
5929
  "args": {},
5545
- "description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
5930
+ "description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nAlso detects updates of Custom Settings values (disable by defining `SKIP_AUDIT_TRAIL_CUSTOM_SETTINGS=true`)\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n - revokeduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n - CSPUserDisabled\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- External Objects\n - xdsEncryptedFieldChange\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n - siqUserAcceptedTOS\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedofflineuseroffon\n - changedprofileforuserstdtostd\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserAdminVerifiedStatusVerified\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedusername\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - changedUserPhoneVerifiedStatusVerified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suNetworkAdminLogin\n - suNetworkAdminLogout\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\n## Excel output example\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-monitoring-audittrail-excel.jpg)\n\n## Local output example\n\n![](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/screenshot-monitoring-audittrail-local.jpg)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-suspect-audit-trail/) and can output Grafana, Slack and MsTeams Notifications.\n",
5546
5931
  "examples": [
5547
- "$ sf hardis:org:files:export"
5932
+ "$ sf hardis:org:diagnose:audittrail",
5933
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
5934
+ "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
5935
+ "$ sf hardis:org:diagnose:audittrail --lastndays 5"
5548
5936
  ],
5549
5937
  "flags": {
5550
5938
  "json": {
@@ -5562,48 +5950,30 @@
5562
5950
  "multiple": false,
5563
5951
  "type": "option"
5564
5952
  },
5565
- "path": {
5566
- "char": "p",
5567
- "description": "Path to the file export project",
5568
- "name": "path",
5569
- "hasDynamicHelp": false,
5570
- "multiple": false,
5571
- "type": "option"
5572
- },
5573
- "chunksize": {
5574
- "char": "c",
5575
- "description": "Number of records to add in a chunk before it is processed",
5576
- "name": "chunksize",
5577
- "default": 1000,
5953
+ "excludeusers": {
5954
+ "char": "e",
5955
+ "description": "Comma-separated list of usernames to exclude",
5956
+ "name": "excludeusers",
5578
5957
  "hasDynamicHelp": false,
5579
5958
  "multiple": false,
5580
5959
  "type": "option"
5581
5960
  },
5582
- "polltimeout": {
5961
+ "lastndays": {
5583
5962
  "char": "t",
5584
- "description": "Timeout in MS for Bulk API calls",
5585
- "name": "polltimeout",
5586
- "default": 300000,
5963
+ "description": "Number of days to extract from today (included)",
5964
+ "name": "lastndays",
5587
5965
  "hasDynamicHelp": false,
5588
5966
  "multiple": false,
5589
5967
  "type": "option"
5590
5968
  },
5591
- "startchunknumber": {
5592
- "char": "s",
5593
- "description": "Chunk number to start from",
5594
- "name": "startchunknumber",
5595
- "default": 0,
5969
+ "outputfile": {
5970
+ "char": "f",
5971
+ "description": "Force the path and name of output report file. Must end with .csv",
5972
+ "name": "outputfile",
5596
5973
  "hasDynamicHelp": false,
5597
5974
  "multiple": false,
5598
5975
  "type": "option"
5599
5976
  },
5600
- "resume": {
5601
- "char": "r",
5602
- "description": "Resume previous export by checking existing files (default in CI)",
5603
- "name": "resume",
5604
- "allowNo": false,
5605
- "type": "boolean"
5606
- },
5607
5977
  "debug": {
5608
5978
  "char": "d",
5609
5979
  "description": "Activate debug mode (more logs)",
@@ -5642,13 +6012,13 @@
5642
6012
  },
5643
6013
  "hasDynamicHelp": true,
5644
6014
  "hiddenAliases": [],
5645
- "id": "hardis:org:files:export",
6015
+ "id": "hardis:org:diagnose:audittrail",
5646
6016
  "pluginAlias": "sfdx-hardis",
5647
6017
  "pluginName": "sfdx-hardis",
5648
6018
  "pluginType": "core",
5649
6019
  "strict": true,
5650
6020
  "enableJsonFlag": true,
5651
- "title": "Export files",
6021
+ "title": "Diagnose content of Setup Audit Trail",
5652
6022
  "requiresProject": false,
5653
6023
  "isESM": true,
5654
6024
  "relativePath": [
@@ -5656,43 +6026,43 @@
5656
6026
  "commands",
5657
6027
  "hardis",
5658
6028
  "org",
5659
- "files",
5660
- "export.js"
6029
+ "diagnose",
6030
+ "audittrail.js"
5661
6031
  ],
5662
6032
  "aliasPermutations": [],
5663
6033
  "permutations": [
5664
- "hardis:org:files:export",
5665
- "org:hardis:files:export",
5666
- "org:files:hardis:export",
5667
- "org:files:export:hardis",
5668
- "hardis:files:org:export",
5669
- "files:hardis:org:export",
5670
- "files:org:hardis:export",
5671
- "files:org:export:hardis",
5672
- "hardis:files:export:org",
5673
- "files:hardis:export:org",
5674
- "files:export:hardis:org",
5675
- "files:export:org:hardis",
5676
- "hardis:org:export:files",
5677
- "org:hardis:export:files",
5678
- "org:export:hardis:files",
5679
- "org:export:files:hardis",
5680
- "hardis:export:org:files",
5681
- "export:hardis:org:files",
5682
- "export:org:hardis:files",
5683
- "export:org:files:hardis",
5684
- "hardis:export:files:org",
5685
- "export:hardis:files:org",
5686
- "export:files:hardis:org",
5687
- "export:files:org:hardis"
6034
+ "hardis:org:diagnose:audittrail",
6035
+ "org:hardis:diagnose:audittrail",
6036
+ "org:diagnose:hardis:audittrail",
6037
+ "org:diagnose:audittrail:hardis",
6038
+ "hardis:diagnose:org:audittrail",
6039
+ "diagnose:hardis:org:audittrail",
6040
+ "diagnose:org:hardis:audittrail",
6041
+ "diagnose:org:audittrail:hardis",
6042
+ "hardis:diagnose:audittrail:org",
6043
+ "diagnose:hardis:audittrail:org",
6044
+ "diagnose:audittrail:hardis:org",
6045
+ "diagnose:audittrail:org:hardis",
6046
+ "hardis:org:audittrail:diagnose",
6047
+ "org:hardis:audittrail:diagnose",
6048
+ "org:audittrail:hardis:diagnose",
6049
+ "org:audittrail:diagnose:hardis",
6050
+ "hardis:audittrail:org:diagnose",
6051
+ "audittrail:hardis:org:diagnose",
6052
+ "audittrail:org:hardis:diagnose",
6053
+ "audittrail:org:diagnose:hardis",
6054
+ "hardis:audittrail:diagnose:org",
6055
+ "audittrail:hardis:diagnose:org",
6056
+ "audittrail:diagnose:hardis:org",
6057
+ "audittrail:diagnose:org:hardis"
5688
6058
  ]
5689
6059
  },
5690
- "hardis:org:files:import": {
6060
+ "hardis:org:diagnose:instanceupgrade": {
5691
6061
  "aliases": [],
5692
6062
  "args": {},
5693
- "description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
6063
+ "description": "\n## Command Behavior\n\n**Retrieves and displays the scheduled upgrade date for a Salesforce org's instance.**\n\nThis command provides crucial information about when your Salesforce instance will be upgraded to the next major release (Spring, Summer, or Winter). This is vital for release planning, testing, and ensuring compatibility with upcoming Salesforce features.\n\nKey functionalities:\n\n- **Instance Identification:** Determines the Salesforce instance name of your target org.\n- **Upgrade Date Retrieval:** Fetches the planned start time of the next major core service upgrade for that instance from the Salesforce Status API.\n- **Days Until Upgrade:** Calculates and displays the number of days remaining until the next major upgrade.\n- **Severity-Based Logging:** Adjusts the log severity (info, warning) based on the proximity of the upgrade date, providing a visual cue for urgency.\n- **Notifications:** Sends notifications to configured channels (e.g., Slack, MS Teams, Grafana) with the upgrade information, making it suitable for automated monitoring.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the `Organization` object in Salesforce to get the `InstanceName` of the target org.\n- **Salesforce Status API Integration:** It makes an HTTP GET request to the Salesforce Status API (`https://api.status.salesforce.com/v1/instances/{instanceName}/status`) to retrieve detailed information about the instance, including scheduled maintenances.\n- **Data Parsing:** It parses the JSON response from the Status API to extract the relevant major release upgrade information.\n- **Date Calculation:** Uses the `moment` library to calculate the difference in days between the current date and the planned upgrade date.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including the instance name, upgrade date, and days remaining, along with relevant metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the upgrade status and proximity.\n</details>\n",
5694
6064
  "examples": [
5695
- "$ sf hardis:org:files:import"
6065
+ "$ sf hardis:org:diagnose:instanceupgrade"
5696
6066
  ],
5697
6067
  "flags": {
5698
6068
  "json": {
@@ -5710,21 +6080,6 @@
5710
6080
  "multiple": false,
5711
6081
  "type": "option"
5712
6082
  },
5713
- "path": {
5714
- "char": "p",
5715
- "description": "Path to the file export project",
5716
- "name": "path",
5717
- "hasDynamicHelp": false,
5718
- "multiple": false,
5719
- "type": "option"
5720
- },
5721
- "overwrite": {
5722
- "char": "f",
5723
- "description": "Override existing files (doubles the number of API calls)",
5724
- "name": "overwrite",
5725
- "allowNo": false,
5726
- "type": "boolean"
5727
- },
5728
6083
  "debug": {
5729
6084
  "char": "d",
5730
6085
  "description": "Activate debug mode (more logs)",
@@ -5763,13 +6118,13 @@
5763
6118
  },
5764
6119
  "hasDynamicHelp": true,
5765
6120
  "hiddenAliases": [],
5766
- "id": "hardis:org:files:import",
6121
+ "id": "hardis:org:diagnose:instanceupgrade",
5767
6122
  "pluginAlias": "sfdx-hardis",
5768
6123
  "pluginName": "sfdx-hardis",
5769
6124
  "pluginType": "core",
5770
6125
  "strict": true,
5771
6126
  "enableJsonFlag": true,
5772
- "title": "Import files",
6127
+ "title": "Get Instance Upgrade date",
5773
6128
  "requiresProject": false,
5774
6129
  "isESM": true,
5775
6130
  "relativePath": [
@@ -5777,44 +6132,46 @@
5777
6132
  "commands",
5778
6133
  "hardis",
5779
6134
  "org",
5780
- "files",
5781
- "import.js"
6135
+ "diagnose",
6136
+ "instanceupgrade.js"
5782
6137
  ],
5783
6138
  "aliasPermutations": [],
5784
6139
  "permutations": [
5785
- "hardis:org:files:import",
5786
- "org:hardis:files:import",
5787
- "org:files:hardis:import",
5788
- "org:files:import:hardis",
5789
- "hardis:files:org:import",
5790
- "files:hardis:org:import",
5791
- "files:org:hardis:import",
5792
- "files:org:import:hardis",
5793
- "hardis:files:import:org",
5794
- "files:hardis:import:org",
5795
- "files:import:hardis:org",
5796
- "files:import:org:hardis",
5797
- "hardis:org:import:files",
5798
- "org:hardis:import:files",
5799
- "org:import:hardis:files",
5800
- "org:import:files:hardis",
5801
- "hardis:import:org:files",
5802
- "import:hardis:org:files",
5803
- "import:org:hardis:files",
5804
- "import:org:files:hardis",
5805
- "hardis:import:files:org",
5806
- "import:hardis:files:org",
5807
- "import:files:hardis:org",
5808
- "import:files:org:hardis"
6140
+ "hardis:org:diagnose:instanceupgrade",
6141
+ "org:hardis:diagnose:instanceupgrade",
6142
+ "org:diagnose:hardis:instanceupgrade",
6143
+ "org:diagnose:instanceupgrade:hardis",
6144
+ "hardis:diagnose:org:instanceupgrade",
6145
+ "diagnose:hardis:org:instanceupgrade",
6146
+ "diagnose:org:hardis:instanceupgrade",
6147
+ "diagnose:org:instanceupgrade:hardis",
6148
+ "hardis:diagnose:instanceupgrade:org",
6149
+ "diagnose:hardis:instanceupgrade:org",
6150
+ "diagnose:instanceupgrade:hardis:org",
6151
+ "diagnose:instanceupgrade:org:hardis",
6152
+ "hardis:org:instanceupgrade:diagnose",
6153
+ "org:hardis:instanceupgrade:diagnose",
6154
+ "org:instanceupgrade:hardis:diagnose",
6155
+ "org:instanceupgrade:diagnose:hardis",
6156
+ "hardis:instanceupgrade:org:diagnose",
6157
+ "instanceupgrade:hardis:org:diagnose",
6158
+ "instanceupgrade:org:hardis:diagnose",
6159
+ "instanceupgrade:org:diagnose:hardis",
6160
+ "hardis:instanceupgrade:diagnose:org",
6161
+ "instanceupgrade:hardis:diagnose:org",
6162
+ "instanceupgrade:diagnose:hardis:org",
6163
+ "instanceupgrade:diagnose:org:hardis"
5809
6164
  ]
5810
6165
  },
5811
- "hardis:org:fix:listviewmine": {
6166
+ "hardis:org:diagnose:legacyapi": {
5812
6167
  "aliases": [],
5813
6168
  "args": {},
5814
- "description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[![Invalid scope:Mine, not allowed ? Deploy your ListViews anyway !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-scope-mine.jpg)](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
6169
+ "description": "Checks if an org uses retired or someday retired API version\n\n\nSee article below\n\n[![Handle Salesforce API versions Deprecation like a pro](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deprecated-api.jpg)](https://nicolas.vuillamy.fr/handle-salesforce-api-versions-deprecation-like-a-pro-335065f52238)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-deprecated-api-calls/) and can output Grafana, Slack and MsTeams Notifications.\n",
5815
6170
  "examples": [
5816
- "$ sf hardis:org:fix:listviewmine",
5817
- "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
6171
+ "$ sf hardis:org:diagnose:legacyapi",
6172
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
6173
+ "$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
6174
+ "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
5818
6175
  ],
5819
6176
  "flags": {
5820
6177
  "json": {
@@ -5832,10 +6189,28 @@
5832
6189
  "multiple": false,
5833
6190
  "type": "option"
5834
6191
  },
5835
- "listviews": {
6192
+ "eventtype": {
6193
+ "char": "e",
6194
+ "description": "Type of EventLogFile event to analyze",
6195
+ "name": "eventtype",
6196
+ "default": "ApiTotalUsage",
6197
+ "hasDynamicHelp": false,
6198
+ "multiple": false,
6199
+ "type": "option"
6200
+ },
6201
+ "limit": {
5836
6202
  "char": "l",
5837
- "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
5838
- "name": "listviews",
6203
+ "description": "Number of latest EventLogFile events to analyze",
6204
+ "name": "limit",
6205
+ "default": 999,
6206
+ "hasDynamicHelp": false,
6207
+ "multiple": false,
6208
+ "type": "option"
6209
+ },
6210
+ "outputfile": {
6211
+ "char": "f",
6212
+ "description": "Force the path and name of output report file. Must end with .csv",
6213
+ "name": "outputfile",
5839
6214
  "hasDynamicHelp": false,
5840
6215
  "multiple": false,
5841
6216
  "type": "option"
@@ -5878,59 +6253,57 @@
5878
6253
  },
5879
6254
  "hasDynamicHelp": true,
5880
6255
  "hiddenAliases": [],
5881
- "id": "hardis:org:fix:listviewmine",
6256
+ "id": "hardis:org:diagnose:legacyapi",
5882
6257
  "pluginAlias": "sfdx-hardis",
5883
6258
  "pluginName": "sfdx-hardis",
5884
6259
  "pluginType": "core",
5885
6260
  "strict": true,
5886
6261
  "enableJsonFlag": true,
5887
- "title": "Fix listviews with ",
5888
- "requiresProject": true,
6262
+ "title": "Check for legacy API use",
6263
+ "requiresProject": false,
5889
6264
  "isESM": true,
5890
6265
  "relativePath": [
5891
6266
  "lib",
5892
6267
  "commands",
5893
6268
  "hardis",
5894
6269
  "org",
5895
- "fix",
5896
- "listviewmine.js"
6270
+ "diagnose",
6271
+ "legacyapi.js"
5897
6272
  ],
5898
6273
  "aliasPermutations": [],
5899
6274
  "permutations": [
5900
- "hardis:org:fix:listviewmine",
5901
- "org:hardis:fix:listviewmine",
5902
- "org:fix:hardis:listviewmine",
5903
- "org:fix:listviewmine:hardis",
5904
- "hardis:fix:org:listviewmine",
5905
- "fix:hardis:org:listviewmine",
5906
- "fix:org:hardis:listviewmine",
5907
- "fix:org:listviewmine:hardis",
5908
- "hardis:fix:listviewmine:org",
5909
- "fix:hardis:listviewmine:org",
5910
- "fix:listviewmine:hardis:org",
5911
- "fix:listviewmine:org:hardis",
5912
- "hardis:org:listviewmine:fix",
5913
- "org:hardis:listviewmine:fix",
5914
- "org:listviewmine:hardis:fix",
5915
- "org:listviewmine:fix:hardis",
5916
- "hardis:listviewmine:org:fix",
5917
- "listviewmine:hardis:org:fix",
5918
- "listviewmine:org:hardis:fix",
5919
- "listviewmine:org:fix:hardis",
5920
- "hardis:listviewmine:fix:org",
5921
- "listviewmine:hardis:fix:org",
5922
- "listviewmine:fix:hardis:org",
5923
- "listviewmine:fix:org:hardis"
6275
+ "hardis:org:diagnose:legacyapi",
6276
+ "org:hardis:diagnose:legacyapi",
6277
+ "org:diagnose:hardis:legacyapi",
6278
+ "org:diagnose:legacyapi:hardis",
6279
+ "hardis:diagnose:org:legacyapi",
6280
+ "diagnose:hardis:org:legacyapi",
6281
+ "diagnose:org:hardis:legacyapi",
6282
+ "diagnose:org:legacyapi:hardis",
6283
+ "hardis:diagnose:legacyapi:org",
6284
+ "diagnose:hardis:legacyapi:org",
6285
+ "diagnose:legacyapi:hardis:org",
6286
+ "diagnose:legacyapi:org:hardis",
6287
+ "hardis:org:legacyapi:diagnose",
6288
+ "org:hardis:legacyapi:diagnose",
6289
+ "org:legacyapi:hardis:diagnose",
6290
+ "org:legacyapi:diagnose:hardis",
6291
+ "hardis:legacyapi:org:diagnose",
6292
+ "legacyapi:hardis:org:diagnose",
6293
+ "legacyapi:org:hardis:diagnose",
6294
+ "legacyapi:org:diagnose:hardis",
6295
+ "hardis:legacyapi:diagnose:org",
6296
+ "legacyapi:hardis:diagnose:org",
6297
+ "legacyapi:diagnose:hardis:org",
6298
+ "legacyapi:diagnose:org:hardis"
5924
6299
  ]
5925
6300
  },
5926
- "hardis:org:generate:packagexmlfull": {
6301
+ "hardis:org:diagnose:licenses": {
5927
6302
  "aliases": [],
5928
6303
  "args": {},
5929
- "description": "\n## Command Behavior\n\n**Generates a comprehensive `package.xml` file for a Salesforce org, including all metadata components, even managed ones.**\n\nThis command is essential for various Salesforce development and administration tasks, especially when you need a complete snapshot of an org's metadata. It goes beyond typical source tracking by including managed package components, which is crucial for understanding the full metadata footprint of an org.\n\nKey functionalities:\n\n- **Full Org Metadata Retrieval:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a complete list of all metadata types and their members.\n- **Managed Package Inclusion:** Unlike standard source retrieval, this command explicitly includes metadata from managed packages, providing a truly comprehensive `package.xml`.\n- **Customizable Output:** Allows you to specify the output file path for the generated `package.xml`.\n- **Interactive Org Selection:** If no target org is specified, it interactively prompts the user to choose an org. (or use --no-prompt to skip this step)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce Metadata API Interaction:** It leverages the Salesforce Metadata API to list all available metadata types and then retrieve all components for each type.\n- **`buildOrgManifest` Utility:** The core logic for querying the org's metadata and constructing the `package.xml` is encapsulated within the `buildOrgManifest` utility function.\n- **XML Generation:** It dynamically builds the XML structure of the `package.xml` file, including the `types` and `members` elements for all retrieved metadata.\n- **File System Operations:** It writes the generated `package.xml` file to the specified output path.\n- **Interactive Prompts:** Uses `promptOrgUsernameDefault` to guide the user in selecting the target Salesforce org.\n</details>\n",
6304
+ "description": "\n**Lists and analyzes User Licenses and Permission Set Licenses subscribed and used in a Salesforce org.**\n\nThis command provides a comprehensive overview of your Salesforce license consumption. It's particularly useful for:\n\n- **License Management:** Understanding which licenses are active, how many are available, and how many are being used.\n- **Cost Optimization:** Identifying unused or underutilized licenses that could be reallocated or decommissioned.\n- **Compliance:** Ensuring that your organization is compliant with Salesforce licensing agreements.\n- **Monitoring:** Tracking license usage trends over time.\n\nKey functionalities:\n\n- **User License Details:** Retrieves information about standard and custom User Licenses, including `MasterLabel`, `Name`, `TotalLicenses`, and `UsedLicenses`.\n- **Permission Set License Details:** Retrieves information about Permission Set Licenses, including `MasterLabel`, `PermissionSetLicenseKey`, `TotalLicenses`, and `UsedLicenses`.\n- **Used Licenses Filter:** The `--usedonly` flag allows you to filter the report to show only licenses that have at least one `UsedLicenses` count greater than zero.\n- **CSV Report Generation:** Generates a CSV file containing all the retrieved license information, suitable for detailed analysis.\n- **Notifications:** Sends notifications to configured channels (e.g., Grafana, Slack, MS Teams) with a summary of license usage, including lists of active and used licenses.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It executes SOQL queries against the `UserLicense` and `PermissionSetLicense` objects in Salesforce to retrieve license data.\n- **Data Transformation:** It processes the query results, reformatting the data to be more readable and consistent for reporting purposes (e.g., removing `Id` and `attributes`, renaming `PermissionSetLicenseKey` to `Name`).\n- **Data Aggregation:** It aggregates license information, creating a `licensesByKey` object for quick lookups and a `usedLicenses` array for a concise list of actively used licenses.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of license data.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the license extraction process and the used licenses.\n</details>\n",
5930
6305
  "examples": [
5931
- "$ sf hardis:org:generate:packagexmlfull",
5932
- "$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
5933
- "$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
6306
+ "$ sf hardis:org:diagnose:licenses"
5934
6307
  ],
5935
6308
  "flags": {
5936
6309
  "json": {
@@ -5949,12 +6322,20 @@
5949
6322
  "type": "option"
5950
6323
  },
5951
6324
  "outputfile": {
5952
- "description": "Output package.xml file",
6325
+ "char": "f",
6326
+ "description": "Force the path and name of output report file. Must end with .csv",
5953
6327
  "name": "outputfile",
5954
6328
  "hasDynamicHelp": false,
5955
6329
  "multiple": false,
5956
6330
  "type": "option"
5957
6331
  },
6332
+ "usedonly": {
6333
+ "char": "u",
6334
+ "description": "Filter to have only used licenses",
6335
+ "name": "usedonly",
6336
+ "allowNo": false,
6337
+ "type": "boolean"
6338
+ },
5958
6339
  "debug": {
5959
6340
  "char": "d",
5960
6341
  "description": "Activate debug mode (more logs)",
@@ -5962,13 +6343,6 @@
5962
6343
  "allowNo": false,
5963
6344
  "type": "boolean"
5964
6345
  },
5965
- "no-prompt": {
5966
- "char": "n",
5967
- "description": "Do not prompt for org username, use the default one",
5968
- "name": "no-prompt",
5969
- "allowNo": false,
5970
- "type": "boolean"
5971
- },
5972
6346
  "websocket": {
5973
6347
  "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5974
6348
  "name": "websocket",
@@ -6000,13 +6374,13 @@
6000
6374
  },
6001
6375
  "hasDynamicHelp": true,
6002
6376
  "hiddenAliases": [],
6003
- "id": "hardis:org:generate:packagexmlfull",
6377
+ "id": "hardis:org:diagnose:licenses",
6004
6378
  "pluginAlias": "sfdx-hardis",
6005
6379
  "pluginName": "sfdx-hardis",
6006
6380
  "pluginType": "core",
6007
6381
  "strict": true,
6008
6382
  "enableJsonFlag": true,
6009
- "title": "Generate Full Org package.xml",
6383
+ "title": "List licenses subscribed and used in a Salesforce org",
6010
6384
  "requiresProject": false,
6011
6385
  "isESM": true,
6012
6386
  "relativePath": [
@@ -6014,46 +6388,43 @@
6014
6388
  "commands",
6015
6389
  "hardis",
6016
6390
  "org",
6017
- "generate",
6018
- "packagexmlfull.js"
6391
+ "diagnose",
6392
+ "licenses.js"
6019
6393
  ],
6020
6394
  "aliasPermutations": [],
6021
6395
  "permutations": [
6022
- "hardis:org:generate:packagexmlfull",
6023
- "org:hardis:generate:packagexmlfull",
6024
- "org:generate:hardis:packagexmlfull",
6025
- "org:generate:packagexmlfull:hardis",
6026
- "hardis:generate:org:packagexmlfull",
6027
- "generate:hardis:org:packagexmlfull",
6028
- "generate:org:hardis:packagexmlfull",
6029
- "generate:org:packagexmlfull:hardis",
6030
- "hardis:generate:packagexmlfull:org",
6031
- "generate:hardis:packagexmlfull:org",
6032
- "generate:packagexmlfull:hardis:org",
6033
- "generate:packagexmlfull:org:hardis",
6034
- "hardis:org:packagexmlfull:generate",
6035
- "org:hardis:packagexmlfull:generate",
6036
- "org:packagexmlfull:hardis:generate",
6037
- "org:packagexmlfull:generate:hardis",
6038
- "hardis:packagexmlfull:org:generate",
6039
- "packagexmlfull:hardis:org:generate",
6040
- "packagexmlfull:org:hardis:generate",
6041
- "packagexmlfull:org:generate:hardis",
6042
- "hardis:packagexmlfull:generate:org",
6043
- "packagexmlfull:hardis:generate:org",
6044
- "packagexmlfull:generate:hardis:org",
6045
- "packagexmlfull:generate:org:hardis"
6396
+ "hardis:org:diagnose:licenses",
6397
+ "org:hardis:diagnose:licenses",
6398
+ "org:diagnose:hardis:licenses",
6399
+ "org:diagnose:licenses:hardis",
6400
+ "hardis:diagnose:org:licenses",
6401
+ "diagnose:hardis:org:licenses",
6402
+ "diagnose:org:hardis:licenses",
6403
+ "diagnose:org:licenses:hardis",
6404
+ "hardis:diagnose:licenses:org",
6405
+ "diagnose:hardis:licenses:org",
6406
+ "diagnose:licenses:hardis:org",
6407
+ "diagnose:licenses:org:hardis",
6408
+ "hardis:org:licenses:diagnose",
6409
+ "org:hardis:licenses:diagnose",
6410
+ "org:licenses:hardis:diagnose",
6411
+ "org:licenses:diagnose:hardis",
6412
+ "hardis:licenses:org:diagnose",
6413
+ "licenses:hardis:org:diagnose",
6414
+ "licenses:org:hardis:diagnose",
6415
+ "licenses:org:diagnose:hardis",
6416
+ "hardis:licenses:diagnose:org",
6417
+ "licenses:hardis:diagnose:org",
6418
+ "licenses:diagnose:hardis:org",
6419
+ "licenses:diagnose:org:hardis"
6046
6420
  ]
6047
6421
  },
6048
- "hardis:org:diagnose:audittrail": {
6422
+ "hardis:org:diagnose:releaseupdates": {
6049
6423
  "aliases": [],
6050
6424
  "args": {},
6051
- "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",
6425
+ "description": "Export Release Updates into a CSV file with selected criteria, and highlight Release Updates that should be checked.\n\nBefore publishing **Breaking Changes** ❌, Salesforce announce them in the setup menu [**Release Updates**](https://help.salesforce.com/s/articleView?id=sf.release_updates.htm&type=5)\n\n⚠️ Some of them are very important, because if you don't make the related upgrades in time (ex: before Winter 25) , your production org can crash !\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-release-updates/) and can output Grafana, Slack and MsTeams Notifications.\n",
6052
6426
  "examples": [
6053
- "$ sf hardis:org:diagnose:audittrail",
6054
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
6055
- "$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
6056
- "$ sf hardis:org:diagnose:audittrail --lastndays 5"
6427
+ "$ sf hardis:org:diagnose:releaseupdates"
6057
6428
  ],
6058
6429
  "flags": {
6059
6430
  "json": {
@@ -6071,22 +6442,6 @@
6071
6442
  "multiple": false,
6072
6443
  "type": "option"
6073
6444
  },
6074
- "excludeusers": {
6075
- "char": "e",
6076
- "description": "Comma-separated list of usernames to exclude",
6077
- "name": "excludeusers",
6078
- "hasDynamicHelp": false,
6079
- "multiple": false,
6080
- "type": "option"
6081
- },
6082
- "lastndays": {
6083
- "char": "t",
6084
- "description": "Number of days to extract from today (included)",
6085
- "name": "lastndays",
6086
- "hasDynamicHelp": false,
6087
- "multiple": false,
6088
- "type": "option"
6089
- },
6090
6445
  "outputfile": {
6091
6446
  "char": "f",
6092
6447
  "description": "Force the path and name of output report file. Must end with .csv",
@@ -6133,13 +6488,13 @@
6133
6488
  },
6134
6489
  "hasDynamicHelp": true,
6135
6490
  "hiddenAliases": [],
6136
- "id": "hardis:org:diagnose:audittrail",
6491
+ "id": "hardis:org:diagnose:releaseupdates",
6137
6492
  "pluginAlias": "sfdx-hardis",
6138
6493
  "pluginName": "sfdx-hardis",
6139
6494
  "pluginType": "core",
6140
6495
  "strict": true,
6141
6496
  "enableJsonFlag": true,
6142
- "title": "Diagnose content of Setup Audit Trail",
6497
+ "title": "Check Release Updates of an org",
6143
6498
  "requiresProject": false,
6144
6499
  "isESM": true,
6145
6500
  "relativePath": [
@@ -6148,42 +6503,47 @@
6148
6503
  "hardis",
6149
6504
  "org",
6150
6505
  "diagnose",
6151
- "audittrail.js"
6506
+ "releaseupdates.js"
6152
6507
  ],
6153
6508
  "aliasPermutations": [],
6154
6509
  "permutations": [
6155
- "hardis:org:diagnose:audittrail",
6156
- "org:hardis:diagnose:audittrail",
6157
- "org:diagnose:hardis:audittrail",
6158
- "org:diagnose:audittrail:hardis",
6159
- "hardis:diagnose:org:audittrail",
6160
- "diagnose:hardis:org:audittrail",
6161
- "diagnose:org:hardis:audittrail",
6162
- "diagnose:org:audittrail:hardis",
6163
- "hardis:diagnose:audittrail:org",
6164
- "diagnose:hardis:audittrail:org",
6165
- "diagnose:audittrail:hardis:org",
6166
- "diagnose:audittrail:org:hardis",
6167
- "hardis:org:audittrail:diagnose",
6168
- "org:hardis:audittrail:diagnose",
6169
- "org:audittrail:hardis:diagnose",
6170
- "org:audittrail:diagnose:hardis",
6171
- "hardis:audittrail:org:diagnose",
6172
- "audittrail:hardis:org:diagnose",
6173
- "audittrail:org:hardis:diagnose",
6174
- "audittrail:org:diagnose:hardis",
6175
- "hardis:audittrail:diagnose:org",
6176
- "audittrail:hardis:diagnose:org",
6177
- "audittrail:diagnose:hardis:org",
6178
- "audittrail:diagnose:org:hardis"
6510
+ "hardis:org:diagnose:releaseupdates",
6511
+ "org:hardis:diagnose:releaseupdates",
6512
+ "org:diagnose:hardis:releaseupdates",
6513
+ "org:diagnose:releaseupdates:hardis",
6514
+ "hardis:diagnose:org:releaseupdates",
6515
+ "diagnose:hardis:org:releaseupdates",
6516
+ "diagnose:org:hardis:releaseupdates",
6517
+ "diagnose:org:releaseupdates:hardis",
6518
+ "hardis:diagnose:releaseupdates:org",
6519
+ "diagnose:hardis:releaseupdates:org",
6520
+ "diagnose:releaseupdates:hardis:org",
6521
+ "diagnose:releaseupdates:org:hardis",
6522
+ "hardis:org:releaseupdates:diagnose",
6523
+ "org:hardis:releaseupdates:diagnose",
6524
+ "org:releaseupdates:hardis:diagnose",
6525
+ "org:releaseupdates:diagnose:hardis",
6526
+ "hardis:releaseupdates:org:diagnose",
6527
+ "releaseupdates:hardis:org:diagnose",
6528
+ "releaseupdates:org:hardis:diagnose",
6529
+ "releaseupdates:org:diagnose:hardis",
6530
+ "hardis:releaseupdates:diagnose:org",
6531
+ "releaseupdates:hardis:diagnose:org",
6532
+ "releaseupdates:diagnose:hardis:org",
6533
+ "releaseupdates:diagnose:org:hardis"
6179
6534
  ]
6180
6535
  },
6181
- "hardis:org:diagnose:instanceupgrade": {
6536
+ "hardis:org:diagnose:storage-stats": {
6182
6537
  "aliases": [],
6183
6538
  "args": {},
6184
- "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",
6539
+ "description": "**Extracts and analyzes Data Storage usage for a Salesforce org, providing detailed per-object breakdowns with flexible grouping options.**\n\nThis command provides a comprehensive overview of your Salesforce data storage consumption. It's particularly useful for:\n\n- **Storage Management:** Understanding which SObjects consume the most storage and how usage has evolved over time.\n- **Cost Optimization:** Identifying storage-heavy objects that could be candidates for data archival or cleanup strategies.\n- **Capacity Planning:** Tracking storage trends to predict when additional capacity will be needed.\n- **Compliance & Governance:** Monitoring data growth patterns to ensure alignment with data retention policies.\n\nKey functionalities:\n\n- **Storage Limits Analysis:** Retrieves and displays org data storage limits, including total capacity, used storage, remaining storage, and percentage used. Detects and alerts on over-usage scenarios.\n- **SObject Discovery & Filtering:** Automatically discovers all SObjects in the org and filters them to focus on production/custom objects (excludes metadata types, platform-only objects, and cached empty objects).\n- **Interactive Selection:** Prompts the user to select which SObjects to analyze and choose breakdown fields (date fields, RecordType, custom fields, or relationship fields).\n- **Flexible Breakdown Field:** Supports grouping by any field including:\n - Date/DateTime fields (`CreatedDate`, `LastModifiedDate`, custom date fields)\n - RecordType (`RecordType.Name`)\n - Custom fields (`Status__c`, picklists, text fields)\n - Nested relationship fields (`SBQQ__Quote__r.RecordType.Name`)\n- **Date Granularity Options:** For date/datetime fields, choose between:\n - Year-based grouping (`CALENDAR_YEAR`)\n - Month-based grouping (`CALENDAR_MONTH`)\n - Day-based grouping (exact date)\n- **WHERE Clause Filtering:** Apply SOQL WHERE conditions to filter records before calculating storage (e.g., only active records, records from the last year).\n- **Storage Estimation:** Estimates storage usage for each object using an average record size heuristic (2 KB per record) and calculates the percentage of org quota consumed.\n- **Dual CSV Reports:** Generates two CSV files: a detailed breakdown by selected field and a totals-per-object summary, both suitable for spreadsheet analysis and reporting.\n- **Empty Objects Cache:** Maintains a per-user cache of objects detected with zero records to optimize subsequent runs by skipping empty tables.\n- **Progress Tracking:** Sends WebSocket progress messages for integration with external UIs and monitoring dashboards.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Limits Retrieval:** Calls `conn.limits()` to retrieve the `DataStorageMB` object containing `Max` and `Remaining` values. Handles negative `Remaining` values (over-usage scenarios) by calculating `overUsageMB` and adjusting display values.\n- **SObject Discovery:** Uses `conn.metadata.list([{ type: 'CustomObject' }])` to get custom objects and `conn.describeGlobal()` to get all SObjects. Filters by object capabilities (`layoutable`, `queryable`, `retrieveable`, `createable`, `updateable`, `deletable`) and excludes metadata types (`__mdt` suffix) and cached empty objects.\n- **User Interaction:** Uses `prompts` for interactive multi-select of SObjects, breakdown field selection, granularity choice (for date fields), and optional WHERE conditions. All objects are pre-selected by default for user convenience.\n- **Field Validation:** Recursively validates breakdown fields including nested relationships (e.g., `SBQQ__Quote__r.RecordType.Name`) by traversing the relationship chain and checking field existence on each related object. Automatically handles special cases like `RecordType` -> `RecordTypeId` and `__r` -> `__c` conversions.\n- **Dynamic Query Generation:** Builds SOQL queries based on field type and granularity:\n - For date fields with year granularity: `SELECT CALENDAR_YEAR(<Field>) breakdown, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY CALENDAR_YEAR(<Field>) ORDER BY CALENDAR_YEAR(<Field>)`\n - For date fields with month granularity: `SELECT CALENDAR_YEAR(<Field>) year, CALENDAR_MONTH(<Field>) month, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY CALENDAR_YEAR(<Field>), CALENDAR_MONTH(<Field>) ORDER BY CALENDAR_YEAR(<Field>), CALENDAR_MONTH(<Field>)`\n - For non-date fields: `SELECT <Field> breakdown, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY <Field> ORDER BY <Field>`\n- **WHERE Clause Support:** Accepts user-provided WHERE conditions via flag (`--where`) or interactive prompt. Injects the condition into all SOQL queries for consistent filtering across all objects.\n- **Storage Calculation:** Applies a conservative average record size of 2 KB (2048 bytes) to estimate storage consumption. Calculates both MB usage and percentage of org quota for each object and breakdown value.\n- **Report Generation:** Uses `generateCsvFile` and `generateReportPath` helpers to create two CSV files in the reports directory:\n - Detailed breakdown: includes all statistics per breakdown value per object (e.g., by year, by month, by RecordType)\n - Totals summary: includes only aggregate totals per object\n - File naming includes breakdown field, granularity (for date fields), and `-filtered` suffix when WHERE clause is applied\n- **Caching Mechanism:** Writes a JSON cache file per authenticated username (sanitized) in the reports directory (`<username>_empty_tables_cache.json`) containing an array of empty object names. The cache is updated after each run with newly detected empty objects.\n- **Progress & UX:** Uses `WebSocketClient` to emit start/step/end progress messages for external monitoring. Outputs summary tables with `uxLogTable` and status messages with `uxLog`.\n- **Return Value:** Returns a JSON object containing `tableStorageInfos` (all rows), `tableStorageInfosTotals` (summary rows), `storageLimits` (org limits object), and `outputFiles` (paths to generated CSV/XLSX reports).\n</details>\n\n![](https://sfdx-hardis.cloudity.com/assets/images/storage-usage-year-breakdown.png)\n\n![](https://sfdx-hardis.cloudity.com/assets/images/storage-usage-total.png)\n",
6185
6540
  "examples": [
6186
- "$ sf hardis:org:diagnose:instanceupgrade"
6541
+ "$ sf hardis:org:diagnose:storage-stats",
6542
+ "$ sf hardis:org:diagnose:storage-stats --breakdown-field \"CreatedDate\"",
6543
+ "$ sf hardis:org:diagnose:storage-stats -b \"RecordType.Name\"",
6544
+ "$ sf hardis:org:diagnose:storage-stats --where \"CreatedDate = LAST_N_DAYS:365\"",
6545
+ "$ sf hardis:org:diagnose:storage-stats -w \"Status__c = 'Active'\"",
6546
+ "$ sf hardis:org:diagnose:storage-stats -b \"LastModifiedDate\" -w \"IsDeleted = false\""
6187
6547
  ],
6188
6548
  "flags": {
6189
6549
  "json": {
@@ -6201,6 +6561,30 @@
6201
6561
  "multiple": false,
6202
6562
  "type": "option"
6203
6563
  },
6564
+ "outputfile": {
6565
+ "char": "f",
6566
+ "description": "Force the path and name of output report file. Must end with .csv",
6567
+ "name": "outputfile",
6568
+ "hasDynamicHelp": false,
6569
+ "multiple": false,
6570
+ "type": "option"
6571
+ },
6572
+ "breakdown-field": {
6573
+ "char": "b",
6574
+ "description": "Field to use for storage stats breakdown. Example: \"CreatedDate\", \"LastModifiedDate\", \"RecordType.Name\", or custom fields like \"Status__c\"",
6575
+ "name": "breakdown-field",
6576
+ "hasDynamicHelp": false,
6577
+ "multiple": false,
6578
+ "type": "option"
6579
+ },
6580
+ "where": {
6581
+ "char": "w",
6582
+ "description": "WHERE clause to filter records in the query (without the WHERE keyword). Example: \"CreatedDate = LAST_N_DAYS:365\" or \"Status__c = 'Active'\"",
6583
+ "name": "where",
6584
+ "hasDynamicHelp": false,
6585
+ "multiple": false,
6586
+ "type": "option"
6587
+ },
6204
6588
  "debug": {
6205
6589
  "char": "d",
6206
6590
  "description": "Activate debug mode (more logs)",
@@ -6239,14 +6623,14 @@
6239
6623
  },
6240
6624
  "hasDynamicHelp": true,
6241
6625
  "hiddenAliases": [],
6242
- "id": "hardis:org:diagnose:instanceupgrade",
6626
+ "id": "hardis:org:diagnose:storage-stats",
6243
6627
  "pluginAlias": "sfdx-hardis",
6244
6628
  "pluginName": "sfdx-hardis",
6245
6629
  "pluginType": "core",
6246
6630
  "strict": true,
6247
6631
  "enableJsonFlag": true,
6248
- "title": "Get Instance Upgrade date",
6249
- "requiresProject": false,
6632
+ "title": "Extract Data Storage stats",
6633
+ "requiresProject": true,
6250
6634
  "isESM": true,
6251
6635
  "relativePath": [
6252
6636
  "lib",
@@ -6254,45 +6638,42 @@
6254
6638
  "hardis",
6255
6639
  "org",
6256
6640
  "diagnose",
6257
- "instanceupgrade.js"
6641
+ "storage-stats.js"
6258
6642
  ],
6259
6643
  "aliasPermutations": [],
6260
6644
  "permutations": [
6261
- "hardis:org:diagnose:instanceupgrade",
6262
- "org:hardis:diagnose:instanceupgrade",
6263
- "org:diagnose:hardis:instanceupgrade",
6264
- "org:diagnose:instanceupgrade:hardis",
6265
- "hardis:diagnose:org:instanceupgrade",
6266
- "diagnose:hardis:org:instanceupgrade",
6267
- "diagnose:org:hardis:instanceupgrade",
6268
- "diagnose:org:instanceupgrade:hardis",
6269
- "hardis:diagnose:instanceupgrade:org",
6270
- "diagnose:hardis:instanceupgrade:org",
6271
- "diagnose:instanceupgrade:hardis:org",
6272
- "diagnose:instanceupgrade:org:hardis",
6273
- "hardis:org:instanceupgrade:diagnose",
6274
- "org:hardis:instanceupgrade:diagnose",
6275
- "org:instanceupgrade:hardis:diagnose",
6276
- "org:instanceupgrade:diagnose:hardis",
6277
- "hardis:instanceupgrade:org:diagnose",
6278
- "instanceupgrade:hardis:org:diagnose",
6279
- "instanceupgrade:org:hardis:diagnose",
6280
- "instanceupgrade:org:diagnose:hardis",
6281
- "hardis:instanceupgrade:diagnose:org",
6282
- "instanceupgrade:hardis:diagnose:org",
6283
- "instanceupgrade:diagnose:hardis:org",
6284
- "instanceupgrade:diagnose:org:hardis"
6645
+ "hardis:org:diagnose:storage-stats",
6646
+ "org:hardis:diagnose:storage-stats",
6647
+ "org:diagnose:hardis:storage-stats",
6648
+ "org:diagnose:storage-stats:hardis",
6649
+ "hardis:diagnose:org:storage-stats",
6650
+ "diagnose:hardis:org:storage-stats",
6651
+ "diagnose:org:hardis:storage-stats",
6652
+ "diagnose:org:storage-stats:hardis",
6653
+ "hardis:diagnose:storage-stats:org",
6654
+ "diagnose:hardis:storage-stats:org",
6655
+ "diagnose:storage-stats:hardis:org",
6656
+ "diagnose:storage-stats:org:hardis",
6657
+ "hardis:org:storage-stats:diagnose",
6658
+ "org:hardis:storage-stats:diagnose",
6659
+ "org:storage-stats:hardis:diagnose",
6660
+ "org:storage-stats:diagnose:hardis",
6661
+ "hardis:storage-stats:org:diagnose",
6662
+ "storage-stats:hardis:org:diagnose",
6663
+ "storage-stats:org:hardis:diagnose",
6664
+ "storage-stats:org:diagnose:hardis",
6665
+ "hardis:storage-stats:diagnose:org",
6666
+ "storage-stats:hardis:diagnose:org",
6667
+ "storage-stats:diagnose:hardis:org",
6668
+ "storage-stats:diagnose:org:hardis"
6285
6669
  ]
6286
6670
  },
6287
- "hardis:org:diagnose:legacyapi": {
6671
+ "hardis:org:diagnose:unsecure-connected-apps": {
6288
6672
  "aliases": [],
6289
6673
  "args": {},
6290
- "description": "Checks if an org uses retired or someday retired API version\n\n\nSee article below\n\n[![Handle Salesforce API versions Deprecation like a pro](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-deprecated-api.jpg)](https://nicolas.vuillamy.fr/handle-salesforce-api-versions-deprecation-like-a-pro-335065f52238)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-deprecated-api-calls/) and can output Grafana, Slack and MsTeams Notifications.\n",
6674
+ "description": "\n## Command Behavior\n\n**Detects unsecured Connected Apps in a Salesforce org and generates detailed reports for security analysis.**\n\nThis command is a critical security diagnostic tool that helps administrators identify Connected Apps that may pose security risks due to improper configuration. It provides comprehensive analysis of OAuth tokens and Connected App security settings to ensure proper access control.\n\nKey functionalities:\n\n- **OAuth Token Analysis:** Queries all OAuth tokens in the org using SOQL to retrieve comprehensive token information including app names, users, authorization status, and usage statistics.\n- **Security Status Assessment:** Evaluates each Connected App's security configuration by checking the `IsUsingAdminAuthorization` flag to determine if admin pre-approval is required.\n- **Unsecured App Detection:** Identifies Connected Apps that allow users to authorize themselves without admin approval, which can pose security risks.\n- **Detailed Reporting:** Generates two comprehensive CSV reports:\n - **OAuth Tokens Report:** Lists all OAuth tokens with security status, user information, and usage data\n - **Connected Apps Summary:** Aggregates unsecured Connected Apps with counts of associated OAuth tokens\n- **Visual Indicators:** Uses status icons (❌ for unsecured, ✅ for secured) to provide immediate visual feedback on security status.\n- **Security Recommendations:** Provides actionable guidance on how to secure Connected Apps through proper configuration.\n- **Notifications:** Sends alerts to configured channels (Grafana, Slack, MS Teams) with security findings and attached reports.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-security/) and can output Grafana, Slack and MsTeams Notifications.\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/jHv8yrSK8Dg\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query Execution:** Executes a comprehensive SOQL query on the `OauthToken` object, joining with `AppMenuItem` and `User` objects to gather complete security context.\n- **Security Analysis Logic:** Analyzes the `AppMenuItem.IsUsingAdminAuthorization` field to determine if a Connected App requires admin pre-approval for user authorization.\n- **Data Transformation:** Processes raw SOQL results to add security status indicators and reorganize data for optimal reporting and analysis.\n- **Aggregation Processing:** Groups OAuth tokens by Connected App name to provide summary statistics and identify the most problematic applications.\n- **Report Generation:** Uses `generateCsvFile` to create structured CSV reports with proper formatting and metadata for easy analysis and sharing.\n- **Notification Integration:** Integrates with the `NotifProvider` to send security alerts with detailed metrics, including the number of unsecured Connected Apps and associated OAuth tokens.\n- **File Management:** Generates multiple output formats (CSV, XLSX) and manages file paths using `generateReportPath` for consistent report organization.\n- **Connection Management:** Uses `setConnectionVariables` to ensure proper authentication context for notification providers that require org connection details.\n</details>\n",
6291
6675
  "examples": [
6292
- "$ sf hardis:org:diagnose:legacyapi",
6293
- "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
6294
- "$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
6295
- "$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
6676
+ "$ sf hardis:org:diagnose:unsecure-connected-apps"
6296
6677
  ],
6297
6678
  "flags": {
6298
6679
  "json": {
@@ -6310,24 +6691,6 @@
6310
6691
  "multiple": false,
6311
6692
  "type": "option"
6312
6693
  },
6313
- "eventtype": {
6314
- "char": "e",
6315
- "description": "Type of EventLogFile event to analyze",
6316
- "name": "eventtype",
6317
- "default": "ApiTotalUsage",
6318
- "hasDynamicHelp": false,
6319
- "multiple": false,
6320
- "type": "option"
6321
- },
6322
- "limit": {
6323
- "char": "l",
6324
- "description": "Number of latest EventLogFile events to analyze",
6325
- "name": "limit",
6326
- "default": 999,
6327
- "hasDynamicHelp": false,
6328
- "multiple": false,
6329
- "type": "option"
6330
- },
6331
6694
  "outputfile": {
6332
6695
  "char": "f",
6333
6696
  "description": "Force the path and name of output report file. Must end with .csv",
@@ -6374,13 +6737,13 @@
6374
6737
  },
6375
6738
  "hasDynamicHelp": true,
6376
6739
  "hiddenAliases": [],
6377
- "id": "hardis:org:diagnose:legacyapi",
6740
+ "id": "hardis:org:diagnose:unsecure-connected-apps",
6378
6741
  "pluginAlias": "sfdx-hardis",
6379
6742
  "pluginName": "sfdx-hardis",
6380
6743
  "pluginType": "core",
6381
6744
  "strict": true,
6382
6745
  "enableJsonFlag": true,
6383
- "title": "Check for legacy API use",
6746
+ "title": "Detect Unsecured Connected Apps",
6384
6747
  "requiresProject": false,
6385
6748
  "isESM": true,
6386
6749
  "relativePath": [
@@ -6389,42 +6752,43 @@
6389
6752
  "hardis",
6390
6753
  "org",
6391
6754
  "diagnose",
6392
- "legacyapi.js"
6755
+ "unsecure-connected-apps.js"
6393
6756
  ],
6394
6757
  "aliasPermutations": [],
6395
6758
  "permutations": [
6396
- "hardis:org:diagnose:legacyapi",
6397
- "org:hardis:diagnose:legacyapi",
6398
- "org:diagnose:hardis:legacyapi",
6399
- "org:diagnose:legacyapi:hardis",
6400
- "hardis:diagnose:org:legacyapi",
6401
- "diagnose:hardis:org:legacyapi",
6402
- "diagnose:org:hardis:legacyapi",
6403
- "diagnose:org:legacyapi:hardis",
6404
- "hardis:diagnose:legacyapi:org",
6405
- "diagnose:hardis:legacyapi:org",
6406
- "diagnose:legacyapi:hardis:org",
6407
- "diagnose:legacyapi:org:hardis",
6408
- "hardis:org:legacyapi:diagnose",
6409
- "org:hardis:legacyapi:diagnose",
6410
- "org:legacyapi:hardis:diagnose",
6411
- "org:legacyapi:diagnose:hardis",
6412
- "hardis:legacyapi:org:diagnose",
6413
- "legacyapi:hardis:org:diagnose",
6414
- "legacyapi:org:hardis:diagnose",
6415
- "legacyapi:org:diagnose:hardis",
6416
- "hardis:legacyapi:diagnose:org",
6417
- "legacyapi:hardis:diagnose:org",
6418
- "legacyapi:diagnose:hardis:org",
6419
- "legacyapi:diagnose:org:hardis"
6759
+ "hardis:org:diagnose:unsecure-connected-apps",
6760
+ "org:hardis:diagnose:unsecure-connected-apps",
6761
+ "org:diagnose:hardis:unsecure-connected-apps",
6762
+ "org:diagnose:unsecure-connected-apps:hardis",
6763
+ "hardis:diagnose:org:unsecure-connected-apps",
6764
+ "diagnose:hardis:org:unsecure-connected-apps",
6765
+ "diagnose:org:hardis:unsecure-connected-apps",
6766
+ "diagnose:org:unsecure-connected-apps:hardis",
6767
+ "hardis:diagnose:unsecure-connected-apps:org",
6768
+ "diagnose:hardis:unsecure-connected-apps:org",
6769
+ "diagnose:unsecure-connected-apps:hardis:org",
6770
+ "diagnose:unsecure-connected-apps:org:hardis",
6771
+ "hardis:org:unsecure-connected-apps:diagnose",
6772
+ "org:hardis:unsecure-connected-apps:diagnose",
6773
+ "org:unsecure-connected-apps:hardis:diagnose",
6774
+ "org:unsecure-connected-apps:diagnose:hardis",
6775
+ "hardis:unsecure-connected-apps:org:diagnose",
6776
+ "unsecure-connected-apps:hardis:org:diagnose",
6777
+ "unsecure-connected-apps:org:hardis:diagnose",
6778
+ "unsecure-connected-apps:org:diagnose:hardis",
6779
+ "hardis:unsecure-connected-apps:diagnose:org",
6780
+ "unsecure-connected-apps:hardis:diagnose:org",
6781
+ "unsecure-connected-apps:diagnose:hardis:org",
6782
+ "unsecure-connected-apps:diagnose:org:hardis"
6420
6783
  ]
6421
6784
  },
6422
- "hardis:org:diagnose:licenses": {
6785
+ "hardis:org:diagnose:unused-apex-classes": {
6423
6786
  "aliases": [],
6424
6787
  "args": {},
6425
- "description": "\n**Lists and analyzes User Licenses and Permission Set Licenses subscribed and used in a Salesforce org.**\n\nThis command provides a comprehensive overview of your Salesforce license consumption. It's particularly useful for:\n\n- **License Management:** Understanding which licenses are active, how many are available, and how many are being used.\n- **Cost Optimization:** Identifying unused or underutilized licenses that could be reallocated or decommissioned.\n- **Compliance:** Ensuring that your organization is compliant with Salesforce licensing agreements.\n- **Monitoring:** Tracking license usage trends over time.\n\nKey functionalities:\n\n- **User License Details:** Retrieves information about standard and custom User Licenses, including `MasterLabel`, `Name`, `TotalLicenses`, and `UsedLicenses`.\n- **Permission Set License Details:** Retrieves information about Permission Set Licenses, including `MasterLabel`, `PermissionSetLicenseKey`, `TotalLicenses`, and `UsedLicenses`.\n- **Used Licenses Filter:** The `--usedonly` flag allows you to filter the report to show only licenses that have at least one `UsedLicenses` count greater than zero.\n- **CSV Report Generation:** Generates a CSV file containing all the retrieved license information, suitable for detailed analysis.\n- **Notifications:** Sends notifications to configured channels (e.g., Grafana, Slack, MS Teams) with a summary of license usage, including lists of active and used licenses.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It executes SOQL queries against the `UserLicense` and `PermissionSetLicense` objects in Salesforce to retrieve license data.\n- **Data Transformation:** It processes the query results, reformatting the data to be more readable and consistent for reporting purposes (e.g., removing `Id` and `attributes`, renaming `PermissionSetLicenseKey` to `Name`).\n- **Data Aggregation:** It aggregates license information, creating a `licensesByKey` object for quick lookups and a `usedLicenses` array for a concise list of actively used licenses.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of license data.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the license extraction process and the used licenses.\n</details>\n",
6788
+ "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",
6426
6789
  "examples": [
6427
- "$ sf hardis:org:diagnose:licenses"
6790
+ "$ sf hardis:org:diagnose:unused-apex-classes",
6791
+ "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
6428
6792
  ],
6429
6793
  "flags": {
6430
6794
  "json": {
@@ -6450,12 +6814,13 @@
6450
6814
  "multiple": false,
6451
6815
  "type": "option"
6452
6816
  },
6453
- "usedonly": {
6454
- "char": "u",
6455
- "description": "Filter to have only used licenses",
6456
- "name": "usedonly",
6457
- "allowNo": false,
6458
- "type": "boolean"
6817
+ "days": {
6818
+ "char": "t",
6819
+ "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
6820
+ "name": "days",
6821
+ "hasDynamicHelp": false,
6822
+ "multiple": false,
6823
+ "type": "option"
6459
6824
  },
6460
6825
  "debug": {
6461
6826
  "char": "d",
@@ -6495,13 +6860,13 @@
6495
6860
  },
6496
6861
  "hasDynamicHelp": true,
6497
6862
  "hiddenAliases": [],
6498
- "id": "hardis:org:diagnose:licenses",
6863
+ "id": "hardis:org:diagnose:unused-apex-classes",
6499
6864
  "pluginAlias": "sfdx-hardis",
6500
6865
  "pluginName": "sfdx-hardis",
6501
6866
  "pluginType": "core",
6502
6867
  "strict": true,
6503
6868
  "enableJsonFlag": true,
6504
- "title": "List licenses subscribed and used in a Salesforce org",
6869
+ "title": "Detect unused Apex classes in an org",
6505
6870
  "requiresProject": false,
6506
6871
  "isESM": true,
6507
6872
  "relativePath": [
@@ -6510,42 +6875,42 @@
6510
6875
  "hardis",
6511
6876
  "org",
6512
6877
  "diagnose",
6513
- "licenses.js"
6878
+ "unused-apex-classes.js"
6514
6879
  ],
6515
6880
  "aliasPermutations": [],
6516
6881
  "permutations": [
6517
- "hardis:org:diagnose:licenses",
6518
- "org:hardis:diagnose:licenses",
6519
- "org:diagnose:hardis:licenses",
6520
- "org:diagnose:licenses:hardis",
6521
- "hardis:diagnose:org:licenses",
6522
- "diagnose:hardis:org:licenses",
6523
- "diagnose:org:hardis:licenses",
6524
- "diagnose:org:licenses:hardis",
6525
- "hardis:diagnose:licenses:org",
6526
- "diagnose:hardis:licenses:org",
6527
- "diagnose:licenses:hardis:org",
6528
- "diagnose:licenses:org:hardis",
6529
- "hardis:org:licenses:diagnose",
6530
- "org:hardis:licenses:diagnose",
6531
- "org:licenses:hardis:diagnose",
6532
- "org:licenses:diagnose:hardis",
6533
- "hardis:licenses:org:diagnose",
6534
- "licenses:hardis:org:diagnose",
6535
- "licenses:org:hardis:diagnose",
6536
- "licenses:org:diagnose:hardis",
6537
- "hardis:licenses:diagnose:org",
6538
- "licenses:hardis:diagnose:org",
6539
- "licenses:diagnose:hardis:org",
6540
- "licenses:diagnose:org:hardis"
6882
+ "hardis:org:diagnose:unused-apex-classes",
6883
+ "org:hardis:diagnose:unused-apex-classes",
6884
+ "org:diagnose:hardis:unused-apex-classes",
6885
+ "org:diagnose:unused-apex-classes:hardis",
6886
+ "hardis:diagnose:org:unused-apex-classes",
6887
+ "diagnose:hardis:org:unused-apex-classes",
6888
+ "diagnose:org:hardis:unused-apex-classes",
6889
+ "diagnose:org:unused-apex-classes:hardis",
6890
+ "hardis:diagnose:unused-apex-classes:org",
6891
+ "diagnose:hardis:unused-apex-classes:org",
6892
+ "diagnose:unused-apex-classes:hardis:org",
6893
+ "diagnose:unused-apex-classes:org:hardis",
6894
+ "hardis:org:unused-apex-classes:diagnose",
6895
+ "org:hardis:unused-apex-classes:diagnose",
6896
+ "org:unused-apex-classes:hardis:diagnose",
6897
+ "org:unused-apex-classes:diagnose:hardis",
6898
+ "hardis:unused-apex-classes:org:diagnose",
6899
+ "unused-apex-classes:hardis:org:diagnose",
6900
+ "unused-apex-classes:org:hardis:diagnose",
6901
+ "unused-apex-classes:org:diagnose:hardis",
6902
+ "hardis:unused-apex-classes:diagnose:org",
6903
+ "unused-apex-classes:hardis:diagnose:org",
6904
+ "unused-apex-classes:diagnose:hardis:org",
6905
+ "unused-apex-classes:diagnose:org:hardis"
6541
6906
  ]
6542
6907
  },
6543
- "hardis:org:diagnose:releaseupdates": {
6908
+ "hardis:org:diagnose:unused-connected-apps": {
6544
6909
  "aliases": [],
6545
6910
  "args": {},
6546
- "description": "Export Release Updates into a CSV file with selected criteria, and highlight Release Updates that should be checked.\n\nBefore publishing **Breaking Changes** ❌, Salesforce announce them in the setup menu [**Release Updates**](https://help.salesforce.com/s/articleView?id=sf.release_updates.htm&type=5)\n\n⚠️ Some of them are very important, because if you don't make the related upgrades in time (ex: before Winter 25) , your production org can crash !\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-release-updates/) and can output Grafana, Slack and MsTeams Notifications.\n",
6911
+ "description": "\n## Command Behavior\n\n**Identifies and reports on potentially unused Connected Apps in a Salesforce org, suggesting candidates for deletion or deactivation.**\n\nThis command helps improve org security and reduce technical debt by pinpointing Connected Apps that are no longer actively used. Connected Apps can pose security risks if left unmonitored, and cleaning them up contributes to a healthier Salesforce environment.\n\nKey functionalities:\n\n- **Connected App Data Collection:** Gathers information about all Connected Apps in the org, including creation and last modified dates, and associated users.\n- **Usage Analysis:** Analyzes `LoginHistory` and `OAuthToken` records to determine the last usage date of each Connected App.\n- **Inactivity Detection:** Flags Connected Apps as potentially unused if they have no recent login history or OAuth token usage.\n- **Accessibility Check:** Examines Connected App metadata to identify if they are accessible (e.g., if they require admin approval and have no profiles or permission sets assigned).\n- **Ignored Apps:** Automatically ignores a predefined list of common Salesforce Connected Apps (e.g., `Salesforce CLI`, `Salesforce Mobile Dashboards`). You can extend this list by defining the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n- **CSV Report Generation:** Generates a CSV file containing details of all analyzed Connected Apps, including their usage status, last usage date, and reasons for being flagged as potentially unused.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of potentially unused Connected Apps.\n\n**Default Ignored Connected Apps:**\n\n- Ant Migration Tool\n- Chatter Desktop\n- Chatter Mobile for BlackBerry\n- Force.com IDE\n- OIQ_Integration\n- Salesforce CLI\n- Salesforce Files\n- Salesforce Mobile Dashboards\n- Salesforce Touch\n- Salesforce for Outlook\n- SalesforceA\n- SalesforceA for Android\n- SalesforceA for iOS\n- SalesforceDX Namespace Registry\n- SalesforceIQ\n\nYou can add more ignored apps by defining a comma-separated list of names in the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n\n_Example: \nALLOWED_INACTIVE_CONNECTED_APPS=My App 1,My App 2, My App 3_\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-connected-apps/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It performs SOQL queries against `ConnectedApplication`, `LoginHistory`, and `OAuthToken` objects to gather comprehensive data about Connected Apps and their usage.\n- **Temporary SFDX Project:** It creates a temporary SFDX project to retrieve Connected App metadata, allowing for local parsing and analysis of their XML files.\n- **Metadata Parsing:** It parses the `connectedApp-meta.xml` files to check for `isAdminApproved` and the presence of `profileName` or `permissionsetName` to determine accessibility.\n- **Data Correlation:** It correlates data from various Salesforce objects to build a complete picture of each Connected App's usage and status.\n- **Date Calculation:** Uses `moment` to calculate the time since the last OAuth token usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused Connected Apps.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **File System Operations:** Uses `fs-extra` for creating and removing temporary directories and files.\n- **Environment Variable Reading:** Reads the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable to customize the list of ignored Connected Apps.\n</details>\n",
6547
6912
  "examples": [
6548
- "$ sf hardis:org:diagnose:releaseupdates"
6913
+ "$ sf hardis:org:diagnose:unused-connected-apps"
6549
6914
  ],
6550
6915
  "flags": {
6551
6916
  "json": {
@@ -6609,13 +6974,30 @@
6609
6974
  },
6610
6975
  "hasDynamicHelp": true,
6611
6976
  "hiddenAliases": [],
6612
- "id": "hardis:org:diagnose:releaseupdates",
6977
+ "id": "hardis:org:diagnose:unused-connected-apps",
6613
6978
  "pluginAlias": "sfdx-hardis",
6614
6979
  "pluginName": "sfdx-hardis",
6615
6980
  "pluginType": "core",
6616
6981
  "strict": true,
6617
6982
  "enableJsonFlag": true,
6618
- "title": "Check Release Updates of an org",
6983
+ "title": "Unused Connected Apps in an org",
6984
+ "allowedInactiveConnectedApps": [
6985
+ "Ant Migration Tool",
6986
+ "Chatter Desktop",
6987
+ "Chatter Mobile for BlackBerry",
6988
+ "Force.com IDE",
6989
+ "OIQ_Integration",
6990
+ "Salesforce CLI",
6991
+ "Salesforce Files",
6992
+ "Salesforce Mobile Dashboards",
6993
+ "Salesforce Touch",
6994
+ "Salesforce for Outlook",
6995
+ "SalesforceA",
6996
+ "SalesforceA for Android",
6997
+ "SalesforceA for iOS",
6998
+ "SalesforceDX Namespace Registry",
6999
+ "SalesforceIQ"
7000
+ ],
6619
7001
  "requiresProject": false,
6620
7002
  "isESM": true,
6621
7003
  "relativePath": [
@@ -6624,47 +7006,43 @@
6624
7006
  "hardis",
6625
7007
  "org",
6626
7008
  "diagnose",
6627
- "releaseupdates.js"
7009
+ "unused-connected-apps.js"
6628
7010
  ],
6629
7011
  "aliasPermutations": [],
6630
7012
  "permutations": [
6631
- "hardis:org:diagnose:releaseupdates",
6632
- "org:hardis:diagnose:releaseupdates",
6633
- "org:diagnose:hardis:releaseupdates",
6634
- "org:diagnose:releaseupdates:hardis",
6635
- "hardis:diagnose:org:releaseupdates",
6636
- "diagnose:hardis:org:releaseupdates",
6637
- "diagnose:org:hardis:releaseupdates",
6638
- "diagnose:org:releaseupdates:hardis",
6639
- "hardis:diagnose:releaseupdates:org",
6640
- "diagnose:hardis:releaseupdates:org",
6641
- "diagnose:releaseupdates:hardis:org",
6642
- "diagnose:releaseupdates:org:hardis",
6643
- "hardis:org:releaseupdates:diagnose",
6644
- "org:hardis:releaseupdates:diagnose",
6645
- "org:releaseupdates:hardis:diagnose",
6646
- "org:releaseupdates:diagnose:hardis",
6647
- "hardis:releaseupdates:org:diagnose",
6648
- "releaseupdates:hardis:org:diagnose",
6649
- "releaseupdates:org:hardis:diagnose",
6650
- "releaseupdates:org:diagnose:hardis",
6651
- "hardis:releaseupdates:diagnose:org",
6652
- "releaseupdates:hardis:diagnose:org",
6653
- "releaseupdates:diagnose:hardis:org",
6654
- "releaseupdates:diagnose:org:hardis"
7013
+ "hardis:org:diagnose:unused-connected-apps",
7014
+ "org:hardis:diagnose:unused-connected-apps",
7015
+ "org:diagnose:hardis:unused-connected-apps",
7016
+ "org:diagnose:unused-connected-apps:hardis",
7017
+ "hardis:diagnose:org:unused-connected-apps",
7018
+ "diagnose:hardis:org:unused-connected-apps",
7019
+ "diagnose:org:hardis:unused-connected-apps",
7020
+ "diagnose:org:unused-connected-apps:hardis",
7021
+ "hardis:diagnose:unused-connected-apps:org",
7022
+ "diagnose:hardis:unused-connected-apps:org",
7023
+ "diagnose:unused-connected-apps:hardis:org",
7024
+ "diagnose:unused-connected-apps:org:hardis",
7025
+ "hardis:org:unused-connected-apps:diagnose",
7026
+ "org:hardis:unused-connected-apps:diagnose",
7027
+ "org:unused-connected-apps:hardis:diagnose",
7028
+ "org:unused-connected-apps:diagnose:hardis",
7029
+ "hardis:unused-connected-apps:org:diagnose",
7030
+ "unused-connected-apps:hardis:org:diagnose",
7031
+ "unused-connected-apps:org:hardis:diagnose",
7032
+ "unused-connected-apps:org:diagnose:hardis",
7033
+ "hardis:unused-connected-apps:diagnose:org",
7034
+ "unused-connected-apps:hardis:diagnose:org",
7035
+ "unused-connected-apps:diagnose:hardis:org",
7036
+ "unused-connected-apps:diagnose:org:hardis"
6655
7037
  ]
6656
7038
  },
6657
- "hardis:org:diagnose:storage-stats": {
7039
+ "hardis:org:diagnose:unusedlicenses": {
6658
7040
  "aliases": [],
6659
7041
  "args": {},
6660
- "description": "**Extracts and analyzes Data Storage usage for a Salesforce org, providing detailed per-object breakdowns with flexible grouping options.**\n\nThis command provides a comprehensive overview of your Salesforce data storage consumption. It's particularly useful for:\n\n- **Storage Management:** Understanding which SObjects consume the most storage and how usage has evolved over time.\n- **Cost Optimization:** Identifying storage-heavy objects that could be candidates for data archival or cleanup strategies.\n- **Capacity Planning:** Tracking storage trends to predict when additional capacity will be needed.\n- **Compliance & Governance:** Monitoring data growth patterns to ensure alignment with data retention policies.\n\nKey functionalities:\n\n- **Storage Limits Analysis:** Retrieves and displays org data storage limits, including total capacity, used storage, remaining storage, and percentage used. Detects and alerts on over-usage scenarios.\n- **SObject Discovery & Filtering:** Automatically discovers all SObjects in the org and filters them to focus on production/custom objects (excludes metadata types, platform-only objects, and cached empty objects).\n- **Interactive Selection:** Prompts the user to select which SObjects to analyze and choose breakdown fields (date fields, RecordType, custom fields, or relationship fields).\n- **Flexible Breakdown Field:** Supports grouping by any field including:\n - Date/DateTime fields (`CreatedDate`, `LastModifiedDate`, custom date fields)\n - RecordType (`RecordType.Name`)\n - Custom fields (`Status__c`, picklists, text fields)\n - Nested relationship fields (`SBQQ__Quote__r.RecordType.Name`)\n- **Date Granularity Options:** For date/datetime fields, choose between:\n - Year-based grouping (`CALENDAR_YEAR`)\n - Month-based grouping (`CALENDAR_MONTH`)\n - Day-based grouping (exact date)\n- **WHERE Clause Filtering:** Apply SOQL WHERE conditions to filter records before calculating storage (e.g., only active records, records from the last year).\n- **Storage Estimation:** Estimates storage usage for each object using an average record size heuristic (2 KB per record) and calculates the percentage of org quota consumed.\n- **Dual CSV Reports:** Generates two CSV files: a detailed breakdown by selected field and a totals-per-object summary, both suitable for spreadsheet analysis and reporting.\n- **Empty Objects Cache:** Maintains a per-user cache of objects detected with zero records to optimize subsequent runs by skipping empty tables.\n- **Progress Tracking:** Sends WebSocket progress messages for integration with external UIs and monitoring dashboards.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Limits Retrieval:** Calls `conn.limits()` to retrieve the `DataStorageMB` object containing `Max` and `Remaining` values. Handles negative `Remaining` values (over-usage scenarios) by calculating `overUsageMB` and adjusting display values.\n- **SObject Discovery:** Uses `conn.metadata.list([{ type: 'CustomObject' }])` to get custom objects and `conn.describeGlobal()` to get all SObjects. Filters by object capabilities (`layoutable`, `queryable`, `retrieveable`, `createable`, `updateable`, `deletable`) and excludes metadata types (`__mdt` suffix) and cached empty objects.\n- **User Interaction:** Uses `prompts` for interactive multi-select of SObjects, breakdown field selection, granularity choice (for date fields), and optional WHERE conditions. All objects are pre-selected by default for user convenience.\n- **Field Validation:** Recursively validates breakdown fields including nested relationships (e.g., `SBQQ__Quote__r.RecordType.Name`) by traversing the relationship chain and checking field existence on each related object. Automatically handles special cases like `RecordType` -> `RecordTypeId` and `__r` -> `__c` conversions.\n- **Dynamic Query Generation:** Builds SOQL queries based on field type and granularity:\n - For date fields with year granularity: `SELECT CALENDAR_YEAR(<Field>) breakdown, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY CALENDAR_YEAR(<Field>) ORDER BY CALENDAR_YEAR(<Field>)`\n - For date fields with month granularity: `SELECT CALENDAR_YEAR(<Field>) year, CALENDAR_MONTH(<Field>) month, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY CALENDAR_YEAR(<Field>), CALENDAR_MONTH(<Field>) ORDER BY CALENDAR_YEAR(<Field>), CALENDAR_MONTH(<Field>)`\n - For non-date fields: `SELECT <Field> breakdown, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY <Field> ORDER BY <Field>`\n- **WHERE Clause Support:** Accepts user-provided WHERE conditions via flag (`--where`) or interactive prompt. Injects the condition into all SOQL queries for consistent filtering across all objects.\n- **Storage Calculation:** Applies a conservative average record size of 2 KB (2048 bytes) to estimate storage consumption. Calculates both MB usage and percentage of org quota for each object and breakdown value.\n- **Report Generation:** Uses `generateCsvFile` and `generateReportPath` helpers to create two CSV files in the reports directory:\n - Detailed breakdown: includes all statistics per breakdown value per object (e.g., by year, by month, by RecordType)\n - Totals summary: includes only aggregate totals per object\n - File naming includes breakdown field, granularity (for date fields), and `-filtered` suffix when WHERE clause is applied\n- **Caching Mechanism:** Writes a JSON cache file per authenticated username (sanitized) in the reports directory (`<username>_empty_tables_cache.json`) containing an array of empty object names. The cache is updated after each run with newly detected empty objects.\n- **Progress & UX:** Uses `WebSocketClient` to emit start/step/end progress messages for external monitoring. Outputs summary tables with `uxLogTable` and status messages with `uxLog`.\n- **Return Value:** Returns a JSON object containing `tableStorageInfos` (all rows), `tableStorageInfosTotals` (summary rows), `storageLimits` (org limits object), and `outputFiles` (paths to generated CSV/XLSX reports).\n</details>\n\n![](https://sfdx-hardis.cloudity.com/assets/images/storage-usage-year-breakdown.png)\n\n![](https://sfdx-hardis.cloudity.com/assets/images/storage-usage-total.png)\n",
7042
+ "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",
6661
7043
  "examples": [
6662
- "$ sf hardis:org:diagnose:storage-stats",
6663
- "$ sf hardis:org:diagnose:storage-stats --breakdown-field \"CreatedDate\"",
6664
- "$ sf hardis:org:diagnose:storage-stats -b \"RecordType.Name\"",
6665
- "$ sf hardis:org:diagnose:storage-stats --where \"CreatedDate = LAST_N_DAYS:365\"",
6666
- "$ sf hardis:org:diagnose:storage-stats -w \"Status__c = 'Active'\"",
6667
- "$ sf hardis:org:diagnose:storage-stats -b \"LastModifiedDate\" -w \"IsDeleted = false\""
7044
+ "$ sf hardis:org:diagnose:unusedlicenses",
7045
+ "$ sf hardis:org:diagnose:unusedlicenses --fix"
6668
7046
  ],
6669
7047
  "flags": {
6670
7048
  "json": {
@@ -6690,22 +7068,6 @@
6690
7068
  "multiple": false,
6691
7069
  "type": "option"
6692
7070
  },
6693
- "breakdown-field": {
6694
- "char": "b",
6695
- "description": "Field to use for storage stats breakdown. Example: \"CreatedDate\", \"LastModifiedDate\", \"RecordType.Name\", or custom fields like \"Status__c\"",
6696
- "name": "breakdown-field",
6697
- "hasDynamicHelp": false,
6698
- "multiple": false,
6699
- "type": "option"
6700
- },
6701
- "where": {
6702
- "char": "w",
6703
- "description": "WHERE clause to filter records in the query (without the WHERE keyword). Example: \"CreatedDate = LAST_N_DAYS:365\" or \"Status__c = 'Active'\"",
6704
- "name": "where",
6705
- "hasDynamicHelp": false,
6706
- "multiple": false,
6707
- "type": "option"
6708
- },
6709
7071
  "debug": {
6710
7072
  "char": "d",
6711
7073
  "description": "Activate debug mode (more logs)",
@@ -6744,14 +7106,32 @@
6744
7106
  },
6745
7107
  "hasDynamicHelp": true,
6746
7108
  "hiddenAliases": [],
6747
- "id": "hardis:org:diagnose:storage-stats",
7109
+ "id": "hardis:org:diagnose:unusedlicenses",
6748
7110
  "pluginAlias": "sfdx-hardis",
6749
7111
  "pluginName": "sfdx-hardis",
6750
7112
  "pluginType": "core",
6751
7113
  "strict": true,
6752
7114
  "enableJsonFlag": true,
6753
- "title": "Extract Data Storage stats",
6754
- "requiresProject": true,
7115
+ "title": "Detect unused Permission Set Licenses (beta)",
7116
+ "requiresProject": false,
7117
+ "additionalPermissionSetsToAlwaysGet": [
7118
+ "Sales_User"
7119
+ ],
7120
+ "permSetsPermSetLicenses": [
7121
+ {
7122
+ "permSet": "Sales_User",
7123
+ "permSetLicense": "SalesUserPsl"
7124
+ }
7125
+ ],
7126
+ "profilesPermissionSetLicenses": [
7127
+ {
7128
+ "profile": "Salesforce API Only",
7129
+ "permSetLicense": "SalesforceAPIIntegrationPsl"
7130
+ }
7131
+ ],
7132
+ "alwaysExcludeForActiveUsersPermissionSetLicenses": [
7133
+ "IdentityConnect"
7134
+ ],
6755
7135
  "isESM": true,
6756
7136
  "relativePath": [
6757
7137
  "lib",
@@ -6759,42 +7139,46 @@
6759
7139
  "hardis",
6760
7140
  "org",
6761
7141
  "diagnose",
6762
- "storage-stats.js"
7142
+ "unusedlicenses.js"
6763
7143
  ],
6764
7144
  "aliasPermutations": [],
6765
7145
  "permutations": [
6766
- "hardis:org:diagnose:storage-stats",
6767
- "org:hardis:diagnose:storage-stats",
6768
- "org:diagnose:hardis:storage-stats",
6769
- "org:diagnose:storage-stats:hardis",
6770
- "hardis:diagnose:org:storage-stats",
6771
- "diagnose:hardis:org:storage-stats",
6772
- "diagnose:org:hardis:storage-stats",
6773
- "diagnose:org:storage-stats:hardis",
6774
- "hardis:diagnose:storage-stats:org",
6775
- "diagnose:hardis:storage-stats:org",
6776
- "diagnose:storage-stats:hardis:org",
6777
- "diagnose:storage-stats:org:hardis",
6778
- "hardis:org:storage-stats:diagnose",
6779
- "org:hardis:storage-stats:diagnose",
6780
- "org:storage-stats:hardis:diagnose",
6781
- "org:storage-stats:diagnose:hardis",
6782
- "hardis:storage-stats:org:diagnose",
6783
- "storage-stats:hardis:org:diagnose",
6784
- "storage-stats:org:hardis:diagnose",
6785
- "storage-stats:org:diagnose:hardis",
6786
- "hardis:storage-stats:diagnose:org",
6787
- "storage-stats:hardis:diagnose:org",
6788
- "storage-stats:diagnose:hardis:org",
6789
- "storage-stats:diagnose:org:hardis"
7146
+ "hardis:org:diagnose:unusedlicenses",
7147
+ "org:hardis:diagnose:unusedlicenses",
7148
+ "org:diagnose:hardis:unusedlicenses",
7149
+ "org:diagnose:unusedlicenses:hardis",
7150
+ "hardis:diagnose:org:unusedlicenses",
7151
+ "diagnose:hardis:org:unusedlicenses",
7152
+ "diagnose:org:hardis:unusedlicenses",
7153
+ "diagnose:org:unusedlicenses:hardis",
7154
+ "hardis:diagnose:unusedlicenses:org",
7155
+ "diagnose:hardis:unusedlicenses:org",
7156
+ "diagnose:unusedlicenses:hardis:org",
7157
+ "diagnose:unusedlicenses:org:hardis",
7158
+ "hardis:org:unusedlicenses:diagnose",
7159
+ "org:hardis:unusedlicenses:diagnose",
7160
+ "org:unusedlicenses:hardis:diagnose",
7161
+ "org:unusedlicenses:diagnose:hardis",
7162
+ "hardis:unusedlicenses:org:diagnose",
7163
+ "unusedlicenses:hardis:org:diagnose",
7164
+ "unusedlicenses:org:hardis:diagnose",
7165
+ "unusedlicenses:org:diagnose:hardis",
7166
+ "hardis:unusedlicenses:diagnose:org",
7167
+ "unusedlicenses:hardis:diagnose:org",
7168
+ "unusedlicenses:diagnose:hardis:org",
7169
+ "unusedlicenses:diagnose:org:hardis"
6790
7170
  ]
6791
7171
  },
6792
- "hardis:org:diagnose:unsecure-connected-apps": {
7172
+ "hardis:org:diagnose:unusedusers": {
6793
7173
  "aliases": [],
6794
7174
  "args": {},
6795
- "description": "\n## Command Behavior\n\n**Detects unsecured Connected Apps in a Salesforce org and generates detailed reports for security analysis.**\n\nThis command is a critical security diagnostic tool that helps administrators identify Connected Apps that may pose security risks due to improper configuration. It provides comprehensive analysis of OAuth tokens and Connected App security settings to ensure proper access control.\n\nKey functionalities:\n\n- **OAuth Token Analysis:** Queries all OAuth tokens in the org using SOQL to retrieve comprehensive token information including app names, users, authorization status, and usage statistics.\n- **Security Status Assessment:** Evaluates each Connected App's security configuration by checking the `IsUsingAdminAuthorization` flag to determine if admin pre-approval is required.\n- **Unsecured App Detection:** Identifies Connected Apps that allow users to authorize themselves without admin approval, which can pose security risks.\n- **Detailed Reporting:** Generates two comprehensive CSV reports:\n - **OAuth Tokens Report:** Lists all OAuth tokens with security status, user information, and usage data\n - **Connected Apps Summary:** Aggregates unsecured Connected Apps with counts of associated OAuth tokens\n- **Visual Indicators:** Uses status icons (❌ for unsecured, for secured) to provide immediate visual feedback on security status.\n- **Security Recommendations:** Provides actionable guidance on how to secure Connected Apps through proper configuration.\n- **Notifications:** Sends alerts to configured channels (Grafana, Slack, MS Teams) with security findings and attached reports.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-security/) and can output Grafana, Slack and MsTeams Notifications.\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/jHv8yrSK8Dg\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query Execution:** Executes a comprehensive SOQL query on the `OauthToken` object, joining with `AppMenuItem` and `User` objects to gather complete security context.\n- **Security Analysis Logic:** Analyzes the `AppMenuItem.IsUsingAdminAuthorization` field to determine if a Connected App requires admin pre-approval for user authorization.\n- **Data Transformation:** Processes raw SOQL results to add security status indicators and reorganize data for optimal reporting and analysis.\n- **Aggregation Processing:** Groups OAuth tokens by Connected App name to provide summary statistics and identify the most problematic applications.\n- **Report Generation:** Uses `generateCsvFile` to create structured CSV reports with proper formatting and metadata for easy analysis and sharing.\n- **Notification Integration:** Integrates with the `NotifProvider` to send security alerts with detailed metrics, including the number of unsecured Connected Apps and associated OAuth tokens.\n- **File Management:** Generates multiple output formats (CSV, XLSX) and manages file paths using `generateReportPath` for consistent report organization.\n- **Connection Management:** Uses `setConnectionVariables` to ensure proper authentication context for notification providers that require org connection details.\n</details>\n",
7175
+ "description": "\n## Command Behavior\n\n**Detects and reports on inactive or unused Salesforce user accounts, helping to optimize license usage and enhance security.**\n\nEfficient user management is vital in Salesforce to ensure resources are optimized and costs are controlled. However, inactive or unused user accounts can often go unnoticed, leading to wasted licenses and potential security risks. This tool addresses this challenge by enabling administrators to identify users who haven't logged in within a specified period.\n\nBy analyzing user login activity and last login timestamps, this feature highlights inactive user accounts, allowing administrators to take appropriate action. Whether it's deactivating dormant accounts, freeing up licenses, or ensuring compliance with security policies, this functionality empowers administrators to maintain a lean and secure Salesforce environment.\n\nKey functionalities:\n\n- **Inactivity Detection:** Identifies users who have not logged in for a specified number of days (`--days` flag, default 180 days in CI, 365 days otherwise).\n- **License Type Filtering:** Allows filtering users by license type using `--licensetypes` (e.g., `all-crm`, `all-paying`) or specific license identifiers using `--licenseidentifiers`.\n - `all-crm`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT` licenses.\n - `all-paying`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT`, `PID_Customer_Community`, `PID_Customer_Community_Login`, `PID_Partner_Community`, `PID_Partner_Community_Login` licenses.\n - Note: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/sfdx_cli_reference/sforce_api_objects_userlicense.htm).\n- **Active User Retrieval:** The `--returnactiveusers` flag inverts the command, allowing you to retrieve active users who *have* logged in during the specified period.\n- **CSV Report Generation:** Generates a CSV file containing details of all identified users (inactive or active), including their last login date, profile, and license information.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of inactive or active users.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query (Bulk API):** It uses `bulkQuery` to efficiently retrieve user records from the Salesforce `User` object. The SOQL query dynamically constructs its WHERE clause based on the `--days`, `--licensetypes`, `--licenseidentifiers`, and `--returnactiveusers` flags.\n- **Interactive Prompts:** Uses `prompts` to interactively ask the user for the number of inactive days and license types if not provided via flags.\n- **License Mapping:** Internally maps common license type aliases (e.g., `all-crm`) to their corresponding Salesforce `LicenseDefinitionKey` values.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of users.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides a summary of the findings in the console, indicating the number of inactive or active users found.\n</details>",
6796
7176
  "examples": [
6797
- "$ sf hardis:org:diagnose:unsecure-connected-apps"
7177
+ "$ sf hardis:org:diagnose:unusedusers",
7178
+ "$ sf hardis:org:diagnose:unusedusers --days 365",
7179
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
7180
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
7181
+ "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
6798
7182
  ],
6799
7183
  "flags": {
6800
7184
  "json": {
@@ -6820,6 +7204,41 @@
6820
7204
  "multiple": false,
6821
7205
  "type": "option"
6822
7206
  },
7207
+ "days": {
7208
+ "char": "t",
7209
+ "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
7210
+ "name": "days",
7211
+ "hasDynamicHelp": false,
7212
+ "multiple": false,
7213
+ "type": "option"
7214
+ },
7215
+ "licensetypes": {
7216
+ "char": "l",
7217
+ "description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
7218
+ "name": "licensetypes",
7219
+ "hasDynamicHelp": false,
7220
+ "multiple": false,
7221
+ "options": [
7222
+ "all",
7223
+ "all-crm",
7224
+ "all-paying"
7225
+ ],
7226
+ "type": "option"
7227
+ },
7228
+ "licenseidentifiers": {
7229
+ "char": "i",
7230
+ "description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
7231
+ "name": "licenseidentifiers",
7232
+ "hasDynamicHelp": false,
7233
+ "multiple": false,
7234
+ "type": "option"
7235
+ },
7236
+ "returnactiveusers": {
7237
+ "description": "Inverts the command by returning the active users",
7238
+ "name": "returnactiveusers",
7239
+ "allowNo": false,
7240
+ "type": "boolean"
7241
+ },
6823
7242
  "debug": {
6824
7243
  "char": "d",
6825
7244
  "description": "Activate debug mode (more logs)",
@@ -6858,13 +7277,13 @@
6858
7277
  },
6859
7278
  "hasDynamicHelp": true,
6860
7279
  "hiddenAliases": [],
6861
- "id": "hardis:org:diagnose:unsecure-connected-apps",
7280
+ "id": "hardis:org:diagnose:unusedusers",
6862
7281
  "pluginAlias": "sfdx-hardis",
6863
7282
  "pluginName": "sfdx-hardis",
6864
7283
  "pluginType": "core",
6865
7284
  "strict": true,
6866
7285
  "enableJsonFlag": true,
6867
- "title": "Detect Unsecured Connected Apps",
7286
+ "title": "Detect unused Users in Salesforce",
6868
7287
  "requiresProject": false,
6869
7288
  "isESM": true,
6870
7289
  "relativePath": [
@@ -6873,43 +7292,42 @@
6873
7292
  "hardis",
6874
7293
  "org",
6875
7294
  "diagnose",
6876
- "unsecure-connected-apps.js"
7295
+ "unusedusers.js"
6877
7296
  ],
6878
7297
  "aliasPermutations": [],
6879
7298
  "permutations": [
6880
- "hardis:org:diagnose:unsecure-connected-apps",
6881
- "org:hardis:diagnose:unsecure-connected-apps",
6882
- "org:diagnose:hardis:unsecure-connected-apps",
6883
- "org:diagnose:unsecure-connected-apps:hardis",
6884
- "hardis:diagnose:org:unsecure-connected-apps",
6885
- "diagnose:hardis:org:unsecure-connected-apps",
6886
- "diagnose:org:hardis:unsecure-connected-apps",
6887
- "diagnose:org:unsecure-connected-apps:hardis",
6888
- "hardis:diagnose:unsecure-connected-apps:org",
6889
- "diagnose:hardis:unsecure-connected-apps:org",
6890
- "diagnose:unsecure-connected-apps:hardis:org",
6891
- "diagnose:unsecure-connected-apps:org:hardis",
6892
- "hardis:org:unsecure-connected-apps:diagnose",
6893
- "org:hardis:unsecure-connected-apps:diagnose",
6894
- "org:unsecure-connected-apps:hardis:diagnose",
6895
- "org:unsecure-connected-apps:diagnose:hardis",
6896
- "hardis:unsecure-connected-apps:org:diagnose",
6897
- "unsecure-connected-apps:hardis:org:diagnose",
6898
- "unsecure-connected-apps:org:hardis:diagnose",
6899
- "unsecure-connected-apps:org:diagnose:hardis",
6900
- "hardis:unsecure-connected-apps:diagnose:org",
6901
- "unsecure-connected-apps:hardis:diagnose:org",
6902
- "unsecure-connected-apps:diagnose:hardis:org",
6903
- "unsecure-connected-apps:diagnose:org:hardis"
7299
+ "hardis:org:diagnose:unusedusers",
7300
+ "org:hardis:diagnose:unusedusers",
7301
+ "org:diagnose:hardis:unusedusers",
7302
+ "org:diagnose:unusedusers:hardis",
7303
+ "hardis:diagnose:org:unusedusers",
7304
+ "diagnose:hardis:org:unusedusers",
7305
+ "diagnose:org:hardis:unusedusers",
7306
+ "diagnose:org:unusedusers:hardis",
7307
+ "hardis:diagnose:unusedusers:org",
7308
+ "diagnose:hardis:unusedusers:org",
7309
+ "diagnose:unusedusers:hardis:org",
7310
+ "diagnose:unusedusers:org:hardis",
7311
+ "hardis:org:unusedusers:diagnose",
7312
+ "org:hardis:unusedusers:diagnose",
7313
+ "org:unusedusers:hardis:diagnose",
7314
+ "org:unusedusers:diagnose:hardis",
7315
+ "hardis:unusedusers:org:diagnose",
7316
+ "unusedusers:hardis:org:diagnose",
7317
+ "unusedusers:org:hardis:diagnose",
7318
+ "unusedusers:org:diagnose:hardis",
7319
+ "hardis:unusedusers:diagnose:org",
7320
+ "unusedusers:hardis:diagnose:org",
7321
+ "unusedusers:diagnose:hardis:org",
7322
+ "unusedusers:diagnose:org:hardis"
6904
7323
  ]
6905
7324
  },
6906
- "hardis:org:diagnose:unused-apex-classes": {
7325
+ "hardis:org:files:export": {
6907
7326
  "aliases": [],
6908
7327
  "args": {},
6909
- "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",
7328
+ "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",
6910
7329
  "examples": [
6911
- "$ sf hardis:org:diagnose:unused-apex-classes",
6912
- "$ sf hardis:org:diagnose:unused-apex-classes --days 700"
7330
+ "$ sf hardis:org:files:export"
6913
7331
  ],
6914
7332
  "flags": {
6915
7333
  "json": {
@@ -6927,22 +7345,48 @@
6927
7345
  "multiple": false,
6928
7346
  "type": "option"
6929
7347
  },
6930
- "outputfile": {
6931
- "char": "f",
6932
- "description": "Force the path and name of output report file. Must end with .csv",
6933
- "name": "outputfile",
7348
+ "path": {
7349
+ "char": "p",
7350
+ "description": "Path to the file export project",
7351
+ "name": "path",
6934
7352
  "hasDynamicHelp": false,
6935
7353
  "multiple": false,
6936
7354
  "type": "option"
6937
7355
  },
6938
- "days": {
7356
+ "chunksize": {
7357
+ "char": "c",
7358
+ "description": "Number of records to add in a chunk before it is processed",
7359
+ "name": "chunksize",
7360
+ "default": 1000,
7361
+ "hasDynamicHelp": false,
7362
+ "multiple": false,
7363
+ "type": "option"
7364
+ },
7365
+ "polltimeout": {
6939
7366
  "char": "t",
6940
- "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
6941
- "name": "days",
7367
+ "description": "Timeout in MS for Bulk API calls",
7368
+ "name": "polltimeout",
7369
+ "default": 300000,
7370
+ "hasDynamicHelp": false,
7371
+ "multiple": false,
7372
+ "type": "option"
7373
+ },
7374
+ "startchunknumber": {
7375
+ "char": "s",
7376
+ "description": "Chunk number to start from",
7377
+ "name": "startchunknumber",
7378
+ "default": 0,
6942
7379
  "hasDynamicHelp": false,
6943
7380
  "multiple": false,
6944
7381
  "type": "option"
6945
7382
  },
7383
+ "resume": {
7384
+ "char": "r",
7385
+ "description": "Resume previous export by checking existing files (default in CI)",
7386
+ "name": "resume",
7387
+ "allowNo": false,
7388
+ "type": "boolean"
7389
+ },
6946
7390
  "debug": {
6947
7391
  "char": "d",
6948
7392
  "description": "Activate debug mode (more logs)",
@@ -6981,13 +7425,13 @@
6981
7425
  },
6982
7426
  "hasDynamicHelp": true,
6983
7427
  "hiddenAliases": [],
6984
- "id": "hardis:org:diagnose:unused-apex-classes",
7428
+ "id": "hardis:org:files:export",
6985
7429
  "pluginAlias": "sfdx-hardis",
6986
7430
  "pluginName": "sfdx-hardis",
6987
7431
  "pluginType": "core",
6988
7432
  "strict": true,
6989
7433
  "enableJsonFlag": true,
6990
- "title": "Detect unused Apex classes in an org",
7434
+ "title": "Export files",
6991
7435
  "requiresProject": false,
6992
7436
  "isESM": true,
6993
7437
  "relativePath": [
@@ -6995,43 +7439,43 @@
6995
7439
  "commands",
6996
7440
  "hardis",
6997
7441
  "org",
6998
- "diagnose",
6999
- "unused-apex-classes.js"
7442
+ "files",
7443
+ "export.js"
7000
7444
  ],
7001
7445
  "aliasPermutations": [],
7002
7446
  "permutations": [
7003
- "hardis:org:diagnose:unused-apex-classes",
7004
- "org:hardis:diagnose:unused-apex-classes",
7005
- "org:diagnose:hardis:unused-apex-classes",
7006
- "org:diagnose:unused-apex-classes:hardis",
7007
- "hardis:diagnose:org:unused-apex-classes",
7008
- "diagnose:hardis:org:unused-apex-classes",
7009
- "diagnose:org:hardis:unused-apex-classes",
7010
- "diagnose:org:unused-apex-classes:hardis",
7011
- "hardis:diagnose:unused-apex-classes:org",
7012
- "diagnose:hardis:unused-apex-classes:org",
7013
- "diagnose:unused-apex-classes:hardis:org",
7014
- "diagnose:unused-apex-classes:org:hardis",
7015
- "hardis:org:unused-apex-classes:diagnose",
7016
- "org:hardis:unused-apex-classes:diagnose",
7017
- "org:unused-apex-classes:hardis:diagnose",
7018
- "org:unused-apex-classes:diagnose:hardis",
7019
- "hardis:unused-apex-classes:org:diagnose",
7020
- "unused-apex-classes:hardis:org:diagnose",
7021
- "unused-apex-classes:org:hardis:diagnose",
7022
- "unused-apex-classes:org:diagnose:hardis",
7023
- "hardis:unused-apex-classes:diagnose:org",
7024
- "unused-apex-classes:hardis:diagnose:org",
7025
- "unused-apex-classes:diagnose:hardis:org",
7026
- "unused-apex-classes:diagnose:org:hardis"
7447
+ "hardis:org:files:export",
7448
+ "org:hardis:files:export",
7449
+ "org:files:hardis:export",
7450
+ "org:files:export:hardis",
7451
+ "hardis:files:org:export",
7452
+ "files:hardis:org:export",
7453
+ "files:org:hardis:export",
7454
+ "files:org:export:hardis",
7455
+ "hardis:files:export:org",
7456
+ "files:hardis:export:org",
7457
+ "files:export:hardis:org",
7458
+ "files:export:org:hardis",
7459
+ "hardis:org:export:files",
7460
+ "org:hardis:export:files",
7461
+ "org:export:hardis:files",
7462
+ "org:export:files:hardis",
7463
+ "hardis:export:org:files",
7464
+ "export:hardis:org:files",
7465
+ "export:org:hardis:files",
7466
+ "export:org:files:hardis",
7467
+ "hardis:export:files:org",
7468
+ "export:hardis:files:org",
7469
+ "export:files:hardis:org",
7470
+ "export:files:org:hardis"
7027
7471
  ]
7028
7472
  },
7029
- "hardis:org:diagnose:unused-connected-apps": {
7473
+ "hardis:org:files:import": {
7030
7474
  "aliases": [],
7031
7475
  "args": {},
7032
- "description": "\n## Command Behavior\n\n**Identifies and reports on potentially unused Connected Apps in a Salesforce org, suggesting candidates for deletion or deactivation.**\n\nThis command helps improve org security and reduce technical debt by pinpointing Connected Apps that are no longer actively used. Connected Apps can pose security risks if left unmonitored, and cleaning them up contributes to a healthier Salesforce environment.\n\nKey functionalities:\n\n- **Connected App Data Collection:** Gathers information about all Connected Apps in the org, including creation and last modified dates, and associated users.\n- **Usage Analysis:** Analyzes `LoginHistory` and `OAuthToken` records to determine the last usage date of each Connected App.\n- **Inactivity Detection:** Flags Connected Apps as potentially unused if they have no recent login history or OAuth token usage.\n- **Accessibility Check:** Examines Connected App metadata to identify if they are accessible (e.g., if they require admin approval and have no profiles or permission sets assigned).\n- **Ignored Apps:** Automatically ignores a predefined list of common Salesforce Connected Apps (e.g., `Salesforce CLI`, `Salesforce Mobile Dashboards`). You can extend this list by defining the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n- **CSV Report Generation:** Generates a CSV file containing details of all analyzed Connected Apps, including their usage status, last usage date, and reasons for being flagged as potentially unused.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of potentially unused Connected Apps.\n\n**Default Ignored Connected Apps:**\n\n- Ant Migration Tool\n- Chatter Desktop\n- Chatter Mobile for BlackBerry\n- Force.com IDE\n- OIQ_Integration\n- Salesforce CLI\n- Salesforce Files\n- Salesforce Mobile Dashboards\n- Salesforce Touch\n- Salesforce for Outlook\n- SalesforceA\n- SalesforceA for Android\n- SalesforceA for iOS\n- SalesforceDX Namespace Registry\n- SalesforceIQ\n\nYou can add more ignored apps by defining a comma-separated list of names in the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n\n_Example: \nALLOWED_INACTIVE_CONNECTED_APPS=My App 1,My App 2, My App 3_\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-connected-apps/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It performs SOQL queries against `ConnectedApplication`, `LoginHistory`, and `OAuthToken` objects to gather comprehensive data about Connected Apps and their usage.\n- **Temporary SFDX Project:** It creates a temporary SFDX project to retrieve Connected App metadata, allowing for local parsing and analysis of their XML files.\n- **Metadata Parsing:** It parses the `connectedApp-meta.xml` files to check for `isAdminApproved` and the presence of `profileName` or `permissionsetName` to determine accessibility.\n- **Data Correlation:** It correlates data from various Salesforce objects to build a complete picture of each Connected App's usage and status.\n- **Date Calculation:** Uses `moment` to calculate the time since the last OAuth token usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused Connected Apps.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **File System Operations:** Uses `fs-extra` for creating and removing temporary directories and files.\n- **Environment Variable Reading:** Reads the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable to customize the list of ignored Connected Apps.\n</details>\n",
7476
+ "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",
7033
7477
  "examples": [
7034
- "$ sf hardis:org:diagnose:unused-connected-apps"
7478
+ "$ sf hardis:org:files:import"
7035
7479
  ],
7036
7480
  "flags": {
7037
7481
  "json": {
@@ -7049,14 +7493,21 @@
7049
7493
  "multiple": false,
7050
7494
  "type": "option"
7051
7495
  },
7052
- "outputfile": {
7053
- "char": "f",
7054
- "description": "Force the path and name of output report file. Must end with .csv",
7055
- "name": "outputfile",
7496
+ "path": {
7497
+ "char": "p",
7498
+ "description": "Path to the file export project",
7499
+ "name": "path",
7056
7500
  "hasDynamicHelp": false,
7057
7501
  "multiple": false,
7058
7502
  "type": "option"
7059
7503
  },
7504
+ "overwrite": {
7505
+ "char": "f",
7506
+ "description": "Override existing files (doubles the number of API calls)",
7507
+ "name": "overwrite",
7508
+ "allowNo": false,
7509
+ "type": "boolean"
7510
+ },
7060
7511
  "debug": {
7061
7512
  "char": "d",
7062
7513
  "description": "Activate debug mode (more logs)",
@@ -7095,30 +7546,13 @@
7095
7546
  },
7096
7547
  "hasDynamicHelp": true,
7097
7548
  "hiddenAliases": [],
7098
- "id": "hardis:org:diagnose:unused-connected-apps",
7549
+ "id": "hardis:org:files:import",
7099
7550
  "pluginAlias": "sfdx-hardis",
7100
7551
  "pluginName": "sfdx-hardis",
7101
7552
  "pluginType": "core",
7102
7553
  "strict": true,
7103
7554
  "enableJsonFlag": true,
7104
- "title": "Unused Connected Apps in an org",
7105
- "allowedInactiveConnectedApps": [
7106
- "Ant Migration Tool",
7107
- "Chatter Desktop",
7108
- "Chatter Mobile for BlackBerry",
7109
- "Force.com IDE",
7110
- "OIQ_Integration",
7111
- "Salesforce CLI",
7112
- "Salesforce Files",
7113
- "Salesforce Mobile Dashboards",
7114
- "Salesforce Touch",
7115
- "Salesforce for Outlook",
7116
- "SalesforceA",
7117
- "SalesforceA for Android",
7118
- "SalesforceA for iOS",
7119
- "SalesforceDX Namespace Registry",
7120
- "SalesforceIQ"
7121
- ],
7555
+ "title": "Import files",
7122
7556
  "requiresProject": false,
7123
7557
  "isESM": true,
7124
7558
  "relativePath": [
@@ -7126,44 +7560,44 @@
7126
7560
  "commands",
7127
7561
  "hardis",
7128
7562
  "org",
7129
- "diagnose",
7130
- "unused-connected-apps.js"
7563
+ "files",
7564
+ "import.js"
7131
7565
  ],
7132
7566
  "aliasPermutations": [],
7133
7567
  "permutations": [
7134
- "hardis:org:diagnose:unused-connected-apps",
7135
- "org:hardis:diagnose:unused-connected-apps",
7136
- "org:diagnose:hardis:unused-connected-apps",
7137
- "org:diagnose:unused-connected-apps:hardis",
7138
- "hardis:diagnose:org:unused-connected-apps",
7139
- "diagnose:hardis:org:unused-connected-apps",
7140
- "diagnose:org:hardis:unused-connected-apps",
7141
- "diagnose:org:unused-connected-apps:hardis",
7142
- "hardis:diagnose:unused-connected-apps:org",
7143
- "diagnose:hardis:unused-connected-apps:org",
7144
- "diagnose:unused-connected-apps:hardis:org",
7145
- "diagnose:unused-connected-apps:org:hardis",
7146
- "hardis:org:unused-connected-apps:diagnose",
7147
- "org:hardis:unused-connected-apps:diagnose",
7148
- "org:unused-connected-apps:hardis:diagnose",
7149
- "org:unused-connected-apps:diagnose:hardis",
7150
- "hardis:unused-connected-apps:org:diagnose",
7151
- "unused-connected-apps:hardis:org:diagnose",
7152
- "unused-connected-apps:org:hardis:diagnose",
7153
- "unused-connected-apps:org:diagnose:hardis",
7154
- "hardis:unused-connected-apps:diagnose:org",
7155
- "unused-connected-apps:hardis:diagnose:org",
7156
- "unused-connected-apps:diagnose:hardis:org",
7157
- "unused-connected-apps:diagnose:org:hardis"
7568
+ "hardis:org:files:import",
7569
+ "org:hardis:files:import",
7570
+ "org:files:hardis:import",
7571
+ "org:files:import:hardis",
7572
+ "hardis:files:org:import",
7573
+ "files:hardis:org:import",
7574
+ "files:org:hardis:import",
7575
+ "files:org:import:hardis",
7576
+ "hardis:files:import:org",
7577
+ "files:hardis:import:org",
7578
+ "files:import:hardis:org",
7579
+ "files:import:org:hardis",
7580
+ "hardis:org:import:files",
7581
+ "org:hardis:import:files",
7582
+ "org:import:hardis:files",
7583
+ "org:import:files:hardis",
7584
+ "hardis:import:org:files",
7585
+ "import:hardis:org:files",
7586
+ "import:org:hardis:files",
7587
+ "import:org:files:hardis",
7588
+ "hardis:import:files:org",
7589
+ "import:hardis:files:org",
7590
+ "import:files:hardis:org",
7591
+ "import:files:org:hardis"
7158
7592
  ]
7159
7593
  },
7160
- "hardis:org:diagnose:unusedlicenses": {
7594
+ "hardis:org:fix:listviewmine": {
7161
7595
  "aliases": [],
7162
7596
  "args": {},
7163
- "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",
7597
+ "description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[![Invalid scope:Mine, not allowed ? Deploy your ListViews anyway !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-scope-mine.jpg)](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
7164
7598
  "examples": [
7165
- "$ sf hardis:org:diagnose:unusedlicenses",
7166
- "$ sf hardis:org:diagnose:unusedlicenses --fix"
7599
+ "$ sf hardis:org:fix:listviewmine",
7600
+ "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
7167
7601
  ],
7168
7602
  "flags": {
7169
7603
  "json": {
@@ -7181,10 +7615,10 @@
7181
7615
  "multiple": false,
7182
7616
  "type": "option"
7183
7617
  },
7184
- "outputfile": {
7185
- "char": "f",
7186
- "description": "Force the path and name of output report file. Must end with .csv",
7187
- "name": "outputfile",
7618
+ "listviews": {
7619
+ "char": "l",
7620
+ "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
7621
+ "name": "listviews",
7188
7622
  "hasDynamicHelp": false,
7189
7623
  "multiple": false,
7190
7624
  "type": "option"
@@ -7227,79 +7661,59 @@
7227
7661
  },
7228
7662
  "hasDynamicHelp": true,
7229
7663
  "hiddenAliases": [],
7230
- "id": "hardis:org:diagnose:unusedlicenses",
7664
+ "id": "hardis:org:fix:listviewmine",
7231
7665
  "pluginAlias": "sfdx-hardis",
7232
7666
  "pluginName": "sfdx-hardis",
7233
7667
  "pluginType": "core",
7234
7668
  "strict": true,
7235
7669
  "enableJsonFlag": true,
7236
- "title": "Detect unused Permission Set Licenses (beta)",
7237
- "requiresProject": false,
7238
- "additionalPermissionSetsToAlwaysGet": [
7239
- "Sales_User"
7240
- ],
7241
- "permSetsPermSetLicenses": [
7242
- {
7243
- "permSet": "Sales_User",
7244
- "permSetLicense": "SalesUserPsl"
7245
- }
7246
- ],
7247
- "profilesPermissionSetLicenses": [
7248
- {
7249
- "profile": "Salesforce API Only",
7250
- "permSetLicense": "SalesforceAPIIntegrationPsl"
7251
- }
7252
- ],
7253
- "alwaysExcludeForActiveUsersPermissionSetLicenses": [
7254
- "IdentityConnect"
7255
- ],
7670
+ "title": "Fix listviews with ",
7671
+ "requiresProject": true,
7256
7672
  "isESM": true,
7257
7673
  "relativePath": [
7258
7674
  "lib",
7259
7675
  "commands",
7260
7676
  "hardis",
7261
7677
  "org",
7262
- "diagnose",
7263
- "unusedlicenses.js"
7678
+ "fix",
7679
+ "listviewmine.js"
7264
7680
  ],
7265
7681
  "aliasPermutations": [],
7266
7682
  "permutations": [
7267
- "hardis:org:diagnose:unusedlicenses",
7268
- "org:hardis:diagnose:unusedlicenses",
7269
- "org:diagnose:hardis:unusedlicenses",
7270
- "org:diagnose:unusedlicenses:hardis",
7271
- "hardis:diagnose:org:unusedlicenses",
7272
- "diagnose:hardis:org:unusedlicenses",
7273
- "diagnose:org:hardis:unusedlicenses",
7274
- "diagnose:org:unusedlicenses:hardis",
7275
- "hardis:diagnose:unusedlicenses:org",
7276
- "diagnose:hardis:unusedlicenses:org",
7277
- "diagnose:unusedlicenses:hardis:org",
7278
- "diagnose:unusedlicenses:org:hardis",
7279
- "hardis:org:unusedlicenses:diagnose",
7280
- "org:hardis:unusedlicenses:diagnose",
7281
- "org:unusedlicenses:hardis:diagnose",
7282
- "org:unusedlicenses:diagnose:hardis",
7283
- "hardis:unusedlicenses:org:diagnose",
7284
- "unusedlicenses:hardis:org:diagnose",
7285
- "unusedlicenses:org:hardis:diagnose",
7286
- "unusedlicenses:org:diagnose:hardis",
7287
- "hardis:unusedlicenses:diagnose:org",
7288
- "unusedlicenses:hardis:diagnose:org",
7289
- "unusedlicenses:diagnose:hardis:org",
7290
- "unusedlicenses:diagnose:org:hardis"
7683
+ "hardis:org:fix:listviewmine",
7684
+ "org:hardis:fix:listviewmine",
7685
+ "org:fix:hardis:listviewmine",
7686
+ "org:fix:listviewmine:hardis",
7687
+ "hardis:fix:org:listviewmine",
7688
+ "fix:hardis:org:listviewmine",
7689
+ "fix:org:hardis:listviewmine",
7690
+ "fix:org:listviewmine:hardis",
7691
+ "hardis:fix:listviewmine:org",
7692
+ "fix:hardis:listviewmine:org",
7693
+ "fix:listviewmine:hardis:org",
7694
+ "fix:listviewmine:org:hardis",
7695
+ "hardis:org:listviewmine:fix",
7696
+ "org:hardis:listviewmine:fix",
7697
+ "org:listviewmine:hardis:fix",
7698
+ "org:listviewmine:fix:hardis",
7699
+ "hardis:listviewmine:org:fix",
7700
+ "listviewmine:hardis:org:fix",
7701
+ "listviewmine:org:hardis:fix",
7702
+ "listviewmine:org:fix:hardis",
7703
+ "hardis:listviewmine:fix:org",
7704
+ "listviewmine:hardis:fix:org",
7705
+ "listviewmine:fix:hardis:org",
7706
+ "listviewmine:fix:org:hardis"
7291
7707
  ]
7292
7708
  },
7293
- "hardis:org:diagnose:unusedusers": {
7709
+ "hardis:org:generate:packagexmlfull": {
7294
7710
  "aliases": [],
7295
7711
  "args": {},
7296
- "description": "\n## Command Behavior\n\n**Detects and reports on inactive or unused Salesforce user accounts, helping to optimize license usage and enhance security.**\n\nEfficient user management is vital in Salesforce to ensure resources are optimized and costs are controlled. However, inactive or unused user accounts can often go unnoticed, leading to wasted licenses and potential security risks. This tool addresses this challenge by enabling administrators to identify users who haven't logged in within a specified period.\n\nBy analyzing user login activity and last login timestamps, this feature highlights inactive user accounts, allowing administrators to take appropriate action. Whether it's deactivating dormant accounts, freeing up licenses, or ensuring compliance with security policies, this functionality empowers administrators to maintain a lean and secure Salesforce environment.\n\nKey functionalities:\n\n- **Inactivity Detection:** Identifies users who have not logged in for a specified number of days (`--days` flag, default 180 days in CI, 365 days otherwise).\n- **License Type Filtering:** Allows filtering users by license type using `--licensetypes` (e.g., `all-crm`, `all-paying`) or specific license identifiers using `--licenseidentifiers`.\n - `all-crm`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT` licenses.\n - `all-paying`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT`, `PID_Customer_Community`, `PID_Customer_Community_Login`, `PID_Partner_Community`, `PID_Partner_Community_Login` licenses.\n - Note: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/sfdx_cli_reference/sforce_api_objects_userlicense.htm).\n- **Active User Retrieval:** The `--returnactiveusers` flag inverts the command, allowing you to retrieve active users who *have* logged in during the specified period.\n- **CSV Report Generation:** Generates a CSV file containing details of all identified users (inactive or active), including their last login date, profile, and license information.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of inactive or active users.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query (Bulk API):** It uses `bulkQuery` to efficiently retrieve user records from the Salesforce `User` object. The SOQL query dynamically constructs its WHERE clause based on the `--days`, `--licensetypes`, `--licenseidentifiers`, and `--returnactiveusers` flags.\n- **Interactive Prompts:** Uses `prompts` to interactively ask the user for the number of inactive days and license types if not provided via flags.\n- **License Mapping:** Internally maps common license type aliases (e.g., `all-crm`) to their corresponding Salesforce `LicenseDefinitionKey` values.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of users.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides a summary of the findings in the console, indicating the number of inactive or active users found.\n</details>",
7712
+ "description": "\n## Command Behavior\n\n**Generates a comprehensive `package.xml` file for a Salesforce org, including all metadata components, even managed ones.**\n\nThis command is essential for various Salesforce development and administration tasks, especially when you need a complete snapshot of an org's metadata. It goes beyond typical source tracking by including managed package components, which is crucial for understanding the full metadata footprint of an org.\n\nKey functionalities:\n\n- **Full Org Metadata Retrieval:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a complete list of all metadata types and their members.\n- **Managed Package Inclusion:** Unlike standard source retrieval, this command explicitly includes metadata from managed packages, providing a truly comprehensive `package.xml`.\n- **Customizable Output:** Allows you to specify the output file path for the generated `package.xml`.\n- **Interactive Org Selection:** If no target org is specified, it interactively prompts the user to choose an org. (or use --no-prompt to skip this step)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce Metadata API Interaction:** It leverages the Salesforce Metadata API to list all available metadata types and then retrieve all components for each type.\n- **`buildOrgManifest` Utility:** The core logic for querying the org's metadata and constructing the `package.xml` is encapsulated within the `buildOrgManifest` utility function.\n- **XML Generation:** It dynamically builds the XML structure of the `package.xml` file, including the `types` and `members` elements for all retrieved metadata.\n- **File System Operations:** It writes the generated `package.xml` file to the specified output path.\n- **Interactive Prompts:** Uses `promptOrgUsernameDefault` to guide the user in selecting the target Salesforce org.\n</details>\n",
7297
7713
  "examples": [
7298
- "$ sf hardis:org:diagnose:unusedusers",
7299
- "$ sf hardis:org:diagnose:unusedusers --days 365",
7300
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
7301
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
7302
- "$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
7714
+ "$ sf hardis:org:generate:packagexmlfull",
7715
+ "$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
7716
+ "$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
7303
7717
  ],
7304
7718
  "flags": {
7305
7719
  "json": {
@@ -7318,48 +7732,12 @@
7318
7732
  "type": "option"
7319
7733
  },
7320
7734
  "outputfile": {
7321
- "char": "f",
7322
- "description": "Force the path and name of output report file. Must end with .csv",
7735
+ "description": "Output package.xml file",
7323
7736
  "name": "outputfile",
7324
7737
  "hasDynamicHelp": false,
7325
7738
  "multiple": false,
7326
7739
  "type": "option"
7327
7740
  },
7328
- "days": {
7329
- "char": "t",
7330
- "description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
7331
- "name": "days",
7332
- "hasDynamicHelp": false,
7333
- "multiple": false,
7334
- "type": "option"
7335
- },
7336
- "licensetypes": {
7337
- "char": "l",
7338
- "description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
7339
- "name": "licensetypes",
7340
- "hasDynamicHelp": false,
7341
- "multiple": false,
7342
- "options": [
7343
- "all",
7344
- "all-crm",
7345
- "all-paying"
7346
- ],
7347
- "type": "option"
7348
- },
7349
- "licenseidentifiers": {
7350
- "char": "i",
7351
- "description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
7352
- "name": "licenseidentifiers",
7353
- "hasDynamicHelp": false,
7354
- "multiple": false,
7355
- "type": "option"
7356
- },
7357
- "returnactiveusers": {
7358
- "description": "Inverts the command by returning the active users",
7359
- "name": "returnactiveusers",
7360
- "allowNo": false,
7361
- "type": "boolean"
7362
- },
7363
7741
  "debug": {
7364
7742
  "char": "d",
7365
7743
  "description": "Activate debug mode (more logs)",
@@ -7367,6 +7745,13 @@
7367
7745
  "allowNo": false,
7368
7746
  "type": "boolean"
7369
7747
  },
7748
+ "no-prompt": {
7749
+ "char": "n",
7750
+ "description": "Do not prompt for org username, use the default one",
7751
+ "name": "no-prompt",
7752
+ "allowNo": false,
7753
+ "type": "boolean"
7754
+ },
7370
7755
  "websocket": {
7371
7756
  "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
7372
7757
  "name": "websocket",
@@ -7398,13 +7783,13 @@
7398
7783
  },
7399
7784
  "hasDynamicHelp": true,
7400
7785
  "hiddenAliases": [],
7401
- "id": "hardis:org:diagnose:unusedusers",
7786
+ "id": "hardis:org:generate:packagexmlfull",
7402
7787
  "pluginAlias": "sfdx-hardis",
7403
7788
  "pluginName": "sfdx-hardis",
7404
7789
  "pluginType": "core",
7405
7790
  "strict": true,
7406
7791
  "enableJsonFlag": true,
7407
- "title": "Detect unused Users in Salesforce",
7792
+ "title": "Generate Full Org package.xml",
7408
7793
  "requiresProject": false,
7409
7794
  "isESM": true,
7410
7795
  "relativePath": [
@@ -7412,35 +7797,35 @@
7412
7797
  "commands",
7413
7798
  "hardis",
7414
7799
  "org",
7415
- "diagnose",
7416
- "unusedusers.js"
7800
+ "generate",
7801
+ "packagexmlfull.js"
7417
7802
  ],
7418
7803
  "aliasPermutations": [],
7419
7804
  "permutations": [
7420
- "hardis:org:diagnose:unusedusers",
7421
- "org:hardis:diagnose:unusedusers",
7422
- "org:diagnose:hardis:unusedusers",
7423
- "org:diagnose:unusedusers:hardis",
7424
- "hardis:diagnose:org:unusedusers",
7425
- "diagnose:hardis:org:unusedusers",
7426
- "diagnose:org:hardis:unusedusers",
7427
- "diagnose:org:unusedusers:hardis",
7428
- "hardis:diagnose:unusedusers:org",
7429
- "diagnose:hardis:unusedusers:org",
7430
- "diagnose:unusedusers:hardis:org",
7431
- "diagnose:unusedusers:org:hardis",
7432
- "hardis:org:unusedusers:diagnose",
7433
- "org:hardis:unusedusers:diagnose",
7434
- "org:unusedusers:hardis:diagnose",
7435
- "org:unusedusers:diagnose:hardis",
7436
- "hardis:unusedusers:org:diagnose",
7437
- "unusedusers:hardis:org:diagnose",
7438
- "unusedusers:org:hardis:diagnose",
7439
- "unusedusers:org:diagnose:hardis",
7440
- "hardis:unusedusers:diagnose:org",
7441
- "unusedusers:hardis:diagnose:org",
7442
- "unusedusers:diagnose:hardis:org",
7443
- "unusedusers:diagnose:org:hardis"
7805
+ "hardis:org:generate:packagexmlfull",
7806
+ "org:hardis:generate:packagexmlfull",
7807
+ "org:generate:hardis:packagexmlfull",
7808
+ "org:generate:packagexmlfull:hardis",
7809
+ "hardis:generate:org:packagexmlfull",
7810
+ "generate:hardis:org:packagexmlfull",
7811
+ "generate:org:hardis:packagexmlfull",
7812
+ "generate:org:packagexmlfull:hardis",
7813
+ "hardis:generate:packagexmlfull:org",
7814
+ "generate:hardis:packagexmlfull:org",
7815
+ "generate:packagexmlfull:hardis:org",
7816
+ "generate:packagexmlfull:org:hardis",
7817
+ "hardis:org:packagexmlfull:generate",
7818
+ "org:hardis:packagexmlfull:generate",
7819
+ "org:packagexmlfull:hardis:generate",
7820
+ "org:packagexmlfull:generate:hardis",
7821
+ "hardis:packagexmlfull:org:generate",
7822
+ "packagexmlfull:hardis:org:generate",
7823
+ "packagexmlfull:org:hardis:generate",
7824
+ "packagexmlfull:org:generate:hardis",
7825
+ "hardis:packagexmlfull:generate:org",
7826
+ "packagexmlfull:hardis:generate:org",
7827
+ "packagexmlfull:generate:hardis:org",
7828
+ "packagexmlfull:generate:org:hardis"
7444
7829
  ]
7445
7830
  },
7446
7831
  "hardis:org:monitor:all": {
@@ -9913,262 +10298,30 @@
9913
10298
  ],
9914
10299
  "aliasPermutations": [],
9915
10300
  "permutations": [
9916
- "hardis:project:audit:remotesites",
9917
- "project:hardis:audit:remotesites",
9918
- "project:audit:hardis:remotesites",
9919
- "project:audit:remotesites:hardis",
9920
- "hardis:audit:project:remotesites",
9921
- "audit:hardis:project:remotesites",
9922
- "audit:project:hardis:remotesites",
9923
- "audit:project:remotesites:hardis",
9924
- "hardis:audit:remotesites:project",
9925
- "audit:hardis:remotesites:project",
9926
- "audit:remotesites:hardis:project",
9927
- "audit:remotesites:project:hardis",
9928
- "hardis:project:remotesites:audit",
9929
- "project:hardis:remotesites:audit",
9930
- "project:remotesites:hardis:audit",
9931
- "project:remotesites:audit:hardis",
9932
- "hardis:remotesites:project:audit",
9933
- "remotesites:hardis:project:audit",
9934
- "remotesites:project:hardis:audit",
9935
- "remotesites:project:audit:hardis",
9936
- "hardis:remotesites:audit:project",
9937
- "remotesites:hardis:audit:project",
9938
- "remotesites:audit:hardis:project",
9939
- "remotesites:audit:project:hardis"
9940
- ]
9941
- },
9942
- "hardis:project:configure:auth": {
9943
- "aliases": [],
9944
- "args": {},
9945
- "description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
9946
- "examples": [
9947
- "$ sf hardis:project:configure:auth"
9948
- ],
9949
- "flags": {
9950
- "json": {
9951
- "description": "Format output as json.",
9952
- "helpGroup": "GLOBAL",
9953
- "name": "json",
9954
- "allowNo": false,
9955
- "type": "boolean"
9956
- },
9957
- "flags-dir": {
9958
- "helpGroup": "GLOBAL",
9959
- "name": "flags-dir",
9960
- "summary": "Import flag values from a directory.",
9961
- "hasDynamicHelp": false,
9962
- "multiple": false,
9963
- "type": "option"
9964
- },
9965
- "devhub": {
9966
- "char": "b",
9967
- "description": "Configure project DevHub",
9968
- "name": "devhub",
9969
- "allowNo": false,
9970
- "type": "boolean"
9971
- },
9972
- "debug": {
9973
- "char": "d",
9974
- "description": "Activate debug mode (more logs)",
9975
- "name": "debug",
9976
- "allowNo": false,
9977
- "type": "boolean"
9978
- },
9979
- "websocket": {
9980
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9981
- "name": "websocket",
9982
- "hasDynamicHelp": false,
9983
- "multiple": false,
9984
- "type": "option"
9985
- },
9986
- "skipauth": {
9987
- "description": "Skip authentication check when a default username is required",
9988
- "name": "skipauth",
9989
- "allowNo": false,
9990
- "type": "boolean"
9991
- },
9992
- "target-org": {
9993
- "aliases": [
9994
- "targetusername",
9995
- "u"
9996
- ],
9997
- "char": "o",
9998
- "deprecateAliases": true,
9999
- "name": "target-org",
10000
- "noCacheDefault": true,
10001
- "summary": "Username or alias of the target org.",
10002
- "hasDynamicHelp": true,
10003
- "multiple": false,
10004
- "type": "option"
10005
- },
10006
- "target-dev-hub": {
10007
- "aliases": [
10008
- "targetdevhubusername"
10009
- ],
10010
- "char": "v",
10011
- "deprecateAliases": true,
10012
- "name": "target-dev-hub",
10013
- "noCacheDefault": true,
10014
- "required": false,
10015
- "summary": "Username or alias of the Dev Hub org.",
10016
- "hasDynamicHelp": true,
10017
- "multiple": false,
10018
- "type": "option"
10019
- }
10020
- },
10021
- "hasDynamicHelp": true,
10022
- "hiddenAliases": [],
10023
- "id": "hardis:project:configure:auth",
10024
- "pluginAlias": "sfdx-hardis",
10025
- "pluginName": "sfdx-hardis",
10026
- "pluginType": "core",
10027
- "strict": true,
10028
- "enableJsonFlag": true,
10029
- "title": "Configure authentication",
10030
- "requiresProject": false,
10031
- "requiresDependencies": [
10032
- "openssl"
10033
- ],
10034
- "isESM": true,
10035
- "relativePath": [
10036
- "lib",
10037
- "commands",
10038
- "hardis",
10039
- "project",
10040
- "configure",
10041
- "auth.js"
10042
- ],
10043
- "aliasPermutations": [],
10044
- "permutations": [
10045
- "hardis:project:configure:auth",
10046
- "project:hardis:configure:auth",
10047
- "project:configure:hardis:auth",
10048
- "project:configure:auth:hardis",
10049
- "hardis:configure:project:auth",
10050
- "configure:hardis:project:auth",
10051
- "configure:project:hardis:auth",
10052
- "configure:project:auth:hardis",
10053
- "hardis:configure:auth:project",
10054
- "configure:hardis:auth:project",
10055
- "configure:auth:hardis:project",
10056
- "configure:auth:project:hardis",
10057
- "hardis:project:auth:configure",
10058
- "project:hardis:auth:configure",
10059
- "project:auth:hardis:configure",
10060
- "project:auth:configure:hardis",
10061
- "hardis:auth:project:configure",
10062
- "auth:hardis:project:configure",
10063
- "auth:project:hardis:configure",
10064
- "auth:project:configure:hardis",
10065
- "hardis:auth:configure:project",
10066
- "auth:hardis:configure:project",
10067
- "auth:configure:hardis:project",
10068
- "auth:configure:project:hardis"
10069
- ]
10070
- },
10071
- "hardis:project:convert:profilestopermsets": {
10072
- "aliases": [],
10073
- "args": {},
10074
- "description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
10075
- "examples": [
10076
- "$ sf hardis:project:convert:profilestopermsets"
10077
- ],
10078
- "flags": {
10079
- "json": {
10080
- "description": "Format output as json.",
10081
- "helpGroup": "GLOBAL",
10082
- "name": "json",
10083
- "allowNo": false,
10084
- "type": "boolean"
10085
- },
10086
- "flags-dir": {
10087
- "helpGroup": "GLOBAL",
10088
- "name": "flags-dir",
10089
- "summary": "Import flag values from a directory.",
10090
- "hasDynamicHelp": false,
10091
- "multiple": false,
10092
- "type": "option"
10093
- },
10094
- "except": {
10095
- "char": "e",
10096
- "description": "List of filters",
10097
- "name": "except",
10098
- "default": [],
10099
- "hasDynamicHelp": false,
10100
- "multiple": true,
10101
- "type": "option"
10102
- },
10103
- "debug": {
10104
- "char": "d",
10105
- "description": "Activate debug mode (more logs)",
10106
- "name": "debug",
10107
- "allowNo": false,
10108
- "type": "boolean"
10109
- },
10110
- "websocket": {
10111
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
10112
- "name": "websocket",
10113
- "hasDynamicHelp": false,
10114
- "multiple": false,
10115
- "type": "option"
10116
- },
10117
- "skipauth": {
10118
- "description": "Skip authentication check when a default username is required",
10119
- "name": "skipauth",
10120
- "allowNo": false,
10121
- "type": "boolean"
10122
- }
10123
- },
10124
- "hasDynamicHelp": false,
10125
- "hiddenAliases": [],
10126
- "id": "hardis:project:convert:profilestopermsets",
10127
- "pluginAlias": "sfdx-hardis",
10128
- "pluginName": "sfdx-hardis",
10129
- "pluginType": "core",
10130
- "strict": true,
10131
- "enableJsonFlag": true,
10132
- "title": "Convert Profiles into Permission Sets",
10133
- "requiresProject": true,
10134
- "requiresSfdxPlugins": [
10135
- "shane-sfdx-plugins"
10136
- ],
10137
- "isESM": true,
10138
- "relativePath": [
10139
- "lib",
10140
- "commands",
10141
- "hardis",
10142
- "project",
10143
- "convert",
10144
- "profilestopermsets.js"
10145
- ],
10146
- "aliasPermutations": [],
10147
- "permutations": [
10148
- "hardis:project:convert:profilestopermsets",
10149
- "project:hardis:convert:profilestopermsets",
10150
- "project:convert:hardis:profilestopermsets",
10151
- "project:convert:profilestopermsets:hardis",
10152
- "hardis:convert:project:profilestopermsets",
10153
- "convert:hardis:project:profilestopermsets",
10154
- "convert:project:hardis:profilestopermsets",
10155
- "convert:project:profilestopermsets:hardis",
10156
- "hardis:convert:profilestopermsets:project",
10157
- "convert:hardis:profilestopermsets:project",
10158
- "convert:profilestopermsets:hardis:project",
10159
- "convert:profilestopermsets:project:hardis",
10160
- "hardis:project:profilestopermsets:convert",
10161
- "project:hardis:profilestopermsets:convert",
10162
- "project:profilestopermsets:hardis:convert",
10163
- "project:profilestopermsets:convert:hardis",
10164
- "hardis:profilestopermsets:project:convert",
10165
- "profilestopermsets:hardis:project:convert",
10166
- "profilestopermsets:project:hardis:convert",
10167
- "profilestopermsets:project:convert:hardis",
10168
- "hardis:profilestopermsets:convert:project",
10169
- "profilestopermsets:hardis:convert:project",
10170
- "profilestopermsets:convert:hardis:project",
10171
- "profilestopermsets:convert:project:hardis"
10301
+ "hardis:project:audit:remotesites",
10302
+ "project:hardis:audit:remotesites",
10303
+ "project:audit:hardis:remotesites",
10304
+ "project:audit:remotesites:hardis",
10305
+ "hardis:audit:project:remotesites",
10306
+ "audit:hardis:project:remotesites",
10307
+ "audit:project:hardis:remotesites",
10308
+ "audit:project:remotesites:hardis",
10309
+ "hardis:audit:remotesites:project",
10310
+ "audit:hardis:remotesites:project",
10311
+ "audit:remotesites:hardis:project",
10312
+ "audit:remotesites:project:hardis",
10313
+ "hardis:project:remotesites:audit",
10314
+ "project:hardis:remotesites:audit",
10315
+ "project:remotesites:hardis:audit",
10316
+ "project:remotesites:audit:hardis",
10317
+ "hardis:remotesites:project:audit",
10318
+ "remotesites:hardis:project:audit",
10319
+ "remotesites:project:hardis:audit",
10320
+ "remotesites:project:audit:hardis",
10321
+ "hardis:remotesites:audit:project",
10322
+ "remotesites:hardis:audit:project",
10323
+ "remotesites:audit:hardis:project",
10324
+ "remotesites:audit:project:hardis"
10172
10325
  ]
10173
10326
  },
10174
10327
  "hardis:project:clean:emptyitems": {
@@ -11726,35 +11879,267 @@
11726
11879
  "commands",
11727
11880
  "hardis",
11728
11881
  "project",
11729
- "clean",
11730
- "xml.js"
11882
+ "clean",
11883
+ "xml.js"
11884
+ ],
11885
+ "aliasPermutations": [],
11886
+ "permutations": [
11887
+ "hardis:project:clean:xml",
11888
+ "project:hardis:clean:xml",
11889
+ "project:clean:hardis:xml",
11890
+ "project:clean:xml:hardis",
11891
+ "hardis:clean:project:xml",
11892
+ "clean:hardis:project:xml",
11893
+ "clean:project:hardis:xml",
11894
+ "clean:project:xml:hardis",
11895
+ "hardis:clean:xml:project",
11896
+ "clean:hardis:xml:project",
11897
+ "clean:xml:hardis:project",
11898
+ "clean:xml:project:hardis",
11899
+ "hardis:project:xml:clean",
11900
+ "project:hardis:xml:clean",
11901
+ "project:xml:hardis:clean",
11902
+ "project:xml:clean:hardis",
11903
+ "hardis:xml:project:clean",
11904
+ "xml:hardis:project:clean",
11905
+ "xml:project:hardis:clean",
11906
+ "xml:project:clean:hardis",
11907
+ "hardis:xml:clean:project",
11908
+ "xml:hardis:clean:project",
11909
+ "xml:clean:hardis:project",
11910
+ "xml:clean:project:hardis"
11911
+ ]
11912
+ },
11913
+ "hardis:project:configure:auth": {
11914
+ "aliases": [],
11915
+ "args": {},
11916
+ "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",
11917
+ "examples": [
11918
+ "$ sf hardis:project:configure:auth"
11919
+ ],
11920
+ "flags": {
11921
+ "json": {
11922
+ "description": "Format output as json.",
11923
+ "helpGroup": "GLOBAL",
11924
+ "name": "json",
11925
+ "allowNo": false,
11926
+ "type": "boolean"
11927
+ },
11928
+ "flags-dir": {
11929
+ "helpGroup": "GLOBAL",
11930
+ "name": "flags-dir",
11931
+ "summary": "Import flag values from a directory.",
11932
+ "hasDynamicHelp": false,
11933
+ "multiple": false,
11934
+ "type": "option"
11935
+ },
11936
+ "devhub": {
11937
+ "char": "b",
11938
+ "description": "Configure project DevHub",
11939
+ "name": "devhub",
11940
+ "allowNo": false,
11941
+ "type": "boolean"
11942
+ },
11943
+ "debug": {
11944
+ "char": "d",
11945
+ "description": "Activate debug mode (more logs)",
11946
+ "name": "debug",
11947
+ "allowNo": false,
11948
+ "type": "boolean"
11949
+ },
11950
+ "websocket": {
11951
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11952
+ "name": "websocket",
11953
+ "hasDynamicHelp": false,
11954
+ "multiple": false,
11955
+ "type": "option"
11956
+ },
11957
+ "skipauth": {
11958
+ "description": "Skip authentication check when a default username is required",
11959
+ "name": "skipauth",
11960
+ "allowNo": false,
11961
+ "type": "boolean"
11962
+ },
11963
+ "target-org": {
11964
+ "aliases": [
11965
+ "targetusername",
11966
+ "u"
11967
+ ],
11968
+ "char": "o",
11969
+ "deprecateAliases": true,
11970
+ "name": "target-org",
11971
+ "noCacheDefault": true,
11972
+ "summary": "Username or alias of the target org.",
11973
+ "hasDynamicHelp": true,
11974
+ "multiple": false,
11975
+ "type": "option"
11976
+ },
11977
+ "target-dev-hub": {
11978
+ "aliases": [
11979
+ "targetdevhubusername"
11980
+ ],
11981
+ "char": "v",
11982
+ "deprecateAliases": true,
11983
+ "name": "target-dev-hub",
11984
+ "noCacheDefault": true,
11985
+ "required": false,
11986
+ "summary": "Username or alias of the Dev Hub org.",
11987
+ "hasDynamicHelp": true,
11988
+ "multiple": false,
11989
+ "type": "option"
11990
+ }
11991
+ },
11992
+ "hasDynamicHelp": true,
11993
+ "hiddenAliases": [],
11994
+ "id": "hardis:project:configure:auth",
11995
+ "pluginAlias": "sfdx-hardis",
11996
+ "pluginName": "sfdx-hardis",
11997
+ "pluginType": "core",
11998
+ "strict": true,
11999
+ "enableJsonFlag": true,
12000
+ "title": "Configure authentication",
12001
+ "requiresProject": false,
12002
+ "requiresDependencies": [
12003
+ "openssl"
12004
+ ],
12005
+ "isESM": true,
12006
+ "relativePath": [
12007
+ "lib",
12008
+ "commands",
12009
+ "hardis",
12010
+ "project",
12011
+ "configure",
12012
+ "auth.js"
12013
+ ],
12014
+ "aliasPermutations": [],
12015
+ "permutations": [
12016
+ "hardis:project:configure:auth",
12017
+ "project:hardis:configure:auth",
12018
+ "project:configure:hardis:auth",
12019
+ "project:configure:auth:hardis",
12020
+ "hardis:configure:project:auth",
12021
+ "configure:hardis:project:auth",
12022
+ "configure:project:hardis:auth",
12023
+ "configure:project:auth:hardis",
12024
+ "hardis:configure:auth:project",
12025
+ "configure:hardis:auth:project",
12026
+ "configure:auth:hardis:project",
12027
+ "configure:auth:project:hardis",
12028
+ "hardis:project:auth:configure",
12029
+ "project:hardis:auth:configure",
12030
+ "project:auth:hardis:configure",
12031
+ "project:auth:configure:hardis",
12032
+ "hardis:auth:project:configure",
12033
+ "auth:hardis:project:configure",
12034
+ "auth:project:hardis:configure",
12035
+ "auth:project:configure:hardis",
12036
+ "hardis:auth:configure:project",
12037
+ "auth:hardis:configure:project",
12038
+ "auth:configure:hardis:project",
12039
+ "auth:configure:project:hardis"
12040
+ ]
12041
+ },
12042
+ "hardis:project:convert:profilestopermsets": {
12043
+ "aliases": [],
12044
+ "args": {},
12045
+ "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",
12046
+ "examples": [
12047
+ "$ sf hardis:project:convert:profilestopermsets"
12048
+ ],
12049
+ "flags": {
12050
+ "json": {
12051
+ "description": "Format output as json.",
12052
+ "helpGroup": "GLOBAL",
12053
+ "name": "json",
12054
+ "allowNo": false,
12055
+ "type": "boolean"
12056
+ },
12057
+ "flags-dir": {
12058
+ "helpGroup": "GLOBAL",
12059
+ "name": "flags-dir",
12060
+ "summary": "Import flag values from a directory.",
12061
+ "hasDynamicHelp": false,
12062
+ "multiple": false,
12063
+ "type": "option"
12064
+ },
12065
+ "except": {
12066
+ "char": "e",
12067
+ "description": "List of filters",
12068
+ "name": "except",
12069
+ "default": [],
12070
+ "hasDynamicHelp": false,
12071
+ "multiple": true,
12072
+ "type": "option"
12073
+ },
12074
+ "debug": {
12075
+ "char": "d",
12076
+ "description": "Activate debug mode (more logs)",
12077
+ "name": "debug",
12078
+ "allowNo": false,
12079
+ "type": "boolean"
12080
+ },
12081
+ "websocket": {
12082
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12083
+ "name": "websocket",
12084
+ "hasDynamicHelp": false,
12085
+ "multiple": false,
12086
+ "type": "option"
12087
+ },
12088
+ "skipauth": {
12089
+ "description": "Skip authentication check when a default username is required",
12090
+ "name": "skipauth",
12091
+ "allowNo": false,
12092
+ "type": "boolean"
12093
+ }
12094
+ },
12095
+ "hasDynamicHelp": false,
12096
+ "hiddenAliases": [],
12097
+ "id": "hardis:project:convert:profilestopermsets",
12098
+ "pluginAlias": "sfdx-hardis",
12099
+ "pluginName": "sfdx-hardis",
12100
+ "pluginType": "core",
12101
+ "strict": true,
12102
+ "enableJsonFlag": true,
12103
+ "title": "Convert Profiles into Permission Sets",
12104
+ "requiresProject": true,
12105
+ "requiresSfdxPlugins": [
12106
+ "shane-sfdx-plugins"
12107
+ ],
12108
+ "isESM": true,
12109
+ "relativePath": [
12110
+ "lib",
12111
+ "commands",
12112
+ "hardis",
12113
+ "project",
12114
+ "convert",
12115
+ "profilestopermsets.js"
11731
12116
  ],
11732
12117
  "aliasPermutations": [],
11733
12118
  "permutations": [
11734
- "hardis:project:clean:xml",
11735
- "project:hardis:clean:xml",
11736
- "project:clean:hardis:xml",
11737
- "project:clean:xml:hardis",
11738
- "hardis:clean:project:xml",
11739
- "clean:hardis:project:xml",
11740
- "clean:project:hardis:xml",
11741
- "clean:project:xml:hardis",
11742
- "hardis:clean:xml:project",
11743
- "clean:hardis:xml:project",
11744
- "clean:xml:hardis:project",
11745
- "clean:xml:project:hardis",
11746
- "hardis:project:xml:clean",
11747
- "project:hardis:xml:clean",
11748
- "project:xml:hardis:clean",
11749
- "project:xml:clean:hardis",
11750
- "hardis:xml:project:clean",
11751
- "xml:hardis:project:clean",
11752
- "xml:project:hardis:clean",
11753
- "xml:project:clean:hardis",
11754
- "hardis:xml:clean:project",
11755
- "xml:hardis:clean:project",
11756
- "xml:clean:hardis:project",
11757
- "xml:clean:project:hardis"
12119
+ "hardis:project:convert:profilestopermsets",
12120
+ "project:hardis:convert:profilestopermsets",
12121
+ "project:convert:hardis:profilestopermsets",
12122
+ "project:convert:profilestopermsets:hardis",
12123
+ "hardis:convert:project:profilestopermsets",
12124
+ "convert:hardis:project:profilestopermsets",
12125
+ "convert:project:hardis:profilestopermsets",
12126
+ "convert:project:profilestopermsets:hardis",
12127
+ "hardis:convert:profilestopermsets:project",
12128
+ "convert:hardis:profilestopermsets:project",
12129
+ "convert:profilestopermsets:hardis:project",
12130
+ "convert:profilestopermsets:project:hardis",
12131
+ "hardis:project:profilestopermsets:convert",
12132
+ "project:hardis:profilestopermsets:convert",
12133
+ "project:profilestopermsets:hardis:convert",
12134
+ "project:profilestopermsets:convert:hardis",
12135
+ "hardis:profilestopermsets:project:convert",
12136
+ "profilestopermsets:hardis:project:convert",
12137
+ "profilestopermsets:project:hardis:convert",
12138
+ "profilestopermsets:project:convert:hardis",
12139
+ "hardis:profilestopermsets:convert:project",
12140
+ "profilestopermsets:hardis:convert:project",
12141
+ "profilestopermsets:convert:hardis:project",
12142
+ "profilestopermsets:convert:project:hardis"
11758
12143
  ]
11759
12144
  },
11760
12145
  "hardis:project:deploy:notify": {
@@ -13510,239 +13895,35 @@
13510
13895
  "commands",
13511
13896
  "hardis",
13512
13897
  "project",
13513
- "generate",
13514
- "gitdelta.js"
13515
- ],
13516
- "aliasPermutations": [],
13517
- "permutations": [
13518
- "hardis:project:generate:gitdelta",
13519
- "project:hardis:generate:gitdelta",
13520
- "project:generate:hardis:gitdelta",
13521
- "project:generate:gitdelta:hardis",
13522
- "hardis:generate:project:gitdelta",
13523
- "generate:hardis:project:gitdelta",
13524
- "generate:project:hardis:gitdelta",
13525
- "generate:project:gitdelta:hardis",
13526
- "hardis:generate:gitdelta:project",
13527
- "generate:hardis:gitdelta:project",
13528
- "generate:gitdelta:hardis:project",
13529
- "generate:gitdelta:project:hardis",
13530
- "hardis:project:gitdelta:generate",
13531
- "project:hardis:gitdelta:generate",
13532
- "project:gitdelta:hardis:generate",
13533
- "project:gitdelta:generate:hardis",
13534
- "hardis:gitdelta:project:generate",
13535
- "gitdelta:hardis:project:generate",
13536
- "gitdelta:project:hardis:generate",
13537
- "gitdelta:project:generate:hardis",
13538
- "hardis:gitdelta:generate:project",
13539
- "gitdelta:hardis:generate:project",
13540
- "gitdelta:generate:hardis:project",
13541
- "gitdelta:generate:project:hardis"
13542
- ]
13543
- },
13544
- "hardis:project:metadata:activate-decomposed": {
13545
- "aliases": [],
13546
- "args": {},
13547
- "description": "\n## Command Behavior\n\n**Activate decomposed metadata types in Salesforce DX projects.**\n\nThis command helps manage decomposed metadata types that can be split into multiple files in source format. It automatically decomposes all supported metadata types that exist in your project.\n\nSupported metadata types (Beta):\n\n- CustomLabels\n- PermissionSet\n- ExternalServiceRegistration\n- SharingRules\n- Workflow\n\nSee [Salesforce documentation on decomposed metadata](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_decomposed_md_types.htm)\n\nKey features:\n\n- Automatically detects and decomposes all applicable metadata types\n- Decomposes only metadata types that exist in your project\n- Interactive confirmation for decomposition operations\n- Handles all confirmation prompts automatically\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThis command utilizes Salesforce CLI's decomposed metadata feature to split complex metadata types into smaller, more manageable components:\n\n- **CustomLabels**: Each custom label becomes a separate file, making it easier to track changes and manage translations.\n- **PermissionSets**: Permission sets are decomposed into multiple files based on the permissions they contain (field permissions, object permissions, etc.).\n- **ExternalServiceRegistration**: Decomposes external service registrations.\n- **SharingRules**: Decomposes sharing rules into individual components.\n- **Workflow**: Decomposes workflow rules into individual components.\n\nThe command wraps the underlying Salesforce CLI functionality and provides a more user-friendly interface with additional validation and error handling.\n\nNote: All decomposed metadata features are currently in Beta in Salesforce CLI.\n</details>\n",
13548
- "examples": [
13549
- "$ sf hardis:project:metadata:activate-decomposed",
13550
- "$ sf hardis:project:metadata:activate-decomposed --debug"
13551
- ],
13552
- "flags": {
13553
- "json": {
13554
- "description": "Format output as json.",
13555
- "helpGroup": "GLOBAL",
13556
- "name": "json",
13557
- "allowNo": false,
13558
- "type": "boolean"
13559
- },
13560
- "flags-dir": {
13561
- "helpGroup": "GLOBAL",
13562
- "name": "flags-dir",
13563
- "summary": "Import flag values from a directory.",
13564
- "hasDynamicHelp": false,
13565
- "multiple": false,
13566
- "type": "option"
13567
- },
13568
- "debug": {
13569
- "char": "d",
13570
- "description": "Run command in debug mode",
13571
- "name": "debug",
13572
- "allowNo": false,
13573
- "type": "boolean"
13574
- },
13575
- "websocket": {
13576
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
13577
- "name": "websocket",
13578
- "hasDynamicHelp": false,
13579
- "multiple": false,
13580
- "type": "option"
13581
- },
13582
- "skipauth": {
13583
- "description": "Skip authentication check when a default username is required",
13584
- "name": "skipauth",
13585
- "allowNo": false,
13586
- "type": "boolean"
13587
- }
13588
- },
13589
- "hasDynamicHelp": false,
13590
- "hiddenAliases": [],
13591
- "id": "hardis:project:metadata:activate-decomposed",
13592
- "pluginAlias": "sfdx-hardis",
13593
- "pluginName": "sfdx-hardis",
13594
- "pluginType": "core",
13595
- "strict": true,
13596
- "enableJsonFlag": true,
13597
- "title": "Activate Decomposed Metadata (Beta)",
13598
- "isESM": true,
13599
- "relativePath": [
13600
- "lib",
13601
- "commands",
13602
- "hardis",
13603
- "project",
13604
- "metadata",
13605
- "activate-decomposed.js"
13606
- ],
13607
- "aliasPermutations": [],
13608
- "permutations": [
13609
- "hardis:project:metadata:activate-decomposed",
13610
- "project:hardis:metadata:activate-decomposed",
13611
- "project:metadata:hardis:activate-decomposed",
13612
- "project:metadata:activate-decomposed:hardis",
13613
- "hardis:metadata:project:activate-decomposed",
13614
- "metadata:hardis:project:activate-decomposed",
13615
- "metadata:project:hardis:activate-decomposed",
13616
- "metadata:project:activate-decomposed:hardis",
13617
- "hardis:metadata:activate-decomposed:project",
13618
- "metadata:hardis:activate-decomposed:project",
13619
- "metadata:activate-decomposed:hardis:project",
13620
- "metadata:activate-decomposed:project:hardis",
13621
- "hardis:project:activate-decomposed:metadata",
13622
- "project:hardis:activate-decomposed:metadata",
13623
- "project:activate-decomposed:hardis:metadata",
13624
- "project:activate-decomposed:metadata:hardis",
13625
- "hardis:activate-decomposed:project:metadata",
13626
- "activate-decomposed:hardis:project:metadata",
13627
- "activate-decomposed:project:hardis:metadata",
13628
- "activate-decomposed:project:metadata:hardis",
13629
- "hardis:activate-decomposed:metadata:project",
13630
- "activate-decomposed:hardis:metadata:project",
13631
- "activate-decomposed:metadata:hardis:project",
13632
- "activate-decomposed:metadata:project:hardis"
13633
- ]
13634
- },
13635
- "hardis:project:metadata:findduplicates": {
13636
- "aliases": [],
13637
- "args": {},
13638
- "description": "find duplicate values in XML file(s).\n Find duplicate values in XML file(s). Keys to be checked can be configured in `config/sfdx-hardis.yml` using property metadataDuplicateFindKeys.\n\nDefault config :\nmetadataDuplicateFindKeys :\n[object Object]\n",
13639
- "examples": [
13640
- "\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Layout xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <layoutSections>\n ...\n <layoutColumns>\n <layoutItems>\n <behavior>Required</behavior>\n <field>Name</field>\n </layoutItems>\n <layoutItems>\n <behavior>Required</behavior>\n <field>Name</field>\n </layoutItems>\n </layoutColumns>\n </layoutSections>\n</Layout>\n",
13641
- "\n$ sf hardis:project:metadata:findduplicates --file layout.layout-meta.xml\n[sfdx-hardis] Duplicate values in layout.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : Name\n",
13642
- "\n$ sf hardis:project.metadata:findduplicates -f \"force-app/main/default/**/*.xml\"\n[sfdx-hardis] hardis:project:metadata:findduplicates execution time 0:00:00.397\n[sfdx-hardis] Duplicate values in layout1.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : CreatedById\n\n[sfdx-hardis] Duplicate values in layout2.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : LastModifiedById, Name\n"
13643
- ],
13644
- "flags": {
13645
- "json": {
13646
- "description": "Format output as json.",
13647
- "helpGroup": "GLOBAL",
13648
- "name": "json",
13649
- "allowNo": false,
13650
- "type": "boolean"
13651
- },
13652
- "flags-dir": {
13653
- "helpGroup": "GLOBAL",
13654
- "name": "flags-dir",
13655
- "summary": "Import flag values from a directory.",
13656
- "hasDynamicHelp": false,
13657
- "multiple": false,
13658
- "type": "option"
13659
- },
13660
- "files": {
13661
- "char": "f",
13662
- "description": "XML metadata files path",
13663
- "name": "files",
13664
- "hasDynamicHelp": false,
13665
- "multiple": true,
13666
- "type": "option"
13667
- },
13668
- "websocket": {
13669
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
13670
- "name": "websocket",
13671
- "hasDynamicHelp": false,
13672
- "multiple": false,
13673
- "type": "option"
13674
- },
13675
- "skipauth": {
13676
- "description": "Skip authentication check when a default username is required",
13677
- "name": "skipauth",
13678
- "allowNo": false,
13679
- "type": "boolean"
13680
- }
13681
- },
13682
- "hasDynamicHelp": false,
13683
- "hiddenAliases": [],
13684
- "id": "hardis:project:metadata:findduplicates",
13685
- "pluginAlias": "sfdx-hardis",
13686
- "pluginName": "sfdx-hardis",
13687
- "pluginType": "core",
13688
- "strict": true,
13689
- "enableJsonFlag": true,
13690
- "metadataDuplicateFindKeys": {
13691
- "layout": [
13692
- "Layout.layoutSections.layoutColumns.layoutItems.field",
13693
- "Layout.quickActionListItems.quickActionName"
13694
- ],
13695
- "profile": [
13696
- "Profile.fieldPermissions.field",
13697
- "Profile.objectPermissions.object",
13698
- "Profile.classAccesses.apexClass"
13699
- ],
13700
- "labels": [
13701
- "CustomLabels.labels.fullName"
13702
- ],
13703
- "permissionset": [
13704
- "PermissionSet.fieldPermissions.field",
13705
- "PermissionSet.objectPermissions.object",
13706
- "PermissionSet.classAccesses.apexClass"
13707
- ]
13708
- },
13709
- "title": "XML duplicate values finder",
13710
- "requiresProject": true,
13711
- "isESM": true,
13712
- "relativePath": [
13713
- "lib",
13714
- "commands",
13715
- "hardis",
13716
- "project",
13717
- "metadata",
13718
- "findduplicates.js"
13898
+ "generate",
13899
+ "gitdelta.js"
13719
13900
  ],
13720
13901
  "aliasPermutations": [],
13721
13902
  "permutations": [
13722
- "hardis:project:metadata:findduplicates",
13723
- "project:hardis:metadata:findduplicates",
13724
- "project:metadata:hardis:findduplicates",
13725
- "project:metadata:findduplicates:hardis",
13726
- "hardis:metadata:project:findduplicates",
13727
- "metadata:hardis:project:findduplicates",
13728
- "metadata:project:hardis:findduplicates",
13729
- "metadata:project:findduplicates:hardis",
13730
- "hardis:metadata:findduplicates:project",
13731
- "metadata:hardis:findduplicates:project",
13732
- "metadata:findduplicates:hardis:project",
13733
- "metadata:findduplicates:project:hardis",
13734
- "hardis:project:findduplicates:metadata",
13735
- "project:hardis:findduplicates:metadata",
13736
- "project:findduplicates:hardis:metadata",
13737
- "project:findduplicates:metadata:hardis",
13738
- "hardis:findduplicates:project:metadata",
13739
- "findduplicates:hardis:project:metadata",
13740
- "findduplicates:project:hardis:metadata",
13741
- "findduplicates:project:metadata:hardis",
13742
- "hardis:findduplicates:metadata:project",
13743
- "findduplicates:hardis:metadata:project",
13744
- "findduplicates:metadata:hardis:project",
13745
- "findduplicates:metadata:project:hardis"
13903
+ "hardis:project:generate:gitdelta",
13904
+ "project:hardis:generate:gitdelta",
13905
+ "project:generate:hardis:gitdelta",
13906
+ "project:generate:gitdelta:hardis",
13907
+ "hardis:generate:project:gitdelta",
13908
+ "generate:hardis:project:gitdelta",
13909
+ "generate:project:hardis:gitdelta",
13910
+ "generate:project:gitdelta:hardis",
13911
+ "hardis:generate:gitdelta:project",
13912
+ "generate:hardis:gitdelta:project",
13913
+ "generate:gitdelta:hardis:project",
13914
+ "generate:gitdelta:project:hardis",
13915
+ "hardis:project:gitdelta:generate",
13916
+ "project:hardis:gitdelta:generate",
13917
+ "project:gitdelta:hardis:generate",
13918
+ "project:gitdelta:generate:hardis",
13919
+ "hardis:gitdelta:project:generate",
13920
+ "gitdelta:hardis:project:generate",
13921
+ "gitdelta:project:hardis:generate",
13922
+ "gitdelta:project:generate:hardis",
13923
+ "hardis:gitdelta:generate:project",
13924
+ "gitdelta:hardis:generate:project",
13925
+ "gitdelta:generate:hardis:project",
13926
+ "gitdelta:generate:project:hardis"
13746
13927
  ]
13747
13928
  },
13748
13929
  "hardis:scratch:pool:create": {
@@ -14270,6 +14451,210 @@
14270
14451
  "view:pool:scratch:hardis"
14271
14452
  ]
14272
14453
  },
14454
+ "hardis:project:metadata:activate-decomposed": {
14455
+ "aliases": [],
14456
+ "args": {},
14457
+ "description": "\n## Command Behavior\n\n**Activate decomposed metadata types in Salesforce DX projects.**\n\nThis command helps manage decomposed metadata types that can be split into multiple files in source format. It automatically decomposes all supported metadata types that exist in your project.\n\nSupported metadata types (Beta):\n\n- CustomLabels\n- PermissionSet\n- ExternalServiceRegistration\n- SharingRules\n- Workflow\n\nSee [Salesforce documentation on decomposed metadata](https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_ws_decomposed_md_types.htm)\n\nKey features:\n\n- Automatically detects and decomposes all applicable metadata types\n- Decomposes only metadata types that exist in your project\n- Interactive confirmation for decomposition operations\n- Handles all confirmation prompts automatically\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThis command utilizes Salesforce CLI's decomposed metadata feature to split complex metadata types into smaller, more manageable components:\n\n- **CustomLabels**: Each custom label becomes a separate file, making it easier to track changes and manage translations.\n- **PermissionSets**: Permission sets are decomposed into multiple files based on the permissions they contain (field permissions, object permissions, etc.).\n- **ExternalServiceRegistration**: Decomposes external service registrations.\n- **SharingRules**: Decomposes sharing rules into individual components.\n- **Workflow**: Decomposes workflow rules into individual components.\n\nThe command wraps the underlying Salesforce CLI functionality and provides a more user-friendly interface with additional validation and error handling.\n\nNote: All decomposed metadata features are currently in Beta in Salesforce CLI.\n</details>\n",
14458
+ "examples": [
14459
+ "$ sf hardis:project:metadata:activate-decomposed",
14460
+ "$ sf hardis:project:metadata:activate-decomposed --debug"
14461
+ ],
14462
+ "flags": {
14463
+ "json": {
14464
+ "description": "Format output as json.",
14465
+ "helpGroup": "GLOBAL",
14466
+ "name": "json",
14467
+ "allowNo": false,
14468
+ "type": "boolean"
14469
+ },
14470
+ "flags-dir": {
14471
+ "helpGroup": "GLOBAL",
14472
+ "name": "flags-dir",
14473
+ "summary": "Import flag values from a directory.",
14474
+ "hasDynamicHelp": false,
14475
+ "multiple": false,
14476
+ "type": "option"
14477
+ },
14478
+ "debug": {
14479
+ "char": "d",
14480
+ "description": "Run command in debug mode",
14481
+ "name": "debug",
14482
+ "allowNo": false,
14483
+ "type": "boolean"
14484
+ },
14485
+ "websocket": {
14486
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
14487
+ "name": "websocket",
14488
+ "hasDynamicHelp": false,
14489
+ "multiple": false,
14490
+ "type": "option"
14491
+ },
14492
+ "skipauth": {
14493
+ "description": "Skip authentication check when a default username is required",
14494
+ "name": "skipauth",
14495
+ "allowNo": false,
14496
+ "type": "boolean"
14497
+ }
14498
+ },
14499
+ "hasDynamicHelp": false,
14500
+ "hiddenAliases": [],
14501
+ "id": "hardis:project:metadata:activate-decomposed",
14502
+ "pluginAlias": "sfdx-hardis",
14503
+ "pluginName": "sfdx-hardis",
14504
+ "pluginType": "core",
14505
+ "strict": true,
14506
+ "enableJsonFlag": true,
14507
+ "title": "Activate Decomposed Metadata (Beta)",
14508
+ "isESM": true,
14509
+ "relativePath": [
14510
+ "lib",
14511
+ "commands",
14512
+ "hardis",
14513
+ "project",
14514
+ "metadata",
14515
+ "activate-decomposed.js"
14516
+ ],
14517
+ "aliasPermutations": [],
14518
+ "permutations": [
14519
+ "hardis:project:metadata:activate-decomposed",
14520
+ "project:hardis:metadata:activate-decomposed",
14521
+ "project:metadata:hardis:activate-decomposed",
14522
+ "project:metadata:activate-decomposed:hardis",
14523
+ "hardis:metadata:project:activate-decomposed",
14524
+ "metadata:hardis:project:activate-decomposed",
14525
+ "metadata:project:hardis:activate-decomposed",
14526
+ "metadata:project:activate-decomposed:hardis",
14527
+ "hardis:metadata:activate-decomposed:project",
14528
+ "metadata:hardis:activate-decomposed:project",
14529
+ "metadata:activate-decomposed:hardis:project",
14530
+ "metadata:activate-decomposed:project:hardis",
14531
+ "hardis:project:activate-decomposed:metadata",
14532
+ "project:hardis:activate-decomposed:metadata",
14533
+ "project:activate-decomposed:hardis:metadata",
14534
+ "project:activate-decomposed:metadata:hardis",
14535
+ "hardis:activate-decomposed:project:metadata",
14536
+ "activate-decomposed:hardis:project:metadata",
14537
+ "activate-decomposed:project:hardis:metadata",
14538
+ "activate-decomposed:project:metadata:hardis",
14539
+ "hardis:activate-decomposed:metadata:project",
14540
+ "activate-decomposed:hardis:metadata:project",
14541
+ "activate-decomposed:metadata:hardis:project",
14542
+ "activate-decomposed:metadata:project:hardis"
14543
+ ]
14544
+ },
14545
+ "hardis:project:metadata:findduplicates": {
14546
+ "aliases": [],
14547
+ "args": {},
14548
+ "description": "find duplicate values in XML file(s).\n Find duplicate values in XML file(s). Keys to be checked can be configured in `config/sfdx-hardis.yml` using property metadataDuplicateFindKeys.\n\nDefault config :\nmetadataDuplicateFindKeys :\n[object Object]\n",
14549
+ "examples": [
14550
+ "\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Layout xmlns=\"http://soap.sforce.com/2006/04/metadata\">\n <layoutSections>\n ...\n <layoutColumns>\n <layoutItems>\n <behavior>Required</behavior>\n <field>Name</field>\n </layoutItems>\n <layoutItems>\n <behavior>Required</behavior>\n <field>Name</field>\n </layoutItems>\n </layoutColumns>\n </layoutSections>\n</Layout>\n",
14551
+ "\n$ sf hardis:project:metadata:findduplicates --file layout.layout-meta.xml\n[sfdx-hardis] Duplicate values in layout.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : Name\n",
14552
+ "\n$ sf hardis:project.metadata:findduplicates -f \"force-app/main/default/**/*.xml\"\n[sfdx-hardis] hardis:project:metadata:findduplicates execution time 0:00:00.397\n[sfdx-hardis] Duplicate values in layout1.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : CreatedById\n\n[sfdx-hardis] Duplicate values in layout2.layout-meta.xml\n - Key : Layout.layoutSections.layoutColumns.layoutItems.field\n - Values : LastModifiedById, Name\n"
14553
+ ],
14554
+ "flags": {
14555
+ "json": {
14556
+ "description": "Format output as json.",
14557
+ "helpGroup": "GLOBAL",
14558
+ "name": "json",
14559
+ "allowNo": false,
14560
+ "type": "boolean"
14561
+ },
14562
+ "flags-dir": {
14563
+ "helpGroup": "GLOBAL",
14564
+ "name": "flags-dir",
14565
+ "summary": "Import flag values from a directory.",
14566
+ "hasDynamicHelp": false,
14567
+ "multiple": false,
14568
+ "type": "option"
14569
+ },
14570
+ "files": {
14571
+ "char": "f",
14572
+ "description": "XML metadata files path",
14573
+ "name": "files",
14574
+ "hasDynamicHelp": false,
14575
+ "multiple": true,
14576
+ "type": "option"
14577
+ },
14578
+ "websocket": {
14579
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
14580
+ "name": "websocket",
14581
+ "hasDynamicHelp": false,
14582
+ "multiple": false,
14583
+ "type": "option"
14584
+ },
14585
+ "skipauth": {
14586
+ "description": "Skip authentication check when a default username is required",
14587
+ "name": "skipauth",
14588
+ "allowNo": false,
14589
+ "type": "boolean"
14590
+ }
14591
+ },
14592
+ "hasDynamicHelp": false,
14593
+ "hiddenAliases": [],
14594
+ "id": "hardis:project:metadata:findduplicates",
14595
+ "pluginAlias": "sfdx-hardis",
14596
+ "pluginName": "sfdx-hardis",
14597
+ "pluginType": "core",
14598
+ "strict": true,
14599
+ "enableJsonFlag": true,
14600
+ "metadataDuplicateFindKeys": {
14601
+ "layout": [
14602
+ "Layout.layoutSections.layoutColumns.layoutItems.field",
14603
+ "Layout.quickActionListItems.quickActionName"
14604
+ ],
14605
+ "profile": [
14606
+ "Profile.fieldPermissions.field",
14607
+ "Profile.objectPermissions.object",
14608
+ "Profile.classAccesses.apexClass"
14609
+ ],
14610
+ "labels": [
14611
+ "CustomLabels.labels.fullName"
14612
+ ],
14613
+ "permissionset": [
14614
+ "PermissionSet.fieldPermissions.field",
14615
+ "PermissionSet.objectPermissions.object",
14616
+ "PermissionSet.classAccesses.apexClass"
14617
+ ]
14618
+ },
14619
+ "title": "XML duplicate values finder",
14620
+ "requiresProject": true,
14621
+ "isESM": true,
14622
+ "relativePath": [
14623
+ "lib",
14624
+ "commands",
14625
+ "hardis",
14626
+ "project",
14627
+ "metadata",
14628
+ "findduplicates.js"
14629
+ ],
14630
+ "aliasPermutations": [],
14631
+ "permutations": [
14632
+ "hardis:project:metadata:findduplicates",
14633
+ "project:hardis:metadata:findduplicates",
14634
+ "project:metadata:hardis:findduplicates",
14635
+ "project:metadata:findduplicates:hardis",
14636
+ "hardis:metadata:project:findduplicates",
14637
+ "metadata:hardis:project:findduplicates",
14638
+ "metadata:project:hardis:findduplicates",
14639
+ "metadata:project:findduplicates:hardis",
14640
+ "hardis:metadata:findduplicates:project",
14641
+ "metadata:hardis:findduplicates:project",
14642
+ "metadata:findduplicates:hardis:project",
14643
+ "metadata:findduplicates:project:hardis",
14644
+ "hardis:project:findduplicates:metadata",
14645
+ "project:hardis:findduplicates:metadata",
14646
+ "project:findduplicates:hardis:metadata",
14647
+ "project:findduplicates:metadata:hardis",
14648
+ "hardis:findduplicates:project:metadata",
14649
+ "findduplicates:hardis:project:metadata",
14650
+ "findduplicates:project:hardis:metadata",
14651
+ "findduplicates:project:metadata:hardis",
14652
+ "hardis:findduplicates:metadata:project",
14653
+ "findduplicates:hardis:metadata:project",
14654
+ "findduplicates:metadata:hardis:project",
14655
+ "findduplicates:metadata:project:hardis"
14656
+ ]
14657
+ },
14273
14658
  "hardis:org:retrieve:sources:analytics": {
14274
14659
  "aliases": [],
14275
14660
  "args": {},
@@ -15719,5 +16104,5 @@
15719
16104
  ]
15720
16105
  }
15721
16106
  },
15722
- "version": "6.16.1-beta202512161830.0"
16107
+ "version": "6.17.0"
15723
16108
  }