sfdx-hardis 6.3.2 → 6.3.4-beta202509081032.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.
@@ -5915,6 +5915,128 @@
5915
5915
  "listviewmine:fix:org:hardis"
5916
5916
  ]
5917
5917
  },
5918
+ "hardis:org:generate:packagexmlfull": {
5919
+ "aliases": [],
5920
+ "args": {},
5921
+ "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",
5922
+ "examples": [
5923
+ "$ sf hardis:org:generate:packagexmlfull",
5924
+ "$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
5925
+ "$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
5926
+ ],
5927
+ "flags": {
5928
+ "json": {
5929
+ "description": "Format output as json.",
5930
+ "helpGroup": "GLOBAL",
5931
+ "name": "json",
5932
+ "allowNo": false,
5933
+ "type": "boolean"
5934
+ },
5935
+ "flags-dir": {
5936
+ "helpGroup": "GLOBAL",
5937
+ "name": "flags-dir",
5938
+ "summary": "Import flag values from a directory.",
5939
+ "hasDynamicHelp": false,
5940
+ "multiple": false,
5941
+ "type": "option"
5942
+ },
5943
+ "outputfile": {
5944
+ "description": "Output package.xml file",
5945
+ "name": "outputfile",
5946
+ "hasDynamicHelp": false,
5947
+ "multiple": false,
5948
+ "type": "option"
5949
+ },
5950
+ "debug": {
5951
+ "char": "d",
5952
+ "description": "Activate debug mode (more logs)",
5953
+ "name": "debug",
5954
+ "allowNo": false,
5955
+ "type": "boolean"
5956
+ },
5957
+ "no-prompt": {
5958
+ "char": "n",
5959
+ "description": "Do not prompt for org username, use the default one",
5960
+ "name": "no-prompt",
5961
+ "allowNo": false,
5962
+ "type": "boolean"
5963
+ },
5964
+ "websocket": {
5965
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5966
+ "name": "websocket",
5967
+ "hasDynamicHelp": false,
5968
+ "multiple": false,
5969
+ "type": "option"
5970
+ },
5971
+ "skipauth": {
5972
+ "description": "Skip authentication check when a default username is required",
5973
+ "name": "skipauth",
5974
+ "allowNo": false,
5975
+ "type": "boolean"
5976
+ },
5977
+ "target-org": {
5978
+ "aliases": [
5979
+ "targetusername",
5980
+ "u"
5981
+ ],
5982
+ "char": "o",
5983
+ "deprecateAliases": true,
5984
+ "name": "target-org",
5985
+ "noCacheDefault": true,
5986
+ "required": true,
5987
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
5988
+ "hasDynamicHelp": true,
5989
+ "multiple": false,
5990
+ "type": "option"
5991
+ }
5992
+ },
5993
+ "hasDynamicHelp": true,
5994
+ "hiddenAliases": [],
5995
+ "id": "hardis:org:generate:packagexmlfull",
5996
+ "pluginAlias": "sfdx-hardis",
5997
+ "pluginName": "sfdx-hardis",
5998
+ "pluginType": "core",
5999
+ "strict": true,
6000
+ "enableJsonFlag": true,
6001
+ "title": "Generate Full Org package.xml",
6002
+ "requiresProject": false,
6003
+ "isESM": true,
6004
+ "relativePath": [
6005
+ "lib",
6006
+ "commands",
6007
+ "hardis",
6008
+ "org",
6009
+ "generate",
6010
+ "packagexmlfull.js"
6011
+ ],
6012
+ "aliasPermutations": [],
6013
+ "permutations": [
6014
+ "hardis:org:generate:packagexmlfull",
6015
+ "org:hardis:generate:packagexmlfull",
6016
+ "org:generate:hardis:packagexmlfull",
6017
+ "org:generate:packagexmlfull:hardis",
6018
+ "hardis:generate:org:packagexmlfull",
6019
+ "generate:hardis:org:packagexmlfull",
6020
+ "generate:org:hardis:packagexmlfull",
6021
+ "generate:org:packagexmlfull:hardis",
6022
+ "hardis:generate:packagexmlfull:org",
6023
+ "generate:hardis:packagexmlfull:org",
6024
+ "generate:packagexmlfull:hardis:org",
6025
+ "generate:packagexmlfull:org:hardis",
6026
+ "hardis:org:packagexmlfull:generate",
6027
+ "org:hardis:packagexmlfull:generate",
6028
+ "org:packagexmlfull:hardis:generate",
6029
+ "org:packagexmlfull:generate:hardis",
6030
+ "hardis:packagexmlfull:org:generate",
6031
+ "packagexmlfull:hardis:org:generate",
6032
+ "packagexmlfull:org:hardis:generate",
6033
+ "packagexmlfull:org:generate:hardis",
6034
+ "hardis:packagexmlfull:generate:org",
6035
+ "packagexmlfull:hardis:generate:org",
6036
+ "packagexmlfull:generate:hardis:org",
6037
+ "packagexmlfull:generate:org:hardis"
6038
+ ]
6039
+ },
5918
6040
  "hardis:org:diagnose:audittrail": {
5919
6041
  "aliases": [],
5920
6042
  "args": {},
@@ -6527,7 +6649,7 @@
6527
6649
  "hardis:org:diagnose:unsecure-connected-apps": {
6528
6650
  "aliases": [],
6529
6651
  "args": {},
6530
- "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<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",
6652
+ "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",
6531
6653
  "examples": [
6532
6654
  "$ sf hardis:org:diagnose:unsecure-connected-apps"
6533
6655
  ],
@@ -7178,132 +7300,10 @@
7178
7300
  "unusedusers:diagnose:org:hardis"
7179
7301
  ]
7180
7302
  },
