sfdx-hardis 6.8.0 → 6.8.1

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.
@@ -224,7 +224,7 @@
224
224
  "description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
225
225
  "examples": [
226
226
  "$ sf hardis:auth:login",
227
- "CI=true sf hardis:auth:login"
227
+ "CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
228
228
  ],
229
229
  "flags": {
230
230
  "json": {
@@ -1791,9 +1791,10 @@
1791
1791
  "hardis:misc:servicenow-report": {
1792
1792
  "aliases": [],
1793
1793
  "args": {},
1794
- "description": "This command retrieves user stories from Salesforce and enriches them with data from ServiceNow.\n\nDefine the following environment variables (in CICD variables or locally in a **.env** file):\n\n- SERVICENOW_URL: The base URL of the ServiceNow API (ex: https://your-instance.service-now.com/)\n- SERVICENOW_USERNAME: The username for ServiceNow API authentication.\n- SERVICENOW_PASSWORD: The password for ServiceNow API authentication.\n\nYou also need to define JSON configuration file(e) in folder **config/user-stories/**\n\nExample:\n\n```json\n{\n \"userStoriesConfig\": {\n \"fields\": [\n \"Id\",\n \"Name\",\n \"Ticket_Number__c\",\n \"copado__User_Story_Title__c\",\n \"CreatedBy.Name\",\n \"copado__Release__r.Name\",\n \"copado__Environment__r.Name\"\n ],\n \"table\": \"copado__User_Story__c\",\n \"where\": \"copado__Environment__r.Name ='UAT'\",\n \"whereChoices\": {\n \"UAT all\": \"copado__Environment__r.Name ='UAT'\",\n \"UAT postponed\": \"copado__Environment__r.Name ='UAT' AND copado__Release__r.Name = 'postponed'\",\n \"UAT in progress\": \"copado__Environment__r.Name ='UAT' AND copado__Release__r.Name != 'postponed' AND copado__Release__r.Name != 'cancelled'\"\n },\n \"orderBy\": \"Ticket_Number__c ASC\",\n \"ticketField\": \"Ticket_Number__c\",\n \"reportFields\": [\n { \"key\": \"US Name\", \"path\": \"Name\" },\n { \"key\": \"US SN Identifier\", \"path\": \"Ticket_Number__c\" },\n { \"key\": \"US Title\", \"path\": \"copado__User_Story_Title__c\" },\n { \"key\": \"US Created By\", \"path\": \"CreatedBy.Name\" },\n { \"key\": \"US Environment\", \"path\": \"copado__Environment__r.Name\" },\n { \"key\": \"US Release\", \"path\": \"copado__Release__r.Name\" },\n { \"key\": \"SN Identifier\", \"path\": \"serviceNowInfo.number\", \"default\": \"NOT FOUND\" },\n { \"key\": \"SN Title\", \"path\": \"serviceNowInfo.short_description\", \"default\": \"NOT FOUND\" },\n { \"key\": \"SN Status\", \"path\": \"serviceNowInfo.state\", \"default\": \"NOT FOUND\" },\n { \"key\": \"SN Created By\", \"path\": \"serviceNowInfo.sys_created_by\", \"default\": \"NOT FOUND\" },\n { \"key\": \"SN URL\", \"special\": \"serviceNowTicketUrl\" }\n ]\n },\n \"serviceNowConfig\": {\n \"tables\": [\n { \"tableName\": \"demand\" },\n { \"tableName\": \"incident\" }\n ]\n }\n}\n```\n ",
1794
+ "description": "This command retrieves user stories from Salesforce and enriches them with data from ServiceNow.\n\nDefine the following environment variables (in CICD variables or locally in a **.env** file):\n\n- SERVICENOW_URL: The base URL of the ServiceNow API (ex: https://your-instance.service-now.com/)\n- SERVICENOW_USERNAME: The username for ServiceNow API authentication.\n- SERVICENOW_PASSWORD: The password for ServiceNow API authentication.\n\nYou also need to define JSON configuration file(e) in folder **config/user-stories/**\n\nExample:\n\n```json\n{\n \"userStoriesConfig\": {\n \"fields\": [\n \"Id\",\n \"Name\",\n \"Ticket_Number__c\",\n \"copado__User_Story_Title__c\",\n \"CreatedBy.Name\",\n \"copado__Release__r.Name\",\n \"copado__Environment__r.Name\"\n ],\n \"table\": \"copado__User_Story__c\",\n \"where\": \"copado__Environment__r.Name ='UAT'\",\n \"whereChoices\": {\n \"UAT all\": \"copado__Environment__r.Name ='UAT'\",\n \"UAT postponed\": \"copado__Environment__r.Name ='UAT' AND copado__Release__r.Name = 'postponed'\",\n \"UAT in progress\": \"copado__Environment__r.Name ='UAT' AND copado__Release__r.Name != 'postponed' AND copado__Release__r.Name != 'cancelled'\"\n },\n \"orderBy\": \"Ticket_Number__c ASC\",\n \"ticketField\": \"Ticket_Number__c\",\n \"reportFields\": [\n { \"key\": \"US Name\", \"path\": \"Name\" },\n { \"key\": \"US SN Identifier\", \"path\": \"Ticket_Number__c\" },\n { \"key\": \"US Title\", \"path\": \"copado__User_Story_Title__c\" },\n { \"key\": \"US Created By\", \"path\": \"CreatedBy.Name\" },\n { \"key\": \"US Environment\", \"path\": \"copado__Environment__r.Name\" },\n { \"key\": \"US Release\", \"path\": \"copado__Release__r.Name\" },\n { \"key\": \"SN Identifier\", \"path\": \"serviceNowInfo.number\", \"default\": \"NOT FOUND\" },\n { \"key\": \"SN Title\", \"path\": \"serviceNowInfo.short_description\", \"default\": \"NOT FOUND\" },\n { \"key\": \"SN Status\", \"path\": \"serviceNowInfo.state\", \"default\": \"NOT FOUND\" },\n { \"key\": \"SN Created By\", \"path\": \"serviceNowInfo.sys_created_by\", \"default\": \"NOT FOUND\" },\n { \"key\": \"SN URL\", \"special\": \"serviceNowTicketUrl\" }\n ]\n },\n \"serviceNowConfig\": {\n \"tables\": [\n { \"tableName\": \"dmn_demand\" },\n { \"tableName\": \"incident\" }\n ]\n }\n}\n```\n ",
1795
1795
  "examples": [
1796
- "$ sf hardis:misc:servicenow-report"
1796
+ "$ sf hardis:misc:servicenow-report",
1797
+ "$ sf hardis:misc:servicenow-report --config config/user-stories/my-config.json --where-choice \"UAT all\""
1797
1798
  ],
1798
1799
  "flags": {
1799
1800
  "json": {
@@ -9689,12 +9690,12 @@
9689
9690
  "remotesites:audit:project:hardis"
9690
9691
  ]
9691
9692
  },
9692
- "hardis:project:convert:profilestopermsets": {
9693
+ "hardis:project:configure:auth": {
9693
9694
  "aliases": [],
9694
9695
  "args": {},
9695
- "description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
9696
+ "description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
9696
9697
  "examples": [
9697
- "$ sf hardis:project:convert:profilestopermsets"
9698
+ "$ sf hardis:project:configure:auth"
9698
9699
  ],
9699
9700
  "flags": {
9700
9701
  "json": {
@@ -9712,14 +9713,12 @@
9712
9713
  "multiple": false,
9713
9714
  "type": "option"
9714
9715
  },
9715
- "except": {
9716
- "char": "e",
9717
- "description": "List of filters",
9718
- "name": "except",
9719
- "default": [],
9720
- "hasDynamicHelp": false,
9721
- "multiple": true,
9722
- "type": "option"
9716
+ "devhub": {
9717
+ "char": "b",
9718
+ "description": "Configure project DevHub",
9719
+ "name": "devhub",
9720
+ "allowNo": false,
9721
+ "type": "boolean"
9723
9722
  },
9724
9723
  "debug": {
9725
9724
  "char": "d",
@@ -9740,20 +9739,48 @@
9740
9739
  "name": "skipauth",
9741
9740
  "allowNo": false,
9742
9741
  "type": "boolean"
9742
+ },
9743
+ "target-org": {
9744
+ "aliases": [
9745
+ "targetusername",
9746
+ "u"
9747
+ ],
9748
+ "char": "o",
9749
+ "deprecateAliases": true,
9750
+ "name": "target-org",
9751
+ "noCacheDefault": true,
9752
+ "summary": "Username or alias of the target org.",
9753
+ "hasDynamicHelp": true,
9754
+ "multiple": false,
9755
+ "type": "option"
9756
+ },
9757
+ "target-dev-hub": {
9758
+ "aliases": [
9759
+ "targetdevhubusername"
9760
+ ],
9761
+ "char": "v",
9762
+ "deprecateAliases": true,
9763
+ "name": "target-dev-hub",
9764
+ "noCacheDefault": true,
9765
+ "required": false,
9766
+ "summary": "Username or alias of the Dev Hub org.",
9767
+ "hasDynamicHelp": true,
9768
+ "multiple": false,
9769
+ "type": "option"
9743
9770
  }
9744
9771
  },
9745
- "hasDynamicHelp": false,
9772
+ "hasDynamicHelp": true,
9746
9773
  "hiddenAliases": [],
9747
- "id": "hardis:project:convert:profilestopermsets",
9774
+ "id": "hardis:project:configure:auth",
9748
9775
  "pluginAlias": "sfdx-hardis",
9749
9776
  "pluginName": "sfdx-hardis",
9750
9777
  "pluginType": "core",
9751
9778
  "strict": true,
9752
9779
  "enableJsonFlag": true,
9753
- "title": "Convert Profiles into Permission Sets",
9754
- "requiresProject": true,
9755
- "requiresSfdxPlugins": [
9756
- "shane-sfdx-plugins"
9780
+ "title": "Configure authentication",
9781
+ "requiresProject": false,
9782
+ "requiresDependencies": [
9783
+ "openssl"
9757
9784
  ],
9758
9785
  "isESM": true,
9759
9786
  "relativePath": [
@@ -9761,35 +9788,35 @@
9761
9788
  "commands",
9762
9789
  "hardis",
9763
9790
  "project",
9764
- "convert",
9765
- "profilestopermsets.js"
9791
+ "configure",
9792
+ "auth.js"
9766
9793
  ],
9767
9794
  "aliasPermutations": [],
9768
9795
  "permutations": [
9769
- "hardis:project:convert:profilestopermsets",
9770
- "project:hardis:convert:profilestopermsets",
9771
- "project:convert:hardis:profilestopermsets",
9772
- "project:convert:profilestopermsets:hardis",
9773
- "hardis:convert:project:profilestopermsets",
9774
- "convert:hardis:project:profilestopermsets",
9775
- "convert:project:hardis:profilestopermsets",
9776
- "convert:project:profilestopermsets:hardis",
9777
- "hardis:convert:profilestopermsets:project",
9778
- "convert:hardis:profilestopermsets:project",
9779
- "convert:profilestopermsets:hardis:project",
9780
- "convert:profilestopermsets:project:hardis",
9781
- "hardis:project:profilestopermsets:convert",
9782
- "project:hardis:profilestopermsets:convert",
9783
- "project:profilestopermsets:hardis:convert",
9784
- "project:profilestopermsets:convert:hardis",
9785
- "hardis:profilestopermsets:project:convert",
9786
- "profilestopermsets:hardis:project:convert",
9787
- "profilestopermsets:project:hardis:convert",
9788
- "profilestopermsets:project:convert:hardis",
9789
- "hardis:profilestopermsets:convert:project",
9790
- "profilestopermsets:hardis:convert:project",
9791
- "profilestopermsets:convert:hardis:project",
9792
- "profilestopermsets:convert:project:hardis"
9796
+ "hardis:project:configure:auth",
9797
+ "project:hardis:configure:auth",
9798
+ "project:configure:hardis:auth",
9799
+ "project:configure:auth:hardis",
9800
+ "hardis:configure:project:auth",
9801
+ "configure:hardis:project:auth",
9802
+ "configure:project:hardis:auth",
9803
+ "configure:project:auth:hardis",
9804
+ "hardis:configure:auth:project",
9805
+ "configure:hardis:auth:project",
9806
+ "configure:auth:hardis:project",
9807
+ "configure:auth:project:hardis",
9808
+ "hardis:project:auth:configure",
9809
+ "project:hardis:auth:configure",
9810
+ "project:auth:hardis:configure",
9811
+ "project:auth:configure:hardis",
9812
+ "hardis:auth:project:configure",
9813
+ "auth:hardis:project:configure",
9814
+ "auth:project:hardis:configure",
9815
+ "auth:project:configure:hardis",
9816
+ "hardis:auth:configure:project",
9817
+ "auth:hardis:configure:project",
9818
+ "auth:configure:hardis:project",
9819
+ "auth:configure:project:hardis"
9793
9820
  ]
9794
9821
  },
9795
9822
  "hardis:project:clean:emptyitems": {
@@ -11277,12 +11304,12 @@
11277
11304
  "xml:clean:project:hardis"
11278
11305
  ]
11279
11306
  },
11280
- "hardis:project:configure:auth": {
11307
+ "hardis:project:convert:profilestopermsets": {
11281
11308
  "aliases": [],
11282
11309
  "args": {},
11283
- "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",
11310
+ "description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
11284
11311
  "examples": [
11285
- "$ sf hardis:project:configure:auth"
11312
+ "$ sf hardis:project:convert:profilestopermsets"
11286
11313
  ],
11287
11314
  "flags": {
11288
11315
  "json": {
@@ -11300,12 +11327,14 @@
11300
11327
  "multiple": false,
11301
11328
  "type": "option"
11302
11329
  },
11303
- "devhub": {
11304
- "char": "b",
11305
- "description": "Configure project DevHub",
11306
- "name": "devhub",
11307
- "allowNo": false,
11308
- "type": "boolean"
11330
+ "except": {
11331
+ "char": "e",
11332
+ "description": "List of filters",
11333
+ "name": "except",
11334
+ "default": [],
11335
+ "hasDynamicHelp": false,
11336
+ "multiple": true,
11337
+ "type": "option"
11309
11338
  },
11310
11339
  "debug": {
11311
11340
  "char": "d",
@@ -11326,48 +11355,20 @@
11326
11355
  "name": "skipauth",
11327
11356
  "allowNo": false,
11328
11357
  "type": "boolean"
11329
- },
11330
- "target-org": {
11331
- "aliases": [
11332
- "targetusername",
11333
- "u"
11334
- ],
11335
- "char": "o",
11336
- "deprecateAliases": true,
11337
- "name": "target-org",
11338
- "noCacheDefault": true,
11339
- "summary": "Username or alias of the target org.",
11340
- "hasDynamicHelp": true,
11341
- "multiple": false,
11342
- "type": "option"
11343
- },
11344
- "target-dev-hub": {
11345
- "aliases": [
11346
- "targetdevhubusername"
11347
- ],
11348
- "char": "v",
11349
- "deprecateAliases": true,
11350
- "name": "target-dev-hub",
11351
- "noCacheDefault": true,
11352
- "required": false,
11353
- "summary": "Username or alias of the Dev Hub org.",
11354
- "hasDynamicHelp": true,
11355
- "multiple": false,
11356
- "type": "option"
11357
11358
  }
11358
11359
  },
11359
- "hasDynamicHelp": true,
11360
+ "hasDynamicHelp": false,
11360
11361
  "hiddenAliases": [],
11361
- "id": "hardis:project:configure:auth",
11362
+ "id": "hardis:project:convert:profilestopermsets",
11362
11363
  "pluginAlias": "sfdx-hardis",
11363
11364
  "pluginName": "sfdx-hardis",
11364
11365
  "pluginType": "core",
11365
11366
  "strict": true,
11366
11367
  "enableJsonFlag": true,
11367
- "title": "Configure authentication",
11368
- "requiresProject": false,
11369
- "requiresDependencies": [
11370
- "openssl"
11368
+ "title": "Convert Profiles into Permission Sets",
11369
+ "requiresProject": true,
11370
+ "requiresSfdxPlugins": [
11371
+ "shane-sfdx-plugins"
11371
11372
  ],
11372
11373
  "isESM": true,
11373
11374
  "relativePath": [
@@ -11375,45 +11376,43 @@
11375
11376
  "commands",
11376
11377
  "hardis",
11377
11378
  "project",
11378
- "configure",
11379
- "auth.js"
11379
+ "convert",
11380
+ "profilestopermsets.js"
11380
11381
  ],
11381
11382
  "aliasPermutations": [],
11382
11383
  "permutations": [
11383
- "hardis:project:configure:auth",
11384
- "project:hardis:configure:auth",
11385
- "project:configure:hardis:auth",
11386
- "project:configure:auth:hardis",
11387
- "hardis:configure:project:auth",
11388
- "configure:hardis:project:auth",
11389
- "configure:project:hardis:auth",
11390
- "configure:project:auth:hardis",
11391
- "hardis:configure:auth:project",
11392
- "configure:hardis:auth:project",
11393
- "configure:auth:hardis:project",
11394
- "configure:auth:project:hardis",
11395
- "hardis:project:auth:configure",
11396
- "project:hardis:auth:configure",
11397
- "project:auth:hardis:configure",
11398
- "project:auth:configure:hardis",
11399
- "hardis:auth:project:configure",
11400
- "auth:hardis:project:configure",
11401
- "auth:project:hardis:configure",
11402
- "auth:project:configure:hardis",
11403
- "hardis:auth:configure:project",
11404
- "auth:hardis:configure:project",
11405
- "auth:configure:hardis:project",
11406
- "auth:configure:project:hardis"
11384
+ "hardis:project:convert:profilestopermsets",
11385
+ "project:hardis:convert:profilestopermsets",
11386
+ "project:convert:hardis:profilestopermsets",
11387
+ "project:convert:profilestopermsets:hardis",
11388
+ "hardis:convert:project:profilestopermsets",
11389
+ "convert:hardis:project:profilestopermsets",
11390
+ "convert:project:hardis:profilestopermsets",
11391
+ "convert:project:profilestopermsets:hardis",
11392
+ "hardis:convert:profilestopermsets:project",
11393
+ "convert:hardis:profilestopermsets:project",
11394
+ "convert:profilestopermsets:hardis:project",
11395
+ "convert:profilestopermsets:project:hardis",
11396
+ "hardis:project:profilestopermsets:convert",
11397
+ "project:hardis:profilestopermsets:convert",
11398
+ "project:profilestopermsets:hardis:convert",
11399
+ "project:profilestopermsets:convert:hardis",
11400
+ "hardis:profilestopermsets:project:convert",
11401
+ "profilestopermsets:hardis:project:convert",
11402
+ "profilestopermsets:project:hardis:convert",
11403
+ "profilestopermsets:project:convert:hardis",
11404
+ "hardis:profilestopermsets:convert:project",
11405
+ "profilestopermsets:hardis:convert:project",
11406
+ "profilestopermsets:convert:hardis:project",
11407
+ "profilestopermsets:convert:project:hardis"
11407
11408
  ]
11408
11409
  },
11409
- "hardis:project:deploy:notify": {
11410
+ "hardis:project:fix:profiletabs": {
11410
11411
  "aliases": [],
11411
11412
  "args": {},
11412
- "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",
11413
+ "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",
11413
11414
  "examples": [
11414
- "$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
11415
- "$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
11416
- "$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
11415
+ "$ sf hardis:project:fix:profiletabs"
11417
11416
  ],
11418
11417
  "flags": {
11419
11418
  "json": {
@@ -11431,29 +11430,246 @@
11431
11430
  "multiple": false,
11432
11431
  "type": "option"
11433
11432
  },
11434
- "check-only": {
11435
- "char": "c",
11436
- "description": "Use this option to send notifications from a Deployment simulation job",
11437
- "name": "check-only",
11438
- "allowNo": false,
11439
- "type": "boolean"
11440
- },
11441
- "deploy-status": {
11442
- "char": "s",
11443
- "description": "Send success, failure or unknown (default) to indicate if the deployment or deployment simulation is in success or not",
11444
- "name": "deploy-status",
11445
- "default": "unknown",
11433
+ "path": {
11434
+ "char": "p",
11435
+ "description": "Root folder",
11436
+ "name": "path",
11437
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11446
11438
  "hasDynamicHelp": false,
11447
11439
  "multiple": false,
11448
- "options": [
11449
- "valid",
11450
- "invalid",
11451
- "unknown"
11452
- ],
11453
11440
  "type": "option"
11454
11441
  },
11455
- "message": {
11456
- "char": "m",
11442
+ "debug": {
11443
+ "char": "d",
11444
+ "description": "Activate debug mode (more logs)",
11445
+ "name": "debug",
11446
+ "allowNo": false,
11447
+ "type": "boolean"
11448
+ },
11449
+ "websocket": {
11450
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11451
+ "name": "websocket",
11452
+ "hasDynamicHelp": false,
11453
+ "multiple": false,
11454
+ "type": "option"
11455
+ },
11456
+ "skipauth": {
11457
+ "description": "Skip authentication check when a default username is required",
11458
+ "name": "skipauth",
11459
+ "allowNo": false,
11460
+ "type": "boolean"
11461
+ },
11462
+ "target-org": {
11463
+ "aliases": [
11464
+ "targetusername",
11465
+ "u"
11466
+ ],
11467
+ "char": "o",
11468
+ "deprecateAliases": true,
11469
+ "name": "target-org",
11470
+ "noCacheDefault": true,
11471
+ "required": true,
11472
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
11473
+ "hasDynamicHelp": true,
11474
+ "multiple": false,
11475
+ "type": "option"
11476
+ }
11477
+ },
11478
+ "hasDynamicHelp": true,
11479
+ "hiddenAliases": [],
11480
+ "id": "hardis:project:fix:profiletabs",
11481
+ "pluginAlias": "sfdx-hardis",
11482
+ "pluginName": "sfdx-hardis",
11483
+ "pluginType": "core",
11484
+ "strict": true,
11485
+ "enableJsonFlag": true,
11486
+ "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
11487
+ "requiresProject": true,
11488
+ "isESM": true,
11489
+ "relativePath": [
11490
+ "lib",
11491
+ "commands",
11492
+ "hardis",
11493
+ "project",
11494
+ "fix",
11495
+ "profiletabs.js"
11496
+ ],
11497
+ "aliasPermutations": [],
11498
+ "permutations": [
11499
+ "hardis:project:fix:profiletabs",
11500
+ "project:hardis:fix:profiletabs",
11501
+ "project:fix:hardis:profiletabs",
11502
+ "project:fix:profiletabs:hardis",
11503
+ "hardis:fix:project:profiletabs",
11504
+ "fix:hardis:project:profiletabs",
11505
+ "fix:project:hardis:profiletabs",
11506
+ "fix:project:profiletabs:hardis",
11507
+ "hardis:fix:profiletabs:project",
11508
+ "fix:hardis:profiletabs:project",
11509
+ "fix:profiletabs:hardis:project",
11510
+ "fix:profiletabs:project:hardis",
11511
+ "hardis:project:profiletabs:fix",
11512
+ "project:hardis:profiletabs:fix",
11513
+ "project:profiletabs:hardis:fix",
11514
+ "project:profiletabs:fix:hardis",
11515
+ "hardis:profiletabs:project:fix",
11516
+ "profiletabs:hardis:project:fix",
11517
+ "profiletabs:project:hardis:fix",
11518
+ "profiletabs:project:fix:hardis",
11519
+ "hardis:profiletabs:fix:project",
11520
+ "profiletabs:hardis:fix:project",
11521
+ "profiletabs:fix:hardis:project",
11522
+ "profiletabs:fix:project:hardis"
11523
+ ]
11524
+ },
11525
+ "hardis:project:fix:v53flexipages": {
11526
+ "aliases": [],
11527
+ "args": {},
11528
+ "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",
11529
+ "examples": [
11530
+ "$ sf hardis:project:fix:v53flexipages"
11531
+ ],
11532
+ "flags": {
11533
+ "json": {
11534
+ "description": "Format output as json.",
11535
+ "helpGroup": "GLOBAL",
11536
+ "name": "json",
11537
+ "allowNo": false,
11538
+ "type": "boolean"
11539
+ },
11540
+ "flags-dir": {
11541
+ "helpGroup": "GLOBAL",
11542
+ "name": "flags-dir",
11543
+ "summary": "Import flag values from a directory.",
11544
+ "hasDynamicHelp": false,
11545
+ "multiple": false,
11546
+ "type": "option"
11547
+ },
11548
+ "path": {
11549
+ "char": "p",
11550
+ "description": "Root folder",
11551
+ "name": "path",
11552
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11553
+ "hasDynamicHelp": false,
11554
+ "multiple": false,
11555
+ "type": "option"
11556
+ },
11557
+ "debug": {
11558
+ "char": "d",
11559
+ "description": "Activate debug mode (more logs)",
11560
+ "name": "debug",
11561
+ "allowNo": false,
11562
+ "type": "boolean"
11563
+ },
11564
+ "websocket": {
11565
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11566
+ "name": "websocket",
11567
+ "hasDynamicHelp": false,
11568
+ "multiple": false,
11569
+ "type": "option"
11570
+ },
11571
+ "skipauth": {
11572
+ "description": "Skip authentication check when a default username is required",
11573
+ "name": "skipauth",
11574
+ "allowNo": false,
11575
+ "type": "boolean"
11576
+ }
11577
+ },
11578
+ "hasDynamicHelp": false,
11579
+ "hiddenAliases": [],
11580
+ "id": "hardis:project:fix:v53flexipages",
11581
+ "pluginAlias": "sfdx-hardis",
11582
+ "pluginName": "sfdx-hardis",
11583
+ "pluginType": "core",
11584
+ "strict": true,
11585
+ "enableJsonFlag": true,
11586
+ "title": "Fix flexipages for v53",
11587
+ "requiresProject": true,
11588
+ "isESM": true,
11589
+ "relativePath": [
11590
+ "lib",
11591
+ "commands",
11592
+ "hardis",
11593
+ "project",
11594
+ "fix",
11595
+ "v53flexipages.js"
11596
+ ],
11597
+ "aliasPermutations": [],
11598
+ "permutations": [
11599
+ "hardis:project:fix:v53flexipages",
11600
+ "project:hardis:fix:v53flexipages",
11601
+ "project:fix:hardis:v53flexipages",
11602
+ "project:fix:v53flexipages:hardis",
11603
+ "hardis:fix:project:v53flexipages",
11604
+ "fix:hardis:project:v53flexipages",
11605
+ "fix:project:hardis:v53flexipages",
11606
+ "fix:project:v53flexipages:hardis",
11607
+ "hardis:fix:v53flexipages:project",
11608
+ "fix:hardis:v53flexipages:project",
11609
+ "fix:v53flexipages:hardis:project",
11610
+ "fix:v53flexipages:project:hardis",
11611
+ "hardis:project:v53flexipages:fix",
11612
+ "project:hardis:v53flexipages:fix",
11613
+ "project:v53flexipages:hardis:fix",
11614
+ "project:v53flexipages:fix:hardis",
11615
+ "hardis:v53flexipages:project:fix",
11616
+ "v53flexipages:hardis:project:fix",
11617
+ "v53flexipages:project:hardis:fix",
11618
+ "v53flexipages:project:fix:hardis",
11619
+ "hardis:v53flexipages:fix:project",
11620
+ "v53flexipages:hardis:fix:project",
11621
+ "v53flexipages:fix:hardis:project",
11622
+ "v53flexipages:fix:project:hardis"
11623
+ ]
11624
+ },
11625
+ "hardis:project:deploy:notify": {
11626
+ "aliases": [],
11627
+ "args": {},
11628
+ "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",
11629
+ "examples": [
11630
+ "$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
11631
+ "$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
11632
+ "$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
11633
+ ],
11634
+ "flags": {
11635
+ "json": {
11636
+ "description": "Format output as json.",
11637
+ "helpGroup": "GLOBAL",
11638
+ "name": "json",
11639
+ "allowNo": false,
11640
+ "type": "boolean"
11641
+ },
11642
+ "flags-dir": {
11643
+ "helpGroup": "GLOBAL",
11644
+ "name": "flags-dir",
11645
+ "summary": "Import flag values from a directory.",
11646
+ "hasDynamicHelp": false,
11647
+ "multiple": false,
11648
+ "type": "option"
11649
+ },
11650
+ "check-only": {
11651
+ "char": "c",
11652
+ "description": "Use this option to send notifications from a Deployment simulation job",
11653
+ "name": "check-only",
11654
+ "allowNo": false,
11655
+ "type": "boolean"
11656
+ },
11657
+ "deploy-status": {
11658
+ "char": "s",
11659
+ "description": "Send success, failure or unknown (default) to indicate if the deployment or deployment simulation is in success or not",
11660
+ "name": "deploy-status",
11661
+ "default": "unknown",
11662
+ "hasDynamicHelp": false,
11663
+ "multiple": false,
11664
+ "options": [
11665
+ "valid",
11666
+ "invalid",
11667
+ "unknown"
11668
+ ],
11669
+ "type": "option"
11670
+ },
11671
+ "message": {
11672
+ "char": "m",
11457
11673
  "description": "Custom message that you want to be added in notifications (string or markdown format)",
11458
11674
  "name": "message",
11459
11675
  "default": "",
@@ -12581,221 +12797,6 @@
12581
12797
  "validate:deploy:project:hardis"
12582
12798
  ]
12583
12799
  },
12584
- "hardis:project:fix:profiletabs": {
12585
- "aliases": [],
12586
- "args": {},
12587
- "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",
12588
- "examples": [
12589
- "$ sf hardis:project:fix:profiletabs"
12590
- ],
12591
- "flags": {
12592
- "json": {
12593
- "description": "Format output as json.",
12594
- "helpGroup": "GLOBAL",
12595
- "name": "json",
12596
- "allowNo": false,
12597
- "type": "boolean"
12598
- },
12599
- "flags-dir": {
12600
- "helpGroup": "GLOBAL",
12601
- "name": "flags-dir",
12602
- "summary": "Import flag values from a directory.",
12603
- "hasDynamicHelp": false,
12604
- "multiple": false,
12605
- "type": "option"
12606
- },
12607
- "path": {
12608
- "char": "p",
12609
- "description": "Root folder",
12610
- "name": "path",
12611
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12612
- "hasDynamicHelp": false,
12613
- "multiple": false,
12614
- "type": "option"
12615
- },
12616
- "debug": {
12617
- "char": "d",
12618
- "description": "Activate debug mode (more logs)",
12619
- "name": "debug",
12620
- "allowNo": false,
12621
- "type": "boolean"
12622
- },
12623
- "websocket": {
12624
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12625
- "name": "websocket",
12626
- "hasDynamicHelp": false,
12627
- "multiple": false,
12628
- "type": "option"
12629
- },
12630
- "skipauth": {
12631
- "description": "Skip authentication check when a default username is required",
12632
- "name": "skipauth",
12633
- "allowNo": false,
12634
- "type": "boolean"
12635
- },
12636
- "target-org": {
12637
- "aliases": [
12638
- "targetusername",
12639
- "u"
12640
- ],
12641
- "char": "o",
12642
- "deprecateAliases": true,
12643
- "name": "target-org",
12644
- "noCacheDefault": true,
12645
- "required": true,
12646
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
12647
- "hasDynamicHelp": true,
12648
- "multiple": false,
12649
- "type": "option"
12650
- }
12651
- },
12652
- "hasDynamicHelp": true,
12653
- "hiddenAliases": [],
12654
- "id": "hardis:project:fix:profiletabs",
12655
- "pluginAlias": "sfdx-hardis",
12656
- "pluginName": "sfdx-hardis",
12657
- "pluginType": "core",
12658
- "strict": true,
12659
- "enableJsonFlag": true,
12660
- "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
12661
- "requiresProject": true,
12662
- "isESM": true,
12663
- "relativePath": [
12664
- "lib",
12665
- "commands",
12666
- "hardis",
12667
- "project",
12668
- "fix",
12669
- "profiletabs.js"
12670
- ],
12671
- "aliasPermutations": [],
12672
- "permutations": [
12673
- "hardis:project:fix:profiletabs",
12674
- "project:hardis:fix:profiletabs",
12675
- "project:fix:hardis:profiletabs",
12676
- "project:fix:profiletabs:hardis",
12677
- "hardis:fix:project:profiletabs",
12678
- "fix:hardis:project:profiletabs",
12679
- "fix:project:hardis:profiletabs",
12680
- "fix:project:profiletabs:hardis",
12681
- "hardis:fix:profiletabs:project",
12682
- "fix:hardis:profiletabs:project",
12683
- "fix:profiletabs:hardis:project",
12684
- "fix:profiletabs:project:hardis",
12685
- "hardis:project:profiletabs:fix",
12686
- "project:hardis:profiletabs:fix",
12687
- "project:profiletabs:hardis:fix",
12688
- "project:profiletabs:fix:hardis",
12689
- "hardis:profiletabs:project:fix",
12690
- "profiletabs:hardis:project:fix",
12691
- "profiletabs:project:hardis:fix",
12692
- "profiletabs:project:fix:hardis",
12693
- "hardis:profiletabs:fix:project",
12694
- "profiletabs:hardis:fix:project",
12695
- "profiletabs:fix:hardis:project",
12696
- "profiletabs:fix:project:hardis"
12697
- ]
12698
- },
12699
- "hardis:project:fix:v53flexipages": {
12700
- "aliases": [],
12701
- "args": {},
12702
- "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",
12703
- "examples": [
12704
- "$ sf hardis:project:fix:v53flexipages"
12705
- ],
12706
- "flags": {
12707
- "json": {
12708
- "description": "Format output as json.",
12709
- "helpGroup": "GLOBAL",
12710
- "name": "json",
12711
- "allowNo": false,
12712
- "type": "boolean"
12713
- },
12714
- "flags-dir": {
12715
- "helpGroup": "GLOBAL",
12716
- "name": "flags-dir",
12717
- "summary": "Import flag values from a directory.",
12718
- "hasDynamicHelp": false,
12719
- "multiple": false,
12720
- "type": "option"
12721
- },
12722
- "path": {
12723
- "char": "p",
12724
- "description": "Root folder",
12725
- "name": "path",
12726
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12727
- "hasDynamicHelp": false,
12728
- "multiple": false,
12729
- "type": "option"
12730
- },
12731
- "debug": {
12732
- "char": "d",
12733
- "description": "Activate debug mode (more logs)",
12734
- "name": "debug",
12735
- "allowNo": false,
12736
- "type": "boolean"
12737
- },
12738
- "websocket": {
12739
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12740
- "name": "websocket",
12741
- "hasDynamicHelp": false,
12742
- "multiple": false,
12743
- "type": "option"
12744
- },
12745
- "skipauth": {
12746
- "description": "Skip authentication check when a default username is required",
12747
- "name": "skipauth",
12748
- "allowNo": false,
12749
- "type": "boolean"
12750
- }
12751
- },
12752
- "hasDynamicHelp": false,
12753
- "hiddenAliases": [],
12754
- "id": "hardis:project:fix:v53flexipages",
12755
- "pluginAlias": "sfdx-hardis",
12756
- "pluginName": "sfdx-hardis",
12757
- "pluginType": "core",
12758
- "strict": true,
12759
- "enableJsonFlag": true,
12760
- "title": "Fix flexipages for v53",
12761
- "requiresProject": true,
12762
- "isESM": true,
12763
- "relativePath": [
12764
- "lib",
12765
- "commands",
12766
- "hardis",
12767
- "project",
12768
- "fix",
12769
- "v53flexipages.js"
12770
- ],
12771
- "aliasPermutations": [],
12772
- "permutations": [
12773
- "hardis:project:fix:v53flexipages",
12774
- "project:hardis:fix:v53flexipages",
12775
- "project:fix:hardis:v53flexipages",
12776
- "project:fix:v53flexipages:hardis",
12777
- "hardis:fix:project:v53flexipages",
12778
- "fix:hardis:project:v53flexipages",
12779
- "fix:project:hardis:v53flexipages",
12780
- "fix:project:v53flexipages:hardis",
12781
- "hardis:fix:v53flexipages:project",
12782
- "fix:hardis:v53flexipages:project",
12783
- "fix:v53flexipages:hardis:project",
12784
- "fix:v53flexipages:project:hardis",
12785
- "hardis:project:v53flexipages:fix",
12786
- "project:hardis:v53flexipages:fix",
12787
- "project:v53flexipages:hardis:fix",
12788
- "project:v53flexipages:fix:hardis",
12789
- "hardis:v53flexipages:project:fix",
12790
- "v53flexipages:hardis:project:fix",
12791
- "v53flexipages:project:hardis:fix",
12792
- "v53flexipages:project:fix:hardis",
12793
- "hardis:v53flexipages:fix:project",
12794
- "v53flexipages:hardis:fix:project",
12795
- "v53flexipages:fix:hardis:project",
12796
- "v53flexipages:fix:project:hardis"
12797
- ]
12798
- },
12799
12800
  "hardis:project:generate:bypass": {
12800
12801
  "aliases": [],
12801
12802
  "args": {},
@@ -15369,5 +15370,5 @@
15369
15370
  ]
15370
15371
  }
15371
15372
  },
15372
- "version": "6.8.0"
15373
+ "version": "6.8.1"
15373
15374
  }