sfdx-hardis 6.3.1 → 6.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,12 +57,13 @@
57
57
  "world:hello"
58
58
  ]
59
59
  },
60
- "hardis:cache:clear": {
60
+ "hardis:auth:login": {
61
61
  "aliases": [],
62
62
  "args": {},
63
- "description": "\n## Command Behavior\n\n**Clears the local cache generated by the sfdx-hardis plugin.**\n\nThis command is designed to remove temporary files, stored configurations, and other cached data that sfdx-hardis uses to optimize its operations. Clearing the cache can be beneficial for:\n\n- **Troubleshooting:** Resolving unexpected behavior or inconsistencies.\n- **Disk Space Management:** Freeing up storage on your local machine.\n- **Ensuring Fresh Data:** Guaranteeing that the plugin operates with the most current data and configurations.\n\n## Technical explanations\n\nThe command's technical implementation is straightforward:\n\n- **Direct Function Call:** It directly invokes the `clearCache()` function, which is imported from \buri../../../common/cache/index.js\buri.\n- **Cache Management Logic:** The \buriclearCache()` function encapsulates the logic for identifying and removing the specific files and directories that constitute the sfdx-hardis cache.\n",
63
+ "description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
64
64
  "examples": [
65
- "$ sf hardis:cache:clear"
65
+ "$ sf hardis:auth:login",
66
+ "CI=true sf hardis:auth:login"
66
67
  ],
67
68
  "flags": {
68
69
  "json": {
@@ -80,6 +81,28 @@
80
81
  "multiple": false,
81
82
  "type": "option"
82
83
  },
84
+ "instanceurl": {
85
+ "char": "r",
86
+ "description": "URL of org instance",
87
+ "name": "instanceurl",
88
+ "hasDynamicHelp": false,
89
+ "multiple": false,
90
+ "type": "option"
91
+ },
92
+ "devhub": {
93
+ "char": "h",
94
+ "description": "Also connect associated DevHub",
95
+ "name": "devhub",
96
+ "allowNo": false,
97
+ "type": "boolean"
98
+ },
99
+ "scratchorg": {
100
+ "char": "s",
101
+ "description": "Scratch org",
102
+ "name": "scratchorg",
103
+ "allowNo": false,
104
+ "type": "boolean"
105
+ },
83
106
  "debug": {
84
107
  "char": "d",
85
108
  "description": "Activate debug mode (more logs)",
@@ -103,42 +126,38 @@
103
126
  },
104
127
  "hasDynamicHelp": false,
105
128
  "hiddenAliases": [],
106
- "id": "hardis:cache:clear",
129
+ "id": "hardis:auth:login",
107
130
  "pluginAlias": "sfdx-hardis",
108
131
  "pluginName": "sfdx-hardis",
109
132
  "pluginType": "core",
110
133
  "strict": true,
111
134
  "enableJsonFlag": true,
112
- "title": "Clear sfdx-hardis cache",
113
- "uiConfig": {
114
- "hide": true
115
- },
135
+ "title": "Login",
116
136
  "requiresProject": false,
117
137
  "isESM": true,
118
138
  "relativePath": [
119
139
  "lib",
120
140
  "commands",
121
141
  "hardis",
122
- "cache",
123
- "clear.js"
142
+ "auth",
143
+ "login.js"
124
144
  ],
125
145
  "aliasPermutations": [],
126
146
  "permutations": [
127
- "hardis:cache:clear",
128
- "cache:hardis:clear",
129
- "cache:clear:hardis",
130
- "hardis:clear:cache",
131
- "clear:hardis:cache",
132
- "clear:cache:hardis"
147
+ "hardis:auth:login",
148
+ "auth:hardis:login",
149
+ "auth:login:hardis",
150
+ "hardis:login:auth",
151
+ "login:hardis:auth",
152
+ "login:auth:hardis"
133
153
  ]
134
154
  },
135
- "hardis:auth:login": {
155
+ "hardis:cache:clear": {
136
156
  "aliases": [],
137
157
  "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",
158
+ "description": "\n## Command Behavior\n\n**Clears the local cache generated by the sfdx-hardis plugin.**\n\nThis command is designed to remove temporary files, stored configurations, and other cached data that sfdx-hardis uses to optimize its operations. Clearing the cache can be beneficial for:\n\n- **Troubleshooting:** Resolving unexpected behavior or inconsistencies.\n- **Disk Space Management:** Freeing up storage on your local machine.\n- **Ensuring Fresh Data:** Guaranteeing that the plugin operates with the most current data and configurations.\n\n## Technical explanations\n\nThe command's technical implementation is straightforward:\n\n- **Direct Function Call:** It directly invokes the `clearCache()` function, which is imported from \buri../../../common/cache/index.js\buri.\n- **Cache Management Logic:** The \buriclearCache()` function encapsulates the logic for identifying and removing the specific files and directories that constitute the sfdx-hardis cache.\n",
139
159
  "examples": [
140
- "$ sf hardis:auth:login",
141
- "CI=true sf hardis:auth:login"
160
+ "$ sf hardis:cache:clear"
142
161
  ],
143
162
  "flags": {
144
163
  "json": {
@@ -156,28 +175,6 @@
156
175
  "multiple": false,
157
176
  "type": "option"
158
177
  },
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
178
  "debug": {
182
179
  "char": "d",
183
180
  "description": "Activate debug mode (more logs)",
@@ -201,30 +198,33 @@
201
198
  },
202
199
  "hasDynamicHelp": false,
203
200
  "hiddenAliases": [],
204
- "id": "hardis:auth:login",
201
+ "id": "hardis:cache:clear",
205
202
  "pluginAlias": "sfdx-hardis",
206
203
  "pluginName": "sfdx-hardis",
207
204
  "pluginType": "core",
208
205
  "strict": true,
209
206
  "enableJsonFlag": true,
210
- "title": "Login",
207
+ "title": "Clear sfdx-hardis cache",
208
+ "uiConfig": {
209
+ "hide": true
210
+ },
211
211
  "requiresProject": false,
212
212
  "isESM": true,
213
213
  "relativePath": [
214
214
  "lib",
215
215
  "commands",
216
216
  "hardis",
217
- "auth",
218
- "login.js"
217
+ "cache",
218
+ "clear.js"
219
219
  ],
220
220
  "aliasPermutations": [],
221
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"
222
+ "hardis:cache:clear",
223
+ "cache:hardis:clear",
224
+ "cache:clear:hardis",
225
+ "hardis:clear:cache",
226
+ "clear:hardis:cache",
227
+ "clear:cache:hardis"
228
228
  ]
229
229
  },
230
230
  "hardis:config:get": {
@@ -5800,121 +5800,6 @@
5800
5800
  "import:files:org:hardis"
5801
5801
  ]
5802
5802
  },
5803
- "hardis:org:fix:listviewmine": {
5804
- "aliases": [],
5805
- "args": {},
5806
- "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",
5807
- "examples": [
5808
- "$ sf hardis:org:fix:listviewmine",
5809
- "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
5810
- ],
5811
- "flags": {
5812
- "json": {
5813
- "description": "Format output as json.",
5814
- "helpGroup": "GLOBAL",
5815
- "name": "json",
5816
- "allowNo": false,
5817
- "type": "boolean"
5818
- },
5819
- "flags-dir": {
5820
- "helpGroup": "GLOBAL",
5821
- "name": "flags-dir",
5822
- "summary": "Import flag values from a directory.",
5823
- "hasDynamicHelp": false,
5824
- "multiple": false,
5825
- "type": "option"
5826
- },
5827
- "listviews": {
5828
- "char": "l",
5829
- "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
5830
- "name": "listviews",
5831
- "hasDynamicHelp": false,
5832
- "multiple": false,
5833
- "type": "option"
5834
- },
5835
- "debug": {
5836
- "char": "d",
5837
- "description": "Activate debug mode (more logs)",
5838
- "name": "debug",
5839
- "allowNo": false,
5840
- "type": "boolean"
5841
- },
5842
- "websocket": {
5843
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5844
- "name": "websocket",
5845
- "hasDynamicHelp": false,
5846
- "multiple": false,
5847
- "type": "option"
5848
- },
5849
- "skipauth": {
5850
- "description": "Skip authentication check when a default username is required",
5851
- "name": "skipauth",
5852
- "allowNo": false,
5853
- "type": "boolean"
5854
- },
5855
- "target-org": {
5856
- "aliases": [
5857
- "targetusername",
5858
- "u"
5859
- ],
5860
- "char": "o",
5861
- "deprecateAliases": true,
5862
- "name": "target-org",
5863
- "noCacheDefault": true,
5864
- "required": true,
5865
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
5866
- "hasDynamicHelp": true,
5867
- "multiple": false,
5868
- "type": "option"
5869
- }
5870
- },
5871
- "hasDynamicHelp": true,
5872
- "hiddenAliases": [],
5873
- "id": "hardis:org:fix:listviewmine",
5874
- "pluginAlias": "sfdx-hardis",
5875
- "pluginName": "sfdx-hardis",
5876
- "pluginType": "core",
5877
- "strict": true,
5878
- "enableJsonFlag": true,
5879
- "title": "Fix listviews with ",
5880
- "requiresProject": true,
5881
- "isESM": true,
5882
- "relativePath": [
5883
- "lib",
5884
- "commands",
5885
- "hardis",
5886
- "org",
5887
- "fix",
5888
- "listviewmine.js"
5889
- ],
5890
- "aliasPermutations": [],
5891
- "permutations": [
5892
- "hardis:org:fix:listviewmine",
5893
- "org:hardis:fix:listviewmine",
5894
- "org:fix:hardis:listviewmine",
5895
- "org:fix:listviewmine:hardis",
5896
- "hardis:fix:org:listviewmine",
5897
- "fix:hardis:org:listviewmine",
5898
- "fix:org:hardis:listviewmine",
5899
- "fix:org:listviewmine:hardis",
5900
- "hardis:fix:listviewmine:org",
5901
- "fix:hardis:listviewmine:org",
5902
- "fix:listviewmine:hardis:org",
5903
- "fix:listviewmine:org:hardis",
5904
- "hardis:org:listviewmine:fix",
5905
- "org:hardis:listviewmine:fix",
5906
- "org:listviewmine:hardis:fix",
5907
- "org:listviewmine:fix:hardis",
5908
- "hardis:listviewmine:org:fix",
5909
- "listviewmine:hardis:org:fix",
5910
- "listviewmine:org:hardis:fix",
5911
- "listviewmine:org:fix:hardis",
5912
- "hardis:listviewmine:fix:org",
5913
- "listviewmine:hardis:fix:org",
5914
- "listviewmine:fix:hardis:org",
5915
- "listviewmine:fix:org:hardis"
5916
- ]
5917
- },
5918
5803
  "hardis:org:diagnose:audittrail": {
5919
5804
  "aliases": [],
5920
5805
  "args": {},
@@ -6527,7 +6412,7 @@
6527
6412
  "hardis:org:diagnose:unsecure-connected-apps": {
6528
6413
  "aliases": [],
6529
6414
  "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",
6415
+ "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
6416
  "examples": [
6532
6417
  "$ sf hardis:org:diagnose:unsecure-connected-apps"
6533
6418
  ],
@@ -7178,14 +7063,13 @@
7178
7063
  "unusedusers:diagnose:org:hardis"
7179
7064
  ]
7180
7065
  },
7181
- "hardis:org:generate:packagexmlfull": {
7066
+ "hardis:org:fix:listviewmine": {
7182
7067
  "aliases": [],
7183
7068
  "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",
7069
+ "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",
7185
7070
  "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"
7071
+ "$ sf hardis:org:fix:listviewmine",
7072
+ "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
7189
7073
  ],
7190
7074
  "flags": {
7191
7075
  "json": {
@@ -7203,9 +7087,10 @@
7203
7087
  "multiple": false,
7204
7088
  "type": "option"
7205
7089
  },
7206
- "outputfile": {
7207
- "description": "Output package.xml file",
7208
- "name": "outputfile",
7090
+ "listviews": {
7091
+ "char": "l",
7092
+ "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
7093
+ "name": "listviews",
7209
7094
  "hasDynamicHelp": false,
7210
7095
  "multiple": false,
7211
7096
  "type": "option"
@@ -7217,13 +7102,6 @@
7217
7102
  "allowNo": false,
7218
7103
  "type": "boolean"
7219
7104
  },
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
7105
  "websocket": {
7228
7106
  "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
7229
7107
  "name": "websocket",
@@ -7255,29 +7133,151 @@
7255
7133
  },
7256
7134
  "hasDynamicHelp": true,
7257
7135
  "hiddenAliases": [],
7258
- "id": "hardis:org:generate:packagexmlfull",
7136
+ "id": "hardis:org:fix:listviewmine",
7259
7137
  "pluginAlias": "sfdx-hardis",
7260
7138
  "pluginName": "sfdx-hardis",
7261
7139
  "pluginType": "core",
7262
7140
  "strict": true,
7263
7141
  "enableJsonFlag": true,
7264
- "title": "Generate Full Org package.xml",
7265
- "requiresProject": false,
7142
+ "title": "Fix listviews with ",
7143
+ "requiresProject": true,
7266
7144
  "isESM": true,
7267
7145
  "relativePath": [
7268
7146
  "lib",
7269
7147
  "commands",
7270
7148
  "hardis",
7271
7149
  "org",
7272
- "generate",
7273
- "packagexmlfull.js"
7150
+ "fix",
7151
+ "listviewmine.js"
7274
7152
  ],
7275
7153
  "aliasPermutations": [],
7276
7154
  "permutations": [
7277
- "hardis:org:generate:packagexmlfull",
7278
- "org:hardis:generate:packagexmlfull",
7279
- "org:generate:hardis:packagexmlfull",
7280
- "org:generate:packagexmlfull:hardis",
7155
+ "hardis:org:fix:listviewmine",
7156
+ "org:hardis:fix:listviewmine",
7157
+ "org:fix:hardis:listviewmine",
7158
+ "org:fix:listviewmine:hardis",
7159
+ "hardis:fix:org:listviewmine",
7160
+ "fix:hardis:org:listviewmine",
7161
+ "fix:org:hardis:listviewmine",
7162
+ "fix:org:listviewmine:hardis",
7163
+ "hardis:fix:listviewmine:org",
7164
+ "fix:hardis:listviewmine:org",
7165
+ "fix:listviewmine:hardis:org",
7166
+ "fix:listviewmine:org:hardis",
7167
+ "hardis:org:listviewmine:fix",
7168
+ "org:hardis:listviewmine:fix",
7169
+ "org:listviewmine:hardis:fix",
7170
+ "org:listviewmine:fix:hardis",
7171
+ "hardis:listviewmine:org:fix",
7172
+ "listviewmine:hardis:org:fix",
7173
+ "listviewmine:org:hardis:fix",
7174
+ "listviewmine:org:fix:hardis",
7175
+ "hardis:listviewmine:fix:org",
7176
+ "listviewmine:hardis:fix:org",
7177
+ "listviewmine:fix:hardis:org",
7178
+ "listviewmine:fix:org:hardis"
7179
+ ]
7180
+ },
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
7281
  "hardis:generate:org:packagexmlfull",
7282
7282
  "generate:hardis:org:packagexmlfull",
7283
7283
  "generate:org:hardis:packagexmlfull",
@@ -7303,7 +7303,7 @@
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",
@@ -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,62 +9731,193 @@
9733
9731
  "name": "skipauth",
9734
9732
  "allowNo": false,
9735
9733
  "type": "boolean"
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"
9736
9762
  }
9737
9763
  },
9738
- "hasDynamicHelp": false,
9764
+ "hasDynamicHelp": true,
9739
9765
  "hiddenAliases": [],
9740
- "id": "hardis:project:clean:emptyitems",
9766
+ "id": "hardis:project:configure:auth",
9741
9767
  "pluginAlias": "sfdx-hardis",
9742
9768
  "pluginName": "sfdx-hardis",
9743
9769
  "pluginType": "core",
9744
9770
  "strict": true,
9745
9771
  "enableJsonFlag": true,
9746
- "title": "Clean retrieved empty items in dx sources",
9747
- "requiresProject": true,
9772
+ "title": "Configure authentication",
9773
+ "requiresProject": false,
9774
+ "requiresDependencies": [
9775
+ "openssl"
9776
+ ],
9748
9777
  "isESM": true,
9749
9778
  "relativePath": [
9750
9779
  "lib",
9751
9780
  "commands",
9752
9781
  "hardis",
9753
9782
  "project",
9754
- "clean",
9755
- "emptyitems.js"
9783
+ "configure",
9784
+ "auth.js"
9756
9785
  ],
9757
9786
  "aliasPermutations": [],
9758
9787
  "permutations": [
9759
- "hardis:project:clean:emptyitems",
9760
- "project:hardis:clean:emptyitems",
9761
- "project:clean:hardis:emptyitems",
9762
- "project:clean:emptyitems:hardis",
9763
- "hardis:clean:project:emptyitems",
9764
- "clean:hardis:project:emptyitems",
9765
- "clean:project:hardis:emptyitems",
9766
- "clean:project:emptyitems:hardis",
9767
- "hardis:clean:emptyitems:project",
9768
- "clean:hardis:emptyitems:project",
9769
- "clean:emptyitems:hardis:project",
9770
- "clean:emptyitems:project:hardis",
9771
- "hardis:project:emptyitems:clean",
9772
- "project:hardis:emptyitems:clean",
9773
- "project:emptyitems:hardis:clean",
9774
- "project:emptyitems:clean:hardis",
9775
- "hardis:emptyitems:project:clean",
9776
- "emptyitems:hardis:project:clean",
9777
- "emptyitems:project:hardis:clean",
9778
- "emptyitems:project:clean:hardis",
9779
- "hardis:emptyitems:clean:project",
9780
- "emptyitems:hardis:clean:project",
9781
- "emptyitems:clean:hardis:project",
9782
- "emptyitems:clean:project:hardis"
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"
9783
9812
  ]
9784
9813
  },
9785
- "hardis:project:clean:filter-xml-content": {
9814
+ "hardis:project:clean:emptyitems": {
9786
9815
  "aliases": [],
9787
9816
  "args": {},
9788
- "description": "\n## Command Behavior\n\n**Filters the content of Salesforce metadata XML files to remove specific elements, enabling more granular deployments.**\n\nThis command addresses a common challenge in Salesforce development: deploying only a subset of metadata from an XML file when the target org might not support all elements or when certain elements are not desired. It allows you to define rules in a JSON configuration file to remove unwanted XML nodes.\n\nKey functionalities:\n\n- **Configurable Filtering:** Uses a JSON configuration file (e.g., `filter-config.json`) to define which XML elements to remove. This configuration specifies the XML tags to target and the values within those tags that should trigger removal.\n- **Targeted File Processing:** Processes XML files within a specified input folder (defaults to current directory) and writes the filtered content to an output folder.\n- **Example Use Cases:** Useful for scenarios like:\n - Removing references to features not enabled in the target org.\n - Stripping out specific profile permissions or field-level security settings.\n - Cleaning up metadata that is not relevant to a particular deployment.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Configuration Loading:** Reads the `filter-config.json` file, which contains an array of `filters`. Each filter defines a `name`, `description`, `folders` (where to apply the filter), `file_extensions`, and an `exclude_list`.\n- **File System Operations:** Copies the input folder to an output folder (if different) to avoid modifying original files directly. It then iterates through the files in the output folder that match the specified file extensions.\n- **XML Parsing and Manipulation:** For each matching XML file:\n - It uses `xml2js.Parser` to parse the XML content into a JavaScript object.\n - It recursively traverses the JavaScript object, applying the `filterElement` function.\n - The `filterElement` function checks for `type_tag` and `identifier_tag` defined in the `exclude_list`. If a match is found and the value is in the `excludeDef.values`, the element is removed from the XML structure.\n - After filtering, it uses `writeXmlFile` to write the modified JavaScript object back to the XML file.\n- **Logging:** Provides detailed logs about the filtering process, including which files are being processed and which elements are being filtered.\n- **Summary Reporting:** Tracks and reports on the files that have been updated due to filtering.\n</details>\n",
9817
+ "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",
9789
9818
  "examples": [
9790
- "sf hardis:project:clean:filter-xml-content -i \"./mdapi_output\"",
9791
- "sf hardis:project:clean:filter-xml-content -i \"retrieveUnpackaged\""
9819
+ "$ sf hardis:project:clean:emptyitems"
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
+ "folder": {
9838
+ "char": "f",
9839
+ "description": "Root folder",
9840
+ "name": "folder",
9841
+ "default": "force-app",
9842
+ "hasDynamicHelp": false,
9843
+ "multiple": false,
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:clean:emptyitems",
9870
+ "pluginAlias": "sfdx-hardis",
9871
+ "pluginName": "sfdx-hardis",
9872
+ "pluginType": "core",
9873
+ "strict": true,
9874
+ "enableJsonFlag": true,
9875
+ "title": "Clean retrieved empty items in dx sources",
9876
+ "requiresProject": true,
9877
+ "isESM": true,
9878
+ "relativePath": [
9879
+ "lib",
9880
+ "commands",
9881
+ "hardis",
9882
+ "project",
9883
+ "clean",
9884
+ "emptyitems.js"
9885
+ ],
9886
+ "aliasPermutations": [],
9887
+ "permutations": [
9888
+ "hardis:project:clean:emptyitems",
9889
+ "project:hardis:clean:emptyitems",
9890
+ "project:clean:hardis:emptyitems",
9891
+ "project:clean:emptyitems:hardis",
9892
+ "hardis:clean:project:emptyitems",
9893
+ "clean:hardis:project:emptyitems",
9894
+ "clean:project:hardis:emptyitems",
9895
+ "clean:project:emptyitems:hardis",
9896
+ "hardis:clean:emptyitems:project",
9897
+ "clean:hardis:emptyitems:project",
9898
+ "clean:emptyitems:hardis:project",
9899
+ "clean:emptyitems:project:hardis",
9900
+ "hardis:project:emptyitems:clean",
9901
+ "project:hardis:emptyitems:clean",
9902
+ "project:emptyitems:hardis:clean",
9903
+ "project:emptyitems:clean:hardis",
9904
+ "hardis:emptyitems:project:clean",
9905
+ "emptyitems:hardis:project:clean",
9906
+ "emptyitems:project:hardis:clean",
9907
+ "emptyitems:project:clean:hardis",
9908
+ "hardis:emptyitems:clean:project",
9909
+ "emptyitems:hardis:clean:project",
9910
+ "emptyitems:clean:hardis:project",
9911
+ "emptyitems:clean:project:hardis"
9912
+ ]
9913
+ },
9914
+ "hardis:project:clean:filter-xml-content": {
9915
+ "aliases": [],
9916
+ "args": {},
9917
+ "description": "\n## Command Behavior\n\n**Filters the content of Salesforce metadata XML files to remove specific elements, enabling more granular deployments.**\n\nThis command addresses a common challenge in Salesforce development: deploying only a subset of metadata from an XML file when the target org might not support all elements or when certain elements are not desired. It allows you to define rules in a JSON configuration file to remove unwanted XML nodes.\n\nKey functionalities:\n\n- **Configurable Filtering:** Uses a JSON configuration file (e.g., `filter-config.json`) to define which XML elements to remove. This configuration specifies the XML tags to target and the values within those tags that should trigger removal.\n- **Targeted File Processing:** Processes XML files within a specified input folder (defaults to current directory) and writes the filtered content to an output folder.\n- **Example Use Cases:** Useful for scenarios like:\n - Removing references to features not enabled in the target org.\n - Stripping out specific profile permissions or field-level security settings.\n - Cleaning up metadata that is not relevant to a particular deployment.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Configuration Loading:** Reads the `filter-config.json` file, which contains an array of `filters`. Each filter defines a `name`, `description`, `folders` (where to apply the filter), `file_extensions`, and an `exclude_list`.\n- **File System Operations:** Copies the input folder to an output folder (if different) to avoid modifying original files directly. It then iterates through the files in the output folder that match the specified file extensions.\n- **XML Parsing and Manipulation:** For each matching XML file:\n - It uses `xml2js.Parser` to parse the XML content into a JavaScript object.\n - It recursively traverses the JavaScript object, applying the `filterElement` function.\n - The `filterElement` function checks for `type_tag` and `identifier_tag` defined in the `exclude_list`. If a match is found and the value is in the `excludeDef.values`, the element is removed from the XML structure.\n - After filtering, it uses `writeXmlFile` to write the modified JavaScript object back to the XML file.\n- **Logging:** Provides detailed logs about the filtering process, including which files are being processed and which elements are being filtered.\n- **Summary Reporting:** Tracks and reports on the files that have been updated due to filtering.\n</details>\n",
9918
+ "examples": [
9919
+ "sf hardis:project:clean:filter-xml-content -i \"./mdapi_output\"",
9920
+ "sf hardis:project:clean:filter-xml-content -i \"retrieveUnpackaged\""
9792
9921
  ],
9793
9922
  "flags": {
9794
9923
  "json": {
@@ -11167,135 +11296,6 @@
11167
11296
  "xml:clean:project:hardis"
11168
11297
  ]
11169
11298
  },
11170
- "hardis:project:configure:auth": {
11171
- "aliases": [],
11172
- "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",
11174
- "examples": [
11175
- "$ sf hardis:project:configure:auth"
11176
- ],
11177
- "flags": {
11178
- "json": {
11179
- "description": "Format output as json.",
11180
- "helpGroup": "GLOBAL",
11181
- "name": "json",
11182
- "allowNo": false,
11183
- "type": "boolean"
11184
- },
11185
- "flags-dir": {
11186
- "helpGroup": "GLOBAL",
11187
- "name": "flags-dir",
11188
- "summary": "Import flag values from a directory.",
11189
- "hasDynamicHelp": false,
11190
- "multiple": false,
11191
- "type": "option"
11192
- },
11193
- "devhub": {
11194
- "char": "b",
11195
- "description": "Configure project DevHub",
11196
- "name": "devhub",
11197
- "allowNo": false,
11198
- "type": "boolean"
11199
- },
11200
- "debug": {
11201
- "char": "d",
11202
- "description": "Activate debug mode (more logs)",
11203
- "name": "debug",
11204
- "allowNo": false,
11205
- "type": "boolean"
11206
- },
11207
- "websocket": {
11208
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11209
- "name": "websocket",
11210
- "hasDynamicHelp": false,
11211
- "multiple": false,
11212
- "type": "option"
11213
- },
11214
- "skipauth": {
11215
- "description": "Skip authentication check when a default username is required",
11216
- "name": "skipauth",
11217
- "allowNo": false,
11218
- "type": "boolean"
11219
- },
11220
- "target-org": {
11221
- "aliases": [
11222
- "targetusername",
11223
- "u"
11224
- ],
11225
- "char": "o",
11226
- "deprecateAliases": true,
11227
- "name": "target-org",
11228
- "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.",
11244
- "hasDynamicHelp": true,
11245
- "multiple": false,
11246
- "type": "option"
11247
- }
11248
- },
11249
- "hasDynamicHelp": true,
11250
- "hiddenAliases": [],
11251
- "id": "hardis:project:configure:auth",
11252
- "pluginAlias": "sfdx-hardis",
11253
- "pluginName": "sfdx-hardis",
11254
- "pluginType": "core",
11255
- "strict": true,
11256
- "enableJsonFlag": true,
11257
- "title": "Configure authentication",
11258
- "requiresProject": false,
11259
- "requiresDependencies": [
11260
- "openssl"
11261
- ],
11262
- "isESM": true,
11263
- "relativePath": [
11264
- "lib",
11265
- "commands",
11266
- "hardis",
11267
- "project",
11268
- "configure",
11269
- "auth.js"
11270
- ],
11271
- "aliasPermutations": [],
11272
- "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"
11297
- ]
11298
- },
11299
11299
  "hardis:project:convert:profilestopermsets": {
11300
11300
  "aliases": [],
11301
11301
  "args": {},
@@ -11399,14 +11399,12 @@
11399
11399
  "profilestopermsets:convert:project:hardis"
11400
11400
  ]
11401
11401
  },
11402
- "hardis:project:deploy:notify": {
11402
+ "hardis:project:fix:profiletabs": {
11403
11403
  "aliases": [],
11404
11404
  "args": {},
11405
- "description": "Post notifications related to:\n\n- **Deployment simulation** _(use with --check-only)_\n\n- **Deployment process** _(to call only if your deployment is successful)_\n\n### Integrations\n\nAccording to the [integrations you configured](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integrations-home/), notifications can contain deployment information and [Flow Visual Git Diff](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-home/#flow-visual-git-diff)\n\n - GitHub, Gitlab, Azure DevOps, Bitbucket comments on Pull Requests (including Flows Visual Git Diff)\n\n - Slack, Microsoft Teams, Email deployment summary after a successful deployment\n\n - JIRA tags and comments on tickets that just has been deployed\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-jira-gitlab.jpg)\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-jira-slack.jpg)\n\n### Flows Visual Git Diff\n\n- Visually show you the differences on a diagram\n\n- Display the update details without having to open any XML !\n\n🟩 = added\n\n🟥 = removed\n\n🟧 = updated\n\n![](https://sfdx-hardis.cloudity.com/assets/images/flow-visual-git-diff.jpg)\n\n![](https://sfdx-hardis.cloudity.com/assets/images/flow-visual-git-diff-2.jpg)\n\n### In custom CI/CD workflow\n\nExample of usage in a custom CI/CD pipeline:\n\n```bash\n# Disable exit-on-error temporarily\nset +e\n\n# Run the deploy command\nsf project deploy start [....]\nRET_CODE=$?\n\n# Re-enable exit-on-error\nset -e\n\n# Determine MYSTATUS based on return code\nif [ $RET_CODE -eq 0 ]; then\n MYSTATUS=\"valid\"\nelse\n MYSTATUS=\"invalid\"\nfi\n\n# Run the notify command with MYSTATUS\nsf hardis:project:deploy:notify --check-only --deploy-status \"$MYSTATUS\"\n```\n\n### Other usages\n\nThis command is for custom SF Cli pipelines, if you are a sfdx-hardis user, it is already embedded in sf hardis:deploy:smart.\n\nYou can also use [sfdx-hardis wrapper commands of SF deployment commands](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-setup/#using-custom-cicd-pipeline)\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",
11406
11406
  "examples": [
11407
- "$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
11408
- "$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
11409
- "$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
11407
+ "$ sf hardis:project:fix:profiletabs"
11410
11408
  ],
11411
11409
  "flags": {
11412
11410
  "json": {
@@ -11424,14 +11422,231 @@
11424
11422
  "multiple": false,
11425
11423
  "type": "option"
11426
11424
  },
11427
- "check-only": {
11428
- "char": "c",
11429
- "description": "Use this option to send notifications from a Deployment simulation job",
11430
- "name": "check-only",
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"
11433
+ },
11434
+ "debug": {
11435
+ "char": "d",
11436
+ "description": "Activate debug mode (more logs)",
11437
+ "name": "debug",
11431
11438
  "allowNo": false,
11432
11439
  "type": "boolean"
11433
11440
  },
11434
- "deploy-status": {
11441
+ "websocket": {
11442
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11443
+ "name": "websocket",
11444
+ "hasDynamicHelp": false,
11445
+ "multiple": false,
11446
+ "type": "option"
11447
+ },
11448
+ "skipauth": {
11449
+ "description": "Skip authentication check when a default username is required",
11450
+ "name": "skipauth",
11451
+ "allowNo": false,
11452
+ "type": "boolean"
11453
+ },
11454
+ "target-org": {
11455
+ "aliases": [
11456
+ "targetusername",
11457
+ "u"
11458
+ ],
11459
+ "char": "o",
11460
+ "deprecateAliases": true,
11461
+ "name": "target-org",
11462
+ "noCacheDefault": true,
11463
+ "required": true,
11464
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
11465
+ "hasDynamicHelp": true,
11466
+ "multiple": false,
11467
+ "type": "option"
11468
+ }
11469
+ },
11470
+ "hasDynamicHelp": true,
11471
+ "hiddenAliases": [],
11472
+ "id": "hardis:project:fix:profiletabs",
11473
+ "pluginAlias": "sfdx-hardis",
11474
+ "pluginName": "sfdx-hardis",
11475
+ "pluginType": "core",
11476
+ "strict": true,
11477
+ "enableJsonFlag": true,
11478
+ "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
11479
+ "requiresProject": true,
11480
+ "isESM": true,
11481
+ "relativePath": [
11482
+ "lib",
11483
+ "commands",
11484
+ "hardis",
11485
+ "project",
11486
+ "fix",
11487
+ "profiletabs.js"
11488
+ ],
11489
+ "aliasPermutations": [],
11490
+ "permutations": [
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"
11515
+ ]
11516
+ },
11517
+ "hardis:project:fix:v53flexipages": {
11518
+ "aliases": [],
11519
+ "args": {},
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",
11521
+ "examples": [
11522
+ "$ sf hardis:project:fix:v53flexipages"
11523
+ ],
11524
+ "flags": {
11525
+ "json": {
11526
+ "description": "Format output as json.",
11527
+ "helpGroup": "GLOBAL",
11528
+ "name": "json",
11529
+ "allowNo": false,
11530
+ "type": "boolean"
11531
+ },
11532
+ "flags-dir": {
11533
+ "helpGroup": "GLOBAL",
11534
+ "name": "flags-dir",
11535
+ "summary": "Import flag values from a directory.",
11536
+ "hasDynamicHelp": false,
11537
+ "multiple": false,
11538
+ "type": "option"
11539
+ },
11540
+ "path": {
11541
+ "char": "p",
11542
+ "description": "Root folder",
11543
+ "name": "path",
11544
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11545
+ "hasDynamicHelp": false,
11546
+ "multiple": false,
11547
+ "type": "option"
11548
+ },
11549
+ "debug": {
11550
+ "char": "d",
11551
+ "description": "Activate debug mode (more logs)",
11552
+ "name": "debug",
11553
+ "allowNo": false,
11554
+ "type": "boolean"
11555
+ },
11556
+ "websocket": {
11557
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11558
+ "name": "websocket",
11559
+ "hasDynamicHelp": false,
11560
+ "multiple": false,
11561
+ "type": "option"
11562
+ },
11563
+ "skipauth": {
11564
+ "description": "Skip authentication check when a default username is required",
11565
+ "name": "skipauth",
11566
+ "allowNo": false,
11567
+ "type": "boolean"
11568
+ }
11569
+ },
11570
+ "hasDynamicHelp": false,
11571
+ "hiddenAliases": [],
11572
+ "id": "hardis:project:fix:v53flexipages",
11573
+ "pluginAlias": "sfdx-hardis",
11574
+ "pluginName": "sfdx-hardis",
11575
+ "pluginType": "core",
11576
+ "strict": true,
11577
+ "enableJsonFlag": true,
11578
+ "title": "Fix flexipages for v53",
11579
+ "requiresProject": true,
11580
+ "isESM": true,
11581
+ "relativePath": [
11582
+ "lib",
11583
+ "commands",
11584
+ "hardis",
11585
+ "project",
11586
+ "fix",
11587
+ "v53flexipages.js"
11588
+ ],
11589
+ "aliasPermutations": [],
11590
+ "permutations": [
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"
11615
+ ]
11616
+ },
11617
+ "hardis:project:deploy:notify": {
11618
+ "aliases": [],
11619
+ "args": {},
11620
+ "description": "Post notifications related to:\n\n- **Deployment simulation** _(use with --check-only)_\n\n- **Deployment process** _(to call only if your deployment is successful)_\n\n### Integrations\n\nAccording to the [integrations you configured](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integrations-home/), notifications can contain deployment information and [Flow Visual Git Diff](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-home/#flow-visual-git-diff)\n\n - GitHub, Gitlab, Azure DevOps, Bitbucket comments on Pull Requests (including Flows Visual Git Diff)\n\n - Slack, Microsoft Teams, Email deployment summary after a successful deployment\n\n - JIRA tags and comments on tickets that just has been deployed\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-jira-gitlab.jpg)\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-jira-slack.jpg)\n\n### Flows Visual Git Diff\n\n- Visually show you the differences on a diagram\n\n- Display the update details without having to open any XML !\n\n🟩 = added\n\n🟥 = removed\n\n🟧 = updated\n\n![](https://sfdx-hardis.cloudity.com/assets/images/flow-visual-git-diff.jpg)\n\n![](https://sfdx-hardis.cloudity.com/assets/images/flow-visual-git-diff-2.jpg)\n\n### In custom CI/CD workflow\n\nExample of usage in a custom CI/CD pipeline:\n\n```bash\n# Disable exit-on-error temporarily\nset +e\n\n# Run the deploy command\nsf project deploy start [....]\nRET_CODE=$?\n\n# Re-enable exit-on-error\nset -e\n\n# Determine MYSTATUS based on return code\nif [ $RET_CODE -eq 0 ]; then\n MYSTATUS=\"valid\"\nelse\n MYSTATUS=\"invalid\"\nfi\n\n# Run the notify command with MYSTATUS\nsf hardis:project:deploy:notify --check-only --deploy-status \"$MYSTATUS\"\n```\n\n### Other usages\n\nThis command is for custom SF Cli pipelines, if you are a sfdx-hardis user, it is already embedded in sf hardis:deploy:smart.\n\nYou can also use [sfdx-hardis wrapper commands of SF deployment commands](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-setup/#using-custom-cicd-pipeline)\n",
11621
+ "examples": [
11622
+ "$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
11623
+ "$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
11624
+ "$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
11625
+ ],
11626
+ "flags": {
11627
+ "json": {
11628
+ "description": "Format output as json.",
11629
+ "helpGroup": "GLOBAL",
11630
+ "name": "json",
11631
+ "allowNo": false,
11632
+ "type": "boolean"
11633
+ },
11634
+ "flags-dir": {
11635
+ "helpGroup": "GLOBAL",
11636
+ "name": "flags-dir",
11637
+ "summary": "Import flag values from a directory.",
11638
+ "hasDynamicHelp": false,
11639
+ "multiple": false,
11640
+ "type": "option"
11641
+ },
11642
+ "check-only": {
11643
+ "char": "c",
11644
+ "description": "Use this option to send notifications from a Deployment simulation job",
11645
+ "name": "check-only",
11646
+ "allowNo": false,
11647
+ "type": "boolean"
11648
+ },
11649
+ "deploy-status": {
11435
11650
  "char": "s",
11436
11651
  "description": "Send success, failure or unknown (default) to indicate if the deployment or deployment simulation is in success or not",
11437
11652
  "name": "deploy-status",
@@ -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.1"
15274
+ "version": "6.3.3"
15275
15275
  }