7181
- "hardis:org:generate:packagexmlfull": {
7182
- "aliases": [],
7183
- "args": {},
7184
- "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",
7185
- "examples": [
7186
- "$ sf hardis:org:generate:packagexmlfull",
7187
- "$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
7188
- "$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
7189
- ],
7190
- "flags": {
7191
- "json": {
7192
- "description": "Format output as json.",
7193
- "helpGroup": "GLOBAL",
7194
- "name": "json",
7195
- "allowNo": false,
7196
- "type": "boolean"
7197
- },
7198
- "flags-dir": {
7199
- "helpGroup": "GLOBAL",
7200
- "name": "flags-dir",
7201
- "summary": "Import flag values from a directory.",
7202
- "hasDynamicHelp": false,
7203
- "multiple": false,
7204
- "type": "option"
7205
- },
7206
- "outputfile": {
7207
- "description": "Output package.xml file",
7208
- "name": "outputfile",
7209
- "hasDynamicHelp": false,
7210
- "multiple": false,
7211
- "type": "option"
7212
- },
7213
- "debug": {
7214
- "char": "d",
7215
- "description": "Activate debug mode (more logs)",
7216
- "name": "debug",
7217
- "allowNo": false,
7218
- "type": "boolean"
7219
- },
7220
- "no-prompt": {
7221
- "char": "n",
7222
- "description": "Do not prompt for org username, use the default one",
7223
- "name": "no-prompt",
7224
- "allowNo": false,
7225
- "type": "boolean"
7226
- },
7227
- "websocket": {
7228
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
7229
- "name": "websocket",
7230
- "hasDynamicHelp": false,
7231
- "multiple": false,
7232
- "type": "option"
7233
- },
7234
- "skipauth": {
7235
- "description": "Skip authentication check when a default username is required",
7236
- "name": "skipauth",
7237
- "allowNo": false,
7238
- "type": "boolean"
7239
- },
7240
- "target-org": {
7241
- "aliases": [
7242
- "targetusername",
7243
- "u"
7244
- ],
7245
- "char": "o",
7246
- "deprecateAliases": true,
7247
- "name": "target-org",
7248
- "noCacheDefault": true,
7249
- "required": true,
7250
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
7251
- "hasDynamicHelp": true,
7252
- "multiple": false,
7253
- "type": "option"
7254
- }
7255
- },
7256
- "hasDynamicHelp": true,
7257
- "hiddenAliases": [],
7258
- "id": "hardis:org:generate:packagexmlfull",
7259
- "pluginAlias": "sfdx-hardis",
7260
- "pluginName": "sfdx-hardis",
7261
- "pluginType": "core",
7262
- "strict": true,
7263
- "enableJsonFlag": true,
7264
- "title": "Generate Full Org package.xml",
7265
- "requiresProject": false,
7266
- "isESM": true,
7267
- "relativePath": [
7268
- "lib",
7269
- "commands",
7270
- "hardis",
7271
- "org",
7272
- "generate",
7273
- "packagexmlfull.js"
7274
- ],
7275
- "aliasPermutations": [],
7276
- "permutations": [
7277
- "hardis:org:generate:packagexmlfull",
7278
- "org:hardis:generate:packagexmlfull",
7279
- "org:generate:hardis:packagexmlfull",
7280
- "org:generate:packagexmlfull:hardis",
7281
- "hardis:generate:org:packagexmlfull",
7282
- "generate:hardis:org:packagexmlfull",
7283
- "generate:org:hardis:packagexmlfull",
7284
- "generate:org:packagexmlfull:hardis",
7285
- "hardis:generate:packagexmlfull:org",
7286
- "generate:hardis:packagexmlfull:org",
7287
- "generate:packagexmlfull:hardis:org",
7288
- "generate:packagexmlfull:org:hardis",
7289
- "hardis:org:packagexmlfull:generate",
7290
- "org:hardis:packagexmlfull:generate",
7291
- "org:packagexmlfull:hardis:generate",
7292
- "org:packagexmlfull:generate:hardis",
7293
- "hardis:packagexmlfull:org:generate",
7294
- "packagexmlfull:hardis:org:generate",
7295
- "packagexmlfull:org:hardis:generate",
7296
- "packagexmlfull:org:generate:hardis",
7297
- "hardis:packagexmlfull:generate:org",
7298
- "packagexmlfull:hardis:generate:org",
7299
- "packagexmlfull:generate:hardis:org",
7300
- "packagexmlfull:generate:org:hardis"
7301
- ]
7302
- },
7303
7303
  "hardis:org:monitor:all": {
7304
7304
  "aliases": [],
7305
7305
  "args": {},
7306
- "description": "Monitor org, generate reports and sends notifications\n\nYou can disable some commands defining either a **monitoringDisable** property in `.sfdx-hardis.yml`, or a comma separated list in env variable **MONITORING_DISABLE**\n\nExample in .sfdx-hardis.yml:\n \n```yaml\nmonitoringDisable:\n - METADATA_STATUS\n - MISSING_ATTRIBUTES\n - UNUSED_METADATAS\n```\n \nExample in env var:\n\n```sh\nMONITORING_DISABLE=METADATA_STATUS,MISSING_ATTRIBUTES,UNUSED_METADATAS\n```\n\nA [default list of monitoring commands](https://sfdx-hardis.cloudity.com/salesforce-monitoring-home/#monitoring-commands) is used, if you want to override it you can define property **monitoringCommands** in your .sfdx-hardis.yml file\n\nExample:\n\n```yaml\nmonitoringCommands:\n - title: My Custom command\n command: sf my:custom:command\n - title: My Custom command 2\n command: sf my:other:custom:command\n```\n\nYou can force the daily run of all commands by defining env var `MONITORING_IGNORE_FREQUENCY=true`\n\nThe default list of commands is the following:\n\n| Key | Description | Command | Frequency |\n| :---: | :---- | :---- | :-----: |\n| [AUDIT_TRAIL](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | Detect suspect setup actions in major org | [sf hardis:org:diagnose:audittrail](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | daily |\n| [LEGACY_API](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | Detect calls to deprecated API versions | [sf hardis:org:diagnose:legacyapi](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | daily |\n| [ORG_LIMITS](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | Detect if org limits are close to be reached | [sf hardis:org:monitor:limits](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | daily |\n| [LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | Extract licenses information | [sf hardis:org:diagnose:licenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | weekly |\n| [LINT_ACCESS](https://sfdx-hardis.cloudity.com/hardis/lint/access) | Detect custom elements with no access rights defined in permission sets | [sf hardis:lint:access](https://sfdx-hardis.cloudity.com/hardis/lint/access) | weekly |\n| [UNUSED_LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | Detect permission set licenses that are assigned to users that do not need them | [sf hardis:org:diagnose:unusedlicenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | weekly |\n| [UNUSED_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users without recent logins | [sf hardis:org:diagnose:unusedusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ACTIVE_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users with recent logins | [sf hardis:org:diagnose:unusedusers --returnactiveusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ORG_INFO](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | Get org info + SF instance info + next major upgrade date | [sf hardis:org:diagnose:instanceupgrade](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | weekly |\n| [RELEASE_UPDATES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | Gather warnings about incoming and overdue Release Updates | [sf hardis:org:diagnose:releaseupdates](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | weekly |\n| [UNUSED_METADATAS](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | Detect custom labels and custom permissions that are not in use | [sf hardis:lint:unusedmetadatas](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | weekly |\n| [UNUSED_APEX_CLASSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | Detect unused Apex classes in an org | [sf hardis:org:diagnose:unused-apex-classes](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | weekly |\n| [CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | Detect unused Connected Apps in an org | [sf hardis:org:diagnose:unused-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | weekly |\n| [UNSECURED_CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | Detect unsecured Connected Apps in an org | [sf hardis:org:diagnose:unsecure-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | weekly |\n| [METADATA_STATUS](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | Detect inactive metadata | [sf hardis:lint:metadatastatus](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | weekly |\n| [MISSING_ATTRIBUTES](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | Detect missing description on custom field | [sf hardis:lint:missingattributes](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | weekly |\n\n",
7306
+ "description": "Monitor org, generate reports and sends notifications\n\nYou can disable some commands defining either a **monitoringDisable** property in `.sfdx-hardis.yml`, or a comma separated list in env variable **MONITORING_DISABLE**\n\nExample in .sfdx-hardis.yml:\n \n```yaml\nmonitoringDisable:\n - METADATA_STATUS\n - MISSING_ATTRIBUTES\n - UNUSED_METADATAS\n```\n \nExample in env var:\n\n```sh\nMONITORING_DISABLE=METADATA_STATUS,MISSING_ATTRIBUTES,UNUSED_METADATAS\n```\n\nA [default list of monitoring commands](https://sfdx-hardis.cloudity.com/salesforce-monitoring-home/#monitoring-commands) is used, if you want to override it you can define property **monitoringCommands** in your .sfdx-hardis.yml file\n\nExample:\n\n```yaml\nmonitoringCommands:\n - title: My Custom command\n command: sf my:custom:command\n - title: My Custom command 2\n command: sf my:other:custom:command\n```\n\nYou can force the daily run of all commands by defining env var `MONITORING_IGNORE_FREQUENCY=true`\n\nThe default list of commands is the following:\n\n| Key | Description | Command | Frequency |\n| :---: | :---- | :---- | :-----: |\n| [AUDIT_TRAIL](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | Detect suspect setup actions in major org | [sf hardis:org:diagnose:audittrail](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | daily |\n| [LEGACY_API](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | Detect calls to deprecated API versions | [sf hardis:org:diagnose:legacyapi](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | daily |\n| [ORG_LIMITS](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | Detect if org limits are close to be reached | [sf hardis:org:monitor:limits](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | daily |\n| [UNSECURED_CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | Detect unsecured Connected Apps in an org | [sf hardis:org:diagnose:unsecure-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | daily |\n| [LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | Extract licenses information | [sf hardis:org:diagnose:licenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | weekly |\n| [LINT_ACCESS](https://sfdx-hardis.cloudity.com/hardis/lint/access) | Detect custom elements with no access rights defined in permission sets | [sf hardis:lint:access](https://sfdx-hardis.cloudity.com/hardis/lint/access) | weekly |\n| [UNUSED_LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | Detect permission set licenses that are assigned to users that do not need them | [sf hardis:org:diagnose:unusedlicenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | weekly |\n| [UNUSED_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users without recent logins | [sf hardis:org:diagnose:unusedusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ACTIVE_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users with recent logins | [sf hardis:org:diagnose:unusedusers --returnactiveusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ORG_INFO](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | Get org info + SF instance info + next major upgrade date | [sf hardis:org:diagnose:instanceupgrade](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | weekly |\n| [RELEASE_UPDATES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | Gather warnings about incoming and overdue Release Updates | [sf hardis:org:diagnose:releaseupdates](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | weekly |\n| [UNUSED_METADATAS](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | Detect custom labels and custom permissions that are not in use | [sf hardis:lint:unusedmetadatas](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | weekly |\n| [UNUSED_APEX_CLASSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | Detect unused Apex classes in an org | [sf hardis:org:diagnose:unused-apex-classes](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | weekly |\n| [CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | Detect unused Connected Apps in an org | [sf hardis:org:diagnose:unused-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | weekly |\n| [METADATA_STATUS](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | Detect inactive metadata | [sf hardis:lint:metadatastatus](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | weekly |\n| [MISSING_ATTRIBUTES](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | Detect missing description on custom field | [sf hardis:lint:missingattributes](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | weekly |\n\n",
7307
7307
  "examples": [
7308
7308
  "$ sf hardis:org:monitor:all"
7309
7309
  ],
@@ -7387,6 +7387,12 @@
7387
7387
  "command": "sf hardis:org:monitor:limits",
7388
7388
  "frequency": "daily"
7389
7389
  },
