sfdx-hardis 6.1.3 → 6.1.5-beta202508282306.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4406,6 +4406,135 @@
4406
4406
  "ws:work:hardis"
4407
4407
  ]
4408
4408
  },
4409
+ "hardis:git:pull-requests:extract": {
4410
+ "aliases": [],
4411
+ "args": {},
4412
+ "description": "\n## Command Behavior\n\n**Extracts pull request information from your Git server based on specified filtering criteria.**\n\nThis command provides a powerful way to query and retrieve details about pull requests (or merge requests, depending on your Git provider) in your repository. It's highly useful for reporting, auditing, and analyzing development workflows.\n\nKey functionalities include:\n\n- **Target Branch Filtering:** You can filter pull requests by their target branch using the `--target-branch` flag. If not specified, the command will prompt you to select one.\n- **Status Filtering:** Filter pull requests by their status: `open`, `merged`, or `abandoned` using the `--status` flag. An interactive prompt is provided if no status is specified.\n- **Minimum Date Filtering:** Use the `--min-date` flag to retrieve pull requests created or updated after a specific date.\n- **CSV Output:** The extracted pull request data is generated into a CSV file, which can be used for further analysis in spreadsheet software.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves interacting with a Git provider's API:\n\n- **Git Provider Abstraction:** It uses the `GitProvider.getInstance(true)` to abstract away the specifics of different Git platforms (e.g., GitHub, GitLab, Azure DevOps). This ensures the command can work across various environments.\n- **API Calls:** The `gitProvider.listPullRequests()` method is called with a `prConstraint` object that encapsulates the filtering criteria (target branch, minimum date, status).\n- **Interactive Prompts:** The `prompts` library is used to interactively gather input from the user for the target branch and pull request status if they are not provided as command-line flags.\n- **Date Handling:** The `moment` library is used to parse and handle date inputs for the `--min-date` flag.\n- **CSV Generation:** The `generateCsvFile` utility is responsible for converting the retrieved pull request data into a CSV format, and `generateReportPath` determines the output file location.\n- **Error Handling:** It includes error handling for cases where a Git provider cannot be identified.\n</details>\n",
4413
+ "examples": [
4414
+ "$ sf hardis:git:pull-requests:extract",
4415
+ "$ sf hardis:git:pull-requests:extract --target-branch main --status merged"
4416
+ ],
4417
+ "flags": {
4418
+ "json": {
4419
+ "description": "Format output as json.",
4420
+ "helpGroup": "GLOBAL",
4421
+ "name": "json",
4422
+ "allowNo": false,
4423
+ "type": "boolean"
4424
+ },
4425
+ "flags-dir": {
4426
+ "helpGroup": "GLOBAL",
4427
+ "name": "flags-dir",
4428
+ "summary": "Import flag values from a directory.",
4429
+ "hasDynamicHelp": false,
4430
+ "multiple": false,
4431
+ "type": "option"
4432
+ },
4433
+ "target-branch": {
4434
+ "char": "t",
4435
+ "description": "Target branch of PRs",
4436
+ "name": "target-branch",
4437
+ "hasDynamicHelp": false,
4438
+ "multiple": false,
4439
+ "type": "option"
4440
+ },
4441
+ "status": {
4442
+ "char": "x",
4443
+ "description": "Status of the PR",
4444
+ "name": "status",
4445
+ "hasDynamicHelp": false,
4446
+ "multiple": false,
4447
+ "options": [
4448
+ "open",
4449
+ "merged",
4450
+ "abandoned"
4451
+ ],
4452
+ "type": "option"
4453
+ },
4454
+ "min-date": {
4455
+ "char": "m",
4456
+ "description": "Minimum date for PR",
4457
+ "name": "min-date",
4458
+ "hasDynamicHelp": false,
4459
+ "multiple": false,
4460
+ "type": "option"
4461
+ },
4462
+ "outputfile": {
4463
+ "char": "f",
4464
+ "description": "Force the path and name of output report file. Must end with .csv",
4465
+ "name": "outputfile",
4466
+ "hasDynamicHelp": false,
4467
+ "multiple": false,
4468
+ "type": "option"
4469
+ },
4470
+ "debug": {
4471
+ "char": "d",
4472
+ "description": "Activate debug mode (more logs)",
4473
+ "name": "debug",
4474
+ "allowNo": false,
4475
+ "type": "boolean"
4476
+ },
4477
+ "websocket": {
4478
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
4479
+ "name": "websocket",
4480
+ "hasDynamicHelp": false,
4481
+ "multiple": false,
4482
+ "type": "option"
4483
+ },
4484
+ "skipauth": {
4485
+ "description": "Skip authentication check when a default username is required",
4486
+ "name": "skipauth",
4487
+ "allowNo": false,
4488
+ "type": "boolean"
4489
+ }
4490
+ },
4491
+ "hasDynamicHelp": false,
4492
+ "hiddenAliases": [],
4493
+ "id": "hardis:git:pull-requests:extract",
4494
+ "pluginAlias": "sfdx-hardis",
4495
+ "pluginName": "sfdx-hardis",
4496
+ "pluginType": "core",
4497
+ "strict": true,
4498
+ "enableJsonFlag": true,
4499
+ "title": "Extract pull requests",
4500
+ "requiresProject": true,
4501
+ "isESM": true,
4502
+ "relativePath": [
4503
+ "lib",
4504
+ "commands",
4505
+ "hardis",
4506
+ "git",
4507
+ "pull-requests",
4508
+ "extract.js"
4509
+ ],
4510
+ "aliasPermutations": [],
4511
+ "permutations": [
4512
+ "hardis:git:pull-requests:extract",
4513
+ "git:hardis:pull-requests:extract",
4514
+ "git:pull-requests:hardis:extract",
4515
+ "git:pull-requests:extract:hardis",
4516
+ "hardis:pull-requests:git:extract",
4517
+ "pull-requests:hardis:git:extract",
4518
+ "pull-requests:git:hardis:extract",
4519
+ "pull-requests:git:extract:hardis",
4520
+ "hardis:pull-requests:extract:git",
4521
+ "pull-requests:hardis:extract:git",
4522
+ "pull-requests:extract:hardis:git",
4523
+ "pull-requests:extract:git:hardis",
4524
+ "hardis:git:extract:pull-requests",
4525
+ "git:hardis:extract:pull-requests",
4526
+ "git:extract:hardis:pull-requests",
4527
+ "git:extract:pull-requests:hardis",
4528
+ "hardis:extract:git:pull-requests",
4529
+ "extract:hardis:git:pull-requests",
4530
+ "extract:git:hardis:pull-requests",
4531
+ "extract:git:pull-requests:hardis",
4532
+ "hardis:extract:pull-requests:git",
4533
+ "extract:hardis:pull-requests:git",
4534
+ "extract:pull-requests:hardis:git",
4535
+ "extract:pull-requests:git:hardis"
4536
+ ]
4537
+ },
4409
4538
  "hardis:doc:extract:permsetgroups": {
4410
4539
  "aliases": [],
4411
4540
  "args": {},
@@ -4596,13 +4725,13 @@
4596
4725
  "generate:plugin:doc:hardis"
4597
4726
  ]
4598
4727
  },