7390
+ {
7391
+ "key": "UNSECURED_CONNECTED_APPS",
7392
+ "title": "Detect unsecured Connected Apps in an org",
7393
+ "command": "sf hardis:org:diagnose:unsecure-connected-apps",
7394
+ "frequency": "daily"
7395
+ },
7390
7396
  {
7391
7397
  "key": "LICENSES",
7392
7398
  "title": "Extract licenses information",
@@ -7447,12 +7453,6 @@
7447
7453
  "command": "sf hardis:org:diagnose:unused-connected-apps",
7448
7454
  "frequency": "weekly"
7449
7455
  },
7450
- {
7451
- "key": "UNSECURED_CONNECTED_APPS",
7452
- "title": "Detect unsecured Connected Apps in an org",
7453
- "command": "sf hardis:org:diagnose:unsecure-connected-apps",
7454
- "frequency": "weekly"
7455
- },
7456
7456
  {
7457
7457
  "key": "METADATA_STATUS",
7458
7458
  "title": "Detect inactive metadata",
@@ -8049,113 +8049,6 @@
8049
8049
  "flow:purge:org:hardis"
8050
8050
  ]
8051
8051
  },
8052
- "hardis:org:retrieve:packageconfig": {
8053
- "aliases": [],
8054
- "args": {},
8055
- "description": "\n**Retrieves the installed package configuration from a Salesforce org and optionally updates the local project configuration.**\n\nThis command is useful for maintaining an accurate record of installed packages within your Salesforce project, which is crucial for managing dependencies and ensuring consistent deployments across environments.\n\nKey functionalities:\n\n- **Package Listing:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a list of all installed packages.\n- **Configuration Update:** Offers the option to update your local project's configuration with the retrieved list of installed packages. This can be beneficial for automating package installations during environment setup or CI/CD processes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Org Connection:** It establishes a connection to the target Salesforce org using the provided or prompted username.\n- **Metadata Retrieval:** It utilizes `MetadataUtils.listInstalledPackages` to query the Salesforce org and obtain details about the installed packages.\n- **Interactive Prompt:** It uses the `prompts` library to ask the user whether they want to update their local project configuration with the retrieved package list.\n- **Configuration Management:** If the user confirms, it calls `managePackageConfig` to update the project's configuration file (likely `.sfdx-hardis.yml`) with the new package information.\n- **User Feedback:** Provides clear messages to the user about the success of the package retrieval and configuration update.\n</details>\n",
8056
- "examples": [
8057
- "$ sf hardis:org:retrieve:packageconfig",
8058
- "sf hardis:org:retrieve:packageconfig -u myOrg"
8059
- ],
8060
- "flags": {
8061
- "json": {
8062
- "description": "Format output as json.",
8063
- "helpGroup": "GLOBAL",
8064
- "name": "json",
8065
- "allowNo": false,
8066
- "type": "boolean"
8067
- },
8068
- "flags-dir": {
8069
- "helpGroup": "GLOBAL",
8070
- "name": "flags-dir",
8071
- "summary": "Import flag values from a directory.",
8072
- "hasDynamicHelp": false,
8073
- "multiple": false,
8074
- "type": "option"
8075
- },
8076
- "debug": {
8077
- "char": "d",
8078
- "description": "Activate debug mode (more logs)",
8079
- "name": "debug",
8080
- "allowNo": false,
8081
- "type": "boolean"
8082
- },
8083
- "websocket": {
8084
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
8085
- "name": "websocket",
8086
- "hasDynamicHelp": false,
8087
- "multiple": false,
8088
- "type": "option"
8089
- },
8090
- "skipauth": {
8091
- "description": "Skip authentication check when a default username is required",
8092
- "name": "skipauth",
8093
- "allowNo": false,
8094
- "type": "boolean"
8095
- },
8096
- "target-org": {
8097
- "aliases": [
8098
- "targetusername",
8099
- "u"
8100
- ],
8101
- "char": "o",
8102
- "deprecateAliases": true,
8103
- "name": "target-org",
8104
- "noCacheDefault": true,
8105
- "required": true,
8106
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
8107
- "hasDynamicHelp": true,
8108
- "multiple": false,
8109
- "type": "option"
8110
- }
8111
- },
8112
- "hasDynamicHelp": true,
8113
- "hiddenAliases": [],
8114
- "id": "hardis:org:retrieve:packageconfig",
8115
- "pluginAlias": "sfdx-hardis",
8116
- "pluginName": "sfdx-hardis",
8117
- "pluginType": "core",
8118
- "strict": true,
8119
- "enableJsonFlag": true,
8120
- "title": "Retrieve package configuration from an org",
8121
- "requiresProject": false,
8122
- "isESM": true,
8123
- "relativePath": [
8124
- "lib",
8125
- "commands",
8126
- "hardis",
8127
- "org",
8128
- "retrieve",
8129
- "packageconfig.js"
8130
- ],
8131
- "aliasPermutations": [],
8132
- "permutations": [
8133
- "hardis:org:retrieve:packageconfig",
8134
- "org:hardis:retrieve:packageconfig",
8135
- "org:retrieve:hardis:packageconfig",
8136
- "org:retrieve:packageconfig:hardis",
8137
- "hardis:retrieve:org:packageconfig",
8138
- "retrieve:hardis:org:packageconfig",
8139
- "retrieve:org:hardis:packageconfig",
8140
- "retrieve:org:packageconfig:hardis",
8141
- "hardis:retrieve:packageconfig:org",
8142
- "retrieve:hardis:packageconfig:org",
8143
- "retrieve:packageconfig:hardis:org",
8144
- "retrieve:packageconfig:org:hardis",
8145
- "hardis:org:packageconfig:retrieve",
8146
- "org:hardis:packageconfig:retrieve",
8147
- "org:packageconfig:hardis:retrieve",
8148
- "org:packageconfig:retrieve:hardis",
8149
- "hardis:packageconfig:org:retrieve",
8150
- "packageconfig:hardis:org:retrieve",
8151
- "packageconfig:org:hardis:retrieve",
8152
- "packageconfig:org:retrieve:hardis",
8153
- "hardis:packageconfig:retrieve:org",
8154
- "packageconfig:hardis:retrieve:org",
8155
- "packageconfig:retrieve:hardis:org",
8156
- "packageconfig:retrieve:org:hardis"
8157
- ]
8158
- },
8159
8052
  "hardis:org:refresh:after-refresh": {
8160
8053
  "aliases": [],
8161
8054
  "args": {},
@@ -8395,6 +8288,113 @@
8395
8288
  "before-refresh:refresh:org:hardis"
8396
8289
  ]
8397
8290
  },
8291
+ "hardis:org:retrieve:packageconfig": {
8292
+ "aliases": [],
8293
+ "args": {},
8294
+ "description": "\n**Retrieves the installed package configuration from a Salesforce org and optionally updates the local project configuration.**\n\nThis command is useful for maintaining an accurate record of installed packages within your Salesforce project, which is crucial for managing dependencies and ensuring consistent deployments across environments.\n\nKey functionalities:\n\n- **Package Listing:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a list of all installed packages.\n- **Configuration Update:** Offers the option to update your local project's configuration with the retrieved list of installed packages. This can be beneficial for automating package installations during environment setup or CI/CD processes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Org Connection:** It establishes a connection to the target Salesforce org using the provided or prompted username.\n- **Metadata Retrieval:** It utilizes `MetadataUtils.listInstalledPackages` to query the Salesforce org and obtain details about the installed packages.\n- **Interactive Prompt:** It uses the `prompts` library to ask the user whether they want to update their local project configuration with the retrieved package list.\n- **Configuration Management:** If the user confirms, it calls `managePackageConfig` to update the project's configuration file (likely `.sfdx-hardis.yml`) with the new package information.\n- **User Feedback:** Provides clear messages to the user about the success of the package retrieval and configuration update.\n</details>\n",
8295
+ "examples": [
8296
+ "$ sf hardis:org:retrieve:packageconfig",
8297
+ "sf hardis:org:retrieve:packageconfig -u myOrg"
8298
+ ],
8299
+ "flags": {
8300
+ "json": {
8301
+ "description": "Format output as json.",
8302
+ "helpGroup": "GLOBAL",
8303
+ "name": "json",
8304
+ "allowNo": false,
8305
+ "type": "boolean"
8306
+ },
8307
+ "flags-dir": {
8308
+ "helpGroup": "GLOBAL",
8309
+ "name": "flags-dir",
8310
+ "summary": "Import flag values from a directory.",
8311
+ "hasDynamicHelp": false,
8312
+ "multiple": false,
8313
+ "type": "option"
8314
+ },
8315
+ "debug": {
8316
+ "char": "d",
8317
+ "description": "Activate debug mode (more logs)",
8318
+ "name": "debug",
8319
+ "allowNo": false,
8320
+ "type": "boolean"
8321
+ },
8322
+ "websocket": {
8323
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
8324
+ "name": "websocket",
8325
+ "hasDynamicHelp": false,
8326
+ "multiple": false,
8327
+ "type": "option"
8328
+ },
8329
+ "skipauth": {
8330
+ "description": "Skip authentication check when a default username is required",
8331
+ "name": "skipauth",
8332
+ "allowNo": false,
8333
+ "type": "boolean"
8334
+ },
8335
+ "target-org": {
8336
+ "aliases": [
8337
+ "targetusername",
8338
+ "u"
8339
+ ],
8340
+ "char": "o",
8341
+ "deprecateAliases": true,
8342
+ "name": "target-org",
8343
+ "noCacheDefault": true,
8344
+ "required": true,
8345
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
8346
+ "hasDynamicHelp": true,
8347
+ "multiple": false,
8348
+ "type": "option"
8349
+ }
8350
+ },
8351
+ "hasDynamicHelp": true,
8352
+ "hiddenAliases": [],
8353
+ "id": "hardis:org:retrieve:packageconfig",
8354
+ "pluginAlias": "sfdx-hardis",
8355
+ "pluginName": "sfdx-hardis",
8356
+ "pluginType": "core",
8357
+ "strict": true,
8358
+ "enableJsonFlag": true,
8359
+ "title": "Retrieve package configuration from an org",
8360
+ "requiresProject": false,
8361
+ "isESM": true,
8362
+ "relativePath": [
8363
+ "lib",
8364
+ "commands",
8365
+ "hardis",
8366
+ "org",
8367
+ "retrieve",
8368
+ "packageconfig.js"
8369
+ ],
8370
+ "aliasPermutations": [],
8371
+ "permutations": [
8372
+ "hardis:org:retrieve:packageconfig",
8373
+ "org:hardis:retrieve:packageconfig",
8374
+ "org:retrieve:hardis:packageconfig",
8375
+ "org:retrieve:packageconfig:hardis",
8376
+ "hardis:retrieve:org:packageconfig",
8377
+ "retrieve:hardis:org:packageconfig",
8378
+ "retrieve:org:hardis:packageconfig",
8379
+ "retrieve:org:packageconfig:hardis",
8380
+ "hardis:retrieve:packageconfig:org",
8381
+ "retrieve:hardis:packageconfig:org",
8382
+ "retrieve:packageconfig:hardis:org",
8383
+ "retrieve:packageconfig:org:hardis",
8384
+ "hardis:org:packageconfig:retrieve",
8385
+ "org:hardis:packageconfig:retrieve",
8386
+ "org:packageconfig:hardis:retrieve",
8387
+ "org:packageconfig:retrieve:hardis",
8388
+ "hardis:packageconfig:org:retrieve",
8389
+ "packageconfig:hardis:org:retrieve",
8390
+ "packageconfig:org:hardis:retrieve",
8391
+ "packageconfig:org:retrieve:hardis",
8392
+ "hardis:packageconfig:retrieve:org",
8393
+ "packageconfig:hardis:retrieve:org",
8394
+ "packageconfig:retrieve:hardis:org",
8395
+ "packageconfig:retrieve:org:hardis"
8396
+ ]
8397
+ },
8398
8398
  "hardis:org:test:apex": {
8399
8399
  "aliases": [],
8400
8400
  "args": {},
@@ -9682,12 +9682,12 @@
9682
9682
  "remotesites:audit:project:hardis"
9683
9683
  ]
9684
9684
  },