4599
- "hardis:git:pull-requests:extract": {
4728
+ "hardis:org:community:update": {
4600
4729
  "aliases": [],
4601
4730
  "args": {},
4602
- "description": "\n## Command Behavior\n\n**Extracts pull request information from your Git server based on specified filtering criteria.**\n\nThis command provides a powerful way to query and retrieve details about pull requests (or merge requests, depending on your Git provider) in your repository. It's highly useful for reporting, auditing, and analyzing development workflows.\n\nKey functionalities include:\n\n- **Target Branch Filtering:** You can filter pull requests by their target branch using the `--target-branch` flag. If not specified, the command will prompt you to select one.\n- **Status Filtering:** Filter pull requests by their status: `open`, `merged`, or `abandoned` using the `--status` flag. An interactive prompt is provided if no status is specified.\n- **Minimum Date Filtering:** Use the `--min-date` flag to retrieve pull requests created or updated after a specific date.\n- **CSV Output:** The extracted pull request data is generated into a CSV file, which can be used for further analysis in spreadsheet software.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves interacting with a Git provider's API:\n\n- **Git Provider Abstraction:** It uses the `GitProvider.getInstance(true)` to abstract away the specifics of different Git platforms (e.g., GitHub, GitLab, Azure DevOps). This ensures the command can work across various environments.\n- **API Calls:** The `gitProvider.listPullRequests()` method is called with a `prConstraint` object that encapsulates the filtering criteria (target branch, minimum date, status).\n- **Interactive Prompts:** The `prompts` library is used to interactively gather input from the user for the target branch and pull request status if they are not provided as command-line flags.\n- **Date Handling:** The `moment` library is used to parse and handle date inputs for the `--min-date` flag.\n- **CSV Generation:** The `generateCsvFile` utility is responsible for converting the retrieved pull request data into a CSV format, and `generateReportPath` determines the output file location.\n- **Error Handling:** It includes error handling for cases where a Git provider cannot be identified.\n</details>\n",
4731
+ "description": "\n## Command Behavior\n\n**Updates the status of one or more Salesforce Experience Cloud (Community) networks.**\n\nThis command provides a way to programmatically change the status of your Salesforce Communities, allowing you to manage their availability. This is particularly useful for:\n\n- **Maintenance:** Taking communities offline for planned maintenance (`DownForMaintenance`).\n- **Activation/Deactivation:** Bringing communities online or offline (`Live`, `DownForMaintenance`).\n- **Automation:** Integrating community status changes into CI/CD pipelines or scheduled jobs.\n\nKey functionalities:\n\n- **Network Selection:** You can specify one or more community network names (separated by commas) using the `--name` flag.\n- **Status Update:** You can set the new status for the selected communities using the `--status` flag. Supported values are `Live` and `DownForMaintenance`.\n- **Confirmation Prompt:** In non-CI environments, it provides a confirmation prompt before executing the update, ensuring intentional changes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the Salesforce `Network` object using SOQL to retrieve the `Id`, `Name`, and `Status` of the specified communities. This ensures that only existing communities are targeted.\n- **SObject Update:** It then constructs an array of `Network` sObjects with their `Id` and the new `Status` and performs a DML update operation using `conn.sobject(\"Network\").update()`. The `allOrNone: false` option is used to allow partial success in case some updates fail.\n- **Error Handling and Reporting:** It iterates through the update results, logging success or failure for each community. It also provides a summary of successful and erroneous updates.\n- **User Interaction:** Uses `prompts` to confirm the update action with the user when not running in a CI environment.\n- **Salesforce Connection:** Establishes a connection to the target Salesforce org using the `target-org` flag.\n</details>\n",
4603
4732
  "examples": [
4604
- "$ sf hardis:git:pull-requests:extract",
4605
- "$ sf hardis:git:pull-requests:extract --target-branch main --status merged"
4733
+ "$ sf hardis:org:community:update --name 'MyNetworkName' --status DownForMaintenance",
4734
+ "$ sf hardis:org:community:update --name 'MyNetworkName,MySecondNetworkName' --status Live"
4606
4735
  ],
4607
4736
  "flags": {
4608
4737
  "json": {
@@ -4620,39 +4749,112 @@
4620
4749
  "multiple": false,
4621
4750
  "type": "option"
4622
4751
  },
4623
- "target-branch": {
4624
- "char": "t",
4625
- "description": "Target branch of PRs",
4626
- "name": "target-branch",
4752
+ "name": {
4753
+ "char": "n",
4754
+ "description": "List of Networks Names that you want to update, separated by comma",
4755
+ "name": "name",
4756
+ "required": true,
4627
4757
  "hasDynamicHelp": false,
4628
4758
  "multiple": false,
4629
4759
  "type": "option"
4630
4760
  },
4631
4761
  "status": {
4632
- "char": "x",
4633
- "description": "Status of the PR",
4762
+ "char": "s",
4763
+ "description": "New status for the community, available values are: Live, DownForMaintenance",
4634
4764
  "name": "status",
4765
+ "required": true,
4635
4766
  "hasDynamicHelp": false,
4636
4767
  "multiple": false,
4637
- "options": [
4638
- "open",
4639
- "merged",
4640
- "abandoned"
4641
- ],
4642
4768
  "type": "option"
4643
4769
  },
4644
- "min-date": {
4645
- "char": "m",
4646
- "description": "Minimum date for PR",
4647
- "name": "min-date",
4648
- "hasDynamicHelp": false,
4770
+ "debug": {
4771
+ "char": "d",
4772
+ "description": "Activate debug mode (more logs)",
4773
+ "name": "debug",
4774
+ "allowNo": false,
4775
+ "type": "boolean"
4776
+ },
4777
+ "target-org": {
4778
+ "aliases": [
4779
+ "targetusername",
4780
+ "u"
4781
+ ],
4782
+ "char": "o",
4783
+ "deprecateAliases": true,
4784
+ "name": "target-org",
4785
+ "noCacheDefault": true,
4786
+ "required": true,
4787
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
4788
+ "hasDynamicHelp": true,
4649
4789
  "multiple": false,
4650
4790
  "type": "option"
4791
+ }
4792
+ },
4793
+ "hasDynamicHelp": true,
4794
+ "hiddenAliases": [],
4795
+ "id": "hardis:org:community:update",
4796
+ "pluginAlias": "sfdx-hardis",
4797
+ "pluginName": "sfdx-hardis",
4798
+ "pluginType": "core",
4799
+ "strict": true,
4800
+ "summary": "Update a community status.",
4801
+ "enableJsonFlag": true,
4802
+ "isESM": true,
4803
+ "relativePath": [
4804
+ "lib",
4805
+ "commands",
4806
+ "hardis",
4807
+ "org",
4808
+ "community",
4809
+ "update.js"
4810
+ ],
4811
+ "aliasPermutations": [],
4812
+ "permutations": [
4813
+ "hardis:org:community:update",
4814
+ "org:hardis:community:update",
4815
+ "org:community:hardis:update",
4816
+ "org:community:update:hardis",
4817
+ "hardis:community:org:update",
4818
+ "community:hardis:org:update",
4819
+ "community:org:hardis:update",
4820
+ "community:org:update:hardis",
4821
+ "hardis:community:update:org",
4822
+ "community:hardis:update:org",
4823
+ "community:update:hardis:org",
4824
+ "community:update:org:hardis",
4825
+ "hardis:org:update:community",
4826
+ "org:hardis:update:community",
4827
+ "org:update:hardis:community",
4828
+ "org:update:community:hardis",
4829
+ "hardis:update:org:community",
4830
+ "update:hardis:org:community",
4831
+ "update:org:hardis:community",
4832
+ "update:org:community:hardis",
4833
+ "hardis:update:community:org",
4834
+ "update:hardis:community:org",
4835
+ "update:community:hardis:org",
4836
+ "update:community:org:hardis"
4837
+ ]
4838
+ },
4839
+ "hardis:org:configure:data": {
4840
+ "aliases": [],
4841
+ "args": {},
4842
+ "description": "\n## Command Behavior\n\n**Configures a Salesforce Data Migration Utility (SFDMU) project for data export and import operations.**\n\nThis command assists in setting up SFDMU workspaces, which are essential for managing data within your Salesforce environments. It streamlines the creation of `export.json` files and related configurations, enabling efficient data seeding, migration, and synchronization.\n\nKey functionalities:\n\n- **Template-Based Configuration:** Allows you to choose from predefined SFDMU templates or start with a blank configuration. Templates can pre-populate `export.json` with common data migration scenarios.\n- **Interactive Setup:** Guides you through the process of defining the SFDMU project folder name, label, and description.\n- **`export.json` Generation:** Creates the `export.json` file, which is the core configuration file for SFDMU, defining objects to export/import, queries, and operations.\n- **Additional File Generation:** Can generate additional configuration files, such as a `badwords.json` file for data filtering scenarios.\n- **Scratch Org Integration:** Offers to automatically configure the SFDMU project to be used for data import when initializing a new scratch org, ensuring consistent test data across development environments.\n\nSee this article for a practical example:\n\n[![How to detect bad words in Salesforce records using SFDX Data Loader and sfdx-hardis](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-badwords.jpg)](https://nicolas.vuillamy.fr/how-to-detect-bad-words-in-salesforce-records-using-sfdx-data-loader-and-sfdx-hardis-171db40a9bac)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SFDMU Integration:** It acts as a setup wizard for SFDMU, generating the necessary configuration files that the `sfdmu` plugin consumes.\n- **Interactive Prompts:** Uses the `prompts` library to gather user input for various configuration parameters, such as the data path, label, and description.\n- **File System Operations:** Employs `fs-extra` to create directories (e.g., `data/your-project-name/`) and write the `export.json` and any additional configuration files.\n- **JSON Manipulation:** Constructs the `export.json` content dynamically based on user input and selected templates, including defining objects, queries, and operations.\n- **PascalCase Conversion:** Uses `pascalcase` to format the SFDMU folder name consistently.\n- **Configuration Persistence:** Updates the project's `sfdx-hardis.yml` file (via `setConfig`) to include the newly configured data package if it's intended for scratch org initialization.\n- **WebSocket Communication:** Uses `WebSocketClient.requestOpenFile` to open the generated `export.json` file in VS Code, facilitating immediate configuration.\n- **Required Plugin Check:** Explicitly lists `sfdmu` as a required plugin, ensuring the necessary dependency is present.\n</details>\n",
4843
+ "examples": [
4844
+ "$ sf hardis:org:configure:data"
4845
+ ],
4846
+ "flags": {
4847
+ "json": {
4848
+ "description": "Format output as json.",
4849
+ "helpGroup": "GLOBAL",
4850
+ "name": "json",
4851
+ "allowNo": false,
4852
+ "type": "boolean"
4651
4853
  },
4652
- "outputfile": {
4653
- "char": "f",
4654
- "description": "Force the path and name of output report file. Must end with .csv",
4655
- "name": "outputfile",
4854
+ "flags-dir": {
4855
+ "helpGroup": "GLOBAL",
4856
+ "name": "flags-dir",
4857
+ "summary": "Import flag values from a directory.",
4656
4858
  "hasDynamicHelp": false,
4657
4859
  "multiple": false,
4658
4860
  "type": "option"
@@ -4680,209 +4882,7 @@
4680
4882
  },
4681
4883
  "hasDynamicHelp": false,
4682
4884
  "hiddenAliases": [],
4683
- "id": "hardis:git:pull-requests:extract",
4684
- "pluginAlias": "sfdx-hardis",
4685
- "pluginName": "sfdx-hardis",
4686
- "pluginType": "core",
4687
- "strict": true,
4688
- "enableJsonFlag": true,
4689
- "title": "Extract pull requests",
4690
- "requiresProject": true,
4691
- "isESM": true,
4692
- "relativePath": [
4693
- "lib",
4694
- "commands",
4695
- "hardis",
4696
- "git",
4697
- "pull-requests",
4698
- "extract.js"
4699
- ],
4700
- "aliasPermutations": [],
4701
- "permutations": [
4702
- "hardis:git:pull-requests:extract",
4703
- "git:hardis:pull-requests:extract",
4704
- "git:pull-requests:hardis:extract",
4705
- "git:pull-requests:extract:hardis",
4706
- "hardis:pull-requests:git:extract",
4707
- "pull-requests:hardis:git:extract",
4708
- "pull-requests:git:hardis:extract",
4709
- "pull-requests:git:extract:hardis",
4710
- "hardis:pull-requests:extract:git",
4711
- "pull-requests:hardis:extract:git",
4712
- "pull-requests:extract:hardis:git",
4713
- "pull-requests:extract:git:hardis",
4714
- "hardis:git:extract:pull-requests",
4715
- "git:hardis:extract:pull-requests",
4716
- "git:extract:hardis:pull-requests",
4717
- "git:extract:pull-requests:hardis",
4718
- "hardis:extract:git:pull-requests",
4719
- "extract:hardis:git:pull-requests",
4720
- "extract:git:hardis:pull-requests",
4721
- "extract:git:pull-requests:hardis",
4722
- "hardis:extract:pull-requests:git",
4723
- "extract:hardis:pull-requests:git",
4724
- "extract:pull-requests:hardis:git",
4725
- "extract:pull-requests:git:hardis"
4726
- ]
4727
- },
4728
- "hardis:org:community:update": {
4729
- "aliases": [],
4730
- "args": {},
4731
- "description": "\n## Command Behavior\n\n**Updates the status of one or more Salesforce Experience Cloud (Community) networks.**\n\nThis command provides a way to programmatically change the status of your Salesforce Communities, allowing you to manage their availability. This is particularly useful for:\n\n- **Maintenance:** Taking communities offline for planned maintenance (`DownForMaintenance`).\n- **Activation/Deactivation:** Bringing communities online or offline (`Live`, `DownForMaintenance`).\n- **Automation:** Integrating community status changes into CI/CD pipelines or scheduled jobs.\n\nKey functionalities:\n\n- **Network Selection:** You can specify one or more community network names (separated by commas) using the `--name` flag.\n- **Status Update:** You can set the new status for the selected communities using the `--status` flag. Supported values are `Live` and `DownForMaintenance`.\n- **Confirmation Prompt:** In non-CI environments, it provides a confirmation prompt before executing the update, ensuring intentional changes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the Salesforce `Network` object using SOQL to retrieve the `Id`, `Name`, and `Status` of the specified communities. This ensures that only existing communities are targeted.\n- **SObject Update:** It then constructs an array of `Network` sObjects with their `Id` and the new `Status` and performs a DML update operation using `conn.sobject(\"Network\").update()`. The `allOrNone: false` option is used to allow partial success in case some updates fail.\n- **Error Handling and Reporting:** It iterates through the update results, logging success or failure for each community. It also provides a summary of successful and erroneous updates.\n- **User Interaction:** Uses `prompts` to confirm the update action with the user when not running in a CI environment.\n- **Salesforce Connection:** Establishes a connection to the target Salesforce org using the `target-org` flag.\n</details>\n",
4732
- "examples": [
4733
- "$ sf hardis:org:community:update --name 'MyNetworkName' --status DownForMaintenance",
4734
- "$ sf hardis:org:community:update --name 'MyNetworkName,MySecondNetworkName' --status Live"
4735
- ],
4736
- "flags": {
4737
- "json": {
4738
- "description": "Format output as json.",
4739
- "helpGroup": "GLOBAL",
4740
- "name": "json",
4741
- "allowNo": false,
4742
- "type": "boolean"
4743
- },
4744
- "flags-dir": {
4745
- "helpGroup": "GLOBAL",
4746
- "name": "flags-dir",
4747
- "summary": "Import flag values from a directory.",
4748
- "hasDynamicHelp": false,
4749
- "multiple": false,
4750
- "type": "option"
4751
- },
4752
- "name": {
4753
- "char": "n",
4754
- "description": "List of Networks Names that you want to update, separated by comma",
4755
- "name": "name",
4756
- "required": true,
4757
- "hasDynamicHelp": false,
4758
- "multiple": false,
4759
- "type": "option"
4760
- },
4761
- "status": {
4762
- "char": "s",
4763
- "description": "New status for the community, available values are: Live, DownForMaintenance",
4764
- "name": "status",
4765
- "required": true,
4766
- "hasDynamicHelp": false,
4767
- "multiple": false,
4768
- "type": "option"
4769
- },
4770
- "debug": {
4771
- "char": "d",
4772
- "description": "Activate debug mode (more logs)",
4773
- "name": "debug",
4774
- "allowNo": false,
4775
- "type": "boolean"
4776
- },
4777
- "target-org": {
4778
- "aliases": [
4779
- "targetusername",
4780
- "u"
4781
- ],
4782
- "char": "o",
4783
- "deprecateAliases": true,
4784
- "name": "target-org",
4785
- "noCacheDefault": true,
4786
- "required": true,
4787
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
4788
- "hasDynamicHelp": true,
4789
- "multiple": false,
4790
- "type": "option"
4791
- }
4792
- },
4793
- "hasDynamicHelp": true,
4794
- "hiddenAliases": [],
4795
- "id": "hardis:org:community:update",
4796
- "pluginAlias": "sfdx-hardis",
4797
- "pluginName": "sfdx-hardis",
4798
- "pluginType": "core",
4799
- "strict": true,
4800
- "summary": "Update a community status.",
4801
- "enableJsonFlag": true,
4802
- "isESM": true,
4803
- "relativePath": [
4804
- "lib",
4805
- "commands",
4806
- "hardis",
4807
- "org",
4808
- "community",
4809
- "update.js"
4810
- ],
4811
- "aliasPermutations": [],
4812
- "permutations": [
4813
- "hardis:org:community:update",
4814
- "org:hardis:community:update",
4815
- "org:community:hardis:update",
4816
- "org:community:update:hardis",
4817
- "hardis:community:org:update",
4818
- "community:hardis:org:update",
4819
- "community:org:hardis:update",
4820
- "community:org:update:hardis",
4821
- "hardis:community:update:org",
4822
- "community:hardis:update:org",
4823
- "community:update:hardis:org",
4824
- "community:update:org:hardis",
4825
- "hardis:org:update:community",
4826
- "org:hardis:update:community",
4827
- "org:update:hardis:community",
4828
- "org:update:community:hardis",
4829
- "hardis:update:org:community",
4830
- "update:hardis:org:community",
4831
- "update:org:hardis:community",
4832
- "update:org:community:hardis",
4833
- "hardis:update:community:org",
4834
- "update:hardis:community:org",
4835
- "update:community:hardis:org",
4836
- "update:community:org:hardis"
4837
- ]
4838
- },
4839
- "hardis:org:configure:data": {
4840
- "aliases": [],
4841
- "args": {},
4842
- "description": "\n## Command Behavior\n\n**Configures a Salesforce Data Migration Utility (SFDMU) project for data export and import operations.**\n\nThis command assists in setting up SFDMU workspaces, which are essential for managing data within your Salesforce environments. It streamlines the creation of `export.json` files and related configurations, enabling efficient data seeding, migration, and synchronization.\n\nKey functionalities:\n\n- **Template-Based Configuration:** Allows you to choose from predefined SFDMU templates or start with a blank configuration. Templates can pre-populate `export.json` with common data migration scenarios.\n- **Interactive Setup:** Guides you through the process of defining the SFDMU project folder name, label, and description.\n- **`export.json` Generation:** Creates the `export.json` file, which is the core configuration file for SFDMU, defining objects to export/import, queries, and operations.\n- **Additional File Generation:** Can generate additional configuration files, such as a `badwords.json` file for data filtering scenarios.\n- **Scratch Org Integration:** Offers to automatically configure the SFDMU project to be used for data import when initializing a new scratch org, ensuring consistent test data across development environments.\n\nSee this article for a practical example:\n\n[![How to detect bad words in Salesforce records using SFDX Data Loader and sfdx-hardis](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-badwords.jpg)](https://nicolas.vuillamy.fr/how-to-detect-bad-words-in-salesforce-records-using-sfdx-data-loader-and-sfdx-hardis-171db40a9bac)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SFDMU Integration:** It acts as a setup wizard for SFDMU, generating the necessary configuration files that the `sfdmu` plugin consumes.\n- **Interactive Prompts:** Uses the `prompts` library to gather user input for various configuration parameters, such as the data path, label, and description.\n- **File System Operations:** Employs `fs-extra` to create directories (e.g., `data/your-project-name/`) and write the `export.json` and any additional configuration files.\n- **JSON Manipulation:** Constructs the `export.json` content dynamically based on user input and selected templates, including defining objects, queries, and operations.\n- **PascalCase Conversion:** Uses `pascalcase` to format the SFDMU folder name consistently.\n- **Configuration Persistence:** Updates the project's `sfdx-hardis.yml` file (via `setConfig`) to include the newly configured data package if it's intended for scratch org initialization.\n- **WebSocket Communication:** Uses `WebSocketClient.requestOpenFile` to open the generated `export.json` file in VS Code, facilitating immediate configuration.\n- **Required Plugin Check:** Explicitly lists `sfdmu` as a required plugin, ensuring the necessary dependency is present.\n</details>\n",
4843
- "examples": [
4844
- "$ sf hardis:org:configure:data"
4845
- ],
4846
- "flags": {
4847
- "json": {
4848
- "description": "Format output as json.",
4849
- "helpGroup": "GLOBAL",
4850
- "name": "json",
4851
- "allowNo": false,
4852
- "type": "boolean"
4853
- },
4854
- "flags-dir": {
4855
- "helpGroup": "GLOBAL",
4856
- "name": "flags-dir",
4857
- "summary": "Import flag values from a directory.",
4858
- "hasDynamicHelp": false,
4859
- "multiple": false,
4860
- "type": "option"
4861
- },
4862
- "debug": {
4863
- "char": "d",
4864
- "description": "Activate debug mode (more logs)",
4865
- "name": "debug",
4866
- "allowNo": false,
4867
- "type": "boolean"
4868
- },
4869
- "websocket": {
4870
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
4871
- "name": "websocket",
4872
- "hasDynamicHelp": false,
4873
- "multiple": false,
4874
- "type": "option"
4875
- },
4876
- "skipauth": {
4877
- "description": "Skip authentication check when a default username is required",
4878
- "name": "skipauth",
4879
- "allowNo": false,
4880
- "type": "boolean"
4881
- }
4882
- },
4883
- "hasDynamicHelp": false,
4884
- "hiddenAliases": [],
4885
- "id": "hardis:org:configure:data",
4885
+ "id": "hardis:org:configure:data",
4886
4886
  "pluginAlias": "sfdx-hardis",
4887
4887
  "pluginName": "sfdx-hardis",
4888
4888
  "pluginType": "core",
@@ -5259,7 +5259,9 @@
5259
5259
  "args": {},
5260
5260
  "description": "\n## Command Behavior\n\n**Exports data from a Salesforce org using an SFDMU (Salesforce Data Migration Utility) project.**\n\nThis command facilitates the extraction of data from your Salesforce environments based on configurations defined in an SFDMU workspace. It's a powerful tool for various data-related tasks, including:\n\n- **Data Backup:** Creating snapshots of your Salesforce data.\n- **Data Migration:** Extracting data for transfer to another Salesforce org or external system.\n- **Reporting and Analysis:** Exporting specific datasets for detailed analysis outside of Salesforce.\n- **Data Seeding:** Preparing data for import into other environments.\n\nKey functionalities:\n\n- **SFDMU Workspace Integration:** Leverages an existing SFDMU workspace (defined by an `export.json` file) to determine which objects and records to export, along with any filtering or transformation rules.\n- **Interactive Workspace Selection:** If the SFDMU workspace path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Org Selection:** Ensures that a target Salesforce org is selected (either via the `--target-org` flag or through an interactive prompt) to specify the source of the data export.\n\nSee this article for a practical example:\n\n[![How to detect bad words in Salesforce records using SFDX Data Loader and sfdx-hardis](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-badwords.jpg)](https://nicolas.vuillamy.fr/how-to-detect-bad-words-in-salesforce-records-using-sfdx-data-loader-and-sfdx-hardis-171db40a9bac)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation relies heavily on the SFDMU plugin:\n\n- **SFDMU Integration:** It acts as a wrapper around the `sfdmu` plugin, which performs the actual data export operations. The command provides an assisted interface for SFDMU execution.\n- **`exportData` Utility:** The core logic for executing the SFDMU export process is encapsulated within the `exportData` utility function, which takes the SFDMU workspace path and the source username as arguments.\n- **Interactive Prompts:** Uses `selectDataWorkspace` to allow the user to choose an SFDMU project and `promptOrgUsernameDefault` for selecting the source Salesforce org when not running in a CI environment.\n- **Environment Awareness:** Checks the `isCI` flag to determine whether to run in an interactive mode (prompting for user input) or a non-interactive mode (relying solely on command-line flags).\n- **Required Plugin:** It explicitly lists `sfdmu` as a required plugin, ensuring that the necessary dependency is in place before execution.\n</details>\n",
5261
5261
  "examples": [
5262
- "$ sf hardis:org:data:export"
5262
+ "$ sf hardis:org:data:export",
5263
+ "$ sf hardis:org:data:export --project-name MyDataProject --target-org my-org@example.com",
5264
+ "$ sf hardis:org:data:export --path ./scripts/data/MyDataProject --no-prompt --target-org my-org@example.com"
5263
5265
  ],
5264
5266
  "flags": {
5265
5267
  "json": {
@@ -5277,6 +5279,14 @@
5277
5279
  "multiple": false,
5278
5280
  "type": "option"
5279
5281
  },
5282
+ "project-name": {
5283
+ "char": "n",
5284
+ "description": "Name of the sfdmu project to use (if not defined, you will be prompted to select one)",
5285
+ "name": "project-name",
5286
+ "hasDynamicHelp": false,
5287
+ "multiple": false,
5288
+ "type": "option"
5289
+ },
5280
5290
  "path": {
5281
5291
  "char": "p",
5282
5292
  "description": "Path to the sfdmu workspace folder",
@@ -5285,6 +5295,13 @@
5285
5295
  "multiple": false,
5286
5296
  "type": "option"
5287
5297
  },
5298
+ "no-prompt": {
5299
+ "char": "r",
5300
+ "description": "Do not prompt for Org, use default org",
5301
+ "name": "no-prompt",
5302
+ "allowNo": false,
5303
+ "type": "boolean"
5304
+ },
5288
5305
  "debug": {
5289
5306
  "char": "d",
5290
5307
  "description": "Activate debug mode (more logs)",
@@ -5376,7 +5393,10 @@
5376
5393
  "args": {},
5377
5394
  "description": "Import/Load data in an org using a [SFDX Data Loader](https://help.sfdmu.com/) Project\n\nIf you need to run this command in a production org, you need to either:\n\n- Define **sfdmuCanModify** in your .sfdx-hardis.yml config file. (Example: `sfdmuCanModify: prod-instance.my.salesforce.com`)\n- Define an environment variable SFDMU_CAN_MODIFY. (Example: `SFDMU_CAN_MODIFY=prod-instance.my.salesforce.com`)\n\nSee article:\n\n[![How to detect bad words in Salesforce records using SFDX Data Loader and sfdx-hardis](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-badwords.jpg)](https://nicolas.vuillamy.fr/how-to-detect-bad-words-in-salesforce-records-using-sfdx-data-loader-and-sfdx-hardis-171db40a9bac)\n",
5378
5395
  "examples": [
5379
- "$ sf hardis:org:data:import"
5396
+ "$ sf hardis:org:data:import",
5397
+ "$ sf hardis:org:data:import --project-name MyDataProject --target-org my-org@example.com",
5398
+ "$ sf hardis:org:data:import --path ./scripts/data/MyDataProject --no-prompt --target-org my-org@example.com",
5399
+ "$ SFDMU_CAN_MODIFY=prod-instance.my.salesforce.com sf hardis:org:data:import --project-name MyDataProject --target-org prod@example.com"
5380
5400
  ],
5381
5401
  "flags": {
5382
5402
  "json": {
@@ -5394,6 +5414,14 @@
5394
5414
  "multiple": false,
5395
5415
  "type": "option"
5396
5416
  },
5417
+ "project-name": {
5418
+ "char": "n",
5419
+ "description": "Name of the sfdmu project to use (if not defined, you will be prompted to select one)",
5420
+ "name": "project-name",
5421
+ "hasDynamicHelp": false,
5422
+ "multiple": false,
5423
+ "type": "option"
5424
+ },
5397
5425
  "path": {
5398
5426
  "char": "p",
5399
5427
  "description": "Path to the sfdmu workspace folder",
@@ -5402,6 +5430,13 @@
5402
5430
  "multiple": false,
5403
5431
  "type": "option"
5404
5432
  },
5433
+ "no-prompt": {
5434
+ "char": "r",
5435
+ "description": "Do not prompt for Org, use default org",
5436
+ "name": "no-prompt",
5437
+ "allowNo": false,
5438
+ "type": "boolean"
5439
+ },
5405
5440
  "debug": {
5406
5441
  "char": "d",
5407
5442
  "description": "Activate debug mode (more logs)",
@@ -7882,7 +7917,7 @@
7882
7917
  "hardis:org:refresh:after-refresh": {
7883
7918
  "aliases": [],
7884
7919
  "args": {},
7885
- "description": "\n## Command Behavior\n\n**Restores all previously backed-up Connected Apps (including Consumer Secrets) to a Salesforce org after a sandbox refresh.**\n\nThis command is the second step in the sandbox refresh process. It scans the backup folder created before the refresh, allows selection of which Connected Apps to restore, and automates their deletion and redeployment to the refreshed org, ensuring all credentials and configuration are preserved.\n\nKey functionalities:\n\n- **Backup Folder Selection:** Prompts the user to select the correct backup folder for the sandbox instance.\n- **Connected App Discovery:** Scans the backup for all Connected App metadata files.\n- **User Selection:** Allows interactive or flag-based selection of which Connected Apps to restore.\n- **Validation:** Ensures all selected apps exist in the backup and validates user input.\n- **Org Cleanup:** Deletes existing Connected Apps from the refreshed org to allow clean redeployment.\n- **Deployment:** Deploys the selected Connected Apps (with secrets) to the org.\n- **Summary and Reporting:** Provides a summary of restored apps and their status.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is designed to be run after a sandbox refresh, using the backup created by the before-refresh command.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Backup Folder Handling:** Prompts for and validates the backup folder under `scripts/sandbox-refresh/`.\n- **Metadata Scanning:** Uses glob patterns to find all `*.connectedApp - meta.xml` files in the backup.\n- **Selection Logic:** Supports `--all`, `--name`, and interactive selection of apps to restore.\n- **Validation:** Checks that all requested apps exist in the backup and provides clear errors if not.\n- **Org Operations:** Deletes existing Connected Apps from the org before redeployment to avoid conflicts.\n- **Deployment:** Uses utility functions to deploy Connected Apps and their secrets to the org.\n- **Error Handling:** Handles and reports errors at each step, including parsing and deployment issues.\n\n</details>\n",
7920
+ "description": "\n## Command Behavior\n\n**Restores all previously backed-up Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata to a Salesforce org after a sandbox refresh.**\n\nThis command is the second step in the sandbox refresh process. It scans the backup folder created before the refresh, allows interactive or flag-driven selection of items to restore, and automates cleanup and redeployment to the refreshed org while preserving credentials and configuration.\n\nKey functionalities:\n\n- **Choose a backup to restore:** Lets you pick the saved sandbox project that contains the artifacts to restore.\n- **Select which items to restore:** Finds Connected App XMLs, certificates, custom settings and other artifacts and lets you pick what to restore (or restore all).\n- **Safety checks and validation:** Confirms files exist and prompts before making changes to the target org.\n- **Prepare org for restore:** Optionally cleans up existing Connected Apps so saved apps can be re-deployed without conflict.\n- **Redeploy saved artifacts:** Restores Connected Apps (with saved secrets), certificates, SAML SSO configs, custom settings and other metadata.\n- **Handle SAML configs:** Cleans and updates SAML XML files and helps you choose certificates to wire into restored configs.\n- **Restore records:** Optionally runs data import from selected SFDMU workspaces to restore record data.\n- **Reporting & persistence:** Sends restore reports and can update project config to record what was restored.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run after a sandbox refresh to re-apply saved metadata, credentials and data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Backup Folder Handling:** Reads the immediate subfolders of `scripts/sandbox-refresh/` and validates the chosen project contains the expected `manifest/` and `force-app` layout.\n- **Metadata & Deployment APIs:** Uses `sf project deploy start --manifest` for package-based deploys, `sf project deploy start --metadata-dir` for MDAPI artifacts (certificates), and utility functions for Connected App deployment that preserve consumer secrets.\n- **SAML Handling:** Queries active certificates via tooling API, updates SAML XML files, and deploys using `sf project deploy start -m SamlSsoConfig`.\n- **Records Handling:** Uses interactive selection of SFDMU workspaces and runs data import utilities to restore records.\n- **Error Handling & Summary:** Aggregates results, logs success/warnings/errors, and returns a structured result indicating which items were restored and any failures.\n\n</details>\n",
7886
7921
  "examples": [
7887
7922
  "$ sf hardis:org:refresh:after-refresh",
7888
7923
  "$ sf hardis:org:refresh:after-refresh --name \"MyConnectedApp\" // Process specific app, no selection prompt",
@@ -7999,7 +8034,7 @@
7999
8034
  "hardis:org:refresh:before-refresh": {
8000
8035
  "aliases": [],
8001
8036
  "args": {},
8002
- "description": "\n## Command Behavior\n\n**Backs up all Connected Apps, their secrets, certificates, and custom settings from a Salesforce org before a sandbox refresh, enabling full restoration after the refresh.**\n\nThis command is essential for Salesforce sandbox refresh operations where Connected Apps (and their Consumer Secrets), certificates, and custom settings would otherwise be lost. It automates the extraction, secure storage, and (optionally) deletion of Connected Apps, ensuring that all credentials and configuration can be restored post-refresh.\n\nKey functionalities:\n\n- **Connected App Discovery:** Lists all Connected Apps in the org, with options to filter by name, process all, or interactively select.\n- **User Selection:** Allows interactive or flag-based selection of which Connected Apps to back up.\n- **Metadata Retrieval:** Retrieves Connected App metadata and saves it in a dedicated project folder for the sandbox instance.\n- **Consumer Secret Extraction:** Attempts to extract Consumer Secrets automatically using browser automation (Puppeteer), or prompts for manual entry if automation fails.\n- **Config Persistence:** Stores the list of selected apps in the project config for use during restoration.\n- **Optional Deletion:** Can delete the Connected Apps from the org after backup, as required for re-upload after refresh.\n- **Certificate Backup:** Retrieves all org certificates and their definitions, saving them for later restoration.\n- **Custom Settings Backup:** Lists all custom settings in the org, allows user selection, and exports their data to JSON files for backup.\n- **Summary and Reporting:** Provides a summary of actions, including which apps, certificates, and custom settings were saved and whether secrets were captured.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is designed to be run before a sandbox refresh. It ensures that all Connected Apps, secrets, certificates, and custom settings are safely stored for later restoration.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Salesforce CLI Integration:** Uses `sf org list metadata`, `sf project retrieve start`, and other CLI commands to discover and retrieve Connected Apps, certificates, and custom settings.\n- **Metadata Handling:** Saves Connected App XML files and certificate files in a dedicated folder under `scripts/sandbox-refresh/<sandbox-folder>`.\n- **Consumer Secret Handling:** Uses Puppeteer to automate browser login and extraction of Consumer Secrets, falling back to manual prompts if needed.\n- **Custom Settings Handling:** Lists all custom settings, allows user selection, and exports their data using `sf data tree export` to JSON files.\n- **Config Management:** Updates `config/.sfdx-hardis.yml` with the list of selected apps for later use.\n- **Deletion Logic:** Optionally deletes Connected Apps from the org (required for re-upload after refresh), with user confirmation unless running in CI or with `--delete` flag.\n- **Error Handling:** Provides detailed error messages and guidance if retrieval or extraction fails.\n- **Reporting:** Sends summary and configuration files to the WebSocket client for reporting and traceability.\n\n</details>\n",
8037
+ "description": "\n## Command Behavior\n\n**Backs up all Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata from a Salesforce org before a sandbox refresh, enabling full restoration after the refresh.**\n\nThis command prepares a complete backup prior to a sandbox refresh. It creates a dedicated project under `scripts/sandbox-refresh/<sandbox-folder>`, retrieves metadata and data, attempts to capture Connected App consumer secrets, and can optionally delete the apps so they can be reuploaded after the refresh.\n\nKey functionalities:\n\n- **Create a save project:** Generates a dedicated project folder to store all artifacts for the sandbox backup.\n- **Find and select Connected Apps:** Lists Connected Apps in the org and lets you pick specific apps, use a name filter, or process all apps.\n- **Save metadata for restore:** Builds a manifest and retrieves the metadata types you choose so they can be restored after the refresh.\n- **Capture Consumer Secrets:** Attempts to capture Connected App consumer secrets automatically (opens a browser session when possible) and falls back to a short manual prompt when needed.\n- **Collect certificates:** Saves certificate files and their definitions so they can be redeployed later.\n- **Export custom settings & records:** Lets you pick custom settings to export as JSON and optionally export records using configured data workspaces.\n- **Persist choices & report:** Stores your backup choices in project config and sends report files for traceability.\n- **Optional cleanup:** Can delete backed-up Connected Apps from the org so they can be re-uploaded cleanly after the refresh.\n- **Interactive safety checks:** Prompts you to confirm package contents and other potentially destructive actions; sensible defaults are chosen where appropriate.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run before a sandbox refresh so that all credentials, certificates, metadata and data can be restored afterwards.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Salesforce CLI Integration:** Uses `sf org list metadata`, `sf project retrieve start`, `sf project generate`, `sf project deploy start`, and `sf data tree export`/`import` where applicable.\n- **Metadata Handling:** Writes and reads package XML files under the generated project (`manifest/`), copies MDAPI certificate artifacts into `force-app/main/default/certs`, and produces `package-metadata-to-restore.xml` for post-refresh deployment.\n- **Consumer Secret Handling:** Uses `puppeteer-core` with an executable path from `getChromeExecutablePath()` (env var `PUPPETEER_EXECUTABLE_PATH` may be required). Falls back to manual prompt when browser automation cannot be used.\n- **Data & Records:** Exports custom settings to JSON and supports exporting records through SFDMU workspaces chosen interactively.\n- **Config & Reporting:** Updates project/user config under `config/.sfdx-hardis.yml#refreshSandboxConfig` and reports artifacts to the WebSocket client.\n- **Error Handling:** Provides clear error messages and a summary response object indicating success/failure and which secrets were captured.\n\n</details>\n",
8003
8038
  "examples": [
8004
8039
  "$ sf hardis:org:refresh:before-refresh",
8005
8040
  "$ sf hardis:org:refresh:before-refresh --name \"MyConnectedApp\"",
@@ -11126,14 +11161,12 @@
11126
11161
  "xml:clean:project:hardis"
11127
11162
  ]
11128
11163
  },
11129
- "hardis:project:deploy:notify": {
11164
+ "hardis:project:convert:profilestopermsets": {
11130
11165
  "aliases": [],
11131
11166
  "args": {},
11132
- "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",
11167
+ "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",
11133
11168
  "examples": [
11134
- "$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
11135
- "$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
11136
- "$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
11169
+ "$ sf hardis:project:convert:profilestopermsets"
11137
11170
  ],
11138
11171
  "flags": {
11139
11172
  "json": {
@@ -11151,23 +11184,343 @@
11151
11184
  "multiple": false,
11152
11185
  "type": "option"
11153
11186
  },
11154
- "check-only": {
11155
- "char": "c",
11156
- "description": "Use this option to send notifications from a Deployment simulation job",
11157
- "name": "check-only",
11187
+ "except": {
11188
+ "char": "e",
11189
+ "description": "List of filters",
11190
+ "name": "except",
11191
+ "default": [],
11192
+ "hasDynamicHelp": false,
11193
+ "multiple": true,
11194
+ "type": "option"
11195
+ },
11196
+ "debug": {
11197
+ "char": "d",
11198
+ "description": "Activate debug mode (more logs)",
11199
+ "name": "debug",
11158
11200
  "allowNo": false,
11159
11201
  "type": "boolean"
11160
11202
  },
11161
- "deploy-status": {
11162
- "char": "s",
11163
- "description": "Send success, failure or unknown (default) to indicate if the deployment or deployment simulation is in success or not",
11164
- "name": "deploy-status",
11165
- "default": "unknown",
11203
+ "websocket": {
11204
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11205
+ "name": "websocket",
11166
11206
  "hasDynamicHelp": false,
11167
11207
  "multiple": false,
11168
- "options": [
11169
- "valid",
11170
- "invalid",
11208
+ "type": "option"
11209
+ },
11210
+ "skipauth": {
11211
+ "description": "Skip authentication check when a default username is required",
11212
+ "name": "skipauth",
11213
+ "allowNo": false,
11214
+ "type": "boolean"
11215
+ }
11216
+ },
11217
+ "hasDynamicHelp": false,
11218
+ "hiddenAliases": [],
11219
+ "id": "hardis:project:convert:profilestopermsets",
11220
+ "pluginAlias": "sfdx-hardis",
11221
+ "pluginName": "sfdx-hardis",
11222
+ "pluginType": "core",
11223
+ "strict": true,
11224
+ "enableJsonFlag": true,
11225
+ "title": "Convert Profiles into Permission Sets",
11226
+ "requiresProject": true,
11227
+ "requiresSfdxPlugins": [
11228
+ "shane-sfdx-plugins"
11229
+ ],
11230
+ "isESM": true,
11231
+ "relativePath": [
11232
+ "lib",
11233
+ "commands",
11234
+ "hardis",
11235
+ "project",
11236
+ "convert",
11237
+ "profilestopermsets.js"
11238
+ ],
11239
+ "aliasPermutations": [],
11240
+ "permutations": [
11241
+ "hardis:project:convert:profilestopermsets",
11242
+ "project:hardis:convert:profilestopermsets",
11243
+ "project:convert:hardis:profilestopermsets",
11244
+ "project:convert:profilestopermsets:hardis",
11245
+ "hardis:convert:project:profilestopermsets",
11246
+ "convert:hardis:project:profilestopermsets",
11247
+ "convert:project:hardis:profilestopermsets",
11248
+ "convert:project:profilestopermsets:hardis",
11249
+ "hardis:convert:profilestopermsets:project",
11250
+ "convert:hardis:profilestopermsets:project",
11251
+ "convert:profilestopermsets:hardis:project",
11252
+ "convert:profilestopermsets:project:hardis",
11253
+ "hardis:project:profilestopermsets:convert",
11254
+ "project:hardis:profilestopermsets:convert",
11255
+ "project:profilestopermsets:hardis:convert",
11256
+ "project:profilestopermsets:convert:hardis",
11257
+ "hardis:profilestopermsets:project:convert",
11258
+ "profilestopermsets:hardis:project:convert",
11259
+ "profilestopermsets:project:hardis:convert",
11260
+ "profilestopermsets:project:convert:hardis",
11261
+ "hardis:profilestopermsets:convert:project",
11262
+ "profilestopermsets:hardis:convert:project",
11263
+ "profilestopermsets:convert:hardis:project",
11264
+ "profilestopermsets:convert:project:hardis"
11265
+ ]
11266
+ },
11267
+ "hardis:project:fix:profiletabs": {
11268
+ "aliases": [],
11269
+ "args": {},
11270
+ "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",
11271
+ "examples": [
11272
+ "$ sf hardis:project:fix:profiletabs"
11273
+ ],
11274
+ "flags": {
11275
+ "json": {
11276
+ "description": "Format output as json.",
11277
+ "helpGroup": "GLOBAL",
11278
+ "name": "json",
11279
+ "allowNo": false,
11280
+ "type": "boolean"
11281
+ },
11282
+ "flags-dir": {
11283
+ "helpGroup": "GLOBAL",
11284
+ "name": "flags-dir",
11285
+ "summary": "Import flag values from a directory.",
11286
+ "hasDynamicHelp": false,
11287
+ "multiple": false,
11288
+ "type": "option"
11289
+ },
11290
+ "path": {
11291
+ "char": "p",
11292
+ "description": "Root folder",
11293
+ "name": "path",
11294
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11295
+ "hasDynamicHelp": false,
11296
+ "multiple": false,
11297
+ "type": "option"
11298
+ },
11299
+ "debug": {
11300
+ "char": "d",
11301
+ "description": "Activate debug mode (more logs)",
11302
+ "name": "debug",
11303
+ "allowNo": false,
11304
+ "type": "boolean"
11305
+ },
11306
+ "websocket": {
11307
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11308
+ "name": "websocket",
11309
+ "hasDynamicHelp": false,
11310
+ "multiple": false,
11311
+ "type": "option"
11312
+ },
11313
+ "skipauth": {
11314
+ "description": "Skip authentication check when a default username is required",
11315
+ "name": "skipauth",
11316
+ "allowNo": false,
11317
+ "type": "boolean"
11318
+ },
11319
+ "target-org": {
11320
+ "aliases": [
11321
+ "targetusername",
11322
+ "u"
11323
+ ],
11324
+ "char": "o",
11325
+ "deprecateAliases": true,
11326
+ "name": "target-org",
11327
+ "noCacheDefault": true,
11328
+ "required": true,
11329
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
11330
+ "hasDynamicHelp": true,
11331
+ "multiple": false,
11332
+ "type": "option"
11333
+ }
11334
+ },
11335
+ "hasDynamicHelp": true,
11336
+ "hiddenAliases": [],
11337
+ "id": "hardis:project:fix:profiletabs",
11338
+ "pluginAlias": "sfdx-hardis",
11339
+ "pluginName": "sfdx-hardis",
11340
+ "pluginType": "core",
11341
+ "strict": true,
11342
+ "enableJsonFlag": true,
11343
+ "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
11344
+ "requiresProject": true,
11345
+ "isESM": true,
11346
+ "relativePath": [
11347
+ "lib",
11348
+ "commands",
11349
+ "hardis",
11350
+ "project",
11351
+ "fix",
11352
+ "profiletabs.js"
11353
+ ],
11354
+ "aliasPermutations": [],
11355
+ "permutations": [
11356
+ "hardis:project:fix:profiletabs",
11357
+ "project:hardis:fix:profiletabs",
11358
+ "project:fix:hardis:profiletabs",
11359
+ "project:fix:profiletabs:hardis",
11360
+ "hardis:fix:project:profiletabs",
11361
+ "fix:hardis:project:profiletabs",
11362
+ "fix:project:hardis:profiletabs",
11363
+ "fix:project:profiletabs:hardis",
11364
+ "hardis:fix:profiletabs:project",
11365
+ "fix:hardis:profiletabs:project",
11366
+ "fix:profiletabs:hardis:project",
11367
+ "fix:profiletabs:project:hardis",
11368
+ "hardis:project:profiletabs:fix",
11369
+ "project:hardis:profiletabs:fix",
11370
+ "project:profiletabs:hardis:fix",
11371
+ "project:profiletabs:fix:hardis",
11372
+ "hardis:profiletabs:project:fix",
11373
+ "profiletabs:hardis:project:fix",
11374
+ "profiletabs:project:hardis:fix",
11375
+ "profiletabs:project:fix:hardis",
11376
+ "hardis:profiletabs:fix:project",
11377
+ "profiletabs:hardis:fix:project",
11378
+ "profiletabs:fix:hardis:project",
11379
+ "profiletabs:fix:project:hardis"
11380
+ ]
11381
+ },
11382
+ "hardis:project:fix:v53flexipages": {
11383
+ "aliases": [],
11384
+ "args": {},
11385
+ "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",
11386
+ "examples": [
11387
+ "$ sf hardis:project:fix:v53flexipages"
11388
+ ],
11389
+ "flags": {
11390
+ "json": {
11391
+ "description": "Format output as json.",
11392
+ "helpGroup": "GLOBAL",
11393
+ "name": "json",
11394
+ "allowNo": false,
11395
+ "type": "boolean"
11396
+ },
11397
+ "flags-dir": {
11398
+ "helpGroup": "GLOBAL",
11399
+ "name": "flags-dir",
11400
+ "summary": "Import flag values from a directory.",
11401
+ "hasDynamicHelp": false,
11402
+ "multiple": false,
11403
+ "type": "option"
11404
+ },
11405
+ "path": {
11406
+ "char": "p",
11407
+ "description": "Root folder",
11408
+ "name": "path",
11409
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11410
+ "hasDynamicHelp": false,
11411
+ "multiple": false,
11412
+ "type": "option"
11413
+ },
11414
+ "debug": {
11415
+ "char": "d",
11416
+ "description": "Activate debug mode (more logs)",
11417
+ "name": "debug",
11418
+ "allowNo": false,
11419
+ "type": "boolean"
11420
+ },
11421
+ "websocket": {
11422
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11423
+ "name": "websocket",
11424
+ "hasDynamicHelp": false,
11425
+ "multiple": false,
11426
+ "type": "option"
11427
+ },
11428
+ "skipauth": {
11429
+ "description": "Skip authentication check when a default username is required",
11430
+ "name": "skipauth",
11431
+ "allowNo": false,
11432
+ "type": "boolean"
11433
+ }
11434
+ },
11435
+ "hasDynamicHelp": false,
11436
+ "hiddenAliases": [],
11437
+ "id": "hardis:project:fix:v53flexipages",
11438
+ "pluginAlias": "sfdx-hardis",
11439
+ "pluginName": "sfdx-hardis",
11440
+ "pluginType": "core",
11441
+ "strict": true,
11442
+ "enableJsonFlag": true,
11443
+ "title": "Fix flexipages for v53",
11444
+ "requiresProject": true,
11445
+ "isESM": true,
11446
+ "relativePath": [
11447
+ "lib",
11448
+ "commands",
11449
+ "hardis",
11450
+ "project",
11451
+ "fix",
11452
+ "v53flexipages.js"
11453
+ ],
11454
+ "aliasPermutations": [],
11455
+ "permutations": [
11456
+ "hardis:project:fix:v53flexipages",
11457
+ "project:hardis:fix:v53flexipages",
11458
+ "project:fix:hardis:v53flexipages",
11459
+ "project:fix:v53flexipages:hardis",
11460
+ "hardis:fix:project:v53flexipages",
11461
+ "fix:hardis:project:v53flexipages",
11462
+ "fix:project:hardis:v53flexipages",
11463
+ "fix:project:v53flexipages:hardis",
11464
+ "hardis:fix:v53flexipages:project",
11465
+ "fix:hardis:v53flexipages:project",
11466
+ "fix:v53flexipages:hardis:project",
11467
+ "fix:v53flexipages:project:hardis",
11468
+ "hardis:project:v53flexipages:fix",
11469
+ "project:hardis:v53flexipages:fix",
11470
+ "project:v53flexipages:hardis:fix",
11471
+ "project:v53flexipages:fix:hardis",
11472
+ "hardis:v53flexipages:project:fix",
11473
+ "v53flexipages:hardis:project:fix",
11474
+ "v53flexipages:project:hardis:fix",
11475
+ "v53flexipages:project:fix:hardis",
11476
+ "hardis:v53flexipages:fix:project",
11477
+ "v53flexipages:hardis:fix:project",
11478
+ "v53flexipages:fix:hardis:project",
11479
+ "v53flexipages:fix:project:hardis"
11480
+ ]
11481
+ },
11482
+ "hardis:project:deploy:notify": {
11483
+ "aliases": [],
11484
+ "args": {},
11485
+ "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",
11486
+ "examples": [
11487
+ "$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
11488
+ "$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
11489
+ "$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
11490
+ ],
11491
+ "flags": {
11492
+ "json": {
11493
+ "description": "Format output as json.",
11494
+ "helpGroup": "GLOBAL",
11495
+ "name": "json",
11496
+ "allowNo": false,
11497
+ "type": "boolean"
11498
+ },
11499
+ "flags-dir": {
11500
+ "helpGroup": "GLOBAL",
11501
+ "name": "flags-dir",
11502
+ "summary": "Import flag values from a directory.",
11503
+ "hasDynamicHelp": false,
11504
+ "multiple": false,
11505
+ "type": "option"
11506
+ },
11507
+ "check-only": {
11508
+ "char": "c",
11509
+ "description": "Use this option to send notifications from a Deployment simulation job",
11510
+ "name": "check-only",
11511
+ "allowNo": false,
11512
+ "type": "boolean"
11513
+ },
11514
+ "deploy-status": {
11515
+ "char": "s",
11516
+ "description": "Send success, failure or unknown (default) to indicate if the deployment or deployment simulation is in success or not",
11517
+ "name": "deploy-status",
11518
+ "default": "unknown",
11519
+ "hasDynamicHelp": false,
11520
+ "multiple": false,
11521
+ "options": [
11522
+ "valid",
11523
+ "invalid",
11171
11524
  "unknown"
11172
11525
  ],
11173
11526
  "type": "option"
@@ -12524,255 +12877,28 @@
12524
12877
  "type": "boolean"
12525
12878
  },
12526
12879
  "websocket": {
12527
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12528
- "name": "websocket",
12529
- "hasDynamicHelp": false,
12530
- "multiple": false,
12531
- "type": "option"
12532
- },
12533
- "skipauth": {
12534
- "description": "Skip authentication check when a default username is required",
12535
- "name": "skipauth",
12536
- "allowNo": false,
12537
- "type": "boolean"
12538
- }
12539
- },
12540
- "hasDynamicHelp": false,
12541
- "hiddenAliases": [],
12542
- "id": "hardis:project:generate:flow-git-diff",
12543
- "pluginAlias": "sfdx-hardis",
12544
- "pluginName": "sfdx-hardis",
12545
- "pluginType": "core",
12546
- "strict": true,
12547
- "enableJsonFlag": true,
12548
- "title": "Generate Flow Visual Gif Diff",
12549
- "requiresProject": true,
12550
- "isESM": true,
12551
- "relativePath": [
12552
- "lib",
12553
- "commands",
12554
- "hardis",
12555
- "project",
12556
- "generate",
12557
- "flow-git-diff.js"
12558
- ],
12559
- "aliasPermutations": [],
12560
- "permutations": [
12561
- "hardis:project:generate:flow-git-diff",
12562
- "project:hardis:generate:flow-git-diff",
12563
- "project:generate:hardis:flow-git-diff",
12564
- "project:generate:flow-git-diff:hardis",
12565
- "hardis:generate:project:flow-git-diff",
12566
- "generate:hardis:project:flow-git-diff",
12567
- "generate:project:hardis:flow-git-diff",
12568
- "generate:project:flow-git-diff:hardis",
12569
- "hardis:generate:flow-git-diff:project",
12570
- "generate:hardis:flow-git-diff:project",
12571
- "generate:flow-git-diff:hardis:project",
12572
- "generate:flow-git-diff:project:hardis",
12573
- "hardis:project:flow-git-diff:generate",
12574
- "project:hardis:flow-git-diff:generate",
12575
- "project:flow-git-diff:hardis:generate",
12576
- "project:flow-git-diff:generate:hardis",
12577
- "hardis:flow-git-diff:project:generate",
12578
- "flow-git-diff:hardis:project:generate",
12579
- "flow-git-diff:project:hardis:generate",
12580
- "flow-git-diff:project:generate:hardis",
12581
- "hardis:flow-git-diff:generate:project",
12582
- "flow-git-diff:hardis:generate:project",
12583
- "flow-git-diff:generate:hardis:project",
12584
- "flow-git-diff:generate:project:hardis"
12585
- ]
12586
- },
12587
- "hardis:project:generate:gitdelta": {
12588
- "aliases": [],
12589
- "args": {},
12590
- "description": "\n## Command Behavior\n\n**Generates a `package.xml` and `destructiveChanges.xml` representing the metadata differences between two Git commits.**\n\nThis command is a powerful tool for managing Salesforce metadata deployments by focusing only on the changes between specific points in your version control history. It leverages `sfdx-git-delta` to accurately identify added, modified, and deleted metadata components.\n\nKey functionalities:\n\n- **Commit-Based Comparison:** Allows you to specify a starting commit (`--fromcommit`) and an ending commit (`--tocommit`) to define the scope of the delta. If not provided, interactive prompts will guide you through selecting commits from your Git history.\n- **Branch Selection:** You can specify a Git branch (`--branch`) to work with. If not provided, it will prompt you to select one.\n- **`package.xml` Generation:** Creates a `package.xml` file that lists all metadata components that have been added or modified between the specified commits.\n- **`destructiveChanges.xml` Generation:** Creates a `destructiveChanges.xml` file that lists all metadata components that have been deleted between the specified commits.\n- **Temporary File Output:** The generated `package.xml` and `destructiveChanges.xml` files are placed in a temporary directory.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Git Integration:** Uses `simple-git` (`git()`) to interact with the Git repository, including fetching branches (`git().fetch()`), checking out branches (`git().checkoutBranch()`), and listing commit history (`git().log()`).\n- **Interactive Prompts:** Leverages the `prompts` library to guide the user through selecting a Git branch and specific commits for delta generation if they are not provided as command-line arguments.\n- **`sfdx-git-delta` Integration:** The core of the delta generation is handled by the `callSfdxGitDelta` utility function, which wraps the `sfdx-git-delta` tool. This tool performs the actual Git comparison and generates the `package.xml` and `destructiveChanges.xml` files.\n- **Temporary Directory Management:** Uses `createTempDir` to create a temporary directory for storing the generated XML files, ensuring a clean working environment.\n- **File System Operations:** Uses `fs-extra` to manage temporary files and directories.\n- **User Feedback:** Provides clear messages to the user about the generated files and their locations.\n</details>\n",
12591
- "examples": [
12592
- "$ sf hardis:project:generate:gitdelta"
12593
- ],
12594
- "flags": {
12595
- "json": {
12596
- "description": "Format output as json.",
12597
- "helpGroup": "GLOBAL",
12598
- "name": "json",
12599
- "allowNo": false,
12600
- "type": "boolean"
12601
- },
12602
- "flags-dir": {
12603
- "helpGroup": "GLOBAL",
12604
- "name": "flags-dir",
12605
- "summary": "Import flag values from a directory.",
12606
- "hasDynamicHelp": false,
12607
- "multiple": false,
12608
- "type": "option"
12609
- },
12610
- "branch": {
12611
- "description": "Git branch to use to generate delta",
12612
- "name": "branch",
12613
- "hasDynamicHelp": false,
12614
- "multiple": false,
12615
- "type": "option"
12616
- },
12617
- "fromcommit": {
12618
- "description": "Hash of commit to start from",
12619
- "name": "fromcommit",
12620
- "hasDynamicHelp": false,
12621
- "multiple": false,
12622
- "type": "option"
12623
- },
12624
- "tocommit": {
12625
- "description": "Hash of commit to stop at",
12626
- "name": "tocommit",
12627
- "hasDynamicHelp": false,
12628
- "multiple": false,
12629
- "type": "option"
12630
- },
12631
- "debug": {
12632
- "char": "d",
12633
- "description": "Activate debug mode (more logs)",
12634
- "name": "debug",
12635
- "allowNo": false,
12636
- "type": "boolean"
12637
- },
12638
- "websocket": {
12639
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12640
- "name": "websocket",
12641
- "hasDynamicHelp": false,
12642
- "multiple": false,
12643
- "type": "option"
12644
- },
12645
- "skipauth": {
12646
- "description": "Skip authentication check when a default username is required",
12647
- "name": "skipauth",
12648
- "allowNo": false,
12649
- "type": "boolean"
12650
- }
12651
- },
12652
- "hasDynamicHelp": false,
12653
- "hiddenAliases": [],
12654
- "id": "hardis:project:generate:gitdelta",
12655
- "pluginAlias": "sfdx-hardis",
12656
- "pluginName": "sfdx-hardis",
12657
- "pluginType": "core",
12658
- "strict": true,
12659
- "enableJsonFlag": true,
12660
- "title": "Generate Git Delta",
12661
- "requiresProject": false,
12662
- "isESM": true,
12663
- "relativePath": [
12664
- "lib",
12665
- "commands",
12666
- "hardis",
12667
- "project",
12668
- "generate",
12669
- "gitdelta.js"
12670
- ],
12671
- "aliasPermutations": [],
12672
- "permutations": [
12673
- "hardis:project:generate:gitdelta",
12674
- "project:hardis:generate:gitdelta",
12675
- "project:generate:hardis:gitdelta",
12676
- "project:generate:gitdelta:hardis",
12677
- "hardis:generate:project:gitdelta",
12678
- "generate:hardis:project:gitdelta",
12679
- "generate:project:hardis:gitdelta",
12680
- "generate:project:gitdelta:hardis",
12681
- "hardis:generate:gitdelta:project",
12682
- "generate:hardis:gitdelta:project",
12683
- "generate:gitdelta:hardis:project",
12684
- "generate:gitdelta:project:hardis",
12685
- "hardis:project:gitdelta:generate",
12686
- "project:hardis:gitdelta:generate",
12687
- "project:gitdelta:hardis:generate",
12688
- "project:gitdelta:generate:hardis",
12689
- "hardis:gitdelta:project:generate",
12690
- "gitdelta:hardis:project:generate",
12691
- "gitdelta:project:hardis:generate",
12692
- "gitdelta:project:generate:hardis",
12693
- "hardis:gitdelta:generate:project",
12694
- "gitdelta:hardis:generate:project",
12695
- "gitdelta:generate:hardis:project",
12696
- "gitdelta:generate:project:hardis"
12697
- ]
12698
- },
12699
- "hardis:project:fix:profiletabs": {
12700
- "aliases": [],
12701
- "args": {},
12702
- "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",
12703
- "examples": [
12704
- "$ sf hardis:project:fix:profiletabs"
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
- "target-org": {
12752
- "aliases": [
12753
- "targetusername",
12754
- "u"
12755
- ],
12756
- "char": "o",
12757
- "deprecateAliases": true,
12758
- "name": "target-org",
12759
- "noCacheDefault": true,
12760
- "required": true,
12761
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
12762
- "hasDynamicHelp": true,
12880
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12881
+ "name": "websocket",
12882
+ "hasDynamicHelp": false,
12763
12883
  "multiple": false,
12764
12884
  "type": "option"
12885
+ },
12886
+ "skipauth": {
12887
+ "description": "Skip authentication check when a default username is required",
12888
+ "name": "skipauth",
12889
+ "allowNo": false,
12890
+ "type": "boolean"
12765
12891
  }
12766
12892
  },
12767
- "hasDynamicHelp": true,
12893
+ "hasDynamicHelp": false,
12768
12894
  "hiddenAliases": [],
12769
- "id": "hardis:project:fix:profiletabs",
12895
+ "id": "hardis:project:generate:flow-git-diff",
12770
12896
  "pluginAlias": "sfdx-hardis",
12771
12897
  "pluginName": "sfdx-hardis",
12772
12898
  "pluginType": "core",
12773
12899
  "strict": true,
12774
12900
  "enableJsonFlag": true,
12775
- "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
12901
+ "title": "Generate Flow Visual Gif Diff",
12776
12902
  "requiresProject": true,
12777
12903
  "isESM": true,
12778
12904
  "relativePath": [
@@ -12780,43 +12906,43 @@
12780
12906
  "commands",
12781
12907
  "hardis",
12782
12908
  "project",
12783
- "fix",
12784
- "profiletabs.js"
12909
+ "generate",
12910
+ "flow-git-diff.js"
12785
12911
  ],
12786
12912
  "aliasPermutations": [],
12787
12913
  "permutations": [
12788
- "hardis:project:fix:profiletabs",
12789
- "project:hardis:fix:profiletabs",
12790
- "project:fix:hardis:profiletabs",
12791
- "project:fix:profiletabs:hardis",
12792
- "hardis:fix:project:profiletabs",
12793
- "fix:hardis:project:profiletabs",
12794
- "fix:project:hardis:profiletabs",
12795
- "fix:project:profiletabs:hardis",
12796
- "hardis:fix:profiletabs:project",
12797
- "fix:hardis:profiletabs:project",
12798
- "fix:profiletabs:hardis:project",
12799
- "fix:profiletabs:project:hardis",
12800
- "hardis:project:profiletabs:fix",
12801
- "project:hardis:profiletabs:fix",
12802
- "project:profiletabs:hardis:fix",
12803
- "project:profiletabs:fix:hardis",
12804
- "hardis:profiletabs:project:fix",
12805
- "profiletabs:hardis:project:fix",
12806
- "profiletabs:project:hardis:fix",
12807
- "profiletabs:project:fix:hardis",
12808
- "hardis:profiletabs:fix:project",
12809
- "profiletabs:hardis:fix:project",
12810
- "profiletabs:fix:hardis:project",
12811
- "profiletabs:fix:project:hardis"
12914
+ "hardis:project:generate:flow-git-diff",
12915
+ "project:hardis:generate:flow-git-diff",
12916
+ "project:generate:hardis:flow-git-diff",
12917
+ "project:generate:flow-git-diff:hardis",
12918
+ "hardis:generate:project:flow-git-diff",
12919
+ "generate:hardis:project:flow-git-diff",
12920
+ "generate:project:hardis:flow-git-diff",
12921
+ "generate:project:flow-git-diff:hardis",
12922
+ "hardis:generate:flow-git-diff:project",
12923
+ "generate:hardis:flow-git-diff:project",
12924
+ "generate:flow-git-diff:hardis:project",
12925
+ "generate:flow-git-diff:project:hardis",
12926
+ "hardis:project:flow-git-diff:generate",
12927
+ "project:hardis:flow-git-diff:generate",
12928
+ "project:flow-git-diff:hardis:generate",
12929
+ "project:flow-git-diff:generate:hardis",
12930
+ "hardis:flow-git-diff:project:generate",
12931
+ "flow-git-diff:hardis:project:generate",
12932
+ "flow-git-diff:project:hardis:generate",
12933
+ "flow-git-diff:project:generate:hardis",
12934
+ "hardis:flow-git-diff:generate:project",
12935
+ "flow-git-diff:hardis:generate:project",
12936
+ "flow-git-diff:generate:hardis:project",
12937
+ "flow-git-diff:generate:project:hardis"
12812
12938
  ]
12813
12939
  },
12814
- "hardis:project:fix:v53flexipages": {
12940
+ "hardis:project:generate:gitdelta": {
12815
12941
  "aliases": [],
12816
12942
  "args": {},
12817
- "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",
12943
+ "description": "\n## Command Behavior\n\n**Generates a `package.xml` and `destructiveChanges.xml` representing the metadata differences between two Git commits.**\n\nThis command is a powerful tool for managing Salesforce metadata deployments by focusing only on the changes between specific points in your version control history. It leverages `sfdx-git-delta` to accurately identify added, modified, and deleted metadata components.\n\nKey functionalities:\n\n- **Commit-Based Comparison:** Allows you to specify a starting commit (`--fromcommit`) and an ending commit (`--tocommit`) to define the scope of the delta. If not provided, interactive prompts will guide you through selecting commits from your Git history.\n- **Branch Selection:** You can specify a Git branch (`--branch`) to work with. If not provided, it will prompt you to select one.\n- **`package.xml` Generation:** Creates a `package.xml` file that lists all metadata components that have been added or modified between the specified commits.\n- **`destructiveChanges.xml` Generation:** Creates a `destructiveChanges.xml` file that lists all metadata components that have been deleted between the specified commits.\n- **Temporary File Output:** The generated `package.xml` and `destructiveChanges.xml` files are placed in a temporary directory.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Git Integration:** Uses `simple-git` (`git()`) to interact with the Git repository, including fetching branches (`git().fetch()`), checking out branches (`git().checkoutBranch()`), and listing commit history (`git().log()`).\n- **Interactive Prompts:** Leverages the `prompts` library to guide the user through selecting a Git branch and specific commits for delta generation if they are not provided as command-line arguments.\n- **`sfdx-git-delta` Integration:** The core of the delta generation is handled by the `callSfdxGitDelta` utility function, which wraps the `sfdx-git-delta` tool. This tool performs the actual Git comparison and generates the `package.xml` and `destructiveChanges.xml` files.\n- **Temporary Directory Management:** Uses `createTempDir` to create a temporary directory for storing the generated XML files, ensuring a clean working environment.\n- **File System Operations:** Uses `fs-extra` to manage temporary files and directories.\n- **User Feedback:** Provides clear messages to the user about the generated files and their locations.\n</details>\n",
12818
12944
  "examples": [
12819
- "$ sf hardis:project:fix:v53flexipages"
12945
+ "$ sf hardis:project:generate:gitdelta"
12820
12946
  ],
12821
12947
  "flags": {
12822
12948
  "json": {
@@ -12834,11 +12960,23 @@
12834
12960
  "multiple": false,
12835
12961
  "type": "option"
12836
12962
  },
12837
- "path": {
12838
- "char": "p",
12839
- "description": "Root folder",
12840
- "name": "path",
12841
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12963
+ "branch": {
12964
+ "description": "Git branch to use to generate delta",
12965
+ "name": "branch",
12966
+ "hasDynamicHelp": false,
12967
+ "multiple": false,
12968
+ "type": "option"
12969
+ },
12970
+ "fromcommit": {
12971
+ "description": "Hash of commit to start from",
12972
+ "name": "fromcommit",
12973
+ "hasDynamicHelp": false,
12974
+ "multiple": false,
12975
+ "type": "option"
12976
+ },
12977
+ "tocommit": {
12978
+ "description": "Hash of commit to stop at",
12979
+ "name": "tocommit",
12842
12980
  "hasDynamicHelp": false,
12843
12981
  "multiple": false,
12844
12982
  "type": "option"
@@ -12866,49 +13004,49 @@
12866
13004
  },
12867
13005
  "hasDynamicHelp": false,
12868
13006
  "hiddenAliases": [],
12869
- "id": "hardis:project:fix:v53flexipages",
13007
+ "id": "hardis:project:generate:gitdelta",
12870
13008
  "pluginAlias": "sfdx-hardis",
12871
13009
  "pluginName": "sfdx-hardis",
12872
13010
  "pluginType": "core",
12873
13011
  "strict": true,
12874
13012
  "enableJsonFlag": true,
12875
- "title": "Fix flexipages for v53",
12876
- "requiresProject": true,
13013
+ "title": "Generate Git Delta",
13014
+ "requiresProject": false,
12877
13015
  "isESM": true,
12878
13016
  "relativePath": [
12879
13017
  "lib",
12880
13018
  "commands",
12881
13019
  "hardis",
12882
13020
  "project",
12883
- "fix",
12884
- "v53flexipages.js"
13021
+ "generate",
13022
+ "gitdelta.js"
12885
13023
  ],
12886
13024
  "aliasPermutations": [],
12887
13025
  "permutations": [
12888
- "hardis:project:fix:v53flexipages",
12889
- "project:hardis:fix:v53flexipages",
12890
- "project:fix:hardis:v53flexipages",
12891
- "project:fix:v53flexipages:hardis",
12892
- "hardis:fix:project:v53flexipages",
12893
- "fix:hardis:project:v53flexipages",
12894
- "fix:project:hardis:v53flexipages",
12895
- "fix:project:v53flexipages:hardis",
12896
- "hardis:fix:v53flexipages:project",
12897
- "fix:hardis:v53flexipages:project",
12898
- "fix:v53flexipages:hardis:project",
12899
- "fix:v53flexipages:project:hardis",
12900
- "hardis:project:v53flexipages:fix",
12901
- "project:hardis:v53flexipages:fix",
12902
- "project:v53flexipages:hardis:fix",
12903
- "project:v53flexipages:fix:hardis",
12904
- "hardis:v53flexipages:project:fix",
12905
- "v53flexipages:hardis:project:fix",
12906
- "v53flexipages:project:hardis:fix",
12907
- "v53flexipages:project:fix:hardis",
12908
- "hardis:v53flexipages:fix:project",
12909
- "v53flexipages:hardis:fix:project",
12910
- "v53flexipages:fix:hardis:project",
12911
- "v53flexipages:fix:project:hardis"
13026
+ "hardis:project:generate:gitdelta",
13027
+ "project:hardis:generate:gitdelta",
13028
+ "project:generate:hardis:gitdelta",
13029
+ "project:generate:gitdelta:hardis",
13030
+ "hardis:generate:project:gitdelta",
13031
+ "generate:hardis:project:gitdelta",
13032
+ "generate:project:hardis:gitdelta",
13033
+ "generate:project:gitdelta:hardis",
13034
+ "hardis:generate:gitdelta:project",
13035
+ "generate:hardis:gitdelta:project",
13036
+ "generate:gitdelta:hardis:project",
13037
+ "generate:gitdelta:project:hardis",
13038
+ "hardis:project:gitdelta:generate",
13039
+ "project:hardis:gitdelta:generate",
13040
+ "project:gitdelta:hardis:generate",
13041
+ "project:gitdelta:generate:hardis",
13042
+ "hardis:gitdelta:project:generate",
13043
+ "gitdelta:hardis:project:generate",
13044
+ "gitdelta:project:hardis:generate",
13045
+ "gitdelta:project:generate:hardis",
13046
+ "hardis:gitdelta:generate:project",
13047
+ "gitdelta:hardis:generate:project",
13048
+ "gitdelta:generate:hardis:project",
13049
+ "gitdelta:generate:project:hardis"
12912
13050
  ]
12913
13051
  },
12914
13052
  "hardis:project:metadata:findduplicates": {
@@ -13024,109 +13162,6 @@
13024
13162
  "findduplicates:metadata:project:hardis"
13025
13163
  ]
13026
13164
  },
13027
- "hardis:project:convert:profilestopermsets": {
13028
- "aliases": [],
13029
- "args": {},
13030
- "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",
13031
- "examples": [
13032
- "$ sf hardis:project:convert:profilestopermsets"
13033
- ],
13034
- "flags": {
13035
- "json": {
13036
- "description": "Format output as json.",
13037
- "helpGroup": "GLOBAL",
13038
- "name": "json",
13039
- "allowNo": false,
13040
- "type": "boolean"
13041
- },
13042
- "flags-dir": {
13043
- "helpGroup": "GLOBAL",
13044
- "name": "flags-dir",
13045
- "summary": "Import flag values from a directory.",
13046
- "hasDynamicHelp": false,
13047
- "multiple": false,
13048
- "type": "option"
13049
- },
13050
- "except": {
13051
- "char": "e",
13052
- "description": "List of filters",
13053
- "name": "except",
13054
- "default": [],
13055
- "hasDynamicHelp": false,
13056
- "multiple": true,
13057
- "type": "option"
13058
- },
13059
- "debug": {
13060
- "char": "d",
13061
- "description": "Activate debug mode (more logs)",
13062
- "name": "debug",
13063
- "allowNo": false,
13064
- "type": "boolean"
13065
- },
13066
- "websocket": {
13067
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
13068
- "name": "websocket",
13069
- "hasDynamicHelp": false,
13070
- "multiple": false,
13071
- "type": "option"
13072
- },
13073
- "skipauth": {
13074
- "description": "Skip authentication check when a default username is required",
13075
- "name": "skipauth",
13076
- "allowNo": false,
13077
- "type": "boolean"
13078
- }
13079
- },
13080
- "hasDynamicHelp": false,
13081
- "hiddenAliases": [],
13082
- "id": "hardis:project:convert:profilestopermsets",
13083
- "pluginAlias": "sfdx-hardis",
13084
- "pluginName": "sfdx-hardis",
13085
- "pluginType": "core",
13086
- "strict": true,
13087
- "enableJsonFlag": true,
13088
- "title": "Convert Profiles into Permission Sets",
13089
- "requiresProject": true,
13090
- "requiresSfdxPlugins": [
13091
- "shane-sfdx-plugins"
13092
- ],
13093
- "isESM": true,
13094
- "relativePath": [
13095
- "lib",
13096
- "commands",
13097
- "hardis",
13098
- "project",
13099
- "convert",
13100
- "profilestopermsets.js"
13101
- ],
13102
- "aliasPermutations": [],
13103
- "permutations": [
13104
- "hardis:project:convert:profilestopermsets",
13105
- "project:hardis:convert:profilestopermsets",
13106
- "project:convert:hardis:profilestopermsets",
13107
- "project:convert:profilestopermsets:hardis",
13108
- "hardis:convert:project:profilestopermsets",
13109
- "convert:hardis:project:profilestopermsets",
13110
- "convert:project:hardis:profilestopermsets",
13111
- "convert:project:profilestopermsets:hardis",
13112
- "hardis:convert:profilestopermsets:project",
13113
- "convert:hardis:profilestopermsets:project",
13114
- "convert:profilestopermsets:hardis:project",
13115
- "convert:profilestopermsets:project:hardis",
13116
- "hardis:project:profilestopermsets:convert",
13117
- "project:hardis:profilestopermsets:convert",
13118
- "project:profilestopermsets:hardis:convert",
13119
- "project:profilestopermsets:convert:hardis",
13120
- "hardis:profilestopermsets:project:convert",
13121
- "profilestopermsets:hardis:project:convert",
13122
- "profilestopermsets:project:hardis:convert",
13123
- "profilestopermsets:project:convert:hardis",
13124
- "hardis:profilestopermsets:convert:project",
13125
- "profilestopermsets:hardis:convert:project",
13126
- "profilestopermsets:convert:hardis:project",
13127
- "profilestopermsets:convert:project:hardis"
13128
- ]
13129
- },
13130
13165
  "hardis:scratch:pool:create": {
13131
13166
  "aliases": [],
13132
13167
  "args": {},
@@ -15101,5 +15136,5 @@
15101
15136
  ]
15102
15137
  }
15103
15138
  },
15104
- "version": "6.1.3"
15139
+ "version": "6.1.5-beta202508282306.0"
15105
15140
  }