9685
- "hardis:project:clean:emptyitems": {
9685
+ "hardis:project:configure:auth": {
9686
9686
  "aliases": [],
9687
9687
  "args": {},
9688
- "description": "\n## Command Behavior\n\n**Removes empty or irrelevant metadata items from your Salesforce DX project sources.**\n\nThis command helps maintain a clean and efficient Salesforce codebase by deleting metadata files that are essentially empty or contain no meaningful configuration. These files can sometimes be generated during retrieval processes or remain after refactoring, contributing to unnecessary clutter in your project.\n\nKey functionalities:\n\n- **Targeted Cleaning:** Specifically targets and removes empty instances of:\n - Global Value Set Translations (`.globalValueSetTranslation-meta.xml`)\n - Standard Value Sets (`.standardValueSet-meta.xml`)\n - Sharing Rules (`.sharingRules-meta.xml`)\n- **Content-Based Deletion:** It checks the XML content of these files for the presence of specific tags (e.g., `valueTranslation` for Global Value Set Translations) to determine if they are truly empty or lack relevant data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find files matching predefined patterns for Global Value Set Translations, Standard Value Sets, and Sharing Rules within the specified root folder (defaults to `force-app`).\n- **XML Parsing:** For each matching file, it reads and parses the XML content using `parseXmlFile`.\n- **Content Validation:** It then checks the parsed XML object for the existence of specific nested properties (e.g., `xmlContent.GlobalValueSetTranslation.valueTranslation`). If these properties are missing or empty, the file is considered empty.\n- **File Deletion:** If a file is determined to be empty, it is removed from the file system using `fs.remove`.\n- **Logging:** Provides clear messages about which files are being removed and a summary of the total number of items cleaned.\n</details>\n",
9688
+ "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",
9689
9689
  "examples": [
9690
- "$ sf hardis:project:clean:emptyitems"
9690
+ "$ sf hardis:project:configure:auth"
9691
9691
  ],
9692
9692
  "flags": {
9693
9693
  "json": {
@@ -9705,14 +9705,12 @@
9705
9705
  "multiple": false,
9706
9706
  "type": "option"
9707
9707
  },
9708
- "folder": {
9709
- "char": "f",
9710
- "description": "Root folder",
9711
- "name": "folder",
9712
- "default": "force-app",
9713
- "hasDynamicHelp": false,
9714
- "multiple": false,
9715
- "type": "option"
9708
+ "devhub": {
9709
+ "char": "b",
9710
+ "description": "Configure project DevHub",
9711
+ "name": "devhub",
9712
+ "allowNo": false,
9713
+ "type": "boolean"
9716
9714
  },
9717
9715
  "debug": {
9718
9716
  "char": "d",
@@ -9733,28 +9731,262 @@
9733
9731
  "name": "skipauth",
9734
9732
  "allowNo": false,
9735
9733
  "type": "boolean"
9736
- }
9737
- },
9738
- "hasDynamicHelp": false,
9739
- "hiddenAliases": [],
9740
- "id": "hardis:project:clean:emptyitems",
9741
- "pluginAlias": "sfdx-hardis",
9742
- "pluginName": "sfdx-hardis",
9743
- "pluginType": "core",
9744
- "strict": true,
9745
- "enableJsonFlag": true,
9746
- "title": "Clean retrieved empty items in dx sources",
9747
- "requiresProject": true,
9748
- "isESM": true,
9749
- "relativePath": [
9750
- "lib",
9751
- "commands",
9752
- "hardis",
9753
- "project",
9754
- "clean",
9755
- "emptyitems.js"
9756
- ],
9757
- "aliasPermutations": [],
9734
+ },
9735
+ "target-org": {
9736
+ "aliases": [
9737
+ "targetusername",
9738
+ "u"
9739
+ ],
9740
+ "char": "o",
9741
+ "deprecateAliases": true,
9742
+ "name": "target-org",
9743
+ "noCacheDefault": true,
9744
+ "summary": "Username or alias of the target org.",
9745
+ "hasDynamicHelp": true,
9746
+ "multiple": false,
9747
+ "type": "option"
9748
+ },
9749
+ "target-dev-hub": {
9750
+ "aliases": [
9751
+ "targetdevhubusername"
9752
+ ],
9753
+ "char": "v",
9754
+ "deprecateAliases": true,
9755
+ "name": "target-dev-hub",
9756
+ "noCacheDefault": true,
9757
+ "required": false,
9758
+ "summary": "Username or alias of the Dev Hub org.",
9759
+ "hasDynamicHelp": true,
9760
+ "multiple": false,
9761
+ "type": "option"
9762
+ }
9763
+ },
9764
+ "hasDynamicHelp": true,
9765
+ "hiddenAliases": [],
9766
+ "id": "hardis:project:configure:auth",
9767
+ "pluginAlias": "sfdx-hardis",
9768
+ "pluginName": "sfdx-hardis",
9769
+ "pluginType": "core",
9770
+ "strict": true,
9771
+ "enableJsonFlag": true,
9772
+ "title": "Configure authentication",
9773
+ "requiresProject": false,
9774
+ "requiresDependencies": [
9775
+ "openssl"
9776
+ ],
9777
+ "isESM": true,
9778
+ "relativePath": [
9779
+ "lib",
9780
+ "commands",
9781
+ "hardis",
9782
+ "project",
9783
+ "configure",
9784
+ "auth.js"
9785
+ ],
9786
+ "aliasPermutations": [],
9787
+ "permutations": [
9788
+ "hardis:project:configure:auth",
9789
+ "project:hardis:configure:auth",
9790
+ "project:configure:hardis:auth",
9791
+ "project:configure:auth:hardis",
9792
+ "hardis:configure:project:auth",
9793
+ "configure:hardis:project:auth",
9794
+ "configure:project:hardis:auth",
9795
+ "configure:project:auth:hardis",
9796
+ "hardis:configure:auth:project",
9797
+ "configure:hardis:auth:project",
9798
+ "configure:auth:hardis:project",
9799
+ "configure:auth:project:hardis",
9800
+ "hardis:project:auth:configure",
9801
+ "project:hardis:auth:configure",
9802
+ "project:auth:hardis:configure",
9803
+ "project:auth:configure:hardis",
9804
+ "hardis:auth:project:configure",
9805
+ "auth:hardis:project:configure",
9806
+ "auth:project:hardis:configure",
9807
+ "auth:project:configure:hardis",
9808
+ "hardis:auth:configure:project",
9809
+ "auth:hardis:configure:project",
9810
+ "auth:configure:hardis:project",
9811
+ "auth:configure:project:hardis"
9812
+ ]
9813
+ },
9814
+ "hardis:project:convert:profilestopermsets": {
9815
+ "aliases": [],
9816
+ "args": {},
9817
+ "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",
9818
+ "examples": [
9819
+ "$ sf hardis:project:convert:profilestopermsets"
9820
+ ],
9821
+ "flags": {
9822
+ "json": {
9823
+ "description": "Format output as json.",
9824
+ "helpGroup": "GLOBAL",
9825
+ "name": "json",
9826
+ "allowNo": false,
9827
+ "type": "boolean"
9828
+ },
9829
+ "flags-dir": {
9830
+ "helpGroup": "GLOBAL",
9831
+ "name": "flags-dir",
9832
+ "summary": "Import flag values from a directory.",
9833
+ "hasDynamicHelp": false,
9834
+ "multiple": false,
9835
+ "type": "option"
9836
+ },
9837
+ "except": {
9838
+ "char": "e",
9839
+ "description": "List of filters",
9840
+ "name": "except",
9841
+ "default": [],
9842
+ "hasDynamicHelp": false,
9843
+ "multiple": true,
9844
+ "type": "option"
9845
+ },
9846
+ "debug": {
9847
+ "char": "d",
9848
+ "description": "Activate debug mode (more logs)",
9849
+ "name": "debug",
9850
+ "allowNo": false,
9851
+ "type": "boolean"
9852
+ },
9853
+ "websocket": {
9854
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9855
+ "name": "websocket",
9856
+ "hasDynamicHelp": false,
9857
+ "multiple": false,
9858
+ "type": "option"
9859
+ },
9860
+ "skipauth": {
9861
+ "description": "Skip authentication check when a default username is required",
9862
+ "name": "skipauth",
9863
+ "allowNo": false,
9864
+ "type": "boolean"
9865
+ }
9866
+ },
9867
+ "hasDynamicHelp": false,
9868
+ "hiddenAliases": [],
9869
+ "id": "hardis:project:convert:profilestopermsets",
9870
+ "pluginAlias": "sfdx-hardis",
9871
+ "pluginName": "sfdx-hardis",
9872
+ "pluginType": "core",
9873
+ "strict": true,
9874
+ "enableJsonFlag": true,
9875
+ "title": "Convert Profiles into Permission Sets",
9876
+ "requiresProject": true,
9877
+ "requiresSfdxPlugins": [
9878
+ "shane-sfdx-plugins"
9879
+ ],
9880
+ "isESM": true,
9881
+ "relativePath": [
9882
+ "lib",
9883
+ "commands",
9884
+ "hardis",
9885
+ "project",
9886
+ "convert",
9887
+ "profilestopermsets.js"
9888
+ ],
9889
+ "aliasPermutations": [],
9890
+ "permutations": [
9891
+ "hardis:project:convert:profilestopermsets",
9892
+ "project:hardis:convert:profilestopermsets",
9893
+ "project:convert:hardis:profilestopermsets",
9894
+ "project:convert:profilestopermsets:hardis",
9895
+ "hardis:convert:project:profilestopermsets",
9896
+ "convert:hardis:project:profilestopermsets",
9897
+ "convert:project:hardis:profilestopermsets",
9898
+ "convert:project:profilestopermsets:hardis",
9899
+ "hardis:convert:profilestopermsets:project",
9900
+ "convert:hardis:profilestopermsets:project",
9901
+ "convert:profilestopermsets:hardis:project",
9902
+ "convert:profilestopermsets:project:hardis",
9903
+ "hardis:project:profilestopermsets:convert",
9904
+ "project:hardis:profilestopermsets:convert",
9905
+ "project:profilestopermsets:hardis:convert",
9906
+ "project:profilestopermsets:convert:hardis",
9907
+ "hardis:profilestopermsets:project:convert",
9908
+ "profilestopermsets:hardis:project:convert",
9909
+ "profilestopermsets:project:hardis:convert",
9910
+ "profilestopermsets:project:convert:hardis",
9911
+ "hardis:profilestopermsets:convert:project",
9912
+ "profilestopermsets:hardis:convert:project",
9913
+ "profilestopermsets:convert:hardis:project",
9914
+ "profilestopermsets:convert:project:hardis"
9915
+ ]
9916
+ },
9917
+ "hardis:project:clean:emptyitems": {
9918
+ "aliases": [],
9919
+ "args": {},
9920
+ "description": "\n## Command Behavior\n\n**Removes empty or irrelevant metadata items from your Salesforce DX project sources.**\n\nThis command helps maintain a clean and efficient Salesforce codebase by deleting metadata files that are essentially empty or contain no meaningful configuration. These files can sometimes be generated during retrieval processes or remain after refactoring, contributing to unnecessary clutter in your project.\n\nKey functionalities:\n\n- **Targeted Cleaning:** Specifically targets and removes empty instances of:\n - Global Value Set Translations (`.globalValueSetTranslation-meta.xml`)\n - Standard Value Sets (`.standardValueSet-meta.xml`)\n - Sharing Rules (`.sharingRules-meta.xml`)\n- **Content-Based Deletion:** It checks the XML content of these files for the presence of specific tags (e.g., `valueTranslation` for Global Value Set Translations) to determine if they are truly empty or lack relevant data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find files matching predefined patterns for Global Value Set Translations, Standard Value Sets, and Sharing Rules within the specified root folder (defaults to `force-app`).\n- **XML Parsing:** For each matching file, it reads and parses the XML content using `parseXmlFile`.\n- **Content Validation:** It then checks the parsed XML object for the existence of specific nested properties (e.g., `xmlContent.GlobalValueSetTranslation.valueTranslation`). If these properties are missing or empty, the file is considered empty.\n- **File Deletion:** If a file is determined to be empty, it is removed from the file system using `fs.remove`.\n- **Logging:** Provides clear messages about which files are being removed and a summary of the total number of items cleaned.\n</details>\n",
9921
+ "examples": [
9922
+ "$ sf hardis:project:clean:emptyitems"
9923
+ ],
9924
+ "flags": {
9925
+ "json": {
9926
+ "description": "Format output as json.",
9927
+ "helpGroup": "GLOBAL",
9928
+ "name": "json",
9929
+ "allowNo": false,
9930
+ "type": "boolean"
9931
+ },
9932
+ "flags-dir": {
9933
+ "helpGroup": "GLOBAL",
9934
+ "name": "flags-dir",
9935
+ "summary": "Import flag values from a directory.",
9936
+ "hasDynamicHelp": false,
9937
+ "multiple": false,
9938
+ "type": "option"
9939
+ },
9940
+ "folder": {
9941
+ "char": "f",
9942
+ "description": "Root folder",
9943
+ "name": "folder",
9944
+ "default": "force-app",
9945
+ "hasDynamicHelp": false,
9946
+ "multiple": false,
9947
+ "type": "option"
9948
+ },
9949
+ "debug": {
9950
+ "char": "d",
9951
+ "description": "Activate debug mode (more logs)",
9952
+ "name": "debug",
9953
+ "allowNo": false,
9954
+ "type": "boolean"
9955
+ },
9956
+ "websocket": {
9957
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9958
+ "name": "websocket",
9959
+ "hasDynamicHelp": false,
9960
+ "multiple": false,
9961
+ "type": "option"
9962
+ },
9963
+ "skipauth": {
9964
+ "description": "Skip authentication check when a default username is required",
9965
+ "name": "skipauth",
9966
+ "allowNo": false,
9967
+ "type": "boolean"
9968
+ }
9969
+ },
9970
+ "hasDynamicHelp": false,
9971
+ "hiddenAliases": [],
9972
+ "id": "hardis:project:clean:emptyitems",
9973
+ "pluginAlias": "sfdx-hardis",
9974
+ "pluginName": "sfdx-hardis",
9975
+ "pluginType": "core",
9976
+ "strict": true,
9977
+ "enableJsonFlag": true,
9978
+ "title": "Clean retrieved empty items in dx sources",
9979
+ "requiresProject": true,
9980
+ "isESM": true,
9981
+ "relativePath": [
9982
+ "lib",
9983
+ "commands",
9984
+ "hardis",
9985
+ "project",
9986
+ "clean",
9987
+ "emptyitems.js"
9988
+ ],
9989
+ "aliasPermutations": [],
9758
9990
  "permutations": [
9759
9991
  "hardis:project:clean:emptyitems",
9760
9992
  "project:hardis:clean:emptyitems",
@@ -11167,12 +11399,12 @@
11167
11399
  "xml:clean:project:hardis"
11168
11400
  ]
11169
11401
  },
11170
- "hardis:project:configure:auth": {
11402
+ "hardis:project:fix:profiletabs": {
11171
11403
  "aliases": [],
11172
11404
  "args": {},
11173
- "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",
11405
+ "description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
11174
11406
  "examples": [
11175
- "$ sf hardis:project:configure:auth"
11407
+ "$ sf hardis:project:fix:profiletabs"
11176
11408
  ],
11177
11409
  "flags": {
11178
11410
  "json": {
@@ -11190,12 +11422,14 @@
11190
11422
  "multiple": false,
11191
11423
  "type": "option"
11192
11424
  },
11193
- "devhub": {
11194
- "char": "b",
11195
- "description": "Configure project DevHub",
11196
- "name": "devhub",
11197
- "allowNo": false,
11198
- "type": "boolean"
11425
+ "path": {
11426
+ "char": "p",
11427
+ "description": "Root folder",
11428
+ "name": "path",
11429
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11430
+ "hasDynamicHelp": false,
11431
+ "multiple": false,
11432
+ "type": "option"
11199
11433
  },
11200
11434
  "debug": {
11201
11435
  "char": "d",
@@ -11226,21 +11460,8 @@
11226
11460
  "deprecateAliases": true,
11227
11461
  "name": "target-org",
11228
11462
  "noCacheDefault": true,
11229
- "summary": "Username or alias of the target org.",
11230
- "hasDynamicHelp": true,
11231
- "multiple": false,
11232
- "type": "option"
11233
- },
11234
- "target-dev-hub": {
11235
- "aliases": [
11236
- "targetdevhubusername"
11237
- ],
11238
- "char": "v",
11239
- "deprecateAliases": true,
11240
- "name": "target-dev-hub",
11241
- "noCacheDefault": true,
11242
- "required": false,
11243
- "summary": "Username or alias of the Dev Hub org.",
11463
+ "required": true,
11464
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
11244
11465
  "hasDynamicHelp": true,
11245
11466
  "multiple": false,
11246
11467
  "type": "option"
@@ -11248,60 +11469,57 @@
11248
11469
  },
11249
11470
  "hasDynamicHelp": true,
11250
11471
  "hiddenAliases": [],
11251
- "id": "hardis:project:configure:auth",
11472
+ "id": "hardis:project:fix:profiletabs",
11252
11473
  "pluginAlias": "sfdx-hardis",
11253
11474
  "pluginName": "sfdx-hardis",
11254
11475
  "pluginType": "core",
11255
11476
  "strict": true,
11256
11477
  "enableJsonFlag": true,
11257
- "title": "Configure authentication",
11258
- "requiresProject": false,
11259
- "requiresDependencies": [
11260
- "openssl"
11261
- ],
11478
+ "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
11479
+ "requiresProject": true,
11262
11480
  "isESM": true,
11263
11481
  "relativePath": [
11264
11482
  "lib",
11265
11483
  "commands",
11266
11484
  "hardis",
11267
11485
  "project",
11268
- "configure",
11269
- "auth.js"
11486
+ "fix",
11487
+ "profiletabs.js"
11270
11488
  ],
11271
11489
  "aliasPermutations": [],
11272
11490
  "permutations": [
11273
- "hardis:project:configure:auth",
11274
- "project:hardis:configure:auth",
11275
- "project:configure:hardis:auth",
11276
- "project:configure:auth:hardis",
11277
- "hardis:configure:project:auth",
11278
- "configure:hardis:project:auth",
11279
- "configure:project:hardis:auth",
11280
- "configure:project:auth:hardis",
11281
- "hardis:configure:auth:project",
11282
- "configure:hardis:auth:project",
11283
- "configure:auth:hardis:project",
11284
- "configure:auth:project:hardis",
11285
- "hardis:project:auth:configure",
11286
- "project:hardis:auth:configure",
11287
- "project:auth:hardis:configure",
11288
- "project:auth:configure:hardis",
11289
- "hardis:auth:project:configure",
11290
- "auth:hardis:project:configure",
11291
- "auth:project:hardis:configure",
11292
- "auth:project:configure:hardis",
11293
- "hardis:auth:configure:project",
11294
- "auth:hardis:configure:project",
11295
- "auth:configure:hardis:project",
11296
- "auth:configure:project:hardis"
11491
+ "hardis:project:fix:profiletabs",
11492
+ "project:hardis:fix:profiletabs",
11493
+ "project:fix:hardis:profiletabs",
11494
+ "project:fix:profiletabs:hardis",
11495
+ "hardis:fix:project:profiletabs",
11496
+ "fix:hardis:project:profiletabs",
11497
+ "fix:project:hardis:profiletabs",
11498
+ "fix:project:profiletabs:hardis",
11499
+ "hardis:fix:profiletabs:project",
11500
+ "fix:hardis:profiletabs:project",
11501
+ "fix:profiletabs:hardis:project",
11502
+ "fix:profiletabs:project:hardis",
11503
+ "hardis:project:profiletabs:fix",
11504
+ "project:hardis:profiletabs:fix",
11505
+ "project:profiletabs:hardis:fix",
11506
+ "project:profiletabs:fix:hardis",
11507
+ "hardis:profiletabs:project:fix",
11508
+ "profiletabs:hardis:project:fix",
11509
+ "profiletabs:project:hardis:fix",
11510
+ "profiletabs:project:fix:hardis",
11511
+ "hardis:profiletabs:fix:project",
11512
+ "profiletabs:hardis:fix:project",
11513
+ "profiletabs:fix:hardis:project",
11514
+ "profiletabs:fix:project:hardis"
11297
11515
  ]
11298
11516
  },
11299
- "hardis:project:convert:profilestopermsets": {
11517
+ "hardis:project:fix:v53flexipages": {
11300
11518
  "aliases": [],
11301
11519
  "args": {},
11302
- "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",
11520
+ "description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
11303
11521
  "examples": [
11304
- "$ sf hardis:project:convert:profilestopermsets"
11522
+ "$ sf hardis:project:fix:v53flexipages"
11305
11523
  ],
11306
11524
  "flags": {
11307
11525
  "json": {
@@ -11319,13 +11537,13 @@
11319
11537
  "multiple": false,
11320
11538
  "type": "option"
11321
11539
  },
11322
- "except": {
11323
- "char": "e",
11324
- "description": "List of filters",
11325
- "name": "except",
11326
- "default": [],
11540
+ "path": {
11541
+ "char": "p",
11542
+ "description": "Root folder",
11543
+ "name": "path",
11544
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11327
11545
  "hasDynamicHelp": false,
11328
- "multiple": true,
11546
+ "multiple": false,
11329
11547
  "type": "option"
11330
11548
  },
11331
11549
  "debug": {
@@ -11351,52 +11569,49 @@
11351
11569
  },
11352
11570
  "hasDynamicHelp": false,
11353
11571
  "hiddenAliases": [],
11354
- "id": "hardis:project:convert:profilestopermsets",
11572
+ "id": "hardis:project:fix:v53flexipages",
11355
11573
  "pluginAlias": "sfdx-hardis",
11356
11574
  "pluginName": "sfdx-hardis",
11357
11575
  "pluginType": "core",
11358
11576
  "strict": true,
11359
11577
  "enableJsonFlag": true,
11360
- "title": "Convert Profiles into Permission Sets",
11578
+ "title": "Fix flexipages for v53",
11361
11579
  "requiresProject": true,
11362
- "requiresSfdxPlugins": [
11363
- "shane-sfdx-plugins"
11364
- ],
11365
11580
  "isESM": true,
11366
11581
  "relativePath": [
11367
11582
  "lib",
11368
11583
  "commands",
11369
11584
  "hardis",
11370
11585
  "project",
11371
- "convert",
11372
- "profilestopermsets.js"
11586
+ "fix",
11587
+ "v53flexipages.js"
11373
11588
  ],
11374
11589
  "aliasPermutations": [],
11375
11590
  "permutations": [
11376
- "hardis:project:convert:profilestopermsets",
11377
- "project:hardis:convert:profilestopermsets",
11378
- "project:convert:hardis:profilestopermsets",
11379
- "project:convert:profilestopermsets:hardis",
11380
- "hardis:convert:project:profilestopermsets",
11381
- "convert:hardis:project:profilestopermsets",
11382
- "convert:project:hardis:profilestopermsets",
11383
- "convert:project:profilestopermsets:hardis",
11384
- "hardis:convert:profilestopermsets:project",
11385
- "convert:hardis:profilestopermsets:project",
11386
- "convert:profilestopermsets:hardis:project",
11387
- "convert:profilestopermsets:project:hardis",
11388
- "hardis:project:profilestopermsets:convert",
11389
- "project:hardis:profilestopermsets:convert",
11390
- "project:profilestopermsets:hardis:convert",
11391
- "project:profilestopermsets:convert:hardis",
11392
- "hardis:profilestopermsets:project:convert",
11393
- "profilestopermsets:hardis:project:convert",
11394
- "profilestopermsets:project:hardis:convert",
11395
- "profilestopermsets:project:convert:hardis",
11396
- "hardis:profilestopermsets:convert:project",
11397
- "profilestopermsets:hardis:convert:project",
11398
- "profilestopermsets:convert:hardis:project",
11399
- "profilestopermsets:convert:project:hardis"
11591
+ "hardis:project:fix:v53flexipages",
11592
+ "project:hardis:fix:v53flexipages",
11593
+ "project:fix:hardis:v53flexipages",
11594
+ "project:fix:v53flexipages:hardis",
11595
+ "hardis:fix:project:v53flexipages",
11596
+ "fix:hardis:project:v53flexipages",
11597
+ "fix:project:hardis:v53flexipages",
11598
+ "fix:project:v53flexipages:hardis",
11599
+ "hardis:fix:v53flexipages:project",
11600
+ "fix:hardis:v53flexipages:project",
11601
+ "fix:v53flexipages:hardis:project",
11602
+ "fix:v53flexipages:project:hardis",
11603
+ "hardis:project:v53flexipages:fix",
11604
+ "project:hardis:v53flexipages:fix",
11605
+ "project:v53flexipages:hardis:fix",
11606
+ "project:v53flexipages:fix:hardis",
11607
+ "hardis:v53flexipages:project:fix",
11608
+ "v53flexipages:hardis:project:fix",
11609
+ "v53flexipages:project:hardis:fix",
11610
+ "v53flexipages:project:fix:hardis",
11611
+ "hardis:v53flexipages:fix:project",
11612
+ "v53flexipages:hardis:fix:project",
11613
+ "v53flexipages:fix:hardis:project",
11614
+ "v53flexipages:fix:project:hardis"
11400
11615
  ]
11401
11616
  },
11402
11617
  "hardis:project:deploy:notify": {
@@ -12574,221 +12789,6 @@
12574
12789
  "validate:deploy:project:hardis"
12575
12790
  ]
12576
12791
  },
12577
- "hardis:project:fix:profiletabs": {
12578
- "aliases": [],
12579
- "args": {},
12580
- "description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
12581
- "examples": [
12582
- "$ sf hardis:project:fix:profiletabs"
12583
- ],
12584
- "flags": {
12585
- "json": {
12586
- "description": "Format output as json.",
12587
- "helpGroup": "GLOBAL",
12588
- "name": "json",
12589
- "allowNo": false,
12590
- "type": "boolean"
12591
- },
12592
- "flags-dir": {
12593
- "helpGroup": "GLOBAL",
12594
- "name": "flags-dir",
12595
- "summary": "Import flag values from a directory.",
12596
- "hasDynamicHelp": false,
12597
- "multiple": false,
12598
- "type": "option"
12599
- },
12600
- "path": {
12601
- "char": "p",
12602
- "description": "Root folder",
12603
- "name": "path",
12604
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12605
- "hasDynamicHelp": false,
12606
- "multiple": false,
12607
- "type": "option"
12608
- },
12609
- "debug": {
12610
- "char": "d",
12611
- "description": "Activate debug mode (more logs)",
12612
- "name": "debug",
12613
- "allowNo": false,
12614
- "type": "boolean"
12615
- },
12616
- "websocket": {
12617
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12618
- "name": "websocket",
12619
- "hasDynamicHelp": false,
12620
- "multiple": false,
12621
- "type": "option"
12622
- },
12623
- "skipauth": {
12624
- "description": "Skip authentication check when a default username is required",
12625
- "name": "skipauth",
12626
- "allowNo": false,
12627
- "type": "boolean"
12628
- },
12629
- "target-org": {
12630
- "aliases": [
12631
- "targetusername",
12632
- "u"
12633
- ],
12634
- "char": "o",
12635
- "deprecateAliases": true,
12636
- "name": "target-org",
12637
- "noCacheDefault": true,
12638
- "required": true,
12639
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
12640
- "hasDynamicHelp": true,
12641
- "multiple": false,
12642
- "type": "option"
12643
- }
12644
- },
12645
- "hasDynamicHelp": true,
12646
- "hiddenAliases": [],
12647
- "id": "hardis:project:fix:profiletabs",
12648
- "pluginAlias": "sfdx-hardis",
12649
- "pluginName": "sfdx-hardis",
12650
- "pluginType": "core",
12651
- "strict": true,
12652
- "enableJsonFlag": true,
12653
- "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
12654
- "requiresProject": true,
12655
- "isESM": true,
12656
- "relativePath": [
12657
- "lib",
12658
- "commands",
12659
- "hardis",
12660
- "project",
12661
- "fix",
12662
- "profiletabs.js"
12663
- ],
12664
- "aliasPermutations": [],
12665
- "permutations": [
12666
- "hardis:project:fix:profiletabs",
12667
- "project:hardis:fix:profiletabs",
12668
- "project:fix:hardis:profiletabs",
12669
- "project:fix:profiletabs:hardis",
12670
- "hardis:fix:project:profiletabs",
12671
- "fix:hardis:project:profiletabs",
12672
- "fix:project:hardis:profiletabs",
12673
- "fix:project:profiletabs:hardis",
12674
- "hardis:fix:profiletabs:project",
12675
- "fix:hardis:profiletabs:project",
12676
- "fix:profiletabs:hardis:project",
12677
- "fix:profiletabs:project:hardis",
12678
- "hardis:project:profiletabs:fix",
12679
- "project:hardis:profiletabs:fix",
12680
- "project:profiletabs:hardis:fix",
12681
- "project:profiletabs:fix:hardis",
12682
- "hardis:profiletabs:project:fix",
12683
- "profiletabs:hardis:project:fix",
12684
- "profiletabs:project:hardis:fix",
12685
- "profiletabs:project:fix:hardis",
12686
- "hardis:profiletabs:fix:project",
12687
- "profiletabs:hardis:fix:project",
12688
- "profiletabs:fix:hardis:project",
12689
- "profiletabs:fix:project:hardis"
12690
- ]
12691
- },
12692
- "hardis:project:fix:v53flexipages": {
12693
- "aliases": [],
12694
- "args": {},
12695
- "description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
12696
- "examples": [
12697
- "$ sf hardis:project:fix:v53flexipages"
12698
- ],
12699
- "flags": {
12700
- "json": {
12701
- "description": "Format output as json.",
12702
- "helpGroup": "GLOBAL",
12703
- "name": "json",
12704
- "allowNo": false,
12705
- "type": "boolean"
12706
- },
12707
- "flags-dir": {
12708
- "helpGroup": "GLOBAL",
12709
- "name": "flags-dir",
12710
- "summary": "Import flag values from a directory.",
12711
- "hasDynamicHelp": false,
12712
- "multiple": false,
12713
- "type": "option"
12714
- },
12715
- "path": {
12716
- "char": "p",
12717
- "description": "Root folder",
12718
- "name": "path",
12719
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12720
- "hasDynamicHelp": false,
12721
- "multiple": false,
12722
- "type": "option"
12723
- },
12724
- "debug": {
12725
- "char": "d",
12726
- "description": "Activate debug mode (more logs)",
12727
- "name": "debug",
12728
- "allowNo": false,
12729
- "type": "boolean"
12730
- },
12731
- "websocket": {
12732
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12733
- "name": "websocket",
12734
- "hasDynamicHelp": false,
12735
- "multiple": false,
12736
- "type": "option"
12737
- },
12738
- "skipauth": {
12739
- "description": "Skip authentication check when a default username is required",
12740
- "name": "skipauth",
12741
- "allowNo": false,
12742
- "type": "boolean"
12743
- }
12744
- },
12745
- "hasDynamicHelp": false,
12746
- "hiddenAliases": [],
12747
- "id": "hardis:project:fix:v53flexipages",
12748
- "pluginAlias": "sfdx-hardis",
12749
- "pluginName": "sfdx-hardis",
12750
- "pluginType": "core",
12751
- "strict": true,
12752
- "enableJsonFlag": true,
12753
- "title": "Fix flexipages for v53",
12754
- "requiresProject": true,
12755
- "isESM": true,
12756
- "relativePath": [
12757
- "lib",
12758
- "commands",
12759
- "hardis",
12760
- "project",
12761
- "fix",
12762
- "v53flexipages.js"
12763
- ],
12764
- "aliasPermutations": [],
12765
- "permutations": [
12766
- "hardis:project:fix:v53flexipages",
12767
- "project:hardis:fix:v53flexipages",
12768
- "project:fix:hardis:v53flexipages",
12769
- "project:fix:v53flexipages:hardis",
12770
- "hardis:fix:project:v53flexipages",
12771
- "fix:hardis:project:v53flexipages",
12772
- "fix:project:hardis:v53flexipages",
12773
- "fix:project:v53flexipages:hardis",
12774
- "hardis:fix:v53flexipages:project",
12775
- "fix:hardis:v53flexipages:project",
12776
- "fix:v53flexipages:hardis:project",
12777
- "fix:v53flexipages:project:hardis",
12778
- "hardis:project:v53flexipages:fix",
12779
- "project:hardis:v53flexipages:fix",
12780
- "project:v53flexipages:hardis:fix",
12781
- "project:v53flexipages:fix:hardis",
12782
- "hardis:v53flexipages:project:fix",
12783
- "v53flexipages:hardis:project:fix",
12784
- "v53flexipages:project:hardis:fix",
12785
- "v53flexipages:project:fix:hardis",
12786
- "hardis:v53flexipages:fix:project",
12787
- "v53flexipages:hardis:fix:project",
12788
- "v53flexipages:fix:hardis:project",
12789
- "v53flexipages:fix:project:hardis"
12790
- ]
12791
- },
12792
12792
  "hardis:project:generate:bypass": {
12793
12793
  "aliases": [],
12794
12794
  "args": {},
@@ -15271,5 +15271,5 @@
15271
15271
  ]
15272
15272
  }
15273
15273
  },
15274
- "version": "6.3.2"
15274
+ "version": "6.3.4-beta202509081032.0"
15275
15275
  }